Initial Commit on git.saherelm.ir ...

This commit is contained in:
2026-08-20 15:42:40 +03:30
commit fac270d301
779 changed files with 79360 additions and 0 deletions
@@ -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,87 @@
cordova.define("cordova-plugin-ionic-keyboard.keyboard", function(require, exports, module) {
var argscheck = require('cordova/argscheck'),
utils = require('cordova/utils'),
exec = require('cordova/exec'),
channel = require('cordova/channel');
var Keyboard = function () {};
Keyboard.fireOnShow = function (height) {
Keyboard.isVisible = true;
cordova.fireWindowEvent('keyboardDidShow', {
'keyboardHeight': height
});
// To support the keyboardAttach directive listening events
// inside Ionic's main bundle
cordova.fireWindowEvent('native.keyboardshow', {
'keyboardHeight': height
});
};
Keyboard.fireOnHide = function () {
Keyboard.isVisible = false;
cordova.fireWindowEvent('keyboardDidHide');
// To support the keyboardAttach directive listening events
// inside Ionic's main bundle
cordova.fireWindowEvent('native.keyboardhide');
};
Keyboard.fireOnHiding = function () {
cordova.fireWindowEvent('keyboardWillHide');
};
Keyboard.fireOnShowing = function (height) {
cordova.fireWindowEvent('keyboardWillShow', {
'keyboardHeight': height
});
};
Keyboard.hideFormAccessoryBar = Keyboard.hideKeyboardAccessoryBar = function (hide) {
console.warn("Keyboard.hideKeyboardAccessoryBar() not supported in Android");
};
Keyboard.hide = function () {
exec(null, null, "CDVIonicKeyboard", "hide", []);
};
Keyboard.show = function () {
exec(null, null, "CDVIonicKeyboard", "show", []);
};
Keyboard.disableScroll = function (disable) {
console.warn("Keyboard.disableScroll() not supported in Android");
};
Keyboard.setResizeMode = function (mode) {
console.warn("Keyboard.setResizeMode() not supported in Android");
}
Keyboard.setKeyboardStyle = function(style) {
console.warn("Keyboard.setKeyboardStyle() not supported in Android");
};
channel.onCordovaReady.subscribe(function () {
exec(success, null, 'CDVIonicKeyboard', 'init', []);
function success(msg) {
var action = msg.charAt(0);
if (action === 'S') {
var keyboardHeight = parseInt(msg.substr(1));
Keyboard.fireOnShowing(keyboardHeight);
Keyboard.fireOnShow(keyboardHeight);
} else if (action === 'H') {
Keyboard.fireOnHiding();
Keyboard.fireOnHide();
}
}
});
Keyboard.isVisible = false;
module.exports = Keyboard;
});
@@ -0,0 +1,33 @@
cordova.define("cordova-plugin-ionic-webview.IonicWebView", function(require, exports, module) {
var exec = require('cordova/exec');
var WebView = {
convertFileSrc: function(url) {
if (!url) {
return url;
}
if (url.indexOf('/')===0) {
return window.WEBVIEW_SERVER_URL + '/_app_file_' + url;
}
if (url.indexOf('file://')===0) {
return window.WEBVIEW_SERVER_URL + url.replace('file://', '/_app_file_');
}
if (url.indexOf('content://')===0) {
return window.WEBVIEW_SERVER_URL + url.replace('content:/', '/_app_content_');
}
return url;
},
setServerBasePath: function(path) {
exec(null, null, 'IonicWebView', 'setServerBasePath', [path]);
},
getServerBasePath: function(callback) {
exec(callback, null, 'IonicWebView', 'getServerBasePath', []);
},
persistServerBasePath: function() {
exec(null, null, 'IonicWebView', 'persistServerBasePath', []);
}
}
module.exports = WebView;
});
@@ -0,0 +1,36 @@
cordova.define("cordova-plugin-splashscreen.SplashScreen", 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 splashscreen = {
show:function() {
exec(null, null, "SplashScreen", "show", []);
},
hide:function() {
exec(null, null, "SplashScreen", "hide", []);
}
};
module.exports = splashscreen;
});
@@ -0,0 +1,116 @@
cordova.define("cordova-plugin-statusbar.statusbar", 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.
*
*/
/* global cordova */
var exec = require('cordova/exec');
var namedColors = {
"black": "#000000",
"darkGray": "#A9A9A9",
"lightGray": "#D3D3D3",
"white": "#FFFFFF",
"gray": "#808080",
"red": "#FF0000",
"green": "#00FF00",
"blue": "#0000FF",
"cyan": "#00FFFF",
"yellow": "#FFFF00",
"magenta": "#FF00FF",
"orange": "#FFA500",
"purple": "#800080",
"brown": "#A52A2A"
};
var StatusBar = {
isVisible: true,
overlaysWebView: function (doOverlay) {
exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]);
},
styleDefault: function () {
// dark text ( to be used on a light background )
exec(null, null, "StatusBar", "styleDefault", []);
},
styleLightContent: function () {
// light text ( to be used on a dark background )
exec(null, null, "StatusBar", "styleLightContent", []);
},
styleBlackTranslucent: function () {
// #88000000 ? Apple says to use lightContent instead
exec(null, null, "StatusBar", "styleBlackTranslucent", []);
},
styleBlackOpaque: function () {
// #FF000000 ? Apple says to use lightContent instead
exec(null, null, "StatusBar", "styleBlackOpaque", []);
},
backgroundColorByName: function (colorname) {
return StatusBar.backgroundColorByHexString(namedColors[colorname]);
},
backgroundColorByHexString: function (hexString) {
if (hexString.charAt(0) !== "#") {
hexString = "#" + hexString;
}
if (hexString.length === 4) {
var split = hexString.split("");
hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3];
}
exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]);
},
hide: function () {
exec(null, null, "StatusBar", "hide", []);
StatusBar.isVisible = false;
},
show: function () {
exec(null, null, "StatusBar", "show", []);
StatusBar.isVisible = true;
}
};
// prime it. setTimeout so that proxy gets time to init
window.setTimeout(function () {
exec(function (res) {
if (typeof res == 'object') {
if (res.type == 'tap') {
cordova.fireWindowEvent('statusTap');
}
} else {
StatusBar.isVisible = res;
}
}, null, "StatusBar", "_ready", []);
}, 0);
module.exports = StatusBar;
});