nextalys-js-helpers
Advanced tools
Comparing version
@@ -110,3 +110,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var ok, blobInput, clipboardItemInput, error_1, body, range, sel; | ||
var ok, clipboardItemInput, error_1, body, range, sel; | ||
return __generator(this, function (_a) { | ||
@@ -120,7 +120,11 @@ switch (_a.label) { | ||
_a.trys.push([1, 3, , 4]); | ||
blobInput = new Blob([element.outerHTML], { type: 'text/html' }); | ||
clipboardItemInput = new ClipboardItem({ 'text/html': blobInput }); | ||
clipboardItemInput = new ClipboardItem({ | ||
'text/html': new Blob([element.outerHTML], { type: 'text/html' }), | ||
"text/plain": new Blob([element.innerText], { type: "text/plain" }), | ||
}); | ||
// console.log("Log ~ BrowserHelpers ~ copyHtmlElementToClipboard ~ clipboardItemInput:", blobInput); | ||
// await navigator.clipboard.writeText(element.innerHTML); | ||
return [4 /*yield*/, navigator.clipboard.write([clipboardItemInput])]; | ||
case 2: | ||
// console.log("Log ~ BrowserHelpers ~ copyHtmlElementToClipboard ~ clipboardItemInput:", blobInput); | ||
// await navigator.clipboard.writeText(element.innerHTML); | ||
@@ -127,0 +131,0 @@ _a.sent(); |
@@ -134,2 +134,8 @@ export declare type NxsTimeZone = 'Europe/Andorra' | 'Europe/Paris' | 'America/Los_Angeles'; | ||
static parseDateFromLocaleEnString(date_str: string): Date; | ||
/** | ||
* diff in minutes between 2 dates (d1 - d2) | ||
* @param d1 | ||
* @param d2 | ||
* @returns | ||
*/ | ||
static diffMinutes(d1: Date, d2: Date): number; | ||
@@ -136,0 +142,0 @@ static getTimezoneOffset(tz_str: NxsTimeZone, date: Date): number; |
@@ -394,2 +394,8 @@ "use strict"; | ||
}; | ||
/** | ||
* diff in minutes between 2 dates (d1 - d2) | ||
* @param d1 | ||
* @param d2 | ||
* @returns | ||
*/ | ||
DateHelpers.diffMinutes = function (d1, d2) { | ||
@@ -396,0 +402,0 @@ // console.log("Log ~ file: date-helpers.ts ~ line 413 ~ DateHelpers ~ diffMinutes ~ d1", d1); |
{ | ||
"name": "nextalys-js-helpers", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "Nextalys Javascript Helpers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1252736
0.05%19330
0.08%