add typescript
This commit is contained in:
@@ -1,24 +1,41 @@
|
||||
// This function will be called in the ShowEnvelope.razor page
|
||||
// and will trigger loading of the Editor Interface
|
||||
function loadPDFFromUrl(container, url) {
|
||||
console.log("Loading PSPDFKit..");
|
||||
console.log(PSPDFKit);
|
||||
|
||||
fetch(url, { credentials: "include" })
|
||||
.then(res => res.arrayBuffer())
|
||||
.then(arrayBuffer => PSPDFKit.load({
|
||||
container: container,
|
||||
document: arrayBuffer
|
||||
}))
|
||||
.then(instance => {
|
||||
console.log("PSPDFKit loaded", instance)
|
||||
configurePSPDFKit(instance);
|
||||
var App = /** @class */ (function () {
|
||||
function App() {
|
||||
}
|
||||
App.loadPDFFromUrl = function (container, url) {
|
||||
console.log("Loading PSPDFKit..");
|
||||
fetch(url, { credentials: "include" })
|
||||
.then(function (res) { return res.arrayBuffer(); })
|
||||
.then(function (arrayBuffer) { return App.loadPSPDFKit(arrayBuffer, container); })
|
||||
.then(function (instance) {
|
||||
console.log("PSPDFKit loaded!");
|
||||
console.log(instance);
|
||||
})
|
||||
.catch(error => {
|
||||
.catch(function (error) {
|
||||
console.error(error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function configurePSPDFKit(instance) {
|
||||
console.log(instance);
|
||||
}
|
||||
};
|
||||
App.loadPSPDFKit = function (arrayBuffer, container) {
|
||||
PSPDFKit.load({
|
||||
container: container,
|
||||
document: arrayBuffer
|
||||
});
|
||||
};
|
||||
return App;
|
||||
}());
|
||||
export { App };
|
||||
// This function will be called in the ShowEnvelope.razor page
|
||||
// and will trigger loading of the Editor Interface
|
||||
//const loadPDFFromUrl = function (container: string, url: string): void {
|
||||
// console.log("Loading PSPDFKit..");
|
||||
// fetch(url, { credentials: "include" })
|
||||
// .then(res => res.arrayBuffer())
|
||||
// .then(arrayBuffer => loadPSPDFKit(arrayBuffer, container))
|
||||
// .then(configurePSPDFKit)
|
||||
// .then(instance => {
|
||||
// console.log("PSPDFKit loaded!")
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.error(error.message);
|
||||
// });
|
||||
//}
|
||||
//# sourceMappingURL=app.js.map
|
||||
1
EnvelopeGenerator.Web/wwwroot/js/app.js.map
Normal file
1
EnvelopeGenerator.Web/wwwroot/js/app.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../Scripts/app.ts"],"names":[],"mappings":"AAMA;IAAA;IAuBA,CAAC;IAtBiB,kBAAc,GAA5B,UAA8B,SAAiB,EAAE,GAAW;QACxD,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAElC,KAAK,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;aACjC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,WAAW,EAAE,EAAjB,CAAiB,CAAC;aAC9B,IAAI,CAAC,UAAA,WAAW,IAAI,OAAA,GAAG,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAxC,CAAwC,CAAC;aAC7D,IAAI,CAAC,UAAA,QAAQ;YACV,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;YAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,UAAA,KAAK;YACR,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACX,CAAC;IAEc,gBAAY,GAA3B,UAA4B,WAAwB,EAAE,SAAiB;QACnE,QAAQ,CAAC,IAAI,CAAC;YACV,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,WAAW;SACxB,CAAC,CAAA;IACN,CAAC;IAEL,UAAC;AAAD,CAAC,AAvBD,IAuBC;;AAED,8DAA8D;AAC9D,mDAAmD;AACnD,0EAA0E;AAC1E,wCAAwC;AAExC,4CAA4C;AAC5C,yCAAyC;AACzC,oEAAoE;AACpE,kCAAkC;AAClC,6BAA6B;AAC7B,6CAA6C;AAC7C,YAAY;AACZ,2BAA2B;AAC3B,2CAA2C;AAC3C,aAAa;AACb,GAAG"}
|
||||
Reference in New Issue
Block a user