Remove outdated plugin files

This commit is contained in:
XhmikosR 2020-06-01 14:44:44 +03:00
parent 870df4406d
commit 1af43bd9ea
44 changed files with 1 additions and 9085 deletions

View file

@ -1372,7 +1372,7 @@
<script src="../../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
<!-- InputMask -->
<script src="../../plugins/moment/moment.min.js"></script>
<script src="../../plugins/inputmask/min/jquery.inputmask.bundle.min.js"></script>
<script src="../../plugins/inputmask/jquery.inputmask.min.js"></script>
<!-- date-range-picker -->
<script src="../../plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->

View file

@ -1,16 +0,0 @@
/**
* A wrapper class around the window object to manage the
* resize event.
*
* When the user resizes the window, Filterizr needs to trigger
* a refiltering of the grid so that the grid items can assume
* their new positions.
*/
export default class BrowserWindow {
private resizeHandler?;
constructor();
private debounceEventHandler;
destroy(): void;
setResizeEventHandler(resizeHandler: EventListener): void;
private removeResizeHandler;
}

View file

@ -1,36 +0,0 @@
import { RawOptionsCallbacks } from './FilterizrOptions/defaultOptions';
import FilterizrOptions from './FilterizrOptions/FilterizrOptions';
import FilterItems from './FilterItems';
/**
* Resembles the grid of items within Filterizr.
*/
export default class FilterContainer {
node: Element;
options: FilterizrOptions;
filterItems: FilterItems;
dimensions: {
width: number;
height: number;
};
private onTransitionEndHandler?;
constructor(node: Element, options: FilterizrOptions);
destroy(): void;
/**
* Turn the HTML elements in the grid to FilterItem
* instances and return a collection of them.
*/
makeFilterItems(options: FilterizrOptions): FilterItems;
/**
* Inserts a new item into the grid.
* @param node - HTML node to instantiate as FilterItem and append to the grid
* @param options - Filterizr options
*/
insertItem(node: Element, options: FilterizrOptions): void;
calculateColumns(): number;
updateDimensions(): void;
updateHeight(newHeight: number): void;
bindEvents(callbacks: RawOptionsCallbacks): void;
unbindEvents(callbacks: RawOptionsCallbacks): void;
trigger(eventType: string): void;
private updateWidth;
}

View file

@ -1,98 +0,0 @@
import { Dictionary } from './types/interfaces/Dictionary';
import FilterizrOptions from './FilterizrOptions/FilterizrOptions';
export interface Position {
left: number;
top: number;
}
/**
* Resembles an item in the grid of Filterizr.
*/
export default class FilterItem {
node: Element;
options: FilterizrOptions;
dimensions: {
width: number;
height: number;
};
private data;
private sortData;
private index;
private filteredOut;
private lastPosition;
private onTransitionEndHandler;
constructor(node: Element, index: number, options: FilterizrOptions);
/**
* Destroys the FilterItem instance
*/
destroy(): void;
/**
* Filters in a specific FilterItem out of the grid.
* @param targetPosition the position towards which the element should animate
* @param cssOptions for the animation
*/
filterIn(targetPosition: Position, cssOptions: Dictionary): void;
/**
* Filters out a specific FilterItem out of the grid.
* @param cssOptions for the animation
*/
filterOut(cssOptions: Dictionary): void;
/**
* Helper method to calculate the animation delay for a given grid item
* @param delay in ms
* @param delayMode can be 'alternate' or 'progressive'
*/
getTransitionDelay(delay: number, delayMode: 'progressive' | 'alternate'): number;
/**
* Returns true if the text contents of the FilterItem match the search term
* @param searchTerm to look up
* @return if the innerText matches the term
*/
contentsMatchSearch(searchTerm: string): boolean;
/**
* Recalculates the dimensions of the element and updates them in the state
*/
updateDimensions(): void;
/**
* Returns all categories of the grid items data-category attribute
* with a regexp regarding all whitespace.
* @return {String[]} an array of the categories the item belongs to
*/
getCategories(): string[];
/**
* Returns the value of the sort attribute
* @param sortAttribute "index", "sortData" or custom user data-attribute by which to sort
*/
getSortAttribute(sortAttribute: string): string | number;
/**
* Helper method for the search method of Filterizr
* @return {String} innerText of the FilterItem in lowercase
*/
private getContentsLowercase;
/**
* Sets up the events related to the FilterItem instance
*/
private bindEvents;
/**
* Removes all events related to the FilterItem instance
*/
private unbindEvents;
/**
* Calculates and returns the transition css property based on options.
*/
private getTransitionStyle;
/**
* Sets the transition css property as an inline style on the FilterItem.
*
* The idea here is that during the very first render items should assume
* their positions directly.
*
* Following renders should actually trigger the transitions, which is why
* we need to delay setting the transition property.
*
* Unfortunately, JavaScript code executes on the same thread as the
* browser's rendering. Everything that needs to be drawn waits for
* JavaScript execution to complete. Thus, we need to use a setTimeout
* here to defer setting the transition style at the first rendering cycle.
*/
private setTransitionStyle;
}

View file

@ -1,22 +0,0 @@
import { Filter } from './ActiveFilter';
import FilterItem from './FilterItem';
import FilterizrOptions from './FilterizrOptions/FilterizrOptions';
export default class FilterItems {
private filterItems;
private options;
constructor(filterItems: FilterItem[], options: FilterizrOptions);
readonly length: number;
get(): FilterItem[];
getItem(index: number): FilterItem;
set(filterItems: FilterItem[]): void;
destroy(): void;
updateTransitionStyle(): void;
updateDimensions(): void;
push(filterItem: FilterItem): number;
getFiltered(filter: Filter): FilterItem[];
getFilteredOut(filter: Filter): FilterItem[];
getSorted(sortAttr?: string, sortOrder?: 'asc' | 'desc'): FilterItem[];
getSearched(searchTerm: string): FilterItem[];
getShuffled(): FilterItem[];
private shouldBeFiltered;
}

View file

@ -1,76 +0,0 @@
import FilterizrOptions from './FilterizrOptions/FilterizrOptions';
import FilterContainer from './FilterContainer';
import FilterItem from './FilterItem';
import { Filter } from './ActiveFilter';
import { RawOptions } from './FilterizrOptions/defaultOptions';
export default class Filterizr {
/**
* Main Filterizr classes exported as static members
*/
static FilterContainer: typeof FilterContainer;
static FilterItem: typeof FilterItem;
static defaultOptions: RawOptions;
/**
* Static method that receives the jQuery object and extends
* its prototype with a .filterizr method.
*/
static installAsJQueryPlugin: Function;
options: FilterizrOptions;
private browserWindow;
private filterContainer;
private filterControls?;
private filterizrState;
constructor(selectorOrNode?: string | HTMLElement, userOptions?: RawOptions);
private readonly filterItems;
/**
* Filters the items in the grid by a category
* @param category by which to filter
*/
filter(category: Filter): void;
destroy(): void;
/**
* Inserts a new FilterItem in the Filterizr grid
* @param node DOM node to append
*/
insertItem(node: HTMLElement): void;
/**
* Sorts the FilterItems in the grid
* @param sortAttr the attribute by which to perform the sort
* @param sortOrder ascending or descending
*/
sort(sortAttr?: string, sortOrder?: 'asc' | 'desc'): void;
/**
* Searches through the FilterItems for a given string and adds an additional filter layer.
* @param searchTerm the term for which to search
*/
search(searchTerm?: string): void;
/**
* Shuffles the FilterItems in the grid, making sure their positions have changed.
*/
shuffle(): void;
/**
* Updates the perferences of the users for rendering the Filterizr grid,
* additionally performs error checking on the new options passed.
* @param newOptions to override the defaults.
*/
setOptions(newOptions: RawOptions): void;
/**
* Performs multifiltering with AND/OR logic.
* @param toggledFilter the filter to toggle
*/
toggleFilter(toggledFilter: string): void;
private render;
private onTransitionEndCallback;
private rebindFilterContainerEvents;
private bindEvents;
/**
* If it contains images it makes use of the imagesloaded npm package
* to trigger the first render after the images have finished loading
* in the DOM. Otherwise, overlapping can occur if the images do not
* have the height attribute explicitly set on them.
*
* In case the grid contains no images, then a simple render is performed.
*/
private renderWithImagesLoaded;
private updateDimensionsAndRerender;
}

View file

@ -1,10 +0,0 @@
import { Position } from './FilterItem';
import FilterContainer from './FilterContainer';
/**
* Calculates and returns an array of objects representing
* the next positions the FilterItems are supposed to assume.
* @param layout name of helper method to be used
* @param filterizr instance
*/
declare const getLayoutPositions: (layout: string, filterContainer: FilterContainer) => Position[];
export default getLayoutPositions;

View file

@ -1 +0,0 @@
export default function installAsJQueryPlugin($: any): void;

View file

@ -1,30 +0,0 @@
/**
* Modified version of Jake Gordon's Bin Packing algorithm used for Filterizr's 'packed' layout
* @see {@link https://github.com/jakesgordon/bin-packing}
*/
interface PackerRoot {
x: number;
y: number;
w: number;
h?: number;
used?: boolean;
down?: PackerRoot;
right?: PackerRoot;
}
interface PackerBlock {
x?: number;
y?: number;
w?: number;
h?: number;
fit?: PackerRoot | void;
}
export default class Packer {
root: PackerRoot;
constructor(w: number);
init(w: number): void;
fit(blocks: PackerBlock[]): void;
findNode(root: PackerRoot, w: number, h: number): PackerRoot | void;
splitNode(node: PackerRoot, w: number, h: number): PackerRoot;
growDown(w: number, h: number): PackerRoot | void;
}
export {};

View file

@ -1,8 +0,0 @@
import { Position } from '../FilterItem';
import FilterContainer from '../FilterContainer';
/**
* Horizontal layout algorithm that arranges all FilterItems in one row. Their width may vary.
* @param filterContainer instance.
*/
declare const getHorizontalLayoutPositions: (filterContainer: FilterContainer) => Position[];
export default getHorizontalLayoutPositions;

View file

@ -1,8 +0,0 @@
import { Position } from '../FilterItem';
import FilterContainer from '../FilterContainer';
/**
* Packed layout for items that can have varying width as well as varying height.
* @param filterContainer instance.
*/
declare const getPackedLayoutPositions: (filterContainer: FilterContainer) => Position[];
export default getPackedLayoutPositions;

View file

@ -1,8 +0,0 @@
import { Position } from '../FilterItem';
import FilterContainer from '../FilterContainer';
/**
* Same height layout for items that have the same height, but can have varying width
* @param filterContainer instance.
*/
declare const getSameHeightLayoutPositions: (filterContainer: FilterContainer) => Position[];
export default getSameHeightLayoutPositions;

View file

@ -1,8 +0,0 @@
import { Position } from '../FilterItem';
import FilterContainer from '../FilterContainer';
/**
* Same size layout for items that have the same width/height
* @param filterContainer instance.
*/
declare const getSameSizeLayoutPosition: (filterContainer: FilterContainer) => Position[];
export default getSameSizeLayoutPosition;

View file

@ -1,8 +0,0 @@
import { Position } from '../FilterItem';
import FilterContainer from '../FilterContainer';
/**
* Same width layout for items that have the same width, but can have varying height
* @param filterContainer instance.
*/
declare const getSameWidthLayoutPositions: (filterContainer: FilterContainer) => Position[];
export default getSameWidthLayoutPositions;

View file

@ -1,8 +0,0 @@
import { Position } from '../FilterItem';
import FilterContainer from '../FilterContainer';
/**
* Vertical layout algorithm that arranges all FilterItems in one column. Their height may vary.
* @param filterizr instance.
*/
declare const getVerticalLayoutPositions: (filterContainer: FilterContainer) => Position[];
export default getVerticalLayoutPositions;

View file

@ -1,140 +0,0 @@
import { Dictionary } from './types/interfaces/Dictionary';
import FilterItem from './FilterItem';
/**
* A function to check that all elements of an array are found within another array.
* @param {Array} arr1 is the array of strings to be checked
* @param {Array} arr2 is the array of strings to check against
* @return {Boolean} whether all string of arr1 are contained in arr2
*/
declare const allStringsOfArray1InArray2: (arr1: string[], arr2: string[]) => boolean;
export { allStringsOfArray1InArray2 };
/**
* Given a CSS prop it will normalize the syntax for JS
* e.g. transform background-color to backgroundColor
* @param {String} cssProp prop name
* @return {String} normalized name
*/
declare const getNormalizedCssPropName: (cssProp: string) => string;
export { getNormalizedCssPropName };
/**
* Set inline styles on an HTML node
* @param {HTMLElement} node - HTML node
* @param {Object} styles - object with styles
* @returns {undefined}
*/
declare function setStylesOnHTMLNode(node: Element, styles: any): void;
export { setStylesOnHTMLNode };
/**
* Returns an object with value/key pairs of all data
* attributes on an HTML element, disregarding the
* two data attributes that are reserved for internal
* usage by Filterizr
* @param {Object} node - HTML node
* @returns {Object} map of data attributes / values
*/
declare function getDataAttributesOfHTMLNode(node: Element): Dictionary;
export { getDataAttributesOfHTMLNode };
/**
* Check that a DOM element has a data-attribute present
* @param {Object} node element
* @param {String} dataAttributeName name of data attribute
* @return {Boolean} data attribute exists
*/
declare function checkDataAttributeExists(node: Element, dataAttributeName: string): boolean;
export { checkDataAttributeExists };
/**
* A very simple function to perform a basic
* deep clone of an object.
* @param {Object} o is the object to perform the deep clone on
* @return {Object} deep clone
*/
declare const makeShallowClone: (o: any) => Dictionary;
export { makeShallowClone };
/**
* A function to recursively merge an object, copying over all
* properties of the old object missing from the target object.
* In case a prop in is an object, the method is called recursively.
* This is a non-mutating method.
* @param {Object} old is the old object from which the missing props are copied.
* @param {Object} target is the target object with the updated values.
*/
declare const merge: (old: any, target: any) => Dictionary;
export { merge };
/**
* A function get the intersection of two arrays. IE9+.
* @param {Array} arr1 is the first array of which to get the intersection
* @param {Array} arr2 is the second array of which to get the intersection
*/
declare const intersection: (arr1: any[], arr2: any[]) => any;
export { intersection };
/**
* Debounce of Underscore.js
*/
declare const debounce: (func: Function, wait: number, immediate: boolean) => Function;
export { debounce };
/**
* Fisher-Yates shuffle ES6 non-mutating implementation.
* @param {Array} array the array to shuffle
* @return {Array} shuffled array without mutating the initial array.
*/
declare const shuffle: (array: any[]) => any[];
export { shuffle };
/**
* Simple method to check if two arrays of FilterItems
* are sorted in the same manner or not.
* @param {Array} arr1 the first array of FilterItems
* @param {Array} arr2 the second array of FilterItems
* @return {Boolean} equality
*/
declare const filterItemArraysHaveSameSorting: (filterItemsA: FilterItem[], filterItemsB: FilterItem[]) => boolean;
export { filterItemArraysHaveSameSorting };
/**
* Simple non-mutating sorting function for arrays of objects by a property
* @param {Array} array to sort
* @param {Function} propFn fetches the property by which to sort
* @return {Array} a new sorted array
*/
declare const sortBy: (array: any[], propFn: Function) => any[];
export { sortBy };
/**
* Error checking method to restrict a prop to some allowed values
* @param {String} name of the option key in the options object
* @param {String|Number|Object|Function|Array|Boolean} value of the option
* @param {String} type of the property
* @param {Array} allowed accepted values for option
* @param {String} furtherHelpLink a link to docs for further help
*/
declare const checkOptionForErrors: (name: string, value: string | number | boolean | object | Function | any[], type?: string, allowed?: RegExp | any[], furtherHelpLink?: string) => void;
export { checkOptionForErrors };
/**
* Wrapper around document.querySelector, will function as
* an identity function if an HTML element is passed in
* @param {HTMLElement|string} nodeOrSelector
*/
declare const getHTMLElement: (selectorOrNode: string | HTMLElement) => HTMLElement;
export { getHTMLElement };
/**
* A Regexp to validate potential values for the CSS easing property of transitions.
*/
declare const cssEasingValuesRegexp: RegExp;
export { cssEasingValuesRegexp };
/**
* Possible animation states for Filterizr
*/
declare const FILTERIZR_STATE: {
IDLE: string;
FILTERING: string;
SORTING: string;
SHUFFLING: string;
};
export { FILTERIZR_STATE };
/**
* Transition end events with vendor prefixing
*/
declare const TRANSITION_END_EVENTS: string[];
export { TRANSITION_END_EVENTS };
/**
* A no-operation function
*/
declare const noop: () => void;
export { noop };

View file

@ -1 +0,0 @@
{"version":3,"file":"main.js","sources":["../../../tmp/tsc-output/packages/bootstrap/src/main.js"],"sourcesContent":["import * as tslib_1 from \"tslib\";\nimport { Theme, createPlugin } from '@fullcalendar/core';\nvar BootstrapTheme = /** @class */ (function (_super) {\n tslib_1.__extends(BootstrapTheme, _super);\n function BootstrapTheme() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return BootstrapTheme;\n}(Theme));\nexport { BootstrapTheme };\nBootstrapTheme.prototype.classes = {\n widget: 'fc-bootstrap',\n tableGrid: 'table-bordered',\n tableList: 'table',\n tableListHeading: 'table-active',\n buttonGroup: 'btn-group',\n button: 'btn btn-primary',\n buttonActive: 'active',\n today: 'alert alert-info',\n popover: 'card card-primary',\n popoverHeader: 'card-header',\n popoverContent: 'card-body',\n // day grid\n // for left/right border color when border is inset from edges (all-day in timeGrid view)\n // avoid `table` class b/c don't want margins/padding/structure. only border color.\n headerRow: 'table-bordered',\n dayRow: 'table-bordered',\n // list view\n listView: 'card card-primary'\n};\nBootstrapTheme.prototype.baseIconClass = 'fa';\nBootstrapTheme.prototype.iconClasses = {\n close: 'fa-times',\n prev: 'fa-chevron-left',\n next: 'fa-chevron-right',\n prevYear: 'fa-angle-double-left',\n nextYear: 'fa-angle-double-right'\n};\nBootstrapTheme.prototype.iconOverrideOption = 'bootstrapFontAwesome';\nBootstrapTheme.prototype.iconOverrideCustomButtonOption = 'bootstrapFontAwesome';\nBootstrapTheme.prototype.iconOverridePrefix = 'fa-';\nexport default createPlugin({\n themeClasses: {\n bootstrap: BootstrapTheme\n }\n});\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;AAEG,IAAC,cAAc,KAAkB,UAAU,MAAM,EAAE;AACtD,IAAIA,SAAiB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AAC9C,IAAI,SAAS,cAAc,GAAG;AAC9B,QAAQ,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;AACxE,KAAK;AACL,IAAI,OAAO,cAAc,CAAC;AAC1B,CAAC,CAAC,KAAK,CAAC,EAAE;AAEV,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG;AACnC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,SAAS,EAAE,gBAAgB;AAC/B,IAAI,SAAS,EAAE,OAAO;AACtB,IAAI,gBAAgB,EAAE,cAAc;AACpC,IAAI,WAAW,EAAE,WAAW;AAC5B,IAAI,MAAM,EAAE,iBAAiB;AAC7B,IAAI,YAAY,EAAE,QAAQ;AAC1B,IAAI,KAAK,EAAE,kBAAkB;AAC7B,IAAI,OAAO,EAAE,mBAAmB;AAChC,IAAI,aAAa,EAAE,aAAa;AAChC,IAAI,cAAc,EAAE,WAAW;AAI/B,IAAI,SAAS,EAAE,gBAAgB;AAC/B,IAAI,MAAM,EAAE,gBAAgB;AAE5B,IAAI,QAAQ,EAAE,mBAAmB;AACjC,CAAC,CAAC;AACF,cAAc,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;AAC9C,cAAc,CAAC,SAAS,CAAC,WAAW,GAAG;AACvC,IAAI,KAAK,EAAE,UAAU;AACrB,IAAI,IAAI,EAAE,iBAAiB;AAC3B,IAAI,IAAI,EAAE,kBAAkB;AAC5B,IAAI,QAAQ,EAAE,sBAAsB;AACpC,IAAI,QAAQ,EAAE,uBAAuB;AACrC,CAAC,CAAC;AACF,cAAc,CAAC,SAAS,CAAC,kBAAkB,GAAG,sBAAsB,CAAC;AACrE,cAAc,CAAC,SAAS,CAAC,8BAA8B,GAAG,sBAAsB,CAAC;AACjF,cAAc,CAAC,SAAS,CAAC,kBAAkB,GAAG,KAAK,CAAC;AACpD,WAAe,YAAY,CAAC;AAC5B,IAAI,YAAY,EAAE;AAClB,QAAQ,SAAS,EAAE,cAAc;AACjC,KAAK;AACL,CAAC,CAAC;;;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,33 +0,0 @@
/*!
* bindings/inputmask.binding.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery", "../inputmask", "../global/window" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("jquery"), require("../inputmask"), require("../global/window"));
} else {
factory(jQuery, window.Inputmask, window);
}
})(function($, Inputmask, window) {
$(window.document).ajaxComplete(function(event, xmlHttpRequest, ajaxOptions) {
if ($.inArray("html", ajaxOptions.dataTypes) !== -1) {
$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
if (lmnt.inputmask === undefined) {
Inputmask().mask(lmnt);
}
});
}
}).ready(function() {
$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
if (lmnt.inputmask === undefined) {
Inputmask().mask(lmnt);
}
});
});
});

View file

@ -1,129 +0,0 @@
/*!
* dependencyLibs/inputmask.dependencyLib.jqlite.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jqlite", "../global/window" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("jqlite"), require("../global/window"));
} else {
window.dependencyLib = factory(jqlite, window);
}
})(function($, window) {
var document = window.document;
function indexOf(list, elem) {
var i = 0, len = list.length;
for (;i < len; i++) {
if (list[i] === elem) {
return i;
}
}
return -1;
}
function isWindow(obj) {
return obj != null && obj === obj.window;
}
function isArraylike(obj) {
var length = "length" in obj && obj.length, ltype = typeof obj;
if (ltype === "function" || isWindow(obj)) {
return false;
}
if (obj.nodeType === 1 && length) {
return true;
}
return ltype === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
}
$.inArray = function(elem, arr, i) {
return arr == null ? -1 : indexOf(arr, elem, i);
};
$.isFunction = function(obj) {
return typeof obj === "function";
};
$.isArray = Array.isArray;
$.isPlainObject = function(obj) {
if (typeof obj !== "object" || obj.nodeType || isWindow(obj)) {
return false;
}
if (obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
return false;
}
return true;
};
$.extend = function() {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i] || {};
i++;
}
if (typeof target !== "object" && !$.isFunction(target)) {
target = {};
}
if (i === length) {
target = this;
i--;
}
for (;i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
src = target[name];
copy = options[name];
if (target === copy) {
continue;
}
if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && $.isArray(src) ? src : [];
} else {
clone = src && $.isPlainObject(src) ? src : {};
}
target[name] = $.extend(deep, clone, copy);
} else if (copy !== undefined) {
target[name] = copy;
}
}
}
}
return target;
};
$.each = function(obj, callback) {
var value, i = 0;
if (isArraylike(obj)) {
for (var length = obj.length; i < length; i++) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
} else {
for (i in obj) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
}
return obj;
};
$.data = function(elem, name, data) {
return $(elem).data(name, data);
};
$.Event = $.Event || function CustomEvent(event, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
var evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
$.Event.prototype = window.Event.prototype;
return $;
});

View file

@ -1,19 +0,0 @@
/*!
* dependencyLibs/inputmask.dependencyLib.jquery.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("jquery"));
} else {
window.dependencyLib = factory(jQuery);
}
})(function($) {
return $;
});

View file

@ -1,301 +0,0 @@
/*!
* dependencyLibs/inputmask.dependencyLib.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "../global/window" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("../global/window"));
} else {
window.dependencyLib = factory(window);
}
})(function(window) {
var document = window.document;
function indexOf(list, elem) {
var i = 0, len = list.length;
for (;i < len; i++) {
if (list[i] === elem) {
return i;
}
}
return -1;
}
function isWindow(obj) {
return obj != null && obj === obj.window;
}
function isArraylike(obj) {
var length = "length" in obj && obj.length, ltype = typeof obj;
if (ltype === "function" || isWindow(obj)) {
return false;
}
if (obj.nodeType === 1 && length) {
return true;
}
return ltype === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
}
function isValidElement(elem) {
return elem instanceof Element;
}
function DependencyLib(elem) {
if (elem instanceof DependencyLib) {
return elem;
}
if (!(this instanceof DependencyLib)) {
return new DependencyLib(elem);
}
if (elem !== undefined && elem !== null && elem !== window) {
this[0] = elem.nodeName ? elem : elem[0] !== undefined && elem[0].nodeName ? elem[0] : document.querySelector(elem);
if (this[0] !== undefined && this[0] !== null) {
this[0].eventRegistry = this[0].eventRegistry || {};
}
}
}
function getWindow(elem) {
return isWindow(elem) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false;
}
DependencyLib.prototype = {
on: function(events, handler) {
if (isValidElement(this[0])) {
var eventRegistry = this[0].eventRegistry, elem = this[0];
var addEvent = function(ev, namespace) {
if (elem.addEventListener) {
elem.addEventListener(ev, handler, false);
} else if (elem.attachEvent) {
elem.attachEvent("on" + ev, handler);
}
eventRegistry[ev] = eventRegistry[ev] || {};
eventRegistry[ev][namespace] = eventRegistry[ev][namespace] || [];
eventRegistry[ev][namespace].push(handler);
};
var _events = events.split(" ");
for (var endx = 0; endx < _events.length; endx++) {
var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
addEvent(ev, namespace);
}
}
return this;
},
off: function(events, handler) {
if (isValidElement(this[0])) {
var eventRegistry = this[0].eventRegistry, elem = this[0];
var removeEvent = function(ev, namespace, handler) {
if (ev in eventRegistry === true) {
if (elem.removeEventListener) {
elem.removeEventListener(ev, handler, false);
} else if (elem.detachEvent) {
elem.detachEvent("on" + ev, handler);
}
if (namespace === "global") {
for (var nmsp in eventRegistry[ev]) {
eventRegistry[ev][nmsp].splice(eventRegistry[ev][nmsp].indexOf(handler), 1);
}
} else {
eventRegistry[ev][namespace].splice(eventRegistry[ev][namespace].indexOf(handler), 1);
}
}
};
var resolveNamespace = function(ev, namespace) {
var evts = [], hndx, hndL;
if (ev.length > 0) {
if (handler === undefined) {
for (hndx = 0, hndL = eventRegistry[ev][namespace].length; hndx < hndL; hndx++) {
evts.push({
ev: ev,
namespace: namespace && namespace.length > 0 ? namespace : "global",
handler: eventRegistry[ev][namespace][hndx]
});
}
} else {
evts.push({
ev: ev,
namespace: namespace && namespace.length > 0 ? namespace : "global",
handler: handler
});
}
} else if (namespace.length > 0) {
for (var evNdx in eventRegistry) {
for (var nmsp in eventRegistry[evNdx]) {
if (nmsp === namespace) {
if (handler === undefined) {
for (hndx = 0, hndL = eventRegistry[evNdx][nmsp].length; hndx < hndL; hndx++) {
evts.push({
ev: evNdx,
namespace: nmsp,
handler: eventRegistry[evNdx][nmsp][hndx]
});
}
} else {
evts.push({
ev: evNdx,
namespace: nmsp,
handler: handler
});
}
}
}
}
}
return evts;
};
var _events = events.split(" ");
for (var endx = 0; endx < _events.length; endx++) {
var nsEvent = _events[endx].split("."), offEvents = resolveNamespace(nsEvent[0], nsEvent[1]);
for (var i = 0, offEventsL = offEvents.length; i < offEventsL; i++) {
removeEvent(offEvents[i].ev, offEvents[i].namespace, offEvents[i].handler);
}
}
}
return this;
},
trigger: function(events) {
if (isValidElement(this[0])) {
var eventRegistry = this[0].eventRegistry, elem = this[0];
var _events = typeof events === "string" ? events.split(" ") : [ events.type ];
for (var endx = 0; endx < _events.length; endx++) {
var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
if (document !== undefined && namespace === "global") {
var evnt, i, params = {
bubbles: true,
cancelable: true,
detail: arguments[1]
};
if (document.createEvent) {
try {
evnt = new CustomEvent(ev, params);
} catch (e) {
evnt = document.createEvent("CustomEvent");
evnt.initCustomEvent(ev, params.bubbles, params.cancelable, params.detail);
}
if (events.type) DependencyLib.extend(evnt, events);
elem.dispatchEvent(evnt);
} else {
evnt = document.createEventObject();
evnt.eventType = ev;
evnt.detail = arguments[1];
if (events.type) DependencyLib.extend(evnt, events);
elem.fireEvent("on" + evnt.eventType, evnt);
}
} else if (eventRegistry[ev] !== undefined) {
arguments[0] = arguments[0].type ? arguments[0] : DependencyLib.Event(arguments[0]);
if (namespace === "global") {
for (var nmsp in eventRegistry[ev]) {
for (i = 0; i < eventRegistry[ev][nmsp].length; i++) {
eventRegistry[ev][nmsp][i].apply(elem, arguments);
}
}
} else {
for (i = 0; i < eventRegistry[ev][namespace].length; i++) {
eventRegistry[ev][namespace][i].apply(elem, arguments);
}
}
}
}
}
return this;
}
};
DependencyLib.isFunction = function(obj) {
return typeof obj === "function";
};
DependencyLib.noop = function() {};
DependencyLib.isArray = Array.isArray;
DependencyLib.inArray = function(elem, arr, i) {
return arr == null ? -1 : indexOf(arr, elem, i);
};
DependencyLib.valHooks = undefined;
DependencyLib.isPlainObject = function(obj) {
if (typeof obj !== "object" || obj.nodeType || isWindow(obj)) {
return false;
}
if (obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
return false;
}
return true;
};
DependencyLib.extend = function() {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i] || {};
i++;
}
if (typeof target !== "object" && !DependencyLib.isFunction(target)) {
target = {};
}
if (i === length) {
target = this;
i--;
}
for (;i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
src = target[name];
copy = options[name];
if (target === copy) {
continue;
}
if (deep && copy && (DependencyLib.isPlainObject(copy) || (copyIsArray = DependencyLib.isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && DependencyLib.isArray(src) ? src : [];
} else {
clone = src && DependencyLib.isPlainObject(src) ? src : {};
}
target[name] = DependencyLib.extend(deep, clone, copy);
} else if (copy !== undefined) {
target[name] = copy;
}
}
}
}
return target;
};
DependencyLib.each = function(obj, callback) {
var value, i = 0;
if (isArraylike(obj)) {
for (var length = obj.length; i < length; i++) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
} else {
for (i in obj) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
}
return obj;
};
DependencyLib.data = function(owner, key, value) {
if (value === undefined) {
return owner.__data ? owner.__data[key] : null;
} else {
owner.__data = owner.__data || {};
owner.__data[key] = value;
}
};
if (typeof window.CustomEvent === "function") {
DependencyLib.Event = window.CustomEvent;
} else {
DependencyLib.Event = function(event, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: undefined
};
var evt = document.createEvent("CustomEvent");
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
DependencyLib.Event.prototype = window.Event.prototype;
}
return DependencyLib;
});

View file

@ -1,11 +0,0 @@
/*!
* global/window.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
if (typeof define === "function" && define.amd) define(function() {
return typeof window !== "undefined" ? window : new (eval("require('jsdom').JSDOM"))("").window;
}); else if (typeof exports === "object") module.exports = typeof window !== "undefined" ? window : new (eval("require('jsdom').JSDOM"))("").window;

View file

@ -1,252 +0,0 @@
/*!
* inputmask.date.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "./inputmask" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("./inputmask"));
} else {
factory(window.Inputmask);
}
})(function(Inputmask) {
var $ = Inputmask.dependencyLib;
var formatCode = {
d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ],
dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
return pad(Date.prototype.getDate.call(this), 2);
} ],
ddd: [ "" ],
dddd: [ "" ],
m: [ "[1-9]|1[012]", Date.prototype.setMonth, "month", function() {
return Date.prototype.getMonth.call(this) + 1;
} ],
mm: [ "0[1-9]|1[012]", Date.prototype.setMonth, "month", function() {
return pad(Date.prototype.getMonth.call(this) + 1, 2);
} ],
mmm: [ "" ],
mmmm: [ "" ],
yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() {
return pad(Date.prototype.getFullYear.call(this), 2);
} ],
yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() {
return pad(Date.prototype.getFullYear.call(this), 4);
} ],
h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
return pad(Date.prototype.getHours.call(this), 2);
} ],
hhh: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ],
H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() {
return pad(Date.prototype.getHours.call(this), 2);
} ],
HHH: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ],
M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ],
MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
return pad(Date.prototype.getMinutes.call(this), 2);
} ],
ss: [ "[0-5][0-9]", Date.prototype.setSeconds, "seconds", function() {
return pad(Date.prototype.getSeconds.call(this), 2);
} ],
l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
return pad(Date.prototype.getMilliseconds.call(this), 3);
} ],
L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() {
return pad(Date.prototype.getMilliseconds.call(this), 2);
} ],
t: [ "[ap]" ],
tt: [ "[ap]m" ],
T: [ "[AP]" ],
TT: [ "[AP]M" ],
Z: [ "" ],
o: [ "" ],
S: [ "" ]
}, formatAlias = {
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
function getTokenizer(opts) {
if (!opts.tokenizer) {
var tokens = [];
for (var ndx in formatCode) {
if (tokens.indexOf(ndx[0]) === -1) tokens.push(ndx[0]);
}
opts.tokenizer = "(" + tokens.join("+|") + ")+?|.";
opts.tokenizer = new RegExp(opts.tokenizer, "g");
}
return opts.tokenizer;
}
function isValidDate(dateParts, currentResult) {
return !isFinite(dateParts.rawday) || dateParts.day == "29" && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day ? currentResult : false;
}
function isDateInRange(dateParts, opts) {
var result = true;
if (opts.min) {
if (dateParts["rawyear"]) {
var rawYear = dateParts["rawyear"].replace(/[^0-9]/g, ""), minYear = opts.min.year.substr(0, rawYear.length);
result = minYear <= rawYear;
}
if (dateParts["year"] === dateParts["rawyear"]) {
if (opts.min.date.getTime() === opts.min.date.getTime()) {
result = opts.min.date.getTime() <= dateParts.date.getTime();
}
}
}
if (result && opts.max && opts.max.date.getTime() === opts.max.date.getTime()) {
result = opts.max.date.getTime() >= dateParts.date.getTime();
}
return result;
}
function parse(format, dateObjValue, opts, raw) {
var mask = "", match;
while (match = getTokenizer(opts).exec(format)) {
if (dateObjValue === undefined) {
if (formatCode[match[0]]) {
mask += "(" + formatCode[match[0]][0] + ")";
} else {
switch (match[0]) {
case "[":
mask += "(";
break;
case "]":
mask += ")?";
break;
default:
mask += Inputmask.escapeRegex(match[0]);
}
}
} else {
if (formatCode[match[0]]) {
if (raw !== true && formatCode[match[0]][3]) {
var getFn = formatCode[match[0]][3];
mask += getFn.call(dateObjValue.date);
} else if (formatCode[match[0]][2]) mask += dateObjValue["raw" + formatCode[match[0]][2]]; else mask += match[0];
} else mask += match[0];
}
}
return mask;
}
function pad(val, len) {
val = String(val);
len = len || 2;
while (val.length < len) val = "0" + val;
return val;
}
function analyseMask(maskString, format, opts) {
var dateObj = {
date: new Date(1, 0, 1)
}, targetProp, mask = maskString, match, dateOperation, targetValidator;
function extendProperty(value) {
var correctedValue = value.replace(/[^0-9]/g, "0");
if (correctedValue != value) {
var enteredPart = value.replace(/[^0-9]/g, ""), min = (opts.min && opts.min[targetProp] || value).toString(), max = (opts.max && opts.max[targetProp] || value).toString();
correctedValue = enteredPart + (enteredPart < min.slice(0, enteredPart.length) ? min.slice(enteredPart.length) : enteredPart > max.slice(0, enteredPart.length) ? max.slice(enteredPart.length) : correctedValue.toString().slice(enteredPart.length));
}
return correctedValue;
}
function setValue(dateObj, value, opts) {
dateObj[targetProp] = extendProperty(value);
dateObj["raw" + targetProp] = value;
if (dateOperation !== undefined) dateOperation.call(dateObj.date, targetProp == "month" ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);
}
if (typeof mask === "string") {
while (match = getTokenizer(opts).exec(format)) {
var value = mask.slice(0, match[0].length);
if (formatCode.hasOwnProperty(match[0])) {
targetValidator = formatCode[match[0]][0];
targetProp = formatCode[match[0]][2];
dateOperation = formatCode[match[0]][1];
setValue(dateObj, value, opts);
}
mask = mask.slice(value.length);
}
return dateObj;
} else if (mask && typeof mask === "object" && mask.hasOwnProperty("date")) {
return mask;
}
return undefined;
}
Inputmask.extendAliases({
datetime: {
mask: function(opts) {
formatCode.S = opts.i18n.ordinalSuffix.join("|");
opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat;
opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat;
opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat;
opts.placeholder = opts.placeholder !== "" ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, "");
opts.regex = parse(opts.inputFormat, undefined, opts);
return null;
},
placeholder: "",
inputFormat: "isoDateTime",
displayFormat: undefined,
outputFormat: undefined,
min: null,
max: null,
i18n: {
dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ],
monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
ordinalSuffix: [ "st", "nd", "rd", "th" ]
},
postValidation: function(buffer, pos, currentResult, opts) {
opts.min = analyseMask(opts.min, opts.inputFormat, opts);
opts.max = analyseMask(opts.max, opts.inputFormat, opts);
var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts);
if (result && dateParts.date.getTime() === dateParts.date.getTime()) {
result = isValidDate(dateParts, result);
result = result && isDateInRange(dateParts, opts);
}
if (pos && result && currentResult.pos !== pos) {
return {
buffer: parse(opts.inputFormat, dateParts, opts),
refreshFromBuffer: {
start: pos,
end: currentResult.pos
}
};
}
return result;
},
onKeyDown: function(e, buffer, caretPos, opts) {
var input = this;
if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
var today = new Date(), match, date = "";
while (match = getTokenizer(opts).exec(opts.inputFormat)) {
if (match[0].charAt(0) === "d") {
date += pad(today.getDate(), match[0].length);
} else if (match[0].charAt(0) === "m") {
date += pad(today.getMonth() + 1, match[0].length);
} else if (match[0] === "yyyy") {
date += today.getFullYear().toString();
} else if (match[0].charAt(0) === "y") {
date += pad(today.getYear(), match[0].length);
}
}
input.inputmask._valueSet(date);
$(input).trigger("setvalue");
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
return parse(opts.outputFormat, analyseMask(maskedValue, opts.inputFormat, opts), opts, true);
},
casing: function(elem, test, pos, validPositions) {
if (test.nativeDef.indexOf("[ap]") == 0) return elem.toLowerCase();
if (test.nativeDef.indexOf("[AP]") == 0) return elem.toUpperCase();
return elem;
},
insertMode: false,
shiftPositions: false
}
});
return Inputmask;
});

View file

@ -1,97 +0,0 @@
/*!
* inputmask.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "./inputmask" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("./inputmask"));
} else {
factory(window.Inputmask);
}
})(function(Inputmask) {
Inputmask.extendDefinitions({
A: {
validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
casing: "upper"
},
"&": {
validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
casing: "upper"
},
"#": {
validator: "[0-9A-Fa-f]",
casing: "upper"
}
});
Inputmask.extendAliases({
cssunit: {
regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"
},
url: {
regex: "(https?|ftp)//.*",
autoUnmask: false
},
ip: {
mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]",
definitions: {
i: {
validator: function(chrs, maskset, pos, strict, opts) {
if (pos - 1 > -1 && maskset.buffer[pos - 1] !== ".") {
chrs = maskset.buffer[pos - 1] + chrs;
if (pos - 2 > -1 && maskset.buffer[pos - 2] !== ".") {
chrs = maskset.buffer[pos - 2] + chrs;
} else chrs = "0" + chrs;
} else chrs = "00" + chrs;
return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
}
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
return maskedValue;
},
inputmode: "numeric"
},
email: {
mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",
greedy: false,
casing: "lower",
onBeforePaste: function(pastedValue, opts) {
pastedValue = pastedValue.toLowerCase();
return pastedValue.replace("mailto:", "");
},
definitions: {
"*": {
validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]"
},
"-": {
validator: "[0-9A-Za-z-]"
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
return maskedValue;
},
inputmode: "email"
},
mac: {
mask: "##:##:##:##:##:##"
},
vin: {
mask: "V{13}9{4}",
definitions: {
V: {
validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
casing: "upper"
}
},
clearIncomplete: true,
autoUnmask: true
}
});
return Inputmask;
});

File diff suppressed because it is too large Load diff

View file

@ -1,553 +0,0 @@
/*!
* inputmask.numeric.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "./inputmask" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("./inputmask"));
} else {
factory(window.Inputmask);
}
})(function(Inputmask) {
var $ = Inputmask.dependencyLib;
function autoEscape(txt, opts) {
var escapedTxt = "";
for (var i = 0; i < txt.length; i++) {
if (Inputmask.prototype.definitions[txt.charAt(i)] || opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i)) {
escapedTxt += "\\" + txt.charAt(i);
} else escapedTxt += txt.charAt(i);
}
return escapedTxt;
}
function alignDigits(buffer, digits, opts) {
if (digits > 0) {
var radixPosition = $.inArray(opts.radixPoint, buffer);
if (radixPosition === -1) {
buffer.push(opts.radixPoint);
radixPosition = buffer.length - 1;
}
for (var i = 1; i <= digits; i++) {
buffer[radixPosition + i] = buffer[radixPosition + i] || "0";
}
}
return buffer;
}
Inputmask.extendAliases({
numeric: {
mask: function(opts) {
if (opts.repeat !== 0 && isNaN(opts.integerDigits)) {
opts.integerDigits = opts.repeat;
}
opts.repeat = 0;
if (opts.groupSeparator === opts.radixPoint && opts.digits && opts.digits !== "0") {
if (opts.radixPoint === ".") {
opts.groupSeparator = ",";
} else if (opts.radixPoint === ",") {
opts.groupSeparator = ".";
} else opts.groupSeparator = "";
}
if (opts.groupSeparator === " ") {
opts.skipOptionalPartCharacter = undefined;
}
opts.autoGroup = opts.autoGroup && opts.groupSeparator !== "";
if (opts.autoGroup) {
if (typeof opts.groupSize == "string" && isFinite(opts.groupSize)) opts.groupSize = parseInt(opts.groupSize);
if (isFinite(opts.integerDigits)) {
var seps = Math.floor(opts.integerDigits / opts.groupSize);
var mod = opts.integerDigits % opts.groupSize;
opts.integerDigits = parseInt(opts.integerDigits) + (mod === 0 ? seps - 1 : seps);
if (opts.integerDigits < 1) {
opts.integerDigits = "*";
}
}
}
if (opts.placeholder.length > 1) {
opts.placeholder = opts.placeholder.charAt(0);
}
if (opts.positionCaretOnClick === "radixFocus" && (opts.placeholder === "" && opts.integerOptional === false)) {
opts.positionCaretOnClick = "lvp";
}
opts.definitions[";"] = opts.definitions["~"];
opts.definitions[";"].definitionSymbol = "~";
if (opts.numericInput === true) {
opts.positionCaretOnClick = opts.positionCaretOnClick === "radixFocus" ? "lvp" : opts.positionCaretOnClick;
opts.digitsOptional = false;
if (isNaN(opts.digits)) opts.digits = 2;
opts.decimalProtect = false;
}
var mask = "[+]";
mask += autoEscape(opts.prefix, opts);
if (opts.integerOptional === true) {
mask += "~{1," + opts.integerDigits + "}";
} else mask += "~{" + opts.integerDigits + "}";
if (opts.digits !== undefined) {
var radixDef = opts.decimalProtect ? ":" : opts.radixPoint;
var dq = opts.digits.toString().split(",");
if (isFinite(dq[0]) && dq[1] && isFinite(dq[1])) {
mask += radixDef + ";{" + opts.digits + "}";
} else if (isNaN(opts.digits) || parseInt(opts.digits) > 0) {
if (opts.digitsOptional) {
mask += "[" + radixDef + ";{1," + opts.digits + "}]";
} else mask += radixDef + ";{" + opts.digits + "}";
}
}
mask += autoEscape(opts.suffix, opts);
mask += "[-]";
opts.greedy = false;
return mask;
},
placeholder: "",
greedy: false,
digits: "*",
digitsOptional: true,
enforceDigitsOnBlur: false,
radixPoint: ".",
positionCaretOnClick: "radixFocus",
groupSize: 3,
groupSeparator: "",
autoGroup: false,
allowMinus: true,
negationSymbol: {
front: "-",
back: ""
},
integerDigits: "+",
integerOptional: true,
prefix: "",
suffix: "",
rightAlign: true,
decimalProtect: true,
min: null,
max: null,
step: 1,
insertMode: true,
autoUnmask: false,
unmaskAsNumber: false,
inputType: "text",
inputmode: "numeric",
preValidation: function(buffer, pos, c, isSelection, opts, maskset) {
if (c === "-" || c === opts.negationSymbol.front) {
if (opts.allowMinus !== true) return false;
opts.isNegative = opts.isNegative === undefined ? true : !opts.isNegative;
if (buffer.join("") === "") return true;
return {
caret: maskset.validPositions[pos] ? pos : undefined,
dopost: true
};
}
if (isSelection === false && c === opts.radixPoint && (opts.digits !== undefined && (isNaN(opts.digits) || parseInt(opts.digits) > 0))) {
var radixPos = $.inArray(opts.radixPoint, buffer);
if (radixPos !== -1 && maskset.validPositions[radixPos] !== undefined) {
if (opts.numericInput === true) {
return pos === radixPos;
}
return {
caret: radixPos + 1
};
}
}
return true;
},
postValidation: function(buffer, pos, currentResult, opts) {
function buildPostMask(buffer, opts) {
var postMask = "";
postMask += "(" + opts.groupSeparator + "*{" + opts.groupSize + "}){*}";
if (opts.radixPoint !== "") {
var radixSplit = buffer.join("").split(opts.radixPoint);
if (radixSplit[1]) {
postMask += opts.radixPoint + "*{" + radixSplit[1].match(/^\d*\??\d*/)[0].length + "}";
}
}
return postMask;
}
var suffix = opts.suffix.split(""), prefix = opts.prefix.split("");
if (currentResult.pos === undefined && currentResult.caret !== undefined && currentResult.dopost !== true) return currentResult;
var caretPos = currentResult.caret !== undefined ? currentResult.caret : currentResult.pos;
var maskedValue = buffer.slice();
if (opts.numericInput) {
caretPos = maskedValue.length - caretPos - 1;
maskedValue = maskedValue.reverse();
}
var charAtPos = maskedValue[caretPos];
if (charAtPos === opts.groupSeparator) {
caretPos += 1;
charAtPos = maskedValue[caretPos];
}
if (caretPos === maskedValue.length - opts.suffix.length - 1 && charAtPos === opts.radixPoint) return currentResult;
if (charAtPos !== undefined) {
if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) {
maskedValue[caretPos] = "?";
if (opts.prefix.length > 0 && caretPos >= (opts.isNegative === false ? 1 : 0) && caretPos < opts.prefix.length - 1 + (opts.isNegative === false ? 1 : 0)) {
prefix[caretPos - (opts.isNegative === false ? 1 : 0)] = "?";
} else if (opts.suffix.length > 0 && caretPos >= maskedValue.length - opts.suffix.length - (opts.isNegative === false ? 1 : 0)) {
suffix[caretPos - (maskedValue.length - opts.suffix.length - (opts.isNegative === false ? 1 : 0))] = "?";
}
}
}
prefix = prefix.join("");
suffix = suffix.join("");
var processValue = maskedValue.join("").replace(prefix, "");
processValue = processValue.replace(suffix, "");
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "");
processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), "");
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "");
if (isNaN(opts.placeholder)) {
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), "");
}
if (processValue.length > 1 && processValue.indexOf(opts.radixPoint) !== 1) {
if (charAtPos === "0") {
processValue = processValue.replace(/^\?/g, "");
}
processValue = processValue.replace(/^0/g, "");
}
if (processValue.charAt(0) === opts.radixPoint && opts.radixPoint !== "" && opts.numericInput !== true) {
processValue = "0" + processValue;
}
if (processValue !== "") {
processValue = processValue.split("");
if ((!opts.digitsOptional || opts.enforceDigitsOnBlur && currentResult.event === "blur") && isFinite(opts.digits)) {
var radixPosition = $.inArray(opts.radixPoint, processValue);
var rpb = $.inArray(opts.radixPoint, maskedValue);
if (radixPosition === -1) {
processValue.push(opts.radixPoint);
radixPosition = processValue.length - 1;
}
for (var i = 1; i <= opts.digits; i++) {
if ((!opts.digitsOptional || opts.enforceDigitsOnBlur && currentResult.event === "blur") && (processValue[radixPosition + i] === undefined || processValue[radixPosition + i] === opts.placeholder.charAt(0))) {
processValue[radixPosition + i] = currentResult.placeholder || opts.placeholder.charAt(0);
} else if (rpb !== -1 && maskedValue[rpb + i] !== undefined) {
processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i];
}
}
}
if (opts.autoGroup === true && opts.groupSeparator !== "" && (charAtPos !== opts.radixPoint || currentResult.pos !== undefined || currentResult.dopost)) {
var addRadix = processValue[processValue.length - 1] === opts.radixPoint && currentResult.c === opts.radixPoint;
processValue = Inputmask(buildPostMask(processValue, opts), {
numericInput: true,
jitMasking: true,
definitions: {
"*": {
validator: "[0-9?]",
cardinality: 1
}
}
}).format(processValue.join(""));
if (addRadix) processValue += opts.radixPoint;
if (processValue.charAt(0) === opts.groupSeparator) {
processValue.substr(1);
}
} else processValue = processValue.join("");
}
if (opts.isNegative && currentResult.event === "blur") {
opts.isNegative = processValue !== "0";
}
processValue = prefix + processValue;
processValue += suffix;
if (opts.isNegative) {
processValue = opts.negationSymbol.front + processValue;
processValue += opts.negationSymbol.back;
}
processValue = processValue.split("");
if (charAtPos !== undefined) {
if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) {
caretPos = $.inArray("?", processValue);
if (caretPos > -1) {
processValue[caretPos] = charAtPos;
} else caretPos = currentResult.caret || 0;
} else if (charAtPos === opts.radixPoint || charAtPos === opts.negationSymbol.front || charAtPos === opts.negationSymbol.back) {
var newCaretPos = $.inArray(charAtPos, processValue);
if (newCaretPos !== -1) caretPos = newCaretPos;
}
}
if (opts.numericInput) {
caretPos = processValue.length - caretPos - 1;
processValue = processValue.reverse();
}
var rslt = {
caret: (charAtPos === undefined || currentResult.pos !== undefined) && caretPos !== undefined ? caretPos + (opts.numericInput ? -1 : 1) : caretPos,
buffer: processValue,
refreshFromBuffer: currentResult.dopost || buffer.join("") !== processValue.join("")
};
return rslt.refreshFromBuffer ? rslt : currentResult;
},
onBeforeWrite: function(e, buffer, caretPos, opts) {
function parseMinMaxOptions(opts) {
if (opts.parseMinMaxOptions === undefined) {
if (opts.min !== null) {
opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "");
if (opts.radixPoint === ",") opts.min = opts.min.replace(opts.radixPoint, ".");
opts.min = isFinite(opts.min) ? parseFloat(opts.min) : NaN;
if (isNaN(opts.min)) opts.min = Number.MIN_VALUE;
}
if (opts.max !== null) {
opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "");
if (opts.radixPoint === ",") opts.max = opts.max.replace(opts.radixPoint, ".");
opts.max = isFinite(opts.max) ? parseFloat(opts.max) : NaN;
if (isNaN(opts.max)) opts.max = Number.MAX_VALUE;
}
opts.parseMinMaxOptions = "done";
}
}
if (e) {
switch (e.type) {
case "keydown":
return opts.postValidation(buffer, caretPos, {
caret: caretPos,
dopost: true
}, opts);
case "blur":
case "checkval":
var unmasked;
parseMinMaxOptions(opts);
if (opts.min !== null || opts.max !== null) {
unmasked = opts.onUnMask(buffer.join(""), undefined, $.extend({}, opts, {
unmaskAsNumber: true
}));
if (opts.min !== null && unmasked < opts.min) {
opts.isNegative = opts.min < 0;
return opts.postValidation(opts.min.toString().replace(".", opts.radixPoint).split(""), caretPos, {
caret: caretPos,
dopost: true,
placeholder: "0"
}, opts);
} else if (opts.max !== null && unmasked > opts.max) {
opts.isNegative = opts.max < 0;
return opts.postValidation(opts.max.toString().replace(".", opts.radixPoint).split(""), caretPos, {
caret: caretPos,
dopost: true,
placeholder: "0"
}, opts);
}
}
return opts.postValidation(buffer, caretPos, {
caret: caretPos,
placeholder: "0",
event: "blur"
}, opts);
case "_checkval":
return {
caret: caretPos
};
default:
break;
}
}
},
regex: {
integerPart: function(opts, emptyCheck) {
return emptyCheck ? new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?") : new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?\\d+");
},
integerNPart: function(opts) {
return new RegExp("[\\d" + Inputmask.escapeRegex(opts.groupSeparator) + Inputmask.escapeRegex(opts.placeholder.charAt(0)) + "]+");
}
},
definitions: {
"~": {
validator: function(chrs, maskset, pos, strict, opts, isSelection) {
var isValid, l;
if (chrs === "k" || chrs === "m") {
isValid = {
insert: [],
c: 0
};
for (var i = 0, l = chrs === "k" ? 2 : 5; i < l; i++) {
isValid.insert.push({
pos: pos + i,
c: 0
});
}
isValid.pos = pos + l;
return isValid;
}
isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs);
if (isValid === true) {
if (opts.numericInput !== true && maskset.validPositions[pos] !== undefined && maskset.validPositions[pos].match.def === "~" && !isSelection) {
var processValue = maskset.buffer.join("");
processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), "");
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "");
var pvRadixSplit = processValue.split(opts.radixPoint);
if (pvRadixSplit.length > 1) {
pvRadixSplit[1] = pvRadixSplit[1].replace(/0/g, opts.placeholder.charAt(0));
}
if (pvRadixSplit[0] === "0") {
pvRadixSplit[0] = pvRadixSplit[0].replace(/0/g, opts.placeholder.charAt(0));
}
processValue = pvRadixSplit[0] + opts.radixPoint + pvRadixSplit[1] || "";
var bufferTemplate = maskset._buffer.join("");
if (processValue === opts.radixPoint) {
processValue = bufferTemplate;
}
while (processValue.match(Inputmask.escapeRegex(bufferTemplate) + "$") === null) {
bufferTemplate = bufferTemplate.slice(1);
}
processValue = processValue.replace(bufferTemplate, "");
processValue = processValue.split("");
if (processValue[pos] === undefined) {
isValid = {
pos: pos,
remove: pos
};
} else {
isValid = {
pos: pos
};
}
}
} else if (!strict && chrs === opts.radixPoint && maskset.validPositions[pos - 1] === undefined) {
isValid = {
insert: {
pos: pos,
c: 0
},
pos: pos + 1
};
}
return isValid;
},
cardinality: 1
},
"+": {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.allowMinus && (chrs === "-" || chrs === opts.negationSymbol.front);
},
cardinality: 1,
placeholder: ""
},
"-": {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.allowMinus && chrs === opts.negationSymbol.back;
},
cardinality: 1,
placeholder: ""
},
":": {
validator: function(chrs, maskset, pos, strict, opts) {
var radix = "[" + Inputmask.escapeRegex(opts.radixPoint) + "]";
var isValid = new RegExp(radix).test(chrs);
if (isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint) {
isValid = {
caret: pos + 1
};
}
return isValid;
},
cardinality: 1,
placeholder: function(opts) {
return opts.radixPoint;
}
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
if (unmaskedValue === "" && opts.nullable === true) {
return unmaskedValue;
}
var processValue = maskedValue.replace(opts.prefix, "");
processValue = processValue.replace(opts.suffix, "");
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "");
if (opts.placeholder.charAt(0) !== "") {
processValue = processValue.replace(new RegExp(opts.placeholder.charAt(0), "g"), "0");
}
if (opts.unmaskAsNumber) {
if (opts.radixPoint !== "" && processValue.indexOf(opts.radixPoint) !== -1) processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), ".");
processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-");
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "");
return Number(processValue);
}
return processValue;
},
isComplete: function(buffer, opts) {
var maskedValue = (opts.numericInput ? buffer.slice().reverse() : buffer).join("");
maskedValue = maskedValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-");
maskedValue = maskedValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "");
maskedValue = maskedValue.replace(opts.prefix, "");
maskedValue = maskedValue.replace(opts.suffix, "");
maskedValue = maskedValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator) + "([0-9]{3})", "g"), "$1");
if (opts.radixPoint === ",") maskedValue = maskedValue.replace(Inputmask.escapeRegex(opts.radixPoint), ".");
return isFinite(maskedValue);
},
onBeforeMask: function(initialValue, opts) {
opts.isNegative = undefined;
var radixPoint = opts.radixPoint || ",";
if ((typeof initialValue == "number" || opts.inputType === "number") && radixPoint !== "") {
initialValue = initialValue.toString().replace(".", radixPoint);
}
var valueParts = initialValue.split(radixPoint), integerPart = valueParts[0].replace(/[^\-0-9]/g, ""), decimalPart = valueParts.length > 1 ? valueParts[1].replace(/[^0-9]/g, "") : "";
initialValue = integerPart + (decimalPart !== "" ? radixPoint + decimalPart : decimalPart);
var digits = 0;
if (radixPoint !== "") {
digits = decimalPart.length;
if (decimalPart !== "") {
var digitsFactor = Math.pow(10, digits || 1);
if (isFinite(opts.digits)) {
digits = parseInt(opts.digits);
digitsFactor = Math.pow(10, digits);
}
initialValue = initialValue.replace(Inputmask.escapeRegex(radixPoint), ".");
if (isFinite(initialValue)) initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor;
initialValue = initialValue.toString().replace(".", radixPoint);
}
}
if (opts.digits === 0 && initialValue.indexOf(Inputmask.escapeRegex(radixPoint)) !== -1) {
initialValue = initialValue.substring(0, initialValue.indexOf(Inputmask.escapeRegex(radixPoint)));
}
return alignDigits(initialValue.toString().split(""), digits, opts).join("");
},
onKeyDown: function(e, buffer, caretPos, opts) {
var $input = $(this);
if (e.ctrlKey) {
switch (e.keyCode) {
case Inputmask.keyCode.UP:
$input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step));
$input.trigger("setvalue");
break;
case Inputmask.keyCode.DOWN:
$input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step));
$input.trigger("setvalue");
break;
}
}
}
},
currency: {
prefix: "$ ",
groupSeparator: ",",
alias: "numeric",
placeholder: "0",
autoGroup: true,
digits: 2,
digitsOptional: false,
clearMaskOnLostFocus: false
},
decimal: {
alias: "numeric"
},
integer: {
alias: "numeric",
digits: 0,
radixPoint: ""
},
percentage: {
alias: "numeric",
digits: 2,
digitsOptional: true,
radixPoint: ".",
placeholder: "0",
autoGroup: false,
min: 0,
max: 100,
suffix: " %",
allowMinus: false
}
});
return Inputmask;
});

View file

@ -1,97 +0,0 @@
/*!
* jquery.inputmask.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery", "./inputmask" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("jquery"), require("./inputmask"));
} else {
factory(jQuery, window.Inputmask);
}
})(function($, Inputmask) {
if ($.fn.inputmask === undefined) {
$.fn.inputmask = function(fn, options) {
var nptmask, input = this[0];
if (options === undefined) options = {};
if (typeof fn === "string") {
switch (fn) {
case "unmaskedvalue":
return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
case "remove":
return this.each(function() {
if (this.inputmask) this.inputmask.remove();
});
case "getemptymask":
return input && input.inputmask ? input.inputmask.getemptymask() : "";
case "hasMaskedValue":
return input && input.inputmask ? input.inputmask.hasMaskedValue() : false;
case "isComplete":
return input && input.inputmask ? input.inputmask.isComplete() : true;
case "getmetadata":
return input && input.inputmask ? input.inputmask.getmetadata() : undefined;
case "setvalue":
Inputmask.setValue(input, options);
break;
case "option":
if (typeof options === "string") {
if (input && input.inputmask !== undefined) {
return input.inputmask.option(options);
}
} else {
return this.each(function() {
if (this.inputmask !== undefined) {
return this.inputmask.option(options);
}
});
}
break;
default:
options.alias = fn;
nptmask = new Inputmask(options);
return this.each(function() {
nptmask.mask(this);
});
}
} else if (Array.isArray(fn)) {
options.alias = fn;
nptmask = new Inputmask(options);
return this.each(function() {
nptmask.mask(this);
});
} else if (typeof fn == "object") {
nptmask = new Inputmask(fn);
if (fn.mask === undefined && fn.alias === undefined) {
return this.each(function() {
if (this.inputmask !== undefined) {
return this.inputmask.option(fn);
} else nptmask.mask(this);
});
} else {
return this.each(function() {
nptmask.mask(this);
});
}
} else if (fn === undefined) {
return this.each(function() {
nptmask = new Inputmask(options);
nptmask.mask(this);
});
}
};
}
return $.fn.inputmask;
});

File diff suppressed because it is too large Load diff

View file

@ -1,9 +0,0 @@
/*!
* bindings/inputmask.binding.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","../inputmask","../global/window"],factory)}else if(typeof exports==="object"){module.exports=factory(require("jquery"),require("../inputmask"),require("../global/window"))}else{factory(jQuery,window.Inputmask,window)}})(function($,Inputmask,window){$(window.document).ajaxComplete(function(event,xmlHttpRequest,ajaxOptions){if($.inArray("html",ajaxOptions.dataTypes)!==-1){$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx,lmnt){if(lmnt.inputmask===undefined){Inputmask().mask(lmnt)}})}}).ready(function(){$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx,lmnt){if(lmnt.inputmask===undefined){Inputmask().mask(lmnt)}})})});

View file

@ -1,9 +0,0 @@
/*!
* dependencyLibs/inputmask.dependencyLib.jqlite.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["jqlite","../global/window"],factory)}else if(typeof exports==="object"){module.exports=factory(require("jqlite"),require("../global/window"))}else{window.dependencyLib=factory(jqlite,window)}})(function($,window){var document=window.document;function indexOf(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i}}return-1}function isWindow(obj){return obj!=null&&obj===obj.window}function isArraylike(obj){var length="length"in obj&&obj.length,ltype=typeof obj;if(ltype==="function"||isWindow(obj)){return false}if(obj.nodeType===1&&length){return true}return ltype==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj}$.inArray=function(elem,arr,i){return arr==null?-1:indexOf(arr,elem,i)};$.isFunction=function(obj){return typeof obj==="function"};$.isArray=Array.isArray;$.isPlainObject=function(obj){if(typeof obj!=="object"||obj.nodeType||isWindow(obj)){return false}if(obj.constructor&&!Object.hasOwnProperty.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true};$.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!$.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&($.isPlainObject(copy)||(copyIsArray=$.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&$.isArray(src)?src:[]}else{clone=src&&$.isPlainObject(src)?src:{}}target[name]=$.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target};$.each=function(obj,callback){var value,i=0;if(isArraylike(obj)){for(var length=obj.length;i<length;i++){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}else{for(i in obj){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}return obj};$.data=function(elem,name,data){return $(elem).data(name,data)};$.Event=$.Event||function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:undefined};var evt=document.createEvent("CustomEvent");evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt};$.Event.prototype=window.Event.prototype;return $});

View file

@ -1,9 +0,0 @@
/*!
* dependencyLibs/inputmask.dependencyLib.jquery.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){module.exports=factory(require("jquery"))}else{window.dependencyLib=factory(jQuery)}})(function($){return $});

File diff suppressed because one or more lines are too long

View file

@ -1,9 +0,0 @@
/*!
* global/window.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
if(typeof define==="function"&&define.amd)define(function(){return typeof window!=="undefined"?window:new(eval("require('jsdom').JSDOM"))("").window});else if(typeof exports==="object")module.exports=typeof window!=="undefined"?window:new(eval("require('jsdom').JSDOM"))("").window;

File diff suppressed because one or more lines are too long

View file

@ -1,9 +0,0 @@
/*!
* inputmask.extensions.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["./inputmask"],factory)}else if(typeof exports==="object"){module.exports=factory(require("./inputmask"))}else{factory(window.Inputmask)}})(function(Inputmask){Inputmask.extendDefinitions({A:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",casing:"upper"},"&":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});Inputmask.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)//.*",autoUnmask:false},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(chrs,maskset,pos,strict,opts){if(pos-1>-1&&maskset.buffer[pos-1]!=="."){chrs=maskset.buffer[pos-1]+chrs;if(pos-2>-1&&maskset.buffer[pos-2]!=="."){chrs=maskset.buffer[pos-2]+chrs}else chrs="0"+chrs}else chrs="00"+chrs;return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs)}}},onUnMask:function(maskedValue,unmaskedValue,opts){return maskedValue},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:false,casing:"lower",onBeforePaste:function(pastedValue,opts){pastedValue=pastedValue.toLowerCase();return pastedValue.replace("mailto:","")},definitions:{"*":{validator:"[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(maskedValue,unmaskedValue,opts){return maskedValue},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:true,autoUnmask:true}});return Inputmask});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,9 +0,0 @@
/*!
* jquery.inputmask.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","./inputmask"],factory)}else if(typeof exports==="object"){module.exports=factory(require("jquery"),require("./inputmask"))}else{factory(jQuery,window.Inputmask)}})(function($,Inputmask){if($.fn.inputmask===undefined){$.fn.inputmask=function(fn,options){var nptmask,input=this[0];if(options===undefined)options={};if(typeof fn==="string"){switch(fn){case"unmaskedvalue":return input&&input.inputmask?input.inputmask.unmaskedvalue():$(input).val();case"remove":return this.each(function(){if(this.inputmask)this.inputmask.remove()});case"getemptymask":return input&&input.inputmask?input.inputmask.getemptymask():"";case"hasMaskedValue":return input&&input.inputmask?input.inputmask.hasMaskedValue():false;case"isComplete":return input&&input.inputmask?input.inputmask.isComplete():true;case"getmetadata":return input&&input.inputmask?input.inputmask.getmetadata():undefined;case"setvalue":Inputmask.setValue(input,options);break;case"option":if(typeof options==="string"){if(input&&input.inputmask!==undefined){return input.inputmask.option(options)}}else{return this.each(function(){if(this.inputmask!==undefined){return this.inputmask.option(options)}})}break;default:options.alias=fn;nptmask=new Inputmask(options);return this.each(function(){nptmask.mask(this)})}}else if(Array.isArray(fn)){options.alias=fn;nptmask=new Inputmask(options);return this.each(function(){nptmask.mask(this)})}else if(typeof fn=="object"){nptmask=new Inputmask(fn);if(fn.mask===undefined&&fn.alias===undefined){return this.each(function(){if(this.inputmask!==undefined){return this.inputmask.option(fn)}else nptmask.mask(this)})}else{return this.each(function(){nptmask.mask(this)})}}else if(fn===undefined){return this.each(function(){nptmask=new Inputmask(options);nptmask.mask(this)})}}}return $.fn.inputmask});

File diff suppressed because one or more lines are too long

399
plugins/jquery/core.js vendored
View file

@ -1,399 +0,0 @@
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module
define( [
"./var/arr",
"./var/document",
"./var/getProto",
"./var/slice",
"./var/concat",
"./var/push",
"./var/indexOf",
"./var/class2type",
"./var/toString",
"./var/hasOwn",
"./var/fnToString",
"./var/ObjectFunctionString",
"./var/support",
"./var/isFunction",
"./var/isWindow",
"./core/DOMEval",
"./core/toType"
], function( arr, document, getProto, slice, concat, push, indexOf,
class2type, toString, hasOwn, fnToString, ObjectFunctionString,
support, isFunction, isWindow, DOMEval, toType ) {
"use strict";
var
version = "3.4.1",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
// Need init if jQuery is called (just allow error to be thrown if not included)
return new jQuery.fn.init( selector, context );
},
// Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
jQuery.fn = jQuery.prototype = {
// The current version of jQuery being used
jquery: version,
constructor: jQuery,
// The default length of a jQuery object is 0
length: 0,
toArray: function() {
return slice.call( this );
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
// Return all the elements in a clean array
if ( num == null ) {
return slice.call( this );
}
// Return just the one element from the set
return num < 0 ? this[ num + this.length ] : this[ num ];
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function( elems ) {
// Build a new jQuery matched element set
var ret = jQuery.merge( this.constructor(), elems );
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
// Return the newly-formed element set
return ret;
},
// Execute a callback for every element in the matched set.
each: function( callback ) {
return jQuery.each( this, callback );
},
map: function( callback ) {
return this.pushStack( jQuery.map( this, function( elem, i ) {
return callback.call( elem, i, elem );
} ) );
},
slice: function() {
return this.pushStack( slice.apply( this, arguments ) );
},
first: function() {
return this.eq( 0 );
},
last: function() {
return this.eq( -1 );
},
eq: function( i ) {
var len = this.length,
j = +i + ( i < 0 ? len : 0 );
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
},
end: function() {
return this.prevObject || this.constructor();
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push: push,
sort: arr.sort,
splice: arr.splice
};
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
deep = target;
// Skip the boolean and the target
target = arguments[ i ] || {};
i++;
}
// Handle case when target is a string or something (possible in deep copy)
if ( typeof target !== "object" && !isFunction( target ) ) {
target = {};
}
// Extend jQuery itself if only one argument is passed
if ( i === length ) {
target = this;
i--;
}
for ( ; i < length; i++ ) {
// Only deal with non-null/undefined values
if ( ( options = arguments[ i ] ) != null ) {
// Extend the base object
for ( name in options ) {
copy = options[ name ];
// Prevent Object.prototype pollution
// Prevent never-ending loop
if ( name === "__proto__" || target === copy ) {
continue;
}
// Recurse if we're merging plain objects or arrays
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
( copyIsArray = Array.isArray( copy ) ) ) ) {
src = target[ name ];
// Ensure proper type for the source value
if ( copyIsArray && !Array.isArray( src ) ) {
clone = [];
} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
clone = {};
} else {
clone = src;
}
copyIsArray = false;
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
// Don't bring in undefined values
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
}
}
}
// Return the modified object
return target;
};
jQuery.extend( {
// Unique for each copy of jQuery on the page
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
// Assume jQuery is ready without the ready module
isReady: true,
error: function( msg ) {
throw new Error( msg );
},
noop: function() {},
isPlainObject: function( obj ) {
var proto, Ctor;
// Detect obvious negatives
// Use toString instead of jQuery.type to catch host objects
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
return false;
}
proto = getProto( obj );
// Objects with no prototype (e.g., `Object.create( null )`) are plain
if ( !proto ) {
return true;
}
// Objects with prototype are plain iff they were constructed by a global Object function
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
},
isEmptyObject: function( obj ) {
var name;
for ( name in obj ) {
return false;
}
return true;
},
// Evaluates a script in a global context
globalEval: function( code, options ) {
DOMEval( code, { nonce: options && options.nonce } );
},
each: function( obj, callback ) {
var length, i = 0;
if ( isArrayLike( obj ) ) {
length = obj.length;
for ( ; i < length; i++ ) {
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
break;
}
}
} else {
for ( i in obj ) {
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
break;
}
}
}
return obj;
},
// Support: Android <=4.0 only
trim: function( text ) {
return text == null ?
"" :
( text + "" ).replace( rtrim, "" );
},
// results is for internal usage only
makeArray: function( arr, results ) {
var ret = results || [];
if ( arr != null ) {
if ( isArrayLike( Object( arr ) ) ) {
jQuery.merge( ret,
typeof arr === "string" ?
[ arr ] : arr
);
} else {
push.call( ret, arr );
}
}
return ret;
},
inArray: function( elem, arr, i ) {
return arr == null ? -1 : indexOf.call( arr, elem, i );
},
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge: function( first, second ) {
var len = +second.length,
j = 0,
i = first.length;
for ( ; j < len; j++ ) {
first[ i++ ] = second[ j ];
}
first.length = i;
return first;
},
grep: function( elems, callback, invert ) {
var callbackInverse,
matches = [],
i = 0,
length = elems.length,
callbackExpect = !invert;
// Go through the array, only saving the items
// that pass the validator function
for ( ; i < length; i++ ) {
callbackInverse = !callback( elems[ i ], i );
if ( callbackInverse !== callbackExpect ) {
matches.push( elems[ i ] );
}
}
return matches;
},
// arg is for internal usage only
map: function( elems, callback, arg ) {
var length, value,
i = 0,
ret = [];
// Go through the array, translating each of the items to their new values
if ( isArrayLike( elems ) ) {
length = elems.length;
for ( ; i < length; i++ ) {
value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret.push( value );
}
}
// Go through every key on the object,
} else {
for ( i in elems ) {
value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret.push( value );
}
}
}
// Flatten any nested arrays
return concat.apply( [], ret );
},
// A global GUID counter for objects
guid: 1,
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support: support
} );
if ( typeof Symbol === "function" ) {
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}
// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
function( i, name ) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );
function isArrayLike( obj ) {
// Support: real iOS 8.2 only (not reproducible in simulator)
// `in` check used to prevent JIT error (gh-2145)
// hasOwn isn't used here due to false negatives
// regarding Nodelist length in IE
var length = !!obj && "length" in obj && obj.length,
type = toType( obj );
if ( isFunction( obj ) || isWindow( obj ) ) {
return false;
}
return type === "array" || length === 0 ||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
return jQuery;
} );