source: trip-planner-front/node_modules/primeng/fesm2020/primeng-utils.mjs.map@ 1ad8e64

Last change on this file since 1ad8e64 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 13.7 KB
RevLine 
[59329aa]1{"version":3,"file":"primeng-utils.mjs","sources":["../../src/app/components/utils/objectutils.ts","../../src/app/components/utils/uniquecomponentid.ts","../../src/app/components/utils/zindexutils.ts","../../src/app/components/utils/primeng-utils.ts"],"sourcesContent":["export class ObjectUtils {\n\n public static equals(obj1: any, obj2: any, field?: string): boolean {\n if (field)\n return (this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field));\n else\n return this.equalsByValue(obj1, obj2);\n }\n\n public static equalsByValue(obj1: any, obj2: any): boolean {\n if (obj1 === obj2) return true;\n\n if (obj1 && obj2 && typeof obj1 == 'object' && typeof obj2 == 'object') {\n var arrA = Array.isArray(obj1)\n , arrB = Array.isArray(obj2)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = obj1.length;\n if (length != obj2.length) return false;\n for (i = length; i-- !== 0;)\n if (!this.equalsByValue(obj1[i], obj2[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = obj1 instanceof Date\n , dateB = obj2 instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return obj1.getTime() == obj2.getTime();\n\n var regexpA = obj1 instanceof RegExp\n , regexpB = obj2 instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return obj1.toString() == obj2.toString();\n\n var keys = Object.keys(obj1);\n length = keys.length;\n\n if (length !== Object.keys(obj2).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(obj2, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!this.equalsByValue(obj1[key], obj2[key])) return false;\n }\n\n return true;\n }\n\n return obj1 !== obj1 && obj2 !== obj2;\n }\n\n public static resolveFieldData(data: any, field: any): any {\n if (data && field) {\n if (this.isFunction(field)) {\n return field(data);\n }\n else if (field.indexOf('.') == -1) {\n return data[field];\n }\n else {\n let fields: string[] = field.split('.');\n let value = data;\n for(let i = 0, len = fields.length; i < len; ++i) {\n if (value == null) {\n return null;\n }\n value = value[fields[i]];\n }\n return value;\n }\n }\n else {\n return null;\n }\n }\n\n public static isFunction(obj: any) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n }\n\n public static reorderArray(value: any[], from: number, to: number) {\n let target: number;\n if (value && from !== to) {\n if (to >= value.length) {\n to %= value.length;\n from %= value.length;\n }\n value.splice(to, 0, value.splice(from, 1)[0]);\n }\n }\n\n public static insertIntoOrderedArray(item: any, index: number, arr: any[], sourceArr: any[]): void {\n if (arr.length > 0) {\n let injected = false;\n for(let i = 0; i < arr.length; i++) {\n let currentItemIndex = this.findIndexInList(arr[i], sourceArr);\n if (currentItemIndex > index) {\n arr.splice(i, 0, item);\n injected = true;\n break;\n }\n }\n\n if (!injected) {\n arr.push(item);\n }\n }\n else {\n arr.push(item);\n }\n }\n\n public static findIndexInList(item: any, list: any): number {\n let index: number = -1;\n\n if (list) {\n for(let i = 0; i < list.length; i++) {\n if (list[i] == item) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n }\n\n public static contains(value, list) {\n if (value != null && list && list.length) {\n for (let val of list) {\n if (this.equals(value, val))\n return true;\n }\n }\n\n return false;\n }\n\n public static removeAccents(str) {\n if (str && str.search(/[\\xC0-\\xFF]/g) > -1) {\n str = str\n .replace(/[\\xC0-\\xC5]/g, \"A\")\n .replace(/[\\xC6]/g, \"AE\")\n .replace(/[\\xC7]/g, \"C\")\n .replace(/[\\xC8-\\xCB]/g, \"E\")\n .replace(/[\\xCC-\\xCF]/g, \"I\")\n .replace(/[\\xD0]/g, \"D\")\n .replace(/[\\xD1]/g, \"N\")\n .replace(/[\\xD2-\\xD6\\xD8]/g, \"O\")\n .replace(/[\\xD9-\\xDC]/g, \"U\")\n .replace(/[\\xDD]/g, \"Y\")\n .replace(/[\\xDE]/g, \"P\")\n .replace(/[\\xE0-\\xE5]/g, \"a\")\n .replace(/[\\xE6]/g, \"ae\")\n .replace(/[\\xE7]/g, \"c\")\n .replace(/[\\xE8-\\xEB]/g, \"e\")\n .replace(/[\\xEC-\\xEF]/g, \"i\")\n .replace(/[\\xF1]/g, \"n\")\n .replace(/[\\xF2-\\xF6\\xF8]/g, \"o\")\n .replace(/[\\xF9-\\xFC]/g, \"u\")\n .replace(/[\\xFE]/g, \"p\")\n .replace(/[\\xFD\\xFF]/g, \"y\");\n }\n\n return str;\n }\n}\n","\nexport var lastId = 0;\n\nexport function UniqueComponentId () {\n let prefix = 'pr_id_';\n lastId++;\n return `${prefix}${lastId}`;\n}","function ZIndexUtils() {\n let zIndexes = [];\n\n const generateZIndex = (key, baseZIndex) => {\n let lastZIndex = zIndexes.length > 0 ? zIndexes[zIndexes.length - 1] : { key, value: baseZIndex };\n let newZIndex = lastZIndex.value + (lastZIndex.key === key ? 0 : baseZIndex) + 1;\n\n zIndexes.push({ key, value: newZIndex });\n\n return newZIndex;\n }\n\n const revertZIndex = (zIndex) => {\n zIndexes = zIndexes.filter(obj => obj.value !== zIndex);\n }\n\n const getCurrentZIndex = () => {\n return zIndexes.length > 0 ? zIndexes[zIndexes.length - 1].value : 0;\n }\n\n const getZIndex = (el) => {\n return el ? parseInt(el.style.zIndex, 10) || 0 : 0\n }\n\n return {\n get: getZIndex,\n set: (key, el, baseZIndex) => {\n if (el) {\n el.style.zIndex = String(generateZIndex(key, baseZIndex));\n }\n },\n clear: (el) => {\n if (el) {\n revertZIndex(getZIndex(el));\n el.style.zIndex = '';\n }\n },\n getCurrent: () => getCurrentZIndex()\n };\n}\n\nexport default ZIndexUtils();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"MAAa,WAAW;IAEb,OAAO,MAAM,CAAC,IAAS,EAAE,IAAS,EAAE,KAAc;QACrD,IAAI,KAAK;YACL,QAAQ,IAAI,CAAC,g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