@icreate/ics-chromely-plugin-core
Advanced tools
Comparing version 0.0.16-beta1 to 0.0.16-beta2
@@ -225,6 +225,16 @@ import { LogLevels } from '@icreate/core'; | ||
this.cefSharp = isNode ? { PostMessage: function () { } } : window['CefSharp']; | ||
this.baseUrl = ''; | ||
this.tokenId = ''; | ||
this.baseUrl = isNode ? '' : window['Chromely'] ? window['Chromely']['baseUrl'] : ''; | ||
this.tokenId = isNode ? '' : window['Chromely'] ? window['Chromely']['tokenId'] : ''; | ||
} | ||
/** | ||
* 获取 Chromely 实例 | ||
* @returns {IChromely} | ||
*/ | ||
Chromely.getInstance = function () { | ||
if (window['Chromely'] == null) { | ||
window['Chromely'] = new Chromely(); | ||
} | ||
return window['Chromely']; | ||
}; | ||
/** | ||
* 接受cef分发事件,触发容器中的该属性eventName的回调函数 | ||
@@ -477,20 +487,9 @@ * @param {*} eventName 事件名称 | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-06-06 16:57:57 | ||
* @LastEditTime: 2022-09-15 18:04:14 | ||
* @Descripttion: | ||
* @FilePath: \ics-chromely-plugin-core\src\ics-chromely-plugin-core.ts | ||
*/ | ||
var chromely = new Chromely(); | ||
if (typeof window !== 'undefined') { | ||
// 设置baseUrl | ||
if (window['Chromely'] && window['Chromely']['baseUrl']) { | ||
chromely.baseUrl = window['Chromely']['baseUrl']; | ||
} | ||
// 设置tokenId | ||
if (window['Chromely'] && window['Chromely']['tokenId']) { | ||
chromely.tokenId = window['Chromely']['tokenId']; | ||
} | ||
window['Chromely'] = chromely; | ||
} | ||
var chromely = Chromely.getInstance(); | ||
export { Browser as BrowserHelper, chromely as Chromely, ConfigHelper, Hardware as HardwareHelper, Logger as LocalLogger, Printer as PrinterHelper, Regedit as RegeditHelper, Window as WindowHelper }; | ||
//# sourceMappingURL=ics-chromely-plugin-core.es5.js.map |
@@ -232,6 +232,16 @@ (function (global, factory) { | ||
this.cefSharp = isNode ? { PostMessage: function () { } } : window['CefSharp']; | ||
this.baseUrl = ''; | ||
this.tokenId = ''; | ||
this.baseUrl = isNode ? '' : window['Chromely'] ? window['Chromely']['baseUrl'] : ''; | ||
this.tokenId = isNode ? '' : window['Chromely'] ? window['Chromely']['tokenId'] : ''; | ||
} | ||
/** | ||
* 获取 Chromely 实例 | ||
* @returns {IChromely} | ||
*/ | ||
Chromely.getInstance = function () { | ||
if (window['Chromely'] == null) { | ||
window['Chromely'] = new Chromely(); | ||
} | ||
return window['Chromely']; | ||
}; | ||
/** | ||
* 接受cef分发事件,触发容器中的该属性eventName的回调函数 | ||
@@ -484,18 +494,7 @@ * @param {*} eventName 事件名称 | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-06-06 16:57:57 | ||
* @LastEditTime: 2022-09-15 18:04:14 | ||
* @Descripttion: | ||
* @FilePath: \ics-chromely-plugin-core\src\ics-chromely-plugin-core.ts | ||
*/ | ||
var chromely = new Chromely(); | ||
if (typeof window !== 'undefined') { | ||
// 设置baseUrl | ||
if (window['Chromely'] && window['Chromely']['baseUrl']) { | ||
chromely.baseUrl = window['Chromely']['baseUrl']; | ||
} | ||
// 设置tokenId | ||
if (window['Chromely'] && window['Chromely']['tokenId']) { | ||
chromely.tokenId = window['Chromely']['tokenId']; | ||
} | ||
window['Chromely'] = chromely; | ||
} | ||
var chromely = Chromely.getInstance(); | ||
@@ -502,0 +501,0 @@ exports.BrowserHelper = Browser; |
@@ -9,6 +9,16 @@ "use strict"; | ||
this.cefSharp = isNode ? { PostMessage: function () { } } : window['CefSharp']; | ||
this.baseUrl = ''; | ||
this.tokenId = ''; | ||
this.baseUrl = isNode ? '' : window['Chromely'] ? window['Chromely']['baseUrl'] : ''; | ||
this.tokenId = isNode ? '' : window['Chromely'] ? window['Chromely']['tokenId'] : ''; | ||
} | ||
/** | ||
* 获取 Chromely 实例 | ||
* @returns {IChromely} | ||
*/ | ||
Chromely.getInstance = function () { | ||
if (window['Chromely'] == null) { | ||
window['Chromely'] = new Chromely(); | ||
} | ||
return window['Chromely']; | ||
}; | ||
/** | ||
* 接受cef分发事件,触发容器中的该属性eventName的回调函数 | ||
@@ -15,0 +25,0 @@ * @param {*} eventName 事件名称 |
@@ -8,3 +8,3 @@ "use strict"; | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-06-06 16:57:57 | ||
* @LastEditTime: 2022-09-15 18:04:14 | ||
* @Descripttion: | ||
@@ -28,15 +28,4 @@ * @FilePath: \ics-chromely-plugin-core\src\ics-chromely-plugin-core.ts | ||
exports.ConfigHelper = config_1.default; | ||
var chromely = new chromely_1.default(); | ||
var chromely = chromely_1.default.getInstance(); | ||
exports.Chromely = chromely; | ||
if (typeof window !== 'undefined') { | ||
// 设置baseUrl | ||
if (window['Chromely'] && window['Chromely']['baseUrl']) { | ||
chromely.baseUrl = window['Chromely']['baseUrl']; | ||
} | ||
// 设置tokenId | ||
if (window['Chromely'] && window['Chromely']['tokenId']) { | ||
chromely.tokenId = window['Chromely']['tokenId']; | ||
} | ||
window['Chromely'] = chromely; | ||
} | ||
//# sourceMappingURL=ics-chromely-plugin-core.js.map |
@@ -8,2 +8,7 @@ import { IChromely } from '../interfaces/interfaces'; | ||
tokenId: string; | ||
/** | ||
* 获取 Chromely 实例 | ||
* @returns {IChromely} | ||
*/ | ||
static getInstance(): IChromely; | ||
constructor(); | ||
@@ -10,0 +15,0 @@ /** |
import LocalLogger from './core/logger'; | ||
import BrowserHelper from './core/browser'; | ||
import WindowHelper from './core/window'; | ||
import Chromely from './core/chromely'; | ||
import PrinterHelper from './core/printer'; | ||
@@ -9,3 +8,3 @@ import HardwareHelper from './core/hardware'; | ||
import ConfigHelper from './core/config'; | ||
declare const chromely: Chromely; | ||
declare const chromely: import("./interfaces/interfaces").IChromely; | ||
export { LocalLogger, BrowserHelper, WindowHelper, PrinterHelper, HardwareHelper, RegeditHelper, ConfigHelper, chromely as Chromely }; |
@@ -17,2 +17,4 @@ import { LogLevels } from '@icreate/core/dist/types/interfaces/interfaces'; | ||
export interface IChromely { | ||
baseUrl: string; | ||
tokenId: string; | ||
isChromely: boolean; | ||
@@ -19,0 +21,0 @@ cefSharp: Object; |
{ | ||
"name": "@icreate/ics-chromely-plugin-core", | ||
"version": "0.0.16-beta1", | ||
"version": "0.0.16-beta2", | ||
"description": "提供Ics Chromely Client核心本地操作插件js sdk,包含本地日志、主窗体控制、打开三方浏览器、打印机列表、硬件IP和Mac地址、本地配置获取和注册表读写等", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -5,3 +5,3 @@ <!-- | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-09-01 17:08:07 | ||
* @LastEditTime: 2022-09-15 18:10:27 | ||
* @Descripttion: | ||
@@ -17,2 +17,3 @@ * @FilePath: \ics-chromely-plugin-core\README.md | ||
``` | ||
0.0.17 修改Chromely为单例模式 | ||
0.0.16 WindowHelper增加关闭和重绘闪屏README描述 | ||
@@ -19,0 +20,0 @@ 0.0.15 WindowHelper增加关闭和重绘闪屏 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123764
1750
165