UNPKG

@versatiledatakit/shared

Version:

Versatile Data Kit Shared library enables reusability of shared features like: NgRx Redux, Error Handlers, Utils, Generic Components, etc.

1 lines • 840 kB
{"version":3,"file":"versatiledatakit-shared.mjs","sources":["../../../projects/shared/src/lib/utils/collections/collections-util.ts","../../../projects/shared/src/lib/utils/collections/index.ts","../../../projects/shared/src/lib/utils/model/index.ts","../../../projects/shared/src/lib/utils/url/url.util.ts","../../../projects/shared/src/lib/utils/url/index.ts","../../../projects/shared/src/lib/utils/public-api.ts","../../../projects/shared/src/lib/common/criteria/primitive/primitive.criteria.ts","../../../projects/shared/src/lib/common/criteria/primitive/index.ts","../../../projects/shared/src/lib/common/criteria/compound/and.criteria.ts","../../../projects/shared/src/lib/common/criteria/compound/or.criteria.ts","../../../projects/shared/src/lib/common/criteria/compound/index.ts","../../../projects/shared/src/lib/common/criteria/public-api.ts","../../../projects/shared/src/lib/utils/index.ts","../../../projects/shared/src/lib/common/error/utils/error-store.utils.ts","../../../projects/shared/src/lib/common/error/utils/index.ts","../../../projects/shared/src/lib/common/error/api-error/model/interfaces/index.ts","../../../projects/shared/src/lib/common/error/ui-error/model/interfaces/index.ts","../../../projects/shared/src/lib/common/error/store/model/interfaces/index.ts","../../../projects/shared/src/lib/common/error/index.ts","../../../projects/shared/src/lib/common/error/public-api.ts","../../../projects/shared/src/lib/common/http/request/request.model.ts","../../../projects/shared/src/lib/common/http/request/index.ts","../../../projects/shared/src/lib/common/http/index.ts","../../../projects/shared/src/lib/common/http/public-api.ts","../../../projects/shared/src/lib/common/interfaces/index.ts","../../../projects/shared/src/lib/common/interfaces/public-api.ts","../../../projects/shared/src/lib/common/object/model/taurus-object.model.ts","../../../projects/shared/src/lib/common/object/model/index.ts","../../../projects/shared/src/lib/common/object/index.ts","../../../projects/shared/src/lib/common/object/public-api.ts","../../../projects/shared/src/lib/common/predicate/comparable/comparable.impl.ts","../../../projects/shared/src/lib/common/predicate/comparable/predicates-comparable.impl.ts","../../../projects/shared/src/lib/common/predicate/comparable/index.ts","../../../projects/shared/src/lib/common/predicate/compound/base-compound.predicate.ts","../../../projects/shared/src/lib/common/predicate/compound/and.predicate.ts","../../../projects/shared/src/lib/common/predicate/compound/or.predicate.ts","../../../projects/shared/src/lib/common/predicate/compound/index.ts","../../../projects/shared/src/lib/common/predicate/simple/base-simple.predicate.ts","../../../projects/shared/src/lib/common/predicate/simple/equal.predicate.ts","../../../projects/shared/src/lib/common/predicate/simple/index.ts","../../../projects/shared/src/lib/common/predicate/index.ts","../../../projects/shared/src/lib/common/predicate/public-api.ts","../../../projects/shared/src/lib/common/route/index.ts","../../../projects/shared/src/lib/common/route/public-api.ts","../../../projects/shared/src/lib/common/service/model/taurus-base-api-service.model.ts","../../../projects/shared/src/lib/common/service/model/index.ts","../../../projects/shared/src/lib/common/service/index.ts","../../../projects/shared/src/lib/common/service/public-api.ts","../../../projects/shared/src/lib/common/tasks/task.model.ts","../../../projects/shared/src/lib/common/tasks/index.ts","../../../projects/shared/src/lib/common/tasks/public-api.ts","../../../projects/shared/src/lib/common/public-api.ts","../../../projects/shared/src/lib/common/criteria/index.ts","../../../projects/shared/src/lib/common/index.ts","../../../projects/shared/src/lib/core/error/utils/error.utils.ts","../../../projects/shared/src/lib/core/error/utils/index.ts","../../../projects/shared/src/lib/core/error/store/model/error-store.impl.ts","../../../projects/shared/src/lib/core/error/store/model/index.ts","../../../projects/shared/src/lib/core/error/index.ts","../../../projects/shared/src/lib/core/component/components/error-base/taurus-error-base.component.ts","../../../projects/shared/src/lib/core/component/components/error-base/index.ts","../../../projects/shared/src/lib/core/component/components/redux-base/interfaces/index.ts","../../../projects/shared/src/lib/core/router/model/route.model.ts","../../../projects/shared/src/lib/core/router/model/index.ts","../../../projects/shared/src/lib/core/router/factory/route-state.factory.ts","../../../projects/shared/src/lib/core/router/factory/index.ts","../../../projects/shared/src/lib/core/component/model/state/component-status.model.ts","../../../projects/shared/src/lib/core/component/model/state/component-state.model.ts","../../../projects/shared/src/lib/core/component/model/state/components-state.model.ts","../../../projects/shared/src/lib/core/component/model/state/index.ts","../../../projects/shared/src/lib/core/component/model/component.model.interface.ts","../../../projects/shared/src/lib/core/component/model/component-model.comparable.ts","../../../projects/shared/src/lib/core/component/model/component.model.ts","../../../projects/shared/src/lib/core/component/model/index.ts","../../../projects/shared/src/lib/core/ngrx/actions/base.actions.ts","../../../projects/shared/src/lib/core/ngrx/actions/index.ts","../../../projects/shared/src/lib/core/router/state/actions/router.actions.ts","../../../projects/shared/src/lib/core/router/state/actions/index.ts","../../../projects/shared/src/lib/core/router/state/effects/router.effects.ts","../../../projects/shared/src/lib/core/router/state/effects/index.ts","../../../projects/shared/src/lib/core/ngrx/effects/root-effects.registry.ts","../../../projects/shared/src/lib/core/ngrx/effects/index.ts","../../../projects/shared/src/lib/core/ngrx/state/store-state.model.ts","../../../projects/shared/src/lib/core/ngrx/state/index.ts","../../../projects/shared/src/lib/core/ngrx/index.ts","../../../projects/shared/src/lib/core/component/state/actions/component.actions.ts","../../../projects/shared/src/lib/core/component/state/actions/index.ts","../../../projects/shared/src/lib/core/router/services/router.service.ts","../../../projects/shared/src/lib/core/router/services/index.ts","../../../projects/shared/src/lib/core/router/index.ts","../../../projects/shared/src/lib/core/component/state/reducers/component.reducer.ts","../../../projects/shared/src/lib/core/component/state/reducers/index.ts","../../../projects/shared/src/lib/core/component/state/operators/component-rx.operators.ts","../../../projects/shared/src/lib/core/component/state/operators/index.ts","../../../projects/shared/src/lib/core/component/state/index.ts","../../../projects/shared/src/lib/core/component/services/component.service.ts","../../../projects/shared/src/lib/core/component/services/index.ts","../../../projects/shared/src/lib/core/system-events/event/models/event.codes.ts","../../../projects/shared/src/lib/core/system-events/event/models/event-filter.expression.ts","../../../projects/shared/src/lib/core/system-events/event/models/event.comparable.ts","../../../projects/shared/src/lib/core/system-events/event/models/index.ts","../../../projects/shared/src/lib/core/system-events/event/index.ts","../../../projects/shared/src/lib/core/system-events/dispatcher/registry/event-handler.registry.ts","../../../projects/shared/src/lib/core/system-events/dispatcher/registry/index.ts","../../../projects/shared/src/lib/core/system-events/decorator/models/event-decorator-helper.ts","../../../projects/shared/src/lib/core/system-events/decorator/models/index.ts","../../../projects/shared/src/lib/core/system-events/decorator/event-handler-class.decorator.ts","../../../projects/shared/src/lib/core/system-events/decorator/event-handler.decorator.ts","../../../projects/shared/src/lib/core/system-events/decorator/index.ts","../../../projects/shared/src/lib/core/system-events/dispatcher/event.dispatcher.ts","../../../projects/shared/src/lib/core/system-events/dispatcher/index.ts","../../../projects/shared/src/lib/core/system-events/index.ts","../../../projects/shared/src/lib/core/navigation/services/navigation.service.ts","../../../projects/shared/src/lib/core/navigation/services/index.ts","../../../projects/shared/src/lib/core/navigation/index.ts","../../../projects/shared/src/lib/core/component/components/redux-base/taurus-base.component.ts","../../../projects/shared/src/lib/core/component/components/redux-base/index.ts","../../../projects/shared/src/lib/core/component/components/index.ts","../../../projects/shared/src/lib/core/component/index.ts","../../../projects/shared/src/lib/core/component/public-api.ts","../../../projects/shared/src/lib/core/error/public-api.ts","../../../projects/shared/src/lib/core/navigation/public-api.ts","../../../projects/shared/src/lib/core/ngrx/effects/model/taurus-base.effects.ts","../../../projects/shared/src/lib/core/ngrx/effects/model/index.ts","../../../projects/shared/src/lib/core/ngrx/public-api.ts","../../../projects/shared/src/lib/core/router/public-api.ts","../../../projects/shared/src/lib/core/system-events/public-api.ts","../../../projects/shared/src/lib/core/url-state-manager/url-state.manager.ts","../../../projects/shared/src/lib/core/url-state-manager/index.ts","../../../projects/shared/src/lib/core/url-state-manager/public-api.ts","../../../projects/shared/src/lib/core/vdk-shared-core.module.ts","../../../projects/shared/src/lib/core/router/integration/ngrx/router-serializer.service.ts","../../../projects/shared/src/lib/core/router/integration/ngrx/index.ts","../../../projects/shared/src/lib/core/router/state/reducers/router.reducer.ts","../../../projects/shared/src/lib/core/router/state/reducers/index.ts","../../../projects/shared/src/lib/core/ngrx/reducers/shared-root-reducers.registry.ts","../../../projects/shared/src/lib/core/ngrx/reducers/index.ts","../../../projects/shared/src/lib/core/ngrx/config/ngrx-config.model.ts","../../../projects/shared/src/lib/core/ngrx/config/index.ts","../../../projects/shared/src/lib/core/ngrx/helper-modules/vdk-shared-ngrx-dev.module.ts","../../../projects/shared/src/lib/core/ngrx/helper-modules/vdk-shared-ngrx-prod.module.ts","../../../projects/shared/src/lib/core/ngrx/helper-modules/index.ts","../../../projects/shared/src/lib/core/ngrx/vdk-shared-ngrx.module.ts","../../../projects/shared/src/lib/core/public-api.ts","../../../projects/shared/src/lib/features/_model/index.ts","../../../projects/shared/src/lib/features/_model/public-api.ts","../../../projects/shared/src/lib/features/confirmation/model/confirmation.model.ts","../../../projects/shared/src/lib/features/confirmation/components/container/confirmation-container.component.ts","../../../projects/shared/src/lib/features/confirmation/components/container/confirmation-container.component.html","../../../projects/shared/src/lib/features/confirmation/components/confirmation/confirmation.component.ts","../../../projects/shared/src/lib/features/confirmation/components/confirmation/confirmation.component.html","../../../projects/shared/src/lib/features/confirmation/components/index.ts","../../../projects/shared/src/lib/features/dynamic-components/components/dynamic-container/dynamic-container.component.ts","../../../projects/shared/src/lib/features/dynamic-components/components/dynamic-container/dynamic-container.component.html","../../../projects/shared/src/lib/features/dynamic-components/components/dynamic-context/dynamic-context.component.ts","../../../projects/shared/src/lib/features/dynamic-components/components/dynamic-context/dynamic-context.component.html","../../../projects/shared/src/lib/features/dynamic-components/components/index.ts","../../../projects/shared/src/lib/features/dynamic-components/services/dynamic-components.service.ts","../../../projects/shared/src/lib/features/dynamic-components/services/index.ts","../../../projects/shared/src/lib/features/dynamic-components/index.ts","../../../projects/shared/src/lib/features/confirmation/services/confirmation.service.ts","../../../projects/shared/src/lib/features/confirmation/services/index.ts","../../../projects/shared/src/lib/features/confirmation/confirmation.module.ts","../../../projects/shared/src/lib/features/confirmation/public-api.ts","../../../projects/shared/src/lib/features/directives/directives.module.ts","../../../projects/shared/src/lib/features/directives/public-api.ts","../../../projects/shared/src/lib/features/dynamic-components/dynamic-components.module.ts","../../../projects/shared/src/lib/features/dynamic-components/public-api.ts","../../../projects/shared/src/lib/commons/ngx-components/copy-to-clipboard-button/copy-to-clipboard-button.l10n.ts","../../../projects/shared/src/lib/commons/ngx-utils/simple-translate-service/simple-translate.service.ts","../../../projects/shared/src/lib/commons/ngx-utils/simple-translate-service/simple-translate.pipe.ts","../../../projects/shared/src/lib/commons/ngx-utils/simple-translate-service/simple-translate.module.ts","../../../projects/shared/src/lib/commons/ngx-utils/simple-translate-service/index.ts","../../../projects/shared/src/lib/commons/ngx-utils/index.ts","../../../projects/shared/src/lib/commons/ngx-components/copy-to-clipboard-button/copy-to-clipboard-button.component.ts","../../../projects/shared/src/lib/commons/ngx-components/copy-to-clipboard-button/copy-to-clipboard-button.component.html","../../../projects/shared/src/lib/commons/ngx-components/copy-to-clipboard-button/index.ts","../../../projects/shared/src/lib/commons/ngx-components/form-section/form-section.component.ts","../../../projects/shared/src/lib/commons/ngx-components/form-section/form-section.component.html","../../../projects/shared/src/lib/commons/ngx-components/form-section/index.ts","../../../projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.ts","../../../projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.html","../../../projects/shared/src/lib/commons/ngx-components/form-section-container/index.ts","../../../projects/shared/src/lib/commons/ngx-components/empty-state-placeholder/empty-state-placeholder.component.ts","../../../projects/shared/src/lib/commons/ngx-components/empty-state-placeholder/empty-state-placeholder.component.html","../../../projects/shared/src/lib/commons/ngx-components/empty-state-placeholder/empty-state-placeholder.module.ts","../../../projects/shared/src/lib/commons/ngx-components/empty-state-placeholder/index.ts","../../../projects/shared/src/lib/commons/ngx-components/toast/toast.model.ts","../../../projects/shared/src/lib/commons/ngx-components/toast/toast.l10n.ts","../../../projects/shared/src/lib/commons/ngx-components/animation-constants.ts","../../../projects/shared/src/lib/commons/ngx-components/toast/toast.component.ts","../../../projects/shared/src/lib/commons/ngx-components/toast/toast.component.html","../../../projects/shared/src/lib/commons/ngx-components/toast/toast-container.component.ts","../../../projects/shared/src/lib/commons/ngx-components/toast/toast-container.component.html","../../../projects/shared/src/lib/commons/ngx-components/toast/index.ts","../../../projects/shared/src/lib/commons/ngx-components/search/search.component.ts","../../../projects/shared/src/lib/commons/ngx-components/search/search.component.html","../../../projects/shared/src/lib/commons/ngx-components/search/search.module.ts","../../../projects/shared/src/lib/commons/ngx-components/search/index.ts","../../../projects/shared/src/lib/commons/ngx-components/vdk-ngx-components.module.ts","../../../projects/shared/src/lib/commons/ngx-components/index.ts","../../../projects/shared/src/lib/commons/index.ts","../../../projects/shared/src/lib/features/toasts/service/toast.service.ts","../../../projects/shared/src/lib/features/toasts/service/index.ts","../../../projects/shared/src/lib/features/error-handler/services/error-handler.service.ts","../../../projects/shared/src/lib/features/error-handler/services/index.ts","../../../projects/shared/src/lib/features/error-handler/public-api.ts","../../../projects/shared/src/lib/features/pipes/pipes.module.ts","../../../projects/shared/src/lib/features/pipes/public-api.ts","../../../projects/shared/src/lib/features/placeholder/components/empty-state/empty-state.component.ts","../../../projects/shared/src/lib/features/placeholder/components/empty-state/empty-state.component.html","../../../projects/shared/src/lib/features/placeholder/components/empty-state/index.ts","../../../projects/shared/src/lib/core/index.ts","../../../projects/shared/src/lib/features/_token/features.token.ts","../../../projects/shared/src/lib/features/_token/index.ts","../../../projects/shared/src/lib/features/placeholder/services/placeholder.service.ts","../../../projects/shared/src/lib/features/placeholder/services/index.ts","../../../projects/shared/src/lib/features/placeholder/components/placeholder.component.ts","../../../projects/shared/src/lib/features/placeholder/components/placeholder.component.html","../../../projects/shared/src/lib/features/placeholder/components/index.ts","../../../projects/shared/src/lib/features/placeholder/placeholder.module.ts","../../../projects/shared/src/lib/features/placeholder/public-api.ts","../../../projects/shared/src/lib/features/toasts/widget/toasts.component.ts","../../../projects/shared/src/lib/features/toasts/widget/toasts.component.html","../../../projects/shared/src/lib/features/toasts/widget/index.ts","../../../projects/shared/src/lib/features/toasts/toasts.module.ts","../../../projects/shared/src/lib/features/toasts/public-api.ts","../../../projects/shared/src/lib/features/confirmation/index.ts","../../../projects/shared/src/lib/features/url-opener/services/url-opener.service.ts","../../../projects/shared/src/lib/features/url-opener/services/index.ts","../../../projects/shared/src/lib/features/url-opener/url-opener.module.ts","../../../projects/shared/src/lib/features/url-opener/public-api.ts","../../../projects/shared/src/lib/features/warning/components/warning/warning.component.ts","../../../projects/shared/src/lib/features/warning/components/warning/warning.component.html","../../../projects/shared/src/lib/features/warning/components/warning/index.ts","../../../projects/shared/src/lib/features/warning/components/index.ts","../../../projects/shared/src/lib/features/warning/warning.module.ts","../../../projects/shared/src/lib/features/warning/public-api.ts","../../../projects/shared/src/lib/features/url-opener/index.ts","../../../projects/shared/src/lib/features/vdk-shared-features.module.ts","../../../projects/shared/src/lib/features/public-api.ts","../../../projects/shared/src/lib/commons/public-api.ts","../../../projects/shared/src/lib/unit-testing/utils/unit-test-utils.ts","../../../projects/shared/src/lib/unit-testing/utils/router-utils.ts","../../../projects/shared/src/lib/unit-testing/utils/error-code-generator-utils.ts","../../../projects/shared/src/lib/unit-testing/utils/index.ts","../../../projects/shared/src/lib/unit-testing/index.ts","../../../projects/shared/src/lib/unit-testing/public-api.ts","../../../projects/shared/src/public-api.ts","../../../projects/shared/src/versatiledatakit-shared.ts"],"sourcesContent":["/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { cloneDeep, isEqual } from 'lodash';\n\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { Replacer } from '../../common';\n\nimport { Collections, IteratorFnResult, LiteralObjectOrNull, Nil, ObjectIterator, Primitives, PrimitivesDate, Subtract } from '../model';\n\n/**\n * ** Utility Class for Collections.\n */\nexport class CollectionsUtil {\n /**\n * ** Check if value is of type undefined.\n */\n static isUndefined(value: any): value is undefined {\n return typeof value === 'undefined';\n }\n\n /**\n * ** Check if value has value null.\n */\n static isNull(value: any): value is null {\n return value === null;\n }\n\n /**\n * ** Check if value is undefined or null.\n */\n static isNil(value: any): value is Nil {\n return CollectionsUtil.isNull(value) || CollectionsUtil.isUndefined(value);\n }\n\n /**\n * ** Check if value is defined (opposite of isNil).\n *\n * - Not null.\n * - Not undefined.\n */\n static isDefined<T>(value: T): boolean {\n return !CollectionsUtil.isNull(value) && !CollectionsUtil.isUndefined(value);\n }\n\n /**\n * ** Check if value T is of type Number.\n */\n static isNumber<T extends number>(num: T | any): num is number {\n return typeof num === 'number';\n }\n\n /**\n * ** Check if value T is of type String.\n */\n static isString<T extends string>(str: T | any): str is string {\n return typeof str === 'string';\n }\n\n /**\n * ** Check if value T is of type Boolean.\n */\n static isBoolean<T extends boolean>(bool: T | any): bool is boolean {\n return typeof bool === 'boolean';\n }\n\n /**\n * ** Check if value is Primitive.\n *\n * - String, Number, Boolean, null or undefined.\n */\n static isPrimitive(value: any): value is Primitives | Nil {\n return (\n CollectionsUtil.isString(value) ||\n CollectionsUtil.isBoolean(value) ||\n CollectionsUtil.isNumber(value) ||\n CollectionsUtil.isUndefined(value)\n );\n }\n\n /**\n * ** Check if value is NaN.\n */\n static isNaN<T extends number>(value: T | any): boolean {\n return Number.isNaN(value);\n }\n\n /**\n * ** Check if value is of type Date.\n */\n static isDate(value: any): value is Date {\n return value instanceof Date;\n }\n\n /**\n * ** Check if value is Primitive or Date.\n *\n * - String, Number, Boolean, null, undefined or Date.\n */\n static isPrimitiveOrDate<T extends PrimitivesDate>(value: T | any): value is Primitives | Nil | Date {\n return CollectionsUtil.isPrimitive(value) || CollectionsUtil.isDate(value);\n }\n\n /**\n * ** Check if value T is a reference that points to function (Class/Method).\n */\n // eslint-disable-next-line\n static isFunction<T extends (...args: any[]) => any>(value: T | any): value is (...args: any[]) => any {\n return typeof value === 'function';\n }\n\n /**\n * ** Check if value T is of type Object.\n */\n static isObject<T extends Record<string, unknown>>(obj: T | any): obj is Record<string, unknown> {\n return typeof obj === 'object';\n }\n\n /**\n * ** Check if value T is instance of Array.\n */\n static isArray<T>(arr: T | any): arr is T extends any[] ? T : any[] {\n return arr instanceof Array;\n }\n\n /**\n * ** Check if value T is not instance of Array or there are no elements in Array.\n */\n static isArrayEmpty<T>(arr: T | any): boolean {\n return !CollectionsUtil.isArray(arr) || arr.length === 0;\n }\n\n /**\n * ** Returns new Array where items will be filtered by reference and will leave distinct values.\n */\n static uniqueArray<T extends any[]>(arr: T): T {\n return arr.filter((value, index, self) => {\n return self.indexOf(value) === index;\n }) as T;\n }\n\n /**\n * ** Check if value is Map.\n */\n static isMap(obj: Map<any, any> | any): obj is Map<any, any> {\n return obj instanceof Map;\n }\n\n /**\n * ** Check if value is WeakMap.\n */\n static isWeakMap(obj: WeakMap<any, any> | any): obj is WeakMap<any, any> {\n return obj instanceof WeakMap;\n }\n\n /**\n * ** Check if value is Set.\n */\n static isSet(obj: Set<any> | any): obj is Set<any> {\n return obj instanceof Set;\n }\n\n /**\n * ** Check if value T is of type String and has length bigger than 0 after whitespace trim.\n */\n static isStringWithContent<T extends string>(str: T | any): str is string {\n return CollectionsUtil.isString(str) && str.trim().length > 0;\n }\n\n /**\n * ** Check if value is Collection (literal Object, Array, Map, WeakMap or Set).\n */\n static isCollection(obj: Collections | any): obj is Collections {\n return (\n CollectionsUtil.isArray(obj) ||\n CollectionsUtil.isMap(obj) ||\n CollectionsUtil.isWeakMap(obj) ||\n CollectionsUtil.isSet(obj) ||\n CollectionsUtil.isLiteralObject(obj)\n );\n }\n\n /**\n * ** Check if value is of type Object and not null.\n */\n static isObjectNotNull<T extends Record<string, unknown>>(\n obj: T | any\n ): obj is Record<string, unknown> & Subtract<Record<string, unknown>, null> {\n return CollectionsUtil.isObject<T>(obj) && !CollectionsUtil.isNull(obj);\n }\n\n /**\n * ** Check if some variable is of type Boolean and is true.\n */\n static isBooleanAndTrue(bool: boolean | any): boolean {\n return CollectionsUtil.isBoolean(bool) && bool;\n }\n\n /**\n * ** Check if value is literal Object or null.\n *\n * - Not an Array, Map, WeakMap or Set.\n */\n static isLiteralObjectOrNull<T extends Record<string, unknown>>(obj: T | any): obj is LiteralObjectOrNull {\n return (\n CollectionsUtil.isObject(obj) &&\n !CollectionsUtil.isArray(obj) &&\n !CollectionsUtil.isMap(obj) &&\n !CollectionsUtil.isWeakMap(obj) &&\n !CollectionsUtil.isSet(obj)\n );\n }\n\n /**\n * ** Check if provided value is literal Object.\n *\n * - Not and Array, Map, WeakMap, Set or null.\n */\n static isLiteralObject<T extends Record<string, unknown>>(obj: T | any): boolean {\n return CollectionsUtil.isLiteralObjectOrNull(obj) && !CollectionsUtil.isNull(obj);\n }\n\n /**\n * ** Check if value is Object and has properties.\n */\n static isObjectWithProperties<T extends Record<string, unknown>>(obj: T | any): boolean {\n return CollectionsUtil.isObjectNotNull(obj) && Object.keys(obj).length > 0;\n }\n\n /**\n * ** Return current Date in ISO string format.\n */\n static dateISO(): string {\n return new Date().toISOString();\n }\n\n /**\n * ** Return current Date milliseconds from 1970.\n */\n static dateNow(): number {\n return Date.now();\n }\n\n /**\n * ** Performs deep comparison between two values to determine if the are equivalent.\n */\n static isEqual(value1: any, value2: any): boolean {\n return isEqual(value1, value2);\n }\n\n /**\n * ** Create recursive deep cloned value from provided one.\n */\n static cloneDeep<T>(value: T): T {\n return cloneDeep(value);\n }\n\n /**\n * ** Generate UUID that meats RFC4122 compliance.\n */\n static generateUUID(): string {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return uuidv4() as string;\n }\n\n /**\n * ** Generate Object UUID that meats RFC4122 compliance and also has Class name identifier inside.\n *\n * <br/>\n * <i>pattern</i>:\n * <p>\n * <Class Name><strong>_</strong><UUID RFC4122>\n * </p>\n */\n static generateObjectUUID(className: string): string {\n return `${className}_${CollectionsUtil.generateUUID()}`;\n }\n\n /**\n * ** Creates random string.\n */\n static generateRandomString(): string {\n return (Math.random() + 1).toString(36).substring(2);\n }\n\n /**\n * ** Iterates own enumerable properties in Object.\n *\n * - use Object.keys method for extraction, and executes provided iteratorFn.\n * - if iteratorFn returns false or -1 it will break iteration.\n * - all other return values continue until last property.\n *\n * - flag as third parameter is optional:\n * - Without flag or with flag and has value 'plainObject, method will iterate only through literal Objects.\n * - With flag and has value 'objectLookLike', method will try to iterate through everything\n * that passes type value === 'object' (literal Object, Array, Map, Set, WeakMap, etc..).\n */\n static iterateObject<T extends Record<string, unknown>>(\n obj: T,\n iteratorFn: ObjectIterator<T, IteratorFnResult>,\n flag: 'plainObject' | 'objectLookLike' = 'plainObject'\n ): T | null {\n if (!CollectionsUtil.isFunction(iteratorFn)) {\n return null;\n }\n\n if (flag === 'objectLookLike') {\n if (!CollectionsUtil.isObjectNotNull(obj)) {\n return null;\n }\n } else {\n if (!CollectionsUtil.isLiteralObject(obj)) {\n return null;\n }\n }\n\n const objectKeys = Object.keys(obj);\n for (const key of objectKeys) {\n const resultOfIteratorFn = iteratorFn(obj[key] as T[keyof T], key, obj);\n if (resultOfIteratorFn === false || resultOfIteratorFn === -1) {\n break;\n }\n }\n\n return obj;\n }\n\n /**\n * ** Check if value is Literal Object and has properties.\n */\n static isLiteralObjectWithProperties<T extends Record<string, unknown>>(obj: T | unknown): boolean {\n return CollectionsUtil.isLiteralObject<T>(obj) && Object.keys(obj).length > 0;\n }\n\n /**\n * ** Iterates over object properties and return Array of its values.\n */\n static objectValues<T extends Record<string, any>>(obj: T | null | undefined): Array<T[keyof T]> {\n const _result: Array<T[keyof T]> = [];\n\n CollectionsUtil.iterateObject(obj, (value) => {\n _result.push(value);\n });\n\n return _result;\n }\n\n /**\n * ** Transform given Map to Object.\n */\n static transformMapToObject<T extends Map<string, unknown>>(map: T): { [key: string]: unknown } {\n const obj: { [key: string]: any } = {};\n\n map.forEach((value, key) => (obj[key] = value));\n\n return obj;\n }\n\n /**\n * ** Transform given Object to Map.\n */\n static transformObjectToMap<T extends { [key: string]: any }>(obj: T): Map<string, any> {\n const map = new Map<string, any>();\n\n CollectionsUtil.iterateObject(obj, (value, key) => {\n map.set(key, value);\n });\n\n return map;\n }\n\n /**\n * ** Iterates over object properties and return Array of its keys/values in pairs.\n * <p>\n * - Returns Array of subArrays that have 2 elements each, first element key and second element value.\n */\n static objectPairs<T extends Record<keyof T, T[keyof T]>>(obj: T | null | undefined): Array<[keyof T, T[keyof T]]> {\n if (!CollectionsUtil.isLiteralObject(obj)) {\n return [];\n }\n\n return Object.entries(obj) as Array<[keyof T, T[keyof T]]>;\n }\n\n /**\n * ** Return own property Descriptor from provided object/function.\n */\n static getObjectPropertyDescriptor<T extends Record<string, any>>(obj: T, key: string): PropertyDescriptor {\n if (!((CollectionsUtil.isFunction(obj) || CollectionsUtil.isObject(obj)) && CollectionsUtil.isString(key))) {\n return null;\n }\n\n return Object.getOwnPropertyDescriptor(obj, key);\n }\n\n /**\n * ** Iterates own enumerable properties (statics) of Function (Class).\n *\n * - use Object.getOwnPropertyDescriptors method for extraction, and executes provided iteratorFn.\n * - if iteratorFn returns false or -1 will break iteration.\n * - all other return values means continue until last property.\n */\n static iterateClassStatics<T extends Record<string, any>>(\n fn: T,\n iteratorFn: (descriptor: PropertyDescriptor, key: string, fn: T) => IteratorFnResult\n ) {\n if (!CollectionsUtil.isFunction(fn) || !CollectionsUtil.isFunction(iteratorFn)) {\n return null;\n }\n\n const descriptors = Object.getOwnPropertyDescriptors(fn);\n CollectionsUtil.iterateObject(descriptors, (descriptor: PropertyDescriptor, key) => iteratorFn(descriptor, key, fn));\n\n return fn;\n }\n\n /**\n * ** Check if two Maps are Equal.\n *\n * - They are equal if they have same references.\n * - They are equal if they have same keys and same values for compared keys.\n */\n static areMapsEqual(m1: Map<unknown, unknown>, m2: Map<unknown, unknown>): boolean {\n const evaluateDeepComparison = () => {\n for (const [key, val] of m1) {\n const compareVal = m2.get(key);\n\n if (CollectionsUtil.isMap(val)) {\n if (!CollectionsUtil.areMapsEqual(val, compareVal as Map<unknown, unknown>)) {\n return false;\n }\n\n continue;\n }\n\n if (!CollectionsUtil.isEqual(val, compareVal) || (CollectionsUtil.isUndefined(compareVal) && !m2.has(key))) {\n return false;\n }\n }\n\n return true;\n };\n\n return CollectionsUtil.isMap(m1) && CollectionsUtil.isMap(m2) && (m1 === m2 || (m1.size === m2.size && evaluateDeepComparison()));\n }\n\n /**\n * ** Interpolate string and replace while iterating through provided strings.\n *\n * - Replacers are strings that are replaced on every place where %s is found starting from index 0.\n */\n static interpolateString(target: string, ...replacers: string[]): string;\n /**\n * ** Interpolate text and replace while iterating through provided replacers.\n *\n * - Replacers are objects ofType {@link Replacer} that are iterates and consumes,\n * searchValue is matcher and replaceValue is value that is placed on match.\n */\n static interpolateString(target: string, ...replacers: Array<Replacer<string>>): string;\n /**\n * @inheritDoc\n */\n static interpolateString(target: string, ...replacers: string[] | Array<Replacer<string>>): string {\n let response = target;\n\n replacers.forEach((replacer: string | Replacer<string>) => {\n if (CollectionsUtil.isString(replacer)) {\n response = response.replace('%s', replacer);\n } else {\n response = response.replace(replacer.searchValue, replacer.replaceValue);\n }\n });\n\n return response;\n }\n}\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './collections-util';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './shorthand-types';\nexport * from './data-source';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const FORWARD_SLASH = '/';\n\nexport const TIE_SWAGGER_DOC_LOCATION = 'swagger-ui.html#';\n\nexport class UrlUtil {\n static normalizeEndpoint(endPoint: string): string {\n if (!endPoint) {\n return '';\n }\n\n if (endPoint.endsWith(FORWARD_SLASH)) {\n return endPoint;\n }\n\n return endPoint + FORWARD_SLASH;\n }\n\n static constructTieSwaggerUiEndpoint(endpointBasePath: string) {\n return UrlUtil.normalizeEndpoint(endpointBasePath) + TIE_SWAGGER_DOC_LOCATION;\n }\n}\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './url.util';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './collections';\nexport * from './model';\nexport { UrlUtil } from './url';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { get } from 'lodash';\n\nimport { Criteria } from '../../interfaces';\n\n/**\n * ** Primitive Criteria that check equals by reference or if primitive by value, using ===\n */\nexport class PrimitiveCriteria<T extends object> implements Criteria<T> {\n private _property: keyof T;\n private _assertionValue: T[keyof T];\n\n /**\n * ** Constructor.\n */\n constructor(property: keyof T, assertionValue: T[keyof T]) {\n this._property = property;\n this._assertionValue = assertionValue;\n }\n\n /**\n * @inheritDoc\n */\n meetCriteria(elements: T[]): T[] {\n return [...(elements ?? [])].filter((element) => {\n const value = get<T, keyof T>(element, this._property);\n\n return value === this._assertionValue;\n });\n }\n}\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './primitive.criteria';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Criteria } from '../../interfaces';\n\n/**\n * ** And criteria that filters elements in Array and remove those that does not meet all criterias.\n */\nexport class AndCriteria<T> implements Criteria<T> {\n /**\n * @inheritDoc\n */\n readonly criterias: Criteria<T>[];\n\n /**\n * ** Constructor.\n */\n constructor(...criterias: Criteria<T>[]) {\n this.criterias = criterias;\n }\n\n /**\n * @inheritDoc\n */\n meetCriteria(elements: T[]): T[] {\n let elementsMeetCriteria: T[] = [...elements];\n\n for (const criteria of this.criterias) {\n elementsMeetCriteria = criteria.meetCriteria(elementsMeetCriteria);\n\n if (elementsMeetCriteria.length === 0) {\n break;\n }\n }\n\n return elementsMeetCriteria;\n }\n}\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Criteria } from '../../interfaces';\n\n/**\n * ** Or criteria that filters elements in Array and remove those that does not meet at least one criterias.\n */\nexport class OrCriteria<T> implements Criteria<T> {\n /**\n * @inheritDoc\n */\n readonly criterias: Criteria<T>[];\n\n /**\n * ** Constructor.\n */\n constructor(...criterias: Criteria<T>[]) {\n this.criterias = criterias;\n }\n\n /**\n * @inheritDoc\n */\n meetCriteria(elements: T[]): T[] {\n return this.criterias.reduce((elementsMeetCriteria, criteria) => {\n const singleCriteriaMetElements = criteria.meetCriteria(elements);\n\n for (const element of singleCriteriaMetElements) {\n if (!elementsMeetCriteria.includes(element)) {\n elementsMeetCriteria.push(element);\n }\n }\n\n return elementsMeetCriteria;\n }, [] as T[]);\n }\n}\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './and.criteria';\nexport * from './or.criteria';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './primitive';\nexport * from './compound';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './model';\nexport * from './collections';\nexport * from './url';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { HttpStatusCode } from '@angular/common/http';\n\nimport { CollectionsUtil } from '../../../utils';\n\nimport { ServiceHttpErrorCodes } from '../ui-error/model/interfaces';\n\n/**\n * ** Generates Error code (token).\n *\n * - Code (token) starts with\n * - Class name,\n * - then followed by underscore and class PUBLIC_NAME,\n * - then followed by underscore and method name or underscore with some error specifics,\n * - then followed by underscore and additional details to avoid overlaps with other Class errors.\n * <b>(for http requests it should be HTTP Status Code)</b>\n *\n * <br/>\n * <i>returned value pattern</i>:\n * <p>\n * <Class Name><b>_</b><Class PUBLIC_NAME><b>_</b><Class method name><b>_</b><additional details, like HTTP Status Code>\n * </p>\n */\nexport const generateErrorCode = (className: string, classPublicName: string, methodName: string, additionalDetails: string): string => {\n let errorCode = '';\n\n if (CollectionsUtil.isString(className)) {\n errorCode += `${className}`;\n } else {\n errorCode += CollectionsUtil.generateRandomString();\n }\n\n if (CollectionsUtil.isString(classPublicName)) {\n errorCode += `_${classPublicName}`;\n }\n\n if (CollectionsUtil.isString(methodName)) {\n errorCode += `_${methodName}`;\n }\n\n if (CollectionsUtil.isString(additionalDetails)) {\n errorCode += `_${additionalDetails}`;\n } else {\n errorCode += '_';\n }\n\n return errorCode;\n};\n\n/**\n * ** Generates supported error codes for provided className, publicName and methodName.\n */\n/* eslint-disable @typescript-eslint/no-unsafe-argument,\n @typescript-eslint/no-unsafe-member-access,\n @typescript-eslint/no-explicit-any */\nexport const generateSupportedHttpErrorCodes = (className: string, publicName: string, method: string): ServiceHttpErrorCodes => {\n const errorCodes: ServiceHttpErrorCodes = {} as ServiceHttpErrorCodes;\n\n errorCodes.All = generateErrorCode(className, publicName, method, null);\n errorCodes.ClientErrors = generateErrorCode(className, publicName, method, '4\\\\d\\\\d');\n errorCodes.BadRequest = generateErrorCode(className, publicName, method, `${HttpStatusCode.BadRequest}`);\n errorCodes.Unauthorized = generateErrorCode(className, publicName, method, `${HttpStatusCode.Unauthorized}`);\n errorCodes.Forbidden = generateErrorCode(className, publicName, method, `${HttpStatusCode.Forbidden}`);\n errorCodes.NotFound = generateErrorCode(className, publicName, method, `${HttpStatusCode.NotFound}`);\n errorCodes.MethodNotAllowed = generateErrorCode(className, publicName, method, `${HttpStatusCode.MethodNotAllowed}`);\n errorCodes.Conflict = generateErrorCode(className, publicName, method, `${HttpStatusCode.Conflict}`);\n errorCodes.UnprocessableEntity = generateErrorCode(className, publicName, method, `${HttpStatusCode.UnprocessableEntity}`);\n errorCodes.ServerErrors = generateErrorCode(className, publicName, method, '5\\\\d\\\\d');\n errorCodes.InternalServerError = generateErrorCode(className, publicName, method, `${HttpStatusCode.InternalServerError}`);\n errorCodes.ServiceUnavailable = generateErrorCode(className, publicName, method, `${HttpStatusCode.ServiceUnavailable}`);\n errorCodes.Unknown = generateErrorCode(className, publicName, method, 'unknown');\n\n return errorCodes;\n};\n/* eslint-enable @typescript-eslint/no-unsafe-argument,\n @typescript-eslint/no-unsafe-member-access,\n @typescript-eslint/no-explicit-any */\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './error-store.utils';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './api-error.interface';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './ui-error.interface';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './error-store.interface';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { generateErrorCode } from './utils';\nexport * from './api-error/model/interfaces';\nexport * from './ui-error/model/interfaces';\nexport * from './store/model/interfaces';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './index';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Literal } from '../../interfaces';\nimport { CollectionsUtil } from '../../../utils';\n\n// Page DTO\n\nexport type LiteralRequestPage = { pageNumber: number; pageSize: number };\n\nexport interface RequestPage extends Literal<LiteralRequestPage> {\n readonly page: number;\n readonly size: number;\n}\n\n/**\n * ** Request Page DTO.\n */\nexport class RequestPageImpl implements RequestPage {\n public readonly page: number;\n public readonly size: number;\n\n constructor(page: number, size: number) {\n this.page = page ?? 1;\n this.size = size ?? 25;\n }\n\n /**\n * ** Factory method.\n */\n static of(page: number, size: number): RequestPageImpl {\n return new RequestPageImpl(page, size);\n }\n\n /**\n * ** Factory method for empty RequestPageDTO.\n */\n static empty(): RequestPageImpl {\n return new RequestPageImpl(null, null);\n }\n\n /**\n * ** Creates DTO from literal.\n */\n static fromLiteral(literalDTO: { pageNumber: number; pageSize: number }): RequestPageImpl {\n return RequestPageImpl.of(literalDTO.pageNumber, literalDTO.pageSize);\n }\n\n /**\n * @inheritDoc\n */\n toLiteral(): LiteralRequestPage {\n return {\n pageNumber: this.page ?? 1,\n pageSize: this.size ?? 25\n };\n }\n\n /**\n * @inheritDoc\n */\n toLiteralCloneDeep(): LiteralRequestPage {\n return this.toLiteral();\n }\n}\n\n// Order DTO\n\nexport interface RequestOrder extends Literal<LiteralApiPredicates> {\n readonly criteria: ApiPredicate[];\n}\n\n/**\n * ** Request Order DTO.\n */\nexport class RequestOrderImpl implements RequestOrder {\n public readonly criteria: ApiPredicate[];\n\n constructor(...criteria: ApiPredicate[]) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.criteria = [...criteria.filter(CollectionsUtil.isDefined)];\n }\n\n /**\n * ** Factory method.\n */\n static of(...criteria: ApiPredicate[]): RequestOrderImpl {\n return new RequestOrderImpl(...criteria);\n }\n\n /**\n * ** Factory method for empty RequestOrderDTO.\n */\n static empty(): RequestOrderImpl {\n return new RequestOrderImpl();\n }\n\n /**\n * ** Creates DTO from literal.\n */\n static fromLiteral(literalCriteria: Array<ApiPredicate>): RequestOrderImpl {\n return RequestOrderImpl.of(...literalCriteria);\n }\n\n /**\n * @inheritDoc\n */\n toLiteral(): LiteralApiPredicates {\n return [...this.criteria];\n }\n\n /**\n * @inheritDoc\n */\n toLiteralCloneDeep(): LiteralApiPredicates {\n return this.criteria.map((c) => ({ ...c }));\n }\n}\n\n// Filter DTO\n\nexport interface RequestFilter extends Literal<LiteralApiPredicates> {\n readonly criteria: ApiPredicate[];\n}\n\n/**\n * ** Request Filter DTO.\n */\nexport class RequestFilterImpl implements RequestFilter {\n public readonly criteria: ApiPredicate[];\n\n constructor(...criteria: ApiPredicate[]) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.criteria = [...criteria.filter(CollectionsUtil.isDefined)];\n }\n\n /**\n * ** Factory method.\n */\n static of(...criteria: ApiPredicate[]): RequestFilterImpl {\n return new RequestFilterImpl(...criteria);\n }\n\n /**\n * ** Factory method for empty RequestFilterDTO.\n */\n static empty(): RequestFilterImpl {\n return new RequestFilterImpl();\n }\n\n /**\n * ** Creates DTO from literal.\n */\n static fromLiteral(literalCriteria: Array<ApiPredicate>): RequestFilterImpl {\n return RequestFilterImpl.of(...literalCriteria);\n }\n\n /**\n * @inheritDoc\n */\n toLiteral(): LiteralApiPredicates {\n return [...this.criteria];\n }\n\n /**\n * @inheritDoc\n */\n toLiteralCloneDeep(): LiteralApiPredicates {\n return this.criteria.map((c) => ({ ...c }));\n }\n}\n\n// Generic Predicate for API\n\nexport type LiteralApiPredicates = Array<ApiPredicate>;\n\nexport const ASC = 'ASC';\nexport const DESC = 'DESC';\nexport type DirectionType = typeof ASC | typeof DESC;\n\nexport interface ApiPredicate {\n readonly property: string;\n readonly pattern: string;\n readonly sort: DirectionType;\n}\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './request.model';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './request';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './index';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './comparable.interface';\nexport * from './comparator.interface';\nexport * from './copy.interface';\nexport * from './criteria.interface';\nexport * from './equals.interface';\nexport * from './expression.interface';\nexport * from './literal.interface';\nexport * from './predicate.interface';\nexport * from './replacer.interface';\nexport * from './serializable.interface';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from './index';\n","/*\n * Copyright 2023-2025 Broadcom\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Directive, OnDestroy } from '@angular/core';\n\nimport { Subscription } from 'rxjs';\n\nimport { Colle