devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
61 lines (60 loc) • 1.88 kB
JavaScript
/**
* DevExtreme (esm/__internal/ui/button/ink_ripple.js)
* Version: 25.2.7
* Build date: Tue May 05 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["config"];
import {
createVNode,
normalizeProps
} from "inferno";
import {
BaseInfernoComponent
} from "../../core/r1/runtime/inferno/index";
import {
hideWave,
initConfig,
showWave
} from "../../core/utils/m_ink_ripple";
export const defaultInkRippleProps = {
config: {}
};
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) {
this.__getterCache.getConfig = initConfig(this.props.config)
}
return this.__getterCache.getConfig
}
get restAttributes() {
const _this$props = this.props,
restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
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, Object.assign({}, this.restAttributes)))
}
}
InkRipple.defaultProps = defaultInkRippleProps;