merge devel
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"251.prod.js","mappings":"skNAOA,MAAMA,UAAkBC,IAAAA,cACtBC,YAAYC,GACVC,MAAMD,GAENE,KAAKC,QAAU,CAAC,EAChBC,EAAAA,SAAuBC,IAAQH,KAAKC,QAAQE,EAAGC,MAAQD,EAAGE,IAAI,IAE9DL,KAAKM,MAAQ,CACXC,YAAaT,EAAMS,aAAe,KAClCC,SAAUR,KAAKC,QAAQH,EAAMS,aAAe,MAC5CE,YAAa,IAGfT,KAAKU,aAAeV,KAAKU,aAAaC,KAAKX,MAC3CA,KAAKY,eAAiBZ,KAAKY,eAAeD,KAAKX,MAC/CA,KAAKa,cAAgBb,KAAKa,cAAcF,KAAKX,MAC7CA,KAAKc,oBAAsBd,KAAKc,oBAAoBH,KAAKX,KAC3D,CAEAU,aAAaK,GACXf,KAAKgB,SAAS,CAACP,YAAaT,KAAKiB,aAAaF,EAAEG,OAAOC,QACzD,CAEAP,eAAeG,GACbA,EAAEK,iBACFpB,KAAKF,MAAMuB,SAASrB,KAAKM,MAAMG,YAAYa,OAC7C,CAGAT,cAAcE,GACE,UAAVA,EAAEQ,KACJvB,KAAKY,eAAeG,EAExB,CAEAD,sBACEd,KAAKF,MAAM0B,sBAAsBxB,KAAKM,MAAMC,YAAaP,KAAKM,MAAME,SACtE,CAGAS,aAAaQ,GACX,OAAKA,EAKEA,EAAOC,QAAQ,eAAgB,IAJ7BD,CAKX,CAEAE,SACE,OACE,oCACE,0BAAMC,UAAU,YAAYC,QAAS7B,KAAKc,qBACxC,0BAAMc,UAAU,iBAAgBE,EAAAA,EAAAA,IAAU9B,KAAKM,MAAMC,aAAa,KAAa,IAC7EP,KAAKM,MAAME,SAAS,KACxB,2BAAOuB,KAAK,MAAMC,YAAahC,KAAKM,MAAM0B,YACtCb,MAAOnB,KAAKM,MAAMG,YAAawB,SAAUjC,KAAKU,aAC9CwB,UAAW,GAAIC,UAAWnC,KAAKa,cAAeuB,UAAQ,EAACC,UAAWrC,KAAKF,MAAMuC,YAGvF,EAGF,SAAeC,EAAAA,EAAAA,YAAW3C,E","sources":["webpack://tinode-webapp/./src/widgets/phone-edit.jsx"],"sourcesContent":["// Editor for a phone number.\n\nimport React from 'react';\nimport { injectIntl } from 'react-intl';\nimport * as dcodes from '../dcodes.json';\nimport { flagEmoji } from '../lib/strformat';\n\nclass PhoneEdit extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.codeMap = {};\n dcodes.default.forEach(dc => { this.codeMap[dc.code] = dc.dial; });\n\n this.state = {\n countryCode: props.countryCode || 'US',\n dialCode: this.codeMap[props.countryCode || 'US'],\n localNumber: ''\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleFinished = this.handleFinished.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.showCountrySelector = this.showCountrySelector.bind(this);\n }\n\n handleChange(e) {\n this.setState({localNumber: this.filterNumber(e.target.value)});\n }\n\n handleFinished(e) {\n e.preventDefault();\n this.props.onSubmit(this.state.localNumber.trim());\n }\n\n\n handleKeyDown(e) {\n if (e.key === 'Enter') {\n this.handleFinished(e);\n }\n }\n\n showCountrySelector() {\n this.props.onShowCountrySelector(this.state.countryCode, this.state.dialCode);\n }\n\n // Filter out characters not permitted in a phone number.\n filterNumber(number) {\n if (!number) {\n return number;\n }\n // Leave numbers, space, (, ), -, and .\n // The + is not allowed: it's handled by the country code portion.\n return number.replace(/[^-\\s().\\d]/g, '');\n }\n\n render() {\n return (\n <>\n <span className=\"dial-code\" onClick={this.showCountrySelector}>\n <span className=\"country-flag\">{flagEmoji(this.state.countryCode)} </span>\n +{this.state.dialCode} </span>\n <input type=\"tel\" placeholder={this.state.placeholder}\n value={this.state.localNumber} onChange={this.handleChange}\n maxLength={17} onKeyDown={this.handleKeyDown} required autoFocus={this.props.autoFocus} />\n </>\n );\n }\n}\n\nexport default injectIntl(PhoneEdit);\n"],"names":["PhoneEdit","React","constructor","props","super","this","codeMap","dcodes","dc","code","dial","state","countryCode","dialCode","localNumber","handleChange","bind","handleFinished","handleKeyDown","showCountrySelector","e","setState","filterNumber","target","value","preventDefault","onSubmit","trim","key","onShowCountrySelector","number","replace","render","className","onClick","flagEmoji","type","placeholder","onChange","maxLength","onKeyDown","required","autoFocus","injectIntl"],"sourceRoot":""}
|
||||
+198
-163
@@ -38,6 +38,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ "getDefaultAppConfig": () => (/* binding */ getDefaultAppConfig),
|
||||
/* harmony export */ "getDefaultEmulatorHost": () => (/* binding */ getDefaultEmulatorHost),
|
||||
/* harmony export */ "getDefaultEmulatorHostnameAndPort": () => (/* binding */ getDefaultEmulatorHostnameAndPort),
|
||||
/* harmony export */ "getDefaults": () => (/* binding */ getDefaults),
|
||||
/* harmony export */ "getExperimentalSetting": () => (/* binding */ getExperimentalSetting),
|
||||
/* harmony export */ "getGlobal": () => (/* binding */ getGlobal),
|
||||
/* harmony export */ "getModularInstance": () => (/* binding */ getModularInstance),
|
||||
@@ -526,7 +527,7 @@ function isValidKey(key) {
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* Copyright 2022 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -540,156 +541,10 @@ function isValidKey(key) {
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Returns navigator.userAgent string or '' if it's not defined.
|
||||
* @return user agent string
|
||||
*/
|
||||
function getUA() {
|
||||
if (typeof navigator !== 'undefined' &&
|
||||
typeof navigator['userAgent'] === 'string') {
|
||||
return navigator['userAgent'];
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
|
||||
*
|
||||
* Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap
|
||||
* in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally
|
||||
* wait for a callback.
|
||||
*/
|
||||
function isMobileCordova() {
|
||||
return (typeof window !== 'undefined' &&
|
||||
// @ts-ignore Setting up an broadly applicable index signature for Window
|
||||
// just to deal with this case would probably be a bad idea.
|
||||
!!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&
|
||||
/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));
|
||||
}
|
||||
/**
|
||||
* Detect Node.js.
|
||||
*
|
||||
* @return true if Node.js environment is detected.
|
||||
*/
|
||||
// Node detection logic from: https://github.com/iliakan/detect-node/
|
||||
function isNode() {
|
||||
try {
|
||||
return (Object.prototype.toString.call(__webpack_require__.g.process) === '[object process]');
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Detect Browser Environment
|
||||
*/
|
||||
function isBrowser() {
|
||||
return typeof self === 'object' && self.self === self;
|
||||
}
|
||||
function isBrowserExtension() {
|
||||
const runtime = typeof chrome === 'object'
|
||||
? chrome.runtime
|
||||
: typeof browser === 'object'
|
||||
? browser.runtime
|
||||
: undefined;
|
||||
return typeof runtime === 'object' && runtime.id !== undefined;
|
||||
}
|
||||
/**
|
||||
* Detect React Native.
|
||||
*
|
||||
* @return true if ReactNative environment is detected.
|
||||
*/
|
||||
function isReactNative() {
|
||||
return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');
|
||||
}
|
||||
/** Detects Electron apps. */
|
||||
function isElectron() {
|
||||
return getUA().indexOf('Electron/') >= 0;
|
||||
}
|
||||
/** Detects Internet Explorer. */
|
||||
function isIE() {
|
||||
const ua = getUA();
|
||||
return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
|
||||
}
|
||||
/** Detects Universal Windows Platform apps. */
|
||||
function isUWP() {
|
||||
return getUA().indexOf('MSAppHost/') >= 0;
|
||||
}
|
||||
/**
|
||||
* Detect whether the current SDK build is the Node version.
|
||||
*
|
||||
* @return true if it's the Node SDK build.
|
||||
*/
|
||||
function isNodeSdk() {
|
||||
return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;
|
||||
}
|
||||
/** Returns true if we are running in Safari. */
|
||||
function isSafari() {
|
||||
return (!isNode() &&
|
||||
navigator.userAgent.includes('Safari') &&
|
||||
!navigator.userAgent.includes('Chrome'));
|
||||
}
|
||||
/**
|
||||
* This method checks if indexedDB is supported by current browser/service worker context
|
||||
* @return true if indexedDB is supported by current browser/service worker context
|
||||
*/
|
||||
function isIndexedDBAvailable() {
|
||||
try {
|
||||
return typeof indexedDB === 'object';
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject
|
||||
* if errors occur during the database open operation.
|
||||
*
|
||||
* @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox
|
||||
* private browsing)
|
||||
*/
|
||||
function validateIndexedDBOpenable() {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
let preExist = true;
|
||||
const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';
|
||||
const request = self.indexedDB.open(DB_CHECK_NAME);
|
||||
request.onsuccess = () => {
|
||||
request.result.close();
|
||||
// delete database only when it doesn't pre-exist
|
||||
if (!preExist) {
|
||||
self.indexedDB.deleteDatabase(DB_CHECK_NAME);
|
||||
}
|
||||
resolve(true);
|
||||
};
|
||||
request.onupgradeneeded = () => {
|
||||
preExist = false;
|
||||
};
|
||||
request.onerror = () => {
|
||||
var _a;
|
||||
reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* This method checks whether cookie is enabled within current browser
|
||||
* @return true if cookie is enabled within current browser
|
||||
*/
|
||||
function areCookiesEnabled() {
|
||||
if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Polyfill for `globalThis` object.
|
||||
* @returns the `globalThis` object for the given environment.
|
||||
* @public
|
||||
*/
|
||||
function getGlobal() {
|
||||
if (typeof self !== 'undefined') {
|
||||
@@ -723,8 +578,11 @@ function getGlobal() {
|
||||
const getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;
|
||||
/**
|
||||
* Attempt to read defaults from a JSON string provided to
|
||||
* process.env.__FIREBASE_DEFAULTS__ or a JSON file whose path is in
|
||||
* process.env.__FIREBASE_DEFAULTS_PATH__
|
||||
* process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in
|
||||
* process(.)env(.)__FIREBASE_DEFAULTS_PATH__
|
||||
* The dots are in parens because certain compilers (Vite?) cannot
|
||||
* handle seeing that variable in comments.
|
||||
* See https://github.com/firebase/firebase-js-sdk/issues/6838
|
||||
*/
|
||||
const getDefaultsFromEnvVariable = () => {
|
||||
if (typeof process === 'undefined' || typeof process.env === 'undefined') {
|
||||
@@ -756,6 +614,7 @@ const getDefaultsFromCookie = () => {
|
||||
* (1) if such an object exists as a property of `globalThis`
|
||||
* (2) if such an object was provided on a shell environment variable
|
||||
* (3) if such an object exists in a cookie
|
||||
* @public
|
||||
*/
|
||||
const getDefaults = () => {
|
||||
try {
|
||||
@@ -919,6 +778,178 @@ function createMockUserToken(token, projectId) {
|
||||
].join('.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Returns navigator.userAgent string or '' if it's not defined.
|
||||
* @return user agent string
|
||||
*/
|
||||
function getUA() {
|
||||
if (typeof navigator !== 'undefined' &&
|
||||
typeof navigator['userAgent'] === 'string') {
|
||||
return navigator['userAgent'];
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
|
||||
*
|
||||
* Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap
|
||||
* in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally
|
||||
* wait for a callback.
|
||||
*/
|
||||
function isMobileCordova() {
|
||||
return (typeof window !== 'undefined' &&
|
||||
// @ts-ignore Setting up an broadly applicable index signature for Window
|
||||
// just to deal with this case would probably be a bad idea.
|
||||
!!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&
|
||||
/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));
|
||||
}
|
||||
/**
|
||||
* Detect Node.js.
|
||||
*
|
||||
* @return true if Node.js environment is detected or specified.
|
||||
*/
|
||||
// Node detection logic from: https://github.com/iliakan/detect-node/
|
||||
function isNode() {
|
||||
var _a;
|
||||
const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;
|
||||
if (forceEnvironment === 'node') {
|
||||
return true;
|
||||
}
|
||||
else if (forceEnvironment === 'browser') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return (Object.prototype.toString.call(__webpack_require__.g.process) === '[object process]');
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Detect Browser Environment
|
||||
*/
|
||||
function isBrowser() {
|
||||
return typeof self === 'object' && self.self === self;
|
||||
}
|
||||
function isBrowserExtension() {
|
||||
const runtime = typeof chrome === 'object'
|
||||
? chrome.runtime
|
||||
: typeof browser === 'object'
|
||||
? browser.runtime
|
||||
: undefined;
|
||||
return typeof runtime === 'object' && runtime.id !== undefined;
|
||||
}
|
||||
/**
|
||||
* Detect React Native.
|
||||
*
|
||||
* @return true if ReactNative environment is detected.
|
||||
*/
|
||||
function isReactNative() {
|
||||
return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');
|
||||
}
|
||||
/** Detects Electron apps. */
|
||||
function isElectron() {
|
||||
return getUA().indexOf('Electron/') >= 0;
|
||||
}
|
||||
/** Detects Internet Explorer. */
|
||||
function isIE() {
|
||||
const ua = getUA();
|
||||
return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
|
||||
}
|
||||
/** Detects Universal Windows Platform apps. */
|
||||
function isUWP() {
|
||||
return getUA().indexOf('MSAppHost/') >= 0;
|
||||
}
|
||||
/**
|
||||
* Detect whether the current SDK build is the Node version.
|
||||
*
|
||||
* @return true if it's the Node SDK build.
|
||||
*/
|
||||
function isNodeSdk() {
|
||||
return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;
|
||||
}
|
||||
/** Returns true if we are running in Safari. */
|
||||
function isSafari() {
|
||||
return (!isNode() &&
|
||||
navigator.userAgent.includes('Safari') &&
|
||||
!navigator.userAgent.includes('Chrome'));
|
||||
}
|
||||
/**
|
||||
* This method checks if indexedDB is supported by current browser/service worker context
|
||||
* @return true if indexedDB is supported by current browser/service worker context
|
||||
*/
|
||||
function isIndexedDBAvailable() {
|
||||
try {
|
||||
return typeof indexedDB === 'object';
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject
|
||||
* if errors occur during the database open operation.
|
||||
*
|
||||
* @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox
|
||||
* private browsing)
|
||||
*/
|
||||
function validateIndexedDBOpenable() {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
let preExist = true;
|
||||
const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';
|
||||
const request = self.indexedDB.open(DB_CHECK_NAME);
|
||||
request.onsuccess = () => {
|
||||
request.result.close();
|
||||
// delete database only when it doesn't pre-exist
|
||||
if (!preExist) {
|
||||
self.indexedDB.deleteDatabase(DB_CHECK_NAME);
|
||||
}
|
||||
resolve(true);
|
||||
};
|
||||
request.onupgradeneeded = () => {
|
||||
preExist = false;
|
||||
};
|
||||
request.onerror = () => {
|
||||
var _a;
|
||||
reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* This method checks whether cookie is enabled within current browser
|
||||
* @return true if cookie is enabled within current browser
|
||||
*/
|
||||
function areCookiesEnabled() {
|
||||
if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
@@ -5022,7 +5053,7 @@ class InfoView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
||||
tinode: this.props.tinode,
|
||||
topic: this.props.topic,
|
||||
onCredAdd: this.props.onCredAdd,
|
||||
onTopicTagsUpdateRequest: this.props.onTopicTagsUpdateRequest,
|
||||
onUpdateTagsRequest: this.props.onTopicTagsUpdateRequest,
|
||||
onCredConfirm: this.props.onCredConfirm,
|
||||
onCredDelete: this.props.onCredDelete,
|
||||
onUpdateTopicDesc: this.props.onTopicDescUpdateRequest,
|
||||
@@ -7601,7 +7632,7 @@ class SidepanelView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
|
||||
tinode: this.props.tinode,
|
||||
myUserId: this.props.myUserId,
|
||||
onUpdateTopicDesc: this.props.onUpdateAccountDesc,
|
||||
onUpdateTags: this.props.onUpdateAccountTags,
|
||||
onUpdateTagsRequest: this.props.onUpdateAccountTags,
|
||||
onCredAdd: this.props.onCredAdd,
|
||||
onCredDelete: this.props.onCredDelete,
|
||||
onCredConfirm: this.props.onCredConfirm,
|
||||
@@ -8717,7 +8748,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
||||
this.handleError(err.message, 'err');
|
||||
});
|
||||
}
|
||||
handleUpdateAccountTagsRequest(tags) {
|
||||
handleUpdateAccountTagsRequest(_, tags) {
|
||||
this.tinode.getMeTopic().setMeta({
|
||||
tags: tags
|
||||
}).catch(err => this.handleError(err.message, 'err'));
|
||||
@@ -15307,6 +15338,9 @@ class SendMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
||||
componentDidMount() {
|
||||
if (this.messageEditArea) {
|
||||
this.messageEditArea.addEventListener('paste', this.handlePasteEvent, false);
|
||||
if (window.getComputedStyle(this.messageEditArea).getPropertyValue('transition-property') == 'all') {
|
||||
this.messageEditArea.focus();
|
||||
}
|
||||
}
|
||||
this.setState({
|
||||
quote: this.formatReply()
|
||||
@@ -15319,7 +15353,9 @@ class SendMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.messageEditArea) {
|
||||
this.messageEditArea.focus();
|
||||
if (window.getComputedStyle(this.messageEditArea).getPropertyValue('transition-property') == 'all') {
|
||||
this.messageEditArea.focus();
|
||||
}
|
||||
}
|
||||
if (prevProps.topicName != this.props.topicName) {
|
||||
this.setState({
|
||||
@@ -15480,15 +15516,14 @@ class SendMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
||||
}),
|
||||
onFinished: this.handleAttachAudio
|
||||
})) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", {
|
||||
id: "sendMessage",
|
||||
id: "send-message-input",
|
||||
placeholder: prompt,
|
||||
value: this.state.message,
|
||||
onChange: this.handleMessageTyping,
|
||||
onKeyPress: this.handleKeyPress,
|
||||
ref: ref => {
|
||||
this.messageEditArea = ref;
|
||||
},
|
||||
autoFocus: true
|
||||
}
|
||||
}), this.state.message || !audioEnabled ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
||||
href: "#",
|
||||
onClick: this.handleSend,
|
||||
@@ -15936,7 +15971,7 @@ class TopicCommon extends (react__WEBPACK_IMPORTED_MODULE_0___default().Componen
|
||||
}
|
||||
handleTagsUpdated(tags) {
|
||||
if (!(0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_3__.arrayEqual)(this.state.tags.slice(0), tags.slice(0))) {
|
||||
this.props.onTopicTagsUpdateRequest(this.props.topic, tags);
|
||||
this.props.onUpdateTagsRequest(this.props.topic, tags);
|
||||
}
|
||||
}
|
||||
render() {
|
||||
@@ -17050,7 +17085,7 @@ function isVersionServiceProvider(provider) {
|
||||
}
|
||||
|
||||
const name$o = "@firebase/app";
|
||||
const version$1 = "0.9.0";
|
||||
const version$1 = "0.9.1";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -17117,7 +17152,7 @@ const name$2 = "@firebase/firestore";
|
||||
const name$1 = "@firebase/firestore-compat";
|
||||
|
||||
const name = "firebase";
|
||||
const version = "9.15.0";
|
||||
const version = "9.16.0";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -18377,7 +18412,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
|
||||
const name = "@firebase/installations";
|
||||
const version = "0.6.0";
|
||||
const version = "0.6.1";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -20782,7 +20817,7 @@ async function messageEventListener(messaging, event) {
|
||||
}
|
||||
|
||||
const name = "@firebase/messaging";
|
||||
const version = "0.12.0";
|
||||
const version = "0.12.1";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -21054,7 +21089,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
|
||||
var name = "firebase";
|
||||
var version = "9.15.0";
|
||||
var version = "9.16.0";
|
||||
|
||||
/**
|
||||
* @license
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"src_widgets_phone-edit_jsx.dev.js","mappings":";;;;;;;;;;;;;;;;;;;AAE0B;AACc;AACC;AACI;AAE7C,MAAMI,SAAS,SAASJ,4DAAmB,CAAC;EAC1CM,WAAW,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZ,IAAI,CAACC,OAAO,GAAG,CAAC,CAAC;IACjBN,iDAAsB,CAACS,EAAE,IAAI;MAAE,IAAI,CAACH,OAAO,CAACG,EAAE,CAACC,IAAI,CAAC,GAAGD,EAAE,CAACE,IAAI;IAAE,CAAC,CAAC;IAElE,IAAI,CAACC,KAAK,GAAG;MACXC,WAAW,EAAER,KAAK,CAACQ,WAAW,IAAI,IAAI;MACtCC,QAAQ,EAAE,IAAI,CAACR,OAAO,CAACD,KAAK,CAACQ,WAAW,IAAI,IAAI,CAAC;MACjDE,WAAW,EAAE;IACf,CAAC;IAED,IAAI,CAACC,YAAY,GAAG,IAAI,CAACA,YAAY,CAACC,IAAI,CAAC,IAAI,CAAC;IAChD,IAAI,CAACC,cAAc,GAAG,IAAI,CAACA,cAAc,CAACD,IAAI,CAAC,IAAI,CAAC;IACpD,IAAI,CAACE,aAAa,GAAG,IAAI,CAACA,aAAa,CAACF,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACG,mBAAmB,GAAG,IAAI,CAACA,mBAAmB,CAACH,IAAI,CAAC,IAAI,CAAC;EAChE;EAEAD,YAAY,CAACK,CAAC,EAAE;IACd,IAAI,CAACC,QAAQ,CAAC;MAACP,WAAW,EAAE,IAAI,CAACQ,YAAY,CAACF,CAAC,CAACG,MAAM,CAACC,KAAK;IAAC,CAAC,CAAC;EACjE;EAEAP,cAAc,CAACG,CAAC,EAAE;IAChBA,CAAC,CAACK,cAAc,EAAE;IAClB,IAAI,CAACrB,KAAK,CAACsB,QAAQ,CAAC,IAAI,CAACf,KAAK,CAACG,WAAW,CAACa,IAAI,EAAE,CAAC;EACpD;EAGAT,aAAa,CAACE,CAAC,EAAE;IACf,IAAIA,CAAC,CAACQ,GAAG,KAAK,OAAO,EAAE;MACrB,IAAI,CAACX,cAAc,CAACG,CAAC,CAAC;IACxB;EACF;EAEAD,mBAAmB,GAAG;IACpB,IAAI,CAACf,KAAK,CAACyB,qBAAqB,CAAC,IAAI,CAAClB,KAAK,CAACC,WAAW,EAAE,IAAI,CAACD,KAAK,CAACE,QAAQ,CAAC;EAC/E;EAGAS,YAAY,CAACQ,MAAM,EAAE;IACnB,IAAI,CAACA,MAAM,EAAE;MACX,OAAOA,MAAM;IACf;IAGA,OAAOA,MAAM,CAACC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;EAC3C;EAEAC,MAAM,GAAG;IACP,OACE,0HACE;MAAM,SAAS,EAAC,WAAW;MAAC,OAAO,EAAE,IAAI,CAACb;IAAoB,GAC5D;MAAM,SAAS,EAAC;IAAc,GAAEnB,yDAAS,CAAC,IAAI,CAACW,KAAK,CAACC,WAAW,CAAC,EAAC,MAAM,CAAO,KAC9E,EAAC,IAAI,CAACD,KAAK,CAACE,QAAQ,EAAC,MAAM,CAAO,EACrC;MAAO,IAAI,EAAC,KAAK;MAAC,WAAW,EAAE,IAAI,CAACF,KAAK,CAACsB,WAAY;MAClD,KAAK,EAAE,IAAI,CAACtB,KAAK,CAACG,WAAY;MAAC,QAAQ,EAAE,IAAI,CAACC,YAAa;MAC3D,SAAS,EAAE,EAAG;MAAC,SAAS,EAAE,IAAI,CAACG,aAAc;MAAC,QAAQ;MAAC,SAAS,EAAE,IAAI,CAACd,KAAK,CAAC8B;IAAU,EAAG,CAC7F;EAEP;AACF;AAEA,iEAAepC,sDAAU,CAACG,SAAS,CAAC","sources":["webpack://tinode-webapp/./src/widgets/phone-edit.jsx"],"sourcesContent":["// Editor for a phone number.\n\nimport React from 'react';\nimport { injectIntl } from 'react-intl';\nimport * as dcodes from '../dcodes.json';\nimport { flagEmoji } from '../lib/strformat';\n\nclass PhoneEdit extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.codeMap = {};\n dcodes.default.forEach(dc => { this.codeMap[dc.code] = dc.dial; });\n\n this.state = {\n countryCode: props.countryCode || 'US',\n dialCode: this.codeMap[props.countryCode || 'US'],\n localNumber: ''\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleFinished = this.handleFinished.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.showCountrySelector = this.showCountrySelector.bind(this);\n }\n\n handleChange(e) {\n this.setState({localNumber: this.filterNumber(e.target.value)});\n }\n\n handleFinished(e) {\n e.preventDefault();\n this.props.onSubmit(this.state.localNumber.trim());\n }\n\n\n handleKeyDown(e) {\n if (e.key === 'Enter') {\n this.handleFinished(e);\n }\n }\n\n showCountrySelector() {\n this.props.onShowCountrySelector(this.state.countryCode, this.state.dialCode);\n }\n\n // Filter out characters not permitted in a phone number.\n filterNumber(number) {\n if (!number) {\n return number;\n }\n // Leave numbers, space, (, ), -, and .\n // The + is not allowed: it's handled by the country code portion.\n return number.replace(/[^-\\s().\\d]/g, '');\n }\n\n render() {\n return (\n <>\n <span className=\"dial-code\" onClick={this.showCountrySelector}>\n <span className=\"country-flag\">{flagEmoji(this.state.countryCode)} </span>\n +{this.state.dialCode} </span>\n <input type=\"tel\" placeholder={this.state.placeholder}\n value={this.state.localNumber} onChange={this.handleChange}\n maxLength={17} onKeyDown={this.handleKeyDown} required autoFocus={this.props.autoFocus} />\n </>\n );\n }\n}\n\nexport default injectIntl(PhoneEdit);\n"],"names":["React","injectIntl","dcodes","flagEmoji","PhoneEdit","PureComponent","constructor","props","codeMap","default","forEach","dc","code","dial","state","countryCode","dialCode","localNumber","handleChange","bind","handleFinished","handleKeyDown","showCountrySelector","e","setState","filterNumber","target","value","preventDefault","onSubmit","trim","key","onShowCountrySelector","number","replace","render","placeholder","autoFocus"],"sourceRoot":""}
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user