diff --git a/.babelrc b/.babelrc index 7447fa3b0832ee45b7eb3b9d3b76839e7a24bf22..c7f5aef238d2e4865459a66cf153966beae79896 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,7 @@ { - "plugins": ["transform-commonjs"], + "plugins": [ + "transform-commonjs", + "@babel/plugin-proposal-optional-chaining" + ], "comments": false } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 167baab70aed7bb74319f0f35cd2fd78bb137756..ba4b4f6d1bd230d7284076b8ee045b70be0ffa87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -143,6 +143,36 @@ "@babel/types": "^7.10.1" } }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "requires": { + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "@babel/types": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", + "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + } + } + }, "@babel/helper-split-export-declaration": { "version": "7.10.1", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", @@ -181,6 +211,31 @@ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==" }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.8.tgz", + "integrity": "sha512-hpbBwbTgd7Cz1QryvwJZRo1U0k1q8uyBmeXOSQUjdg/A2TASkhR/rz7AyqZ/kS8kbpsNA80rOYbxySBJAqmhhQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==" + } + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, "@babel/template": { "version": "7.10.1", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", diff --git a/package.json b/package.json index ffcfe872cb6692bc43b818949d898fdd21face4e..b0e3bfa472e2a7ee51ad64b18ed74c15c32159f9 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "dependencies": { "@babel/cli": "^7.10.1", "@babel/core": "^7.10.2", + "@babel/plugin-proposal-optional-chaining": "^7.13.8", "babel-plugin-transform-commonjs": "^1.1.6", "copyfiles": "^2.3.0", "minify": "^7.0.0", diff --git a/src/conversejs/converse.js b/src/conversejs/converse.js index 2b95ef73f765c8ffdfc0b033341261fa31e58ab2..3c5384270fbb527134030b33d6416d0c3d58cf69 100644 --- a/src/conversejs/converse.js +++ b/src/conversejs/converse.js @@ -78330,7 +78330,7 @@ const MessageMixin = { xhr.setRequestHeader('Content-type', this.file.type); // Add custom headers to request - this.get('headers')?.forEach(header => { + this.get('headers').forEach(header => { xhr.setRequestHeader(header.getAttribute('name'), header.innerHTML); }); @@ -93399,10 +93399,11 @@ function getDayIndicator(model) { if (!prev_model || dayjs_min_default()(model.get('time')).isAfter(dayjs_min_default()(prev_model.get('time')), 'day')) { const day_date = dayjs_min_default()(model.get('time')).startOf('day'); + const locale = dayjs_min_default().locale(); return new_day({ 'type': 'date', 'time': day_date.toISOString(), - 'datestring': day_date.format("dddd MMM Do YYYY") + 'datestring': day_date.format(locale === 'fr' ? "dddd Do MMM YYYY" : "dddd MMM Do YYYY") }); } } // This is set to _converse so that it can be overriden. An attempt was made to use diff --git a/src/styles/index.scss b/src/styles/index.scss index b5ba44e5083778a4b8ff19c37ceffc833983d643..f32781c268b36a7453acd6f20fb5d88c431f4f46 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -732,6 +732,7 @@ .message.date-separator { .separator-text { font-size: 12px; + text-transform: capitalize; } .separator {