UNPKG

@synergy-design-system/components

Version:

This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define

35 lines (32 loc) 954 B
import { __spreadValues } from "./chunk.Z4XV3SMG.js"; // src/internal/watch.ts function watch(propertyName, options) { const resolvedOptions = __spreadValues({ waitUntilFirstUpdate: false }, options); return (proto, decoratedFnName) => { const { update } = proto; const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName]; proto.update = function(changedProps) { watchedProperties.forEach((property) => { const key = property; if (changedProps.has(key)) { const oldValue = changedProps.get(key); const newValue = this[key]; if (oldValue !== newValue) { if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) { this[decoratedFnName](oldValue, newValue); } } } }); update.call(this, changedProps); }; }; } export { watch }; //# sourceMappingURL=chunk.BVZQ6QSY.js.map