Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nativescript-community/ui-share-file

Package Overview
Dependencies
Maintainers
18
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript-community/ui-share-file - npm Package Compare versions

Comparing version 1.2.5 to 1.3.0

platforms/android/native-api-usage.json

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

# [1.3.0](https://github.com/nativescript-community/ui-share-file/compare/v1.2.5...v1.3.0) (2023-02-22)
### Features
- **android:** native-api-usage ([13ebb89](https://github.com/nativescript-community/ui-share-file/commit/13ebb89f2a6d83a1f4d17d9b04bc34662faeab59))
## [1.2.5](https://github.com/nativescript-community/ui-share-file/compare/v1.2.4...v1.2.5) (2022-10-18)

@@ -8,0 +14,0 @@

4

package.json
{
"name": "@nativescript-community/ui-share-file",
"version": "1.2.5",
"version": "1.3.0",
"description": "Send/share file to other apps.",

@@ -34,3 +34,3 @@ "main": "share-file",

"bootstrapper": "nativescript-plugin-seed",
"gitHead": "c6f1ca219ab0d3ee0af9a81f7f3ca952f4afd191"
"gitHead": "c9dadb321bc4577a2a4cc0eaa3a9afc781937f3e"
}

@@ -11,3 +11,2 @@ export declare class ShareFile {

_cleanAttachmentFolder(): void;
toStringArray(arg: any): any;
}

@@ -0,1 +1,2 @@

import { Utils } from '@nativescript/core';
import { AndroidApplication, android as androidApp } from '@nativescript/core/application';

@@ -10,2 +11,3 @@ import { File, Folder, path } from '@nativescript/core/file-system';

const intent = new android.content.Intent();
const context = Utils.android.getApplicationContext();
// const map = android.webkit.MimeTypeMap.getSingleton();

@@ -18,3 +20,3 @@ // const mimeType = map.getMimeTypeFromExtension(this.fileExtension(path));

const uris = new java.util.ArrayList();
args.path.forEach((p) => uris.add(this._getUriForPath(p, this.fileName(p), androidApp.context)));
args.path.forEach((p) => uris.add(this._getUriForPath(p, this.fileName(p), context)));
intent.putParcelableArrayListExtra(android.content.Intent.EXTRA_STREAM, uris);

@@ -25,3 +27,3 @@ intent.setAction(android.content.Intent.ACTION_SEND_MULTIPLE);

const path = args.path;
const uri = this._getUriForPath(path, this.fileName(path), androidApp.context);
const uri = this._getUriForPath(path, this.fileName(path), context);
intent.putExtra(android.content.Intent.EXTRA_STREAM, uri);

@@ -142,4 +144,5 @@ intent.setAction(android.content.Intent.ACTION_SEND);

_cleanAttachmentFolder() {
if (androidApp.context) {
const dir = androidApp.context.getExternalCacheDir();
const context = Utils.android.getApplicationContext();
if (context) {
const dir = context.getExternalCacheDir();
const storage = path.join(dir.toString(), 'filecomposer');

@@ -150,10 +153,3 @@ const cacheFolder = Folder.fromPath(storage);

}
toStringArray(arg) {
const arr = java.lang.reflect.Array.newInstance(java.lang.String.class, arg.length);
for (let i = 0; i < arg.length; i++) {
arr[i] = arg[i];
}
return arr;
}
}
//# sourceMappingURL=share-file.android.js.map

@@ -91,16 +91,12 @@ import { Application } from '@nativescript/core';

}
var UIDocumentInteractionControllerDelegateImpl = /** @class */ (function (_super) {
__extends(UIDocumentInteractionControllerDelegateImpl, _super);
function UIDocumentInteractionControllerDelegateImpl() {
return _super !== null && _super.apply(this, arguments) || this;
let UIDocumentInteractionControllerDelegateImpl = class UIDocumentInteractionControllerDelegateImpl extends NSObject {
static new() {
return super.new();
}
UIDocumentInteractionControllerDelegateImpl.new = function () {
return _super.new.call(this);
};
UIDocumentInteractionControllerDelegateImpl.prototype.initWithOwnerController = function (owner, controller) {
initWithOwnerController(owner, controller) {
this._owner = owner;
this.controller = controller;
return this;
};
UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerWillBeginSendingToApplication = function (controller, app) {
}
documentInteractionControllerWillBeginSendingToApplication(controller, app) {
// console.log(

@@ -110,33 +106,35 @@ // "documentInteractionControllerWillBeginSendingToApplication",

// );
var owner = this._owner;
const owner = this._owner;
if (owner) {
owner.dismissed();
}
};
UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerDidDismissOpenInMenu = function (controller) {
}
documentInteractionControllerDidDismissOpenInMenu(controller) {
// console.log("documentInteractionControllerDidDismissOpenInMenu");
var owner = this._owner;
const owner = this._owner;
if (owner) {
owner.dismissed();
}
};
UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerDidDismissOptionsMenu = function (controller) {
}
documentInteractionControllerDidDismissOptionsMenu(controller) {
// console.log("documentInteractionControllerDidDismissOptionsMenu");
var owner = this._owner;
const owner = this._owner;
if (owner) {
owner.dismissed();
}
};
UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerViewControllerForPreview = function (controller) {
}
documentInteractionControllerViewControllerForPreview(controller) {
return this.controller;
};
UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerViewForPreview = function (controller) {
}
documentInteractionControllerViewForPreview(controller) {
return this.controller.view;
};
UIDocumentInteractionControllerDelegateImpl.prototype.documentInteractionControllerRectForPreview = function (controller) {
}
documentInteractionControllerRectForPreview(controller) {
return this.controller.view.bounds;
};
UIDocumentInteractionControllerDelegateImpl.ObjCProtocols = [UIDocumentInteractionControllerDelegate];
return UIDocumentInteractionControllerDelegateImpl;
}(NSObject));
}
};
UIDocumentInteractionControllerDelegateImpl.ObjCProtocols = [UIDocumentInteractionControllerDelegate];
UIDocumentInteractionControllerDelegateImpl = __decorate([
NativeClass
], UIDocumentInteractionControllerDelegateImpl);
//# sourceMappingURL=share-file.ios.js.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc