vue-intergrall-plugins 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6883,7 +6883,16 @@ const textoLongo = {
|
|
|
6883
6883
|
if (invalids.includes(dataHora)) return '';
|
|
6884
6884
|
const daysOfWeek = ['dom.', 'seg.', 'ter.', 'qua.', 'qui.', 'sex.', dicionario.sabado_abrev];
|
|
6885
6885
|
const monthsOfYear = ['jan.', 'fev.', 'mar.', 'abr.', 'mai.', 'jun.', 'jul.', 'ago.', 'set.', 'out.', 'nov.', 'dez.'];
|
|
6886
|
-
const
|
|
6886
|
+
const parseDate = dateStr => {
|
|
6887
|
+
if (dateStr.includes('/')) {
|
|
6888
|
+
const [day, month, yearTime] = dateStr.split('/');
|
|
6889
|
+
const [year, time] = yearTime.split(' ');
|
|
6890
|
+
const [hours, minutes] = time ? time.split(':') : ['00', '00'];
|
|
6891
|
+
return new Date(`${year}-${month}-${day}T${hours}:${minutes}:00`);
|
|
6892
|
+
}
|
|
6893
|
+
return new Date(dateStr);
|
|
6894
|
+
};
|
|
6895
|
+
const date = parseDate(dataHora);
|
|
6887
6896
|
const dayOfWeek = daysOfWeek[date.getDay()];
|
|
6888
6897
|
const day = date.getDate();
|
|
6889
6898
|
const month = monthsOfYear[date.getMonth()];
|
|
@@ -6922,7 +6931,8 @@ const textoLongo = {
|
|
|
6922
6931
|
} else {
|
|
6923
6932
|
distance = `${date.getFullYear()} ${dicionario.ha_message} ${yearsDifference} ${yearsDifference === 1 ? 'ano' : 'anos'}`;
|
|
6924
6933
|
}
|
|
6925
|
-
|
|
6934
|
+
const finalText = !`${formattedDate} (${distance})`.includes('undefined') ? `${formattedDate} (${distance})` : '';
|
|
6935
|
+
return finalText;
|
|
6926
6936
|
}
|
|
6927
6937
|
}
|
|
6928
6938
|
};
|
|
@@ -10984,10 +10994,6 @@ var script = {
|
|
|
10984
10994
|
isClosedClass: {
|
|
10985
10995
|
type: String,
|
|
10986
10996
|
default: 'bg-light-gray-2'
|
|
10987
|
-
},
|
|
10988
|
-
sanitizeOptions: {
|
|
10989
|
-
type: Object,
|
|
10990
|
-
default: null
|
|
10991
10997
|
}
|
|
10992
10998
|
},
|
|
10993
10999
|
data() {
|
|
@@ -11002,23 +11008,6 @@ var script = {
|
|
|
11002
11008
|
formattedDate() {
|
|
11003
11009
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
11004
11010
|
},
|
|
11005
|
-
cleanHtml() {
|
|
11006
|
-
const defaultOptions = {
|
|
11007
|
-
allowedTags: ['a', 'b', 'br', 'div', 'i', 'p', 'span', 'strong', 'u', 'ul', 'ol', 'li', 'img', 'link', 'center', 'em', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'table', 'tr', 'td', 'th', 'thead', 'tbody', 'fieldset', 'input', 'textarea', 'hr', 'del', 'header', 'footer', 'section', 'article', 'nav', 'aside', 'figure', 'figcaption', 'address', 'abbr', 'code', 'pre', 'small', 'sub', 'sup', 'mark', 'wbr', 'q', 'cite', 'time', 'var', 'kbd', 'samp', 'dfn'],
|
|
11008
|
-
allowedAttributes: {
|
|
11009
|
-
'a': ['href', 'name', 'target', 'title'],
|
|
11010
|
-
'img': ['src', 'width', 'height', 'alt', 'title'],
|
|
11011
|
-
'link': ['rel', 'href', 'type'],
|
|
11012
|
-
'input': ['type', 'name', 'value', 'placeholder', 'maxlength', 'minlength', 'size', 'readonly', 'disabled'],
|
|
11013
|
-
'textarea': ['name', 'rows', 'cols', 'placeholder', 'maxlength', 'minlength', 'readonly', 'disabled'],
|
|
11014
|
-
'table': ['border', 'cellpadding', 'cellspacing', 'width', 'height'],
|
|
11015
|
-
'th': ['colspan', 'rowspan'],
|
|
11016
|
-
'td': ['colspan', 'rowspan'],
|
|
11017
|
-
'*': ['style', 'class', 'id', 'title', 'align', 'valign', 'dir', 'lang', 'tabindex', 'accesskey', 'data-*', 'dir']
|
|
11018
|
-
}
|
|
11019
|
-
};
|
|
11020
|
-
return this.$sanitize(this.html, this.sanitizeOptions || defaultOptions);
|
|
11021
|
-
},
|
|
11022
11011
|
mailInfos() {
|
|
11023
11012
|
const formatAsString = arr => {
|
|
11024
11013
|
let str = '';
|
|
@@ -11045,13 +11034,46 @@ var script = {
|
|
|
11045
11034
|
}];
|
|
11046
11035
|
}
|
|
11047
11036
|
},
|
|
11037
|
+
watch: {
|
|
11038
|
+
html: 'updateIframeContent',
|
|
11039
|
+
isOpen: 'updateIframeContent'
|
|
11040
|
+
},
|
|
11041
|
+
mounted() {
|
|
11042
|
+
this.updateIframeContent();
|
|
11043
|
+
},
|
|
11048
11044
|
methods: {
|
|
11045
|
+
updateIframeContent() {
|
|
11046
|
+
this.$nextTick(() => {
|
|
11047
|
+
if (this.isOpen) {
|
|
11048
|
+
const iframe = this.$refs.emailIframe;
|
|
11049
|
+
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
11050
|
+
doc.open();
|
|
11051
|
+
doc.write(this.html);
|
|
11052
|
+
doc.close();
|
|
11053
|
+
this.adjustIframeHeight();
|
|
11054
|
+
}
|
|
11055
|
+
});
|
|
11056
|
+
},
|
|
11057
|
+
adjustIframeHeight() {
|
|
11058
|
+
this.$nextTick(() => {
|
|
11059
|
+
const iframe = this.$refs.emailIframe;
|
|
11060
|
+
const emailParent = this.$refs.emailIframeParent;
|
|
11061
|
+
if (iframe && emailParent) {
|
|
11062
|
+
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
11063
|
+
iframe.style.height = `${doc.documentElement.offsetHeight < 1000 ? doc.documentElement.offsetHeight : 1000}px`;
|
|
11064
|
+
emailParent.style.minHeight = `${doc.documentElement.offsetHeight < 1000 ? doc.documentElement.offsetHeight : 1000}px`;
|
|
11065
|
+
}
|
|
11066
|
+
});
|
|
11067
|
+
},
|
|
11049
11068
|
toggleShowInfos() {
|
|
11050
11069
|
this.showInfos = !this.showInfos;
|
|
11051
11070
|
},
|
|
11052
11071
|
toggleIsOpen() {
|
|
11053
11072
|
this.isOpen = !this.isOpen;
|
|
11054
|
-
if (!this.isOpen)
|
|
11073
|
+
if (!this.isOpen) {
|
|
11074
|
+
this.actionsOpen = false;
|
|
11075
|
+
this.openMessage = false;
|
|
11076
|
+
}
|
|
11055
11077
|
},
|
|
11056
11078
|
toggleActions() {
|
|
11057
11079
|
this.actionsOpen = !this.actionsOpen;
|
|
@@ -11198,12 +11220,11 @@ var __vue_render__ = function () {
|
|
|
11198
11220
|
"name": "show-y-top"
|
|
11199
11221
|
}
|
|
11200
11222
|
}, [_vm.isOpen ? _c('div', {
|
|
11223
|
+
ref: "emailIframeParent",
|
|
11201
11224
|
staticClass: "email-content"
|
|
11202
|
-
}, [_c('
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
"innerHTML": _vm._s(_vm.cleanHtml)
|
|
11206
|
-
}
|
|
11225
|
+
}, [_c('iframe', {
|
|
11226
|
+
ref: "emailIframe",
|
|
11227
|
+
staticClass: "email-html"
|
|
11207
11228
|
}), _vm._v(" "), _vm.openMessage ? _c('span', {
|
|
11208
11229
|
staticClass: "email-raw"
|
|
11209
11230
|
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]) : _vm._e()]), _vm._v(" "), _vm.anexos && _vm.anexos.length ? _c('div', {
|
|
@@ -11223,18 +11244,18 @@ var __vue_staticRenderFns__ = [];
|
|
|
11223
11244
|
/* style */
|
|
11224
11245
|
const __vue_inject_styles__ = function (inject) {
|
|
11225
11246
|
if (!inject) return;
|
|
11226
|
-
inject("data-v-
|
|
11227
|
-
source: ".show-y-top-enter-active[data-v-
|
|
11247
|
+
inject("data-v-42a3cc0e_0", {
|
|
11248
|
+
source: ".show-y-top-enter-active[data-v-42a3cc0e],.show-y-top-leave-enter[data-v-42a3cc0e]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-42a3cc0e],.show-y-top-leave-to[data-v-42a3cc0e]{opacity:0;transform:translateY(-2%)}",
|
|
11228
11249
|
map: undefined,
|
|
11229
11250
|
media: undefined
|
|
11230
|
-
}), inject("data-v-
|
|
11231
|
-
source: ".bg-dark-white-2{background-color:#f7f7f7}.bg-light-gray-2{background-color:#d8d8d8}.email-item{flex:1;margin:0 0 10px 0;color:#222;min-height:60px;display:flex;flex-wrap:wrap;padding:10px;border-radius:5px;transition:all 150ms ease-in-out;max-width:100%;width:100%}.email-header{width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;border-top-right-radius:5px;border-top-left-radius:5px;position:relative;overflow:hidden}.email-header-content{display:flex;align-items:center;margin:10px;flex:1;min-width:250px}.email-header-infos{display:flex;flex-direction:column;flex:1}.email-subject{margin:0 0 5px 0;font-weight:700;font-size:.95rem}.email-date{--width:245px;font-size:.8rem;margin-right:10px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:var(--width);width:var(--width);max-width:var(--width)}.email-content{display:flex;flex-direction:column;align-items:center;justify-content:
|
|
11251
|
+
}), inject("data-v-42a3cc0e_1", {
|
|
11252
|
+
source: ".bg-dark-white-2{background-color:#f7f7f7}.bg-light-gray-2{background-color:#d8d8d8}.email-item{flex:1;margin:0 0 10px 0;color:#222;min-height:60px;display:flex;flex-wrap:wrap;padding:10px;border-radius:5px;transition:all 150ms ease-in-out;max-width:100%;width:100%}.email-header{width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;border-top-right-radius:5px;border-top-left-radius:5px;position:relative;overflow:hidden}.email-header-content{display:flex;align-items:center;margin:10px;flex:1;min-width:250px}.email-header-infos{display:flex;flex-direction:column;flex:1}.email-subject{margin:0 0 5px 0;font-weight:700;font-size:.95rem}.email-date{--width:245px;font-size:.8rem;margin-right:10px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:var(--width);width:var(--width);max-width:var(--width)}.email-content{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:15px;background-color:#fff;position:relative;max-width:100%}.email-actions{align-self:flex-end;display:flex;border-radius:10px;cursor:pointer;align-items:center;justify-content:center;gap:3px;padding:5px 7px;background-color:#ddd;position:absolute;right:5px;top:5px;z-index:1}.email-actions.active{background-color:#dfdfdf}.email-actions>span{width:4px;height:4px;background-color:#222;border-radius:50%}.email-actions-list{position:absolute;right:45px;width:250px;top:5px;margin:0;list-style-type:none;padding:0;border-radius:5px;z-index:1}.email-action{background-color:#dfdfdf;padding:5px 10px;cursor:pointer;transition:background-color 150ms ease-in-out;font-size:.9rem;user-select:none}.email-action:nth-child(1){border-top-left-radius:5px;border-top-right-radius:5px}.email-action:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.email-action:hover{background-color:#ccc}.email-html{width:100%;max-width:100%;padding:10px;border:none;max-height:1000px;overflow:auto}.email-raw{width:100%;max-width:100%;font-size:.9rem;color:#222}.email-files{display:flex;gap:10px;flex-wrap:wrap;width:100%}.email-header-content,.email-header-infos{max-width:100%;overflow:hidden}.email-to-from-container{margin-bottom:10px;max-width:100%;display:flex;flex-wrap:wrap;flex:1;gap:5px}.email-to-from-container:last-child{margin-bottom:0}.email-to-btn{padding:0 5px;font-size:.9rem;cursor:pointer;color:#666}.email-to-infos{position:absolute;bottom:-300px;border:1px solid #ccc;z-index:2;padding:10px;background-color:#fff;height:300px;max-height:300px;overflow-y:auto;overflow-x:hidden;width:300px;display:flex;flex-direction:column;gap:5px;margin:0;cursor:default}.email-info{width:100%;font-size:.8rem}.email-info>span{font-size:.75rem;color:gray;margin-left:5px}",
|
|
11232
11253
|
map: undefined,
|
|
11233
11254
|
media: undefined
|
|
11234
11255
|
});
|
|
11235
11256
|
};
|
|
11236
11257
|
/* scoped */
|
|
11237
|
-
const __vue_scope_id__ = "data-v-
|
|
11258
|
+
const __vue_scope_id__ = "data-v-42a3cc0e";
|
|
11238
11259
|
/* module identifier */
|
|
11239
11260
|
const __vue_module_identifier__ = undefined;
|
|
11240
11261
|
/* functional template */
|