UNPKG

@huluvu424242/honey-slideshow

Version:

Text to Speech component wich is reading texts from DOM elements.

52 lines (51 loc) 1.83 kB
import { r as registerInstance, c as createEvent } from './index-a2883912.js'; var Route = /** @class */ (function () { function Route(hostRef) { registerInstance(this, hostRef); this.ionRouteDataChanged = createEvent(this, "ionRouteDataChanged", 7); /** * Relative path that needs to match in order for this route to apply. * * Accepts paths similar to expressjs so that you can define parameters * in the url /foo/:bar where bar would be available in incoming props. */ this.url = ''; } Route.prototype.onUpdate = function (newValue) { this.ionRouteDataChanged.emit(newValue); }; Route.prototype.onComponentProps = function (newValue, oldValue) { if (newValue === oldValue) { return; } var keys1 = newValue ? Object.keys(newValue) : []; var keys2 = oldValue ? Object.keys(oldValue) : []; if (keys1.length !== keys2.length) { this.onUpdate(newValue); return; } for (var _i = 0, keys1_1 = keys1; _i < keys1_1.length; _i++) { var key = keys1_1[_i]; if (newValue[key] !== oldValue[key]) { this.onUpdate(newValue); return; } } }; Route.prototype.connectedCallback = function () { this.ionRouteDataChanged.emit(); }; Object.defineProperty(Route, "watchers", { get: function () { return { "url": ["onUpdate"], "component": ["onUpdate"], "componentProps": ["onComponentProps"] }; }, enumerable: false, configurable: true }); return Route; }()); export { Route as ion_route };