New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gl-w-frontend

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-w-frontend - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

index.html

39

lib/esm/index.d.ts

@@ -1,12 +0,12 @@

declare const Array: {
declare const array: {
removeArrayDuplicateLegacy: (array: any[]) => any[];
sortByKey: (array: any[], key: string, asc: boolean) => PromiseLike<any[]>;
};
declare const ArraySort: {
declare const arraySort: {
sortByKey: (array: any[], key: string, asc: boolean) => PromiseLike<any[]>;
};
declare const ArrayRemove: {
declare const arrayRemove: {
removeArrayDuplicateLegacy: (array: any[]) => any[];
};
declare const Attachment: {
declare const attachment: {
validateFile: (input: HTMLInputElement, accepts: string[]) => boolean;

@@ -17,9 +17,9 @@ validateFileSize: (input: HTMLInputElement) => boolean;

};
declare const AttachmentConvert: {
declare const attachmentConvert: {
textFileToUrlImage: (file: File) => PromiseLike<string>;
};
declare const AttachmentParse: {
declare const attachmentParse: {
parseAcceptFiles: (accepts: string) => string[];
};
declare const Browser: {
declare const browser: {
isIE: () => boolean;

@@ -32,7 +32,7 @@ isBeforeIE11: () => boolean;

};
declare const BrowserVersion: {
declare const browserVersion: {
isIE: () => boolean;
isBeforeIE11: () => boolean;
};
declare const BrowserFullscreen: {
declare const browserFullscreen: {
disableFullscreenListener: () => void;

@@ -43,2 +43,21 @@ fullscreenListener: (menuButton: import("./scripts/core/services/menu/core-services-menu.interfaces").IMenuButton, alt: import("./scripts/core/services/menu/core-services-menu.interfaces").IFullScreenAlt, src: import("./scripts/core/services/menu/core-services-menu.interfaces").IFullScreenSrc, showLog?: boolean) => void;

};
export { Array, ArraySort, ArrayRemove, Browser, BrowserVersion, BrowserFullscreen, Attachment, AttachmentConvert, AttachmentParse };
declare const comboBox: {
initialize: (combobox: HTMLSelectElement, callback: any, invalidCallback: any) => void;
loadData: (combobox: HTMLSelectElement, data: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], keepValue: boolean) => Promise<unknown>;
dataByValue: (arrayData: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], value: string) => string;
disableInput: (combobox: HTMLSelectElement, disable: boolean) => void;
};
declare const comboBoxCore: {
initialize: (combobox: HTMLSelectElement, callback: any, invalidCallback: any) => void;
loadData: (combobox: HTMLSelectElement, data: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], keepValue: boolean) => Promise<unknown>;
};
declare const comboBoxData: {
dataByValue: (arrayData: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], value: string) => string;
};
declare const comboBoxDom: {
disableInput: (combobox: HTMLSelectElement, disable: boolean) => void;
};
declare const elements: {
removeChildElements: (elementClassId: string | HTMLElement) => void;
};
export { array, arraySort, arrayRemove, attachment, attachmentConvert, attachmentParse, browser, browserVersion, browserFullscreen, comboBox, comboBoxCore, comboBoxData, comboBoxDom, elements };

@@ -0,14 +1,42 @@

// import * as $ from 'jquery';
// import 'node_modules/jquery-ui-dist/jquery-ui.js';
import { validateFile, validateFileSize, textFileToUrlImage, parseAcceptFiles } from './scripts/core/services/attachment/core-services-attachment.service';
import { removeArrayDuplicateLegacy, sortByKey } from './scripts/core/services/array/core-services-array.service';
import { isBeforeIE11, isIE, disableFullscreenListener, fullscreenListener, toggleFullScreen, hasFullscreen } from './scripts/core/services/browser/core-services-browser.service';
var Array = { removeArrayDuplicateLegacy: removeArrayDuplicateLegacy, sortByKey: sortByKey };
var ArraySort = { sortByKey: sortByKey };
var ArrayRemove = { removeArrayDuplicateLegacy: removeArrayDuplicateLegacy };
var Attachment = { validateFile: validateFile, validateFileSize: validateFileSize, textFileToUrlImage: textFileToUrlImage, parseAcceptFiles: parseAcceptFiles };
var AttachmentConvert = { textFileToUrlImage: textFileToUrlImage };
var AttachmentParse = { parseAcceptFiles: parseAcceptFiles };
var Browser = { isIE: isIE, isBeforeIE11: isBeforeIE11, disableFullscreenListener: disableFullscreenListener, fullscreenListener: fullscreenListener, toggleFullScreen: toggleFullScreen, hasFullscreen: hasFullscreen };
var BrowserVersion = { isIE: isIE, isBeforeIE11: isBeforeIE11 };
var BrowserFullscreen = { disableFullscreenListener: disableFullscreenListener, fullscreenListener: fullscreenListener, toggleFullScreen: toggleFullScreen, hasFullscreen: hasFullscreen };
export { Array, ArraySort, ArrayRemove, Browser, BrowserVersion, BrowserFullscreen, Attachment, AttachmentConvert, AttachmentParse };
import { initialize, loadData, dataByValue, disableInput } from './scripts/core/services/combobox/core-services-combobox.service';
import { removeChildElements } from './scripts/core/services/elements/core-services-elements.service';
// region Array
var array = { removeArrayDuplicateLegacy: removeArrayDuplicateLegacy, sortByKey: sortByKey };
var arraySort = { sortByKey: sortByKey };
var arrayRemove = { removeArrayDuplicateLegacy: removeArrayDuplicateLegacy };
// endregion
// region Attachment
var attachment = { validateFile: validateFile, validateFileSize: validateFileSize, textFileToUrlImage: textFileToUrlImage, parseAcceptFiles: parseAcceptFiles };
var attachmentConvert = { textFileToUrlImage: textFileToUrlImage };
var attachmentParse = { parseAcceptFiles: parseAcceptFiles };
// endregion
// region Browser
var browser = { isIE: isIE, isBeforeIE11: isBeforeIE11, disableFullscreenListener: disableFullscreenListener, fullscreenListener: fullscreenListener, toggleFullScreen: toggleFullScreen, hasFullscreen: hasFullscreen };
var browserVersion = { isIE: isIE, isBeforeIE11: isBeforeIE11 };
var browserFullscreen = { disableFullscreenListener: disableFullscreenListener, fullscreenListener: fullscreenListener, toggleFullScreen: toggleFullScreen, hasFullscreen: hasFullscreen };
// endregion
// region ComboBox
var comboBox = { initialize: initialize, loadData: loadData, dataByValue: dataByValue, disableInput: disableInput };
var comboBoxCore = { initialize: initialize, loadData: loadData };
var comboBoxData = { dataByValue: dataByValue };
var comboBoxDom = { disableInput: disableInput };
// endregion
// region Elements
var elements = { removeChildElements: removeChildElements };
// endregion
// module.exports = {
// array, arraySort, arrayRemove,
// attachment, attachmentConvert, attachmentParse,
// browser, browserVersion, browserFullscreen,
// comboBox, comboBoxCore, comboBoxData, comboBoxDom,
// elements
// };
export {
// $,
array, arraySort, arrayRemove, attachment, attachmentConvert, attachmentParse, browser, browserVersion, browserFullscreen, comboBox, comboBoxCore, comboBoxData, comboBoxDom, elements };
//# sourceMappingURL=index.js.map

@@ -0,0 +0,0 @@ export interface IFullscreenResult {

@@ -0,0 +0,0 @@ import { IFullScreenAlt, IFullScreenSrc, IMenuButton } from '../menu/core-services-menu.interfaces';

@@ -0,0 +0,0 @@ import * as screenfull from 'screenfull';

@@ -0,0 +0,0 @@ export interface IMenuButton {

@@ -1,12 +0,12 @@

declare const Array: {
declare const array: {
removeArrayDuplicateLegacy: (array: any[]) => any[];
sortByKey: (array: any[], key: string, asc: boolean) => PromiseLike<any[]>;
};
declare const ArraySort: {
declare const arraySort: {
sortByKey: (array: any[], key: string, asc: boolean) => PromiseLike<any[]>;
};
declare const ArrayRemove: {
declare const arrayRemove: {
removeArrayDuplicateLegacy: (array: any[]) => any[];
};
declare const Attachment: {
declare const attachment: {
validateFile: (input: HTMLInputElement, accepts: string[]) => boolean;

@@ -17,9 +17,9 @@ validateFileSize: (input: HTMLInputElement) => boolean;

};
declare const AttachmentConvert: {
declare const attachmentConvert: {
textFileToUrlImage: (file: File) => PromiseLike<string>;
};
declare const AttachmentParse: {
declare const attachmentParse: {
parseAcceptFiles: (accepts: string) => string[];
};
declare const Browser: {
declare const browser: {
isIE: () => boolean;

@@ -32,7 +32,7 @@ isBeforeIE11: () => boolean;

};
declare const BrowserVersion: {
declare const browserVersion: {
isIE: () => boolean;
isBeforeIE11: () => boolean;
};
declare const BrowserFullscreen: {
declare const browserFullscreen: {
disableFullscreenListener: () => void;

@@ -43,2 +43,21 @@ fullscreenListener: (menuButton: import("./scripts/core/services/menu/core-services-menu.interfaces").IMenuButton, alt: import("./scripts/core/services/menu/core-services-menu.interfaces").IFullScreenAlt, src: import("./scripts/core/services/menu/core-services-menu.interfaces").IFullScreenSrc, showLog?: boolean) => void;

};
export { Array, ArraySort, ArrayRemove, Browser, BrowserVersion, BrowserFullscreen, Attachment, AttachmentConvert, AttachmentParse };
declare const comboBox: {
initialize: (combobox: HTMLSelectElement, callback: any, invalidCallback: any) => void;
loadData: (combobox: HTMLSelectElement, data: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], keepValue: boolean) => Promise<unknown>;
dataByValue: (arrayData: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], value: string) => string;
disableInput: (combobox: HTMLSelectElement, disable: boolean) => void;
};
declare const comboBoxCore: {
initialize: (combobox: HTMLSelectElement, callback: any, invalidCallback: any) => void;
loadData: (combobox: HTMLSelectElement, data: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], keepValue: boolean) => Promise<unknown>;
};
declare const comboBoxData: {
dataByValue: (arrayData: import("./scripts/core/services/combobox/core-services-combobox.interface").IComboBoxData[], value: string) => string;
};
declare const comboBoxDom: {
disableInput: (combobox: HTMLSelectElement, disable: boolean) => void;
};
declare const elements: {
removeChildElements: (elementClassId: string | HTMLElement) => void;
};
export { array, arraySort, arrayRemove, attachment, attachmentConvert, attachmentParse, browser, browserVersion, browserFullscreen, comboBox, comboBoxCore, comboBoxData, comboBoxDom, elements };

@@ -1,1 +0,47 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var core_services_attachment_service_1=require("./scripts/core/services/attachment/core-services-attachment.service");var core_services_array_service_1=require("./scripts/core/services/array/core-services-array.service");var core_services_browser_service_1=require("./scripts/core/services/browser/core-services-browser.service");var Array={removeArrayDuplicateLegacy:core_services_array_service_1.removeArrayDuplicateLegacy,sortByKey:core_services_array_service_1.sortByKey};exports.Array=Array;var ArraySort={sortByKey:core_services_array_service_1.sortByKey};exports.ArraySort=ArraySort;var ArrayRemove={removeArrayDuplicateLegacy:core_services_array_service_1.removeArrayDuplicateLegacy};exports.ArrayRemove=ArrayRemove;var Attachment={validateFile:core_services_attachment_service_1.validateFile,validateFileSize:core_services_attachment_service_1.validateFileSize,textFileToUrlImage:core_services_attachment_service_1.textFileToUrlImage,parseAcceptFiles:core_services_attachment_service_1.parseAcceptFiles};exports.Attachment=Attachment;var AttachmentConvert={textFileToUrlImage:core_services_attachment_service_1.textFileToUrlImage};exports.AttachmentConvert=AttachmentConvert;var AttachmentParse={parseAcceptFiles:core_services_attachment_service_1.parseAcceptFiles};exports.AttachmentParse=AttachmentParse;var Browser={isIE:core_services_browser_service_1.isIE,isBeforeIE11:core_services_browser_service_1.isBeforeIE11,disableFullscreenListener:core_services_browser_service_1.disableFullscreenListener,fullscreenListener:core_services_browser_service_1.fullscreenListener,toggleFullScreen:core_services_browser_service_1.toggleFullScreen,hasFullscreen:core_services_browser_service_1.hasFullscreen};exports.Browser=Browser;var BrowserVersion={isIE:core_services_browser_service_1.isIE,isBeforeIE11:core_services_browser_service_1.isBeforeIE11};exports.BrowserVersion=BrowserVersion;var BrowserFullscreen={disableFullscreenListener:core_services_browser_service_1.disableFullscreenListener,fullscreenListener:core_services_browser_service_1.fullscreenListener,toggleFullScreen:core_services_browser_service_1.toggleFullScreen,hasFullscreen:core_services_browser_service_1.hasFullscreen};exports.BrowserFullscreen=BrowserFullscreen;
"use strict";
// import * as $ from 'jquery';
// import 'node_modules/jquery-ui-dist/jquery-ui.js';
Object.defineProperty(exports, "__esModule", { value: true });
var core_services_attachment_service_1 = require("./scripts/core/services/attachment/core-services-attachment.service");
var core_services_array_service_1 = require("./scripts/core/services/array/core-services-array.service");
var core_services_browser_service_1 = require("./scripts/core/services/browser/core-services-browser.service");
var core_services_combobox_service_1 = require("./scripts/core/services/combobox/core-services-combobox.service");
var core_services_elements_service_1 = require("./scripts/core/services/elements/core-services-elements.service");
// region Array
var array = { removeArrayDuplicateLegacy: core_services_array_service_1.removeArrayDuplicateLegacy, sortByKey: core_services_array_service_1.sortByKey };
exports.array = array;
var arraySort = { sortByKey: core_services_array_service_1.sortByKey };
exports.arraySort = arraySort;
var arrayRemove = { removeArrayDuplicateLegacy: core_services_array_service_1.removeArrayDuplicateLegacy };
exports.arrayRemove = arrayRemove;
// endregion
// region Attachment
var attachment = { validateFile: core_services_attachment_service_1.validateFile, validateFileSize: core_services_attachment_service_1.validateFileSize, textFileToUrlImage: core_services_attachment_service_1.textFileToUrlImage, parseAcceptFiles: core_services_attachment_service_1.parseAcceptFiles };
exports.attachment = attachment;
var attachmentConvert = { textFileToUrlImage: core_services_attachment_service_1.textFileToUrlImage };
exports.attachmentConvert = attachmentConvert;
var attachmentParse = { parseAcceptFiles: core_services_attachment_service_1.parseAcceptFiles };
exports.attachmentParse = attachmentParse;
// endregion
// region Browser
var browser = { isIE: core_services_browser_service_1.isIE, isBeforeIE11: core_services_browser_service_1.isBeforeIE11, disableFullscreenListener: core_services_browser_service_1.disableFullscreenListener, fullscreenListener: core_services_browser_service_1.fullscreenListener, toggleFullScreen: core_services_browser_service_1.toggleFullScreen, hasFullscreen: core_services_browser_service_1.hasFullscreen };
exports.browser = browser;
var browserVersion = { isIE: core_services_browser_service_1.isIE, isBeforeIE11: core_services_browser_service_1.isBeforeIE11 };
exports.browserVersion = browserVersion;
var browserFullscreen = { disableFullscreenListener: core_services_browser_service_1.disableFullscreenListener, fullscreenListener: core_services_browser_service_1.fullscreenListener, toggleFullScreen: core_services_browser_service_1.toggleFullScreen, hasFullscreen: core_services_browser_service_1.hasFullscreen };
exports.browserFullscreen = browserFullscreen;
// endregion
// region ComboBox
var comboBox = { initialize: core_services_combobox_service_1.initialize, loadData: core_services_combobox_service_1.loadData, dataByValue: core_services_combobox_service_1.dataByValue, disableInput: core_services_combobox_service_1.disableInput };
exports.comboBox = comboBox;
var comboBoxCore = { initialize: core_services_combobox_service_1.initialize, loadData: core_services_combobox_service_1.loadData };
exports.comboBoxCore = comboBoxCore;
var comboBoxData = { dataByValue: core_services_combobox_service_1.dataByValue };
exports.comboBoxData = comboBoxData;
var comboBoxDom = { disableInput: core_services_combobox_service_1.disableInput };
exports.comboBoxDom = comboBoxDom;
// endregion
// region Elements
var elements = { removeChildElements: core_services_elements_service_1.removeChildElements };
exports.elements = elements;
//# sourceMappingURL=index.js.map

@@ -1,1 +0,26 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.removeArrayDuplicateLegacy=function(array){var unique=array.filter(function(item,index){return array.indexOf(item)===index});return unique.sort()};exports.sortByKey=function(array,key,asc){return new Promise(function(resolve){var _asc=asc?1:-1;var sorted=array.sort(function(a,b){var x=a[key];var y=b[key];return x===y?0:x>y?_asc:-1*_asc});resolve(sorted)})};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Remove items
*/
exports.removeArrayDuplicateLegacy = function (array) {
var unique = array.filter(function (item, index) {
return array.indexOf(item) === index;
});
return unique.sort();
};
/**
* Sort Arrays
*/
exports.sortByKey = function (array, key, asc) {
return new Promise(function (resolve) {
var _asc = asc ? 1 : -1;
var sorted = array.sort(function (a, b) {
var x = a[key];
var y = b[key];
return (x === y) ? 0 : ((x > y) ? _asc : -1 * _asc);
});
resolve(sorted);
});
};
//# sourceMappingURL=core-services-array.service.js.map

@@ -1,1 +0,68 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.textFileToUrlImage=function(file){return new Promise(function(resolve){var fileReader=new FileReader;fileReader.addEventListener("load",function(e){resolve(e.target.result)});fileReader.readAsDataURL(file)})};exports.parseAcceptFiles=function(accepts){return accepts.replace(/image\//g,"").replace(/x-/g,"").replace(/\+xml/g,"").replace(/ /g,"").split(",")};exports.validateFile=function(input,accepts){var fileName=input.value;var idxDot=fileName.lastIndexOf(".")+1;var extFile=fileName.substr(idxDot,fileName.length).toLowerCase();if(accepts.length===1&&accepts[0]==="*"){return true}for(var _i=0,accepts_1=accepts;_i<accepts_1.length;_i++){var extension=accepts_1[_i];if(extFile===extension){return true}}return false};exports.validateFileSize=function(input){if(input!=null&&input.files!=null){var fileSize=input.files[0].size/1024;var maxSize=fileMaxSize(input);return fileSize<=maxSize}else{console.error("Input is null.");return false}};var fileMaxSize=function(input){var fileName=input.attributes["data-maxsize"].nodeValue;if(fileName){return parseInt(fileName,10)}else{return 1024*45}};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Convert
**/
exports.textFileToUrlImage = function (file) {
return new Promise(function (resolve) {
var fileReader = new FileReader();
fileReader.addEventListener('load', function (e) {
resolve(e.target.result);
});
fileReader.readAsDataURL(file);
});
};
/**
* Parser
**/
exports.parseAcceptFiles = function (accepts) {
return accepts
.replace(/image\//g, '')
.replace(/x-/g, '')
.replace(/\+xml/g, '')
.replace(/ /g, '')
.split(',');
};
/**
* Validate
**/
exports.validateFile = function (input, accepts) {
var fileName = input.value;
var idxDot = fileName.lastIndexOf('.') + 1;
var extFile = fileName.substr(idxDot, fileName.length).toLowerCase();
if (accepts.length === 1 && accepts[0] === '*') {
return true;
}
for (var _i = 0, accepts_1 = accepts; _i < accepts_1.length; _i++) {
var extension = accepts_1[_i];
if (extFile === extension) {
return true;
}
}
return false;
};
exports.validateFileSize = function (input) {
if (input != null && input.files != null) {
var fileSize = input.files[0].size / 1024;
var maxSize = fileMaxSize(input);
return fileSize <= maxSize;
}
else {
console.error('Input is null.');
return false;
}
};
/**
* The user must include the attribute 'data-maxsize' in mb(megabyte);
* @param input
*/
var fileMaxSize = function (input) {
var fileName = input.attributes['data-maxsize'].nodeValue;
if (fileName) {
return parseInt(fileName, 10);
}
else {
return 1024 * 45;
}
};
//# sourceMappingURL=core-services-attachment.service.js.map

@@ -0,0 +0,0 @@ export interface IFullscreenResult {

@@ -1,1 +0,3 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=core-services-browser.interfaces.js.map

@@ -0,0 +0,0 @@ import { IFullScreenAlt, IFullScreenSrc, IMenuButton } from '../menu/core-services-menu.interfaces';

@@ -1,1 +0,86 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var screenfull=require("screenfull");exports.fullscreenListener=function(menuButton,alt,src,showLog){if(showLog===void 0){showLog=false}if(screenfull.isEnabled){screenfull.on("change",function(){if(screenfull.isFullscreen){menuButton.src=src.exit;menuButton.alt=alt.exit}else{menuButton.src=src.enter;menuButton.alt=alt.enter}if(showLog){var label=screenfull.isFullscreen?"enabled":"disabled";console.log("Fullscreen "+label)}})}else{console.log("This browser does not support fullscreen api")}};exports.disableFullscreenListener=function(){screenfull.off("change",function(){console.log("Fullscreen listener has been disabled")})};exports.toggleFullScreen=function(menuButton,alt,src,showLog){if(showLog===void 0){showLog=false}return new Promise(function(resolve,reject){if(screenfull.isEnabled){if(screenfull.isFullscreen){screenfull.exit().then(function(){menuButton.src=src.enter;menuButton.alt=alt.enter}).catch(function(error){console.log(error);reject(error)})}else{screenfull.request().then(function(){menuButton.src=src.exit;menuButton.alt=alt.exit}).catch(function(error){console.log(error);reject(error)})}if(showLog){var label=screenfull.isFullscreen?"enabled":"disabled";console.log("Fullscreen "+label)}resolve({src:menuButton.src,alt:menuButton.alt})}else{resolve({src:null,alt:null})}})};exports.hasFullscreen=function(){return screenfull.isEnabled};exports.isIE=function(){var ua=window.navigator.userAgent;var msie=ua.indexOf("MSIE ");return msie>0||!!navigator.userAgent.match(/Trident.*rv:11\./)};exports.isBeforeIE11=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var screenfull = require("screenfull");
/**
* Ffullscreen
*/
exports.fullscreenListener = function (menuButton, alt, src, showLog) {
if (showLog === void 0) { showLog = false; }
if (screenfull.isEnabled) {
// @ts-ignore
screenfull.on('change', function () {
// @ts-ignore
if (screenfull.isFullscreen) {
menuButton.src = src.exit;
menuButton.alt = alt.exit;
}
else {
menuButton.src = src.enter;
menuButton.alt = alt.enter;
}
if (showLog) {
// @ts-ignore
var label = screenfull.isFullscreen ? 'enabled' : 'disabled';
console.log("Fullscreen " + label);
}
});
}
else {
console.log('This browser does not support fullscreen api');
}
};
exports.disableFullscreenListener = function () {
// @ts-ignore
screenfull.off('change', function () {
console.log('Fullscreen listener has been disabled');
});
};
exports.toggleFullScreen = function (menuButton, alt, src, showLog) {
if (showLog === void 0) { showLog = false; }
return new Promise(function (resolve, reject) {
if (screenfull.isEnabled) {
if (screenfull.isFullscreen) {
screenfull.exit().then(function () {
menuButton.src = src.enter;
menuButton.alt = alt.enter;
}).catch(function (error) {
console.log(error);
reject(error);
});
}
else {
screenfull.request().then(function () {
menuButton.src = src.exit;
menuButton.alt = alt.exit;
}).catch(function (error) {
console.log(error);
reject(error);
});
}
if (showLog) {
// @ts-ignore
var label = screenfull.isFullscreen ? 'enabled' : 'disabled';
console.log("Fullscreen " + label);
}
resolve({ src: menuButton.src, alt: menuButton.alt });
}
else {
resolve({ src: null, alt: null });
}
});
};
exports.hasFullscreen = function () {
return screenfull.isEnabled;
};
/**
* Version
*/
exports.isIE = function () {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
return msie > 0 || !!navigator.userAgent.match(/Trident.*rv:11\./);
};
exports.isBeforeIE11 = function () {
return navigator.appVersion.indexOf('MSIE 10') !== -1;
};
//# sourceMappingURL=core-services-browser.service.js.map

@@ -0,0 +0,0 @@ export interface IMenuButton {

@@ -1,1 +0,3 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=core-services-menu.interfaces.js.map
{
"name": "gl-w-frontend",
"version": "1.2.1",
"description": "Common code for using among web frameworks using pure JavaScript, ES6+ and TypeScript",
"version": "1.3.0",
"description": "Common code for using among web front-end development such as pure JavaScript, ES6+ and TypeScript",
"main": "lib/",

@@ -13,3 +13,3 @@ "types": "lib/",

"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"lint": "tslint -p tsconfig.json"
"lint": "eslint . --ext .ts"
},

@@ -20,3 +20,5 @@ "repository": {

},
"keywords": [],
"keywords": ["javascript tool", "typescript tool", "front-end", "pure javascript", "array tool", "browser tool",
"autocomplete tool", "fullscreen", "attachment tool", "dom tool"
],
"author": "Gláucio Leonardo Sant'ana",

@@ -27,6 +29,14 @@ "license": "ISC",

"@types/node": "^14.0.5",
"jquery": "^3.5.1",
"jquery-ui-dist": "^1.12.1",
"screenfull": "^5.0.2"
},
"devDependencies": {
"@types/jquery": "^3.3.38",
"@types/jqueryui": "^1.12.13",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"awesome-typescript-loader": "^5.2.1",
"codelyzer": "^5.2.2",
"eslint": "^7.1.0",
"path": "^0.12.7",

@@ -33,0 +43,0 @@ "prettier": "^2.0.5",

@@ -1,29 +0,52 @@

# README #
# gl-w-frontend #
[![version](https://img.shields.io/badge/version-1.3.0-green.svg)](https://www.npmjs.com/package/gl-w-frontend)
This README would normally document whatever steps are necessary to get your application up and running.
### What is this repository for? ###
This package is a common code for using among web front-end development
such as pure JavaScript, ES6+ and TypeScript.<br>
* Quick summary
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
This package contains the types for using with Typescript.
### How do I get set up? ###
The easiest way to install this library is via npm using the following commands:
* Latest version `npm install gl-w-frontend --save`;
* [Available versions](https://www.npmjs.com/package/gl-w-frontend?activeTab=versions) `npm install gl-w-frontend@version --save`;
* Summary of set up
* Configuration
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions
### Contribution guidelines ###
If you are using only browser version:
* For ES5 version importing via <br>
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>gl-w-frontend</title>
...
</head>
<body>
...
<!-- Include here -->
<script src="https://github.com/glaucioleonardo/gl-w-frontend/tree/master/lib/index.js"></script>
<!-- or just download this repo and refer to the index.js like this -->
<script src="js/index.js"></script>
</body>
</html>
```
* Writing tests
* Code review
* Other guidelines
* In case you are using ES+, just use the `index.js` inside `lib/esm`
### Who do I talk to? ###
### Macro features ###
* Repo owner or admin
* Other community or team contact
* Array
* Attachment
* Browser (Check version, fullscreen)
* ComboBox / Autocomplete
* Dom Elements
Other features is going to be included frequently.
### Other packages used ###
I'm really thankful for those packages creators!
* [Screenfull](https://www.npmjs.com/package/screenfull): @sindresorhus
* [jquery-ui-dist](https://github.com/jquery/jquery-ui/graphs/contributors)
* [jquery](https://github.com/jquery/jquery/graphs/contributors)
{
"extends": ["tslint:recommended", "tslint-config-prettier"],
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"parserOptions": {
"ecmaVersion": 2020, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"plugins": [
"@typescript-eslint"
],
"extends": "tslint:recommended",
// "extends": [
// "eslint:recommended",
// "plugin:@typescript-eslint/eslint-recommended",
// "plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
// ],
"rules": {

@@ -91,6 +104,3 @@ "array-type": false,

]
},
"rulesDirectory": [
"codelyzer"
]
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc