@sswroom/sswr 1.6.19 → 1.6.20
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/Changelog +5 -0
- package/cesium.js +2 -1
- package/domtoimage/fontFaces.js +56 -0
- package/domtoimage/images.js +47 -0
- package/domtoimage/index.js +328 -0
- package/domtoimage/inliner.js +65 -0
- package/domtoimage/util.js +248 -0
- package/dummy/Cesium.d.ts +1 -0
- package/dummy/Cesium.js +1 -0
- package/exporter/XLSXExporter.js +578 -524
- package/leaflet/EasyPrint.js +731 -0
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.js +17 -0
package/package.json
CHANGED
package/web.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ export function getParameterByName(name: string): string | null;
|
|
|
102
102
|
export function loadJSON(url: string, onResultFunc: Function): void;
|
|
103
103
|
export function buildTable(o: object | object[]): string;
|
|
104
104
|
export function openData(data: string | Blob, contentType: string, fileName?: string): void;
|
|
105
|
+
export function openUrl(url: string, fileName?: string): void;
|
|
105
106
|
export function parseCSSColor(c: string): Color;
|
|
106
107
|
export function handleFileDrop(ele: HTMLElement, hdlr: (file: File)=>void): void;
|
|
107
108
|
export function appendUrl(targetUrl: string, docUrl: string): string;
|
package/web.js
CHANGED
|
@@ -222,6 +222,23 @@ export function openData(data, contentType, fileName)
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
/**
|
|
226
|
+
* @param {string} url
|
|
227
|
+
* @param {string|undefined} fileName
|
|
228
|
+
*/
|
|
229
|
+
export function openUrl(url, fileName)
|
|
230
|
+
{
|
|
231
|
+
let ele = document.createElement("a");
|
|
232
|
+
ele.setAttribute('href', url);
|
|
233
|
+
if (fileName)
|
|
234
|
+
ele.setAttribute('download', fileName);
|
|
235
|
+
ele.style.display = 'none';
|
|
236
|
+
|
|
237
|
+
document.body.appendChild(ele);
|
|
238
|
+
ele.click();
|
|
239
|
+
document.body.removeChild(ele);
|
|
240
|
+
}
|
|
241
|
+
|
|
225
242
|
/**
|
|
226
243
|
* @param {number} c
|
|
227
244
|
*/
|