UNPKG

@paraboly/pwc-multi-filter

Version:

A wrapper over pwc-tabview and pwc-filter. Provides means of dynamically managing multiple filters via a single component.

40 lines (35 loc) 1.38 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const core = require('./core-d69cee64.js'); const PwcTabviewHandle = class { constructor(hostRef) { core.registerInstance(this, hostRef); this.defaultActive = false; this.active = this.defaultActive; this.handleClicked = core.createEvent(this, "handleClicked", 7); } activeWatchHandler(newValue) { if (newValue === null || newValue === undefined) { this.active = this.defaultActive; } } clickEventHandler(event) { this.handleClicked.emit({ originalEvent: event, handle: this.root, title: this.title }); } componentWillRender() { this.activeWatchHandler(this.active); } render() { return this.title; } get root() { return core.getElement(this); } static get watchers() { return { "active": ["activeWatchHandler"] }; } static get style() { return "pwc-tabview-handle {\n display: block;\n border: 1px solid black;\n padding: 10px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-color: #ddd;\n}\n\npwc-tabview-handle[active] {\n background-color: #fff;\n}"; } }; exports.pwc_tabview_handle = PwcTabviewHandle;