dependencies updated, version bumped, rebuilt

This commit is contained in:
or-else
2025-07-25 11:44:06 +03:00
parent 7ea1a24857
commit 0400c804aa
22 changed files with 738 additions and 723 deletions
+498 -499
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "tinode-webapp", "name": "tinode-webapp",
"description": "Tinode messenger for the web", "description": "Tinode messenger for the web",
"version": "0.24.1", "version": "0.24.2",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/tinode/webapp.git" "url": "git+https://github.com/tinode/webapp.git"
@@ -74,7 +74,7 @@
"react": "^18.3.0", "react": "^18.3.0",
"react-dom": "^18.3.0", "react-dom": "^18.3.0",
"react-intl": "^7.0.0", "react-intl": "^7.0.0",
"tinode-sdk": "^0.24.1", "tinode-sdk": "^0.24.2",
"webm-duration-fix": "^1.0.4" "webm-duration-fix": "^1.0.4"
}, },
"devDependencies": { "devDependencies": {
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit. // This is a generated file. Don't edit.
export const PACKAGE_VERSION = "0.24.1"; export const PACKAGE_VERSION = "0.24.2";
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -8655,7 +8655,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PACKAGE_VERSION: function() { return /* binding */ PACKAGE_VERSION; } /* harmony export */ PACKAGE_VERSION: function() { return /* binding */ PACKAGE_VERSION; }
/* harmony export */ }); /* harmony export */ });
const PACKAGE_VERSION = "0.24.1"; const PACKAGE_VERSION = "0.24.2";
/***/ }), /***/ }),
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+24 -24
View File
@@ -25,12 +25,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl"); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl");
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js");
/* harmony import */ var _widgets_avatar_upload_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../widgets/avatar-upload.jsx */ "./src/widgets/avatar-upload.jsx"); /* harmony import */ var _widgets_avatar_upload_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../widgets/avatar-upload.jsx */ "./src/widgets/avatar-upload.jsx");
/* harmony import */ var _widgets_badge_list_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../widgets/badge-list.jsx */ "./src/widgets/badge-list.jsx"); /* harmony import */ var _widgets_badge_list_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widgets/badge-list.jsx */ "./src/widgets/badge-list.jsx");
/* harmony import */ var _lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib/blob-helpers.js */ "./src/lib/blob-helpers.js"); /* harmony import */ var _lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../lib/blob-helpers.js */ "./src/lib/blob-helpers.js");
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config.js */ "./src/config.js"); /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config.js */ "./src/config.js");
/* harmony import */ var _widgets_credential_edit_jsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../widgets/credential-edit.jsx */ "./src/widgets/credential-edit.jsx"); /* harmony import */ var _widgets_credential_edit_jsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../widgets/credential-edit.jsx */ "./src/widgets/credential-edit.jsx");
@@ -47,9 +47,9 @@ class AccountSettingsView extends (react__WEBPACK_IMPORTED_MODULE_0___default().
super(props); super(props);
const me = this.props.tinode.getMeTopic(); const me = this.props.tinode.getMeTopic();
this.state = { this.state = {
fullName: _clip(me.public ? me.public.fn : undefined, _config_js__WEBPACK_IMPORTED_MODULE_5__.MAX_TITLE_LENGTH), fullName: _clip(me.public ? me.public.fn : undefined, _config_js__WEBPACK_IMPORTED_MODULE_6__.MAX_TITLE_LENGTH),
description: _clip(me.public ? me.public.note : undefined, _config_js__WEBPACK_IMPORTED_MODULE_5__.MAX_TOPIC_DESCRIPTION_LENGTH), description: _clip(me.public ? me.public.note : undefined, _config_js__WEBPACK_IMPORTED_MODULE_6__.MAX_TOPIC_DESCRIPTION_LENGTH),
avatar: (0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_4__.makeImageUrl)(me.public ? me.public.photo : null), avatar: (0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_5__.makeImageUrl)(me.public ? me.public.photo : null),
credentials: me.getCredentials() || [], credentials: me.getCredentials() || [],
credEdit: undefined, credEdit: undefined,
alias: ((me.tags() || []).find(tag => tag.startsWith('alias:')) || '').substring(6) alias: ((me.tags() || []).find(tag => tag.startsWith('alias:')) || '').substring(6)
@@ -67,7 +67,7 @@ class AccountSettingsView extends (react__WEBPACK_IMPORTED_MODULE_0___default().
} }
render() { render() {
if (this.state.credEdit) { if (this.state.credEdit) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_credential_edit_jsx__WEBPACK_IMPORTED_MODULE_6__["default"], { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_credential_edit_jsx__WEBPACK_IMPORTED_MODULE_7__["default"], {
method: this.state.credEdit.meth, method: this.state.credEdit.meth,
val: this.state.credEdit.val, val: this.state.credEdit.val,
done: this.state.credEdit.done, done: this.state.credEdit.done,
@@ -93,7 +93,7 @@ class AccountSettingsView extends (react__WEBPACK_IMPORTED_MODULE_0___default().
} }
let val = cred.val; let val = cred.val;
if (cred.meth == 'tel') { if (cred.meth == 'tel') {
const number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_7__.parsePhoneNumberWithError)(cred.val); const number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__.parsePhoneNumberWithError)(cred.val);
val = number ? number.formatInternational() : cred.val; val = number ? number.formatInternational() : cred.val;
} }
credentials.push(react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { credentials.push(react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
@@ -150,7 +150,7 @@ class AccountSettingsView extends (react__WEBPACK_IMPORTED_MODULE_0___default().
"type": 0, "type": 0,
"value": "Edit" "value": "Edit"
}] }]
})), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("center", null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_avatar_upload_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], { })), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("center", null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_avatar_upload_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], {
tinode: this.props.tinode, tinode: this.props.tinode,
avatar: this.state.avatar, avatar: this.state.avatar,
readOnly: true, readOnly: true,
@@ -190,7 +190,7 @@ class AccountSettingsView extends (react__WEBPACK_IMPORTED_MODULE_0___default().
}] }]
})), "\xA0", react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tt", null, "@", this.state.alias)) : null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { })), "\xA0", react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tt", null, "@", this.state.alias)) : null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "group" className: "group"
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_badge_list_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_badge_list_jsx__WEBPACK_IMPORTED_MODULE_4__["default"], {
trustedBadges: this.props.trustedBadges trustedBadges: this.props.trustedBadges
})), this.state.description ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { })), this.state.description ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "group" className: "group"
@@ -512,12 +512,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl"); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl");
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/AsYouType.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js");
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/AsYouType.js");
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/getExampleNumber.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/getExampleNumber.js");
/* harmony import */ var libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! libphonenumber-js/mobile/examples */ "./node_modules/libphonenumber-js/examples.mobile.json.js"); /* harmony import */ var libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! libphonenumber-js/mobile/examples */ "./node_modules/libphonenumber-js/examples.mobile.json.js");
/* harmony import */ var _dcodes_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dcodes.json */ "./src/dcodes.json"); /* harmony import */ var _dcodes_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dcodes.json */ "./src/dcodes.json");
/* harmony import */ var _lib_strformat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lib/strformat */ "./src/lib/strformat.js"); /* harmony import */ var _lib_strformat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/strformat */ "./src/lib/strformat.js");
@@ -537,7 +537,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
constructor(props) { constructor(props) {
super(props); super(props);
this.codeMap = {}; this.codeMap = {};
_dcodes_json__WEBPACK_IMPORTED_MODULE_2__.forEach(dc => { _dcodes_json__WEBPACK_IMPORTED_MODULE_6__.forEach(dc => {
this.codeMap[dc.code] = dc.dial; this.codeMap[dc.code] = dc.dial;
}); });
const code = props.countryCode || 'US'; const code = props.countryCode || 'US';
@@ -555,7 +555,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
} }
handleChange(e) { handleChange(e) {
const prefix = `+${this.state.dialCode}`; const prefix = `+${this.state.dialCode}`;
let formatted = new libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__.AsYouType().input(`${prefix}${this.filterNumber(e.target.value)}`); let formatted = new libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_3__.AsYouType().input(`${prefix}${this.filterNumber(e.target.value)}`);
formatted = formatted.substring(prefix.length).trim(); formatted = formatted.substring(prefix.length).trim();
this.setState({ this.setState({
localNumber: formatted localNumber: formatted
@@ -566,7 +566,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
const raw = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, ''); const raw = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, '');
let number = null; let number = null;
try { try {
number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_5__.parsePhoneNumberWithError)(`+${raw}`); number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__.parsePhoneNumberWithError)(`+${raw}`);
} catch (err) {} } catch (err) {}
if (!number || !number.isValid()) { if (!number || !number.isValid()) {
this.inputField.setCustomValidity(this.props.intl.formatMessage(messages.mobile_number_required)); this.inputField.setCustomValidity(this.props.intl.formatMessage(messages.mobile_number_required));
@@ -596,7 +596,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
return number.replace(/[^-\s().\d]/g, ''); return number.replace(/[^-\s().\d]/g, '');
} }
placeholderNumber(code, dial) { placeholderNumber(code, dial) {
const sample = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_6__.getExampleNumber)(code, libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_7__["default"]); const sample = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__.getExampleNumber)(code, libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_5__["default"]);
return sample ? sample.formatInternational().substring(dial.length + 1).trim() : '123 0123'; return sample ? sample.formatInternational().substring(dial.length + 1).trim() : '123 0123';
} }
render() { render() {
@@ -605,7 +605,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
onClick: this.showCountrySelector onClick: this.showCountrySelector
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "country-flag" className: "country-flag"
}, (0,_lib_strformat__WEBPACK_IMPORTED_MODULE_3__.flagEmoji)(this.state.countryCode), "\xA0"), "+", this.state.dialCode, "\xA0"), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { }, (0,_lib_strformat__WEBPACK_IMPORTED_MODULE_7__.flagEmoji)(this.state.countryCode), "\xA0"), "+", this.state.dialCode, "\xA0"), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
type: "tel", type: "tel",
ref: ref => { ref: ref => {
this.inputField = ref; this.inputField = ref;
+11 -11
View File
@@ -322,12 +322,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl"); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl");
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/AsYouType.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js");
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/AsYouType.js");
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/getExampleNumber.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/getExampleNumber.js");
/* harmony import */ var libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! libphonenumber-js/mobile/examples */ "./node_modules/libphonenumber-js/examples.mobile.json.js"); /* harmony import */ var libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! libphonenumber-js/mobile/examples */ "./node_modules/libphonenumber-js/examples.mobile.json.js");
/* harmony import */ var _dcodes_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dcodes.json */ "./src/dcodes.json"); /* harmony import */ var _dcodes_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dcodes.json */ "./src/dcodes.json");
/* harmony import */ var _lib_strformat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lib/strformat */ "./src/lib/strformat.js"); /* harmony import */ var _lib_strformat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/strformat */ "./src/lib/strformat.js");
@@ -347,7 +347,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
constructor(props) { constructor(props) {
super(props); super(props);
this.codeMap = {}; this.codeMap = {};
_dcodes_json__WEBPACK_IMPORTED_MODULE_2__.forEach(dc => { _dcodes_json__WEBPACK_IMPORTED_MODULE_6__.forEach(dc => {
this.codeMap[dc.code] = dc.dial; this.codeMap[dc.code] = dc.dial;
}); });
const code = props.countryCode || 'US'; const code = props.countryCode || 'US';
@@ -365,7 +365,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
} }
handleChange(e) { handleChange(e) {
const prefix = `+${this.state.dialCode}`; const prefix = `+${this.state.dialCode}`;
let formatted = new libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__.AsYouType().input(`${prefix}${this.filterNumber(e.target.value)}`); let formatted = new libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_3__.AsYouType().input(`${prefix}${this.filterNumber(e.target.value)}`);
formatted = formatted.substring(prefix.length).trim(); formatted = formatted.substring(prefix.length).trim();
this.setState({ this.setState({
localNumber: formatted localNumber: formatted
@@ -376,7 +376,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
const raw = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, ''); const raw = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, '');
let number = null; let number = null;
try { try {
number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_5__.parsePhoneNumberWithError)(`+${raw}`); number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__.parsePhoneNumberWithError)(`+${raw}`);
} catch (err) {} } catch (err) {}
if (!number || !number.isValid()) { if (!number || !number.isValid()) {
this.inputField.setCustomValidity(this.props.intl.formatMessage(messages.mobile_number_required)); this.inputField.setCustomValidity(this.props.intl.formatMessage(messages.mobile_number_required));
@@ -406,7 +406,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
return number.replace(/[^-\s().\d]/g, ''); return number.replace(/[^-\s().\d]/g, '');
} }
placeholderNumber(code, dial) { placeholderNumber(code, dial) {
const sample = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_6__.getExampleNumber)(code, libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_7__["default"]); const sample = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__.getExampleNumber)(code, libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_5__["default"]);
return sample ? sample.formatInternational().substring(dial.length + 1).trim() : '123 0123'; return sample ? sample.formatInternational().substring(dial.length + 1).trim() : '123 0123';
} }
render() { render() {
@@ -415,7 +415,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
onClick: this.showCountrySelector onClick: this.showCountrySelector
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "country-flag" className: "country-flag"
}, (0,_lib_strformat__WEBPACK_IMPORTED_MODULE_3__.flagEmoji)(this.state.countryCode), "\xA0"), "+", this.state.dialCode, "\xA0"), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { }, (0,_lib_strformat__WEBPACK_IMPORTED_MODULE_7__.flagEmoji)(this.state.countryCode), "\xA0"), "+", this.state.dialCode, "\xA0"), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
type: "tel", type: "tel",
ref: ref => { ref: ref => {
this.inputField = ref; this.inputField = ref;
+11 -11
View File
@@ -287,12 +287,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl"); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-intl */ "react-intl");
/* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_intl__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/AsYouType.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js");
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/parsePhoneNumberWithError.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/AsYouType.js");
/* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/getExampleNumber.js"); /* harmony import */ var libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! libphonenumber-js/mobile */ "./node_modules/libphonenumber-js/mobile/exports/getExampleNumber.js");
/* harmony import */ var libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! libphonenumber-js/mobile/examples */ "./node_modules/libphonenumber-js/examples.mobile.json.js"); /* harmony import */ var libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! libphonenumber-js/mobile/examples */ "./node_modules/libphonenumber-js/examples.mobile.json.js");
/* harmony import */ var _dcodes_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dcodes.json */ "./src/dcodes.json"); /* harmony import */ var _dcodes_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dcodes.json */ "./src/dcodes.json");
/* harmony import */ var _lib_strformat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lib/strformat */ "./src/lib/strformat.js"); /* harmony import */ var _lib_strformat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/strformat */ "./src/lib/strformat.js");
@@ -312,7 +312,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
constructor(props) { constructor(props) {
super(props); super(props);
this.codeMap = {}; this.codeMap = {};
_dcodes_json__WEBPACK_IMPORTED_MODULE_2__.forEach(dc => { _dcodes_json__WEBPACK_IMPORTED_MODULE_6__.forEach(dc => {
this.codeMap[dc.code] = dc.dial; this.codeMap[dc.code] = dc.dial;
}); });
const code = props.countryCode || 'US'; const code = props.countryCode || 'US';
@@ -330,7 +330,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
} }
handleChange(e) { handleChange(e) {
const prefix = `+${this.state.dialCode}`; const prefix = `+${this.state.dialCode}`;
let formatted = new libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__.AsYouType().input(`${prefix}${this.filterNumber(e.target.value)}`); let formatted = new libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_3__.AsYouType().input(`${prefix}${this.filterNumber(e.target.value)}`);
formatted = formatted.substring(prefix.length).trim(); formatted = formatted.substring(prefix.length).trim();
this.setState({ this.setState({
localNumber: formatted localNumber: formatted
@@ -341,7 +341,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
const raw = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, ''); const raw = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, '');
let number = null; let number = null;
try { try {
number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_5__.parsePhoneNumberWithError)(`+${raw}`); number = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_2__.parsePhoneNumberWithError)(`+${raw}`);
} catch (err) {} } catch (err) {}
if (!number || !number.isValid()) { if (!number || !number.isValid()) {
this.inputField.setCustomValidity(this.props.intl.formatMessage(messages.mobile_number_required)); this.inputField.setCustomValidity(this.props.intl.formatMessage(messages.mobile_number_required));
@@ -371,7 +371,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
return number.replace(/[^-\s().\d]/g, ''); return number.replace(/[^-\s().\d]/g, '');
} }
placeholderNumber(code, dial) { placeholderNumber(code, dial) {
const sample = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_6__.getExampleNumber)(code, libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_7__["default"]); const sample = (0,libphonenumber_js_mobile__WEBPACK_IMPORTED_MODULE_4__.getExampleNumber)(code, libphonenumber_js_mobile_examples__WEBPACK_IMPORTED_MODULE_5__["default"]);
return sample ? sample.formatInternational().substring(dial.length + 1).trim() : '123 0123'; return sample ? sample.formatInternational().substring(dial.length + 1).trim() : '123 0123';
} }
render() { render() {
@@ -380,7 +380,7 @@ class PhoneEdit extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
onClick: this.showCountrySelector onClick: this.showCountrySelector
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "country-flag" className: "country-flag"
}, (0,_lib_strformat__WEBPACK_IMPORTED_MODULE_3__.flagEmoji)(this.state.countryCode), "\xA0"), "+", this.state.dialCode, "\xA0"), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { }, (0,_lib_strformat__WEBPACK_IMPORTED_MODULE_7__.flagEmoji)(this.state.countryCode), "\xA0"), "+", this.state.dialCode, "\xA0"), react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
type: "tel", type: "tel",
ref: ref => { ref: ref => {
this.inputField = ref; this.inputField = ref;
+19 -1
View File
@@ -829,6 +829,12 @@ class DB {
req.onsuccess = event => { req.onsuccess = event => {
this.db = event.target.result; this.db = event.target.result;
this.disabled = false; this.disabled = false;
this.db.onversionchange = _ => {
this.#logger('PCache', "another tab tries to upgrade DB, shutting down");
this.db.close();
this.db = null;
this.disabled = true;
};
resolve(this.db); resolve(this.db);
}; };
req.onerror = event => { req.onerror = event => {
@@ -842,24 +848,36 @@ class DB {
this.#logger('PCache', "failed to create storage", event); this.#logger('PCache', "failed to create storage", event);
this.#onError(event.target.error); this.#onError(event.target.error);
}; };
if (!this.db.objectStoreNames.contains('topic')) {
this.db.createObjectStore('topic', { this.db.createObjectStore('topic', {
keyPath: 'name' keyPath: 'name'
}); });
}
if (!this.db.objectStoreNames.contains('user')) {
this.db.createObjectStore('user', { this.db.createObjectStore('user', {
keyPath: 'uid' keyPath: 'uid'
}); });
}
if (!this.db.objectStoreNames.contains('subscription')) {
this.db.createObjectStore('subscription', { this.db.createObjectStore('subscription', {
keyPath: ['topic', 'uid'] keyPath: ['topic', 'uid']
}); });
}
if (!this.db.objectStoreNames.contains('message')) {
this.db.createObjectStore('message', { this.db.createObjectStore('message', {
keyPath: ['topic', 'seq'] keyPath: ['topic', 'seq']
}); });
}
if (!this.db.objectStoreNames.contains('dellog')) {
const dellog = this.db.createObjectStore('dellog', { const dellog = this.db.createObjectStore('dellog', {
keyPath: ['topic', 'low', 'hi'] keyPath: ['topic', 'low', 'hi']
}); });
if (!dellog.indexNames.contains('topic_clear')) {
dellog.createIndex('topic_clear', ['topic', 'clear'], { dellog.createIndex('topic_clear', ['topic', 'clear'], {
unique: false unique: false
}); });
}
}
}; };
}); });
} }
@@ -5378,7 +5396,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION) /* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION)
/* harmony export */ }); /* harmony export */ });
const PACKAGE_VERSION = "0.24.1"; const PACKAGE_VERSION = "0.24.2";
/***/ }) /***/ })
File diff suppressed because one or more lines are too long
+1 -1
View File
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
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit. // This is a generated file. Don't edit.
const PACKAGE_VERSION = "0.24.1"; const PACKAGE_VERSION = "0.24.2";