@acorex/core 18.12.20 → 18.12.22
Sign up to get free protection for your applications and to get access to all the features.
- package/fesm2022/acorex-core-config.mjs.map +1 -1
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs.map +1 -1
- package/fesm2022/acorex-core-file.mjs.map +1 -1
- package/fesm2022/acorex-core-format.mjs.map +1 -1
- package/fesm2022/acorex-core-image.mjs.map +1 -1
- package/fesm2022/acorex-core-memorize.mjs.map +1 -1
- package/fesm2022/acorex-core-network.mjs.map +1 -1
- package/fesm2022/acorex-core-pipes.mjs.map +1 -1
- package/fesm2022/acorex-core-platform.mjs.map +1 -1
- package/fesm2022/acorex-core-storage.mjs.map +1 -1
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs.map +1 -1
- package/package.json +12 -12
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T> | Subject<T>): Observable<T> | Subject<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient-es';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: unknown[] | { color: unknown; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static getLuminance(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [\n X * 1.656492 - Y * 0.354851 - Z * 0.255038,\n -X * 0.707196 + Y * 1.655397 + Z * 0.036152,\n X * 0.051713 - Y * 0.121364 + Z * 1.01153,\n ];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) => (x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055));\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n\n static colorStringToHex(color) {\n // Check if the input is an RGBA color string\n const rgbaMatch = color.match(/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)$/i);\n if (rgbaMatch) {\n let [_, r, g, b, a] = rgbaMatch;\n r = parseInt(r, 10);\n g = parseInt(g, 10);\n b = parseInt(b, 10);\n a = a ? parseFloat(a) : 1;\n\n // Convert RGB to hex\n let hexColor = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;\n\n // Include alpha if present\n if (a < 1) {\n const alphaHex = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n hexColor += alphaHex;\n }\n\n return hexColor;\n }\n\n // Check if the input is a hex color string\n const hexMatch = color.match(/^#([0-9a-fA-F]{3}){1,2}$/);\n if (hexMatch) {\n return color;\n }\n\n throw new Error('Invalid color format');\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\n\n// @dynamic\nexport class AXHtmlUtil {\n\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n static blurElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.blur();\n return focusable;\n }\n return null;\n }\n\n static hasFocus(element: HTMLElement) {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n\n static isRtl(element: HTMLElement) {\n if (isBrowser()) {\n const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';\n return rtl;\n }\n\n return false;\n }\n\n /**\n * Helper function to check if an element is scrollable\n */\n static isScrollable(element: HTMLElement): boolean {\n const overflowY = window.getComputedStyle(element).overflowY;\n return (overflowY === 'auto' || overflowY === 'scroll') && element.scrollHeight > element.clientHeight;\n }\n\n /**\n * Utility function to find scrollable parent elements\n */\n static getScrollableParents(element: HTMLElement): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let currentElement: HTMLElement | null = element;\n\n while (currentElement) {\n if (AXHtmlUtil.isScrollable(currentElement)) {\n parents.push(currentElement);\n }\n currentElement = currentElement.parentElement;\n }\n\n return parents;\n }\n}\n","// @dynamic\nexport class AXStringUtil {\n static getWordBoundsAtPosition(str: string, position: number): { start: number; end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString: any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;SAGgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,UAAU,WAAW,EAAA;AAC1B,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW,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/B,QAAA,MAAM,cAAc,GAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AACpE,QAAA,KAAK,IAAI,cAAc,CAAC,KAAK,CAAC;QAC9B,IAAI,GAAG,GAAG,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3C,OAAO;YACL,KAAK;YACL,GAAG;SACJ,CAAC;KACH;AACF;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T> | Subject<T>): Observable<T> | Subject<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient-es';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: unknown[] | { color: unknown; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static getLuminance(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [\n X * 1.656492 - Y * 0.354851 - Z * 0.255038,\n -X * 0.707196 + Y * 1.655397 + Z * 0.036152,\n X * 0.051713 - Y * 0.121364 + Z * 1.01153,\n ];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) => (x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055));\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n\n static colorStringToHex(color) {\n // Check if the input is an RGBA color string\n const rgbaMatch = color.match(/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)$/i);\n if (rgbaMatch) {\n let [_, r, g, b, a] = rgbaMatch;\n r = parseInt(r, 10);\n g = parseInt(g, 10);\n b = parseInt(b, 10);\n a = a ? parseFloat(a) : 1;\n\n // Convert RGB to hex\n let hexColor = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;\n\n // Include alpha if present\n if (a < 1) {\n const alphaHex = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n hexColor += alphaHex;\n }\n\n return hexColor;\n }\n\n // Check if the input is a hex color string\n const hexMatch = color.match(/^#([0-9a-fA-F]{3}){1,2}$/);\n if (hexMatch) {\n return color;\n }\n\n throw new Error('Invalid color format');\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\n\n// @dynamic\nexport class AXHtmlUtil {\n\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n static blurElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.blur();\n return focusable;\n }\n return null;\n }\n\n static hasFocus(element: HTMLElement) {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n\n static isRtl(element: HTMLElement) {\n if (isBrowser()) {\n const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';\n return rtl;\n }\n\n return false;\n }\n\n /**\n * Helper function to check if an element is scrollable\n */\n static isScrollable(element: HTMLElement): boolean {\n const overflowY = window.getComputedStyle(element).overflowY;\n return (overflowY === 'auto' || overflowY === 'scroll') && element.scrollHeight > element.clientHeight;\n }\n\n /**\n * Utility function to find scrollable parent elements\n */\n static getScrollableParents(element: HTMLElement): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let currentElement: HTMLElement | null = element;\n\n while (currentElement) {\n if (AXHtmlUtil.isScrollable(currentElement)) {\n parents.push(currentElement);\n }\n currentElement = currentElement.parentElement;\n }\n\n return parents;\n }\n}\n","// @dynamic\nexport class AXStringUtil {\n static getWordBoundsAtPosition(str: string, position: number): { start: number; end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString: any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;SAGgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,UAAU,WAAW,EAAA;AAC1B,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW;AAC9C,QAAA,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,YAAA;AAClC,YAAA,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;AACvB,gBAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;AAC3B,gBAAA,IAAI,OAAO,QAAQ,CAAC,SAAS,KAAK,UAAU,EAAE;oBAC5C,QAAQ,CAAC,WAAW,EAAE;;;YA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AI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YACzC,KAAK,IAAI,CAAC;;QAEZ,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;AAC9B,QAAA,MAAM,cAAc,GAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;AACnE,QAAA,KAAK,IAAI,cAAc,CAAC,KAAK;QAC7B,IAAI,GAAG,GAAG,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM;QAC1C,OAAO;YACL,KAAK;YACL,GAAG;SACJ;;AAEJ;;AClBD;;AAEG;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-validation.mjs","sources":["../../../../libs/core/validation/src/lib/rules/callback-rule.ts","../../../../libs/core/validation/src/lib/rules/regex-rule.ts","../../../../libs/core/validation/src/lib/rules/required-rule.ts","../../../../libs/core/validation/src/lib/rules/length-rule.ts","../../../../libs/core/validation/src/lib/rules/maxlength-rule.ts","../../../../libs/core/validation/src/lib/rules/minlength-rule.ts","../../../../libs/core/validation/src/lib/rules/between-rule.ts","../../../../libs/core/validation/src/lib/rules/equal-rule.ts","../../../../libs/core/validation/src/lib/rules/greater-than.ts","../../../../libs/core/validation/src/lib/rules/less-than-rule.ts","../../../../libs/core/validation/src/lib/validation.config.ts","../../../../libs/core/validation/src/lib/validation.service.ts","../../../../libs/core/validation/src/lib/validation.module.ts","../../../../libs/core/validation/src/lib/validation.types.ts","../../../../libs/core/validation/src/acorex-core-validation.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport type AXCallbackValidationRuleResult =\n | Promise<{ result: boolean; message?: string }>\n | { result: boolean; message?: string }\n | boolean;\n\nexport type AXCallbackValidation<T> = (value: T, options?: AXCallbackValidationRuleOptions<T>) => AXCallbackValidationRuleResult;\n\nexport interface AXCallbackValidationRuleOptions<T> extends AXValidationRuleOptions {\n validate: AXCallbackValidation<T>;\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n callback: AXCallbackValidationRuleOptions<unknown>;\n }\n}\n\n@Injectable()\nexport class AXCallbackValidationRule<T> implements AXValidationRule {\n get name(): string {\n return 'callback';\n }\n\n async validate(value: T, options: AXCallbackValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n const validationResult = options?.validate\n ? options?.validate(value, options)\n : {\n result: false,\n message: 'Invalid callback function',\n };\n const createResult = (result: { result: boolean; message?: string }) => ({\n rule: this.name,\n result: result.result,\n message: result.message ?? options?.message ?? '',\n value: value,\n });\n\n if (typeof validationResult === 'boolean') {\n return createResult({\n result: validationResult,\n });\n }\n\n if (validationResult instanceof Promise) {\n return validationResult.then(createResult);\n }\n\n return createResult(validationResult);\n }\n}\n","import { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport { isEmpty, isString } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXRegexValidationRuleOptions extends AXValidationRuleOptions {\n pattern: string | RegExp;\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n regex: AXRegexValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRegexValidationRule implements AXValidationRule {\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'regex';\n }\n\n async validate(value: string, options: AXRegexValidationRuleOptions): Promise<AXValidationRuleResult> {\n // Convert string pattern to RegExp if necessary\n const regexPattern = typeof options.pattern === 'string' ? new RegExp(options.pattern) : options.pattern;\n\n if (!value || (isString(value) && isEmpty(value.trim()))) {\n return {\n rule: this.name,\n result: true,\n message: null,\n value: value,\n };\n } else if (!isString(value)) {\n return {\n rule: this.name,\n result: false,\n message: `${value} is not string value.`,\n value: value,\n };\n }\n\n const isValid = regexPattern.test(value);\n const translatedMessage = await this.traslationService.translateAsync(\n options?.message ?? `The value does not match the pattern ${regexPattern}.`,\n { params: { title: options?.['title'] } },\n );\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : translatedMessage,\n value: value,\n };\n }\n}\n","import { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport { find, isArray, isEmpty, isNull, isNumber, isString, isUndefined } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXRequiredValidationRuleOptions extends AXValidationRuleOptions {}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n required: AXRequiredValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRequiredValidationRule implements AXValidationRule {\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'required';\n }\n\n async validate(value?: unknown, options?: AXRequiredValidationRuleOptions): Promise<AXValidationRuleResult> {\n const rules = [\n { test: (val) => isNull(val) || isUndefined(val) },\n { test: (val) => isString(val) && isEmpty(val.trim()) },\n { test: (val) => isNumber(val) && isNaN(val) },\n { test: (val) => isArray(val) && isEmpty(val) },\n ];\n\n const failedRule = find(rules, (rule) => rule.test(value));\n const isValid = !failedRule;\n const translatedMessage = await this.traslationService.translateAsync('validation.messages.required', {\n params: { title: options?.['title'] },\n });\n const message = failedRule ? options?.message ?? translatedMessage : null;\n\n return {\n rule: this.name,\n result: isValid,\n message: message,\n value,\n };\n }\n}\n","// ax-max-length-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXLengthValidationRuleOptions extends AXValidationRuleOptions {\n min: number;\n max: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n length: AXLengthValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'length';\n }\n\n async validate(value: string, options: AXLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = value?.length >= options.min && value?.length <= options.max;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : options?.message ?? `The value must be between ${options.min} and ${options.max} chars`,\n value: value,\n };\n }\n}\n","// ax-max-length-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXMaxLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n maxLength: AXMaxLengthValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXMaxLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'maxLength';\n }\n\n async validate(value: string, options: AXMaxLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : value?.length <= options.value;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must not exceed ${options.value} characters.`,\n value: value,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXMinLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n minLength: AXMinLengthValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXMinLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'minLength';\n }\n\n async validate(value: string, options: AXMinLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : value?.length >= options.value;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must be at least ${options.value} characters long.`,\n value: value,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXBetweenValidationRuleOptions<T = number | Date> extends AXValidationRuleOptions {\n lowerValue: T;\n upperValue: T;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n between: AXBetweenValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXBetweenValidationRule<T = number | Date> implements AXValidationRule {\n get name(): string {\n return 'between';\n }\n\n async validate(value: T, options: AXBetweenValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n let isValid;\n if (options.inclusive) {\n isValid = value >= options.lowerValue && value <= options.upperValue;\n } else {\n isValid = value > options.lowerValue && value < options.upperValue;\n }\n\n const rangeType = options.inclusive ? 'inclusive' : 'exclusive';\n const baseMessage = `The value must be within the ${rangeType} range of ${options.lowerValue} to ${options.upperValue}.`;\n\n return {\n rule: this.name,\n result: isValid || isEmpty(value),\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value,\n };\n }\n}\n","// ax-equal-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isEqual } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXEqualValidationRuleOptions extends AXValidationRuleOptions {\n value: any;\n not?: boolean; // Optional flag to invert the validation logic\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n equal: AXEqualValidationRuleOptions;\n }\n}\n@Injectable()\nexport class AXEqualValidationRule implements AXValidationRule {\n get name(): string {\n return 'equal';\n }\n\n async validate(value: any, options: AXEqualValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValueEqual = isEqual(value, options.value);\n const isValid = options.not ? !isValueEqual : isValueEqual;\n\n const defaultMessage = `The value must ${options.not ? 'not ' : ''}be equal to ${options.value}.`;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? defaultMessage,\n value: value,\n };\n }\n}\n","// ax-greater-than-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isNull, isUndefined } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXGreaterThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n greaterThan: AXGreaterThanValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXGreaterThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'greaterThan';\n }\n\n async validate(value: number, options: AXGreaterThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isNull(value) || isUndefined(value) ? true : options.inclusive ? value >= options.value : value > options.value;\n const baseMessage = `The value must be ${options.inclusive ? 'greater than or equal to' : 'greater than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value,\n };\n }\n}\n","// ax-less-than-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isNull, isUndefined } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXLessThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n lessThan: AXLessThanValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXLessThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'lessThan';\n }\n\n async validate(value: number, options: AXLessThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isNull(value) || isUndefined(value) ? true : options.inclusive ? value <= options.value : value < options.value;\n const baseMessage = `The value must be ${options.inclusive ? 'less than or equal to' : 'less than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXValidationRuleOptions, AXValidationRuleOptionsMap } from './validation.types';\n\nexport type AXValidationConfigRules = {\n [key: string]: {\n rule: keyof AXValidationRuleOptionsMap;\n options: AXValidationRuleOptions;\n };\n};\n\nexport interface AXValidationConfig {\n rules: AXValidationConfigRules;\n}\n\nexport const AX_VALIDATION_CONFIG = new InjectionToken<AXValidationConfig>('AX_VALIDATION_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXValidationDefaultConfig;\n },\n});\n\nexport const AXValidationDefaultConfig: AXValidationConfig = {\n rules: {\n email: {\n rule: 'regex',\n options: {\n pattern:\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: 'validation.messages.email',\n },\n },\n phone: {\n rule: 'regex',\n options: {\n pattern: /^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$/,\n message: 'validation.messages.phone',\n },\n },\n },\n};\n\nexport type AXPartialValidationConfig = Partial<AXValidationConfig>;\n\nexport function validationConfig(config: AXPartialValidationConfig = {}): AXValidationConfig {\n const result = {\n ...AXValidationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, Injector, inject } from '@angular/core';\nimport { merge } from 'lodash-es';\nimport { AXValidationConfigRules, AX_VALIDATION_CONFIG } from './validation.config';\nimport {\n AXValidationRule,\n AXValidationRuleOptions,\n AXValidationRuleOptionsMap,\n AXValidationRuleResult,\n AXValidationSummary,\n} from './validation.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXValidationRegistryService {\n private plugins: AXValidationRule[] = [];\n\n private configs = inject(AX_VALIDATION_CONFIG);\n\n public get customRules(): AXValidationConfigRules {\n return this.configs.rules;\n }\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXValidationRule)[]) {\n plugins.forEach((t) => {\n const childInjector = Injector.create({\n providers: [{ provide: t, useClass: t, deps: [] }],\n parent: this.injector,\n });\n const v = childInjector.get(t);\n\n if (v && !this.plugins.some((p) => p.name == v.name)) {\n this.plugins.push(v);\n }\n });\n }\n\n get(ruleName: string): AXValidationRule | undefined {\n return this.plugins.find((c) => c.name == ruleName);\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXValidationService {\n constructor(\n private pluginRegistry: AXValidationRegistryService,\n private translationService: AXTranslationService,\n ) {}\n\n async validate(ruleName: string, value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult> {\n const customRule = this.pluginRegistry.customRules[ruleName];\n const validator = this.pluginRegistry.get(ruleName);\n\n if (!validator && !customRule) {\n return {\n rule: ruleName,\n result: false,\n message: await this.translationService.translateAsync('validation.messages.invalid-rull-name', { params: { name: ruleName } }),\n value,\n };\n }\n\n if (options?.message) {\n options.message = await this.translationService.translateAsync(options.message);\n }\n //\n if (validator) return validator.validate(value, options);\n else {\n return this.validate(customRule.rule, value, merge(options, customRule.options));\n }\n }\n\n ruleFor(value: unknown): AXValidationRuleChain {\n return new AXValidationRuleChain(this, value);\n }\n}\n\nclass AXValidationRuleChain {\n private rules: { name: string; options?: AXValidationRuleOptions }[] = [];\n private validationSummary: AXValidationSummary = { result: true, rules: [] };\n\n constructor(\n private validationService: AXValidationService,\n private initialValue: unknown,\n ) {}\n\n addRule<K extends keyof AXValidationRuleOptionsMap>(name: K, options?: AXValidationRuleOptionsMap[K]): AXValidationRuleChain {\n this.rules.push({ name, options });\n return this;\n }\n\n async validate(): Promise<AXValidationSummary> {\n for (const rule of this.rules) {\n const result = await this.validationService.validate(rule.name, this.initialValue, rule.options);\n this.validationSummary.rules.push(result);\n if (!result.result) {\n this.validationSummary.result = false;\n }\n }\n return this.validationSummary;\n }\n}\n","import { Inject, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AXBetweenValidationRule } from './rules/between-rule';\nimport { AXCallbackValidationRule } from './rules/callback-rule';\nimport { AXEqualValidationRule } from './rules/equal-rule';\nimport { AXGreaterThanValidationRule } from './rules/greater-than';\nimport { AXLengthValidationRule } from './rules/length-rule';\nimport { AXLessThanValidationRule } from './rules/less-than-rule';\nimport { AXMaxLengthValidationRule } from './rules/maxlength-rule';\nimport { AXMinLengthValidationRule } from './rules/minlength-rule';\nimport { AXRegexValidationRule } from './rules/regex-rule';\nimport { AXRequiredValidationRule } from './rules/required-rule';\nimport { AXValidationRegistryService } from './validation.service';\nimport { AXValidationRule } from './validation.types';\n\nconst BUILT_IN_RULES = [\n AXRequiredValidationRule,\n AXRegexValidationRule,\n AXRequiredValidationRule,\n AXCallbackValidationRule,\n //\n AXMinLengthValidationRule,\n AXMaxLengthValidationRule,\n AXLengthValidationRule,\n //\n AXEqualValidationRule,\n AXLessThanValidationRule,\n AXGreaterThanValidationRule,\n AXBetweenValidationRule,\n];\n\nexport interface AXValidationModuleConfigs {\n rules: (new () => AXValidationRule)[];\n}\n\n@NgModule({\n imports: [],\n providers: [...BUILT_IN_RULES],\n})\nexport class AXValidationModule {\n static forRoot(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Inject('AXValidationModuleFactory') instances: any[]) {\n instances.forEach((f) => {\n f();\n });\n }\n}\n","export interface AXValidationRuleOptions {\n message?: string;\n [key: string]: unknown;\n}\n\nexport interface AXValidationRuleOptionsMap {\n // initially empty, but will be extended by other modules\n}\n\nexport abstract class AXValidationRule {\n abstract get name(): string;\n abstract validate(value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult>;\n}\n\nexport interface AXValidationRuleResult {\n rule: string;\n value?: unknown;\n message?: string | null;\n result: boolean;\n [key: string]: unknown;\n}\n\nexport interface AXValidationSummary {\n result: boolean;\n rules: AXValidationRuleResult[];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAsBa,wBAAwB,CAAA;AACnC,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,UAAU,CAAC;KACnB;AAED,IAAA,MAAM,QAAQ,CAAC,KAAQ,EAAE,OAA2C,EAAA;AAClE,QAAA,MAAM,gBAAgB,GAAG,OAAO,EAAE,QAAQ;cACtC,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;AACnC,cAAE;AACE,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,OAAO,EAAE,2BAA2B;aACrC,CAAC;AACN,QAAA,MAAM,YAAY,GAAG,CAAC,MAA6C,MAAM;YACvE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE;AACjD,YAAA,KAAK,EAAE,KAAK;AACb,SAAA,CAAC,CAAC;AAEH,QAAA,IAAI,OAAO,gBAAgB,KAAK,SAAS,EAAE;AACzC,YAA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AAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,kBAsCT,2BAA2B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAtCpC,kBAAkB,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAFlB,SAAA,EAAA,CAAC,GAAG,cAAc,CAAC,EAAA,CAAA,CAAA,EAAA;;2FAEnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE,CAAC,GAAG,cAAc,CAAC;AAC/B,iBAAA,CAAA;;0BAuCc,MAAM;2BAAC,2BAA2B,CAAA;;;MCnE3B,gBAAgB,CAAA;AAGrC;;ACZD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-validation.mjs","sources":["../../../../libs/core/validation/src/lib/rules/callback-rule.ts","../../../../libs/core/validation/src/lib/rules/regex-rule.ts","../../../../libs/core/validation/src/lib/rules/required-rule.ts","../../../../libs/core/validation/src/lib/rules/length-rule.ts","../../../../libs/core/validation/src/lib/rules/maxlength-rule.ts","../../../../libs/core/validation/src/lib/rules/minlength-rule.ts","../../../../libs/core/validation/src/lib/rules/between-rule.ts","../../../../libs/core/validation/src/lib/rules/equal-rule.ts","../../../../libs/core/validation/src/lib/rules/greater-than.ts","../../../../libs/core/validation/src/lib/rules/less-than-rule.ts","../../../../libs/core/validation/src/lib/validation.config.ts","../../../../libs/core/validation/src/lib/validation.service.ts","../../../../libs/core/validation/src/lib/validation.module.ts","../../../../libs/core/validation/src/lib/validation.types.ts","../../../../libs/core/validation/src/acorex-core-validation.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport type AXCallbackValidationRuleResult =\n | Promise<{ result: boolean; message?: string }>\n | { result: boolean; message?: string }\n | boolean;\n\nexport type AXCallbackValidation<T> = (value: T, options?: AXCallbackValidationRuleOptions<T>) => AXCallbackValidationRuleResult;\n\nexport interface AXCallbackValidationRuleOptions<T> extends AXValidationRuleOptions {\n validate: AXCallbackValidation<T>;\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n callback: AXCallbackValidationRuleOptions<unknown>;\n }\n}\n\n@Injectable()\nexport class AXCallbackValidationRule<T> implements AXValidationRule {\n get name(): string {\n return 'callback';\n }\n\n async validate(value: T, options: AXCallbackValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n const validationResult = options?.validate\n ? options?.validate(value, options)\n : {\n result: false,\n message: 'Invalid callback function',\n };\n const createResult = (result: { result: boolean; message?: string }) => ({\n rule: this.name,\n result: result.result,\n message: result.message ?? options?.message ?? '',\n value: value,\n });\n\n if (typeof validationResult === 'boolean') {\n return createResult({\n result: validationResult,\n });\n }\n\n if (validationResult instanceof Promise) {\n return validationResult.then(createResult);\n }\n\n return createResult(validationResult);\n }\n}\n","import { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport { isEmpty, isString } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXRegexValidationRuleOptions extends AXValidationRuleOptions {\n pattern: string | RegExp;\n}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n regex: AXRegexValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRegexValidationRule implements AXValidationRule {\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'regex';\n }\n\n async validate(value: string, options: AXRegexValidationRuleOptions): Promise<AXValidationRuleResult> {\n // Convert string pattern to RegExp if necessary\n const regexPattern = typeof options.pattern === 'string' ? new RegExp(options.pattern) : options.pattern;\n\n if (!value || (isString(value) && isEmpty(value.trim()))) {\n return {\n rule: this.name,\n result: true,\n message: null,\n value: value,\n };\n } else if (!isString(value)) {\n return {\n rule: this.name,\n result: false,\n message: `${value} is not string value.`,\n value: value,\n };\n }\n\n const isValid = regexPattern.test(value);\n const translatedMessage = await this.traslationService.translateAsync(\n options?.message ?? `The value does not match the pattern ${regexPattern}.`,\n { params: { title: options?.['title'] } },\n );\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : translatedMessage,\n value: value,\n };\n }\n}\n","import { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport { find, isArray, isEmpty, isNull, isNumber, isString, isUndefined } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXRequiredValidationRuleOptions extends AXValidationRuleOptions {}\n\n// Augment the AXValidationRuleOptionsMap\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n required: AXRequiredValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXRequiredValidationRule implements AXValidationRule {\n private traslationService = inject(AXTranslationService);\n\n get name(): string {\n return 'required';\n }\n\n async validate(value?: unknown, options?: AXRequiredValidationRuleOptions): Promise<AXValidationRuleResult> {\n const rules = [\n { test: (val) => isNull(val) || isUndefined(val) },\n { test: (val) => isString(val) && isEmpty(val.trim()) },\n { test: (val) => isNumber(val) && isNaN(val) },\n { test: (val) => isArray(val) && isEmpty(val) },\n ];\n\n const failedRule = find(rules, (rule) => rule.test(value));\n const isValid = !failedRule;\n const translatedMessage = await this.traslationService.translateAsync('validation.messages.required', {\n params: { title: options?.['title'] },\n });\n const message = failedRule ? options?.message ?? translatedMessage : null;\n\n return {\n rule: this.name,\n result: isValid,\n message: message,\n value,\n };\n }\n}\n","// ax-max-length-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXLengthValidationRuleOptions extends AXValidationRuleOptions {\n min: number;\n max: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n length: AXLengthValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'length';\n }\n\n async validate(value: string, options: AXLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = value?.length >= options.min && value?.length <= options.max;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? null : options?.message ?? `The value must be between ${options.min} and ${options.max} chars`,\n value: value,\n };\n }\n}\n","// ax-max-length-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXMaxLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n maxLength: AXMaxLengthValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXMaxLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'maxLength';\n }\n\n async validate(value: string, options: AXMaxLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : value?.length <= options.value;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must not exceed ${options.value} characters.`,\n value: value,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXMinLengthValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n minLength: AXMinLengthValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXMinLengthValidationRule implements AXValidationRule {\n get name(): string {\n return 'minLength';\n }\n\n async validate(value: string, options: AXMinLengthValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isEmpty(value) ? true : value?.length >= options.value;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? `The value must be at least ${options.value} characters long.`,\n value: value,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXBetweenValidationRuleOptions<T = number | Date> extends AXValidationRuleOptions {\n lowerValue: T;\n upperValue: T;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n between: AXBetweenValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXBetweenValidationRule<T = number | Date> implements AXValidationRule {\n get name(): string {\n return 'between';\n }\n\n async validate(value: T, options: AXBetweenValidationRuleOptions<T>): Promise<AXValidationRuleResult> {\n let isValid;\n if (options.inclusive) {\n isValid = value >= options.lowerValue && value <= options.upperValue;\n } else {\n isValid = value > options.lowerValue && value < options.upperValue;\n }\n\n const rangeType = options.inclusive ? 'inclusive' : 'exclusive';\n const baseMessage = `The value must be within the ${rangeType} range of ${options.lowerValue} to ${options.upperValue}.`;\n\n return {\n rule: this.name,\n result: isValid || isEmpty(value),\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value,\n };\n }\n}\n","// ax-equal-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isEqual } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXEqualValidationRuleOptions extends AXValidationRuleOptions {\n value: any;\n not?: boolean; // Optional flag to invert the validation logic\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n equal: AXEqualValidationRuleOptions;\n }\n}\n@Injectable()\nexport class AXEqualValidationRule implements AXValidationRule {\n get name(): string {\n return 'equal';\n }\n\n async validate(value: any, options: AXEqualValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValueEqual = isEqual(value, options.value);\n const isValid = options.not ? !isValueEqual : isValueEqual;\n\n const defaultMessage = `The value must ${options.not ? 'not ' : ''}be equal to ${options.value}.`;\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? defaultMessage,\n value: value,\n };\n }\n}\n","// ax-greater-than-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isNull, isUndefined } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXGreaterThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n greaterThan: AXGreaterThanValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXGreaterThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'greaterThan';\n }\n\n async validate(value: number, options: AXGreaterThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isNull(value) || isUndefined(value) ? true : options.inclusive ? value >= options.value : value > options.value;\n const baseMessage = `The value must be ${options.inclusive ? 'greater than or equal to' : 'greater than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value,\n };\n }\n}\n","// ax-less-than-validation-rule.ts\nimport { Injectable } from '@angular/core';\nimport { isNull, isUndefined } from 'lodash-es';\nimport { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';\n\nexport interface AXLessThanValidationRuleOptions extends AXValidationRuleOptions {\n value: number;\n inclusive?: boolean; // Optional flag for inclusiveness\n}\n\ndeclare module '../validation.types' {\n interface AXValidationRuleOptionsMap {\n lessThan: AXLessThanValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXLessThanValidationRule implements AXValidationRule {\n get name(): string {\n return 'lessThan';\n }\n\n async validate(value: number, options: AXLessThanValidationRuleOptions): Promise<AXValidationRuleResult> {\n const isValid = isNull(value) || isUndefined(value) ? true : options.inclusive ? value <= options.value : value < options.value;\n const baseMessage = `The value must be ${options.inclusive ? 'less than or equal to' : 'less than'} ${options.value}.`;\n\n return {\n rule: this.name,\n result: isValid,\n message: isValid ? '' : options?.message ?? baseMessage,\n value: value,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXValidationRuleOptions, AXValidationRuleOptionsMap } from './validation.types';\n\nexport type AXValidationConfigRules = {\n [key: string]: {\n rule: keyof AXValidationRuleOptionsMap;\n options: AXValidationRuleOptions;\n };\n};\n\nexport interface AXValidationConfig {\n rules: AXValidationConfigRules;\n}\n\nexport const AX_VALIDATION_CONFIG = new InjectionToken<AXValidationConfig>('AX_VALIDATION_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXValidationDefaultConfig;\n },\n});\n\nexport const AXValidationDefaultConfig: AXValidationConfig = {\n rules: {\n email: {\n rule: 'regex',\n options: {\n pattern:\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n message: 'validation.messages.email',\n },\n },\n phone: {\n rule: 'regex',\n options: {\n pattern: /^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$/,\n message: 'validation.messages.phone',\n },\n },\n },\n};\n\nexport type AXPartialValidationConfig = Partial<AXValidationConfig>;\n\nexport function validationConfig(config: AXPartialValidationConfig = {}): AXValidationConfig {\n const result = {\n ...AXValidationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, Injector, inject } from '@angular/core';\nimport { merge } from 'lodash-es';\nimport { AXValidationConfigRules, AX_VALIDATION_CONFIG } from './validation.config';\nimport {\n AXValidationRule,\n AXValidationRuleOptions,\n AXValidationRuleOptionsMap,\n AXValidationRuleResult,\n AXValidationSummary,\n} from './validation.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXValidationRegistryService {\n private plugins: AXValidationRule[] = [];\n\n private configs = inject(AX_VALIDATION_CONFIG);\n\n public get customRules(): AXValidationConfigRules {\n return this.configs.rules;\n }\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXValidationRule)[]) {\n plugins.forEach((t) => {\n const childInjector = Injector.create({\n providers: [{ provide: t, useClass: t, deps: [] }],\n parent: this.injector,\n });\n const v = childInjector.get(t);\n\n if (v && !this.plugins.some((p) => p.name == v.name)) {\n this.plugins.push(v);\n }\n });\n }\n\n get(ruleName: string): AXValidationRule | undefined {\n return this.plugins.find((c) => c.name == ruleName);\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXValidationService {\n constructor(\n private pluginRegistry: AXValidationRegistryService,\n private translationService: AXTranslationService,\n ) {}\n\n async validate(ruleName: string, value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult> {\n const customRule = this.pluginRegistry.customRules[ruleName];\n const validator = this.pluginRegistry.get(ruleName);\n\n if (!validator && !customRule) {\n return {\n rule: ruleName,\n result: false,\n message: await this.translationService.translateAsync('validation.messages.invalid-rull-name', { params: { name: ruleName } }),\n value,\n };\n }\n\n if (options?.message) {\n options.message = await this.translationService.translateAsync(options.message);\n }\n //\n if (validator) return validator.validate(value, options);\n else {\n return this.validate(customRule.rule, value, merge(options, customRule.options));\n }\n }\n\n ruleFor(value: unknown): AXValidationRuleChain {\n return new AXValidationRuleChain(this, value);\n }\n}\n\nclass AXValidationRuleChain {\n private rules: { name: string; options?: AXValidationRuleOptions }[] = [];\n private validationSummary: AXValidationSummary = { result: true, rules: [] };\n\n constructor(\n private validationService: AXValidationService,\n private initialValue: unknown,\n ) {}\n\n addRule<K extends keyof AXValidationRuleOptionsMap>(name: K, options?: AXValidationRuleOptionsMap[K]): AXValidationRuleChain {\n this.rules.push({ name, options });\n return this;\n }\n\n async validate(): Promise<AXValidationSummary> {\n for (const rule of this.rules) {\n const result = await this.validationService.validate(rule.name, this.initialValue, rule.options);\n this.validationSummary.rules.push(result);\n if (!result.result) {\n this.validationSummary.result = false;\n }\n }\n return this.validationSummary;\n }\n}\n","import { Inject, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AXBetweenValidationRule } from './rules/between-rule';\nimport { AXCallbackValidationRule } from './rules/callback-rule';\nimport { AXEqualValidationRule } from './rules/equal-rule';\nimport { AXGreaterThanValidationRule } from './rules/greater-than';\nimport { AXLengthValidationRule } from './rules/length-rule';\nimport { AXLessThanValidationRule } from './rules/less-than-rule';\nimport { AXMaxLengthValidationRule } from './rules/maxlength-rule';\nimport { AXMinLengthValidationRule } from './rules/minlength-rule';\nimport { AXRegexValidationRule } from './rules/regex-rule';\nimport { AXRequiredValidationRule } from './rules/required-rule';\nimport { AXValidationRegistryService } from './validation.service';\nimport { AXValidationRule } from './validation.types';\n\nconst BUILT_IN_RULES = [\n AXRequiredValidationRule,\n AXRegexValidationRule,\n AXRequiredValidationRule,\n AXCallbackValidationRule,\n //\n AXMinLengthValidationRule,\n AXMaxLengthValidationRule,\n AXLengthValidationRule,\n //\n AXEqualValidationRule,\n AXLessThanValidationRule,\n AXGreaterThanValidationRule,\n AXBetweenValidationRule,\n];\n\nexport interface AXValidationModuleConfigs {\n rules: (new () => AXValidationRule)[];\n}\n\n@NgModule({\n imports: [],\n providers: [...BUILT_IN_RULES],\n})\nexport class AXValidationModule {\n static forRoot(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule> {\n return {\n ngModule: AXValidationModule,\n providers: [\n ...(configs?.rules || []),\n {\n provide: 'AXValidationModuleFactory',\n useFactory: (pluginRegistry: AXValidationRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.rules || [])]);\n },\n deps: [AXValidationRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Inject('AXValidationModuleFactory') instances: any[]) {\n instances.forEach((f) => {\n f();\n });\n }\n}\n","export interface AXValidationRuleOptions {\n message?: string;\n [key: string]: unknown;\n}\n\nexport interface AXValidationRuleOptionsMap {\n // initially empty, but will be extended by other modules\n}\n\nexport abstract class AXValidationRule {\n abstract get name(): string;\n abstract validate(value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult>;\n}\n\nexport interface AXValidationRuleResult {\n rule: string;\n value?: unknown;\n message?: string | null;\n result: boolean;\n [key: string]: unknown;\n}\n\nexport interface AXValidationSummary {\n result: boolean;\n rules: AXValidationRuleResult[];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAsBa,wBAAwB,CAAA;AACnC,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,UAAU;;AAGnB,IAAA,MAAM,QAAQ,CAAC,KAAQ,EAAE,OAA2C,EAAA;AAClE,QAAA,MAAM,gBAAgB,GAAG,OAAO,EAAE;cAC9B,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,OAAO;AAClC,cAAE;AACE,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,OAAO,EAAE,2BAA2B;aACrC;AACL,QAAA,MAAM,YAAY,GAAG,CAAC,MAA6C,MAAM;YACvE,IAAI,E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;MCnE3B,gBAAgB,CAAA;AAGrC;;ACZD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/core",
|
3
|
-
"version": "18.12.
|
3
|
+
"version": "18.12.22",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": ">=18.2.0",
|
6
6
|
"@angular/core": ">=18.2.0",
|
@@ -32,23 +32,17 @@
|
|
32
32
|
"esm": "./esm2022/common/acorex-core-common.mjs",
|
33
33
|
"default": "./fesm2022/acorex-core-common.mjs"
|
34
34
|
},
|
35
|
-
"./file": {
|
36
|
-
"types": "./file/index.d.ts",
|
37
|
-
"esm2022": "./esm2022/file/acorex-core-file.mjs",
|
38
|
-
"esm": "./esm2022/file/acorex-core-file.mjs",
|
39
|
-
"default": "./fesm2022/acorex-core-file.mjs"
|
40
|
-
},
|
41
35
|
"./events": {
|
42
36
|
"types": "./events/index.d.ts",
|
43
37
|
"esm2022": "./esm2022/events/acorex-core-events.mjs",
|
44
38
|
"esm": "./esm2022/events/acorex-core-events.mjs",
|
45
39
|
"default": "./fesm2022/acorex-core-events.mjs"
|
46
40
|
},
|
47
|
-
"./
|
48
|
-
"types": "./
|
49
|
-
"esm2022": "./esm2022/
|
50
|
-
"esm": "./esm2022/
|
51
|
-
"default": "./fesm2022/acorex-core-
|
41
|
+
"./file": {
|
42
|
+
"types": "./file/index.d.ts",
|
43
|
+
"esm2022": "./esm2022/file/acorex-core-file.mjs",
|
44
|
+
"esm": "./esm2022/file/acorex-core-file.mjs",
|
45
|
+
"default": "./fesm2022/acorex-core-file.mjs"
|
52
46
|
},
|
53
47
|
"./format": {
|
54
48
|
"types": "./format/index.d.ts",
|
@@ -56,6 +50,12 @@
|
|
56
50
|
"esm": "./esm2022/format/acorex-core-format.mjs",
|
57
51
|
"default": "./fesm2022/acorex-core-format.mjs"
|
58
52
|
},
|
53
|
+
"./config": {
|
54
|
+
"types": "./config/index.d.ts",
|
55
|
+
"esm2022": "./esm2022/config/acorex-core-config.mjs",
|
56
|
+
"esm": "./esm2022/config/acorex-core-config.mjs",
|
57
|
+
"default": "./fesm2022/acorex-core-config.mjs"
|
58
|
+
},
|
59
59
|
"./date-time": {
|
60
60
|
"types": "./date-time/index.d.ts",
|
61
61
|
"esm2022": "./esm2022/date-time/acorex-core-date-time.mjs",
|