merge devel
This commit is contained in:
+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
|
||||
|
||||
Reference in New Issue
Block a user