@esfaenza/extensions 11.2.35 → 11.2.37
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.
- package/bundles/esfaenza-extensions.umd.js +14 -4
- package/bundles/esfaenza-extensions.umd.js.map +1 -1
- package/bundles/esfaenza-extensions.umd.min.js +1 -1
- package/bundles/esfaenza-extensions.umd.min.js.map +1 -1
- package/esm2015/lib/services/extensions.clipboard.service.js +12 -2
- package/esm2015/lib/services/extensions.exports.service.js +4 -4
- package/fesm2015/esfaenza-extensions.js +14 -4
- package/fesm2015/esfaenza-extensions.js.map +1 -1
- package/package.json +1 -1
|
@@ -437,21 +437,31 @@
|
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
439
|
if (window.clipboardData) {
|
|
440
|
+
console.log("[@esfaenza/extensions] Found clipboardData");
|
|
440
441
|
var data = window.clipboardData.getData("Text");
|
|
442
|
+
console.log("[@esfaenza/extensions] Retrieved clipboard values: " + data);
|
|
441
443
|
var value = style == "array" ? this.getClipboardLines(data) :
|
|
442
444
|
style == "matrix" ? this.getClipboardMatrix(data) : [];
|
|
445
|
+
console.log("[@esfaenza/extensions] Adapted for " + style + ": " + JSON.stringify(value));
|
|
443
446
|
if (valueFoundCallback)
|
|
444
447
|
valueFoundCallback(value);
|
|
445
448
|
}
|
|
446
449
|
else if (window.navigator.clipboard) {
|
|
450
|
+
console.log("[@esfaenza/extensions] Found navigator clipboard");
|
|
447
451
|
window.navigator.permissions.query({ name: 'clipboard-read' }).then(function (result) {
|
|
448
|
-
if (!(result.state === 'granted' || result.state === 'prompt'))
|
|
452
|
+
if (!(result.state === 'granted' || result.state === 'prompt')) {
|
|
453
|
+
console.error("[@esfaenza/extensions] Clipboard permission not granted");
|
|
449
454
|
if (valueFoundCallback)
|
|
450
455
|
valueFoundCallback([]);
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
console.log("[@esfaenza/extensions] Clipboard permission granted, retrieving values");
|
|
451
459
|
window.navigator.clipboard.readText()
|
|
452
460
|
.then(function (t) {
|
|
461
|
+
console.log("[@esfaenza/extensions] Retrieved clipboard values: " + t);
|
|
453
462
|
var value = style == "array" ? _this.getClipboardLines(t) :
|
|
454
463
|
style == "matrix" ? _this.getClipboardMatrix(t) : [];
|
|
464
|
+
console.log("[@esfaenza/extensions] Adapted for " + style + ": " + JSON.stringify(value));
|
|
455
465
|
if (valueFoundCallback)
|
|
456
466
|
valueFoundCallback(value);
|
|
457
467
|
})
|
|
@@ -1112,7 +1122,7 @@
|
|
|
1112
1122
|
// Se ho un formato data trasformo in dayjs, formatto ed esporto
|
|
1113
1123
|
// Per la trasformazione in dayjs provo prima a passargli la stringa di netto, sperando la riconosca
|
|
1114
1124
|
// Se non funziona provo a definirgli la formattazione standard del metering per quel linguaggio
|
|
1115
|
-
var val_2 = this.dates.getFormatted(obj[prop], format.length <= 10,
|
|
1125
|
+
var val_2 = this.dates.getFormatted(obj[prop], format.length <= 10, format.length > 16);
|
|
1116
1126
|
Object.defineProperty(obj, prop + "_fmt", { value: val_2 !== null && val_2 !== void 0 ? val_2 : "", writable: false, enumerable: true });
|
|
1117
1127
|
headers.push({ label: lbl ? lbl : prop + "_fmt", key: prop + "_fmt", order: order, type: "date" });
|
|
1118
1128
|
}
|
|
@@ -1155,7 +1165,7 @@
|
|
|
1155
1165
|
type = "number";
|
|
1156
1166
|
}
|
|
1157
1167
|
else if (format) {
|
|
1158
|
-
value = this.dates.getFormatted(value, format.length <= 10,
|
|
1168
|
+
value = this.dates.getFormatted(value, format.length <= 10, format.length > 16);
|
|
1159
1169
|
type = "date";
|
|
1160
1170
|
}
|
|
1161
1171
|
Object.defineProperty(obj, prop, { value: value, writable: false, enumerable: true });
|
|
@@ -1209,7 +1219,7 @@
|
|
|
1209
1219
|
type = "number";
|
|
1210
1220
|
}
|
|
1211
1221
|
else if (valueformat) {
|
|
1212
|
-
value = this_1.dates.getFormatted(obj[prop], valueformat.length <= 10,
|
|
1222
|
+
value = this_1.dates.getFormatted(obj[prop], valueformat.length <= 10, valueformat.length > 16);
|
|
1213
1223
|
type = "date";
|
|
1214
1224
|
}
|
|
1215
1225
|
Object.defineProperty(obj, prop + idx, { value: value, writable: false });
|