Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paraboly/pwc-multi-filter

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paraboly/pwc-multi-filter - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/pwc-multi-filter/p-ferhasbv.entry.js

2

dist/cjs/loader.cjs.js

@@ -10,3 +10,3 @@ 'use strict';

core.globals();
core.bootstrapLazy([["pwc-dynamic-form-buttons.cjs",[[0,"pwc-dynamic-form-buttons",{"items":[1]}]]],["pwc-tabview.cjs",[[4,"pwc-tabview",{"activeTitle":[32],"forceRenderSentinel":[32],"getActiveState":[64],"switchToTab":[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]]]],["pwc-tabview-tab.cjs",[[4,"pwc-tabview-tab",{"title":[513],"active":[516]}]]],["pwc-dynamic-form.cjs",[[4,"pwc-dynamic-form",{"getFieldValues":[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]]]],["pwc-tabview-handle.cjs",[[0,"pwc-tabview-handle",{"title":[1],"active":[516]},[[0,"click","clickEventHandler"]]]]],["pwc-color-picker.cjs",[[0,"pwc-color-picker",{"colors":[8],"inputValue":[1,"input-value"],"activeColor":[1537,"active-color"],"selectedOne":[32],"hovered":[32]}]]],["pwc-choices-dropdown.cjs",[[0,"pwc-choices-dropdown",{"options":[16],"noOptionsString":[1,"no-options-string"],"searchBarPlaceholder":[1,"search-bar-placeholder"],"filteredOptions":[32]}]]],["pwc-choices-option-bubble.cjs",[[0,"pwc-choices-option-bubble",{"showCloseButton":[4,"show-close-button"],"option":[16],"indexInSelectedList":[2,"index-in-selected-list"]}]]],["pwc-choices-input-bar.cjs",[[0,"pwc-choices-input-bar",{"type":[1],"options":[16],"showCloseButtons":[4,"show-close-buttons"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]]]],["pwc-choices.cjs",[[0,"pwc-choices",{"name":[1],"type":[1],"options":[1],"searchBarPlaceholder":[1,"search-bar-placeholder"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"],"dropdownIsOpen":[1540,"dropdown-is-open"],"showCloseButtons":[4,"show-close-buttons"],"uniqueSelections":[4,"unique-selections"],"noOptionsString":[1,"no-options-string"],"distinctMode":[1,"distinct-mode"],"selectedOptions":[32],"getSelectedOptionsAsValues":[64],"getSelectedOptionsAsLabels":[64],"getSelectedOptionsAsObjects":[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]]]],["pwc-dynamic-form-content.cjs",[[0,"pwc-dynamic-form-content",{"items":[1],"getColorPickerRefs":[64],"getChoicesRefs":[64],"getNativeInputRefs":[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]]]],["pwc-filter.cjs",[[0,"pwc-filter",{"data":[1],"items":[1],"resolvedData":[32],"resolvedItems":[32],"filter":[64]},[[0,"formChanged","formChangedHandler"]]]]],["pwc-multi-filter.cjs",[[0,"pwc-multi-filter",{"filterConfigs":[32],"getActiveState":[64],"switchToFilter":[64],"addFilter":[64],"removeFilter":[64],"getFilter":[64],"subscribeToFilterChange":[64],"getFilterResult":[64]},[[0,"tabChanged","tabChangedEventHandler"]]]]]], options);
core.bootstrapLazy([["pwc-dynamic-form-buttons.cjs",[[0,"pwc-dynamic-form-buttons",{"items":[1]}]]],["pwc-tabview.cjs",[[4,"pwc-tabview",{"activeTitle":[32],"forceRenderSentinel":[32],"getActiveState":[64],"switchToTab":[64],"switchToTabIndex":[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]]]],["pwc-tabview-tab.cjs",[[4,"pwc-tabview-tab",{"title":[513],"active":[516]}]]],["pwc-dynamic-form.cjs",[[4,"pwc-dynamic-form",{"getFieldValues":[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]]]],["pwc-tabview-handle.cjs",[[0,"pwc-tabview-handle",{"title":[1],"active":[516]},[[0,"click","clickEventHandler"]]]]],["pwc-color-picker.cjs",[[0,"pwc-color-picker",{"colors":[8],"inputValue":[1,"input-value"],"activeColor":[1537,"active-color"],"selectedOne":[32],"hovered":[32]}]]],["pwc-choices-dropdown.cjs",[[0,"pwc-choices-dropdown",{"options":[16],"noOptionsString":[1,"no-options-string"],"searchBarPlaceholder":[1,"search-bar-placeholder"],"filteredOptions":[32]}]]],["pwc-choices-option-bubble.cjs",[[0,"pwc-choices-option-bubble",{"showCloseButton":[4,"show-close-button"],"option":[16],"indexInSelectedList":[2,"index-in-selected-list"]}]]],["pwc-choices-input-bar.cjs",[[0,"pwc-choices-input-bar",{"type":[1],"options":[16],"showCloseButtons":[4,"show-close-buttons"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]]]],["pwc-choices.cjs",[[0,"pwc-choices",{"name":[1],"type":[1],"options":[1],"searchBarPlaceholder":[1,"search-bar-placeholder"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"],"dropdownIsOpen":[1540,"dropdown-is-open"],"showCloseButtons":[4,"show-close-buttons"],"uniqueSelections":[4,"unique-selections"],"noOptionsString":[1,"no-options-string"],"distinctMode":[1,"distinct-mode"],"selectedOptions":[32],"getSelectedOptionsAsValues":[64],"getSelectedOptionsAsLabels":[64],"getSelectedOptionsAsObjects":[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]]]],["pwc-dynamic-form-content.cjs",[[0,"pwc-dynamic-form-content",{"items":[1],"getColorPickerRefs":[64],"getChoicesRefs":[64],"getNativeInputRefs":[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]]]],["pwc-filter.cjs",[[0,"pwc-filter",{"data":[1],"items":[1],"resolvedData":[32],"resolvedItems":[32],"filter":[64]},[[0,"formChanged","formChangedHandler"]]]]],["pwc-multi-filter.cjs",[[0,"pwc-multi-filter",{"filterConfigs":[32],"getActiveState":[64],"switchToFilter":[64],"addFilter":[64],"removeFilter":[64],"getFilter":[64],"subscribeToFilterChange":[64],"getFilterResult":[64]},[[0,"tabChanged","tabChangedEventHandler"]]]]]], options);
});

@@ -13,0 +13,0 @@ };

@@ -7,3 +7,3 @@ 'use strict';

core.globals();
return core.bootstrapLazy([["pwc-dynamic-form-buttons.cjs",[[0,"pwc-dynamic-form-buttons",{"items":[1]}]]],["pwc-tabview.cjs",[[4,"pwc-tabview",{"activeTitle":[32],"forceRenderSentinel":[32],"getActiveState":[64],"switchToTab":[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]]]],["pwc-tabview-tab.cjs",[[4,"pwc-tabview-tab",{"title":[513],"active":[516]}]]],["pwc-dynamic-form.cjs",[[4,"pwc-dynamic-form",{"getFieldValues":[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]]]],["pwc-tabview-handle.cjs",[[0,"pwc-tabview-handle",{"title":[1],"active":[516]},[[0,"click","clickEventHandler"]]]]],["pwc-color-picker.cjs",[[0,"pwc-color-picker",{"colors":[8],"inputValue":[1,"input-value"],"activeColor":[1537,"active-color"],"selectedOne":[32],"hovered":[32]}]]],["pwc-choices-dropdown.cjs",[[0,"pwc-choices-dropdown",{"options":[16],"noOptionsString":[1,"no-options-string"],"searchBarPlaceholder":[1,"search-bar-placeholder"],"filteredOptions":[32]}]]],["pwc-choices-option-bubble.cjs",[[0,"pwc-choices-option-bubble",{"showCloseButton":[4,"show-close-button"],"option":[16],"indexInSelectedList":[2,"index-in-selected-list"]}]]],["pwc-choices-input-bar.cjs",[[0,"pwc-choices-input-bar",{"type":[1],"options":[16],"showCloseButtons":[4,"show-close-buttons"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]]]],["pwc-choices.cjs",[[0,"pwc-choices",{"name":[1],"type":[1],"options":[1],"searchBarPlaceholder":[1,"search-bar-placeholder"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"],"dropdownIsOpen":[1540,"dropdown-is-open"],"showCloseButtons":[4,"show-close-buttons"],"uniqueSelections":[4,"unique-selections"],"noOptionsString":[1,"no-options-string"],"distinctMode":[1,"distinct-mode"],"selectedOptions":[32],"getSelectedOptionsAsValues":[64],"getSelectedOptionsAsLabels":[64],"getSelectedOptionsAsObjects":[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]]]],["pwc-dynamic-form-content.cjs",[[0,"pwc-dynamic-form-content",{"items":[1],"getColorPickerRefs":[64],"getChoicesRefs":[64],"getNativeInputRefs":[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]]]],["pwc-filter.cjs",[[0,"pwc-filter",{"data":[1],"items":[1],"resolvedData":[32],"resolvedItems":[32],"filter":[64]},[[0,"formChanged","formChangedHandler"]]]]],["pwc-multi-filter.cjs",[[0,"pwc-multi-filter",{"filterConfigs":[32],"getActiveState":[64],"switchToFilter":[64],"addFilter":[64],"removeFilter":[64],"getFilter":[64],"subscribeToFilterChange":[64],"getFilterResult":[64]},[[0,"tabChanged","tabChangedEventHandler"]]]]]], options);
return core.bootstrapLazy([["pwc-dynamic-form-buttons.cjs",[[0,"pwc-dynamic-form-buttons",{"items":[1]}]]],["pwc-tabview.cjs",[[4,"pwc-tabview",{"activeTitle":[32],"forceRenderSentinel":[32],"getActiveState":[64],"switchToTab":[64],"switchToTabIndex":[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]]]],["pwc-tabview-tab.cjs",[[4,"pwc-tabview-tab",{"title":[513],"active":[516]}]]],["pwc-dynamic-form.cjs",[[4,"pwc-dynamic-form",{"getFieldValues":[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]]]],["pwc-tabview-handle.cjs",[[0,"pwc-tabview-handle",{"title":[1],"active":[516]},[[0,"click","clickEventHandler"]]]]],["pwc-color-picker.cjs",[[0,"pwc-color-picker",{"colors":[8],"inputValue":[1,"input-value"],"activeColor":[1537,"active-color"],"selectedOne":[32],"hovered":[32]}]]],["pwc-choices-dropdown.cjs",[[0,"pwc-choices-dropdown",{"options":[16],"noOptionsString":[1,"no-options-string"],"searchBarPlaceholder":[1,"search-bar-placeholder"],"filteredOptions":[32]}]]],["pwc-choices-option-bubble.cjs",[[0,"pwc-choices-option-bubble",{"showCloseButton":[4,"show-close-button"],"option":[16],"indexInSelectedList":[2,"index-in-selected-list"]}]]],["pwc-choices-input-bar.cjs",[[0,"pwc-choices-input-bar",{"type":[1],"options":[16],"showCloseButtons":[4,"show-close-buttons"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]]]],["pwc-choices.cjs",[[0,"pwc-choices",{"name":[1],"type":[1],"options":[1],"searchBarPlaceholder":[1,"search-bar-placeholder"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"],"dropdownIsOpen":[1540,"dropdown-is-open"],"showCloseButtons":[4,"show-close-buttons"],"uniqueSelections":[4,"unique-selections"],"noOptionsString":[1,"no-options-string"],"distinctMode":[1,"distinct-mode"],"selectedOptions":[32],"getSelectedOptionsAsValues":[64],"getSelectedOptionsAsLabels":[64],"getSelectedOptionsAsObjects":[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]]]],["pwc-dynamic-form-content.cjs",[[0,"pwc-dynamic-form-content",{"items":[1],"getColorPickerRefs":[64],"getChoicesRefs":[64],"getNativeInputRefs":[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]]]],["pwc-filter.cjs",[[0,"pwc-filter",{"data":[1],"items":[1],"resolvedData":[32],"resolvedItems":[32],"filter":[64]},[[0,"formChanged","formChangedHandler"]]]]],["pwc-multi-filter.cjs",[[0,"pwc-multi-filter",{"filterConfigs":[32],"getActiveState":[64],"switchToFilter":[64],"addFilter":[64],"removeFilter":[64],"getFilter":[64],"subscribeToFilterChange":[64],"getFilterResult":[64]},[[0,"tabChanged","tabChangedEventHandler"]]]]]], options);
});

@@ -41,2 +41,5 @@ 'use strict';

async switchToTab(title) {
if (!this.titles.includes(title)) {
throw new Error("Tab title not found.");
}
this.activeTitle = title;

@@ -49,7 +52,28 @@ this.tabChanged.emit({

}
/**
* Switches to a tab.
* @param index Index of the target tab.
*/
async switchToTabIndex(index) {
if (this.titles.length <= index) {
throw new Error("Tab index not found.");
}
const title = this.titles[index];
return this.switchToTab(title);
}
forceRender() {
this.forceRenderSentinel = (this.forceRenderSentinel + 1) % 100;
}
onChildrenChange() {
this.parseTabList();
this.switchToTabIndex(0);
this.forceRender();
}
parseTabList() {
const tabs = Array.from(document.querySelectorAll("pwc-tabview-tab"));
this.titles = tabs.map(t => t.title);
return tabs;
}
componentDidLoad() {
const observer = new MutationObserver(() => this.forceRender());
const observer = new MutationObserver(this.onChildrenChange.bind(this));
const options = {

@@ -59,8 +83,6 @@ childList: true

observer.observe(this.root, options);
const firstHandle = this.titles[0];
this.switchToTab(firstHandle);
this.switchToTabIndex(0);
}
render() {
const tabs = Array.from(document.querySelectorAll("pwc-tabview-tab"));
this.titles = tabs.map(t => t.title);
const tabs = this.parseTabList();
if (tabs.length > 0 && this.activeTab) {

@@ -67,0 +89,0 @@ tabs.forEach(t => (t.active = false));

@@ -37,2 +37,5 @@ import { r as registerInstance, c as createEvent, h, d as getElement } from './core-46079b98.js';

async switchToTab(title) {
if (!this.titles.includes(title)) {
throw new Error("Tab title not found.");
}
this.activeTitle = title;

@@ -45,7 +48,28 @@ this.tabChanged.emit({

}
/**
* Switches to a tab.
* @param index Index of the target tab.
*/
async switchToTabIndex(index) {
if (this.titles.length <= index) {
throw new Error("Tab index not found.");
}
const title = this.titles[index];
return this.switchToTab(title);
}
forceRender() {
this.forceRenderSentinel = (this.forceRenderSentinel + 1) % 100;
}
onChildrenChange() {
this.parseTabList();
this.switchToTabIndex(0);
this.forceRender();
}
parseTabList() {
const tabs = Array.from(document.querySelectorAll("pwc-tabview-tab"));
this.titles = tabs.map(t => t.title);
return tabs;
}
componentDidLoad() {
const observer = new MutationObserver(() => this.forceRender());
const observer = new MutationObserver(this.onChildrenChange.bind(this));
const options = {

@@ -55,8 +79,6 @@ childList: true

observer.observe(this.root, options);
const firstHandle = this.titles[0];
this.switchToTab(firstHandle);
this.switchToTabIndex(0);
}
render() {
const tabs = Array.from(document.querySelectorAll("pwc-tabview-tab"));
this.titles = tabs.map(t => t.title);
const tabs = this.parseTabList();
if (tabs.length > 0 && this.activeTab) {

@@ -63,0 +85,0 @@ tabs.forEach(t => (t.active = false));

@@ -1,1 +0,1 @@

System.register(["./p-f562fb6b.system.js"],(function(){"use strict";var e,t;return{setters:[function(o){e=o.p;t=o.b}],execute:function(){e().then((function(e){return t([["p-y3u4gvh4.system",[[0,"pwc-dynamic-form-buttons",{items:[1]}]]],["p-k1vifo3r.system",[[0,"pwc-multi-filter",{filterConfigs:[32],getActiveState:[64],switchToFilter:[64],addFilter:[64],removeFilter:[64],getFilter:[64],subscribeToFilterChange:[64],getFilterResult:[64]},[[0,"tabChanged","tabChangedEventHandler"]]],[0,"pwc-filter",{data:[1],items:[1],resolvedData:[32],resolvedItems:[32],filter:[64]},[[0,"formChanged","formChangedHandler"]]],[4,"pwc-tabview",{activeTitle:[32],forceRenderSentinel:[32],getActiveState:[64],switchToTab:[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]],[4,"pwc-tabview-tab",{title:[513],active:[516]}],[0,"pwc-dynamic-form-content",{items:[1],getColorPickerRefs:[64],getChoicesRefs:[64],getNativeInputRefs:[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]],[4,"pwc-dynamic-form",{getFieldValues:[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]],[0,"pwc-tabview-handle",{title:[1],active:[516]},[[0,"click","clickEventHandler"]]],[0,"pwc-choices",{name:[1],type:[1],options:[1],searchBarPlaceholder:[1,"search-bar-placeholder"],placeholder:[1],autoHidePlaceholder:[4,"auto-hide-placeholder"],dropdownIsOpen:[1540,"dropdown-is-open"],showCloseButtons:[4,"show-close-buttons"],uniqueSelections:[4,"unique-selections"],noOptionsString:[1,"no-options-string"],distinctMode:[1,"distinct-mode"],selectedOptions:[32],getSelectedOptionsAsValues:[64],getSelectedOptionsAsLabels:[64],getSelectedOptionsAsObjects:[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]],[0,"pwc-color-picker",{colors:[8],inputValue:[1,"input-value"],activeColor:[1537,"active-color"],selectedOne:[32],hovered:[32]}],[0,"pwc-choices-input-bar",{type:[1],options:[16],showCloseButtons:[4,"show-close-buttons"],placeholder:[1],autoHidePlaceholder:[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]],[0,"pwc-choices-dropdown",{options:[16],noOptionsString:[1,"no-options-string"],searchBarPlaceholder:[1,"search-bar-placeholder"],filteredOptions:[32]}],[0,"pwc-choices-option-bubble",{showCloseButton:[4,"show-close-button"],option:[16],indexInSelectedList:[2,"index-in-selected-list"]}]]]],e)}))}}}));
System.register(["./p-f562fb6b.system.js"],(function(){"use strict";var e,t;return{setters:[function(o){e=o.p;t=o.b}],execute:function(){e().then((function(e){return t([["p-y3u4gvh4.system",[[0,"pwc-dynamic-form-buttons",{items:[1]}]]],["p-tp6ss1ue.system",[[0,"pwc-multi-filter",{filterConfigs:[32],getActiveState:[64],switchToFilter:[64],addFilter:[64],removeFilter:[64],getFilter:[64],subscribeToFilterChange:[64],getFilterResult:[64]},[[0,"tabChanged","tabChangedEventHandler"]]],[0,"pwc-filter",{data:[1],items:[1],resolvedData:[32],resolvedItems:[32],filter:[64]},[[0,"formChanged","formChangedHandler"]]],[4,"pwc-tabview",{activeTitle:[32],forceRenderSentinel:[32],getActiveState:[64],switchToTab:[64],switchToTabIndex:[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]],[4,"pwc-tabview-tab",{title:[513],active:[516]}],[0,"pwc-dynamic-form-content",{items:[1],getColorPickerRefs:[64],getChoicesRefs:[64],getNativeInputRefs:[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]],[4,"pwc-dynamic-form",{getFieldValues:[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]],[0,"pwc-tabview-handle",{title:[1],active:[516]},[[0,"click","clickEventHandler"]]],[0,"pwc-choices",{name:[1],type:[1],options:[1],searchBarPlaceholder:[1,"search-bar-placeholder"],placeholder:[1],autoHidePlaceholder:[4,"auto-hide-placeholder"],dropdownIsOpen:[1540,"dropdown-is-open"],showCloseButtons:[4,"show-close-buttons"],uniqueSelections:[4,"unique-selections"],noOptionsString:[1,"no-options-string"],distinctMode:[1,"distinct-mode"],selectedOptions:[32],getSelectedOptionsAsValues:[64],getSelectedOptionsAsLabels:[64],getSelectedOptionsAsObjects:[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]],[0,"pwc-color-picker",{colors:[8],inputValue:[1,"input-value"],activeColor:[1537,"active-color"],selectedOne:[32],hovered:[32]}],[0,"pwc-choices-input-bar",{type:[1],options:[16],showCloseButtons:[4,"show-close-buttons"],placeholder:[1],autoHidePlaceholder:[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]],[0,"pwc-choices-dropdown",{options:[16],noOptionsString:[1,"no-options-string"],searchBarPlaceholder:[1,"search-bar-placeholder"],filteredOptions:[32]}],[0,"pwc-choices-option-bubble",{showCloseButton:[4,"show-close-button"],option:[16],indexInSelectedList:[2,"index-in-selected-list"]}]]]],e)}))}}}));

@@ -5,3 +5,3 @@ import { p as patchBrowser, g as globals, b as bootstrapLazy } from './core-512552ee.js';

globals();
return bootstrapLazy([["pwc-dynamic-form-buttons",[[0,"pwc-dynamic-form-buttons",{"items":[1]}]]],["pwc-tabview",[[4,"pwc-tabview",{"activeTitle":[32],"forceRenderSentinel":[32],"getActiveState":[64],"switchToTab":[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]]]],["pwc-tabview-tab",[[4,"pwc-tabview-tab",{"title":[513],"active":[516]}]]],["pwc-dynamic-form",[[4,"pwc-dynamic-form",{"getFieldValues":[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]]]],["pwc-tabview-handle",[[0,"pwc-tabview-handle",{"title":[1],"active":[516]},[[0,"click","clickEventHandler"]]]]],["pwc-color-picker",[[0,"pwc-color-picker",{"colors":[8],"inputValue":[1,"input-value"],"activeColor":[1537,"active-color"],"selectedOne":[32],"hovered":[32]}]]],["pwc-choices-dropdown",[[0,"pwc-choices-dropdown",{"options":[16],"noOptionsString":[1,"no-options-string"],"searchBarPlaceholder":[1,"search-bar-placeholder"],"filteredOptions":[32]}]]],["pwc-choices-option-bubble",[[0,"pwc-choices-option-bubble",{"showCloseButton":[4,"show-close-button"],"option":[16],"indexInSelectedList":[2,"index-in-selected-list"]}]]],["pwc-choices-input-bar",[[0,"pwc-choices-input-bar",{"type":[1],"options":[16],"showCloseButtons":[4,"show-close-buttons"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]]]],["pwc-choices",[[0,"pwc-choices",{"name":[1],"type":[1],"options":[1],"searchBarPlaceholder":[1,"search-bar-placeholder"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"],"dropdownIsOpen":[1540,"dropdown-is-open"],"showCloseButtons":[4,"show-close-buttons"],"uniqueSelections":[4,"unique-selections"],"noOptionsString":[1,"no-options-string"],"distinctMode":[1,"distinct-mode"],"selectedOptions":[32],"getSelectedOptionsAsValues":[64],"getSelectedOptionsAsLabels":[64],"getSelectedOptionsAsObjects":[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]]]],["pwc-dynamic-form-content",[[0,"pwc-dynamic-form-content",{"items":[1],"getColorPickerRefs":[64],"getChoicesRefs":[64],"getNativeInputRefs":[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]]]],["pwc-filter",[[0,"pwc-filter",{"data":[1],"items":[1],"resolvedData":[32],"resolvedItems":[32],"filter":[64]},[[0,"formChanged","formChangedHandler"]]]]],["pwc-multi-filter",[[0,"pwc-multi-filter",{"filterConfigs":[32],"getActiveState":[64],"switchToFilter":[64],"addFilter":[64],"removeFilter":[64],"getFilter":[64],"subscribeToFilterChange":[64],"getFilterResult":[64]},[[0,"tabChanged","tabChangedEventHandler"]]]]]], options);
return bootstrapLazy([["pwc-dynamic-form-buttons",[[0,"pwc-dynamic-form-buttons",{"items":[1]}]]],["pwc-tabview",[[4,"pwc-tabview",{"activeTitle":[32],"forceRenderSentinel":[32],"getActiveState":[64],"switchToTab":[64],"switchToTabIndex":[64]},[[0,"tabModified","tabModifiedEventHandler"],[0,"handleClicked","handleClickedHandler"]]]]],["pwc-tabview-tab",[[4,"pwc-tabview-tab",{"title":[513],"active":[516]}]]],["pwc-dynamic-form",[[4,"pwc-dynamic-form",{"getFieldValues":[64]},[[0,"fieldChanged","handleFieldChanged"],[0,"reset","handleFormReset"]]]]],["pwc-tabview-handle",[[0,"pwc-tabview-handle",{"title":[1],"active":[516]},[[0,"click","clickEventHandler"]]]]],["pwc-color-picker",[[0,"pwc-color-picker",{"colors":[8],"inputValue":[1,"input-value"],"activeColor":[1537,"active-color"],"selectedOne":[32],"hovered":[32]}]]],["pwc-choices-dropdown",[[0,"pwc-choices-dropdown",{"options":[16],"noOptionsString":[1,"no-options-string"],"searchBarPlaceholder":[1,"search-bar-placeholder"],"filteredOptions":[32]}]]],["pwc-choices-option-bubble",[[0,"pwc-choices-option-bubble",{"showCloseButton":[4,"show-close-button"],"option":[16],"indexInSelectedList":[2,"index-in-selected-list"]}]]],["pwc-choices-input-bar",[[0,"pwc-choices-input-bar",{"type":[1],"options":[16],"showCloseButtons":[4,"show-close-buttons"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"]},[[0,"closeClicked","optionBubbleCloseClickedHandler"],[0,"click","onInputBarClick"]]]]],["pwc-choices",[[0,"pwc-choices",{"name":[1],"type":[1],"options":[1],"searchBarPlaceholder":[1,"search-bar-placeholder"],"placeholder":[1],"autoHidePlaceholder":[4,"auto-hide-placeholder"],"dropdownIsOpen":[1540,"dropdown-is-open"],"showCloseButtons":[4,"show-close-buttons"],"uniqueSelections":[4,"unique-selections"],"noOptionsString":[1,"no-options-string"],"distinctMode":[1,"distinct-mode"],"selectedOptions":[32],"getSelectedOptionsAsValues":[64],"getSelectedOptionsAsLabels":[64],"getSelectedOptionsAsObjects":[64]},[[0,"optionDiscarded","optionDiscardedHandler"],[0,"inputBarClicked","inputBarClickedHandler"],[0,"dropdownOptionClicked","dropdownOptionClickedHandler"],[8,"click","windowClickHandler"],[0,"click","selfClickHandler"]]]]],["pwc-dynamic-form-content",[[0,"pwc-dynamic-form-content",{"items":[1],"getColorPickerRefs":[64],"getChoicesRefs":[64],"getNativeInputRefs":[64]},[[0,"change","changeEventHandler"],[0,"selectedOptionsChanged","selectedOptionsChangedHandler"],[0,"colorPickedEvent","colorPickedeventHandler"]]]]],["pwc-filter",[[0,"pwc-filter",{"data":[1],"items":[1],"resolvedData":[32],"resolvedItems":[32],"filter":[64]},[[0,"formChanged","formChangedHandler"]]]]],["pwc-multi-filter",[[0,"pwc-multi-filter",{"filterConfigs":[32],"getActiveState":[64],"switchToFilter":[64],"addFilter":[64],"removeFilter":[64],"getFilter":[64],"subscribeToFilterChange":[64],"getFilterResult":[64]},[[0,"tabChanged","tabChangedEventHandler"]]]]]], options);
});

@@ -37,2 +37,5 @@ import { r as registerInstance, c as createEvent, h, d as getElement } from './core-512552ee.js';

async switchToTab(title) {
if (!this.titles.includes(title)) {
throw new Error("Tab title not found.");
}
this.activeTitle = title;

@@ -45,7 +48,28 @@ this.tabChanged.emit({

}
/**
* Switches to a tab.
* @param index Index of the target tab.
*/
async switchToTabIndex(index) {
if (this.titles.length <= index) {
throw new Error("Tab index not found.");
}
const title = this.titles[index];
return this.switchToTab(title);
}
forceRender() {
this.forceRenderSentinel = (this.forceRenderSentinel + 1) % 100;
}
onChildrenChange() {
this.parseTabList();
this.switchToTabIndex(0);
this.forceRender();
}
parseTabList() {
const tabs = Array.from(document.querySelectorAll("pwc-tabview-tab"));
this.titles = tabs.map(t => t.title);
return tabs;
}
componentDidLoad() {
const observer = new MutationObserver(() => this.forceRender());
const observer = new MutationObserver(this.onChildrenChange.bind(this));
const options = {

@@ -55,8 +79,6 @@ childList: true

observer.observe(this.root, options);
const firstHandle = this.titles[0];
this.switchToTab(firstHandle);
this.switchToTabIndex(0);
}
render() {
const tabs = Array.from(document.querySelectorAll("pwc-tabview-tab"));
this.titles = tabs.map(t => t.title);
const tabs = this.parseTabList();
if (tabs.length > 0 && this.activeTab) {

@@ -63,0 +85,0 @@ tabs.forEach(t => (t.active = false));

{
"name": "@paraboly/pwc-multi-filter",
"version": "1.0.0",
"version": "1.0.1",
"description": "A wrapper over pwc-tabview and pwc-filter. Provides means of dynamically managing multiple filters via a single component.",

@@ -63,5 +63,5 @@ "keywords": [

"@paraboly/pwc-filter": "^1.0.2",
"@paraboly/pwc-tabview": "^3.1.0"
"@paraboly/pwc-tabview": "^3.1.2"
},
"peerDependencies": {}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc