Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{links.map((id: string) => (
))}
validators,
requiredError,
helperText,
validatorListener,
withRequiredValidator,
label,
id,
...rest
} = this.props;
const { isValid } = this.state;
return (
);
}
}
{columns.map((column: ColumnModel, index: number) => (
<div>
{humanize(column.Name)}:
{columnRender(column, item)}
</div>
))}
export const useResolutionSwitch = (outerWidth = 1000, timeout = 500): [boolean] => {
const [isMobileResolution, setMobileResolution] = React.useState(false);
const handleResolutionChange = (): void => setMobileResolution(window.outerWidth < outerWidth);
const listener = debounce(handleResolutionChange, timeout);
React.useEffect(() => {
window.addEventListener('resize', listener);
handleResolutionChange();
return (): void => window.removeEventListener('resize', listener);
}, []);
return [isMobileResolution];
};
exports.useResolutionSwitch = function (outerWidth, timeout) {
if (outerWidth === void 0) { outerWidth = 1000; }
if (timeout === void 0) { timeout = 500; }
var _a = React.useState(false), isMobileResolution = _a[0], setMobileResolution = _a[1];
var handleResolutionChange = function () { return setMobileResolution(window.outerWidth < outerWidth); };
var listener = uno_js_1.debounce(handleResolutionChange, timeout);
React.useEffect(function () {
window.addEventListener('resize', listener);
handleResolutionChange();
return function () { return window.removeEventListener('resize', listener); };
}, []);
return [isMobileResolution];
};
var _this = this;
if (type === void 0) { type = 'success'; }
return new Promise(function () {
_this.snackbar = {
isMobile: false,
message: {
messageText: message,
messageType: type,
},
seconds: 5000,
};
_this.inform();
});
};
return SnackbarService;
}(uno_js_1.SimpleObservable));
exports.snackbarService = new SnackbarService();
//# sourceMappingURL=SnackbarService.js.map