This commit is contained in:
tiago.kayaya
2021-08-18 18:58:21 +01:00
parent 24e2a8f518
commit d7efe502f8
679 changed files with 123414 additions and 0 deletions
@@ -0,0 +1,188 @@
cordova.define("cordova-plugin-camera.camera", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var argscheck = require('cordova/argscheck');
var exec = require('cordova/exec');
var Camera = require('./Camera');
// XXX: commented out
// CameraPopoverHandle = require('./CameraPopoverHandle');
/**
* @namespace navigator
*/
/**
* @exports camera
*/
var cameraExport = {};
// Tack on the Camera Constants to the base camera plugin.
for (var key in Camera) {
cameraExport[key] = Camera[key];
}
/**
* Callback function that provides an error message.
* @callback module:camera.onError
* @param {string} message - The message is provided by the device's native code.
*/
/**
* Callback function that provides the image data.
* @callback module:camera.onSuccess
* @param {string} imageData - Base64 encoding of the image data, _or_ the image file URI, depending on [`cameraOptions`]{@link module:camera.CameraOptions} in effect.
* @example
* // Show image
* //
* function cameraCallback(imageData) {
* var image = document.getElementById('myImage');
* image.src = "data:image/jpeg;base64," + imageData;
* }
*/
/**
* Optional parameters to customize the camera settings.
* * [Quirks](#CameraOptions-quirks)
* @typedef module:camera.CameraOptions
* @type {Object}
* @property {number} [quality=50] - Quality of the saved image, expressed as a range of 0-100, where 100 is typically full resolution with no loss from file compression. (Note that information about the camera's resolution is unavailable.)
* @property {module:Camera.DestinationType} [destinationType=FILE_URI] - Choose the format of the return value.
* @property {module:Camera.PictureSourceType} [sourceType=CAMERA] - Set the source of the picture.
* @property {Boolean} [allowEdit=false] - Allow simple editing of image before selection.
* @property {module:Camera.EncodingType} [encodingType=JPEG] - Choose the returned image file's encoding.
* @property {number} [targetWidth] - Width in pixels to scale image. Must be used with `targetHeight`. Aspect ratio remains constant.
* @property {number} [targetHeight] - Height in pixels to scale image. Must be used with `targetWidth`. Aspect ratio remains constant.
* @property {module:Camera.MediaType} [mediaType=PICTURE] - Set the type of media to select from. Only works when `PictureSourceType` is `PHOTOLIBRARY` or `SAVEDPHOTOALBUM`.
* @property {Boolean} [correctOrientation] - Rotate the image to correct for the orientation of the device during capture.
* @property {Boolean} [saveToPhotoAlbum] - Save the image to the photo album on the device after capture.
* @property {module:CameraPopoverOptions} [popoverOptions] - iOS-only options that specify popover location in iPad.
* @property {module:Camera.Direction} [cameraDirection=BACK] - Choose the camera to use (front- or back-facing).
*/
/**
* @description Takes a photo using the camera, or retrieves a photo from the device's
* image gallery. The image is passed to the success callback as a
* Base64-encoded `String`, or as the URI for the image file.
*
* The `camera.getPicture` function opens the device's default camera
* application that allows users to snap pictures by default - this behavior occurs,
* when `Camera.sourceType` equals [`Camera.PictureSourceType.CAMERA`]{@link module:Camera.PictureSourceType}.
* Once the user snaps the photo, the camera application closes and the application is restored.
*
* If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
* `Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays
* that allows users to select an existing image.
*
* The return value is sent to the [`cameraSuccess`]{@link module:camera.onSuccess} callback function, in
* one of the following formats, depending on the specified
* `cameraOptions`:
*
* - A `String` containing the Base64-encoded photo image.
* - A `String` representing the image file location on local storage (default).
*
* You can do whatever you want with the encoded image or URI, for
* example:
*
* - Render the image in an `<img>` tag, as in the example below
* - Save the data locally (`LocalStorage`, [Lawnchair](http://brianleroux.github.com/lawnchair/), etc.)
* - Post the data to a remote server
*
* __NOTE__: Photo resolution on newer devices is quite good. Photos
* selected from the device's gallery are not downscaled to a lower
* quality, even if a `quality` parameter is specified. To avoid common
* memory problems, set `Camera.destinationType` to `FILE_URI` rather
* than `DATA_URL`.
*
* __Supported Platforms__
*
* - Android
* - BlackBerry
* - Browser
* - Firefox
* - FireOS
* - iOS
* - Windows
* - WP8
* - Ubuntu
*
* More examples [here](#camera-getPicture-examples). Quirks [here](#camera-getPicture-quirks).
*
* @example
* navigator.camera.getPicture(cameraSuccess, cameraError, cameraOptions);
* @param {module:camera.onSuccess} successCallback
* @param {module:camera.onError} errorCallback
* @param {module:camera.CameraOptions} options CameraOptions
*/
cameraExport.getPicture = function (successCallback, errorCallback, options) {
argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);
options = options || {};
var getValue = argscheck.getValue;
var quality = getValue(options.quality, 50);
var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);
var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);
var targetWidth = getValue(options.targetWidth, -1);
var targetHeight = getValue(options.targetHeight, -1);
var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);
var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);
var allowEdit = !!options.allowEdit;
var correctOrientation = !!options.correctOrientation;
var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
var popoverOptions = getValue(options.popoverOptions, null);
var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
exec(successCallback, errorCallback, 'Camera', 'takePicture', args);
// XXX: commented out
// return new CameraPopoverHandle();
};
/**
* Removes intermediate image files that are kept in temporary storage
* after calling [`camera.getPicture`]{@link module:camera.getPicture}. Applies only when the value of
* `Camera.sourceType` equals `Camera.PictureSourceType.CAMERA` and the
* `Camera.destinationType` equals `Camera.DestinationType.FILE_URI`.
*
* __Supported Platforms__
*
* - iOS
*
* @example
* navigator.camera.cleanup(onSuccess, onFail);
*
* function onSuccess() {
* console.log("Camera cleanup success.")
* }
*
* function onFail(message) {
* alert('Failed because: ' + message);
* }
*/
cameraExport.cleanup = function (successCallback, errorCallback) {
exec(successCallback, errorCallback, 'Camera', 'cleanup', []);
};
module.exports = cameraExport;
});
@@ -0,0 +1,95 @@
cordova.define("cordova-plugin-camera.Camera", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* @module Camera
*/
module.exports = {
/**
* @description
* Defines the output format of `Camera.getPicture` call.
*
* @enum {number}
*/
DestinationType: {
/** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI if possible */
DATA_URL: 0,
/** Return file uri (content://media/external/images/media/2 for Android) */
FILE_URI: 1
},
/**
* @enum {number}
*/
EncodingType: {
/** Return JPEG encoded image */
JPEG: 0,
/** Return PNG encoded image */
PNG: 1
},
/**
* @enum {number}
*/
MediaType: {
/** Allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType */
PICTURE: 0,
/** Allow selection of video only, ONLY RETURNS URL */
VIDEO: 1,
/** Allow selection from all media types */
ALLMEDIA: 2
},
/**
* @description
* Defines the output format of `Camera.getPicture` call.
*
* @enum {number}
*/
PictureSourceType: {
/** Choose image from the device's photo library (same as SAVEDPHOTOALBUM for Android) */
PHOTOLIBRARY: 0,
/** Take picture from camera */
CAMERA: 1,
/** Choose image only from the device's Camera Roll album (same as PHOTOLIBRARY for Android) */
SAVEDPHOTOALBUM: 2
},
/**
* Matches iOS UIPopoverArrowDirection constants to specify arrow location on popover.
* @enum {number}
*/
PopoverArrowDirection: {
ARROW_UP: 1,
ARROW_DOWN: 2,
ARROW_LEFT: 4,
ARROW_RIGHT: 8,
ARROW_ANY: 15
},
/**
* @enum {number}
*/
Direction: {
/** Use the back-facing camera */
BACK: 0,
/** Use the front-facing camera */
FRONT: 1
}
};
});
@@ -0,0 +1,59 @@
cordova.define("cordova-plugin-camera.CameraPopoverOptions", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var Camera = require('./Camera');
/**
* @namespace navigator
*/
/**
* iOS-only parameters that specify the anchor element location and arrow
* direction of the popover when selecting images from an iPad's library
* or album.
* Note that the size of the popover may change to adjust to the
* direction of the arrow and orientation of the screen. Make sure to
* account for orientation changes when specifying the anchor element
* location.
* @module CameraPopoverOptions
* @param {Number} [x=0] - x pixel coordinate of screen element onto which to anchor the popover.
* @param {Number} [y=32] - y pixel coordinate of screen element onto which to anchor the popover.
* @param {Number} [width=320] - width, in pixels, of the screen element onto which to anchor the popover.
* @param {Number} [height=480] - height, in pixels, of the screen element onto which to anchor the popover.
* @param {module:Camera.PopoverArrowDirection} [arrowDir=ARROW_ANY] - Direction the arrow on the popover should point.
* @param {Number} [popoverWidth=0] - width of the popover (0 or not specified will use apple's default width).
* @param {Number} [popoverHeight=0] - height of the popover (0 or not specified will use apple's default height).
*/
var CameraPopoverOptions = function (x, y, width, height, arrowDir, popoverWidth, popoverHeight) {
// information of rectangle that popover should be anchored to
this.x = x || 0;
this.y = y || 32;
this.width = width || 320;
this.height = height || 480;
this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
this.popoverWidth = popoverWidth || 0;
this.popoverHeight = popoverHeight || 0;
};
module.exports = CameraPopoverOptions;
});
@@ -0,0 +1,69 @@
cordova.define("cordova-plugin-camera.CameraPopoverHandle", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require('cordova/exec');
/**
* @namespace navigator
*/
/**
* A handle to an image picker popover.
*
* __Supported Platforms__
*
* - iOS
*
* @example
* navigator.camera.getPicture(onSuccess, onFail,
* {
* destinationType: Camera.DestinationType.FILE_URI,
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
* popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY, 300, 600)
* });
*
* // Reposition the popover if the orientation changes.
* window.onorientationchange = function() {
* var cameraPopoverHandle = new CameraPopoverHandle();
* var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY, 400, 500);
* cameraPopoverHandle.setPosition(cameraPopoverOptions);
* }
* @module CameraPopoverHandle
*/
var CameraPopoverHandle = function () {
/**
* Can be used to reposition the image selection dialog,
* for example, when the device orientation changes.
* @memberof CameraPopoverHandle
* @instance
* @method setPosition
* @param {module:CameraPopoverOptions} popoverOptions
*/
this.setPosition = function (popoverOptions) {
var args = [popoverOptions];
exec(null, null, 'Camera', 'repositionPopover', args);
};
};
module.exports = CameraPopoverHandle;
});
@@ -0,0 +1,86 @@
cordova.define("cordova-plugin-device.device", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var argscheck = require('cordova/argscheck');
var channel = require('cordova/channel');
var utils = require('cordova/utils');
var exec = require('cordova/exec');
var cordova = require('cordova');
channel.createSticky('onCordovaInfoReady');
// Tell cordova channel to wait on the CordovaInfoReady event
channel.waitForInitialization('onCordovaInfoReady');
/**
* This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
* phone, etc.
* @constructor
*/
function Device () {
this.available = false;
this.platform = null;
this.version = null;
this.uuid = null;
this.cordova = null;
this.model = null;
this.manufacturer = null;
this.isVirtual = null;
this.serial = null;
var me = this;
channel.onCordovaReady.subscribe(function () {
me.getInfo(function (info) {
// ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
// TODO: CB-5105 native implementations should not return info.cordova
var buildLabel = cordova.version;
me.available = true;
me.platform = info.platform;
me.version = info.version;
me.uuid = info.uuid;
me.cordova = buildLabel;
me.model = info.model;
me.isVirtual = info.isVirtual;
me.manufacturer = info.manufacturer || 'unknown';
me.serial = info.serial || 'unknown';
channel.onCordovaInfoReady.fire();
}, function (e) {
me.available = false;
utils.alert('[ERROR] Error initializing Cordova: ' + e);
});
});
}
/**
* Get device info
*
* @param {Function} successCallback The function to call when the heading data is available
* @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
*/
Device.prototype.getInfo = function (successCallback, errorCallback) {
argscheck.checkArgs('fF', 'Device.getInfo', arguments);
exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
};
module.exports = new Device();
});
@@ -0,0 +1,133 @@
cordova.define("cordova-plugin-dialogs.notification", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require('cordova/exec');
var platform = require('cordova/platform');
/**
* Provides access to notifications on the device.
*/
module.exports = {
/**
* Open a native alert dialog, with a customizable title and button text.
*
* @param {String} message Message to print in the body of the alert
* @param {Function} completeCallback The callback that is called when user clicks on a button.
* @param {String} title Title of the alert dialog (default: Alert)
* @param {String} buttonLabel Label of the close button (default: OK)
*/
alert: function (message, completeCallback, title, buttonLabel) {
var _message = (typeof message === 'string' ? message : JSON.stringify(message));
var _title = (typeof title === 'string' ? title : 'Alert');
var _buttonLabel = (buttonLabel && typeof buttonLabel === 'string' ? buttonLabel : 'OK');
exec(completeCallback, null, 'Notification', 'alert', [_message, _title, _buttonLabel]);
},
/**
* Open a native confirm dialog, with a customizable title and button text.
* The result that the user selects is returned to the result callback.
*
* @param {String} message Message to print in the body of the alert
* @param {Function} resultCallback The callback that is called when user clicks on a button.
* @param {String} title Title of the alert dialog (default: Confirm)
* @param {Array} buttonLabels Array of the labels of the buttons (default: ['OK', 'Cancel'])
*/
confirm: function (message, resultCallback, title, buttonLabels) {
var _message = (typeof message === 'string' ? message : JSON.stringify(message));
var _title = (typeof title === 'string' ? title : 'Confirm');
var _buttonLabels = (buttonLabels || ['OK', 'Cancel']);
// Strings are deprecated!
if (typeof _buttonLabels === 'string') {
console.log('Notification.confirm(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array).');
}
_buttonLabels = convertButtonLabels(_buttonLabels);
exec(resultCallback, null, 'Notification', 'confirm', [_message, _title, _buttonLabels]);
},
/**
* Open a native prompt dialog, with a customizable title and button text.
* The following results are returned to the result callback:
* buttonIndex Index number of the button selected.
* input1 The text entered in the prompt dialog box.
*
* @param {String} message Dialog message to display (default: "Prompt message")
* @param {Function} resultCallback The callback that is called when user clicks on a button.
* @param {String} title Title of the dialog (default: "Prompt")
* @param {Array} buttonLabels Array of strings for the button labels (default: ["OK","Cancel"])
* @param {String} defaultText Textbox input value (default: empty string)
*/
prompt: function (message, resultCallback, title, buttonLabels, defaultText) {
var _message = (typeof message === 'string' ? message : JSON.stringify(message));
var _title = (typeof title === 'string' ? title : 'Prompt');
var _buttonLabels = (buttonLabels || ['OK', 'Cancel']);
// Strings are deprecated!
if (typeof _buttonLabels === 'string') {
console.log('Notification.prompt(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array).');
}
_buttonLabels = convertButtonLabels(_buttonLabels);
var _defaultText = (defaultText || '');
exec(resultCallback, null, 'Notification', 'prompt', [_message, _title, _buttonLabels, _defaultText]);
},
/**
* Causes the device to beep.
* On Android, the default notification ringtone is played "count" times.
*
* @param {Integer} count The number of beeps.
*/
beep: function (count) {
var defaultedCount = count || 1;
exec(null, null, 'Notification', 'beep', [ defaultedCount ]);
}
};
function convertButtonLabels (buttonLabels) {
// Some platforms take an array of button label names.
// Other platforms take a comma separated list.
// For compatibility, we convert to the desired type based on the platform.
if (platform.id === 'amazon-fireos' || platform.id === 'android' || platform.id === 'ios' ||
platform.id === 'windowsphone' || platform.id === 'firefoxos' || platform.id === 'ubuntu' ||
platform.id === 'windows8' || platform.id === 'windows') {
if (typeof buttonLabels === 'string') {
buttonLabels = buttonLabels.split(','); // not crazy about changing the var type here
}
} else {
if (Array.isArray(buttonLabels)) {
var buttonLabelArray = buttonLabels;
buttonLabels = buttonLabelArray.toString();
}
}
return buttonLabels;
}
});
@@ -0,0 +1,120 @@
cordova.define("cordova-plugin-file.DirectoryEntry", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var argscheck = require('cordova/argscheck');
var utils = require('cordova/utils');
var exec = require('cordova/exec');
var Entry = require('./Entry');
var FileError = require('./FileError');
var DirectoryReader = require('./DirectoryReader');
/**
* An interface representing a directory on the file system.
*
* {boolean} isFile always false (readonly)
* {boolean} isDirectory always true (readonly)
* {DOMString} name of the directory, excluding the path leading to it (readonly)
* {DOMString} fullPath the absolute full path to the directory (readonly)
* {FileSystem} filesystem on which the directory resides (readonly)
*/
var DirectoryEntry = function (name, fullPath, fileSystem, nativeURL) {
// add trailing slash if it is missing
if ((fullPath) && !/\/$/.test(fullPath)) {
fullPath += '/';
}
// add trailing slash if it is missing
if (nativeURL && !/\/$/.test(nativeURL)) {
nativeURL += '/';
}
DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath, fileSystem, nativeURL);
};
utils.extend(DirectoryEntry, Entry);
/**
* Creates a new DirectoryReader to read entries from this directory
*/
DirectoryEntry.prototype.createReader = function () {
return new DirectoryReader(this.toInternalURL());
};
/**
* Creates or looks up a directory
*
* @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
* @param {Flags} options to create or exclusively create the directory
* @param {Function} successCallback is called with the new entry
* @param {Function} errorCallback is called with a FileError
*/
DirectoryEntry.prototype.getDirectory = function (path, options, successCallback, errorCallback) {
argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);
var fs = this.filesystem;
var win = successCallback && function (result) {
var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
successCallback(entry);
};
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(win, fail, 'File', 'getDirectory', [this.toInternalURL(), path, options]);
};
/**
* Deletes a directory and all of it's contents
*
* @param {Function} successCallback is called with no parameters
* @param {Function} errorCallback is called with a FileError
*/
DirectoryEntry.prototype.removeRecursively = function (successCallback, errorCallback) {
argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(successCallback, fail, 'File', 'removeRecursively', [this.toInternalURL()]);
};
/**
* Creates or looks up a file
*
* @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
* @param {Flags} options to create or exclusively create the file
* @param {Function} successCallback is called with the new entry
* @param {Function} errorCallback is called with a FileError
*/
DirectoryEntry.prototype.getFile = function (path, options, successCallback, errorCallback) {
argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);
var fs = this.filesystem;
var win = successCallback && function (result) {
var FileEntry = require('./FileEntry');
var entry = new FileEntry(result.name, result.fullPath, fs, result.nativeURL);
successCallback(entry);
};
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(win, fail, 'File', 'getFile', [this.toInternalURL(), path, options]);
};
module.exports = DirectoryEntry;
});
@@ -0,0 +1,75 @@
cordova.define("cordova-plugin-file.DirectoryReader", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require('cordova/exec');
var FileError = require('./FileError');
/**
* An interface that lists the files and directories in a directory.
*/
function DirectoryReader (localURL) {
this.localURL = localURL || null;
this.hasReadEntries = false;
}
/**
* Returns a list of entries from a directory.
*
* @param {Function} successCallback is called with a list of entries
* @param {Function} errorCallback is called with a FileError
*/
DirectoryReader.prototype.readEntries = function (successCallback, errorCallback) {
// If we've already read and passed on this directory's entries, return an empty list.
if (this.hasReadEntries) {
successCallback([]);
return;
}
var reader = this;
var win = typeof successCallback !== 'function' ? null : function (result) {
var retVal = [];
for (var i = 0; i < result.length; i++) {
var entry = null;
if (result[i].isDirectory) {
entry = new (require('./DirectoryEntry'))();
} else if (result[i].isFile) {
entry = new (require('./FileEntry'))();
}
entry.isDirectory = result[i].isDirectory;
entry.isFile = result[i].isFile;
entry.name = result[i].name;
entry.fullPath = result[i].fullPath;
entry.filesystem = new (require('./FileSystem'))(result[i].filesystemName);
entry.nativeURL = result[i].nativeURL;
retVal.push(entry);
}
reader.hasReadEntries = true;
successCallback(retVal);
};
var fail = typeof errorCallback !== 'function' ? null : function (code) {
errorCallback(new FileError(code));
};
exec(win, fail, 'File', 'readEntries', [this.localURL]);
};
module.exports = DirectoryReader;
});
@@ -0,0 +1,263 @@
cordova.define("cordova-plugin-file.Entry", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var argscheck = require('cordova/argscheck');
var exec = require('cordova/exec');
var FileError = require('./FileError');
var Metadata = require('./Metadata');
/**
* Represents a file or directory on the local file system.
*
* @param isFile
* {boolean} true if Entry is a file (readonly)
* @param isDirectory
* {boolean} true if Entry is a directory (readonly)
* @param name
* {DOMString} name of the file or directory, excluding the path
* leading to it (readonly)
* @param fullPath
* {DOMString} the absolute full path to the file or directory
* (readonly)
* @param fileSystem
* {FileSystem} the filesystem on which this entry resides
* (readonly)
* @param nativeURL
* {DOMString} an alternate URL which can be used by native
* webview controls, for example media players.
* (optional, readonly)
*/
function Entry (isFile, isDirectory, name, fullPath, fileSystem, nativeURL) {
this.isFile = !!isFile;
this.isDirectory = !!isDirectory;
this.name = name || '';
this.fullPath = fullPath || '';
this.filesystem = fileSystem || null;
this.nativeURL = nativeURL || null;
}
/**
* Look up the metadata of the entry.
*
* @param successCallback
* {Function} is called with a Metadata object
* @param errorCallback
* {Function} is called with a FileError
*/
Entry.prototype.getMetadata = function (successCallback, errorCallback) {
argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);
var success = successCallback && function (entryMetadata) {
var metadata = new Metadata({
size: entryMetadata.size,
modificationTime: entryMetadata.lastModifiedDate
});
successCallback(metadata);
};
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(success, fail, 'File', 'getFileMetadata', [this.toInternalURL()]);
};
/**
* Set the metadata of the entry.
*
* @param successCallback
* {Function} is called with a Metadata object
* @param errorCallback
* {Function} is called with a FileError
* @param metadataObject
* {Object} keys and values to set
*/
Entry.prototype.setMetadata = function (successCallback, errorCallback, metadataObject) {
argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);
exec(successCallback, errorCallback, 'File', 'setMetadata', [this.toInternalURL(), metadataObject]);
};
/**
* Move a file or directory to a new location.
*
* @param parent
* {DirectoryEntry} the directory to which to move this entry
* @param newName
* {DOMString} new name of the entry, defaults to the current name
* @param successCallback
* {Function} called with the new DirectoryEntry object
* @param errorCallback
* {Function} called with a FileError
*/
Entry.prototype.moveTo = function (parent, newName, successCallback, errorCallback) {
argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
var srcURL = this.toInternalURL();
// entry name
var name = newName || this.name;
var success = function (entry) {
if (entry) {
if (successCallback) {
// create appropriate Entry object
var newFSName = entry.filesystemName || (entry.filesystem && entry.filesystem.name);
var fs = newFSName ? new FileSystem(newFSName, { name: '', fullPath: '/' }) : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' }); // eslint-disable-line no-undef
var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL) : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL);
successCallback(result);
}
} else {
// no Entry object returned
if (fail) {
fail(FileError.NOT_FOUND_ERR);
}
}
};
// copy
exec(success, fail, 'File', 'moveTo', [srcURL, parent.toInternalURL(), name]);
};
/**
* Copy a directory to a different location.
*
* @param parent
* {DirectoryEntry} the directory to which to copy the entry
* @param newName
* {DOMString} new name of the entry, defaults to the current name
* @param successCallback
* {Function} called with the new Entry object
* @param errorCallback
* {Function} called with a FileError
*/
Entry.prototype.copyTo = function (parent, newName, successCallback, errorCallback) {
argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
var srcURL = this.toInternalURL();
// entry name
var name = newName || this.name;
// success callback
var success = function (entry) {
if (entry) {
if (successCallback) {
// create appropriate Entry object
var newFSName = entry.filesystemName || (entry.filesystem && entry.filesystem.name);
var fs = newFSName ? new FileSystem(newFSName, { name: '', fullPath: '/' }) : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' }); // eslint-disable-line no-undef
var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL) : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL);
successCallback(result);
}
} else {
// no Entry object returned
if (fail) {
fail(FileError.NOT_FOUND_ERR);
}
}
};
// copy
exec(success, fail, 'File', 'copyTo', [srcURL, parent.toInternalURL(), name]);
};
/**
* Return a URL that can be passed across the bridge to identify this entry.
*/
Entry.prototype.toInternalURL = function () {
if (this.filesystem && this.filesystem.__format__) {
return this.filesystem.__format__(this.fullPath, this.nativeURL);
}
};
/**
* Return a URL that can be used to identify this entry.
* Use a URL that can be used to as the src attribute of a <video> or
* <audio> tag. If that is not possible, construct a cdvfile:// URL.
*/
Entry.prototype.toURL = function () {
if (this.nativeURL) {
return this.nativeURL;
}
// fullPath attribute may contain the full URL in the case that
// toInternalURL fails.
return this.toInternalURL() || 'file://localhost' + this.fullPath;
};
/**
* Backwards-compatibility: In v1.0.0 - 1.0.2, .toURL would only return a
* cdvfile:// URL, and this method was necessary to obtain URLs usable by the
* webview.
* See CB-6051, CB-6106, CB-6117, CB-6152, CB-6199, CB-6201, CB-6243, CB-6249,
* and CB-6300.
*/
Entry.prototype.toNativeURL = function () {
console.log("DEPRECATED: Update your code to use 'toURL'");
return this.toURL();
};
/**
* Returns a URI that can be used to identify this entry.
*
* @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
* @return uri
*/
Entry.prototype.toURI = function (mimeType) {
console.log("DEPRECATED: Update your code to use 'toURL'");
return this.toURL();
};
/**
* Remove a file or directory. It is an error to attempt to delete a
* directory that is not empty. It is an error to attempt to delete a
* root directory of a file system.
*
* @param successCallback {Function} called with no parameters
* @param errorCallback {Function} called with a FileError
*/
Entry.prototype.remove = function (successCallback, errorCallback) {
argscheck.checkArgs('FF', 'Entry.remove', arguments);
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(successCallback, fail, 'File', 'remove', [this.toInternalURL()]);
};
/**
* Look up the parent DirectoryEntry of this entry.
*
* @param successCallback {Function} called with the parent DirectoryEntry object
* @param errorCallback {Function} called with a FileError
*/
Entry.prototype.getParent = function (successCallback, errorCallback) {
argscheck.checkArgs('FF', 'Entry.getParent', arguments);
var fs = this.filesystem;
var win = successCallback && function (result) {
var DirectoryEntry = require('./DirectoryEntry');
var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL);
successCallback(entry);
};
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(win, fail, 'File', 'getParent', [this.toInternalURL()]);
};
module.exports = Entry;
});
@@ -0,0 +1,81 @@
cordova.define("cordova-plugin-file.File", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Constructor.
* name {DOMString} name of the file, without path information
* fullPath {DOMString} the full path of the file, including the name
* type {DOMString} mime type
* lastModifiedDate {Date} last modified date
* size {Number} size of the file in bytes
*/
var File = function (name, localURL, type, lastModifiedDate, size) {
this.name = name || '';
this.localURL = localURL || null;
this.type = type || null;
this.lastModified = lastModifiedDate || null;
// For backwards compatibility, store the timestamp in lastModifiedDate as well
this.lastModifiedDate = lastModifiedDate || null;
this.size = size || 0;
// These store the absolute start and end for slicing the file.
this.start = 0;
this.end = this.size;
};
/**
* Returns a "slice" of the file. Since Cordova Files don't contain the actual
* content, this really returns a File with adjusted start and end.
* Slices of slices are supported.
* start {Number} The index at which to start the slice (inclusive).
* end {Number} The index at which to end the slice (exclusive).
*/
File.prototype.slice = function (start, end) {
var size = this.end - this.start;
var newStart = 0;
var newEnd = size;
if (arguments.length) {
if (start < 0) {
newStart = Math.max(size + start, 0);
} else {
newStart = Math.min(size, start);
}
}
if (arguments.length >= 2) {
if (end < 0) {
newEnd = Math.max(size + end, 0);
} else {
newEnd = Math.min(end, size);
}
}
var newFile = new File(this.name, this.localURL, this.type, this.lastModified, this.size);
newFile.start = this.start + newStart;
newFile.end = this.start + newEnd;
return newFile;
};
module.exports = File;
});
@@ -0,0 +1,95 @@
cordova.define("cordova-plugin-file.FileEntry", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var utils = require('cordova/utils');
var exec = require('cordova/exec');
var Entry = require('./Entry');
var FileWriter = require('./FileWriter');
var File = require('./File');
var FileError = require('./FileError');
/**
* An interface representing a file on the file system.
*
* {boolean} isFile always true (readonly)
* {boolean} isDirectory always false (readonly)
* {DOMString} name of the file, excluding the path leading to it (readonly)
* {DOMString} fullPath the absolute full path to the file (readonly)
* {FileSystem} filesystem on which the file resides (readonly)
*/
var FileEntry = function (name, fullPath, fileSystem, nativeURL) {
// remove trailing slash if it is present
if (fullPath && /\/$/.test(fullPath)) {
fullPath = fullPath.substring(0, fullPath.length - 1);
}
if (nativeURL && /\/$/.test(nativeURL)) {
nativeURL = nativeURL.substring(0, nativeURL.length - 1);
}
FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath, fileSystem, nativeURL]);
};
utils.extend(FileEntry, Entry);
/**
* Creates a new FileWriter associated with the file that this FileEntry represents.
*
* @param {Function} successCallback is called with the new FileWriter
* @param {Function} errorCallback is called with a FileError
*/
FileEntry.prototype.createWriter = function (successCallback, errorCallback) {
this.file(function (filePointer) {
var writer = new FileWriter(filePointer);
if (writer.localURL === null || writer.localURL === '') {
if (errorCallback) {
errorCallback(new FileError(FileError.INVALID_STATE_ERR));
}
} else {
if (successCallback) {
successCallback(writer);
}
}
}, errorCallback);
};
/**
* Returns a File that represents the current state of the file that this FileEntry represents.
*
* @param {Function} successCallback is called with the new File object
* @param {Function} errorCallback is called with a FileError
*/
FileEntry.prototype.file = function (successCallback, errorCallback) {
var localURL = this.toInternalURL();
var win = successCallback && function (f) {
var file = new File(f.name, localURL, f.type, f.lastModifiedDate, f.size);
successCallback(file);
};
var fail = errorCallback && function (code) {
errorCallback(new FileError(code));
};
exec(win, fail, 'File', 'getFileMetadata', [localURL]);
};
module.exports = FileEntry;
});
@@ -0,0 +1,49 @@
cordova.define("cordova-plugin-file.FileError", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* FileError
*/
function FileError (error) {
this.code = error || null;
}
// File error codes
// Found in DOMException
FileError.NOT_FOUND_ERR = 1;
FileError.SECURITY_ERR = 2;
FileError.ABORT_ERR = 3;
// Added by File API specification
FileError.NOT_READABLE_ERR = 4;
FileError.ENCODING_ERR = 5;
FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
FileError.INVALID_STATE_ERR = 7;
FileError.SYNTAX_ERR = 8;
FileError.INVALID_MODIFICATION_ERR = 9;
FileError.QUOTA_EXCEEDED_ERR = 10;
FileError.TYPE_MISMATCH_ERR = 11;
FileError.PATH_EXISTS_ERR = 12;
module.exports = FileError;
});
@@ -0,0 +1,301 @@
cordova.define("cordova-plugin-file.FileReader", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require('cordova/exec');
var modulemapper = require('cordova/modulemapper');
var utils = require('cordova/utils');
var FileError = require('./FileError');
var ProgressEvent = require('./ProgressEvent');
var origFileReader = modulemapper.getOriginalSymbol(window, 'FileReader');
/**
* This class reads the mobile device file system.
*
* For Android:
* The root directory is the root of the file system.
* To read from the SD card, the file name is "sdcard/my_file.txt"
* @constructor
*/
var FileReader = function () {
this._readyState = 0;
this._error = null;
this._result = null;
this._progress = null;
this._localURL = '';
this._realReader = origFileReader ? new origFileReader() : {}; // eslint-disable-line new-cap
};
/**
* Defines the maximum size to read at a time via the native API. The default value is a compromise between
* minimizing the overhead of many exec() calls while still reporting progress frequently enough for large files.
* (Note attempts to allocate more than a few MB of contiguous memory on the native side are likely to cause
* OOM exceptions, while the JS engine seems to have fewer problems managing large strings or ArrayBuffers.)
*/
FileReader.READ_CHUNK_SIZE = 256 * 1024;
// States
FileReader.EMPTY = 0;
FileReader.LOADING = 1;
FileReader.DONE = 2;
utils.defineGetter(FileReader.prototype, 'readyState', function () {
return this._localURL ? this._readyState : this._realReader.readyState;
});
utils.defineGetter(FileReader.prototype, 'error', function () {
return this._localURL ? this._error : this._realReader.error;
});
utils.defineGetter(FileReader.prototype, 'result', function () {
return this._localURL ? this._result : this._realReader.result;
});
function defineEvent (eventName) {
utils.defineGetterSetter(FileReader.prototype, eventName, function () {
return this._realReader[eventName] || null;
}, function (value) {
this._realReader[eventName] = value;
});
}
defineEvent('onloadstart'); // When the read starts.
defineEvent('onprogress'); // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
defineEvent('onload'); // When the read has successfully completed.
defineEvent('onerror'); // When the read has failed (see errors).
defineEvent('onloadend'); // When the request has completed (either in success or failure).
defineEvent('onabort'); // When the read has been aborted. For instance, by invoking the abort() method.
function initRead (reader, file) {
// Already loading something
if (reader.readyState === FileReader.LOADING) {
throw new FileError(FileError.INVALID_STATE_ERR);
}
reader._result = null;
reader._error = null;
reader._progress = 0;
reader._readyState = FileReader.LOADING;
if (typeof file.localURL === 'string') {
reader._localURL = file.localURL;
} else {
reader._localURL = '';
return true;
}
if (reader.onloadstart) {
reader.onloadstart(new ProgressEvent('loadstart', {target: reader}));
}
}
/**
* Callback used by the following read* functions to handle incremental or final success.
* Must be bound to the FileReader's this along with all but the last parameter,
* e.g. readSuccessCallback.bind(this, "readAsText", "UTF-8", offset, totalSize, accumulate)
* @param readType The name of the read function to call.
* @param encoding Text encoding, or null if this is not a text type read.
* @param offset Starting offset of the read.
* @param totalSize Total number of bytes or chars to read.
* @param accumulate A function that takes the callback result and accumulates it in this._result.
* @param r Callback result returned by the last read exec() call, or null to begin reading.
*/
function readSuccessCallback (readType, encoding, offset, totalSize, accumulate, r) {
if (this._readyState === FileReader.DONE) {
return;
}
var CHUNK_SIZE = FileReader.READ_CHUNK_SIZE;
if (readType === 'readAsDataURL') {
// Windows proxy does not support reading file slices as Data URLs
// so read the whole file at once.
CHUNK_SIZE = cordova.platformId === 'windows' ? totalSize : // eslint-disable-line no-undef
// Calculate new chunk size for data URLs to be multiply of 3
// Otherwise concatenated base64 chunks won't be valid base64 data
FileReader.READ_CHUNK_SIZE - (FileReader.READ_CHUNK_SIZE % 3) + 3;
}
if (typeof r !== 'undefined') {
accumulate(r);
this._progress = Math.min(this._progress + CHUNK_SIZE, totalSize);
if (typeof this.onprogress === 'function') {
this.onprogress(new ProgressEvent('progress', {loaded: this._progress, total: totalSize}));
}
}
if (typeof r === 'undefined' || this._progress < totalSize) {
var execArgs = [
this._localURL,
offset + this._progress,
offset + this._progress + Math.min(totalSize - this._progress, CHUNK_SIZE)];
if (encoding) {
execArgs.splice(1, 0, encoding);
}
exec(
readSuccessCallback.bind(this, readType, encoding, offset, totalSize, accumulate),
readFailureCallback.bind(this),
'File', readType, execArgs);
} else {
this._readyState = FileReader.DONE;
if (typeof this.onload === 'function') {
this.onload(new ProgressEvent('load', {target: this}));
}
if (typeof this.onloadend === 'function') {
this.onloadend(new ProgressEvent('loadend', {target: this}));
}
}
}
/**
* Callback used by the following read* functions to handle errors.
* Must be bound to the FileReader's this, e.g. readFailureCallback.bind(this)
*/
function readFailureCallback (e) {
if (this._readyState === FileReader.DONE) {
return;
}
this._readyState = FileReader.DONE;
this._result = null;
this._error = new FileError(e);
if (typeof this.onerror === 'function') {
this.onerror(new ProgressEvent('error', {target: this}));
}
if (typeof this.onloadend === 'function') {
this.onloadend(new ProgressEvent('loadend', {target: this}));
}
}
/**
* Abort reading file.
*/
FileReader.prototype.abort = function () {
if (origFileReader && !this._localURL) {
return this._realReader.abort();
}
this._result = null;
if (this._readyState === FileReader.DONE || this._readyState === FileReader.EMPTY) {
return;
}
this._readyState = FileReader.DONE;
// If abort callback
if (typeof this.onabort === 'function') {
this.onabort(new ProgressEvent('abort', {target: this}));
}
// If load end callback
if (typeof this.onloadend === 'function') {
this.onloadend(new ProgressEvent('loadend', {target: this}));
}
};
/**
* Read text file.
*
* @param file {File} File object containing file properties
* @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
*/
FileReader.prototype.readAsText = function (file, encoding) {
if (initRead(this, file)) {
return this._realReader.readAsText(file, encoding);
}
// Default encoding is UTF-8
var enc = encoding || 'UTF-8';
var totalSize = file.end - file.start;
readSuccessCallback.bind(this)('readAsText', enc, file.start, totalSize, function (r) {
if (this._progress === 0) {
this._result = '';
}
this._result += r;
}.bind(this));
};
/**
* Read file and return data as a base64 encoded data url.
* A data url is of the form:
* data:[<mediatype>][;base64],<data>
*
* @param file {File} File object containing file properties
*/
FileReader.prototype.readAsDataURL = function (file) {
if (initRead(this, file)) {
return this._realReader.readAsDataURL(file);
}
var totalSize = file.end - file.start;
readSuccessCallback.bind(this)('readAsDataURL', null, file.start, totalSize, function (r) {
var commaIndex = r.indexOf(',');
if (this._progress === 0) {
this._result = r;
} else {
this._result += r.substring(commaIndex + 1);
}
}.bind(this));
};
/**
* Read file and return data as a binary data.
*
* @param file {File} File object containing file properties
*/
FileReader.prototype.readAsBinaryString = function (file) {
if (initRead(this, file)) {
return this._realReader.readAsBinaryString(file);
}
var totalSize = file.end - file.start;
readSuccessCallback.bind(this)('readAsBinaryString', null, file.start, totalSize, function (r) {
if (this._progress === 0) {
this._result = '';
}
this._result += r;
}.bind(this));
};
/**
* Read file and return data as a binary data.
*
* @param file {File} File object containing file properties
*/
FileReader.prototype.readAsArrayBuffer = function (file) {
if (initRead(this, file)) {
return this._realReader.readAsArrayBuffer(file);
}
var totalSize = file.end - file.start;
readSuccessCallback.bind(this)('readAsArrayBuffer', null, file.start, totalSize, function (r) {
var resultArray = (this._progress === 0 ? new Uint8Array(totalSize) : new Uint8Array(this._result));
resultArray.set(new Uint8Array(r), this._progress);
this._result = resultArray.buffer;
}.bind(this));
};
module.exports = FileReader;
});
@@ -0,0 +1,58 @@
cordova.define("cordova-plugin-file.FileSystem", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var DirectoryEntry = require('./DirectoryEntry');
/**
* An interface representing a file system
*
* @constructor
* {DOMString} name the unique name of the file system (readonly)
* {DirectoryEntry} root directory of the file system (readonly)
*/
var FileSystem = function (name, root) {
this.name = name;
if (root) {
this.root = new DirectoryEntry(root.name, root.fullPath, this, root.nativeURL);
} else {
this.root = new DirectoryEntry(this.name, '/', this);
}
};
FileSystem.prototype.__format__ = function (fullPath, nativeUrl) {
return fullPath;
};
FileSystem.prototype.toJSON = function () {
return '<FileSystem: ' + this.name + '>';
};
// Use instead of encodeURI() when encoding just the path part of a URI rather than an entire URI.
FileSystem.encodeURIPath = function (path) {
// Because # is a valid filename character, it must be encoded to prevent part of the
// path from being parsed as a URI fragment.
return encodeURI(path).replace(/#/g, '%23');
};
module.exports = FileSystem;
});
@@ -0,0 +1,44 @@
cordova.define("cordova-plugin-file.FileUploadOptions", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Options to customize the HTTP request used to upload files.
* @constructor
* @param fileKey {String} Name of file request parameter.
* @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
* @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
* @param params {Object} Object with key: value params to send to the server.
* @param headers {Object} Keys are header names, values are header values. Multiple
* headers of the same name are not supported.
*/
var FileUploadOptions = function (fileKey, fileName, mimeType, params, headers, httpMethod) {
this.fileKey = fileKey || null;
this.fileName = fileName || null;
this.mimeType = mimeType || null;
this.params = params || null;
this.headers = headers || null;
this.httpMethod = httpMethod || null;
};
module.exports = FileUploadOptions;
});
@@ -0,0 +1,33 @@
cordova.define("cordova-plugin-file.FileUploadResult", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* FileUploadResult
* @constructor
*/
module.exports = function FileUploadResult (size, code, content) {
this.bytesSent = size;
this.responseCode = code;
this.response = content;
};
});
@@ -0,0 +1,328 @@
cordova.define("cordova-plugin-file.FileWriter", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require('cordova/exec');
var FileError = require('./FileError');
var FileReader = require('./FileReader');
var ProgressEvent = require('./ProgressEvent');
/**
* This class writes to the mobile device file system.
*
* For Android:
* The root directory is the root of the file system.
* To write to the SD card, the file name is "sdcard/my_file.txt"
*
* @constructor
* @param file {File} File object containing file properties
* @param append if true write to the end of the file, otherwise overwrite the file
*/
var FileWriter = function (file) {
this.fileName = '';
this.length = 0;
if (file) {
this.localURL = file.localURL || file;
this.length = file.size || 0;
}
// default is to write at the beginning of the file
this.position = 0;
this.readyState = 0; // EMPTY
this.result = null;
// Error
this.error = null;
// Event handlers
this.onwritestart = null; // When writing starts
this.onprogress = null; // While writing the file, and reporting partial file data
this.onwrite = null; // When the write has successfully completed.
this.onwriteend = null; // When the request has completed (either in success or failure).
this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
this.onerror = null; // When the write has failed (see errors).
};
// States
FileWriter.INIT = 0;
FileWriter.WRITING = 1;
FileWriter.DONE = 2;
/**
* Abort writing file.
*/
FileWriter.prototype.abort = function () {
// check for invalid state
if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
throw new FileError(FileError.INVALID_STATE_ERR);
}
// set error
this.error = new FileError(FileError.ABORT_ERR);
this.readyState = FileWriter.DONE;
// If abort callback
if (typeof this.onabort === 'function') {
this.onabort(new ProgressEvent('abort', {'target': this}));
}
// If write end callback
if (typeof this.onwriteend === 'function') {
this.onwriteend(new ProgressEvent('writeend', {'target': this}));
}
};
/**
* Writes data to the file
*
* @param data text or blob to be written
* @param isPendingBlobReadResult {Boolean} true if the data is the pending blob read operation result
*/
FileWriter.prototype.write = function (data, isPendingBlobReadResult) {
var that = this;
var supportsBinary = (typeof window.Blob !== 'undefined' && typeof window.ArrayBuffer !== 'undefined');
/* eslint-disable no-undef */
var isProxySupportBlobNatively = (cordova.platformId === 'windows8' || cordova.platformId === 'windows');
var isBinary;
// Check to see if the incoming data is a blob
if (data instanceof File || (!isProxySupportBlobNatively && supportsBinary && data instanceof Blob)) {
var fileReader = new FileReader();
/* eslint-enable no-undef */
fileReader.onload = function () {
// Call this method again, with the arraybuffer as argument
FileWriter.prototype.write.call(that, this.result, true /* isPendingBlobReadResult */);
};
fileReader.onerror = function () {
// DONE state
that.readyState = FileWriter.DONE;
// Save error
that.error = this.error;
// If onerror callback
if (typeof that.onerror === 'function') {
that.onerror(new ProgressEvent('error', {'target': that}));
}
// If onwriteend callback
if (typeof that.onwriteend === 'function') {
that.onwriteend(new ProgressEvent('writeend', {'target': that}));
}
};
// WRITING state
this.readyState = FileWriter.WRITING;
if (supportsBinary) {
fileReader.readAsArrayBuffer(data);
} else {
fileReader.readAsText(data);
}
return;
}
// Mark data type for safer transport over the binary bridge
isBinary = supportsBinary && (data instanceof ArrayBuffer);
if (isBinary && cordova.platformId === 'windowsphone') { // eslint-disable-line no-undef
// create a plain array, using the keys from the Uint8Array view so that we can serialize it
data = Array.apply(null, new Uint8Array(data));
}
// Throw an exception if we are already writing a file
if (this.readyState === FileWriter.WRITING && !isPendingBlobReadResult) {
throw new FileError(FileError.INVALID_STATE_ERR);
}
// WRITING state
this.readyState = FileWriter.WRITING;
var me = this;
// If onwritestart callback
if (typeof me.onwritestart === 'function') {
me.onwritestart(new ProgressEvent('writestart', {'target': me}));
}
// Write file
exec(
// Success callback
function (r) {
// If DONE (cancelled), then don't do anything
if (me.readyState === FileWriter.DONE) {
return;
}
// position always increases by bytes written because file would be extended
me.position += r;
// The length of the file is now where we are done writing.
me.length = me.position;
// DONE state
me.readyState = FileWriter.DONE;
// If onwrite callback
if (typeof me.onwrite === 'function') {
me.onwrite(new ProgressEvent('write', {'target': me}));
}
// If onwriteend callback
if (typeof me.onwriteend === 'function') {
me.onwriteend(new ProgressEvent('writeend', {'target': me}));
}
},
// Error callback
function (e) {
// If DONE (cancelled), then don't do anything
if (me.readyState === FileWriter.DONE) {
return;
}
// DONE state
me.readyState = FileWriter.DONE;
// Save error
me.error = new FileError(e);
// If onerror callback
if (typeof me.onerror === 'function') {
me.onerror(new ProgressEvent('error', {'target': me}));
}
// If onwriteend callback
if (typeof me.onwriteend === 'function') {
me.onwriteend(new ProgressEvent('writeend', {'target': me}));
}
}, 'File', 'write', [this.localURL, data, this.position, isBinary]);
};
/**
* Moves the file pointer to the location specified.
*
* If the offset is a negative number the position of the file
* pointer is rewound. If the offset is greater than the file
* size the position is set to the end of the file.
*
* @param offset is the location to move the file pointer to.
*/
FileWriter.prototype.seek = function (offset) {
// Throw an exception if we are already writing a file
if (this.readyState === FileWriter.WRITING) {
throw new FileError(FileError.INVALID_STATE_ERR);
}
if (!offset && offset !== 0) {
return;
}
// See back from end of file.
if (offset < 0) {
this.position = Math.max(offset + this.length, 0);
// Offset is bigger than file size so set position
// to the end of the file.
} else if (offset > this.length) {
this.position = this.length;
// Offset is between 0 and file size so set the position
// to start writing.
} else {
this.position = offset;
}
};
/**
* Truncates the file to the size specified.
*
* @param size to chop the file at.
*/
FileWriter.prototype.truncate = function (size) {
// Throw an exception if we are already writing a file
if (this.readyState === FileWriter.WRITING) {
throw new FileError(FileError.INVALID_STATE_ERR);
}
// WRITING state
this.readyState = FileWriter.WRITING;
var me = this;
// If onwritestart callback
if (typeof me.onwritestart === 'function') {
me.onwritestart(new ProgressEvent('writestart', {'target': this}));
}
// Write file
exec(
// Success callback
function (r) {
// If DONE (cancelled), then don't do anything
if (me.readyState === FileWriter.DONE) {
return;
}
// DONE state
me.readyState = FileWriter.DONE;
// Update the length of the file
me.length = r;
me.position = Math.min(me.position, r);
// If onwrite callback
if (typeof me.onwrite === 'function') {
me.onwrite(new ProgressEvent('write', {'target': me}));
}
// If onwriteend callback
if (typeof me.onwriteend === 'function') {
me.onwriteend(new ProgressEvent('writeend', {'target': me}));
}
},
// Error callback
function (e) {
// If DONE (cancelled), then don't do anything
if (me.readyState === FileWriter.DONE) {
return;
}
// DONE state
me.readyState = FileWriter.DONE;
// Save error
me.error = new FileError(e);
// If onerror callback
if (typeof me.onerror === 'function') {
me.onerror(new ProgressEvent('error', {'target': me}));
}
// If onwriteend callback
if (typeof me.onwriteend === 'function') {
me.onwriteend(new ProgressEvent('writeend', {'target': me}));
}
}, 'File', 'truncate', [this.localURL, size]);
};
module.exports = FileWriter;
});
@@ -0,0 +1,39 @@
cordova.define("cordova-plugin-file.Flags", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Supplies arguments to methods that lookup or create files and directories.
*
* @param create
* {boolean} file or directory if it doesn't exist
* @param exclusive
* {boolean} used with create; if true the command will fail if
* target path exists
*/
function Flags (create, exclusive) {
this.create = create || false;
this.exclusive = exclusive || false;
}
module.exports = Flags;
});
@@ -0,0 +1,26 @@
cordova.define("cordova-plugin-file.LocalFileSystem", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
exports.TEMPORARY = 0;
exports.PERSISTENT = 1;
});
@@ -0,0 +1,43 @@
cordova.define("cordova-plugin-file.Metadata", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Information about the state of the file or directory
*
* {Date} modificationTime (readonly)
*/
var Metadata = function (metadata) {
if (typeof metadata === 'object') {
this.modificationTime = new Date(metadata.modificationTime);
this.size = metadata.size || 0;
} else if (typeof metadata === 'undefined') {
this.modificationTime = null;
this.size = 0;
} else {
/* Backwards compatiblity with platforms that only return a timestamp */
this.modificationTime = new Date(metadata);
}
};
module.exports = Metadata;
});
@@ -0,0 +1,70 @@
cordova.define("cordova-plugin-file.ProgressEvent", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
// If ProgressEvent exists in global context, use it already, otherwise use our own polyfill
// Feature test: See if we can instantiate a native ProgressEvent;
// if so, use that approach,
// otherwise fill-in with our own implementation.
//
// NOTE: right now we always fill in with our own. Down the road would be nice if we can use whatever is native in the webview.
var ProgressEvent = (function () {
/*
var createEvent = function(data) {
var event = document.createEvent('Events');
event.initEvent('ProgressEvent', false, false);
if (data) {
for (var i in data) {
if (data.hasOwnProperty(i)) {
event[i] = data[i];
}
}
if (data.target) {
// TODO: cannot call <some_custom_object>.dispatchEvent
// need to first figure out how to implement EventTarget
}
}
return event;
};
try {
var ev = createEvent({type:"abort",target:document});
return function ProgressEvent(type, data) {
data.type = type;
return createEvent(data);
};
} catch(e){
*/
return function ProgressEvent (type, dict) {
this.type = type;
this.bubbles = false;
this.cancelBubble = false;
this.cancelable = false;
this.lengthComputable = false;
this.loaded = dict && dict.loaded ? dict.loaded : 0;
this.total = dict && dict.total ? dict.total : 0;
this.target = dict && dict.target ? dict.target : null;
};
// }
})();
module.exports = ProgressEvent;
});
@@ -0,0 +1,29 @@
cordova.define("cordova-plugin-file.isChrome", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
module.exports = function () {
// window.webkitRequestFileSystem and window.webkitResolveLocalFileSystemURL are available only in Chrome and
// possibly a good flag to indicate that we're running in Chrome
return window.webkitRequestFileSystem && window.webkitResolveLocalFileSystemURL;
};
});
@@ -0,0 +1,65 @@
cordova.define("cordova-plugin-file.fileSystemPaths", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require('cordova/exec');
var channel = require('cordova/channel');
exports.file = {
// Read-only directory where the application is installed.
applicationDirectory: null,
// Root of app's private writable storage
applicationStorageDirectory: null,
// Where to put app-specific data files.
dataDirectory: null,
// Cached files that should survive app restarts.
// Apps should not rely on the OS to delete files in here.
cacheDirectory: null,
// Android: the application space on external storage.
externalApplicationStorageDirectory: null,
// Android: Where to put app-specific data files on external storage.
externalDataDirectory: null,
// Android: the application cache on external storage.
externalCacheDirectory: null,
// Android: the external storage (SD card) root.
externalRootDirectory: null,
// iOS: Temp directory that the OS can clear at will.
tempDirectory: null,
// iOS: Holds app-specific files that should be synced (e.g. to iCloud).
syncedDataDirectory: null,
// iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files)
documentsDirectory: null,
// BlackBerry10: Files globally available to all apps
sharedDirectory: null
};
channel.waitForInitialization('onFileSystemPathsReady');
channel.onCordovaReady.subscribe(function () {
function after (paths) {
for (var k in paths) {
exports.file[k] = paths[k];
}
channel.initializationComplete('onFileSystemPathsReady');
}
exec(after, null, 'File', 'requestAllPaths', []);
});
});
@@ -0,0 +1,49 @@
cordova.define("cordova-plugin-file.fileSystems-roots", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
// Map of fsName -> FileSystem.
var fsMap = null;
var FileSystem = require('./FileSystem');
var exec = require('cordova/exec');
// Overridden by Android, BlackBerry 10 and iOS to populate fsMap.
require('./fileSystems').getFs = function (name, callback) {
function success (response) {
fsMap = {};
for (var i = 0; i < response.length; ++i) {
var fsRoot = response[i];
if (fsRoot) {
var fs = new FileSystem(fsRoot.filesystemName, fsRoot);
fsMap[fs.name] = fs;
}
}
callback(fsMap[name]);
}
if (fsMap) {
callback(fsMap[name]);
} else {
exec(success, null, 'File', 'requestAllFileSystems', []);
}
};
});
@@ -0,0 +1,28 @@
cordova.define("cordova-plugin-file.fileSystems", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
// Overridden by Android, BlackBerry 10 and iOS to populate fsMap.
module.exports.getFs = function (name, callback) {
callback(null);
};
});
@@ -0,0 +1,32 @@
cordova.define("cordova-plugin-file.iosFileSystem", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/* eslint no-undef : 0 */
FILESYSTEM_PROTOCOL = 'cdvfile';
module.exports = {
__format__: function (fullPath) {
var path = ('/' + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath)).replace('//', '/');
return FILESYSTEM_PROTOCOL + '://localhost' + path;
}
};
});
@@ -0,0 +1,84 @@
cordova.define("cordova-plugin-file.requestFileSystem", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
(function () {
// For browser platform: not all browsers use this file.
function checkBrowser () {
if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef
module.exports = window.requestFileSystem || window.webkitRequestFileSystem;
return true;
}
return false;
}
if (checkBrowser()) {
return;
}
var argscheck = require('cordova/argscheck');
var FileError = require('./FileError');
var FileSystem = require('./FileSystem');
var exec = require('cordova/exec');
var fileSystems = require('./fileSystems');
/**
* Request a file system in which to store application data.
* @param type local file system type
* @param size indicates how much storage space, in bytes, the application expects to need
* @param successCallback invoked with a FileSystem object
* @param errorCallback invoked if error occurs retrieving file system
*/
var requestFileSystem = function (type, size, successCallback, errorCallback) {
argscheck.checkArgs('nnFF', 'requestFileSystem', arguments);
var fail = function (code) {
if (errorCallback) {
errorCallback(new FileError(code));
}
};
if (type < 0) {
fail(FileError.SYNTAX_ERR);
} else {
// if successful, return a FileSystem object
var success = function (file_system) {
if (file_system) {
if (successCallback) {
fileSystems.getFs(file_system.name, function (fs) {
// This should happen only on platforms that haven't implemented requestAllFileSystems (windows)
if (!fs) {
fs = new FileSystem(file_system.name, file_system.root);
}
successCallback(fs);
});
}
} else {
// no FileSystem object returned
fail(FileError.NOT_FOUND_ERR);
}
};
exec(success, fail, 'File', 'requestFileSystem', [type, size]);
}
};
module.exports = requestFileSystem;
})();
});
@@ -0,0 +1,94 @@
cordova.define("cordova-plugin-file.resolveLocalFileSystemURI", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
(function () {
// For browser platform: not all browsers use overrided `resolveLocalFileSystemURL`.
function checkBrowser () {
if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef
module.exports.resolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL;
return true;
}
return false;
}
if (checkBrowser()) {
return;
}
var argscheck = require('cordova/argscheck');
var DirectoryEntry = require('./DirectoryEntry');
var FileEntry = require('./FileEntry');
var FileError = require('./FileError');
var exec = require('cordova/exec');
var fileSystems = require('./fileSystems');
/**
* Look up file system Entry referred to by local URI.
* @param {DOMString} uri URI referring to a local file or directory
* @param successCallback invoked with Entry object corresponding to URI
* @param errorCallback invoked if error occurs retrieving file system entry
*/
module.exports.resolveLocalFileSystemURL = module.exports.resolveLocalFileSystemURL || function (uri, successCallback, errorCallback) {
argscheck.checkArgs('sFF', 'resolveLocalFileSystemURI', arguments);
// error callback
var fail = function (error) {
if (errorCallback) {
errorCallback(new FileError(error));
}
};
// sanity check for 'not:valid:filename' or '/not:valid:filename'
// file.spec.12 window.resolveLocalFileSystemURI should error (ENCODING_ERR) when resolving invalid URI with leading /.
if (!uri || uri.split(':').length > 2) {
setTimeout(function () {
fail(FileError.ENCODING_ERR);
}, 0);
return;
}
// if successful, return either a file or directory entry
var success = function (entry) {
if (entry) {
if (successCallback) {
// create appropriate Entry object
var fsName = entry.filesystemName || (entry.filesystem && entry.filesystem.name) || (entry.filesystem === window.PERSISTENT ? 'persistent' : 'temporary'); // eslint-disable-line no-undef
fileSystems.getFs(fsName, function (fs) {
// This should happen only on platforms that haven't implemented requestAllFileSystems (windows)
if (!fs) {
fs = new FileSystem(fsName, {name: '', fullPath: '/'}); // eslint-disable-line no-undef
}
var result = (entry.isDirectory) ? new DirectoryEntry(entry.name, entry.fullPath, fs, entry.nativeURL) : new FileEntry(entry.name, entry.fullPath, fs, entry.nativeURL);
successCallback(result);
});
}
} else {
// no Entry object returned
fail(FileError.NOT_FOUND_ERR);
}
};
exec(success, fail, 'File', 'resolveLocalFileSystemURI', [uri]);
};
module.exports.resolveLocalFileSystemURI = function () {
console.log('resolveLocalFileSystemURI is deprecated. Please call resolveLocalFileSystemURL instead.');
module.exports.resolveLocalFileSystemURL.apply(this, arguments);
};
})();
});
@@ -0,0 +1,70 @@
cordova.define("cordova-plugin-fingerprint-aio.Fingerprint", function(require, exports, module) {
/*global cordova */
var Fingerprint = function() {
};
// Plugin Errors
Fingerprint.prototype.BIOMETRIC_UNKNOWN_ERROR = -100;
Fingerprint.prototype.BIOMETRIC_UNAVAILABLE = -101;
Fingerprint.prototype.BIOMETRIC_AUTHENTICATION_FAILED = -102;
Fingerprint.prototype.BIOMETRIC_SDK_NOT_SUPPORTED = -103;
Fingerprint.prototype.BIOMETRIC_HARDWARE_NOT_SUPPORTED = -104;
Fingerprint.prototype.BIOMETRIC_PERMISSION_NOT_GRANTED = -105;
Fingerprint.prototype.BIOMETRIC_NOT_ENROLLED = -106;
Fingerprint.prototype.BIOMETRIC_INTERNAL_PLUGIN_ERROR = -107;
Fingerprint.prototype.BIOMETRIC_DISMISSED = -108;
Fingerprint.prototype.BIOMETRIC_PIN_OR_PATTERN_DISMISSED = -109;
Fingerprint.prototype.BIOMETRIC_SCREEN_GUARD_UNSECURED = -110;
Fingerprint.prototype.BIOMETRIC_LOCKED_OUT = -111;
Fingerprint.prototype.BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
Fingerprint.prototype.BIOMETRIC_NO_SECRET_FOUND = -113;
// Biometric types
Fingerprint.prototype.BIOMETRIC_TYPE_FINGERPRINT = "finger";
Fingerprint.prototype.BIOMETRIC_TYPE_FACE = "face";
Fingerprint.prototype.BIOMETRIC_TYPE_COMMON = "biometric";
Fingerprint.prototype.show = function (params, successCallback, errorCallback) {
cordova.exec(
successCallback,
errorCallback,
"Fingerprint",
"authenticate",
[params]
);
};
Fingerprint.prototype.isAvailable = function (successCallback, errorCallback, optionalParams) {
cordova.exec(
successCallback,
errorCallback,
"Fingerprint",
"isAvailable",
[optionalParams]
);
};
Fingerprint.prototype.registerBiometricSecret = function (params, successCallback, errorCallback) {
cordova.exec(
successCallback,
errorCallback,
"Fingerprint",
"registerBiometricSecret",
[params]
);
};
Fingerprint.prototype.loadBiometricSecret = function (params, successCallback, errorCallback) {
cordova.exec(
successCallback,
errorCallback,
"Fingerprint",
"loadBiometricSecret",
[params]
);
};
module.exports = new Fingerprint();
});
@@ -0,0 +1,43 @@
cordova.define("cordova-plugin-globalization.GlobalizationError", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Globalization error object
*
* @constructor
* @param code
* @param message
*/
var GlobalizationError = function (code, message) {
this.code = code || null;
this.message = message || '';
};
// Globalization error codes
GlobalizationError.UNKNOWN_ERROR = 0;
GlobalizationError.FORMATTING_ERROR = 1;
GlobalizationError.PARSING_ERROR = 2;
GlobalizationError.PATTERN_ERROR = 3;
module.exports = GlobalizationError;
});
@@ -0,0 +1,388 @@
cordova.define("cordova-plugin-globalization.globalization", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var argscheck = require('cordova/argscheck');
var exec = require('cordova/exec');
var globalization = {
/**
* Returns the string identifier for the client's current language.
* It returns the language identifier string to the successCB callback with a
* properties object as a parameter. If there is an error getting the language,
* then the errorCB callback is invoked.
*
* @param {Function} successCB
* @param {Function} errorCB
*
* @return Object.value {String}: The language identifier
*
* @error GlobalizationError.UNKNOWN_ERROR
*
* Example
* globalization.getPreferredLanguage(function (language) {alert('language:' + language.value + '\n');},
* function () {});
*/
getPreferredLanguage: function (successCB, failureCB) {
argscheck.checkArgs('fF', 'Globalization.getPreferredLanguage', arguments);
exec(successCB, failureCB, 'Globalization', 'getPreferredLanguage', []);
},
/**
* Returns the string identifier for the client's current locale setting.
* It returns the locale identifier string to the successCB callback with a
* properties object as a parameter. If there is an error getting the locale,
* then the errorCB callback is invoked.
*
* @param {Function} successCB
* @param {Function} errorCB
*
* @return Object.value {String}: The locale identifier
*
* @error GlobalizationError.UNKNOWN_ERROR
*
* Example
* globalization.getLocaleName(function (locale) {alert('locale:' + locale.value + '\n');},
* function () {});
*/
getLocaleName: function (successCB, failureCB) {
argscheck.checkArgs('fF', 'Globalization.getLocaleName', arguments);
exec(successCB, failureCB, 'Globalization', 'getLocaleName', []);
},
/**
* Returns a date formatted as a string according to the client's user preferences and
* calendar using the time zone of the client. It returns the formatted date string to the
* successCB callback with a properties object as a parameter. If there is an error
* formatting the date, then the errorCB callback is invoked.
*
* The defaults are: formatLenght="short" and selector="date and time"
*
* @param {Date} date
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* formatLength {String}: 'short', 'medium', 'long', or 'full'
* selector {String}: 'date', 'time', or 'date and time'
*
* @return Object.value {String}: The localized date string
*
* @error GlobalizationError.FORMATTING_ERROR
*
* Example
* globalization.dateToString(new Date(),
* function (date) {alert('date:' + date.value + '\n');},
* function (errorCode) {alert(errorCode);},
* {formatLength:'short'});
*/
dateToString: function (date, successCB, failureCB, options) {
argscheck.checkArgs('dfFO', 'Globalization.dateToString', arguments);
var dateValue = date.valueOf();
exec(successCB, failureCB, 'Globalization', 'dateToString', [{'date': dateValue, 'options': options}]);
},
/**
* Parses a date formatted as a string according to the client's user
* preferences and calendar using the time zone of the client and returns
* the corresponding date object. It returns the date to the successCB
* callback with a properties object as a parameter. If there is an error
* parsing the date string, then the errorCB callback is invoked.
*
* The defaults are: formatLength="short" and selector="date and time"
*
* @param {String} dateString
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* formatLength {String}: 'short', 'medium', 'long', or 'full'
* selector {String}: 'date', 'time', or 'date and time'
*
* @return Object.year {Number}: The four digit year
* Object.month {Number}: The month from (0 - 11)
* Object.day {Number}: The day from (1 - 31)
* Object.hour {Number}: The hour from (0 - 23)
* Object.minute {Number}: The minute from (0 - 59)
* Object.second {Number}: The second from (0 - 59)
* Object.millisecond {Number}: The milliseconds (from 0 - 999),
* not available on all platforms
*
* @error GlobalizationError.PARSING_ERROR
*
* Example
* globalization.stringToDate('4/11/2011',
* function (date) { alert('Month:' + date.month + '\n' +
* 'Day:' + date.day + '\n' +
* 'Year:' + date.year + '\n');},
* function (errorCode) {alert(errorCode);},
* {selector:'date'});
*/
stringToDate: function (dateString, successCB, failureCB, options) {
argscheck.checkArgs('sfFO', 'Globalization.stringToDate', arguments);
exec(successCB, failureCB, 'Globalization', 'stringToDate', [{'dateString': dateString, 'options': options}]);
},
/**
* Returns a pattern string for formatting and parsing dates according to the client's
* user preferences. It returns the pattern to the successCB callback with a
* properties object as a parameter. If there is an error obtaining the pattern,
* then the errorCB callback is invoked.
*
* The defaults are: formatLength="short" and selector="date and time"
*
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* formatLength {String}: 'short', 'medium', 'long', or 'full'
* selector {String}: 'date', 'time', or 'date and time'
*
* @return Object.pattern {String}: The date and time pattern for formatting and parsing dates.
* The patterns follow Unicode Technical Standard #35
* http://unicode.org/reports/tr35/tr35-4.html
* Object.timezone {String}: The abbreviated name of the time zone on the client
* Object.utc_offset {Number}: The current difference in seconds between the client's
* time zone and coordinated universal time.
* Object.dst_offset {Number}: The current daylight saving time offset in seconds
* between the client's non-daylight saving's time zone
* and the client's daylight saving's time zone.
*
* @error GlobalizationError.PATTERN_ERROR
*
* Example
* globalization.getDatePattern(
* function (date) {alert('pattern:' + date.pattern + '\n');},
* function () {},
* {formatLength:'short'});
*/
getDatePattern: function (successCB, failureCB, options) {
argscheck.checkArgs('fFO', 'Globalization.getDatePattern', arguments);
exec(successCB, failureCB, 'Globalization', 'getDatePattern', [{'options': options}]);
},
/**
* Returns an array of either the names of the months or days of the week
* according to the client's user preferences and calendar. It returns the array of names to the
* successCB callback with a properties object as a parameter. If there is an error obtaining the
* names, then the errorCB callback is invoked.
*
* The defaults are: type="wide" and item="months"
*
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* type {String}: 'narrow' or 'wide'
* item {String}: 'months', or 'days'
*
* @return Object.value {Array{String}}: The array of names starting from either
* the first month in the year or the
* first day of the week.
* @error GlobalizationError.UNKNOWN_ERROR
*
* Example
* globalization.getDateNames(function (names) {
* for(var i = 0; i < names.value.length; i++) {
* alert('Month:' + names.value[i] + '\n');}},
* function () {});
*/
getDateNames: function (successCB, failureCB, options) {
argscheck.checkArgs('fFO', 'Globalization.getDateNames', arguments);
exec(successCB, failureCB, 'Globalization', 'getDateNames', [{'options': options}]);
},
/**
* Returns whether daylight savings time is in effect for a given date using the client's
* time zone and calendar. It returns whether or not daylight savings time is in effect
* to the successCB callback with a properties object as a parameter. If there is an error
* reading the date, then the errorCB callback is invoked.
*
* @param {Date} date
* @param {Function} successCB
* @param {Function} errorCB
*
* @return Object.dst {Boolean}: The value "true" indicates that daylight savings time is
* in effect for the given date and "false" indicate that it is not.
*
* @error GlobalizationError.UNKNOWN_ERROR
*
* Example
* globalization.isDayLightSavingsTime(new Date(),
* function (date) {alert('dst:' + date.dst + '\n');}
* function () {});
*/
isDayLightSavingsTime: function (date, successCB, failureCB) {
argscheck.checkArgs('dfF', 'Globalization.isDayLightSavingsTime', arguments);
var dateValue = date.valueOf();
exec(successCB, failureCB, 'Globalization', 'isDayLightSavingsTime', [{'date': dateValue}]);
},
/**
* Returns the first day of the week according to the client's user preferences and calendar.
* The days of the week are numbered starting from 1 where 1 is considered to be Sunday.
* It returns the day to the successCB callback with a properties object as a parameter.
* If there is an error obtaining the pattern, then the errorCB callback is invoked.
*
* @param {Function} successCB
* @param {Function} errorCB
*
* @return Object.value {Number}: The number of the first day of the week.
*
* @error GlobalizationError.UNKNOWN_ERROR
*
* Example
* globalization.getFirstDayOfWeek(function (day)
* { alert('Day:' + day.value + '\n');},
* function () {});
*/
getFirstDayOfWeek: function (successCB, failureCB) {
argscheck.checkArgs('fF', 'Globalization.getFirstDayOfWeek', arguments);
exec(successCB, failureCB, 'Globalization', 'getFirstDayOfWeek', []);
},
/**
* Returns a number formatted as a string according to the client's user preferences.
* It returns the formatted number string to the successCB callback with a properties object as a
* parameter. If there is an error formatting the number, then the errorCB callback is invoked.
*
* The defaults are: type="decimal"
*
* @param {Number} number
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* type {String}: 'decimal', "percent", or 'currency'
*
* @return Object.value {String}: The formatted number string.
*
* @error GlobalizationError.FORMATTING_ERROR
*
* Example
* globalization.numberToString(3.25,
* function (number) {alert('number:' + number.value + '\n');},
* function () {},
* {type:'decimal'});
*/
numberToString: function (number, successCB, failureCB, options) {
argscheck.checkArgs('nfFO', 'Globalization.numberToString', arguments);
exec(successCB, failureCB, 'Globalization', 'numberToString', [{'number': number, 'options': options}]);
},
/**
* Parses a number formatted as a string according to the client's user preferences and
* returns the corresponding number. It returns the number to the successCB callback with a
* properties object as a parameter. If there is an error parsing the number string, then
* the errorCB callback is invoked.
*
* The defaults are: type="decimal"
*
* @param {String} numberString
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* type {String}: 'decimal', "percent", or 'currency'
*
* @return Object.value {Number}: The parsed number.
*
* @error GlobalizationError.PARSING_ERROR
*
* Example
* globalization.stringToNumber('1234.56',
* function (number) {alert('Number:' + number.value + '\n');},
* function () { alert('Error parsing number');});
*/
stringToNumber: function (numberString, successCB, failureCB, options) {
argscheck.checkArgs('sfFO', 'Globalization.stringToNumber', arguments);
exec(successCB, failureCB, 'Globalization', 'stringToNumber', [{'numberString': numberString, 'options': options}]);
},
/**
* Returns a pattern string for formatting and parsing numbers according to the client's user
* preferences. It returns the pattern to the successCB callback with a properties object as a
* parameter. If there is an error obtaining the pattern, then the errorCB callback is invoked.
*
* The defaults are: type="decimal"
*
* @param {Function} successCB
* @param {Function} errorCB
* @param {Object} options {optional}
* type {String}: 'decimal', "percent", or 'currency'
*
* @return Object.pattern {String}: The number pattern for formatting and parsing numbers.
* The patterns follow Unicode Technical Standard #35.
* http://unicode.org/reports/tr35/tr35-4.html
* Object.symbol {String}: The symbol to be used when formatting and parsing
* e.g., percent or currency symbol.
* Object.fraction {Number}: The number of fractional digits to use when parsing and
* formatting numbers.
* Object.rounding {Number}: The rounding increment to use when parsing and formatting.
* Object.positive {String}: The symbol to use for positive numbers when parsing and formatting.
* Object.negative: {String}: The symbol to use for negative numbers when parsing and formatting.
* Object.decimal: {String}: The decimal symbol to use for parsing and formatting.
* Object.grouping: {String}: The grouping symbol to use for parsing and formatting.
*
* @error GlobalizationError.PATTERN_ERROR
*
* Example
* globalization.getNumberPattern(
* function (pattern) {alert('Pattern:' + pattern.pattern + '\n');},
* function () {});
*/
getNumberPattern: function (successCB, failureCB, options) {
argscheck.checkArgs('fFO', 'Globalization.getNumberPattern', arguments);
exec(successCB, failureCB, 'Globalization', 'getNumberPattern', [{'options': options}]);
},
/**
* Returns a pattern string for formatting and parsing currency values according to the client's
* user preferences and ISO 4217 currency code. It returns the pattern to the successCB callback with a
* properties object as a parameter. If there is an error obtaining the pattern, then the errorCB
* callback is invoked.
*
* @param {String} currencyCode
* @param {Function} successCB
* @param {Function} errorCB
*
* @return Object.pattern {String}: The currency pattern for formatting and parsing currency values.
* The patterns follow Unicode Technical Standard #35
* http://unicode.org/reports/tr35/tr35-4.html
* Object.code {String}: The ISO 4217 currency code for the pattern.
* Object.fraction {Number}: The number of fractional digits to use when parsing and
* formatting currency.
* Object.rounding {Number}: The rounding increment to use when parsing and formatting.
* Object.decimal: {String}: The decimal symbol to use for parsing and formatting.
* Object.grouping: {String}: The grouping symbol to use for parsing and formatting.
*
* @error GlobalizationError.FORMATTING_ERROR
*
* Example
* globalization.getCurrencyPattern('EUR',
* function (currency) {alert('Pattern:' + currency.pattern + '\n');}
* function () {});
*/
getCurrencyPattern: function (currencyCode, successCB, failureCB) {
argscheck.checkArgs('sfF', 'Globalization.getCurrencyPattern', arguments);
exec(successCB, failureCB, 'Globalization', 'getCurrencyPattern', [{'currencyCode': currencyCode}]);
}
};
module.exports = globalization;
});
@@ -0,0 +1,100 @@
cordova.define("cordova-plugin-mfp-jsonstore.jsonstore", function(require, exports, module) {
/*
Licensed Materials - Property of IBM
(C) Copyright 2015, 2016 IBM Corp.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// {platform}/www/plugins/cordova-plugin-mfp-jsonstore/worklight
var WORKLIGHT_DIR = 'plugins/cordova-plugin-mfp-jsonstore/worklight';
//{platform}/www/plugins/cordova-plugin-mfp-jsonstore/worklight/jsonstore.js
var JSONSTORE_PATH = WORKLIGHT_DIR + '/jsonstore.js';
document.addEventListener('mfpjsloaded', loadJSONStore, false);
function loadJSONStore(){
if(typeof WL !== 'undefined' && WL._JSONStoreImpl){
//console.log('Developer is injecting scripts manually');
/*
<script src="worklight/static_app_props.js"></script>
<script src="cordova.js"></script>
<script src="worklight/wljq.js"></script>
<script src="worklight/worklight.js"></script>
<script src="worklight/checksum.js"></script>
<script src="worklight/jsonstore.js"></script>
*/
mfpjsonstoreready();
} else {
//console.log('Inject MFP JSONStore Scripts dynamically');
loadJSONStoreScript();
}
function mfpjsonstoreready(){
var wlevent;
//console.log("bootstrap.js dispatching mfpjsonjsloaded event");
try {
wlevent = new Event('mfpjsonjsloaded');
} catch (err) {
if (err instanceof TypeError) {
// Trying to use old events
wlevent = document.createEvent('Event');
wlevent.initEvent('mfpjsonjsloaded', true, true);
} else
console.error(err.message);
}
// Dispatch the event.
document.dispatchEvent(wlevent);
}
function loadJSONStoreScript(){
//console.log("injecting script jsonstore.js");
injectScript(findCordovaPath() + JSONSTORE_PATH, mfpjsonstoreready,
bootError);
}
function injectScript(url, onload, onerror) {
var script = document.createElement("script");
// onload fires even when script fails loads with an error.
script.onload = onload;
// onerror fires for malformed URLs.
script.onerror = onerror;
script.src = url;
document.head.appendChild(script);
}
function bootError(errMsg) {
throw errMsg;
}
}
function findCordovaPath() {
var path = null;
var scripts = document.getElementsByTagName('script');
var startterm = '/cordova.';
var term = '/cordova.js';
for (var n = scripts.length-1; n>-1; n--) {
var src = scripts[n].src.replace(/\?.*$/, ''); // Strip any query param (CB-6007).
// APAR 119091: findCordovaPath function to work with hashed builds.
var idx = src.indexOf(startterm);
if (idx >= 0 && src.substring(idx).replace(/cordova\.[^\.\/]*\.js/, "cordova.js") == term) {
term = src.substring(idx);
}
if (src.indexOf(term) === (src.length - term.length)) {
path = src.substring(0, src.length - term.length) + '/';
break;
}
}
return path;
}
});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,155 @@
cordova.define("cordova-plugin-mfp.mfp", function(require, exports, module) {
/*
Licensed Materials - Property of IBM
(C) Copyright 2015 IBM Corp.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var mfpreadyfired = false;
// {platform}/www/plugins/cordova-plugin-mfp/worklight
var WORKLIGHT_DIR = 'plugins/cordova-plugin-mfp/worklight';
// {platform}/www/plugins/cordova-plugin-mfp/static_app_props.js
var STATIC_APP_PROPS_PATH = WORKLIGHT_DIR + '/static_app_props.js';
// {platform}/www/plugins/cordova-plugin-mfp/static_app_props.js
var WLJQ_PATH = WORKLIGHT_DIR + '/wljq.js';
// {platform}/www/plugins/cordova-plugin-mfp/static_app_props.js
var WORKLIGHT_PATH = WORKLIGHT_DIR + '/worklight.js';
// {platform}/www/plugins/cordova-plugin-mfp/static_app_props.js
var WORKLIGHT_CHECKSUM_PATH = WORKLIGHT_DIR + '/checksum.js';
document.addEventListener('deviceready', loadMFP, false);
function loadMFP(){
if(typeof WL !== 'undefined' && WL.StaticAppProps){
//console.log('Developer is injecting scripts manually');
/*
<script src="worklight/static_app_props.js"></script>
<script src="cordova.js"></script>
<script src="worklight/wljq.js"></script>
<script src="worklight/worklight.js"></script>
<script src="worklight/checksum.js"></script>
*/
mfpready();
} else {
//console.log('Inject MFP Scripts dynamically');
loadStaticAppProps();
}
function loadStaticAppProps(){
//console.log("worklight/static_app_props.js");
injectScript(findCordovaPath() + STATIC_APP_PROPS_PATH, loadJQ,bootError);
}
function loadJQ(){
//console.log("injecting script wljq.js");
injectScript(findCordovaPath() + WLJQ_PATH, loadWorklight,bootError);
}
function loadWorklight(){
//console.log("injecting script worklight.js");
injectScript(findCordovaPath() + WORKLIGHT_PATH, loadChecksum,bootError);
}
function loadChecksum (){
//console.log("injecting script checksum.js");
injectScript(findCordovaPath() + WORKLIGHT_CHECKSUM_PATH, mfpready,bootError);
}
function mfpready (){
mfpFire();
//call WL.Client.init unless user defined mfpClientCustomInit = true in config.xml, and propagated to static_app_props.js
if(WL.StaticAppProps && !WL.StaticAppProps.mfpClientCustomInit){
console.log('Calling WL.Client.init(wlInitOptions);')
var options = typeof wlInitOptions !== 'undefined' ? wlInitOptions : {};
WL.Client.init(options);
} else {
console.log('Developer will call WL.Client.init manually');
}
//Inform developer they should load their own jquery and not use MFP internal version
deprecateWLJQ();
}
function mfpFire(){
//console.log("bootstrap.js dispatching mfpjsloaded event");
try {
var wlevent = new Event('mfpjsloaded');
}
catch (e) {
if (e instanceof TypeError) {
// Trying to use old events
wlevent = document.createEvent('Event');
wlevent.initEvent('mfpjsloaded', true, true);
}
else {
console.error(e.message);
}
}
// Dispatch the event.
document.dispatchEvent(wlevent);
mfpreadyfired = true;
}
function deprecateWLJQ(){
setTimeout(function checkWLJQ(){
if(window.$ === WLJQ){
console.error('Using WLJQ as your window.$ is deprecated, if needed, please load your own JQuery instance');
} else if(window.jQuery === WLJQ){
console.error('Using WLJQ as your window.jQuery is deprecated, if needed, please load your own JQuery instance');
}
},10000);
}
function injectScript(url, onload, onerror) {
var script = document.createElement("script");
// onload fires even when script fails loads with an error.
script.onload = onload;
// onerror fires for malformed URLs.
script.onerror = onerror;
script.src = url;
document.head.appendChild(script);
}
function bootError(){
console.error("mfp bootstrap failed to inject script");
}
}
setTimeout(function mfpTimeOut(){
if(!mfpreadyfired){
loadMFP();
}
},6000);
function findCordovaPath() {
var path = null;
var scripts = document.getElementsByTagName('script');
var startterm = '/cordova.';
var term = '/cordova.js';
for (var n = scripts.length-1; n>-1; n--) {
var src = scripts[n].src.replace(/\?.*$/, ''); // Strip any query param (CB-6007).
// APAR 119091: findCordovaPath function to work with hashed builds.
var idx = src.indexOf(startterm);
if (idx >= 0 && src.substring(idx).replace(/cordova\.[^\.\/]*\.js/, "cordova.js") == term) {
term = src.substring(idx);
}
if (src.indexOf(term) === (src.length - term.length)) {
path = src.substring(0, src.length - term.length) + '/';
break;
}
}
return path;
}
});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII user facing" ,
"accessDenied" : "Zugriff verweigert",
"authFailure" : "Beim Verarbeiten der Anforderung von der Anwendung wurde ein Fehler festgestellt.",
"applicationDenied" : "Anwendung inaktiviert",
"browserIsNotSupported" : "{0} wird momentan nicht unterstützt.",
"cancel" : "Abbrechen",
"close" : "Schließen",
"cookiesAreDisabled" : "In Ihrem Browser sind Cookies inaktiviert. Aktivieren Sie Cookies, damit die Anwendung ordnungsgemäß funktioniert.",
"copyToClipboard" : "Kopieren",
"details" : "Details",
"diagApp" : "App-Diagnose",
"diagTime" : "Zeit",
"diagApplicationName" : "Anwendungsname",
"diagApplicationVersion" : "Anwendungsversion",
"diagServiceURL" : "Service-URL",
"diagDevicePlatform" : "Geräteplattform",
"diagDeviceVersion" : "Geräteversion",
"diagScreenResolution" : "Bildschirmauflösung",
"diagAirplaneMode" : "Flugzeugmodus",
"diagUsingNetwork" : "Verwendetes Netz",
"diagWifiName" : "WiFi-Name",
"diagMobileNetworkType" : "Typ des mobilen Netzes",
"diagCarrierName" : "Name des Betreibers",
"diagErrorCode" : "Fehlercode",
"diagErrorMessage" : "Fehlernachricht",
"diagHttpStatus" : "HTTP-Status",
"diagIPAddress" : "IP-Adresse",
"directUpdateNotificationTitle" : "Aktualisierung verfügbar",
"directUpdateNotificationMessage" : "Es stehen neuere Webressourcen zur Verfügung. Für Aktualisierung bestätigen (Dateigröße: {0} MB).",
"directUpdateNotificationMessageKilobytes" : "Es stehen neuere Webressourcen zur Verfügung. Für Aktualisierung bestätigen (Dateigröße: {0} KB).",
"directUpdateErrorTitle" : "Aktualisierung fehlgeschlagen",
"directUpdateErrorMessage" : "Die direkte Aktualisierung ist fehlgeschlagen.",
"directUpdateErrorMessageNotEnoughStorage" : "Für die Anwendung steht ein Update zur Verfügung, aber es ist nicht genügend Speicherplatz auf den Gerät vorhanden (erforderlicher Speicherplatz: {0} MB, verfügbarer Speicherplatz: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Die Datei mit der Anwendungsaktualisierung konnte nicht heruntergeladen werden.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Die Datei mit der Anwendungsaktualisierung konnte nicht verarbeitet werden.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "Die App-Ressourcen können nicht heruntergeladen werden. Geben Sie in der Anzeige mit den Einstellungen die App-ID an.",
"downloadAppWebResourcesAppIdNotExist" : "Die Anwendung '{0}' wurde nicht gefunden. Implementieren Sie sie zunächst im Server der Plattform IBM MobileFirst.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "Die App-Ressourcen können nicht heruntergeladen werden. Geben Sie in der Anzeige mit den Einstellungen die App-Version an.",
"downloadAppWebResourcesSkinIsNotValid" : "Die App-Ressourcen können nicht heruntergeladen werden. Die Oberfläche {0} ist nicht vorhanden. Stellen Sie sicher, dass getSkinName() eine gültige Oberfläche ergibt.",
"downloadAppWebResourcesAppVersionNotExist" : "Anwendung '{0}' {1} für {2} nicht gefunden",
"deviceAuthenticationFail" : "Konnektivitätsfehler",
"saveCertificateFailure" : "Das Zertifikat kann nicht gespeichert werden.",
"downloadAppWebResourcesConnectionToServerUnavailable" : "Es ist keine Verbindung zum Server verfügbar. Die Anwendungsressourcen können nicht heruntergeladen werden.",
"expandWindow" : "Anwendung zur Benutzung einblenden",
"exit" : "Beenden",
"exitApplication" : "Anwendung beenden",
"error" : "Fehler",
"gadgetUpdateAvailable" : "Anwendungsaktualisierung verfügbar",
"getNewVersion" : "Neue Version abrufen",
"handleTimeOut" : "Zeitlimitüberschreitung bei der Anforderung für {0}. Stellen Sie sicher, dass die Hostadresse für die Anwendung verfügbar ist (besonders für Android- und iPhone-Apps).",
"invalidUsernamePassword" : "Ungültiger Benutzername oder ungültiges Kennwort",
"keepAliveInBackgroundText" : "Anwendung wird im Hintergrund weiter ausgeführt",
"loading" : "Ladevorgang",
"login" : "Anmeldung",
"minimize" : "Symbolgröße",
"missingFeatureException" : "{1} konnte nicht aufgerufen werden, weil {0} in der Anwendung fehlt. Fügen Sie {0} zum Anwendungsdeskriptor hinzu. Erstellen und implementieren Sie dann die Anwendung neu.",
"name" : "Name:",
"noInternet" : "Keine Verbindung zum Service verfügbar",
"notificationTitle" : "Servicebenachrichtigung",
"notAvailable" : "Nicht verfügbar",
"ok" : "OK",
"password" : "Kennwort:",
"reload" : "Erneut laden",
"restore" : "Wiederherstellen",
"requestTimeout" : "Die Anwendung konnte keine Verbindung zu dem Service herstellen.",
"responseNotRecognized" : "Nicht erwartete Antwort",
"settings" : "Einstellungen",
"serverError" : "Fehler beim Prozeduraufruf",
"tryAgain" : "Erneut versuchen",
"userInstanceAccessViolationException" : "Sie versuchen, sich bei einer nicht für Sie registrierten Anwendung anzumelden.",
"unexpectedError" : "Der Server konnte die Anfrage von der Anwendung nicht verarbeiten. Versuchen Sie es später erneut.",
"unresponsiveHost" : "Der Service ist zurzeit nicht verfügbar.",
"update" : "Aktualisieren",
"upgrade" : "Upgrade",
"upgradeGadget" : "Die Version Ihrer Anwendung ist {0}. Version {1} dieser Anwendung ist verfügbar. Klicken Sie zum Herunterladen und Installieren auf OK.",
"wlclientInitFailure" : "Fehler",
"wlSettings" : "Einstellungen der Plattform IBM MobileFirst",
"userEnrollmentUnsupportedOS" : "Fehler bei der Authentifizierung des Benutzerzertifikats. Nicht unterstützte Clientplattform.",
"failureCallingMethod" : "Fehler beim Aufrufen von {0}",
"challengeHandlingCanceled" : "Die Abfrage-Handler-Operation wurde abgebrochen.",
"unsupportedEnvironment" : "Nicht unterstützte Umgebung",
"redirect" : "Umleiten"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "Para el usuario de PII" ,
"accessDenied" : "Acceso denegado",
"authFailure" : "Se ha producido un error al procesar la solicitud desde la aplicación.",
"applicationDenied" : "Aplicación inhabilitada",
"browserIsNotSupported" : "{0} no está actualmente soportado.",
"cancel" : "Cancelar",
"close" : "Cerrar",
"cookiesAreDisabled" : "Las cookies están actualmente inhabilitadas en el navegador. Debe habilitarlas para que la aplicación funcione correctamente.",
"copyToClipboard" : "Copiar",
"details" : "Detalles",
"diagApp" : "Diagnóstico de aplicación",
"diagTime" : "Hora",
"diagApplicationName" : "Nombre de aplicación",
"diagApplicationVersion" : "Versión de aplicación",
"diagServiceURL" : "URL de servicio",
"diagDevicePlatform" : "Plataforma de dispositivo",
"diagDeviceVersion" : "Versión de dispositivo",
"diagScreenResolution" : "Resolución de pantalla",
"diagAirplaneMode" : "Modo avión",
"diagUsingNetwork" : "Uso de red",
"diagWifiName" : "Nombre de WiFi",
"diagMobileNetworkType" : "Tipo de red móvil",
"diagCarrierName" : "Nombre de operadora",
"diagErrorCode" : "Código de error",
"diagErrorMessage" : "Mensaje de error",
"diagHttpStatus" : "Estado HTTP",
"diagIPAddress" : "Dirección IP",
"directUpdateNotificationTitle" : "Actualización disponible",
"directUpdateNotificationMessage" : "Hay disponibles nuevos recursos web. Confirme para actualizar. (tamaño archivos: {0} MB).",
"directUpdateNotificationMessageKilobytes" : "Hay disponibles nuevos recursos web. Confirme para actualizar. (tamaño archivos: {0} KB).",
"directUpdateErrorTitle" : "Actualización fallida",
"directUpdateErrorMessage" : "Anomalía en Direct Update. ",
"directUpdateErrorMessageNotEnoughStorage" : "Hay una actualización disponible para la aplicación, pero no hay suficiente espacio disponible en el dispositivo (espacio necesario: {0} MB, espacio disponible: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Ha fallado la descarga del archivo de actualización de aplicación.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Ha fallado el proceso del archivo de actualización de la aplicación.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "No se pueden descargar los recursos de la aplicación. Especifique la ID de la aplicación en la pantalla Configuración.",
"downloadAppWebResourcesAppIdNotExist" : "La aplicación '{0}' no se puede encontrar. Despliéguela en primer lugar en IBM MobileFirst Platform Server.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "No se pueden descargar los recursos de la aplicación. Especifique la Versión de la aplicación en la pantalla Configuración.",
"downloadAppWebResourcesSkinIsNotValid" : "No se pueden descargar los recursos de la aplicación. El skin: {0} no existe. Asegúrese de que getSkinName() se resuelve en un skin válido.",
"downloadAppWebResourcesAppVersionNotExist" : "No se puede encontrar la aplicación '{0}' {1} para {2}",
"deviceAuthenticationFail" : "Error de conectividad",
"saveCertificateFailure" : "No se ha podido guardar el certificado",
"downloadAppWebResourcesConnectionToServerUnavailable" : "No está disponible una conexión al servidor. No se pueden descargar los recursos de la aplicación.",
"expandWindow" : "Expanda la aplicación para utilizarla",
"exit" : "Salir",
"exitApplication" : "Salir de la aplicación",
"error" : "Error",
"gadgetUpdateAvailable" : "Actualización de la aplicación disponible",
"getNewVersion" : "Obtener una versión nueva",
"handleTimeOut" : "Se ha excedido el tiempo de espera de la solicitud de {0}. Asegúrese de que la dirección del host está disponible en la aplicación (especialmente relevante para aplicaciones Android e iPhone).",
"invalidUsernamePassword" : "Nombre de usuario o contraseña no válido",
"keepAliveInBackgroundText" : "La aplicación continúa en ejecución en segundo plano",
"loading" : "Cargando",
"login" : "Iniciar sesión",
"minimize" : "Minimizar",
"missingFeatureException" : "No se ha podido llamar a {1} porque falta {0} en la aplicación. Añada {0} al descriptor de la aplicación, vuelva a crearlo y despliéguelo.",
"name" : "Nombre:",
"noInternet" : "La conexión al servicio no está disponible.",
"notificationTitle" : "Notificación de servicio",
"notAvailable" : "No disponible",
"ok" : "Aceptar",
"password" : "Contraseña:",
"reload" : "Volver a cargar",
"restore" : "Restaurar",
"requestTimeout" : "La aplicación no se ha podido conectar al servicio.",
"responseNotRecognized" : "Respuesta inesperada.",
"settings" : "Valores",
"serverError" : "Error de invocación de procedimiento.",
"tryAgain" : "Inténtelo de nuevo",
"userInstanceAccessViolationException" : "Está intentando iniciar sesión en una aplicación que no está registrada para el usuario.",
"unexpectedError" : "El servidor no ha podido procesar la solicitud desde la aplicación. Inténtelo de nuevo más tarde.",
"unresponsiveHost" : "El servicio no está disponible en este momento.",
"update" : "Actualizar",
"upgrade" : "Actualizar",
"upgradeGadget" : "La versión de la aplicación es {0}. La versión {1} de esta aplicación está disponible. Pulse Aceptar para descargarla e instalarla.",
"wlclientInitFailure" : "Error",
"wlSettings" : "Configuración de IBM MobileFirst Platform",
"userEnrollmentUnsupportedOS" : "Error de autenticación de certificado de usuario: plataforma de cliente no soportada.",
"failureCallingMethod" : "Error de llamada {0}",
"challengeHandlingCanceled" : "Se ha cancelado la operación del manejador de desafíos.",
"unsupportedEnvironment" : "Entorno no soportado",
"redirect" : "Redireccionar"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII user facing" ,
"accessDenied" : "Accès refusé",
"authFailure" : "Une erreur est survenue lors du traitement de la demande de l'application.",
"applicationDenied" : "Application désactivée",
"browserIsNotSupported" : "{0} n'est pas pris en charge actuellement.",
"cancel" : "Annuler",
"close" : "Fermer",
"cookiesAreDisabled" : "Les cookies sont désactivés dans votre navigateur. Vous devez les activer pour que l'application fonctionne correctement.",
"copyToClipboard" : "Copier",
"details" : "Détails",
"diagApp" : "Diagnostics d'application",
"diagTime" : "Heure",
"diagApplicationName" : "Nom de l'application",
"diagApplicationVersion" : "Version de l'application",
"diagServiceURL" : "Adresse URL du service",
"diagDevicePlatform" : "Plateforme du terminal",
"diagDeviceVersion" : "Version du terminal",
"diagScreenResolution" : "Résolution d'écran",
"diagAirplaneMode" : "Mode avion",
"diagUsingNetwork" : "Utilisation du réseau",
"diagWifiName" : "Nom du Wi-Fi",
"diagMobileNetworkType" : "Type de réseau de mobile",
"diagCarrierName" : "Nom de l'opérateur",
"diagErrorCode" : "Code d'erreur",
"diagErrorMessage" : "Message d'erreur",
"diagHttpStatus" : "Statut HTTP",
"diagIPAddress" : "Adresse IP",
"directUpdateNotificationTitle" : "Mise à jour disponible",
"directUpdateNotificationMessage" : "Des ressources Web plus récentes sont disponibles. Confirmez la mise à jour. (taille du fichier : {0} Mo).",
"directUpdateNotificationMessageKilobytes" : "Des ressources Web plus récentes sont disponibles. Confirmez la mise à jour. (taille du fichier : {0} Ko).",
"directUpdateErrorTitle" : "Echec de la mise à jour",
"directUpdateErrorMessage" : "Echec de la mise à jour directe.",
"directUpdateErrorMessageNotEnoughStorage" : "Une mise à jour de l'application est disponible mais l'espace disponible sur le terminal est insuffisant (taille requise : {0} Mo, espace disponible : {1} Mo).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Echec du téléchargement du fichier de mise à jour de l'application.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Echec du traitement du fichier de mise à jour de l'application.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "Impossible de télécharger les ressources de l'application. Spécifiez l'ID de l'application dans l'écran Paramètres.",
"downloadAppWebResourcesAppIdNotExist" : "L'application '{0}' est introuvable. Déployez-la d'abord sur le serveur IBM MobileFirst Platform.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "Impossible de télécharger les ressources de l'application. Spécifiez la version de l'application dans l'écran Paramètres.",
"downloadAppWebResourcesSkinIsNotValid" : "Impossible de télécharger les ressources de l'application. L'habillage {0} n'existe pas. Assurez-vous que getSkinName() génère un habillage valide.",
"downloadAppWebResourcesAppVersionNotExist" : "Application '{0}' {1} introuvable pour {2}",
"deviceAuthenticationFail" : "Erreur de connectivité",
"saveCertificateFailure" : "Impossible de sauvegarder le certificat",
"downloadAppWebResourcesConnectionToServerUnavailable" : "La connexion au serveur n'est pas disponible. Impossible de télécharger les ressources d'application.",
"expandWindow" : "Développez l'application pour l'utiliser",
"exit" : "Quitter",
"exitApplication" : "Quitter l'application",
"error" : "Erreur",
"gadgetUpdateAvailable" : "Mise à jour de l'application disponible",
"getNewVersion" : "Obtenir la nouvelle version",
"handleTimeOut" : "La demande a expiré pour {0}. Assurez-vous que l'adresse de l'hôte est disponible dans l'application (notamment pour les applications Android et iPhone).",
"invalidUsernamePassword" : "Nom d'utilisateur ou mot de passe non valide",
"keepAliveInBackgroundText" : "L'application continue de s'exécuter en arrière-plan",
"loading" : "Chargement",
"login" : "Connexion",
"minimize" : "Réduire",
"missingFeatureException" : "Echec de l'appel de {1} car {0} manque dans l'application. Ajoutez {0} au descripteur d'application, régénérez-le et déployez-le.",
"name" : "Nom\u00A0:",
"noInternet" : "La connexion au service n'est pas disponible.",
"notificationTitle" : "Notification de service",
"notAvailable" : "Non disponible",
"ok" : "OK",
"password" : "Mot de passe\u00A0:",
"reload" : "Recharger",
"restore" : "Restaurer",
"requestTimeout" : "L'application n'est pas parvenue à se connecter au service.",
"responseNotRecognized" : "Réponse inattendue.",
"settings" : "Paramètres",
"serverError" : "Erreur d'invocation de procédure.",
"tryAgain" : "Réessayer",
"userInstanceAccessViolationException" : "Vous essayez de vous connecter à une application qui n'est pas enregistrée pour vous.",
"unexpectedError" : "Le serveur n'est pas parvenu à traiter la demande de l'application. Essayez à nouveau ultérieurement.",
"unresponsiveHost" : "Le service n'est pas disponible actuellement.",
"update" : "Mettre à jour",
"upgrade" : "Mettre à niveau",
"upgradeGadget" : "La version de votre application est {0}. La version {1} de cette application est disponible. Cliquez sur OK pour la télécharger et l'installer.",
"wlclientInitFailure" : "Erreur",
"wlSettings" : "Paramètres d'IBM MobileFirst Platform",
"userEnrollmentUnsupportedOS" : "Echec de l'authentification du certificat utilisateur\u00A0: plateforme client non prise en charge.",
"failureCallingMethod" : "Echec de l'appel de {0}",
"challengeHandlingCanceled" : "L'opération du gestionnaire de demandes d'authentification a été annulée.",
"unsupportedEnvironment" : "Environnement non pris en charge",
"redirect" : "Redirection"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII user facing" ,
"accessDenied" : "הגישה חסומה",
"authFailure" : "אירעה שגיאה בעיבוד הבקשה מהיישום.",
"applicationDenied" : "היישום מושבת",
"browserIsNotSupported" : "{0} אינו נתמך כרגע.",
"cancel" : "ביטול",
"close" : "סגירה",
"cookiesAreDisabled" : "קובצי Cookie מושבתית כרגע בדפדפן שלכם. עליכם להפעיל אותם כדי שהיישום יפעל כהלכה.",
"copyToClipboard" : "העתקה",
"details" : "פרטים",
"diagApp" : "אבחון יישום",
"diagTime" : "שעה",
"diagApplicationName" : "שם יישום",
"diagApplicationVersion" : "גרסת יישום",
"diagServiceURL" : "URL שירות",
"diagDevicePlatform" : "פלטפורמת התקן",
"diagDeviceVersion" : "גרסת התקן",
"diagScreenResolution" : "רזולוציית מסך",
"diagAirplaneMode" : "מצב מטוס",
"diagUsingNetwork" : "שימוש ברשת",
"diagWifiName" : "שם WiFi",
"diagMobileNetworkType" : "סוג רשת ניידת",
"diagCarrierName" : "שם ספק",
"diagErrorCode" : "קוד שגיאה",
"diagErrorMessage" : "הודעת שגיאה",
"diagHttpStatus" : "מצב HTTP",
"diagIPAddress" : "כתובת IP",
"directUpdateNotificationTitle" : "יש עדכון זמין",
"directUpdateNotificationMessage" : "זמינים משאבי רשת חדשים יותר. אשרו כדי לעדכן. (גודל הקובץ הוא {0} MB).",
"directUpdateNotificationMessageKilobytes" : "זמינים משאבי רשת חדשים יותר. אשרו כדי לעדכן. (גודל הקובץ הוא {0} KB).",
"directUpdateErrorTitle" : "העדכון נכשל",
"directUpdateErrorMessage" : "כשל בעדכון הישיר.",
"directUpdateErrorMessageNotEnoughStorage" : "זמין עדכון עבור היישום, אך אין מספיק מקום זמין בהתקן (גודל דרוש: {0} MB, שטח זמין: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "כשל בהורדת קובץ העדכון של היישום.",
"directUpdateErrorMessageFailedProcessingZipFile" : "כשל בעיבוד קובץ העדכון של היישום.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "לא ניתן להוריד את משאבי היישום. ציינו את זיהוי היישום במסך ההגדרות.",
"downloadAppWebResourcesAppIdNotExist" : "היישום '{0}' לא נמצא . הציבו אותו תחילה בשרת IBM MobileFirst Platform.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "לא ניתן להוריד את משאבי היישום. ציינו את גרסת היישום במסך ההגדרות.",
"downloadAppWebResourcesSkinIsNotValid" : "לא ניתן להוריד את משאבי היישום. המעטפת: {0} אינה קיימת. ודאי כי הפונקציה getSkinName() מתפענחת למעטפת חוקית.",
"downloadAppWebResourcesAppVersionNotExist" : "היישום '{0}' {1} עבור {2} לא נמצא",
"deviceAuthenticationFail" : "שגיאת קישוריות",
"saveCertificateFailure" : "לא ניתן לשמור את האישור",
"downloadAppWebResourcesConnectionToServerUnavailable" : "חיבור לשרת אינו זמין. לא ניתן להוריד את משאבי היישום.",
"expandWindow" : "הרחיבו את היישום כדי להשתמש בו",
"exit" : "יציאה",
"exitApplication" : "יציאה מהיישום",
"error" : "שגיאה",
"gadgetUpdateAvailable" : "זמין עדכון של היישום",
"getNewVersion" : "קבלת גרסה חדשה",
"handleTimeOut" : "הבקשה חרגה ממגבלת הזמן עבור {0}. ודאו שכתובת המארח זמינה ליישום (רלוונטי בעיקר עבור יישומי Android ו-iPhone).",
"invalidUsernamePassword" : "שם משתמש או סיסמה לא חוקיים",
"keepAliveInBackgroundText" : "היישום ממשיך לרוץ ברקע",
"loading" : "טעינה",
"login" : "התחברות",
"minimize" : "מזעור",
"missingFeatureException" : "Failed to call {1} because {0} is missing in the application. Add {0} to the application descriptor, rebuild and deploy it.",
"name" : "שם:",
"noInternet" : "אין חיבור זמין לשירות זה.",
"notificationTitle" : "הודעת שירות",
"notAvailable" : "לא זמין",
"ok" : "אישור",
"password" : "סיסמה:",
"reload" : "טעינה מחדש",
"restore" : "שחזור",
"requestTimeout" : "היישום לא הצליח להתחבר לשירות.",
"responseNotRecognized" : "תגובה לא צפויה.",
"settings" : "הגדרות",
"serverError" : "שגיאה בהפעלת פרוצדורה.",
"tryAgain" : "נסיון חוזר",
"userInstanceAccessViolationException" : "אתם מנסים להתחבר ליישום שאינו רשום עבורכם.",
"unexpectedError" : "השרת לא הצליח לעבד את הבקשה מהיישום. נא לנסות שוב מאוחר יותר.",
"unresponsiveHost" : "השירות אינו זמין כרגע.",
"update" : "עדכון",
"upgrade" : "שידרוג",
"upgradeGadget" : "גרסת היישום שלכם היא {0}. גרסה {1} של יישום זה זמינה כעת. לחצו על 'אישור' כדי להוריד ולהתקין אותה.",
"wlclientInitFailure" : "שגיאה",
"wlSettings" : "הגדרות IBM MobileFirst Platform",
"userEnrollmentUnsupportedOS" : "כשל באימות אישור משתמש: פלטפורמת לקוח לא נתמכת.",
"failureCallingMethod" : "כשל בקריאה למתודה {0}",
"challengeHandlingCanceled" : "Challenge handler operation was cancelled.",
"unsupportedEnvironment" : "סביבה לא נתמכת",
"redirect" : "ניתוב"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII user facing" ,
"accessDenied" : "Accesso negato",
"authFailure" : "È stato rilevato un errore durante l'elaborazione della richiesta dall'applicazione",
"applicationDenied" : "Applicazione disabilitata",
"browserIsNotSupported" : "{0} non è attualmente supportato.",
"cancel" : "Annulla",
"close" : "Chiudi",
"cookiesAreDisabled" : "Attualmente i cookie sono disabilitati nel browser in uso. È necessario abilitarli per un corretto funzionamento dell'applicazione.",
"copyToClipboard" : "Copia",
"details" : "Dettagli",
"diagApp" : "Diagnostica app",
"diagTime" : "Ora",
"diagApplicationName" : "Nome applicazione",
"diagApplicationVersion" : "Versione applicazione",
"diagServiceURL" : "URL servizio",
"diagDevicePlatform" : "Piattaforma dispositivo",
"diagDeviceVersion" : "Versione dispositivo",
"diagScreenResolution" : "Risoluzione schermo",
"diagAirplaneMode" : "Modalità aereo",
"diagUsingNetwork" : "Utilizzo della rete",
"diagWifiName" : "Nome WiFi",
"diagMobileNetworkType" : "Tipo di rete mobile",
"diagCarrierName" : "Nome vettore",
"diagErrorCode" : "Codice di errore",
"diagErrorMessage" : "Messaggio di errore",
"diagHttpStatus" : "Stato HTTP",
"diagIPAddress" : "Indirizzo IP",
"directUpdateNotificationTitle" : "Aggiornamento disponibile",
"directUpdateNotificationMessage" : "Sono disponibili nuove risorse web. Confermare l'aggiornamento (la dimensione file è {0} MB).",
"directUpdateNotificationMessageKilobytes" : "Sono disponibili nuove risorse web. Confermare l'aggiornamento (la dimensione file è {0} KB).",
"directUpdateErrorTitle" : "Aggiornamento non riuscito",
"directUpdateErrorMessage" : "Errore dell'aggiornamento diretto.",
"directUpdateErrorMessageNotEnoughStorage" : "È disponibile un aggiornamento per l'applicazione, ma lo spazio disponibile sul dispositivo non è sufficiente (dimensione richiesta: {0} MB, spazio disponibile: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Download del file di aggiornamento dell'applicazione non riuscito.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Elaborazione del file di aggiornamento dell'applicazione non riuscita.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "Impossibile scaricare le risorse app. Specificare l'ID app nella schermata Impostazioni.",
"downloadAppWebResourcesAppIdNotExist" : "Impossibile trovare l'applicazione '{0}'. Eseguire prima la distribuzione su IBM MobileFirst Platform Server.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "Impossibile scaricare le risorse app. Specificare la versione app nella schermata Impostazioni.",
"downloadAppWebResourcesSkinIsNotValid" : "Impossibile scaricare le risorse app. skin: {0} non esistente. Assicurarsi che getSkinName() sia risolto in uno skin valido.",
"downloadAppWebResourcesAppVersionNotExist" : "Impossibile trovare l'applicazione '{0}' {1} per {2}",
"deviceAuthenticationFail" : "Errore di connettività",
"saveCertificateFailure" : "Impossibile salvare il certificato",
"downloadAppWebResourcesConnectionToServerUnavailable" : "Una connessione al server non è disponibile. Impossibile scaricare le risorse dell'applicazione.",
"expandWindow" : "Espandere l'applicazione per utilizzarla",
"exit" : "Esci",
"exitApplication" : "Esci dall'applicazione",
"error" : "Errore",
"gadgetUpdateAvailable" : "Aggiornamento dell'applicazione disponibile",
"getNewVersion" : "Ottieni nuova versione",
"handleTimeOut" : "Richiesta scaduta per {0}. Assicurarsi che l'indirizzo host sia disponibile per l'applicazione (particolarmente importante per le app di Android e iPhone).",
"invalidUsernamePassword" : "Nome utente o password non validi",
"keepAliveInBackgroundText" : "L'esecuzione dell'applicazione prosegue in background",
"loading" : "Caricamento",
"login" : "Accesso",
"minimize" : "Riduci al minimo",
"missingFeatureException" : "Chiamata a {1} non riuscita perché {0} non è presente nell'applicazione. Aggiungere {0} al descrittore dell'applicazione, crearla nuovamente e distribuirla.",
"name" : "Nome:",
"noInternet" : "La connessione al servizio non è disponibile.",
"notificationTitle" : "Notifica del servizio",
"notAvailable" : "Non disponibile",
"ok" : "OK",
"password" : "Password:",
"reload" : "Ricarica",
"restore" : "Ripristina",
"requestTimeout" : "L'applicazione non è riuscita ad effettuare la connessione al servizio.",
"responseNotRecognized" : "Risposta non prevista.",
"settings" : "Impostazioni",
"serverError" : "Errore di richiamo procedura.",
"tryAgain" : "Riprova",
"userInstanceAccessViolationException" : "Si sta cercando di collegarsi a un'applicazione a cui non si è registrati.",
"unexpectedError" : "Il server non è riuscito a elaborare la richiesta dall'applicazione. Riprovare successivamente.",
"unresponsiveHost" : "Il servizio attualmente non è disponibile.",
"update" : "Aggiorna",
"upgrade" : "Esegui l'upgrade",
"upgradeGadget" : "La versione dell'applicazione è {0}. È disponibile la versione {1} di questa applicazione. Fare clic su OK per scaricare e installare.",
"wlclientInitFailure" : "Errore",
"wlSettings" : "Impostazioni di IBM MobileFirst Platform",
"userEnrollmentUnsupportedOS" : "Errore di autenticazione del certificato utente: piattaforma client non supportata.",
"failureCallingMethod" : "Errore durante il richiamo di {0}",
"challengeHandlingCanceled" : "Operazione Challenge Handler annullata.",
"unsupportedEnvironment" : "Ambiente non supportato",
"redirect" : "Reindirizza"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII ユーザー・インターフェース" ,
"accessDenied" : "アクセスは拒否されました",
"authFailure" : "アプリケーションからの要求の処理中にエラーが発生しました。",
"applicationDenied" : "アプリケーションは使用できません",
"browserIsNotSupported" : "{0} は現在サポートされていません。",
"cancel" : "キャンセル",
"close" : "閉じる",
"cookiesAreDisabled" : "Cookie は現在ご使用のブラウザーで無効になっています。 これらを有効にしてアプリケーションが適切に機能するようにしてください。",
"copyToClipboard" : "コピー",
"details" : "詳細",
"diagApp" : "アプリケーション診断",
"diagTime" : "時刻",
"diagApplicationName" : "アプリケーション名",
"diagApplicationVersion" : "アプリケーション・バージョン",
"diagServiceURL" : "サービス URL",
"diagDevicePlatform" : "デバイス・プラットフォーム",
"diagDeviceVersion" : "デバイス・バージョン",
"diagScreenResolution" : "画面解像度",
"diagAirplaneMode" : "機内モード",
"diagUsingNetwork" : "ネットワークの使用",
"diagWifiName" : "WiFi 名",
"diagMobileNetworkType" : "モバイル・ネットワーク・タイプ",
"diagCarrierName" : "通信事業者名",
"diagErrorCode" : "エラー・コード",
"diagErrorMessage" : "エラー・メッセージ",
"diagHttpStatus" : "HTTP 状況",
"diagIPAddress" : "IP アドレス",
"directUpdateNotificationTitle" : "更新が利用可能",
"directUpdateNotificationMessage" : "より新しい Web リソースが利用可能です。 確認して更新してください。 (ファイル・サイズ {0} MB)",
"directUpdateNotificationMessageKilobytes" : "より新しい Web リソースが利用可能です。 確認して更新してください。 (ファイル・サイズ {0} KB)",
"directUpdateErrorTitle" : "更新が失敗",
"directUpdateErrorMessage" : "直接の更新が失敗しました。",
"directUpdateErrorMessageNotEnoughStorage" : "アプリケーションの更新が利用可能ですが、デバイス上に十分な使用可能スペースがありません (必要なサイズ: {0} MB、使用可能スペース: {1} MB)。",
"directUpdateErrorMessageFailedDownloadingZipFile" : "アプリケーション更新ファイルのダウンロードが失敗しました。",
"directUpdateErrorMessageFailedProcessingZipFile" : "アプリケーション更新ファイルの処理が失敗しました。",
"downloadAppWebResourcesPleaseSpecifyAppID" : "アプリケーション・リソースをダウンロードできません。 「設定」画面の「アプリケーション ID」を指定してください。",
"downloadAppWebResourcesAppIdNotExist" : "アプリケーション '{0}' が見つかりません。 最初にそれを IBM MobileFirst Platform Server にデプロイしてください。",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "アプリケーション・リソースをダウンロードできません。 「設定」画面の「アプリケーション・バージョン」を指定してください。",
"downloadAppWebResourcesSkinIsNotValid" : "アプリケーション・リソースをダウンロードできません。 スキン: {0} は存在しません。 getSkinName() の値が確実に有効なスキンになるようにしてください。",
"downloadAppWebResourcesAppVersionNotExist" : "アプリケーション '{0}' {1} ({2} 用) が見つかりません",
"deviceAuthenticationFail" : "接続エラー",
"saveCertificateFailure" : "証明書を保存できません",
"downloadAppWebResourcesConnectionToServerUnavailable" : "サーバーに接続できません。 アプリケーション・リソースをダウンロードできません。",
"expandWindow" : "アプリケーションを展開して使用してください",
"exit" : "終了",
"exitApplication" : "アプリケーションの終了",
"error" : "エラー",
"gadgetUpdateAvailable" : "アプリケーションの更新が利用可能です",
"getNewVersion" : "新バージョンの入手",
"handleTimeOut" : "{0} の要求がタイムアウトになりました。 ホスト・アドレスがアプリケーション (特に Android や iPhone のアプリケーション) で使用できることを確認してください。",
"invalidUsernamePassword" : "無効なユーザー名またはパスワード",
"keepAliveInBackgroundText" : "アプリケーションはバックグラウンドで引き続き稼働中",
"loading" : "ロード中",
"login" : "ログイン",
"minimize" : "最小化",
"missingFeatureException" : "アプリケーションに {0} がないため {1} の呼び出しに失敗しました。 アプリケーション記述子に {0} を追加し、再ビルドしデプロイしてください。",
"name" : "名前:",
"noInternet" : "サービスに接続できません。",
"notificationTitle" : "サービス通知",
"notAvailable" : "使用不可",
"ok" : "OK",
"password" : "パスワード:",
"reload" : "再ロード",
"restore" : "復元",
"requestTimeout" : "アプリケーションがサービスへの接続に失敗しました。",
"responseNotRecognized" : "予期しない応答。",
"settings" : "設定",
"serverError" : "プロシージャー呼び出しエラー。",
"tryAgain" : "やり直してください",
"userInstanceAccessViolationException" : "登録されていないアプリケーションにログインしようとしています。",
"unexpectedError" : "サーバーはアプリケーションからの要求を処理できませんでした。 後でもう一度やり直してください。",
"unresponsiveHost" : "サービスは現在使用できません。",
"update" : "更新",
"upgrade" : "アップグレード",
"upgradeGadget" : "ご使用のアプリケーションのバージョンは {0} です。 このアプリケーションのバージョン {1} が使用可能です。 これをダウンロードしてインストールするには「OK」をクリックしてください。",
"wlclientInitFailure" : "エラー",
"wlSettings" : "IBM MobileFirst Platform の設定",
"userEnrollmentUnsupportedOS" : "ユーザー証明書認証障害: サポートされていないクライアント・プラットフォーム。",
"failureCallingMethod" : "障害呼び出し {0}",
"challengeHandlingCanceled" : "Challenge handler の操作がキャンセルされました。",
"unsupportedEnvironment" : "非サポート環境",
"redirect" : "リダイレクト"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII 사용자 지향" ,
"accessDenied" : "액세스 거부됨",
"authFailure" : "애플리케이션의 요청을 처리하는 중에 오류가 발생했습니다.",
"applicationDenied" : "애플리케이션 사용 안함",
"browserIsNotSupported" : "{0}은(는) 현재 지원되지 않습니다.",
"cancel" : "취소",
"close" : "닫기",
"cookiesAreDisabled" : "쿠키는 브라우저에서 현재 사용되지 않습니다. 애플리케이션이 제대로 작동하려면 쿠키를 사용해야 합니다.",
"copyToClipboard" : "복사",
"details" : "세부사항",
"diagApp" : "애플리케이션 진단",
"diagTime" : "시간",
"diagApplicationName" : "애플리케이션 이름",
"diagApplicationVersion" : "애플리케이션 버전",
"diagServiceURL" : "서비스 URL",
"diagDevicePlatform" : "디바이스 플랫폼",
"diagDeviceVersion" : "디바이스 버전",
"diagScreenResolution" : "화면 해상도",
"diagAirplaneMode" : "통신제한 모드",
"diagUsingNetwork" : "사용 중인 네트워크",
"diagWifiName" : "WiFi 이름",
"diagMobileNetworkType" : "모바일 네트워크 유형",
"diagCarrierName" : "통신회사 이름",
"diagErrorCode" : "오류 코드",
"diagErrorMessage" : "오류 메시지",
"diagHttpStatus" : "HTTP 상태",
"diagIPAddress" : "IP 주소",
"directUpdateNotificationTitle" : "업데이트 사용 가능",
"directUpdateNotificationMessage" : "최신 웹 자원이 사용 가능합니다. 업데이트 확인(파일 크기: {0}MB).",
"directUpdateNotificationMessageKilobytes" : "최신 웹 자원이 사용 가능합니다. 업데이트 확인(파일 크기: {0}KB).",
"directUpdateErrorTitle" : "업데이트 실패",
"directUpdateErrorMessage" : "직접 업데이트에 실패했습니다.",
"directUpdateErrorMessageNotEnoughStorage" : "애플리케이션에 대한 업데이트를 사용할 수 있지만 디바이스의 사용 가능한 공간이 충분하지 않습니다(필수 크기: {0}MB, 사용 가능한 공간: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "애플리케이션 업데이트 파일을 다운로드하는 데 실패했습니다.",
"directUpdateErrorMessageFailedProcessingZipFile" : "애플리케이션 업데이트 파일을 처리하는 데 실패했습니다.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "애플리케이션 자원을 다운로드할 수 없습니다. 설정 화면에서 애플리케이션 ID를 지정하십시오.",
"downloadAppWebResourcesAppIdNotExist" : "'{0}' 애플리케이션을 찾을 수 없습니다. 먼저 IBM MobileFirst Platform Server에 해당 애플리케이션을 배치하십시오.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "애플리케이션 자원을 다운로드할 수 없습니다. 설정 화면에서 애플리케이션 버전을 지정하십시오.",
"downloadAppWebResourcesSkinIsNotValid" : "애플리케이션 자원을 다운로드할 수 없습니다. {0} 스킨이 존재하지 않습니다. getSkinName()이 올바른 스킨에 해석되는지 확인하십시오.",
"downloadAppWebResourcesAppVersionNotExist" : "{2}용 '{0}' {1} 애플리케이션을 찾을 수 없습니다. ",
"deviceAuthenticationFail" : "연결성 오류",
"saveCertificateFailure" : "인증서를 저장할 수 없습니다.",
"downloadAppWebResourcesConnectionToServerUnavailable" : "서버에 연결할 수 없습니다. 애플리케이션 자원을 다운로드할 수 없습니다.",
"expandWindow" : "사용할 애플리케이션 펼치기",
"exit" : "종료",
"exitApplication" : "애플리케이션 종료",
"error" : "오류",
"gadgetUpdateAvailable" : "애플리케이션 업데이트 사용 가능",
"getNewVersion" : "새 버전 가져오기",
"handleTimeOut" : "{0}에 대한 요청 제한시간이 초과되었습니다. 애플리케이션에 대한 호스트 주소가 사용 가능한지 확인하십시오(특히 Android 및 iPhone 애플리케이션 관련).",
"invalidUsernamePassword" : "사용자 이름 또는 비밀번호가 올바르지 않음",
"keepAliveInBackgroundText" : "애플리케이션이 배경에서 계속 실행됨",
"loading" : "로드 중",
"login" : "로그인",
"minimize" : "최소화",
"missingFeatureException" : "애플리케이션에서 {0}이(가) 누락되어 {1} 호출에 실패했습니다. 애플리케이션 디스크립터에 {0}을(를) 추가하고 다시 빌드하여 배치하십시오. ",
"name" : "이름:",
"noInternet" : "서비스에 대한 연결을 사용할 수 없습니다.",
"notificationTitle" : "서비스 알림",
"notAvailable" : "사용할 수 없음",
"ok" : "확인",
"password" : "비밀번호:",
"reload" : "다시 로드",
"restore" : "복원",
"requestTimeout" : "애플리케이션에서 서비스 연결에 실패했습니다.",
"responseNotRecognized" : "예상치 못한 응답입니다.",
"settings" : "설정",
"serverError" : "프로시저 호출 오류입니다.",
"tryAgain" : "다시 시도",
"userInstanceAccessViolationException" : "등록되지 않은 애플리케이션에 로그인하는 중입니다.",
"unexpectedError" : "서버는 애플리케이션의 요청을 처리할 수 없습니다. 나중에 다시 시도하십시오.",
"unresponsiveHost" : "서비스를 현재 사용할 수 없습니다.",
"update" : "업데이트",
"upgrade" : "업그레이드",
"upgradeGadget" : "사용자의 애플리케이션 버전은 {0}입니다. 이 애플리케이션의 {1} 버전을 사용할 수 있습니다. 해당 버전을 다운로드하여 설치하려면 확인을 클릭하십시오.",
"wlclientInitFailure" : "오류",
"wlSettings" : "IBM MobileFirst Platform 설정",
"userEnrollmentUnsupportedOS" : "사용자 인증 실패: 지원되지 않는 클라이언트 플랫폼",
"failureCallingMethod" : "{0} 호출 실패",
"challengeHandlingCanceled" : "인증 확인 핸들러 조작이 취소되었습니다.",
"unsupportedEnvironment" : "지원되지 않는 환경",
"redirect" : "경로 재지정"
}
@@ -0,0 +1,84 @@
{
"IBM-INTERNAL" : "PII user facing" ,
"accessDenied" : "Access Denied",
"authFailure" : "An error was encountered while processing the request from the application.",
"applicationDenied" : "Application Disabled",
"browserIsNotSupported" : "{0} is currently not supported.",
"cancel" : "Cancel",
"close" : "Close",
"cookiesAreDisabled" : "Cookies are currently disabled in your browser. You must enable them for the application to function properly.",
"copyToClipboard" : "Copy",
"details" : "Details",
"diagApp" : "App Diagnostics",
"diagTime" : "Time",
"diagApplicationName" : "Application Name",
"diagApplicationVersion" : "Application Version",
"diagServiceURL" : "Service URL",
"diagDevicePlatform" : "Device Platform",
"diagDeviceVersion" : "Device Version",
"diagScreenResolution" : "Screen Resolution",
"diagAirplaneMode" : "Airplane Mode",
"diagUsingNetwork" : "Using Network",
"diagWifiName" : "WiFi Name",
"diagMobileNetworkType" : "Mobile Network Type",
"diagCarrierName" : "Carrier Name",
"diagErrorCode" : "Error Code",
"diagErrorMessage" : "Error Message",
"diagHttpStatus" : "HTTP Status",
"diagIPAddress" : "IP Address",
"directUpdateNotificationTitle" : "Update available",
"directUpdateNotificationMessage" : "Newer web resources are available. Confirm to update. (file size is {0} MB).",
"directUpdateNotificationMessageKilobytes" : "Newer web resources are available. Confirm to update. (file size is {0} KB).",
"directUpdateErrorTitle" : "Update Failed",
"directUpdateErrorMessage" : "Direct Update failure.",
"directUpdateErrorMessageNotEnoughStorage" : "An update for the application is available, but there is not enough space available on the device (required size: {0} MB, available space: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Failed downloading application update file.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Failed processing application update file.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "Cannot download app resources. Specify the App ID in the Settings screen.",
"downloadAppWebResourcesAppIdNotExist" : "Application '{0}' cannot be found. Deploy it first to the IBM MobileFirst Platform Server.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "Cannot download app resources. Specify the App Version in the Settings screen.",
"downloadAppWebResourcesSkinIsNotValid" : "Cannot download app resources. skin: {0} does not exist. Please make sure getSkinName() resolves to a valid skin.",
"downloadAppWebResourcesAppVersionNotExist" : "Cannot find application '{0}' {1} for {2}",
"deviceAuthenticationFail" : "Connectivity Error",
"saveCertificateFailure" : "Unable to save certificate",
"downloadAppWebResourcesConnectionToServerUnavailable" : "A connection to the server is not available. Cannot download application resources.",
"expandWindow" : "Expand application to use it",
"exit" : "Exit",
"exitApplication" : "Exit application",
"error" : "Error",
"gadgetUpdateAvailable" : "Application update available",
"getNewVersion" : "Get new version",
"handleTimeOut" : "Request timed out for {0}. Make sure the host address is available to the application (especially relevant for Android and iPhone apps).",
"invalidUsernamePassword" : "Invalid user name or password",
"keepAliveInBackgroundText" : "Application keeps running in background",
"loading" : "Loading",
"login" : "Login",
"minimize" : "Minimize",
"missingFeatureException" : "Failed to call {1} because {0} is missing in the application. Add {0} to the application descriptor, rebuild and deploy it.",
"name" : "Name:",
"noInternet" : "Connection to the service is not available.",
"notificationTitle" : "Service Notification",
"notAvailable" : "Not Available",
"ok" : "OK",
"password" : "Password:",
"reload" : "Reload",
"restore" : "Restore",
"requestTimeout" : "The application failed connecting to the service.",
"responseNotRecognized" : "Unexpected response.",
"settings" : "Settings",
"serverError" : "Procedure invocation error.",
"tryAgain" : "Try Again",
"userInstanceAccessViolationException" : "You are trying to login to an application that is not registered for you.",
"unexpectedError" : "The server was unable to process the request from the application. Please try again later.",
"unresponsiveHost" : "The service is currently not available.",
"update" : "Update",
"upgrade" : "Upgrade",
"upgradeGadget" : "The version of your application is {0}. Version {1} of this application is available. Click OK to download and install it.",
"wlclientInitFailure" : "Error",
"wlSettings" : "IBM MobileFirst Platform Settings",
"userEnrollmentUnsupportedOS" : "User certificate authentication failure: unsupported client platform.",
"failureCallingMethod" : "Failure calling {0}",
"challengeHandlingCanceled" : "Challenge handler operation was cancelled.",
"unsupportedEnvironment" : "Unsupported environment",
"redirect" : "Redirect"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "Face de Usuário de PII" ,
"accessDenied" : "Acesso Negado",
"authFailure" : "Um erro foi encontrado ao processar a solicitação do aplicativo.",
"applicationDenied" : "Aplicativo Desativado",
"browserIsNotSupported" : "{0} não é suportado atualmente.",
"cancel" : "Cancelar",
"close" : "Fechar",
"cookiesAreDisabled" : "Os cookies estão atualmente desativados em seu navegador. Você deve ativá-los para que o aplicativo funcione adequadamente.",
"copyToClipboard" : "Copiar",
"details" : "Detalhes",
"diagApp" : "Diagnósticos do Aplicativo",
"diagTime" : "Tempo",
"diagApplicationName" : "Nome do Aplicativo",
"diagApplicationVersion" : "Versão do Aplicativo",
"diagServiceURL" : "URL de Serviço",
"diagDevicePlatform" : "Plataforma do Dispositivo",
"diagDeviceVersion" : "Versão do Dispositivo",
"diagScreenResolution" : "Resolução da Tela",
"diagAirplaneMode" : "Modo de Avião",
"diagUsingNetwork" : "Usando Rede",
"diagWifiName" : "Nome da WiFi",
"diagMobileNetworkType" : "Tipo de Rede Remota",
"diagCarrierName" : "Nome da Transportadora",
"diagErrorCode" : "Código de Erro",
"diagErrorMessage" : "Mensagem de Erro",
"diagHttpStatus" : "Status de HTTP",
"diagIPAddress" : "Endereço IP",
"directUpdateNotificationTitle" : "Atualização disponível",
"directUpdateNotificationMessage" : "Recursos da web mais recentes estão disponíveis. Confirme para atualizar. (o tamanho do arquivo é de {0} MB).",
"directUpdateNotificationMessageKilobytes" : "Recursos da web mais recentes estão disponíveis. Confirme para atualizar. (o tamanho do arquivo é de {0} KB).",
"directUpdateErrorTitle" : "Atualização com Falha",
"directUpdateErrorMessage" : "Falha na Atualização Direta.",
"directUpdateErrorMessageNotEnoughStorage" : "Uma atualização para o aplicativo está disponível, mas não há espaço suficiente disponível no dispositivo (tamanho necessário: {0} MB, espaço disponível: {1} MB).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Falha ao fazer download do arquivo de atualização do aplicativo.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Falha ao processar o arquivo de atualização do aplicativo.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "Não é possível fazer download de recursos do aplicativo. Especifique o ID do Aplicativo na tela Configurações.",
"downloadAppWebResourcesAppIdNotExist" : "O aplicativo '{0}' não pode ser localizado. Implemente-o primeiro no IBM MobileFirst Platform Server.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "Não é possível fazer download de recursos do aplicativo. Especifique a Versão do Aplicativo na tela Configurações.",
"downloadAppWebResourcesSkinIsNotValid" : "Não é possível fazer download de recursos do aplicativo. Aparência: {0} não existe. Certifique-se de que getSkinName() seja resolvido para uma aparência válida.",
"downloadAppWebResourcesAppVersionNotExist" : "Não é possível localizar o aplicativo '{0}' {1} para {2}",
"deviceAuthenticationFail" : "Erro de Conectividade",
"saveCertificateFailure" : "Não é possível salvar o certificado",
"downloadAppWebResourcesConnectionToServerUnavailable" : "Uma conexão com o servidor não está disponível. Não é possível fazer download de recursos do aplicativo.",
"expandWindow" : "Expandir aplicativo para usá-lo",
"exit" : "Sair",
"exitApplication" : "Sair do Aplicativo",
"error" : "Erro",
"gadgetUpdateAvailable" : "Atualização do aplicativo disponível",
"getNewVersion" : "Obter Nova Versão",
"handleTimeOut" : "A solicitação atingiu o tempo limite para {0}. Certifique-se de que o endereço do host esteja disponível para o aplicativo (especialmente relevante para aplicativos Android e iPhone).",
"invalidUsernamePassword" : "Nome de usuário ou senha inválida",
"keepAliveInBackgroundText" : "O aplicativo continua em execução no segundo plano",
"loading" : "Carregando",
"login" : "Login",
"minimize" : "Minimizar",
"missingFeatureException" : "Falha ao chamar {1} porque {0} está ausente no aplicativo. Inclua {0} no descritor de aplicativo, reconstrua e implemente-o.",
"name" : "Nome:",
"noInternet" : "A conexão com o serviço não está disponível.",
"notificationTitle" : "Notificação de Serviço",
"notAvailable" : "Não Disponível",
"ok" : "OK",
"password" : "Senha:",
"reload" : "Recarregar",
"restore" : "Restaurar",
"requestTimeout" : "Falha ao conectar o aplicativo com o serviço.",
"responseNotRecognized" : "Resposta inesperada.",
"settings" : "Configurações",
"serverError" : "Erro de chamada de procedimento.",
"tryAgain" : "Tentar Novamente",
"userInstanceAccessViolationException" : "Você está tentando efetuar login em um aplicativo que não está registrado para você.",
"unexpectedError" : "O servidor não pôde processar a solicitação do aplicativo. Tente novamente mais tarde.",
"unresponsiveHost" : "O serviço não está atualmente disponível.",
"update" : "Atualizar",
"upgrade" : "Fazer Upgrade",
"upgradeGadget" : "A versão de seu aplicativo é {0}. A versão {1} deste aplicativo está disponível. Clique em OK para fazer download e instalá-la.",
"wlclientInitFailure" : "Erro",
"wlSettings" : "Configurações do IBM MobileFirst Platform",
"userEnrollmentUnsupportedOS" : "Falha de autenticação de certificado de usuário: plataforma do cliente não suportada.",
"failureCallingMethod" : "Falha ao chamar {0}",
"challengeHandlingCanceled" : "A operação do manipulador de desafios foi cancelada.",
"unsupportedEnvironment" : "Ambiente não suportado",
"redirect" : "Redirecionar"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "Личные данные для пользователя" ,
"accessDenied" : "Доступ запрещен",
"authFailure" : "Произошла ошибка при обработке запроса из приложения.",
"applicationDenied" : "Приложение выключено",
"browserIsNotSupported" : "{0} в настоящее время не поддерживается.",
"cancel" : "Отмена",
"close" : "Закрыть",
"cookiesAreDisabled" : "В данный момент cookie в браузере выключены. Их необходимо включить, чтобы обеспечить правильную работу приложения.",
"copyToClipboard" : "Копировать",
"details" : "Сведения",
"diagApp" : "Диагностика приложения",
"diagTime" : "Время",
"diagApplicationName" : "Имя приложения",
"diagApplicationVersion" : "Версия приложения",
"diagServiceURL" : "URL службы",
"diagDevicePlatform" : "Платформа",
"diagDeviceVersion" : "Версия устройства",
"diagScreenResolution" : "Разрешение экрана",
"diagAirplaneMode" : "Режим самолета",
"diagUsingNetwork" : "Работа с сетью",
"diagWifiName" : "Имя WiFi",
"diagMobileNetworkType" : "Тип моб. сети",
"diagCarrierName" : "Назв. носителя",
"diagErrorCode" : "Код ошибки",
"diagErrorMessage" : "Сообщение",
"diagHttpStatus" : "Состояние HTTP",
"diagIPAddress" : "IP-адрес",
"directUpdateNotificationTitle" : "Есть обновление",
"directUpdateNotificationMessage" : "Доступные новые веб-ресурсы. Подтвердите обновление. (Размер файла: {0} МБ).",
"directUpdateNotificationMessageKilobytes" : "Доступные новые веб-ресурсы. Подтвердите обновление. (Размер файла: {0} КБ).",
"directUpdateErrorTitle" : "Обновление не выполнено",
"directUpdateErrorMessage" : "Сбой прямого обновления.",
"directUpdateErrorMessageNotEnoughStorage" : "Для приложения доступно обновление, но в устройстве недостаточно памяти (необходимый объем: {0} МБ, доступно: {1} МБ).",
"directUpdateErrorMessageFailedDownloadingZipFile" : "Не удалось загрузить файл обновления приложения.",
"directUpdateErrorMessageFailedProcessingZipFile" : "Не удалось обработать файл обновления приложения.",
"downloadAppWebResourcesPleaseSpecifyAppID" : "Невозможно загрузить ресурсы приложения. Укажите ИД приложения в окне Параметры.",
"downloadAppWebResourcesAppIdNotExist" : "Приложение '{0}' не найдено. Разверните его сначала на сервере IBM MobileFirst Platform.",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "Невозможно загрузить ресурсы приложения. Укажите версию приложения в окне Параметры.",
"downloadAppWebResourcesSkinIsNotValid" : "Невозможно загрузить ресурсы приложения. оболочка {0} не существует. Убедитесь, что getSkinName() преобразуется в правильную оболочку.",
"downloadAppWebResourcesAppVersionNotExist" : "Не найдено приложение '{0}' {1} для {2}",
"deviceAuthenticationFail" : "Ошибка соединения",
"saveCertificateFailure" : "Не удалось сохранить сертификат",
"downloadAppWebResourcesConnectionToServerUnavailable" : "Соединение с сервером недоступно. Невозможно загрузить ресурсы приложения.",
"expandWindow" : "Разверните приложение для работы с ним",
"exit" : "Выход",
"exitApplication" : "Закрыть приложение",
"error" : "Ошибка",
"gadgetUpdateAvailable" : "Доступно обновление приложения",
"getNewVersion" : "Получить новую версию",
"handleTimeOut" : "Тайм-аут запроса для {0}. Убедитесь, что адрес хоста доступен для приложения (особенно при работе с приложениями Android и iPhone).",
"invalidUsernamePassword" : "Недопустимое имя пользователя или пароль",
"keepAliveInBackgroundText" : "Приложение продолжает выполняться в фоновом режиме",
"loading" : "Загрузка",
"login" : "Вход в систему",
"minimize" : "Свернуть",
"missingFeatureException" : "Не удалось вызвать {1}, так как в приложении отсутствует {0}. Добавьте {0} в файл описания приложения, перекомпонуйте его и выполните развертывание.",
"name" : "Имя:",
"noInternet" : "Соединение со службой недоступно.",
"notificationTitle" : "Уведомление об обслуживании",
"notAvailable" : "Недоступно",
"ok" : "OK",
"password" : "Пароль:",
"reload" : "Заново",
"restore" : "Восстановить",
"requestTimeout" : "Приложению не удалось подключиться к службе.",
"responseNotRecognized" : "Непредвиденный ответ.",
"settings" : "Параметры",
"serverError" : "Ошибка вызова процедуры.",
"tryAgain" : "Повторите попытку",
"userInstanceAccessViolationException" : "Попытка входа в систему приложения, которое для вас не зарегистрировано.",
"unexpectedError" : "Серверу не удалось обработать запрос из приложения. Повторите операцию позднее.",
"unresponsiveHost" : "В данный момент служба недоступна.",
"update" : "Обновить",
"upgrade" : "Обновить",
"upgradeGadget" : "Приложение имеет версию {0}. Доступна версия {1} этого приложения. Для загрузки и установки нажмите OK.",
"wlclientInitFailure" : "Ошибка",
"wlSettings" : "Параметры платформы IBM MobileFirst",
"userEnrollmentUnsupportedOS" : "Ошибка сертификата пользователя: неподдерживаемая платформа клиента.",
"failureCallingMethod" : "Ошибка вызова {0}",
"challengeHandlingCanceled" : "Операция обработчика вызовов была отменена.",
"unsupportedEnvironment" : "Неподдерживаемая среда",
"redirect" : "Перенаправление"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII 使用者樣式" ,
"accessDenied" : "拒絕存取",
"authFailure" : "處理應用程式的要求時發生錯誤。",
"applicationDenied" : "應用程式已停用",
"browserIsNotSupported" : "目前不支援 {0}。",
"cancel" : "取消",
"close" : "關閉",
"cookiesAreDisabled" : "您的瀏覽器目前已停用 Cookie。 您必須加以啟用,應用程式才能正常運作。",
"copyToClipboard" : "複製",
"details" : "詳細資料",
"diagApp" : "應用程式診斷程式",
"diagTime" : "時間",
"diagApplicationName" : "應用程式名稱",
"diagApplicationVersion" : "應用程式版本",
"diagServiceURL" : "服務 URL",
"diagDevicePlatform" : "裝置平台",
"diagDeviceVersion" : "裝置版本",
"diagScreenResolution" : "螢幕解析度",
"diagAirplaneMode" : "飛航模式",
"diagUsingNetwork" : "使用網路",
"diagWifiName" : "WiFi 名稱",
"diagMobileNetworkType" : "行動網路類型",
"diagCarrierName" : "電信業者名稱",
"diagErrorCode" : "錯誤碼",
"diagErrorMessage" : "錯誤訊息",
"diagHttpStatus" : "HTTP 狀態",
"diagIPAddress" : "IP 位址",
"directUpdateNotificationTitle" : "有可用的更新項目",
"directUpdateNotificationMessage" : "有可用的新版 Web 資源。確認以更新。(檔案大小為 {0} MB。",
"directUpdateNotificationMessageKilobytes" : "有可用的新版 Web 資源。確認以更新。(檔案大小為 {0} KB。",
"directUpdateErrorTitle" : "更新失敗",
"directUpdateErrorMessage" : "直接更新失敗。",
"directUpdateErrorMessageNotEnoughStorage" : "有可用的應用程式更新,但裝置上的可用空間不足(需要大小:{0} MB可用空間{1} MB。",
"directUpdateErrorMessageFailedDownloadingZipFile" : "下載應用程式更新檔案失敗。",
"directUpdateErrorMessageFailedProcessingZipFile" : "處理應用程式更新檔案失敗。",
"downloadAppWebResourcesPleaseSpecifyAppID" : "無法下載應用程式資源。 請在「設定」畫面中指定「應用程式 ID」。",
"downloadAppWebResourcesAppIdNotExist" : "找不到應用程式 '{0}'。 請先將其部署到 IBM MobileFirst Platform Server。",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "無法下載應用程式資源。 請在「設定」畫面中指定「應用程式版本」。",
"downloadAppWebResourcesSkinIsNotValid" : "無法下載應用程式資源。 外觀:{0} 不存在。 請確定 getSkinName() 可解析為有效的外觀。",
"downloadAppWebResourcesAppVersionNotExist" : "找不到 {2} 適用的應用程式 '{0}' {1}",
"deviceAuthenticationFail" : "連線功能錯誤",
"saveCertificateFailure" : "無法儲存憑證",
"downloadAppWebResourcesConnectionToServerUnavailable" : "目前無法連線至伺服器。 無法下載應用程式資源。",
"expandWindow" : "展開應用程式加以使用",
"exit" : "結束",
"exitApplication" : "結束應用程式",
"error" : "錯誤",
"gadgetUpdateAvailable" : "有可用的應用程式更新",
"getNewVersion" : "取得新版本",
"handleTimeOut" : "{0} 的要求逾時。 請確定應用程式(特別是 Android 與 iPhone 應用程式)可使用該主機位址。",
"invalidUsernamePassword" : "無效的使用者名稱或密碼",
"keepAliveInBackgroundText" : "應用程式繼續在背景中執行",
"loading" : "載入中",
"login" : "登入",
"minimize" : "最小化",
"missingFeatureException" : "應用程式中缺少 {0},所以無法呼叫 {1}。 請在應用程式描述子中新增 {0},然後再行重建及部署。",
"name" : "名稱:",
"noInternet" : "無法連線至服務。",
"notificationTitle" : "服務通知",
"notAvailable" : "無法使用",
"ok" : "確定",
"password" : "密碼:",
"reload" : "重新載入",
"restore" : "還原",
"requestTimeout" : "應用程式無法連線至服務。",
"responseNotRecognized" : "非預期的回應。",
"settings" : "設定",
"serverError" : "程序呼叫錯誤。",
"tryAgain" : "重試",
"userInstanceAccessViolationException" : "嘗試登入不是為您登錄的應用程式。",
"unexpectedError" : "伺服器無法處理應用程式的要求。請稍後再試一次。",
"unresponsiveHost" : "服務目前無法使用。",
"update" : "更新",
"upgrade" : "升級",
"upgradeGadget" : "您的應用程式版本為 {0}。此應用程式已有版本 {1} 可供使用。請按一下「確定」予以下載及安裝。",
"wlclientInitFailure" : "錯誤",
"wlSettings" : "IBM MobileFirst Platform 設定",
"userEnrollmentUnsupportedOS" : "使用者憑證鑑別失敗:不受支援的用戶端平台。",
"failureCallingMethod" : "呼叫 {0} 失敗",
"challengeHandlingCanceled" : "已取消盤查處理程式作業。",
"unsupportedEnvironment" : "不支援的環境",
"redirect" : "重新導向"
}
@@ -0,0 +1,85 @@
{
"IBM-INTERNAL" : "PII user facing" ,
"accessDenied" : "拒绝访问",
"authFailure" : "处理应用程序请求时遇到错误。",
"applicationDenied" : "已禁用应用程序",
"browserIsNotSupported" : "当前不支持 {0}。",
"cancel" : "取消",
"close" : "关闭",
"cookiesAreDisabled" : "浏览器当前禁用 Cookie。 要使应用程序正常运行,必须启用 Cookie。",
"copyToClipboard" : "复制",
"details" : "详细信息",
"diagApp" : "应用程序诊断",
"diagTime" : "时间",
"diagApplicationName" : "应用程序名称",
"diagApplicationVersion" : "应用程序版本",
"diagServiceURL" : "服务 URL",
"diagDevicePlatform" : "设备平台",
"diagDeviceVersion" : "设备版本",
"diagScreenResolution" : "屏幕分辨率",
"diagAirplaneMode" : "飞行模式",
"diagUsingNetwork" : "使用网络",
"diagWifiName" : "WiFi 名称",
"diagMobileNetworkType" : "移动网络类型",
"diagCarrierName" : "运营商名称",
"diagErrorCode" : "错误代码",
"diagErrorMessage" : "错误消息",
"diagHttpStatus" : "HTTP 状态",
"diagIPAddress" : "IP 地址",
"directUpdateNotificationTitle" : "可用更新",
"directUpdateNotificationMessage" : "有新的 Web 资源可用,确认更新。(文件大小为 {0} MB。",
"directUpdateNotificationMessageKilobytes" : "有新的 Web 资源可用,确认更新。(文件大小为 {0} KB。",
"directUpdateErrorTitle" : "更新失败",
"directUpdateErrorMessage" : "直接更新失败。",
"directUpdateErrorMessageNotEnoughStorage" : "该应用程序有一个可用更新,但设备空间不足(所需大小:{0} MB可用空间{1} MB。",
"directUpdateErrorMessageFailedDownloadingZipFile" : "下载应用程序更新文件失败。",
"directUpdateErrorMessageFailedProcessingZipFile" : "处理应用程序更新文件失败。",
"downloadAppWebResourcesPleaseSpecifyAppID" : "无法下载应用程序资源。 请在“设置”屏幕上指定应用程序标识。",
"downloadAppWebResourcesAppIdNotExist" : "找不到应用程序“{0}”。 请先将该应用程序部署到 IBM MobileFirst Platform 服务器。",
"downloadAppWebResourcesPleaseSpecifyAppVersion" : "无法下载应用程序资源。 请在“设置”屏幕上指定应用程序版本。",
"downloadAppWebResourcesSkinIsNotValid" : "无法下载应用程序资源。 外表:{0} 不存在。 请确保 getSkinName() 解析为有效外表。",
"downloadAppWebResourcesAppVersionNotExist" : "无法为 {2} 找到应用程序“{0}”{1}",
"deviceAuthenticationFail" : "连接错误",
"saveCertificateFailure" : "无法保存证书",
"downloadAppWebResourcesConnectionToServerUnavailable" : "无法连接至服务器。 无法下载应用程序资源。",
"expandWindow" : "扩展应用程序以使用它",
"exit" : "退出",
"exitApplication" : "退出应用程序",
"error" : "错误",
"gadgetUpdateAvailable" : "应用程序更新可用",
"getNewVersion" : "获取新版本",
"handleTimeOut" : "对 {0} 的请求超时。 请确保应用程序可以使用该主机地址(尤其适用于 Android 和 iPhone 应用程序)。",
"invalidUsernamePassword" : "无效的用户名或密码",
"keepAliveInBackgroundText" : "应用程序一直在后台运行",
"loading" : "正在装入",
"login" : "登录",
"minimize" : "最小化",
"missingFeatureException" : "由于应用程序缺少 {0},因此调用 {1} 失败。 请将 {0} 添加至应用程序描述符,然后将其重新构建并部署。",
"name" : "名称:",
"noInternet" : "服务连接不可用。",
"notificationTitle" : "服务通知",
"notAvailable" : "不可用",
"ok" : "确定",
"password" : "密码:",
"reload" : "重新装入",
"restore" : "复原",
"requestTimeout" : "应用程序无法连接至服务。",
"responseNotRecognized" : "意外响应。",
"settings" : "设置",
"serverError" : "过程调用错误。",
"tryAgain" : "请重试",
"userInstanceAccessViolationException" : "您正在尝试登录到自己尚未注册的应用程序。",
"unexpectedError" : "服务器无法处理该应用程序的请求。请稍后重试。",
"unresponsiveHost" : "服务当前不可用。",
"update" : "更新",
"upgrade" : "升级",
"upgradeGadget" : "您的应用程序版本为 {0}。该应用程序的 V{1} 可用。请单击“确定”以下载并安装该版本。",
"wlclientInitFailure" : "错误",
"wlSettings" : "IBM MobileFirst Platform 设置",
"userEnrollmentUnsupportedOS" : "用户证书认证失败:不受支持的客户机平台。",
"failureCallingMethod" : "调用 {0} 失败",
"challengeHandlingCanceled" : "验证问题处理程序操作已取消。",
"unsupportedEnvironment" : "不支持的环境",
"redirect" : "重定向"
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,263 @@
/*
Licensed Materials - Property of IBM
(C) Copyright 2015 IBM Corp.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/* Copyright (C) Worklight Ltd. 2006-2012. All rights reserved. */
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
a, button {
cursor: pointer;
}
.show {
display: inherit;
}
.hide {
display: none !important;
}
.clear {
clear: both;
}
.floatLeft {
float: left;
}
.floatRight {
float: right;
}
.strong {
font-weight: bold;
}
.rtl {
direction: rtl;
text-align: right;
}
.ltr {
direction: ltr;
text-align: left;
}
.center {
text-align: center;
}
.max {
height: 100%;
width: 100%;
}
/******************************** END BASE CSS ***********************************/
body {
position: relative;
}
#blockOuter {
width: 100%;
background: #fff;
color: inherit;
overflow: hidden;
position: absolute;
z-index: 110; /* Must be bigger than authenticator z-index (100). */
left: 0;
top: 0;
height: 100%;
}
/* The id is set in the upgrade version in messages.js */
#downloadNewVersion {
cursor: pointer;
text-decoration: underline;
color: #0000ff;
}
#auth {
display: none;
position: relative;
height: 100%;
width: 100%;
}
#diagnostic {
background-color: white;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.diagnosticTable td {
border-width: 1px;
border-style: solid;
border-color: black;
font-size: 16px;
padding: 2px;
color : black;
width: 50%;
word-break: break-all;
}
.diagnosticButtons {
font-size:16px;
height:40px;
width: auto;
font-weight: normal;
margin: 5px;
}
/* Start styling for the modal window */
#WLdialogContainer {
position: static;
}
#WLdialogOverlay {
background: #fff;
height: 100%;
left: 0;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
position: absolute;
position: fixed;
text-align: center;
top: 0;
width: 100%;
z-index: 16777269;
}
#WLdialog {
background: #fff;
border: 1px solid #ccc;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
border-radius: 10px;
font-family: helvetica, arial, sans-serif;
font-size: 12px;
margin: 0 auto;
padding: 5px;
position: absolute;
position: fixed;
width: 280px;
z-index: 16777270;
}
#WLdialogTitle {
font-size: 14px;
font-weight: bold;
padding: 5px;
text-align: center;
}
#WLdialogBody {
margin: 5px 0;
min-height: 48px;
}
#WLdialog button {
margin: 0 5px;
}
/* End styling for the modal window */
/* Start styling for the busy modal window */
#WLbusyContainer {
position: static;
}
#WLbusyOverlay {
background: #fff;
height: 100%;
left: 0;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
-moz-opacity:0.5;
-o-opacity: 0.5;
opacity: 0.5;
position: absolute;
top: 0;
width: 100%;
z-index: 9998;
}
#WLbusy {
background: #fff;
border: 1px solid #ccc;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
border-radius: 10px;
margin: 0 auto;
overflow: hidden;
padding: 5px;
position: absolute;
width: 240px;
z-index: 9999;
}
#WLbusyTitle {
color: #000;
font-family: helvetica, arial, sans-serif;
font-size: 14px;
font-weight: bold;
line-height: 14px;
padding: 5px;
text-align: center;
}
/* End styling for the busy modal window */
html, body {
overflow: visible;
}
#debugPanel {
top: 40px;
}
.diagnosticButtons {
border-color: #DDDDDD;
}
/* Worklight class for hiding elements in background events */
.WLHideOnEnteringBackgroundHidden {
visibility: hidden !important;
}
/*Optional iOS 7 status bar filler*/
#wl_ios7bar{
background-color: white;
height: 15pt;
position: fixed;
top: 0;
left : 0;
width:100%;
}
body.wl_ios7{
padding-top: 15pt;
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,157 @@
cordova.define("cordova-plugin-screen-orientation.screenorientation", function(require, exports, module) {
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var screenOrientation = {};
if (!window.OrientationType) {
window.OrientationType = {
'portrait-primary': 0,
'portrait-secondary': 180,
'landscape-primary': 90,
'landscape-secondary': -90
};
}
if (!window.OrientationLockType) {
window.OrientationLockType = {
'portrait-primary': 1,
'portrait-secondary': 2,
'landscape-primary': 4,
'landscape-secondary': 8,
'portrait': 3, // either portrait-primary or portrait-secondary.
'landscape': 12, // either landscape-primary or landscape-secondary.
'any': 15 // All orientations are supported (unlocked orientation)
};
}
var orientationMask = 1;
screenOrientation.setOrientation = function(orientation) {
orientationMask = window.OrientationLockType[orientation];
cordova.exec(null, null, "CDVOrientation", "screenOrientation", [orientationMask, orientation]);
};
if (!screen.orientation) {
screen.orientation = {};
}
setOrientationProperties();
function addScreenOrientationApi(screenObject) {
if (screenObject.unlock || screenObject.lock) {
screenObject.nativeLock = screenObject.lock;
}
screenObject.lock = function(orientation) {
var promiseLock;
var p = new Promise(function(resolve, reject) {
if (screenObject.nativeLock) {
promiseLock = screenObject.nativeLock(orientation);
promiseLock.then(function success(res) {
resolve();
}, function error(err) {
screenObject.nativeLock = null;
resolveOrientation(orientation, resolve, reject);
});
} else {
resolveOrientation(orientation, resolve, reject);
}
});
return p;
};
screenObject.unlock = function() {
screenOrientation.setOrientation('any');
};
}
function resolveOrientation(orientation, resolve, reject) {
if (!OrientationLockType.hasOwnProperty(orientation)) {
var err = new Error();
err.name = "NotSupportedError";
reject(err); //"cannot change orientation");
} else {
screenOrientation.setOrientation(orientation);
resolve("Orientation set"); // orientation change successful
}
}
addScreenOrientationApi(screen.orientation);
var onChangeListener = null;
Object.defineProperty(screen.orientation, 'onchange', {
set: function(listener) {
if (onChangeListener) {
screen.orientation.removeEventListener('change', onChangeListener);
}
onChangeListener = listener;
if (onChangeListener) {
screen.orientation.addEventListener('change', onChangeListener);
}
},
get: function() {
return (onChangeListener ? onChangeListener : null);
},
enumerable: true,
});
var evtTarget = new XMLHttpRequest(); //document.createElement('div');
var orientationchange = function() {
setOrientationProperties();
var event = document.createEvent('Events');
event.initEvent("change", false, false);
evtTarget.dispatchEvent(event);
};
screen.orientation.addEventListener = function(a,b,c) {
return evtTarget.addEventListener(a,b,c);
};
screen.orientation.removeEventListener = function(a,b,c) {
return evtTarget.removeEventListener(a,b,c);
};
function setOrientationProperties() {
switch (window.orientation) {
case 0:
screen.orientation.type = 'portrait-primary';
break;
case 90:
screen.orientation.type = 'landscape-primary';
break;
case 180:
screen.orientation.type = 'portrait-secondary';
break;
case -90:
screen.orientation.type = 'landscape-secondary';
break;
default:
screen.orientation.type = 'portrait-primary';
break;
}
screen.orientation.angle = window.orientation || 0;
}
window.addEventListener("orientationchange", orientationchange, true);
module.exports = screenOrientation;
});