@kano/kbc-utils
Advanced tools
Comparing version 4.19.0-alpha.0 to 4.21.0-alpha.0
export * from './utils/files'; | ||
export * from './utils/ids'; | ||
export * from './utils/images'; | ||
export * from './utils/storage'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -7,3 +7,5 @@ "use strict"; | ||
__export(require("./utils/files")); | ||
__export(require("./utils/ids")); | ||
__export(require("./utils/images")); | ||
__export(require("./utils/storage")); | ||
//# sourceMappingURL=index.js.map |
@@ -1,4 +0,4 @@ | ||
export declare const CheckBrowserCompatability: (successCb: () => void, failCb: () => void) => void; | ||
export declare const CheckBrowserCompatibility: (successCb: () => void, failCb: () => void) => void; | ||
export declare const ImportFile: (cb: (app: any) => void) => void; | ||
export declare const ExportFile: (app: any, fileName: string, cb?: () => void) => void; | ||
//# sourceMappingURL=files.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CheckBrowserCompatability = (successCb, failCb) => { | ||
exports.CheckBrowserCompatibility = (successCb, failCb) => { | ||
window.File && window.FileReader && window.FileList && window.Blob ? successCb() : failCb(); | ||
@@ -5,0 +5,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
export declare const getBlobFromImage: (url: string) => Promise<Blob>; | ||
export declare const blobToDataURL: (blob: Blob) => Promise<{}>; | ||
export declare const GetBlobFromImage: (url: string) => Promise<Blob>; | ||
export declare const BlobToDataURL: (blob: Blob) => Promise<{}>; | ||
//# sourceMappingURL=images.d.ts.map |
@@ -11,5 +11,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const kbc_telemetry_1 = require("@kano/kbc-telemetry"); | ||
exports.getBlobFromImage = (url) => __awaiter(this, void 0, void 0, function* () { | ||
const tracking = kbc_telemetry_1.useTracking(); | ||
exports.GetBlobFromImage = (url) => __awaiter(this, void 0, void 0, function* () { | ||
return fetch(url) | ||
@@ -21,13 +19,6 @@ .then(res => res.arrayBuffer()) | ||
.catch((e) => { | ||
tracking.trackEvent({ | ||
error: { | ||
name: 'fetch_blob_from_image', | ||
stack: 'error in fetching blob from image', | ||
message: JSON.stringify(e.message || e), | ||
}, | ||
}); | ||
throw e; | ||
}); | ||
}); | ||
exports.blobToDataURL = (blob) => __awaiter(this, void 0, void 0, function* () { | ||
exports.BlobToDataURL = (blob) => __awaiter(this, void 0, void 0, function* () { | ||
return new Promise((resolve) => { | ||
@@ -34,0 +25,0 @@ const r = new FileReader(); |
{ | ||
"name": "@kano/kbc-utils", | ||
"version": "4.19.0-alpha.0", | ||
"version": "4.21.0-alpha.0", | ||
"description": "Utilities functionality for boilerplate mini apps", | ||
@@ -31,5 +31,8 @@ "author": "Kano Computing", | ||
"dependencies": { | ||
"@kano/kbc-telemetry": "^4.17.1-alpha.0" | ||
"uuid": "^7.0.3" | ||
}, | ||
"gitHead": "3375309ac22a06aee105f9a130024838e49b2979" | ||
"devDependencies": { | ||
"@types/uuid": "^7.0.3" | ||
}, | ||
"gitHead": "fa1a5dd1c3e7bdd36661c73c6848184a37b23f80" | ||
} |
@@ -24,3 +24,3 @@ # `kbc-utils` | ||
* `CheckBrowserCompatablity` | ||
* `CheckBrowserCompatibility` | ||
@@ -35,1 +35,9 @@ Checks if the browser Window has, `File`, `FileReader`, `FileList` and `Blob` needed to import and export. Params include success and fail callbacks. | ||
## Tracking | ||
#### By Component | ||
| Component (location) | Function | Event / Error Name | Extra Info | | ||
| -------------------- | --------------------------------- | --------------------------------------- | ------------------------------------------------------------------- | | ||
| images | `GetBlobFromImage` | **Error** name: `fetch_blob_from_image` | { stack: `error in fetching blob from image`, message: `:error` | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12136
22
118
42
1
+ Addeduuid@^7.0.3
- Removed@kano/kbc-telemetry@^4.17.1-alpha.0
- Removed@kano/kbc-telemetry@4.17.1-alpha.0(transitive)
- Removedcore-js@3.38.1(transitive)
- Removeddeepmerge@4.3.1(transitive)
- Removedhoist-non-react-statics@3.3.2(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-detect-offline@2.4.5(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedreact-tracking@7.3.0(transitive)