Huge News!Announcing our $40M Series B led by Abstract Ventures.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.4.3 to 1.4.4

lib/esm/scripts/core/services/attachment/core-services-attachment.interface.d.ts

12

lib/esm/scripts/core/services/attachment/core-services-attachment.service.d.ts

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

import { IAttachmentData } from "./core-services-attachment.interface";
declare class Convert {

@@ -9,2 +10,7 @@ textFileToUrlImage(file: File): PromiseLike<string>;

export declare const AttachmentClean: Clean;
declare class Icon {
get(fileName: string): string;
extension(fileName: string): string;
}
export declare const AttachmentIcon: Icon;
declare class Parser {

@@ -19,4 +25,10 @@ parseAcceptFiles(accepts: string): string[];

maxSize: (input: HTMLInputElement) => number;
/**
* Check if Attachment Data contains duplicated files
* @param fileName The file must include the extension.
* @param attachmentList Inform the list of attachments to be compared.
*/
duplicated(fileName: string, attachmentList: IAttachmentData[]): boolean;
}
export declare const AttachmentValidate: Validate;
export {};

@@ -199,2 +199,188 @@ var __values = (this && this.__values) || function(o) {

export var AttachmentClean = new Clean();
var Icon = /** @class */ (function () {
function Icon() {
}
Icon.prototype.get = function (fileName) {
var extension = this.extension(fileName);
var url = '../../../../assets/img/icon/attachment-icons/';
var fileIcon;
switch (extension.toLowerCase()) {
case 'pdf':
fileIcon = url + 'adobe-pdf.svg';
break;
case 'txt':
fileIcon = url + 'txt.svg';
break;
case 'ooxml':
fileIcon = url + 'ms-office-365.svg';
break;
case 'jpeg':
case 'jpg':
case 'png':
case 'gif':
case 'tiff':
case 'raw':
case 'svg':
case 'bmp':
case 'emf':
case 'svgz':
fileIcon = url + 'image-icon.svg';
break;
case 'avi':
case 'flv':
case 'wmv':
case 'mov':
case 'mp4':
case 'mpeg':
case '3gp':
case 'ogg':
case 'webm':
case 'hdv':
case 'vob':
case 'wav':
fileIcon = url + 'video-icon.svg';
break;
case 'doc':
case 'dot':
case 'wbk':
case 'docx':
case 'docm':
case 'dotx':
case 'dotm':
case 'docb':
fileIcon = url + 'ms-word.svg';
break;
case 'xls':
case 'xlt':
case 'xlm':
case 'xlsx':
case 'xlsm':
case 'xltx':
case 'xltm':
case 'xlsb':
case 'xla':
case 'xlam':
case 'xll':
case 'xlw':
fileIcon = url + 'ms-excel.svg';
break;
case 'ppt':
case 'pot':
case 'pps':
case 'pptx':
case 'pptm':
case 'potx':
case 'potm':
case 'ppam':
case 'ppsx':
case 'ppsm':
case 'sldx':
case 'sldm':
fileIcon = url + 'ms-powerpoint.svg';
break;
case 'accdb':
case 'accde':
case 'accdt':
case 'accdr':
fileIcon = url + 'ms-access.svg';
break;
case 'mpp':
case 'mpt':
fileIcon = url + 'ms-project.svg';
break;
case 'pst':
case 'ost':
case 'eml':
fileIcon = url + 'ms-outlook.svg';
break;
case 'idea':
case 'ai':
case 'ait':
case 'draw':
case 'line':
case 'sket':
case 'dwg':
case 'dxf':
case 'cgm':
case 'cdr':
case 'eps':
case 'epsf':
case 'ps':
case 'psd':
case 'pdd':
case 'pxr':
fileIcon = url + 'adobe-cc.svg';
break;
case 'rar':
case 'zip':
case '7z':
case 'arj':
case 'bz2':
case 'cab':
case 'gz':
case 'lz':
case 'lzh':
case 'tar':
case 'uue':
case 'xz':
case 'z':
case 'zipx':
case '001':
fileIcon = url + 'zip.svg';
break;
case 'htm':
case 'html':
case 'shtml':
case 'xht':
case 'xhtml':
case 'webp':
case 'mht':
case 'mhtml':
case 'url':
case 'website':
fileIcon = url + 'browser.svg';
break;
case 'exe':
case 'bat':
case 'bin':
case 'cmd':
case 'com':
case 'cpl':
case 'gadget':
case 'lnk':
case 'msc':
case 'smi':
case 'mst':
case 'ps1':
case 'reg':
case 'vb':
case 'vbs':
case 'vbe':
case 'vbscript':
case 'ws':
fileIcon = url + 'executable.svg';
break;
case 'ttf':
case 'otf':
case 'woff':
case 'woff2':
case 'eot':
fileIcon = url + 'fonts.svg';
break;
case 'pbix':
fileIcon = url + 'power-bi.svg';
break;
default:
fileIcon = url + 'file.svg';
break;
}
return fileIcon;
};
Icon.prototype.extension = function (fileName) {
return fileName.substr(fileName.lastIndexOf('.') + 1).toLowerCase();
};
return Icon;
}());
// tslint:disable-next-line:variable-name
export var AttachmentIcon = new Icon();
var Parser = /** @class */ (function () {

@@ -264,2 +450,32 @@ function Parser() {

};
/**
* Check if Attachment Data contains duplicated files
* @param fileName The file must include the extension.
* @param attachmentList Inform the list of attachments to be compared.
*/
Validate.prototype.duplicated = function (fileName, attachmentList) {
var e_2, _a;
if (attachmentList == null) {
console.error('You need informing the list of attachments to be compared.');
return false;
}
else {
try {
for (var attachmentList_1 = __values(attachmentList), attachmentList_1_1 = attachmentList_1.next(); !attachmentList_1_1.done; attachmentList_1_1 = attachmentList_1.next()) {
var file = attachmentList_1_1.value;
if (file.name.toLowerCase() === fileName.toLowerCase()) {
return true;
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (attachmentList_1_1 && !attachmentList_1_1.done && (_a = attachmentList_1.return)) _a.call(attachmentList_1);
}
finally { if (e_2) throw e_2.error; }
}
}
return false;
};
return Validate;

@@ -266,0 +482,0 @@ }());

2

lib/esm/scripts/core/services/date/core-services-date.service.js

@@ -296,3 +296,3 @@ var __values = (this && this.__values) || function(o) {

showOn: 'button',
buttonImage: 'src/assets/img/icons/calendar.svg',
buttonImage: 'src/assets/img/icon/calendar.svg',
buttonImageOnly: true,

@@ -299,0 +299,0 @@ buttonText: 'Select period',

@@ -1,1 +0,19 @@

"use strict";function __export(m){for(var p in m)if(!exports.hasOwnProperty(p))exports[p]=m[p]}Object.defineProperty(exports,"__esModule",{value:true});require("jquery-ui-dist/jquery-ui.min");__export(require("./scripts/core/services/array/core-services-array.service"));__export(require("./scripts/core/services/attachment/core-services-attachment.service"));__export(require("./scripts/core/services/browser/core-services-browser.service"));__export(require("./scripts/core/services/combobox/core-services-combobox.service"));__export(require("./scripts/core/services/date/core-services-date.service"));__export(require("./scripts/core/services/elements/core-services-elements.service"));__export(require("./scripts/core/services/input/core-services-input.service"));__export(require("./scripts/core/services/string/core-services-string.service"));__export(require("./scripts/core/services/url/core-services-url.service"));
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
require("jquery-ui-dist/jquery-ui.min");
// Modules
__export(require("./scripts/core/services/array/core-services-array.service"));
__export(require("./scripts/core/services/attachment/core-services-attachment.service"));
__export(require("./scripts/core/services/browser/core-services-browser.service"));
__export(require("./scripts/core/services/combobox/core-services-combobox.service"));
__export(require("./scripts/core/services/date/core-services-date.service"));
__export(require("./scripts/core/services/elements/core-services-elements.service"));
__export(require("./scripts/core/services/input/core-services-input.service"));
__export(require("./scripts/core/services/string/core-services-string.service"));
__export(require("./scripts/core/services/url/core-services-url.service"));
// export * from './scripts/core/services/string/core-services-string.interface';
// export * from './scripts/core/services/url/core-services-url.interface';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,34 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Remove=function(){function Remove(){}Remove.prototype.duplicateLegacy=function(array){var unique=array.filter(function(item,index){return array.indexOf(item)===index});return unique.sort()};return Remove}();exports.ArrayRemove=new Remove;var Sort=function(){function Sort(){}Sort.prototype.byKey=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)})};return Sort}();exports.ArraySort=new Sort;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Remove = /** @class */ (function () {
function Remove() {
}
Remove.prototype.duplicateLegacy = function (array) {
var unique = array.filter(function (item, index) {
return array.indexOf(item) === index;
});
return unique.sort();
};
return Remove;
}());
// tslint:disable-next-line:variable-name
exports.ArrayRemove = new Remove();
var Sort = /** @class */ (function () {
function Sort() {
}
Sort.prototype.byKey = 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);
});
};
return Sort;
}());
// tslint:disable-next-line:variable-name
exports.ArraySort = new Sort();
//# sourceMappingURL=core-services-array.service.js.map

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

import { IAttachmentData } from "./core-services-attachment.interface";
declare class Convert {

@@ -9,2 +10,7 @@ textFileToUrlImage(file: File): PromiseLike<string>;

export declare const AttachmentClean: Clean;
declare class Icon {
get(fileName: string): string;
extension(fileName: string): string;
}
export declare const AttachmentIcon: Icon;
declare class Parser {

@@ -19,4 +25,10 @@ parseAcceptFiles(accepts: string): string[];

maxSize: (input: HTMLInputElement) => number;
/**
* Check if Attachment Data contains duplicated files
* @param fileName The file must include the extension.
* @param attachmentList Inform the list of attachments to be compared.
*/
duplicated(fileName: string, attachmentList: IAttachmentData[]): boolean;
}
export declare const AttachmentValidate: Validate;
export {};

@@ -1,1 +0,485 @@

"use strict";var __values=this&&this.__values||function(o){var s=typeof Symbol==="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length==="number")return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:true});var Convert=function(){function Convert(){}Convert.prototype.textFileToUrlImage=function(file){return new Promise(function(resolve){var fileReader=new FileReader;fileReader.addEventListener("load",function(e){resolve(e.target.result)});fileReader.readAsDataURL(file)})};return Convert}();exports.AttachmentConvert=new Convert;var Clean=function(){function Clean(){}Clean.prototype.cleanAttachmentText=function(string){return string.replace(/€/g,"").replace(/`/g,"").replace(/„/g,"").replace(/…/g,"").replace(/†/g,"").replace(/‡/g,"").replace(/ˆ/g,"").replace(/‰/g,"").replace(/Š/g,"").replace(/‹/g,"").replace(/Œ/g,"").replace(//g,"").replace(/Ž/g,"").replace(//g,"").replace(/‘/g,"").replace(/’/g,"").replace(/“/g,"").replace(/”/g,"").replace(/•/g,"").replace(/˜/g,"").replace(/™/g,"").replace(/š/g,"").replace(/›/g,"").replace(/œ/g,"").replace(/ž/g,"").replace(/Ÿ/g,"").replace(/¢/g,"").replace(/£/g,"").replace(/¤/g,"").replace(/¥/g,"").replace(/¦/g,"").replace(/§/g,"").replace(/¨/g,"").replace(/©/g,"").replace(/ª/g,"").replace(/«/g,"").replace(/¬/g,"").replace(/®/g,"").replace(/¯/g,"").replace(/°/g,"").replace(/±/g,"").replace(/²/g,"").replace(/³/g,"").replace(/´/g,"").replace(/µ/g,"").replace(/¶/g,"").replace(/·/g,"").replace(/¹/g,"").replace(/º/g,"").replace(/»/g,"").replace(/¼/g,"").replace(/½/g,"").replace(/¾/g,"").replace(/¿/g,"").replace(/Å/g,"A").replace(/Æ/g,"A").replace(/Ð/g,"D").replace(/Ø/g,"O").replace(/ß/g,"B").replace(/æ/g,"a").replace(/÷/g,"").replace(/ø/g,"o").replace(/þ/g,"b").replace(/!/g,"").replace(/"/g,"").replace(/#/g,"").replace(/\$/g,"").replace(/%/g,"").replace(/&/g,"").replace(/'/g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/\*/g,"").replace(/\+/g,"").replace(/\//g,"").replace(/:/g,"").replace(/;/g,"").replace(/</g,"").replace(/=/g,"").replace(/>/g,"").replace(/\?/g,"").replace(/@/g,"").replace(/\[/g,"").replace(/\\/g,"").replace(/]/g,"").replace(/\^/g,"").replace(/_/g,"").replace(/`/g,"").replace(/{/g,"").replace(/\|/g,"").replace(/}/g,"").replace(/~/g,"").replace(/`/g,"").replace(//g,"").replace(/ƒ/g,"f").replace(/„/g,"").replace(/…/g,"").replace(/†/g,"").replace(/‡/g,"").replace(/ˆ/g,"").replace(/‰/g,"").replace(/Š/g,"").replace(/‹/g,"").replace(/Œ/g,"").replace(//g,"").replace(/Ž/g,"Z").replace(//g,"").replace(//g,"").replace(/‘/g,"").replace(/’/g,"").replace(/“/g,"").replace(/”/g,"").replace(/•/g,"").replace(/–/g,"").replace(/—/g,"").replace(/˜/g,"").replace(/™/g,"").replace(/š/g,"").replace(/›/g,"").replace(/œ/g,"").replace(//g,"").replace(/ž/g,"z").replace(/Ÿ/g,"Y").replace(/¡/g,"").replace(/¢/g,"c").replace(/£/g,"").replace(/¤/g,"").replace(/¥/g,"Y").replace(/¦/g,"").replace(/§/g,"").replace(/¨/g,"").replace(/©/g,"").replace(/ª/g,"").replace(/«/g,"").replace(/¬/g,"").replace(/®/g,"").replace(/¯/g,"").replace(/°/g,"").replace(/±/g,"").replace(/²/g,"2").replace(/³/g,"3").replace(/´/g,"").replace(/µ/g,"u").replace(/¶/g,"").replace(/·/g,"").replace(/¹/g,"1").replace(/º/g,"").replace(/»/g,"").replace(/¼/g,"").replace(/½/g,"").replace(/¾/g,"").replace(/¿/g,"").replace(/Ð/g,"D").replace(/ß/g,"B").replace(/æ/g,"a").replace(/÷/g,"").replace(/ø/g,"o").replace(/þ/g,"b").replace(/&/g,"").replace(/</g,"").replace(/>/g,"")};return Clean}();exports.AttachmentClean=new Clean;var Parser=function(){function Parser(){}Parser.prototype.parseAcceptFiles=function(accepts){return accepts.replace(/image\//g,"").replace(/x-/g,"").replace(/\+xml/g,"").replace(/ /g,"").split(",")};return Parser}();exports.AttachmentParser=new Parser;var Validate=function(){function Validate(){this.maxSize=function(input){var fileName=input.attributes["data-maxsize"].nodeValue;if(fileName){return parseInt(fileName,10)}else{return 1024*45}}}Validate.prototype.file=function(input,accepts){var e_1,_a;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}try{for(var accepts_1=__values(accepts),accepts_1_1=accepts_1.next();!accepts_1_1.done;accepts_1_1=accepts_1.next()){var extension=accepts_1_1.value;if(extFile===extension){return true}}}catch(e_1_1){e_1={error:e_1_1}}finally{try{if(accepts_1_1&&!accepts_1_1.done&&(_a=accepts_1.return))_a.call(accepts_1)}finally{if(e_1)throw e_1.error}}return false};Validate.prototype.fileSize=function(input){if(input!=null&&input.files!=null){var fileSize=input.files[0].size/1024;var max=this.maxSize(input);return fileSize<=max}else{console.error("Input is null.");return false}};return Validate}();exports.AttachmentValidate=new Validate;
"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
var Convert = /** @class */ (function () {
function Convert() {
}
Convert.prototype.textFileToUrlImage = function (file) {
return new Promise(function (resolve) {
var fileReader = new FileReader();
fileReader.addEventListener('load', function (e) {
resolve(e.target.result);
});
fileReader.readAsDataURL(file);
});
};
return Convert;
}());
// tslint:disable-next-line:variable-name
exports.AttachmentConvert = new Convert();
var Clean = /** @class */ (function () {
function Clean() {
}
Clean.prototype.cleanAttachmentText = function (string) {
return string
.replace(/€/g, '')
.replace(/`/g, '')
.replace(/„/g, '')
.replace(/…/g, '')
.replace(/†/g, '')
.replace(/‡/g, '')
.replace(/ˆ/g, '')
.replace(/‰/g, '')
.replace(/Š/g, '')
.replace(/‹/g, '')
.replace(/Œ/g, '')
.replace(//g, '')
.replace(/Ž/g, '')
.replace(//g, '')
.replace(/‘/g, '')
.replace(/’/g, '')
.replace(/“/g, '')
.replace(/”/g, '')
.replace(/•/g, '')
.replace(/˜/g, '')
.replace(/™/g, '')
.replace(/š/g, '')
.replace(/›/g, '')
.replace(/œ/g, '')
.replace(/ž/g, '')
.replace(/Ÿ/g, '')
.replace(/¢/g, '')
.replace(/£/g, '')
.replace(/¤/g, '')
.replace(/¥/g, '')
.replace(/¦/g, '')
.replace(/§/g, '')
.replace(/¨/g, '')
.replace(/©/g, '')
.replace(/ª/g, '')
.replace(/«/g, '')
.replace(/¬/g, '')
.replace(/®/g, '')
.replace(/¯/g, '')
.replace(/°/g, '')
.replace(/±/g, '')
.replace(/²/g, '')
.replace(/³/g, '')
.replace(/´/g, '')
.replace(/µ/g, '')
.replace(/¶/g, '')
.replace(/·/g, '')
.replace(/¹/g, '')
.replace(/º/g, '')
.replace(/»/g, '')
.replace(/¼/g, '')
.replace(/½/g, '')
.replace(/¾/g, '')
.replace(/¿/g, '')
.replace(/Å/g, 'A')
.replace(/Æ/g, 'A')
.replace(/Ð/g, 'D')
.replace(/Ø/g, 'O')
.replace(/ß/g, 'B')
.replace(/æ/g, 'a')
.replace(/÷/g, '')
.replace(/ø/g, 'o')
.replace(/þ/g, 'b')
.replace(/!/g, '')
.replace(/"/g, '')
.replace(/#/g, '')
.replace(/\$/g, '')
.replace(/%/g, '')
.replace(/&/g, '')
.replace(/'/g, '')
.replace(/\(/g, '')
.replace(/\)/g, '')
.replace(/\*/g, '')
.replace(/\+/g, '')
.replace(/\//g, '')
.replace(/:/g, '')
.replace(/;/g, '')
.replace(/</g, '')
.replace(/=/g, '')
.replace(/>/g, '')
.replace(/\?/g, '')
.replace(/@/g, '')
.replace(/\[/g, '')
.replace(/\\/g, '')
.replace(/]/g, '')
.replace(/\^/g, '')
.replace(/_/g, '')
.replace(/`/g, '')
.replace(/{/g, '')
.replace(/\|/g, '')
.replace(/}/g, '')
.replace(/~/g, '')
.replace(/`/g, '')
.replace(//g, '')
.replace(/ƒ/g, 'f')
.replace(/„/g, '')
.replace(/…/g, '')
.replace(/†/g, '')
.replace(/‡/g, '')
.replace(/ˆ/g, '')
.replace(/‰/g, '')
.replace(/Š/g, '')
.replace(/‹/g, '')
.replace(/Œ/g, '')
.replace(//g, '')
.replace(/Ž/g, 'Z')
.replace(//g, '')
.replace(//g, '')
.replace(/‘/g, '')
.replace(/’/g, '')
.replace(/“/g, '')
.replace(/”/g, '')
.replace(/•/g, '')
.replace(/–/g, '')
.replace(/—/g, '')
.replace(/˜/g, '')
.replace(/™/g, '')
.replace(/š/g, '')
.replace(/›/g, '')
.replace(/œ/g, '')
.replace(//g, '')
.replace(/ž/g, 'z')
.replace(/Ÿ/g, 'Y')
.replace(/¡/g, '')
.replace(/¢/g, 'c')
.replace(/£/g, '')
.replace(/¤/g, '')
.replace(/¥/g, 'Y')
.replace(/¦/g, '')
.replace(/§/g, '')
.replace(/¨/g, '')
.replace(/©/g, '')
.replace(/ª/g, '')
.replace(/«/g, '')
.replace(/¬/g, '')
.replace(/®/g, '')
.replace(/¯/g, '')
.replace(/°/g, '')
.replace(/±/g, '')
.replace(/²/g, '2')
.replace(/³/g, '3')
.replace(/´/g, '')
.replace(/µ/g, 'u')
.replace(/¶/g, '')
.replace(/·/g, '')
.replace(/¹/g, '1')
.replace(/º/g, '')
.replace(/»/g, '')
.replace(/¼/g, '')
.replace(/½/g, '')
.replace(/¾/g, '')
.replace(/¿/g, '')
.replace(/Ð/g, 'D')
.replace(/ß/g, 'B')
.replace(/æ/g, 'a')
.replace(/÷/g, '')
.replace(/ø/g, 'o')
.replace(/þ/g, 'b')
.replace(/&/g, '')
.replace(/</g, '')
.replace(/>/g, '');
};
return Clean;
}());
// tslint:disable-next-line:variable-name
exports.AttachmentClean = new Clean();
var Icon = /** @class */ (function () {
function Icon() {
}
Icon.prototype.get = function (fileName) {
var extension = this.extension(fileName);
var url = '../../../../assets/img/icon/attachment-icons/';
var fileIcon;
switch (extension.toLowerCase()) {
case 'pdf':
fileIcon = url + 'adobe-pdf.svg';
break;
case 'txt':
fileIcon = url + 'txt.svg';
break;
case 'ooxml':
fileIcon = url + 'ms-office-365.svg';
break;
case 'jpeg':
case 'jpg':
case 'png':
case 'gif':
case 'tiff':
case 'raw':
case 'svg':
case 'bmp':
case 'emf':
case 'svgz':
fileIcon = url + 'image-icon.svg';
break;
case 'avi':
case 'flv':
case 'wmv':
case 'mov':
case 'mp4':
case 'mpeg':
case '3gp':
case 'ogg':
case 'webm':
case 'hdv':
case 'vob':
case 'wav':
fileIcon = url + 'video-icon.svg';
break;
case 'doc':
case 'dot':
case 'wbk':
case 'docx':
case 'docm':
case 'dotx':
case 'dotm':
case 'docb':
fileIcon = url + 'ms-word.svg';
break;
case 'xls':
case 'xlt':
case 'xlm':
case 'xlsx':
case 'xlsm':
case 'xltx':
case 'xltm':
case 'xlsb':
case 'xla':
case 'xlam':
case 'xll':
case 'xlw':
fileIcon = url + 'ms-excel.svg';
break;
case 'ppt':
case 'pot':
case 'pps':
case 'pptx':
case 'pptm':
case 'potx':
case 'potm':
case 'ppam':
case 'ppsx':
case 'ppsm':
case 'sldx':
case 'sldm':
fileIcon = url + 'ms-powerpoint.svg';
break;
case 'accdb':
case 'accde':
case 'accdt':
case 'accdr':
fileIcon = url + 'ms-access.svg';
break;
case 'mpp':
case 'mpt':
fileIcon = url + 'ms-project.svg';
break;
case 'pst':
case 'ost':
case 'eml':
fileIcon = url + 'ms-outlook.svg';
break;
case 'idea':
case 'ai':
case 'ait':
case 'draw':
case 'line':
case 'sket':
case 'dwg':
case 'dxf':
case 'cgm':
case 'cdr':
case 'eps':
case 'epsf':
case 'ps':
case 'psd':
case 'pdd':
case 'pxr':
fileIcon = url + 'adobe-cc.svg';
break;
case 'rar':
case 'zip':
case '7z':
case 'arj':
case 'bz2':
case 'cab':
case 'gz':
case 'lz':
case 'lzh':
case 'tar':
case 'uue':
case 'xz':
case 'z':
case 'zipx':
case '001':
fileIcon = url + 'zip.svg';
break;
case 'htm':
case 'html':
case 'shtml':
case 'xht':
case 'xhtml':
case 'webp':
case 'mht':
case 'mhtml':
case 'url':
case 'website':
fileIcon = url + 'browser.svg';
break;
case 'exe':
case 'bat':
case 'bin':
case 'cmd':
case 'com':
case 'cpl':
case 'gadget':
case 'lnk':
case 'msc':
case 'smi':
case 'mst':
case 'ps1':
case 'reg':
case 'vb':
case 'vbs':
case 'vbe':
case 'vbscript':
case 'ws':
fileIcon = url + 'executable.svg';
break;
case 'ttf':
case 'otf':
case 'woff':
case 'woff2':
case 'eot':
fileIcon = url + 'fonts.svg';
break;
case 'pbix':
fileIcon = url + 'power-bi.svg';
break;
default:
fileIcon = url + 'file.svg';
break;
}
return fileIcon;
};
Icon.prototype.extension = function (fileName) {
return fileName.substr(fileName.lastIndexOf('.') + 1).toLowerCase();
};
return Icon;
}());
// tslint:disable-next-line:variable-name
exports.AttachmentIcon = new Icon();
var Parser = /** @class */ (function () {
function Parser() {
}
Parser.prototype.parseAcceptFiles = function (accepts) {
return accepts
.replace(/image\//g, '')
.replace(/x-/g, '')
.replace(/\+xml/g, '')
.replace(/ /g, '')
.split(',');
};
return Parser;
}());
// tslint:disable-next-line:variable-name
exports.AttachmentParser = new Parser();
var Validate = /** @class */ (function () {
function Validate() {
/** The user must include the attribute 'data-maxsize' in mb(megabyte); */
this.maxSize = function (input) {
var fileName = input.attributes['data-maxsize'].nodeValue;
if (fileName) {
return parseInt(fileName, 10);
}
else {
return 1024 * 45;
}
};
}
Validate.prototype.file = function (input, accepts) {
var e_1, _a;
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;
}
try {
for (var accepts_1 = __values(accepts), accepts_1_1 = accepts_1.next(); !accepts_1_1.done; accepts_1_1 = accepts_1.next()) {
var extension = accepts_1_1.value;
if (extFile === extension) {
return true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (accepts_1_1 && !accepts_1_1.done && (_a = accepts_1.return)) _a.call(accepts_1);
}
finally { if (e_1) throw e_1.error; }
}
return false;
};
Validate.prototype.fileSize = function (input) {
if (input != null && input.files != null) {
var fileSize = input.files[0].size / 1024;
var max = this.maxSize(input);
return fileSize <= max;
}
else {
console.error('Input is null.');
return false;
}
};
/**
* Check if Attachment Data contains duplicated files
* @param fileName The file must include the extension.
* @param attachmentList Inform the list of attachments to be compared.
*/
Validate.prototype.duplicated = function (fileName, attachmentList) {
var e_2, _a;
if (attachmentList == null) {
console.error('You need informing the list of attachments to be compared.');
return false;
}
else {
try {
for (var attachmentList_1 = __values(attachmentList), attachmentList_1_1 = attachmentList_1.next(); !attachmentList_1_1.done; attachmentList_1_1 = attachmentList_1.next()) {
var file = attachmentList_1_1.value;
if (file.name.toLowerCase() === fileName.toLowerCase()) {
return true;
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (attachmentList_1_1 && !attachmentList_1_1.done && (_a = attachmentList_1.return)) _a.call(attachmentList_1);
}
finally { if (e_2) throw e_2.error; }
}
}
return false;
};
return Validate;
}());
// tslint:disable-next-line:variable-name
exports.AttachmentValidate = new Validate();
//# sourceMappingURL=core-services-attachment.service.js.map

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

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

@@ -1,1 +0,92 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var screenfull=require("screenfull");var FullScreen=function(){function FullScreen(){}FullScreen.prototype.listener=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")}};FullScreen.prototype.disableListener=function(){screenfull.off("change",function(){console.log("Fullscreen listener has been disabled")})};FullScreen.prototype.toggle=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})}})};FullScreen.prototype.available=function(){return screenfull.isEnabled};return FullScreen}();exports.BrowserFullScreen=new FullScreen;var Version=function(){function Version(){}Version.prototype.isIE=function(){var ua=window.navigator.userAgent;var msie=ua.indexOf("MSIE ");return msie>0||!!navigator.userAgent.match(/Trident.*rv:11\./)};Version.prototype.isBeforeIE11=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1};return Version}();exports.BrowserVersion=new Version;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var screenfull = require("screenfull");
var FullScreen = /** @class */ (function () {
function FullScreen() {
}
FullScreen.prototype.listener = function (menuButton, alt, src, showLog) {
if (showLog === void 0) { showLog = false; }
if (screenfull.isEnabled) {
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');
}
};
FullScreen.prototype.disableListener = function () {
// @ts-ignore
screenfull.off('change', function () {
console.log('Fullscreen listener has been disabled');
});
};
FullScreen.prototype.toggle = 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 });
}
});
};
FullScreen.prototype.available = function () {
return screenfull.isEnabled;
};
return FullScreen;
}());
// tslint:disable-next-line:variable-name
exports.BrowserFullScreen = new FullScreen();
var Version = /** @class */ (function () {
function Version() {
}
Version.prototype.isIE = function () {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
return msie > 0 || !!navigator.userAgent.match(/Trident.*rv:11\./);
};
Version.prototype.isBeforeIE11 = function () {
return navigator.appVersion.indexOf('MSIE 10') !== -1;
};
return Version;
}());
// tslint:disable-next-line:variable-name
exports.BrowserVersion = new Version();
//# sourceMappingURL=core-services-browser.service.js.map

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

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

@@ -1,1 +0,247 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var $=require("jquery");var core_services_elements_service_1=require("../elements/core-services-elements.service");var Core=function(){function Core(){}Core.prototype.initialize=function(combobox,callback,invalidCallback){$.widget("custom.combobox",{_create:function(){this.wrapper=$("<span>").addClass("custom-combobox").insertAfter(this.element);this.element.hide();this._createAutocomplete();this._createShowAllButton();this.input.attr("placeholder",this.element.attr("placeholder"));this.input.focus().blur()},_createAutocomplete:function(){var selected=this.element.children(":selected");var value=selected.val()?selected.text():"";this.input=$("<input>").appendTo(this.wrapper).val(value).attr("title","").addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left "+this.element.attr("class")).autocomplete({delay:0,minLength:0,maxShowItems:5,source:$.proxy(this,"_source")}).tooltip({classes:{"ui-tooltip":"ui-state-highlight"}});this.input.focus().blur();this._on(this.input,{autocompleteselect:function(event,ui){ui.item.option.selected=true;callback(ui.item.option.value,ui.item.value);this._trigger("select",event,{item:ui.item.option})},disable:function(){this._disable()},enable:function(){this._enable()},autocompletechange:"_removeIfInvalid"})},_createShowAllButton:function(){var input=this.input;var wasOpen=false;$("<a>").attr("tabIndex",-1).attr("title","Mostrar todos os itens").tooltip().appendTo(this.wrapper).button({icons:{primary:"ui-icon-triangle-1-s"},text:false}).removeClass("ui-corner-all").on("mousedown",function(){wasOpen=input.autocomplete("widget").is(":visible")}).on("click",function(){wasOpen=input.autocomplete("widget").is(":visible");input.trigger("focus");if(wasOpen){return}input.autocomplete("search","")})},_source:function(request,response){var matcher=new RegExp($.ui.autocomplete.escapeRegex(request.term),"i");response(this.element.children("option").map(function(){var text=$(this).text();if(this.value&&(!request.term||matcher.test(text))){return{label:text,value:text,option:this}}else{return null}}))},_removeIfInvalid:function(event,ui){if(ui.item){return}var value=this.input.val();var valueLowerCase=value.toLowerCase();var valid=false;this.element.children("option").each(function(){if($(this).text().toLowerCase()===valueLowerCase){this.selected=valid=true;return false}});if(valid){callback(this.element.val(),this.input.val());return}this.input.val("").attr("title","O valor "+value+" não existe para este item!").tooltip("open");this.element.val("");this._delay(function(){this.input.tooltip("close").attr("title","")},2500);this.input.autocomplete("instance").term="";invalidCallback(this.element.val(),this.input.val())},_destroy:function(){this.wrapper.remove();this.element.show()}});$(combobox).combobox()};Core.prototype.loadData=function(combobox,data,keepValue){return new Promise(function(resolve){var parent=combobox.parentNode;if(parent!=null){var comboboxInput=parent.querySelector("input.custom-combobox-input");core_services_elements_service_1.ElementRemove.childElements(combobox);if(!keepValue){combobox.value="";comboboxInput.value=""}var emptyOption=document.createElement("option");emptyOption.value="";combobox.appendChild(emptyOption);data.forEach(function(d){var option=document.createElement("option");option.value=d.value;option.innerText=d.text;combobox.appendChild(option)});resolve(combobox)}else{console.error("Parent of current combobox is null");resolve(null)}})};return Core}();exports.ComboBoxCore=new Core;var Data=function(){function Data(){}Data.prototype.byValue=function(arrayData,value){var tempActionPlan=arrayData.filter(function(x){return x.value===value});if(value==null||tempActionPlan.length===0){return""}else{return tempActionPlan[0].text}};return Data}();exports.ComboBoxData=new Data;var Dom=function(){function Dom(){}Dom.prototype.disableInput=function(combobox,disable){var parent=combobox.parentNode;var input=parent.querySelector("input");if(input==null){console.error("Input not found on current combobox group: "+parent)}else{if(disable){input.disabled=true;input.classList.add("ui-autocomplete-disabled");input.classList.add("ui-state-disabled");input.setAttribute("tabIndex","-1");input.setAttribute("aria-disabled","true")}else{input.disabled=false;input.classList.remove("ui-state-disabled");input.classList.remove("ui-autocomplete-disabled");input.removeAttribute("tabIndex");input.setAttribute("aria-disabled","false")}}};return Dom}();exports.ComboBoxDom=new Dom;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var $ = require("jquery");
var core_services_elements_service_1 = require("../elements/core-services-elements.service");
var Core = /** @class */ (function () {
function Core() {
}
/** This function is using Jquery and Jquery-ui and typescript is not available
* To this function work is necessary the following imports, respectively:
* import * as $ from 'jquery'; or import $ = require('jquery');
* import '../../../../../node_modules/jquery-ui-dist/jquery-ui.min';
*/
Core.prototype.initialize = function (combobox, callback, invalidCallback) {
$.widget('custom.combobox', {
_create: function () {
// @ts-ignore
this.wrapper = $('<span>')
.addClass('custom-combobox')
.insertAfter(this.element);
this.element.hide();
this._createAutocomplete();
this._createShowAllButton();
// @ts-ignore
this.input.attr('placeholder', this.element.attr('placeholder'));
// @ts-ignore
this.input.focus().blur();
},
_createAutocomplete: function () {
var selected = this.element.children(':selected');
var value = selected.val() ? selected.text() : '';
// @ts-ignore
this.input = $('<input>')
// @ts-ignore
.appendTo(this.wrapper)
.val(value)
.attr('title', '')
.addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left " + this.element.attr('class'))
.autocomplete({
delay: 0,
minLength: 0,
// @ts-ignore
maxShowItems: 5,
source: $.proxy(this, '_source')
})
.tooltip({
classes: { 'ui-tooltip': 'ui-state-highlight' }
});
// @ts-ignore
this.input.focus().blur();
// @ts-ignore
// noinspection SpellCheckingInspection
this._on(this.input, {
autocompleteselect: function (event, ui) {
ui.item.option.selected = true;
// Get the value: ui.item.option.value
// Get the text: ui.item.value
callback(ui.item.option.value, ui.item.value);
this._trigger('select', event, {
item: ui.item.option
});
},
disable: function () {
this._disable();
},
enable: function () {
this._enable();
},
autocompletechange: '_removeIfInvalid'
});
},
_createShowAllButton: function () {
// @ts-ignore
var input = this.input;
var wasOpen = false;
$('<a>')
.attr('tabIndex', -1)
.attr('title', 'Mostrar todos os itens')
.tooltip()
// @ts-ignore
.appendTo(this.wrapper)
.button({
icons: {
primary: 'ui-icon-triangle-1-s'
},
text: false
})
.removeClass('ui-corner-all')
.on('mousedown', function () {
wasOpen = input.autocomplete('widget').is(':visible');
})
.on('click', function () {
wasOpen = input.autocomplete('widget').is(':visible');
input.trigger('focus');
if (wasOpen) {
return;
}
// Pass empty string as value to search for, displaying all results
input.autocomplete('search', '');
});
},
_source: function (request, response) {
var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), 'i');
response(this.element.children('option').map(function () {
var text = $(this).text();
// @ts-ignore
if (this.value && (!request.term || matcher.test(text))) {
return {
label: text,
value: text,
option: this
};
}
else {
return null;
}
}));
},
_removeIfInvalid: function (event, ui) {
// Selected an item, nothing to do
if (ui.item) {
return;
}
// Search for a match (case-insensitive)
// @ts-ignore
var value = this.input.val();
var valueLowerCase = value.toLowerCase();
var valid = false;
this.element.children('option').each(function () {
if ($(this).text().toLowerCase() === valueLowerCase) {
// @ts-ignore
this.selected = valid = true;
return false;
}
});
// Found a match, nothing to do
if (valid) {
// Get the value: this.element.val()
// Get the text: this.input.val()
// @ts-ignore
callback(this.element.val(), this.input.val());
return;
}
// Remove invalid value
// noinspection TypeScriptValidateJSTypes
// @ts-ignore
this.input
.val('')
.attr('title', "O valor " + value + " n\u00E3o existe para este item!")
.tooltip('open');
this.element.val('');
// @ts-ignore
this._delay(function () {
// @ts-ignore
this.input.tooltip('close').attr('title', '');
}, 2500);
// @ts-ignore
this.input.autocomplete('instance').term = '';
// @ts-ignore
invalidCallback(this.element.val(), this.input.val());
},
_destroy: function () {
// @ts-ignore
this.wrapper.remove();
this.element.show();
}
});
// @ts-ignore
$(combobox).combobox();
};
Core.prototype.loadData = function (combobox, data, keepValue) {
return new Promise(function (resolve) {
var parent = combobox.parentNode;
if (parent != null) {
var comboboxInput = parent.querySelector('input.custom-combobox-input');
core_services_elements_service_1.ElementRemove.childElements(combobox);
if (!keepValue) {
combobox.value = '';
comboboxInput.value = '';
}
var emptyOption = document.createElement('option');
emptyOption.value = '';
combobox.appendChild(emptyOption);
data.forEach(function (d) {
var option = document.createElement('option');
option.value = d.value;
option.innerText = d.text;
combobox.appendChild(option);
});
resolve(combobox);
}
else {
console.error('Parent of current combobox is null');
resolve(null);
}
});
};
return Core;
}());
// tslint:disable-next-line:variable-name
exports.ComboBoxCore = new Core();
var Data = /** @class */ (function () {
function Data() {
}
Data.prototype.byValue = function (arrayData, value) {
var tempActionPlan = arrayData.filter(function (x) { return x.value === value; });
if (value == null || tempActionPlan.length === 0) {
return '';
}
else {
return tempActionPlan[0].text;
}
};
return Data;
}());
// tslint:disable-next-line:variable-name
exports.ComboBoxData = new Data();
var Dom = /** @class */ (function () {
function Dom() {
}
Dom.prototype.disableInput = function (combobox, disable) {
var parent = combobox.parentNode;
var input = parent.querySelector('input');
if (input == null) {
console.error("Input not found on current combobox group: " + parent);
}
else {
if (disable) {
input.disabled = true; // this disables just the popup menu (widget),
input.classList.add('ui-autocomplete-disabled');
input.classList.add('ui-state-disabled');
input.setAttribute('tabIndex', '-1');
input.setAttribute('aria-disabled', 'true');
}
else {
input.disabled = false;
input.classList.remove('ui-state-disabled');
input.classList.remove('ui-autocomplete-disabled');
input.removeAttribute('tabIndex');
input.setAttribute('aria-disabled', 'false');
}
}
};
return Dom;
}());
// tslint:disable-next-line:variable-name
exports.ComboBoxDom = new Dom();
//# sourceMappingURL=core-services-combobox.service.js.map

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

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

@@ -1,1 +0,356 @@

"use strict";var __values=this&&this.__values||function(o){var s=typeof Symbol==="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length==="number")return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")};var __read=this&&this.__read||function(o,n){var m=typeof Symbol==="function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-- >0)&&!(r=i.next()).done)ar.push(r.value)}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i)}finally{if(e)throw e.error}}return ar};Object.defineProperty(exports,"__esModule",{value:true});var $=require("jquery");var moment=require("moment");var moment_range_1=require("moment-range");var core_services_string_service_1=require("../string/core-services-string.service");var Get=function(){function Get(){}Get.prototype.customDate=function(date,format){return moment(date).format(format)};Get.prototype.currentDate=function(outputFormat){if(outputFormat===void 0){outputFormat="DD/MM/YYYY"}return moment.utc(new Date,outputFormat).local().format(outputFormat)};Get.prototype.dayMonthYear=function(date,format){if(format===void 0){format="DD/MM/YYYY"}var x=moment(date,format,true).format(format);var d=parseInt(x.split("/")[0],10);var m=parseInt(x.split("/")[1],10)-1;var y=parseInt(x.split("/")[2],10);return{day:d,month:m,year:y}};Get.prototype.localDate=function(year,month,day,local){if(local===void 0){local="pt-BR"}var options={year:"numeric",month:"numeric",day:"numeric"};return new Date(year,month,day).toLocaleDateString(local,options)};Get.prototype.dateFromIso=function(date,format){if(format===void 0){format="DD/MM/YYYY"}return moment.utc(date).format(format)};Get.prototype.ganttDate=function(date){var splitDate=this.dayMonthYear(date);return new Date(splitDate.year,splitDate.month,splitDate.day)};Get.prototype.isoDateCustom=function(date,dateFormat,outputFormat){var splitDate=this.dayMonthYear(date);return new Date(splitDate.year,splitDate.month,splitDate.day).toISOString()};Get.prototype.isoDate=function(date,format){if(format===void 0){format="DD/MM/YYYY"}return moment.utc(date,format).format(format)};Get.prototype.isoDateWithoutTime=function(date){var splitDate=this.dayMonthYear(date);return moment.utc(new Date(splitDate.year,splitDate.month,splitDate.day)).toISOString()};Get.prototype.dateMilliseconds=function(date,dateFormat,outputFormat){return+moment(this.isoDateCustom(date,dateFormat,outputFormat),dateFormat).format("x")};Get.prototype.dateToMillisecondsNoTime=function(date){return+moment(this.isoDateWithoutTime(date)).format("x")};Get.prototype.millisecondsToDate=function(date,outputFormat){return moment.utc(date,"x").format(outputFormat)};Get.prototype.daysToMilliseconds=function(days){return days*24*60*60*1e3};Get.prototype.durationInDays=function(start,end,countFirstDay){var s=this.dayMonthYear(start);var e=this.dayMonthYear(end);var startDate=moment([s.year,s.month,s.day]);var endDate=moment([e.year,e.month,e.day]);var difference=endDate.diff(startDate,"days");var additional=countFirstDay?1:0;return difference+additional};Get.prototype.durationInMilliseconds=function(start,end){return this.daysToMilliseconds(this.durationInDays(start,end,false))};Get.prototype.monthName=function(month,language){if(language===void 0){language="pt-br"}if(language==="pt-br"||language==="pt-pt"||language==="pt"){switch(month){case 0:return"Janeiro";case 1:return"Fevereiro";case 2:return"Março";case 3:return"Abril";case 4:return"Maio";case 5:return"Junho";case 6:return"Julho";case 7:return"Agosto";case 8:return"Setembro";case 9:return"Outubro";case 10:return"Novembro";case 11:return"Dezembro";default:return""}}else{switch(month){case 0:return"January";case 1:return"February";case 2:return"March";case 3:return"April";case 4:return"May";case 5:return"June";case 6:return"July";case 7:return"August";case 8:return"September";case 9:return"October";case 10:return"November";case 11:return"December";default:return""}}};Get.prototype.weeksOfMonth=function(year,month){var e_1,_a,e_2,_b;var _moment=moment_range_1.extendMoment(moment);var startDate=moment([year,month]);var firstDay=moment(startDate).startOf("month");var endDay=moment(startDate).endOf("month");var monthRange=_moment.range(firstDay,endDay);var weeks=[];var _loop_1=function(range){var contain=weeks.filter(function(x){return x===range.week()}).length>0;if(!contain){weeks.push(range.week())}};try{for(var _c=__values(monthRange.by("days")),_d=_c.next();!_d.done;_d=_c.next()){var range=_d.value;_loop_1(range)}}catch(e_1_1){e_1={error:e_1_1}}finally{try{if(_d&&!_d.done&&(_a=_c.return))_a.call(_c)}finally{if(e_1)throw e_1.error}}var calendar=[];try{for(var weeks_1=__values(weeks),weeks_1_1=weeks_1.next();!weeks_1_1.done;weeks_1_1=weeks_1.next()){var week=weeks_1_1.value;var firstWeekDay=void 0;var lastWeekDay=void 0;var weekRange=void 0;if(month===11&&week===1){firstWeekDay=moment(year+1,"YYYY").week(week).day(0).isAfter(firstDay)?moment(year+1,"YYYY").week(week).day(0):firstDay;lastWeekDay=moment(year+1,"YYYY").week(week).day(6).isBefore(endDay)?moment(year+1,"YYYY").week(week).day(6):endDay;weekRange=_moment.range(firstWeekDay,lastWeekDay)}else{firstWeekDay=moment().week(week).day(0).isAfter(firstDay)?moment().week(week).day(0):firstDay;lastWeekDay=moment().week(week).day(6).isBefore(endDay)?moment().week(week).day(6):endDay;weekRange=_moment.range(firstWeekDay,lastWeekDay)}calendar.push({week:week,start:moment(weekRange.start.toISOString()).format("DD/MM/YYYY"),startDay:moment(weekRange.start.toISOString()).format("DD"),startMonth:moment(weekRange.start.toISOString()).format("MM"),startYear:moment(weekRange.start.toISOString()).format("YYYY"),end:moment(weekRange.end.toISOString()).format("DD/MM/YYYY"),endDay:moment(weekRange.end.toISOString()).format("DD"),endMonth:moment(weekRange.end.toISOString()).format("MM"),endYear:moment(weekRange.end.toISOString()).format("YYYY")})}}catch(e_2_1){e_2={error:e_2_1}}finally{try{if(weeks_1_1&&!weeks_1_1.done&&(_b=weeks_1.return))_b.call(weeks_1)}finally{if(e_2)throw e_2.error}}return calendar};Get.prototype.daysOfMonth=function(weeksRange){var e_3,_a;var range=[];try{for(var _b=__values(weeksRange.entries()),_c=_b.next();!_c.done;_c=_b.next()){var _d=__read(_c.value,2),i=_d[0],week=_d[1];var start=parseInt(weeksRange[i].startDay,10);var end=parseInt(weeksRange[i].endDay,10);var month=weeksRange[i].startMonth;var year=weeksRange[i].startYear;var weekDays=[];for(var j=start;j<=end;j++){var day=core_services_string_service_1.StringConverter.numberToString(j);weekDays.push({week:week.week,day:day,month:""+month,year:""+year,dayMonth:day+"/"+month,date:day+"/"+month+"/"+year,monthYear:month+"/"+year})}range.push(weekDays)}}catch(e_3_1){e_3={error:e_3_1}}finally{try{if(_c&&!_c.done&&(_a=_b.return))_a.call(_b)}finally{if(e_3)throw e_3.error}}return range};Get.prototype.weekOfYear=function(date,format){return moment(date,format).week()};return Get}();exports.DateGet=new Get;var Comparable=function(){function Comparable(){}Comparable.prototype.isDateBefore=function(startDate,endDate,type){if(type===void 0){type="day"}return moment(endDate).isBefore(startDate,type)};return Comparable}();exports.DateComparable=new Comparable;var Validation=function(){function Validation(){}Validation.prototype.date=function(date){var aDate=moment(date,"DD/MM/YYYY",true);return aDate.isValid()};return Validation}();exports.DateValidation=new Validation;var Picker=function(){function Picker(){}Picker.prototype.setDatePicker=function(datePicker,dateFormat){$(datePicker).datepicker("option","dateFormat",dateFormat)};Picker.prototype.monthYearDatePicker=function(datePicker,dateFormat,setValueCallback){$(datePicker).datepicker({changeMonth:true,changeYear:true,showButtonPanel:true,dateFormat:dateFormat,showAnim:"drop",showOn:"button",buttonImage:"src/assets/img/icons/calendar.svg",buttonImageOnly:true,buttonText:"Select period",onClose:function(){var _month=$("#ui-datepicker-div .ui-datepicker-month :selected").val();var _year=$("#ui-datepicker-div .ui-datepicker-year :selected").val();$(this).datepicker("setDate",new Date(_year,_month,1));setValueCallback(datePicker.value);setTimeout(function(){var parentCalendar=document.querySelector("#ui-datepicker-div");parentCalendar.classList.remove("only-month-year")},500)},beforeShow:function(){var parentCalendar=document.querySelector("#ui-datepicker-div");parentCalendar.classList.add("only-month-year");var selDate=$(this).val();if(selDate.length>0){var _year=parseInt(selDate.substring(selDate.length-4,selDate.length),10);var _month=parseInt(selDate.substring(0,selDate.length-5),10)-1;$(this).datepicker("option","defaultDate",new Date(_year,_month,1));$(this).datepicker("setDate",new Date(_year,_month,1));console.log(_year);console.log(_month)}}})};Picker.prototype.dateFromDatePicker=function(date,format,outputFormat){if(format===void 0){format="DD/MM/YYYY"}if(outputFormat===void 0){outputFormat="DD/MM/YYYY"}return moment(date,format).format(outputFormat)};Picker.prototype.localDateForDatePicker=function(date,outputFormat){if(outputFormat===void 0){outputFormat="DD/MM/YYYY"}return moment.utc(date,outputFormat).local().format(outputFormat)};Picker.prototype.currentDateForDatePicker=function(dateFormat,outputFormat){if(dateFormat===void 0){dateFormat="DD/MM/YYYY"}if(outputFormat===void 0){outputFormat="DD/MM/YYYY"}return moment.utc(new Date,"DD/MM/YYYY").format(outputFormat)};Picker.prototype.dateForDatePicker=function(month,day,year){var x=moment(new Date(year,month,day),"DD/MM/YYYY",true).toISOString().split("T")[0];x=x.split("-")[2]+"/"+x.split("-")[1]+"/"+x.split("-")[0];return x};return Picker}();exports.DatePicker=new Picker;
"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
var $ = require("jquery");
var moment = require("moment");
var moment_range_1 = require("moment-range");
var core_services_string_service_1 = require("../string/core-services-string.service");
var Get = /** @class */ (function () {
function Get() {
}
Get.prototype.customDate = function (date, format) {
return moment(date).format(format);
};
Get.prototype.currentDate = function (outputFormat) {
if (outputFormat === void 0) { outputFormat = 'DD/MM/YYYY'; }
return moment.utc(new Date(), outputFormat).local().format(outputFormat);
};
Get.prototype.dayMonthYear = function (date, format) {
if (format === void 0) { format = 'DD/MM/YYYY'; }
var x = moment(date, format, true).format(format);
var d = parseInt(x.split('/')[0], 10);
var m = parseInt(x.split('/')[1], 10) - 1;
var y = parseInt(x.split('/')[2], 10);
return { day: d, month: m, year: y };
};
Get.prototype.localDate = function (year, month, day, local) {
if (local === void 0) { local = 'pt-BR'; }
var options = { year: 'numeric', month: 'numeric', day: 'numeric' };
return new Date(year, month, day).toLocaleDateString(local, options);
};
Get.prototype.dateFromIso = function (date, format) {
if (format === void 0) { format = 'DD/MM/YYYY'; }
return moment.utc(date).format(format);
};
Get.prototype.ganttDate = function (date) {
var splitDate = this.dayMonthYear(date);
return new Date(splitDate.year, splitDate.month, splitDate.day);
};
Get.prototype.isoDateCustom = function (date, dateFormat, outputFormat) {
var splitDate = this.dayMonthYear(date);
return new Date(splitDate.year, splitDate.month, splitDate.day).toISOString();
};
Get.prototype.isoDate = function (date, format) {
if (format === void 0) { format = 'DD/MM/YYYY'; }
return moment.utc(date, format).format(format);
};
Get.prototype.isoDateWithoutTime = function (date) {
var splitDate = this.dayMonthYear(date);
return moment.utc(new Date(splitDate.year, splitDate.month, splitDate.day)).toISOString();
};
Get.prototype.dateMilliseconds = function (date, dateFormat, outputFormat) {
return +moment(this.isoDateCustom(date, dateFormat, outputFormat), dateFormat).format('x');
};
Get.prototype.dateToMillisecondsNoTime = function (date) {
return +moment(this.isoDateWithoutTime(date)).format('x');
};
Get.prototype.millisecondsToDate = function (date, outputFormat) {
return moment.utc(date, 'x').format(outputFormat);
};
Get.prototype.daysToMilliseconds = function (days) {
return days * 24 * 60 * 60 * 1000;
};
Get.prototype.durationInDays = function (start, end, countFirstDay) {
var s = this.dayMonthYear(start);
var e = this.dayMonthYear(end);
var startDate = moment([s.year, s.month, s.day]);
var endDate = moment([e.year, e.month, e.day]);
var difference = endDate.diff(startDate, 'days');
var additional = countFirstDay ? 1 : 0;
return difference + additional;
};
Get.prototype.durationInMilliseconds = function (start, end) {
return this.daysToMilliseconds(this.durationInDays(start, end, false));
};
Get.prototype.monthName = function (month, language) {
if (language === void 0) { language = 'pt-br'; }
if (language === 'pt-br' || language === 'pt-pt' || language === 'pt') {
switch (month) {
case 0: return 'Janeiro';
case 1: return 'Fevereiro';
case 2: return 'Março';
case 3: return 'Abril';
case 4: return 'Maio';
case 5: return 'Junho';
case 6: return 'Julho';
case 7: return 'Agosto';
case 8: return 'Setembro';
case 9: return 'Outubro';
case 10: return 'Novembro';
case 11: return 'Dezembro';
default: return '';
}
}
else {
switch (month) {
case 0: return 'January';
case 1: return 'February';
case 2: return 'March';
case 3: return 'April';
case 4: return 'May';
case 5: return 'June';
case 6: return 'July';
case 7: return 'August';
case 8: return 'September';
case 9: return 'October';
case 10: return 'November';
case 11: return 'December';
default: return '';
}
}
};
Get.prototype.weeksOfMonth = function (year, month) {
var e_1, _a, e_2, _b;
// @js-ignore
var _moment = moment_range_1.extendMoment(moment);
// Year and month are variables
var startDate = moment([year, month]);
// Get the first and last day of the month
var firstDay = moment(startDate).startOf('month');
var endDay = moment(startDate).endOf('month');
// Create a range for the month we can iterate through
var monthRange = _moment.range(firstDay, endDay);
// Get all the weeks during the current month
var weeks = [];
var _loop_1 = function (range) {
var contain = weeks.filter(function (x) { return x === range.week(); }).length > 0;
if (!contain) {
weeks.push(range.week());
}
};
try {
for (var _c = __values(monthRange.by('days')), _d = _c.next(); !_d.done; _d = _c.next()) {
var range = _d.value;
_loop_1(range);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
// Create a range for each week
var calendar = [];
try {
for (var weeks_1 = __values(weeks), weeks_1_1 = weeks_1.next(); !weeks_1_1.done; weeks_1_1 = weeks_1.next()) {
var week = weeks_1_1.value;
// Create a range for that week between 1st and 7th day
var firstWeekDay = void 0;
var lastWeekDay = void 0;
var weekRange = void 0;
if (month === 11 && week === 1) {
firstWeekDay = moment(year + 1, 'YYYY').week(week).day(0).isAfter(firstDay) ? moment(year + 1, 'YYYY').week(week).day(0) : firstDay;
lastWeekDay = moment(year + 1, 'YYYY').week(week).day(6).isBefore(endDay) ? moment(year + 1, 'YYYY').week(week).day(6) : endDay;
weekRange = _moment.range(firstWeekDay, lastWeekDay);
}
else {
firstWeekDay = moment().week(week).day(0).isAfter(firstDay) ? moment().week(week).day(0) : firstDay;
lastWeekDay = moment().week(week).day(6).isBefore(endDay) ? moment().week(week).day(6) : endDay;
weekRange = _moment.range(firstWeekDay, lastWeekDay);
}
// Add to the calendar
calendar.push({
week: week,
start: moment(weekRange.start.toISOString()).format('DD/MM/YYYY'),
startDay: moment(weekRange.start.toISOString()).format('DD'),
startMonth: moment(weekRange.start.toISOString()).format('MM'),
startYear: moment(weekRange.start.toISOString()).format('YYYY'),
end: moment(weekRange.end.toISOString()).format('DD/MM/YYYY'),
endDay: moment(weekRange.end.toISOString()).format('DD'),
endMonth: moment(weekRange.end.toISOString()).format('MM'),
endYear: moment(weekRange.end.toISOString()).format('YYYY')
});
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (weeks_1_1 && !weeks_1_1.done && (_b = weeks_1.return)) _b.call(weeks_1);
}
finally { if (e_2) throw e_2.error; }
}
return calendar;
};
Get.prototype.daysOfMonth = function (weeksRange) {
var e_3, _a;
var range = [];
try {
for (var _b = __values(weeksRange.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
var _d = __read(_c.value, 2), i = _d[0], week = _d[1];
var start = parseInt(weeksRange[i].startDay, 10);
var end = parseInt(weeksRange[i].endDay, 10);
var month = weeksRange[i].startMonth;
var year = weeksRange[i].startYear;
var weekDays = [];
for (var j = start; j <= end; j++) {
var day = core_services_string_service_1.StringConverter.numberToString(j);
weekDays.push({
week: week.week,
day: day,
month: "" + month,
year: "" + year,
dayMonth: day + "/" + month,
date: day + "/" + month + "/" + year,
monthYear: month + "/" + year,
});
}
range.push(weekDays);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
return range;
};
Get.prototype.weekOfYear = function (date, format) {
return moment(date, format).week();
};
return Get;
}());
// tslint:disable-next-line:variable-name
exports.DateGet = new Get();
var Comparable = /** @class */ (function () {
function Comparable() {
}
Comparable.prototype.isDateBefore = function (startDate, endDate, type) {
if (type === void 0) { type = 'day'; }
return moment(endDate).isBefore(startDate, type);
};
return Comparable;
}());
// tslint:disable-next-line:variable-name
exports.DateComparable = new Comparable();
var Validation = /** @class */ (function () {
function Validation() {
}
Validation.prototype.date = function (date) {
var aDate = moment(date, 'DD/MM/YYYY', true);
return aDate.isValid();
};
return Validation;
}());
// tslint:disable-next-line:variable-name
exports.DateValidation = new Validation();
var Picker = /** @class */ (function () {
function Picker() {
}
/**
* Date picker utilities;
* Jquery ui
* This function is using Jquery and Jquery-ui and typescript is not available
* To this function work is necessary the following imports, respectively:
* import * as $ from 'jquery'; or import $ = require('jquery');
* import '../../../../../node_modules/jquery-ui-dist/jquery-ui.min';
*/
Picker.prototype.setDatePicker = function (datePicker, dateFormat) {
$(datePicker).datepicker('option', 'dateFormat', dateFormat);
};
Picker.prototype.monthYearDatePicker = function (datePicker, dateFormat, setValueCallback) {
$(datePicker).datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: dateFormat,
showAnim: 'drop',
showOn: 'button',
buttonImage: 'src/assets/img/icon/calendar.svg',
buttonImageOnly: true,
buttonText: 'Select period',
onClose: function () {
var _month = $('#ui-datepicker-div .ui-datepicker-month :selected').val();
var _year = $('#ui-datepicker-div .ui-datepicker-year :selected').val();
// @ts-ignore
$(this).datepicker('setDate', new Date(_year, _month, 1));
setValueCallback(datePicker.value);
setTimeout(function () {
var parentCalendar = document.querySelector('#ui-datepicker-div');
// @ts-ignore
parentCalendar.classList.remove('only-month-year');
}, 500);
},
// @ts-ignore
beforeShow: function () {
var parentCalendar = document.querySelector('#ui-datepicker-div');
// @ts-ignore
parentCalendar.classList.add('only-month-year');
var selDate = $(this).val();
// @ts-ignore
if (selDate.length > 0) {
// @ts-ignore
var _year = parseInt(selDate.substring(selDate.length - 4, selDate.length), 10);
// @ts-ignore
var _month = parseInt(selDate.substring(0, selDate.length - 5), 10) - 1;
$(this).datepicker('option', 'defaultDate', new Date(_year, _month, 1));
$(this).datepicker('setDate', new Date(_year, _month, 1));
console.log(_year);
console.log(_month);
}
}
});
};
Picker.prototype.dateFromDatePicker = function (date, format, outputFormat) {
if (format === void 0) { format = 'DD/MM/YYYY'; }
if (outputFormat === void 0) { outputFormat = 'DD/MM/YYYY'; }
return moment(date, format).format(outputFormat);
};
Picker.prototype.localDateForDatePicker = function (date, outputFormat) {
if (outputFormat === void 0) { outputFormat = 'DD/MM/YYYY'; }
return moment.utc(date, outputFormat).local().format(outputFormat);
};
Picker.prototype.currentDateForDatePicker = function (dateFormat, outputFormat) {
if (dateFormat === void 0) { dateFormat = 'DD/MM/YYYY'; }
if (outputFormat === void 0) { outputFormat = 'DD/MM/YYYY'; }
return moment.utc(new Date(), 'DD/MM/YYYY').format(outputFormat);
};
Picker.prototype.dateForDatePicker = function (month, day, year) {
var x = moment(new Date(year, month, day), 'DD/MM/YYYY', true).toISOString().split('T')[0];
x = x.split('-')[2] + '/' + x.split('-')[1] + '/' + x.split('-')[0];
return x;
};
return Picker;
}());
// tslint:disable-next-line:variable-name
exports.DatePicker = new Picker();
//# sourceMappingURL=core-services-date.service.js.map

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

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

@@ -1,1 +0,77 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var core_services_date_service_1=require("../date/core-services-date.service");var Remove=function(){function Remove(){}Remove.prototype.childElements=function(elementClassId){if(typeof elementClassId==="string"){var element=document.querySelector(elementClassId);if(element!=null){while(element.firstChild){element.removeChild(element.firstChild)}}}else{while(elementClassId.firstChild){elementClassId.removeChild(elementClassId.firstChild)}}};return Remove}();exports.ElementRemove=new Remove;var Selector=function(){function Selector(){}Selector.prototype.element=function(className){return document.querySelector(className)};return Selector}();exports.ElementSelector=new Selector;var Highlight=function(){function Highlight(){}Highlight.prototype.clearError=function(field){var _a;if(typeof field==="object"){(_a=field)===null||_a===void 0?void 0:_a.classList.remove("required-fill")}else{if(field!=null){var currentField=document.querySelector(field);if(currentField!=null){currentField.classList.remove("required-fill")}}}};Highlight.prototype.error=function(fieldHighlighted){if(fieldHighlighted!=null){fieldHighlighted.classList.add("required-fill");fieldHighlighted.focus()}};Highlight.prototype.invalidDate=function(date,input){if(core_services_date_service_1.DateValidation.date(date)){input.classList.remove("error-highlight")}else{input.classList.add("error-highlight")}};Highlight.prototype.setError=function(field){if(field!=null){field.classList.add("required-fill");field.focus()}};return Highlight}();exports.ElementHighlight=new Highlight;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_services_date_service_1 = require("../date/core-services-date.service");
var Remove = /** @class */ (function () {
function Remove() {
}
Remove.prototype.childElements = function (elementClassId) {
if (typeof elementClassId === 'string') {
var element = document.querySelector(elementClassId);
if (element != null) {
while (element.firstChild) {
element.removeChild(element.firstChild);
}
}
}
else {
while (elementClassId.firstChild) {
elementClassId.removeChild(elementClassId.firstChild);
}
}
};
return Remove;
}());
// tslint:disable-next-line:variable-name
exports.ElementRemove = new Remove();
var Selector = /** @class */ (function () {
function Selector() {
}
Selector.prototype.element = function (className) {
return document.querySelector(className);
};
return Selector;
}());
// tslint:disable-next-line:variable-name
exports.ElementSelector = new Selector();
var Highlight = /** @class */ (function () {
function Highlight() {
}
Highlight.prototype.clearError = function (field) {
var _a;
if (typeof (field) === 'object') {
(_a = field) === null || _a === void 0 ? void 0 : _a.classList.remove('required-fill');
}
else {
if (field != null) {
var currentField = document.querySelector(field);
if (currentField != null) {
currentField.classList.remove('required-fill');
}
}
}
};
Highlight.prototype.error = function (fieldHighlighted) {
if (fieldHighlighted != null) {
fieldHighlighted.classList.add('required-fill');
fieldHighlighted.focus();
}
};
Highlight.prototype.invalidDate = function (date, input) {
if (core_services_date_service_1.DateValidation.date(date)) {
input.classList.remove('error-highlight');
}
else {
input.classList.add('error-highlight');
}
};
Highlight.prototype.setError = function (field) {
if (field != null) {
field.classList.add('required-fill');
field.focus();
}
};
return Highlight;
}());
// tslint:disable-next-line:variable-name
exports.ElementHighlight = new Highlight();
//# sourceMappingURL=core-services-elements.service.js.map

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

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

@@ -1,1 +0,31 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _InputMask=require("inputmask");var Mask=function(){function Mask(){}Mask.prototype.currency=function(field,type,currencySymbol){if(type===void 0){type="currency"}if(currencySymbol===void 0){currencySymbol="R$"}var options;var mask;if(type==="million-currency"){mask=currencySymbol+" 0,00mn";options={prefix:currencySymbol+" ",suffix:"mn",allowMinus:true}}else{mask=currencySymbol+" 0,00";options={prefix:currencySymbol+" ",numericInput:true,allowMinus:true,rightAlign:false,radixPoint:",",groupSeparator:"."}}var im=new _InputMask("currency",options);im.mask(field);return mask};Mask.prototype.remove=function(field){_InputMask.remove(field)};return Mask}();exports.InputMask=new Mask;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _InputMask = require("inputmask");
var Mask = /** @class */ (function () {
function Mask() {
}
Mask.prototype.currency = function (field, type, currencySymbol) {
if (type === void 0) { type = 'currency'; }
if (currencySymbol === void 0) { currencySymbol = 'R$'; }
var options;
var mask;
if (type === 'million-currency') {
mask = currencySymbol + " 0,00mn";
options = { prefix: currencySymbol + " ", suffix: 'mn', allowMinus: true };
}
else {
mask = currencySymbol + " 0,00";
options = { prefix: currencySymbol + " ", numericInput: true, allowMinus: true, rightAlign: false, radixPoint: ',', groupSeparator: '.' };
}
var im = new _InputMask('currency', options);
im.mask(field);
return mask;
};
Mask.prototype.remove = function (field) {
_InputMask.remove(field);
};
return Mask;
}());
// tslint:disable-next-line:variable-name
exports.InputMask = new Mask();
//# sourceMappingURL=core-services-input.service.js.map

@@ -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

@@ -1,1 +0,178 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var core_services_url_service_1=require("../url/core-services-url.service");var Clean=function(){function Clean(){}Clean.prototype.trim=function(text){if(text==null){return""}else{var between=/^\s*|\s*$/g;var middle=/\s\s+/g;return text.replace(between,"").replace(middle," ")}};Clean.prototype.trimLeft=function(text){if(text==null){return""}else{var between=/^\s*/g;return text.replace(between,"")}};Clean.prototype.trimRight=function(text){if(text==null){return""}else{var between=/\s*$/g;return text.replace(between,"")}};Clean.prototype.trimBetween=function(text){if(text==null){return""}else{var between=/^\s*|\s*$/g;return text.replace(between,"")}};Clean.prototype.trimMiddle=function(text){if(text==null){return""}else{var middle=/\s\s+/g;return text.replace(middle," ")}};Clean.prototype.cleanText=function(string){string=this.trim(string);return core_services_url_service_1.UrlDecode.decodeHtmlText(exports.StringConverter.stringUnicode(string).trim())};return Clean}();exports.StringClean=new Clean;var Converter=function(){function Converter(){}Converter.prototype.currencyToNumber=function(num,decimal,currency){if(decimal===void 0){decimal=","}if(currency!=null){return parseFloat(num.toString().replace(/\./g,"").replace(",",".").replace(" ","").replace(currency,""))}else{return parseFloat(num.toString().replace(/\./g,"").replace(",",".").replace("Ar$ ","").replace("R$ ","").replace("€ ","").replace("US$ ",""))}};Converter.prototype.formatNumber=function(num,decimal){if(decimal===void 0){decimal="."}var separator=decimal==="."?"$1.":"$1,";return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,separator)};Converter.prototype.numberToString=function(number){var maxLength=number.toString().length;if(maxLength<3){if(number<10){return"0"+number}else{return number.toString()}}else if(maxLength<4){if(number<10){return"00"+number}else if(number<100){return"0"+number}else{return number.toString()}}else if(maxLength<5){if(number<10){return"000"+number}else if(number<100){return"00"+number}else if(number<1e3){return"0"+number}else{return number.toString()}}else if(maxLength<6){if(number<10){return"0000"+number}else if(number<100){return"000"+number}else if(number<1e3){return"00"+number}else if(number<1e4){return"0"+number}else{return number.toString()}}else{return number.toString()}};Converter.prototype.stringToBoolean=function(value){switch(value){case"true":return true;case"false":return false;case"null":case null:return false;default:return true}};Converter.prototype.stringUnicode=function(string){try{return string.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}catch(e){return core_services_url_service_1.UrlDecode.decodeHtmlText(string)}};Converter.prototype.titleCase=function(string){var splitStr=string.toLowerCase().split(" ");for(var i=0;i<splitStr.length;i++){splitStr[i]=splitStr[i].charAt(0).toUpperCase()+splitStr[i].substring(1)}return splitStr.join(" ")};return Converter}();exports.StringConverter=new Converter;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_services_url_service_1 = require("../url/core-services-url.service");
var Clean = /** @class */ (function () {
function Clean() {
}
Clean.prototype.trim = function (text) {
if (text == null) {
return '';
}
else {
var between = /^\s*|\s*$/g; // remove space from start and end
var middle = /\s\s+/g; // remove space from middle
return text
.replace(between, '')
.replace(middle, ' ');
}
};
Clean.prototype.trimLeft = function (text) {
if (text == null) {
return '';
}
else {
var between = /^\s*/g; // remove space from start
return text.replace(between, '');
}
};
Clean.prototype.trimRight = function (text) {
if (text == null) {
return '';
}
else {
var between = /\s*$/g; // remove space from end
return text.replace(between, '');
}
};
Clean.prototype.trimBetween = function (text) {
if (text == null) {
return '';
}
else {
var between = /^\s*|\s*$/g; // remove space from start and end
return text.replace(between, '');
}
};
Clean.prototype.trimMiddle = function (text) {
if (text == null) {
return '';
}
else {
var middle = /\s\s+/g; // remove space from middle
return text.replace(middle, ' ');
}
};
Clean.prototype.cleanText = function (string) {
string = this.trim(string);
return core_services_url_service_1.UrlDecode.decodeHtmlText(exports.StringConverter.stringUnicode(string).trim());
};
return Clean;
}());
// tslint:disable-next-line:variable-name
exports.StringClean = new Clean();
var Converter = /** @class */ (function () {
function Converter() {
}
Converter.prototype.currencyToNumber = function (num, decimal, currency) {
if (decimal === void 0) { decimal = ','; }
if (currency != null) {
return parseFloat(num.toString()
.replace(/\./g, '')
.replace(',', '.')
.replace(' ', '')
.replace(currency, ''));
}
else {
return parseFloat(num.toString()
.replace(/\./g, '')
.replace(',', '.')
.replace('Ar$ ', '')
.replace('R$ ', '')
.replace('€ ', '')
.replace('US$ ', ''));
}
};
Converter.prototype.formatNumber = function (num, decimal) {
if (decimal === void 0) { decimal = '.'; }
var separator = decimal === '.' ? '$1.' : '$1,';
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, separator);
};
Converter.prototype.numberToString = function (number) {
var maxLength = number.toString().length;
if (maxLength < 3) {
if (number < 10) {
return '0' + number;
}
else {
return number.toString();
}
}
else if (maxLength < 4) {
if (number < 10) {
return '00' + number;
}
else if (number < 100) {
return '0' + number;
}
else {
return number.toString();
}
}
else if (maxLength < 5) {
if (number < 10) {
return '000' + number;
}
else if (number < 100) {
return '00' + number;
}
else if (number < 1000) {
return '0' + number;
}
else {
return number.toString();
}
}
else if (maxLength < 6) {
if (number < 10) {
return '0000' + number;
}
else if (number < 100) {
return '000' + number;
}
else if (number < 1000) {
return '00' + number;
}
else if (number < 10000) {
return '0' + number;
}
else {
return number.toString();
}
}
else {
return number.toString();
}
};
Converter.prototype.stringToBoolean = function (value) {
switch (value) {
case 'true':
return true;
case 'false':
return false;
case 'null':
case null:
return false;
default:
return true;
}
};
Converter.prototype.stringUnicode = function (string) {
try {
return string.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
}
catch (e) {
return core_services_url_service_1.UrlDecode.decodeHtmlText(string);
}
};
Converter.prototype.titleCase = function (string) {
var splitStr = string.toLowerCase().split(' ');
for (var i = 0; i < splitStr.length; i++) {
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
}
return splitStr.join(' ');
};
return Converter;
}());
// tslint:disable-next-line:variable-name
exports.StringConverter = new Converter();
//# sourceMappingURL=core-services-string.service.js.map

@@ -1,1 +0,391 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});var Core=function(){function Core(){}Core.prototype.currentUrl=function(){return window.location.href};return Core}();exports.UrlCore=new Core;var Decode=function(){function Decode(){}Decode.prototype.decodeHtmlText=function(value){return value.replace(/%E2%82%AC/g,"€").replace(/%E2%80%9A/g,"‚").replace(/%C6%92/g,"ƒ").replace(/%E2%80%9E/g,"„").replace(/%E2%80%A6/g,"…").replace(/%E2%80%A0/g,"†").replace(/%E2%80%A1/g,"‡").replace(/%CB%86/g,"ˆ").replace(/%E2%80%B0/g,"‰").replace(/%C5%A0/g,"Š").replace(/%E2%80%B9/g,"‹").replace(/%C5%92/g,"Œ").replace(/%C5%8D/g,"").replace(/%C5%BD/g,"Ž").replace(/%C2%90/g,"").replace(/%E2%80%98/g,"‘").replace(/%E2%80%99/g,"’").replace(/%E2%80%9C/g,"“").replace(/%E2%80%9D/g,"”").replace(/%E2%80%A2/g,"•").replace(/%E2%80%93/g,"–").replace(/%E2%80%94/g,"—").replace(/%CB%9C/g,"˜").replace(/%E2%84/g,"™").replace(/%C5%A1/g,"š").replace(/%E2%80/g,"›").replace(/%C5%93/g,"œ").replace(/%C5%BE/g,"ž").replace(/%C5%B8/g,"Ÿ").replace(/%C2%A0/g," ").replace(/%C2%A1/g,"¡").replace(/%C2%A2/g,"¢").replace(/%C2%A3/g,"£").replace(/%C2%A4/g,"¤").replace(/%C2%A5/g,"¥").replace(/%C2%A6/g,"¦").replace(/%C2%A7/g,"§").replace(/%C2%A8/g,"¨").replace(/%C2%A9/g,"©").replace(/%C2%AA/g,"ª").replace(/%C2%AB/g,"«").replace(/%C2%AC/g,"¬").replace(/%C2%AD/g,"").replace(/%C2%AE/g,"®").replace(/%C2%AF/g,"¯").replace(/%C2%B0/g,"°").replace(/%C2%B1/g,"±").replace(/%C2%B2/g,"²").replace(/%C2%B3/g,"³").replace(/%C2%B4/g,"´").replace(/%C2%B5/g,"µ").replace(/%C2%B6/g,"¶").replace(/%C2%B7/g,"·").replace(/%C2%B8/g,"¸").replace(/%C2%B9/g,"¹").replace(/%C2%BA/g,"º").replace(/%C2%BB/g,"»").replace(/%C2%BC/g,"¼").replace(/%C2%BD/g,"½").replace(/%C2%BE/g,"¾").replace(/%C2%BF/g,"¿").replace(/%C3%80/g,"À").replace(/%C3%81/g,"Á").replace(/%C3%82/g,"Â").replace(/%C3%83/g,"Ã").replace(/%C3%84/g,"Ä").replace(/%C3%85/g,"Å").replace(/%C3%86/g,"Æ").replace(/%C3%87/g,"Ç").replace(/%C3%88/g,"È").replace(/%C3%89/g,"É").replace(/%C3%8A/g,"Ê").replace(/%C3%8B/g,"Ë").replace(/%C3%8C/g,"Ì").replace(/%C3%8D/g,"Í").replace(/%C3%8E/g,"Î").replace(/%C3%8F/g,"Ï").replace(/%C3%90/g,"Ð").replace(/%C3%91/g,"Ñ").replace(/%C3%92/g,"Ò").replace(/%C3%93/g,"Ó").replace(/%C3%94/g,"Ô").replace(/%C3%95/g,"Õ").replace(/%C3%96/g,"Ö").replace(/%C3%97/g,"×").replace(/%C3%98/g,"Ø").replace(/%C3%99/g,"Ù").replace(/%C3%9A/g,"Ú").replace(/%C3%9B/g,"Û").replace(/%C3%9C/g,"Ü").replace(/%C3%9D/g,"Ý").replace(/%C3%9E/g,"Þ").replace(/%C3%9F/g,"ß").replace(/%C3%A0/g,"à").replace(/%C3%A1/g,"á").replace(/%C3%A2/g,"â").replace(/%C3%A3/g,"ã").replace(/%C3%A4/g,"ä").replace(/%C3%A5/g,"å").replace(/%C3%A6/g,"æ").replace(/%C3%A7/g,"ç").replace(/%C3%A8/g,"è").replace(/%C3%A9/g,"é").replace(/%C3%AA/g,"ê").replace(/%C3%AB/g,"ë").replace(/%C3%AC/g,"ì").replace(/%C3%AD/g,"í").replace(/%C3%AE/g,"î").replace(/%C3%AF/g,"ï").replace(/%C3%B0/g,"ð").replace(/%C3%B1/g,"ñ").replace(/%C3%B2/g,"ò").replace(/%C3%B3/g,"ó").replace(/%C3%B4/g,"ô").replace(/%C3%B5/g,"õ").replace(/%C3%B6/g,"ö").replace(/%C3%B7/g,"÷").replace(/%C3%B8/g,"ø").replace(/%C3%B9/g,"ù").replace(/%C3%BA/g,"ú").replace(/%C3%BB/g,"û").replace(/%C3%BC/g,"ü").replace(/%C3%BD/g,"ý").replace(/%C3%BE/g,"þ").replace(/%C3%BF/g,"ÿ").replace(/%20/g," ").replace(/%21/g,"!").replace(/%22/g,'"').replace(/%23/g,"#").replace(/%24/g,"$").replace(/%25/g,"%").replace(/%26/g,"&").replace(/%27/g,"'").replace(/%28/g,"(").replace(/%29/g,")").replace(/%2A/g,"*").replace(/%2B/g,"+").replace(/%2C/g,",").replace(/%2D/g,"-").replace(/%2E/g,".").replace(/%2F/g,"/").replace(/%30/g,"0").replace(/%31/g,"1").replace(/%32/g,"2").replace(/%33/g,"3").replace(/%34/g,"4").replace(/%35/g,"5").replace(/%36/g,"6").replace(/%37/g,"7").replace(/%38/g,"8").replace(/%39/g,"9").replace(/%3A/g,":").replace(/%3B/g,";").replace(/%3C/g,"<").replace(/%3D/g,"=").replace(/%3E/g,">").replace(/%3F/g,"?").replace(/%40/g,"@").replace(/%41/g,"A").replace(/%42/g,"B").replace(/%43/g,"C").replace(/%44/g,"D").replace(/%45/g,"E").replace(/%46/g,"F").replace(/%47/g,"G").replace(/%48/g,"H").replace(/%49/g,"I").replace(/%4A/g,"J").replace(/%4B/g,"K").replace(/%4C/g,"L").replace(/%4D/g,"M").replace(/%4E/g,"N").replace(/%4F/g,"O").replace(/%50/g,"P").replace(/%51/g,"Q").replace(/%52/g,"R").replace(/%53/g,"S").replace(/%54/g,"T").replace(/%55/g,"U").replace(/%56/g,"V").replace(/%57/g,"W").replace(/%58/g,"X").replace(/%59/g,"Y").replace(/%5A/g,"Z").replace(/%5B/g,"[").replace(/%5C/g,"\\").replace(/%5D/g,"]").replace(/%5E/g,"^").replace(/%5F/g,"_").replace(/%60/g,"`").replace(/%61/g,"a").replace(/%62/g,"b").replace(/%63/g,"c").replace(/%64/g,"d").replace(/%65/g,"e").replace(/%66/g,"f").replace(/%67/g,"g").replace(/%68/g,"h").replace(/%69/g,"i").replace(/%6A/g,"j").replace(/%6B/g,"k").replace(/%6C/g,"l").replace(/%6D/g,"m").replace(/%6E/g,"n").replace(/%6F/g,"o").replace(/%70/g,"p").replace(/%71/g,"q").replace(/%72/g,"r").replace(/%73/g,"s").replace(/%74/g,"t").replace(/%75/g,"u").replace(/%76/g,"v").replace(/%77/g,"w").replace(/%78/g,"x").replace(/%79/g,"y").replace(/%7A/g,"z").replace(/%7B/g,"{").replace(/%7C/g,"|").replace(/%7D/g,"}").replace(/%7E/g,"~").replace(/%7F/g," ").replace(/%80/g,"`").replace(/%81/g,"").replace(/%82/g,"‚").replace(/%83/g,"ƒ").replace(/%84/g,"„").replace(/%85/g,"…").replace(/%86/g,"†").replace(/%87/g,"‡").replace(/%88/g,"ˆ").replace(/%89/g,"‰").replace(/%8A/g,"Š").replace(/%8B/g,"‹").replace(/%8C/g,"Œ").replace(/%8D/g,"").replace(/%8E/g,"Ž").replace(/%8F/g,"").replace(/%90/g,"").replace(/%91/g,"‘").replace(/%92/g,"’").replace(/%93/g,"“").replace(/%94/g,"”").replace(/%95/g,"•").replace(/%96/g,"–").replace(/%97/g,"—").replace(/%98/g,"˜").replace(/%99/g,"™").replace(/%9A/g,"š").replace(/%9B/g,"›").replace(/%9C/g,"œ").replace(/%9D/g,"").replace(/%9E/g,"ž").replace(/%9F/g,"Ÿ").replace(/%A0/g," ").replace(/%A1/g,"¡").replace(/%A2/g,"¢").replace(/%A3/g,"£").replace(/%A4/g,"¤").replace(/%A5/g,"¥").replace(/%A6/g,"¦").replace(/%A7/g,"§").replace(/%A8/g,"¨").replace(/%A9/g,"©").replace(/%AA/g,"ª").replace(/%AB/g,"«").replace(/%AC/g,"¬").replace(/%AD/g,"").replace(/%AE/g,"®").replace(/%AF/g,"¯").replace(/%B0/g,"°").replace(/%B1/g,"±").replace(/%B2/g,"²").replace(/%B3/g,"³").replace(/%B4/g,"´").replace(/%B5/g,"µ").replace(/%B6/g,"¶").replace(/%B7/g,"·").replace(/%B8/g,"¸").replace(/%B9/g,"¹").replace(/%BA/g,"º").replace(/%BB/g,"»").replace(/%BC/g,"¼").replace(/%BD/g,"½").replace(/%BE/g,"¾").replace(/%BF/g,"¿").replace(/%C0/g,"À").replace(/%C1/g,"Á").replace(/%C2/g,"Â").replace(/%C3/g,"Ã").replace(/%C4/g,"Ä").replace(/%C5/g,"Å").replace(/%C6/g,"Æ").replace(/%C7/g,"Ç").replace(/%C8/g,"È").replace(/%C9/g,"É").replace(/%CA/g,"Ê").replace(/%CB/g,"Ë").replace(/%CC/g,"Ì").replace(/%CD/g,"Í").replace(/%CE/g,"Î").replace(/%CF/g,"Ï").replace(/%D0/g,"Ð").replace(/%D1/g,"Ñ").replace(/%D2/g,"Ò").replace(/%D3/g,"Ó").replace(/%D4/g,"Ô").replace(/%D5/g,"Õ").replace(/%D6/g,"Ö").replace(/%D7/g,"×").replace(/%D8/g,"Ø").replace(/%D9/g,"Ù").replace(/%DA/g,"Ú").replace(/%DB/g,"Û").replace(/%DC/g,"Ü").replace(/%DD/g,"Ý").replace(/%DE/g,"Þ").replace(/%DF/g,"ß").replace(/%E0/g,"à").replace(/%E1/g,"á").replace(/%E2/g,"â").replace(/%E3/g,"ã").replace(/%E4/g,"ä").replace(/%E5/g,"å").replace(/%E6/g,"æ").replace(/%E7/g,"ç").replace(/%E8/g,"è").replace(/%E9/g,"é").replace(/%EA/g,"ê").replace(/%EB/g,"ë").replace(/%EC/g,"ì").replace(/%ED/g,"í").replace(/%EE/g,"î").replace(/%EF/g,"ï").replace(/%F0/g,"ð").replace(/%F1/g,"ñ").replace(/%F2/g,"ò").replace(/%F3/g,"ó").replace(/%F4/g,"ô").replace(/%F5/g,"õ").replace(/%F6/g,"ö").replace(/%F7/g,"÷").replace(/%F8/g,"ø").replace(/%F9/g,"ù").replace(/%FA/g,"ú").replace(/%FB/g,"û").replace(/%FC/g,"ü").replace(/%FD/g,"ý").replace(/%FE/g,"þ").replace(/%FF/g,"ÿ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")};return Decode}();exports.UrlDecode=new Decode;var Params=function(){function Params(){}Params.prototype.urlVarsDecoded=function(){var vars={};window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,key,value){vars[key]=exports.UrlDecode.decodeHtmlText(value)});return vars};return Params}();exports.UrlParams=new Params;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Core = /** @class */ (function () {
function Core() {
}
Core.prototype.currentUrl = function () {
return window.location.href;
};
return Core;
}());
// tslint:disable-next-line:variable-name
exports.UrlCore = new Core();
var Decode = /** @class */ (function () {
function Decode() {
}
Decode.prototype.decodeHtmlText = function (value) {
return value
.replace(/%E2%82%AC/g, '€')
.replace(/%E2%80%9A/g, '‚')
.replace(/%C6%92/g, 'ƒ')
.replace(/%E2%80%9E/g, '„')
.replace(/%E2%80%A6/g, '…')
.replace(/%E2%80%A0/g, '†')
.replace(/%E2%80%A1/g, '‡')
.replace(/%CB%86/g, 'ˆ')
.replace(/%E2%80%B0/g, '‰')
.replace(/%C5%A0/g, 'Š')
.replace(/%E2%80%B9/g, '‹')
.replace(/%C5%92/g, 'Œ')
.replace(/%C5%8D/g, '')
.replace(/%C5%BD/g, 'Ž')
.replace(/%C2%90/g, '')
.replace(/%E2%80%98/g, '‘')
.replace(/%E2%80%99/g, '’')
.replace(/%E2%80%9C/g, '“')
.replace(/%E2%80%9D/g, '”')
.replace(/%E2%80%A2/g, '•')
.replace(/%E2%80%93/g, '–')
.replace(/%E2%80%94/g, '—')
.replace(/%CB%9C/g, '˜')
.replace(/%E2%84/g, '™')
.replace(/%C5%A1/g, 'š')
.replace(/%E2%80/g, '›')
.replace(/%C5%93/g, 'œ')
.replace(/%C5%BE/g, 'ž')
.replace(/%C5%B8/g, 'Ÿ')
.replace(/%C2%A0/g, ' ')
.replace(/%C2%A1/g, '¡')
.replace(/%C2%A2/g, '¢')
.replace(/%C2%A3/g, '£')
.replace(/%C2%A4/g, '¤')
.replace(/%C2%A5/g, '¥')
.replace(/%C2%A6/g, '¦')
.replace(/%C2%A7/g, '§')
.replace(/%C2%A8/g, '¨')
.replace(/%C2%A9/g, '©')
.replace(/%C2%AA/g, 'ª')
.replace(/%C2%AB/g, '«')
.replace(/%C2%AC/g, '¬')
.replace(/%C2%AD/g, '')
.replace(/%C2%AE/g, '®')
.replace(/%C2%AF/g, '¯')
.replace(/%C2%B0/g, '°')
.replace(/%C2%B1/g, '±')
.replace(/%C2%B2/g, '²')
.replace(/%C2%B3/g, '³')
.replace(/%C2%B4/g, '´')
.replace(/%C2%B5/g, 'µ')
.replace(/%C2%B6/g, '¶')
.replace(/%C2%B7/g, '·')
.replace(/%C2%B8/g, '¸')
.replace(/%C2%B9/g, '¹')
.replace(/%C2%BA/g, 'º')
.replace(/%C2%BB/g, '»')
.replace(/%C2%BC/g, '¼')
.replace(/%C2%BD/g, '½')
.replace(/%C2%BE/g, '¾')
.replace(/%C2%BF/g, '¿')
.replace(/%C3%80/g, 'À')
.replace(/%C3%81/g, 'Á')
.replace(/%C3%82/g, 'Â')
.replace(/%C3%83/g, 'Ã')
.replace(/%C3%84/g, 'Ä')
.replace(/%C3%85/g, 'Å')
.replace(/%C3%86/g, 'Æ')
.replace(/%C3%87/g, 'Ç')
.replace(/%C3%88/g, 'È')
.replace(/%C3%89/g, 'É')
.replace(/%C3%8A/g, 'Ê')
.replace(/%C3%8B/g, 'Ë')
.replace(/%C3%8C/g, 'Ì')
.replace(/%C3%8D/g, 'Í')
.replace(/%C3%8E/g, 'Î')
.replace(/%C3%8F/g, 'Ï')
.replace(/%C3%90/g, 'Ð')
.replace(/%C3%91/g, 'Ñ')
.replace(/%C3%92/g, 'Ò')
.replace(/%C3%93/g, 'Ó')
.replace(/%C3%94/g, 'Ô')
.replace(/%C3%95/g, 'Õ')
.replace(/%C3%96/g, 'Ö')
.replace(/%C3%97/g, '×')
.replace(/%C3%98/g, 'Ø')
.replace(/%C3%99/g, 'Ù')
.replace(/%C3%9A/g, 'Ú')
.replace(/%C3%9B/g, 'Û')
.replace(/%C3%9C/g, 'Ü')
.replace(/%C3%9D/g, 'Ý')
.replace(/%C3%9E/g, 'Þ')
.replace(/%C3%9F/g, 'ß')
.replace(/%C3%A0/g, 'à')
.replace(/%C3%A1/g, 'á')
.replace(/%C3%A2/g, 'â')
.replace(/%C3%A3/g, 'ã')
.replace(/%C3%A4/g, 'ä')
.replace(/%C3%A5/g, 'å')
.replace(/%C3%A6/g, 'æ')
.replace(/%C3%A7/g, 'ç')
.replace(/%C3%A8/g, 'è')
.replace(/%C3%A9/g, 'é')
.replace(/%C3%AA/g, 'ê')
.replace(/%C3%AB/g, 'ë')
.replace(/%C3%AC/g, 'ì')
.replace(/%C3%AD/g, 'í')
.replace(/%C3%AE/g, 'î')
.replace(/%C3%AF/g, 'ï')
.replace(/%C3%B0/g, 'ð')
.replace(/%C3%B1/g, 'ñ')
.replace(/%C3%B2/g, 'ò')
.replace(/%C3%B3/g, 'ó')
.replace(/%C3%B4/g, 'ô')
.replace(/%C3%B5/g, 'õ')
.replace(/%C3%B6/g, 'ö')
.replace(/%C3%B7/g, '÷')
.replace(/%C3%B8/g, 'ø')
.replace(/%C3%B9/g, 'ù')
.replace(/%C3%BA/g, 'ú')
.replace(/%C3%BB/g, 'û')
.replace(/%C3%BC/g, 'ü')
.replace(/%C3%BD/g, 'ý')
.replace(/%C3%BE/g, 'þ')
.replace(/%C3%BF/g, 'ÿ')
.replace(/%20/g, ' ')
.replace(/%21/g, '!')
.replace(/%22/g, '"')
.replace(/%23/g, '#')
.replace(/%24/g, '$')
.replace(/%25/g, '%')
.replace(/%26/g, '&')
.replace(/%27/g, '\'')
.replace(/%28/g, '(')
.replace(/%29/g, ')')
.replace(/%2A/g, '*')
.replace(/%2B/g, '+')
.replace(/%2C/g, ',')
.replace(/%2D/g, '-')
.replace(/%2E/g, '.')
.replace(/%2F/g, '/')
.replace(/%30/g, '0')
.replace(/%31/g, '1')
.replace(/%32/g, '2')
.replace(/%33/g, '3')
.replace(/%34/g, '4')
.replace(/%35/g, '5')
.replace(/%36/g, '6')
.replace(/%37/g, '7')
.replace(/%38/g, '8')
.replace(/%39/g, '9')
.replace(/%3A/g, ':')
.replace(/%3B/g, ';')
.replace(/%3C/g, '<')
.replace(/%3D/g, '=')
.replace(/%3E/g, '>')
.replace(/%3F/g, '?')
.replace(/%40/g, '@')
.replace(/%41/g, 'A')
.replace(/%42/g, 'B')
.replace(/%43/g, 'C')
.replace(/%44/g, 'D')
.replace(/%45/g, 'E')
.replace(/%46/g, 'F')
.replace(/%47/g, 'G')
.replace(/%48/g, 'H')
.replace(/%49/g, 'I')
.replace(/%4A/g, 'J')
.replace(/%4B/g, 'K')
.replace(/%4C/g, 'L')
.replace(/%4D/g, 'M')
.replace(/%4E/g, 'N')
.replace(/%4F/g, 'O')
.replace(/%50/g, 'P')
.replace(/%51/g, 'Q')
.replace(/%52/g, 'R')
.replace(/%53/g, 'S')
.replace(/%54/g, 'T')
.replace(/%55/g, 'U')
.replace(/%56/g, 'V')
.replace(/%57/g, 'W')
.replace(/%58/g, 'X')
.replace(/%59/g, 'Y')
.replace(/%5A/g, 'Z')
.replace(/%5B/g, '[')
.replace(/%5C/g, '\\')
.replace(/%5D/g, ']')
.replace(/%5E/g, '^')
.replace(/%5F/g, '_')
.replace(/%60/g, '`')
.replace(/%61/g, 'a')
.replace(/%62/g, 'b')
.replace(/%63/g, 'c')
.replace(/%64/g, 'd')
.replace(/%65/g, 'e')
.replace(/%66/g, 'f')
.replace(/%67/g, 'g')
.replace(/%68/g, 'h')
.replace(/%69/g, 'i')
.replace(/%6A/g, 'j')
.replace(/%6B/g, 'k')
.replace(/%6C/g, 'l')
.replace(/%6D/g, 'm')
.replace(/%6E/g, 'n')
.replace(/%6F/g, 'o')
.replace(/%70/g, 'p')
.replace(/%71/g, 'q')
.replace(/%72/g, 'r')
.replace(/%73/g, 's')
.replace(/%74/g, 't')
.replace(/%75/g, 'u')
.replace(/%76/g, 'v')
.replace(/%77/g, 'w')
.replace(/%78/g, 'x')
.replace(/%79/g, 'y')
.replace(/%7A/g, 'z')
.replace(/%7B/g, '{')
.replace(/%7C/g, '|')
.replace(/%7D/g, '}')
.replace(/%7E/g, '~')
.replace(/%7F/g, ' ')
.replace(/%80/g, '`')
.replace(/%81/g, '')
.replace(/%82/g, '‚')
.replace(/%83/g, 'ƒ')
.replace(/%84/g, '„')
.replace(/%85/g, '…')
.replace(/%86/g, '†')
.replace(/%87/g, '‡')
.replace(/%88/g, 'ˆ')
.replace(/%89/g, '‰')
.replace(/%8A/g, 'Š')
.replace(/%8B/g, '‹')
.replace(/%8C/g, 'Œ')
.replace(/%8D/g, '')
.replace(/%8E/g, 'Ž')
.replace(/%8F/g, '')
.replace(/%90/g, '')
.replace(/%91/g, '‘')
.replace(/%92/g, '’')
.replace(/%93/g, '“')
.replace(/%94/g, '”')
.replace(/%95/g, '•')
.replace(/%96/g, '–')
.replace(/%97/g, '—')
.replace(/%98/g, '˜')
.replace(/%99/g, '™')
.replace(/%9A/g, 'š')
.replace(/%9B/g, '›')
.replace(/%9C/g, 'œ')
.replace(/%9D/g, '')
.replace(/%9E/g, 'ž')
.replace(/%9F/g, 'Ÿ')
.replace(/%A0/g, ' ')
.replace(/%A1/g, '¡')
.replace(/%A2/g, '¢')
.replace(/%A3/g, '£')
.replace(/%A4/g, '¤')
.replace(/%A5/g, '¥')
.replace(/%A6/g, '¦')
.replace(/%A7/g, '§')
.replace(/%A8/g, '¨')
.replace(/%A9/g, '©')
.replace(/%AA/g, 'ª')
.replace(/%AB/g, '«')
.replace(/%AC/g, '¬')
.replace(/%AD/g, '')
.replace(/%AE/g, '®')
.replace(/%AF/g, '¯')
.replace(/%B0/g, '°')
.replace(/%B1/g, '±')
.replace(/%B2/g, '²')
.replace(/%B3/g, '³')
.replace(/%B4/g, '´')
.replace(/%B5/g, 'µ')
.replace(/%B6/g, '¶')
.replace(/%B7/g, '·')
.replace(/%B8/g, '¸')
.replace(/%B9/g, '¹')
.replace(/%BA/g, 'º')
.replace(/%BB/g, '»')
.replace(/%BC/g, '¼')
.replace(/%BD/g, '½')
.replace(/%BE/g, '¾')
.replace(/%BF/g, '¿')
.replace(/%C0/g, 'À')
.replace(/%C1/g, 'Á')
.replace(/%C2/g, 'Â')
.replace(/%C3/g, 'Ã')
.replace(/%C4/g, 'Ä')
.replace(/%C5/g, 'Å')
.replace(/%C6/g, 'Æ')
.replace(/%C7/g, 'Ç')
.replace(/%C8/g, 'È')
.replace(/%C9/g, 'É')
.replace(/%CA/g, 'Ê')
.replace(/%CB/g, 'Ë')
.replace(/%CC/g, 'Ì')
.replace(/%CD/g, 'Í')
.replace(/%CE/g, 'Î')
.replace(/%CF/g, 'Ï')
.replace(/%D0/g, 'Ð')
.replace(/%D1/g, 'Ñ')
.replace(/%D2/g, 'Ò')
.replace(/%D3/g, 'Ó')
.replace(/%D4/g, 'Ô')
.replace(/%D5/g, 'Õ')
.replace(/%D6/g, 'Ö')
.replace(/%D7/g, '×')
.replace(/%D8/g, 'Ø')
.replace(/%D9/g, 'Ù')
.replace(/%DA/g, 'Ú')
.replace(/%DB/g, 'Û')
.replace(/%DC/g, 'Ü')
.replace(/%DD/g, 'Ý')
.replace(/%DE/g, 'Þ')
.replace(/%DF/g, 'ß')
.replace(/%E0/g, 'à')
.replace(/%E1/g, 'á')
.replace(/%E2/g, 'â')
.replace(/%E3/g, 'ã')
.replace(/%E4/g, 'ä')
.replace(/%E5/g, 'å')
.replace(/%E6/g, 'æ')
.replace(/%E7/g, 'ç')
.replace(/%E8/g, 'è')
.replace(/%E9/g, 'é')
.replace(/%EA/g, 'ê')
.replace(/%EB/g, 'ë')
.replace(/%EC/g, 'ì')
.replace(/%ED/g, 'í')
.replace(/%EE/g, 'î')
.replace(/%EF/g, 'ï')
.replace(/%F0/g, 'ð')
.replace(/%F1/g, 'ñ')
.replace(/%F2/g, 'ò')
.replace(/%F3/g, 'ó')
.replace(/%F4/g, 'ô')
.replace(/%F5/g, 'õ')
.replace(/%F6/g, 'ö')
.replace(/%F7/g, '÷')
.replace(/%F8/g, 'ø')
.replace(/%F9/g, 'ù')
.replace(/%FA/g, 'ú')
.replace(/%FB/g, 'û')
.replace(/%FC/g, 'ü')
.replace(/%FD/g, 'ý')
.replace(/%FE/g, 'þ')
.replace(/%FF/g, 'ÿ')
.replace(/&amp;/g, '&')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>');
};
return Decode;
}());
// tslint:disable-next-line:variable-name
exports.UrlDecode = new Decode();
var Params = /** @class */ (function () {
function Params() {
}
Params.prototype.urlVarsDecoded = function () {
var vars = {};
// @ts-ignore
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
// @ts-ignore
vars[key] = exports.UrlDecode.decodeHtmlText(value);
});
return vars;
};
return Params;
}());
// tslint:disable-next-line:variable-name
exports.UrlParams = new Params();
//# sourceMappingURL=core-services-url.service.js.map
{
"name": "gl-w-frontend",
"version": "1.4.3",
"version": "1.4.4",
"description": "Common code for using among web front-end development such as pure JavaScript, ES6+ and TypeScript",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

# gl-w-frontend #
[![version](https://img.shields.io/badge/version-1.4.3-green.svg)](https://www.npmjs.com/package/gl-w-frontend)
[![version](https://img.shields.io/badge/version-1.4.4-green.svg)](https://www.npmjs.com/package/gl-w-frontend)

@@ -4,0 +4,0 @@ ### What is this repository for? ###

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

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