This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // how to use :) | |
| // mask: "(00) 0 0000-0000" | |
| // input: "31999699601" | |
| // result: "(31) 9 9969-9606" | |
| export const maskContent = (mask, input) => { | |
| const m = IMask.createMask({ | |
| mask, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const isElement = (obj) => { | |
| try { | |
| return obj instanceof HTMLElement; | |
| } catch (e) { | |
| return ( | |
| typeof obj === "object" && | |
| obj.nodeType === 1 && | |
| typeof obj.style === "object" && | |
| typeof obj.ownerDocument === "object" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { translate } from 'react-i18next' | |
| import { connect } from 'react-redux' | |
| import PropTypes from 'prop-types' | |
| import { simpleId } from 'utils/utility' | |
| import * as actions from 'store/messages/messages.useCases' | |
| import './MessageHandler.scss' | |
| import { ReactComponent as IcCheck } from 'assets/icons/message/check.svg' |