feat: update tool-chain to latest (#7975)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Shivam Mishra
2023-09-27 14:02:34 +05:30
committed by GitHub
parent e8b7e791a5
commit a88d155dd7
162 changed files with 3566 additions and 2884 deletions

View File

@@ -1,22 +1,22 @@
<template>
<div class="p-4 space-y-6 bg-white">
<div class="space-y-2 animate-pulse ">
<div class="space-y-2 animate-pulse">
<div class="h-6 bg-slate-100 rounded w-1/5" />
<div class="h-10 bg-slate-100 rounded w-3/5" />
</div>
<div class="space-y-2 animate-pulse ">
<div class="space-y-2 animate-pulse">
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded w-4/5" />
<div class="h-5 bg-slate-100 rounded w-4/5" />
</div>
<div class="space-y-2 animate-pulse ">
<div class="space-y-2 animate-pulse">
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded w-3/5" />
<div class="h-5 bg-slate-100 rounded" />
</div>
<div class="space-y-2 animate-pulse ">
<div class="space-y-2 animate-pulse">
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded" />
<div class="h-5 bg-slate-100 rounded" />

View File

@@ -11,19 +11,10 @@
{{ label }}
</div>
<textarea
class="
resize-none
border
rounded
w-full
py-2
px-3
text-slate-700
leading-tight
outline-none
"
class="resize-none border rounded w-full py-2 px-3 text-slate-700 leading-tight outline-none"
:class="{
'border-black-200 hover:border-black-300 focus:border-black-300': !error,
'border-black-200 hover:border-black-300 focus:border-black-300':
!error,
'border-red-200 hover:border-red-300 focus:border-red-300': error,
}"
:placeholder="placeholder"

View File

@@ -169,11 +169,15 @@ export default {
@tailwind components;
@layer components {
.box-shadow-blue {
box-shadow: 0 0 0 1px #1f93ff, 0 0 2px 3px #c7e3ff;
box-shadow:
0 0 0 1px #1f93ff,
0 0 2px 3px #c7e3ff;
}
.box-shadow-blue-dark {
box-shadow: 0 0 0 1px #1f93ff, 0 0 2px 3px #4c5155;
box-shadow:
0 0 0 1px #1f93ff,
0 0 2px 3px #4c5155;
}
}
</style>

View File

@@ -10,6 +10,7 @@ export const getAudioContext = () => {
return audioCtx;
};
// eslint-disable-next-line default-param-last
export const getAlertAudio = async (baseUrl = '', requestContext) => {
const audioCtx = getAudioContext();
const playSound = audioBuffer => {
@@ -33,6 +34,7 @@ export const getAlertAudio = async (baseUrl = '', requestContext) => {
.then(response => response.arrayBuffer())
.then(buffer => {
audioCtx.decodeAudioData(buffer).then(playSound);
// eslint-disable-next-line no-promise-executor-return
return new Promise(res => res());
})
.catch(() => {

View File

@@ -72,8 +72,10 @@ class BaseActionCableConnector {
}, RECONNECT_INTERVAL);
};
// eslint-disable-next-line class-methods-use-this
onReconnect = () => {};
// eslint-disable-next-line class-methods-use-this
onDisconnected = () => {};
disconnect() {

View File

@@ -7,7 +7,7 @@ export const formatBytes = (bytes, decimals = 2) => {
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
return parseFloat((bytes / k ** i).toFixed(dm)) + ' ' + sizes[i];
};
export const fileSizeInMegaBytes = bytes => {

View File

@@ -89,38 +89,38 @@ describe('groupHeatmapByDay', () => {
expect(groupHeatmapByDay(heatmapData)).toMatchInlineSnapshot(`
Map {
"2021-02-25T00:00:00.000Z" => Array [
Object {
"2021-02-25T00:00:00.000Z" => [
{
"date": 2021-02-25T15:00:00.000Z,
"hour": 15,
"timestamp": 1614265200,
"value": 10,
},
],
"2021-02-26T00:00:00.000Z" => Array [
Object {
"2021-02-26T00:00:00.000Z" => [
{
"date": 2021-02-26T03:00:00.000Z,
"hour": 3,
"timestamp": 1614308400,
"value": 20,
},
],
"2021-02-27T00:00:00.000Z" => Array [
Object {
"2021-02-27T00:00:00.000Z" => [
{
"date": 2021-02-27T01:00:00.000Z,
"hour": 1,
"timestamp": 1614387600,
"value": 30,
},
Object {
{
"date": 2021-02-27T13:00:00.000Z,
"hour": 13,
"timestamp": 1614430800,
"value": 40,
},
],
"2021-02-28T00:00:00.000Z" => Array [
Object {
"2021-02-28T00:00:00.000Z" => [
{
"date": 2021-02-28T08:00:00.000Z,
"hour": 8,
"timestamp": 1614499200,
@@ -145,14 +145,14 @@ describe('groupHeatmapByDay', () => {
expect(groupHeatmapByDay(heatmapData)).toMatchInlineSnapshot(`
Map {
"2021-02-25T00:00:00.000Z" => Array [
Object {
"2021-02-25T00:00:00.000Z" => [
{
"date": 2021-02-25T15:00:00.000Z,
"hour": 15,
"timestamp": 1614265200,
"value": 10,
},
Object {
{
"date": 2021-02-25T15:00:00.000Z,
"hour": 15,
"timestamp": 1614265200,

View File

@@ -1,5 +1,6 @@
export default {
methods: {
// eslint-disable-next-line default-param-last
useInstallationName(str = '', installationName) {
return str.replace(/Chatwoot/g, installationName);
},

View File

@@ -35,7 +35,9 @@ Vue.use(Vuelidate);
const createComponent = (
mixins,
data,
// eslint-disable-next-line default-param-last
computed = {},
// eslint-disable-next-line default-param-last
methods = {},
validations
) => {

View File

@@ -26,8 +26,7 @@ export const templates = [
namespace: 'ed41a221_133a_4558_a1d6_192960e3aee9',
components: [
{
text:
'Oi, {{1}}. Nós conseguimos resolver o problema que você estava enfrentando?',
text: 'Oi, {{1}}. Nós conseguimos resolver o problema que você estava enfrentando?',
type: 'BODY',
},
{
@@ -77,8 +76,7 @@ export const templates = [
namespace: 'ed41a221_133a_4558_a1d6_192960e3aee9',
components: [
{
text:
'Halo {{1}}, apakah kami bisa mengatasi masalah yang sedang Anda hadapi?',
text: 'Halo {{1}}, apakah kami bisa mengatasi masalah yang sedang Anda hadapi?',
type: 'BODY',
},
{
@@ -121,8 +119,7 @@ export const templates = [
namespace: 'ed41a221_133a_4558_a1d6_192960e3aee9',
components: [
{
text:
'Paket Anda sudah dikirim. Paket akan sampai dalam {{1}} hari kerja.',
text: 'Paket Anda sudah dikirim. Paket akan sampai dalam {{1}} hari kerja.',
type: 'BODY',
},
{
@@ -159,8 +156,7 @@ export const templates = [
components: [
{ type: 'HEADER', format: 'DOCUMENT' },
{
text:
'Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}.',
text: 'Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}.',
type: 'BODY',
},
{
@@ -235,8 +231,7 @@ export const templates = [
namespace: 'ed41a221_133a_4558_a1d6_192960e3aee9',
components: [
{
text:
'Your package has been shipped. It will be delivered in {{1}} business days.',
text: 'Your package has been shipped. It will be delivered in {{1}} business days.',
type: 'BODY',
},
{ text: 'This message is from an unverified business.', type: 'FOOTER' },

View File

@@ -41,8 +41,9 @@ describe('#WhatsAppTemplates', () => {
...config,
propsData: { template: templates[1] },
});
const expectedOutput = templates[1].components.find(i => i.type === 'BODY')
.text;
const expectedOutput = templates[1].components.find(
i => i.type === 'BODY'
).text;
expect(wrapper.vm.templateString).toEqual(expectedOutput);
});
@@ -55,7 +56,7 @@ describe('#WhatsAppTemplates', () => {
},
});
await wrapper.setData({
processedParams: { '1': 'abc', '2': 'xyz', '3': 'qwerty' },
processedParams: { 1: 'abc', 2: 'xyz', 3: 'qwerty' },
});
await wrapper.vm.$nextTick();
const expectedOutput =