UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

64 lines (63 loc) 1.82 kB
/** * DevExtreme (esm/__internal/ui/button/ink_ripple.js) * Version: 24.2.6 * Build date: Mon Mar 17 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import _extends from "@babel/runtime/helpers/esm/extends"; import { createVNode, normalizeProps } from "inferno"; import { BaseInfernoComponent } from "@devextreme/runtime/inferno"; import { hideWave, initConfig, showWave } from "../../../ui/widget/utils.ink_ripple"; export class InkRipple extends BaseInfernoComponent { constructor(props) { super(props); this.__getterCache = {}; this.state = {}; this.hideWave = this.hideWave.bind(this); this.showWave = this.showWave.bind(this) } get getConfig() { if (void 0 !== this.__getterCache.getConfig) { return this.__getterCache.getConfig } return this.__getterCache.getConfig = (() => { const { config: config } = this.props; return initConfig(config) })() } get restAttributes() { const restProps = _extends({}, this.props); delete restProps.config; return restProps } hideWave(opts) { hideWave(this.getConfig, opts) } showWave(opts) { showWave(this.getConfig, opts) } componentWillUpdate(nextProps) { if (this.props.config !== nextProps.config) { this.__getterCache.getConfig = void 0 } } render() { return normalizeProps(createVNode(1, "div", "dx-inkripple", null, 1, _extends({}, this.restAttributes))) } } InkRipple.defaultProps = { config: {} };