@mediusinc/mng-commons 7.0.0-rc.4 → 7.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"mediusinc-mng-commons-tableview-api.mjs","sources":["../../tableview/api/src/action/models/action.type.ts","../../tableview/api/src/action/descriptors/action.descriptor.ts","../../tableview/api/src/action/descriptors/action-descriptor.factory.ts","../../tableview/api/src/editor/data-providers/editor.data-provider.ts","../../tableview/api/src/action/descriptors/action-editor.descriptor.ts","../../tableview/api/src/action/descriptors/action-editor-descriptor.factory.ts","../../tableview/api/src/action/descriptors/action-link.descriptor.ts","../../tableview/api/src/action/descriptors/action-link-descriptor.factory.ts","../../tableview/api/src/action/descriptors/editor-action-descriptor.factory.ts","../../tableview/api/src/action/descriptors/editor-action-editor-descriptor.factory.ts","../../tableview/api/src/action/descriptors/table-action-descriptor.factory.ts","../../tableview/api/src/action/descriptors/table-action-editor-descriptor.factory.ts","../../tableview/api/src/action/models/action-error.model.ts","../../tableview/api/src/action/helpers/data-provider-executors.ts","../../tableview/api/src/action/models/execution/action-instance-state.model.ts","../../tableview/api/src/action/models/tableview-action-default-categories.model.ts","../../tableview/api/src/action/services/tokens/data-language-dropdown.token.ts","../../tableview/api/src/action/services/data-provider-executor.service.ts","../../tableview/api/src/editor/data-providers/editor-data-provider.factory.ts","../../tableview/api/src/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.ts","../../tableview/api/src/editor/models/editor.model.ts","../../tableview/api/src/editor/models/field.model.ts","../../tableview/api/src/editor/descriptors/field-validation.descriptor.ts","../../tableview/api/src/editor/descriptors/field-base.descriptor.ts","../../tableview/api/src/editor/descriptors/field-action.descriptor.ts","../../tableview/api/src/editor/descriptors/field-group.descriptor.ts","../../tableview/api/src/editor/descriptors/field-lookup.descriptor.ts","../../tableview/api/src/editor/descriptors/field-many.descriptor.ts","../../tableview/api/src/editor/descriptors/field.descriptor.ts","../../tableview/api/src/editor/descriptors/editor.descriptor.ts","../../tableview/api/src/editor/descriptors/editor-descriptor.factory.ts","../../tableview/api/src/editor/models/form-editor.event.ts","../../tableview/api/src/editor/models/formly-custom-field.model.ts","../../tableview/api/src/tableview/data-providers/tableview.data-provider.ts","../../tableview/api/src/tableview/data-providers/tableview-data-provider.factory.ts","../../tableview/api/src/tableview/descriptors/tableview.descriptor.ts","../../tableview/api/src/tableview/descriptors/tableview-descriptor.factory.ts","../../tableview/api/src/tableview/helpers/files-export.ts","../../tableview/api/src/tableview/helpers/tableview-default-actions.ts","../../tableview/api/src/tableview/helpers/tableview-input-builder.ts","../../tableview/api/src/tableview/helpers/tableview-create.ts","../../tableview/api/src/tableview/helpers/tableview-data-provider-descriptor-convert.ts","../../tableview/api/src/index.ts","../../tableview/api/src/mediusinc-mng-commons-tableview-api.ts"],"sourcesContent":["export enum ActionPositionEnum {\n ToolbarLeft,\n ToolbarRight,\n TableHeader,\n RowInline,\n RowClick,\n FooterLeft,\n FooterRight\n}\n\nexport enum ActionActivationTriggerEnum {\n OnClick, // action is triggered for activation on click\n OnRoute // action is triggered for activation by route url\n}\n\nexport enum ActionTypeEnum {\n Direct, // action is directly activated and executed\n Editor // editor providing middle step for activation\n}\n\nexport enum ActionEditorSubmitTypeEnum {\n Submit,\n Cancel\n}\n","import {InjectionToken, Type} from '@angular/core';\n\nimport {ButtonSeverity} from 'primeng/button';\nimport {of} from 'rxjs';\n\nimport {\n APermissions,\n ClassType,\n CommonsInternalError,\n DataProviderInst,\n IActionDescriptor,\n IDataProvider,\n LoggerService,\n ServiceClassType,\n findReflectTypeName\n} from '@mediusinc/mng-commons/core';\nimport {IActionButtonDescriptor} from '@mediusinc/mng-commons/form/api';\nimport {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {IActionComponent} from '../models/action-component.model';\nimport {ActionConfirmation} from '../models/action-confirmation.model';\nimport {ActionNotificationType, ActionRunFnType, ActionValidationFnType} from '../models/action-descriptor.types';\nimport {ActionActivationTriggerEnum, ActionPositionEnum, ActionTypeEnum} from '../models/action.type';\nimport {IActionContext} from '../models/execution/action-context.model';\n\nexport type ActionDescriptorCreateOptsProviderType<Item, Service> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: IDataProvider<Item, Service>;\n};\n\nexport type ActionDescriptorCreateOptsParentType = {\n parentModel?: ModelDescriptor<any>;\n parentProperty?: string;\n};\n\nexport type ActionDescriptorConstructorOptsType<Item, Service> = ActionDescriptorCreateOptsParentType &\n ActionDescriptorCreateOptsProviderType<Item, Service> & {\n model?: ModelDescriptor<Item>;\n };\n\ntype AfterRunActionType<RunReturnItem> = ActionDescriptorInst<any, any, RunReturnItem, any, undefined>;\ntype OnErrorActionType<RunInputItem> = ActionDescriptorInst<any, any, RunInputItem, any, undefined>;\n\nexport class ActionDescriptorInst<Item, Service = any, RunInputItem = Item, RunReturnItem = Item, ValidationInputItem = RunInputItem> implements IActionDescriptor<Item, Service> {\n protected readonly _model?: ModelDescriptor<Item>;\n protected readonly _actionName: string;\n protected readonly _actionNameLong: string;\n protected readonly _parentModel?: ModelDescriptor<any>;\n protected readonly _parentProperty?: string;\n\n protected readonly _dataProvider?: IDataProvider<Item, Service>;\n\n protected _i18nModelActionBaseKey?: string;\n\n protected _type: ActionTypeEnum = ActionTypeEnum.Direct;\n protected _activationTrigger: ActionActivationTriggerEnum = ActionActivationTriggerEnum.OnClick;\n protected _position: ActionPositionEnum = ActionPositionEnum.ToolbarRight;\n private _positionTableviewCategories?: string[];\n protected _tableviewCategory?: string;\n\n protected _routeUrl: string | null = null;\n\n protected _runFunction?: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>;\n protected _isVisibleFunction?: ActionValidationFnType<ValidationInputItem, Service>;\n protected _isEnabledFunction?: ActionValidationFnType<ValidationInputItem, Service>;\n\n protected _runConfirmation?: ActionConfirmation<Item, RunInputItem, Service>;\n\n protected _runNotificationOnSuccess?: ActionNotificationType | boolean;\n protected _runNotificationOnError?: ActionNotificationType | boolean;\n\n protected _afterRunAction?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>);\n protected _onRunErrorAction?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>);\n\n // security\n protected _permissions?: APermissions;\n\n //button\n protected _button?: IActionButtonDescriptor;\n\n // multiple row selection\n protected _hasItemsSelection = false;\n\n // custom action component\n protected _component?: Type<IActionComponent<Item>>;\n protected _componentFromDi?: InjectionToken<Type<any>>;\n\n // subactions\n protected _subactionsAsMenu = false;\n protected _subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>> = [];\n\n public constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<Item, Service>) {\n this._model = cfg?.model;\n this._actionName = actionName;\n\n if ((cfg?.parentModel && !cfg?.parentProperty) || (!cfg?.parentProperty && cfg?.parentProperty)) {\n throw new CommonsInternalError(\n `Provide both the parent model and parent property or none: ${this._actionName}, ${cfg?.parentModel?.i18nBaseKey}, ${cfg?.parentProperty}.`\n );\n }\n this._parentModel = cfg?.parentModel;\n this._parentProperty = cfg?.parentProperty;\n\n this.setI18nModelActionBaseKey();\n\n if (cfg?.serviceType) {\n this._dataProvider = new DataProviderInst<Item, Service>(cfg.serviceType);\n } else if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n }\n\n let displayName = actionName;\n if (this._model) displayName = this._model.i18nBaseKey ? `${this._model.i18nBaseKey}.${displayName}` : displayName;\n if (this._parentModel) {\n displayName = `${this._parentModel.i18nBaseKey}.${this._parentProperty}_${displayName}`;\n }\n this._actionNameLong = displayName;\n }\n\n public get model() {\n return this._model;\n }\n\n public get parentModel() {\n return this._parentModel;\n }\n\n public get parentProperty() {\n return this._parentProperty;\n }\n\n public get i18nModelActionBaseKey() {\n return this._i18nModelActionBaseKey;\n }\n\n public get type() {\n return this._type;\n }\n\n public get activationTrigger() {\n return this._activationTrigger;\n }\n\n public get position() {\n return this._position;\n }\n\n public get routeUrl() {\n return this._routeUrl;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get hasRunFunction(): boolean {\n return typeof this._runFunction === 'function';\n }\n\n public get runFunction(): ActionRunFnType<Item, Service, RunInputItem, RunReturnItem> {\n if (!this._runFunction) {\n throw new CommonsInternalError(`Run function is not defined for action ${this._actionNameLong} and cannot be invoked`);\n }\n return this._runFunction;\n }\n\n public get isVisibleFunction() {\n return this._isVisibleFunction;\n }\n\n public get isEnabledFunction() {\n return this._isEnabledFunction;\n }\n\n public get actionName() {\n return this._actionName;\n }\n\n public get actionNameLong() {\n return this._actionNameLong;\n }\n\n public get runConfirmation() {\n return this._runConfirmation;\n }\n\n public get runNotificationOnSuccess() {\n return this._runNotificationOnSuccess;\n }\n\n public get runNotificationOnError() {\n return this._runNotificationOnError;\n }\n\n public get afterRunAction() {\n return this._afterRunAction;\n }\n\n public get onRunErrorAction() {\n return this._onRunErrorAction;\n }\n\n public get permissions() {\n return this._permissions;\n }\n\n public get tableviewCategory() {\n return this._tableviewCategory;\n }\n\n public get hasItemsSelection() {\n return this._hasItemsSelection;\n }\n\n public get button() {\n return this._button;\n }\n\n public get component() {\n return this._component;\n }\n\n public get componentFromDi() {\n return this._componentFromDi;\n }\n\n public get positionTableviewCategories() {\n return this._positionTableviewCategories;\n }\n\n public get subactionsAsMenu() {\n return this._subactionsAsMenu;\n }\n\n public get subactions() {\n return this._subactions;\n }\n\n protected setI18nModelActionBaseKey(base?: string) {\n if (this._parentModel || this._model) {\n this._i18nModelActionBaseKey = this._parentModel\n ? `${this._parentModel.i18nBaseKey}.actions.${this._parentProperty}_${this._actionName}`\n : `${base ?? this._model!.i18nBaseKey}.actions.${this._actionName}`;\n }\n }\n\n public withRunFunction(fn: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>): this {\n this._runFunction = fn;\n return this;\n }\n\n public withIsVisibleFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this {\n this._isVisibleFunction = fn;\n return this;\n }\n\n public withIsEnabledFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this {\n this._isEnabledFunction = fn;\n return this;\n }\n\n public withRouteTrigger(routeUrl: string): this {\n this._activationTrigger = ActionActivationTriggerEnum.OnRoute;\n this._routeUrl = routeUrl;\n return this;\n }\n\n public withPosition(position: ActionPositionEnum): this {\n this._position = position;\n return this;\n }\n\n /**\n * Creates confirmation action with default style based on action descriptor\n */\n public withRunConfirmation(opts: boolean | ActionConfirmation<Item, RunInputItem, Service> = true): this {\n this._runConfirmation = opts === true ? {} : opts === false ? undefined : opts;\n return this;\n }\n\n /**\n * Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.\n *\n * @param opts Provide config for texts or on/off flag for run success/error notifications.\n */\n public withNotifications(opts?: {runOnSuccess?: ActionNotificationType | boolean; runOnError?: ActionNotificationType | boolean} | boolean): this {\n this._runNotificationOnSuccess = typeof opts === 'boolean' ? opts : opts?.runOnSuccess;\n this._runNotificationOnError = typeof opts === 'boolean' ? opts : opts?.runOnError;\n return this;\n }\n\n public withAfterRunAction(action?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>)): this {\n this._afterRunAction = action;\n return this;\n }\n\n public withOnRunErrorAction(action?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>)): this {\n this._onRunErrorAction = action;\n return this;\n }\n\n public withPermissions(permissions: APermissions): this {\n if (this._tableviewCategory) {\n LoggerService.get().debug(\n `WARNING: Permissions set on action ${this._actionNameLong} with route type '${this._tableviewCategory}' will be omitted in route guard validation.`\n );\n }\n this._permissions = permissions;\n return this;\n }\n\n public withTableviewCategory(category: string): this {\n this._tableviewCategory = category;\n return this;\n }\n\n public withButtonOpts(button?: IActionButtonDescriptor): this {\n this._button = button;\n return this;\n }\n\n public withButton(label?: string | null, icon: string | null = null, severity?: ButtonSeverity): this {\n this._button = {\n ...this._button,\n label,\n icon,\n style: {\n ...this._button?.style,\n severity: severity\n }\n };\n return this;\n }\n\n public withItemsSelection(hasSelection = true): this {\n this._hasItemsSelection = hasSelection;\n this._isEnabledFunction = this._isEnabledFunction ?? (ctx => of((ctx.parameters.selectedItems?.length ?? 0) > 0));\n return this;\n }\n\n public withComponent(component: Type<IActionComponent<Item>>): this {\n this._component = component;\n return this;\n }\n\n public withComponentFromDi(injectionToken: InjectionToken<Type<any>>): this {\n this._componentFromDi = injectionToken;\n return this;\n }\n\n public withPositionTableviewCategories(positionTableviewCategories: string[]): this {\n this._positionTableviewCategories = positionTableviewCategories;\n return this;\n }\n\n public withI18nBase(base: ClassType<unknown> | string): this {\n if (typeof base !== 'string') {\n const typeName = findReflectTypeName(base);\n if (!typeName) {\n throw new CommonsInternalError(`Could not find define i18nBaseKey for ${base} on action ${this.actionNameLong}`);\n }\n base = typeName;\n }\n this.setI18nModelActionBaseKey(base);\n return this;\n }\n\n public withSubactionsAsMenu(subactionsAsMenu = true): this {\n this._subactionsAsMenu = subactionsAsMenu;\n return this;\n }\n\n public withSubactions(...subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>>): this {\n this._subactions.push(...subactions);\n return this;\n }\n\n public copyFieldsTo(\n descriptor: ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>\n ): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem> {\n descriptor._i18nModelActionBaseKey = this._i18nModelActionBaseKey;\n descriptor._type = this._type;\n descriptor._activationTrigger = this._activationTrigger;\n descriptor._position = this._position;\n descriptor._positionTableviewCategories = this._positionTableviewCategories ? [...this._positionTableviewCategories] : undefined;\n\n descriptor._tableviewCategory = this._tableviewCategory;\n descriptor._routeUrl = this._routeUrl;\n\n descriptor._runFunction = this._runFunction;\n descriptor._isVisibleFunction = this._isVisibleFunction;\n descriptor._isEnabledFunction = this._isEnabledFunction;\n\n if (this._runConfirmation) {\n descriptor._runConfirmation = {...this._runConfirmation};\n if (this._runConfirmation.acceptButton) {\n descriptor._runConfirmation.acceptButton = {...this._runConfirmation.acceptButton};\n }\n if (this._runConfirmation.rejectButton) {\n descriptor._runConfirmation.rejectButton = {...this._runConfirmation.rejectButton};\n }\n }\n\n descriptor._runNotificationOnSuccess = typeof this._runNotificationOnSuccess === 'object' ? {...this._runNotificationOnSuccess} : this._runNotificationOnSuccess;\n descriptor._runNotificationOnError = typeof this._runNotificationOnError === 'object' ? {...this._runNotificationOnError} : this._runNotificationOnError;\n\n if (this._afterRunAction != null) {\n descriptor._afterRunAction = typeof this._afterRunAction === 'function' ? this._afterRunAction : this._afterRunAction.copy();\n }\n if (this._onRunErrorAction != null) {\n descriptor._onRunErrorAction = typeof this._onRunErrorAction === 'function' ? this._onRunErrorAction : this._onRunErrorAction.copy();\n }\n\n descriptor._permissions = this._permissions;\n\n if (this._button) {\n descriptor._button = {\n ...this._button\n };\n if (this._button.style) {\n descriptor._button.style = {\n ...this._button.style\n };\n }\n }\n\n descriptor._hasItemsSelection = this._hasItemsSelection;\n descriptor._component = this._component;\n descriptor._componentFromDi = this._componentFromDi;\n descriptor._subactionsAsMenu = this._subactionsAsMenu;\n descriptor._subactions = this._subactions.map(a => a.copy());\n\n return descriptor;\n }\n\n public copy(): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem> {\n const descriptor = new ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>(this._actionName, {\n dataProvider: this._dataProvider,\n model: this._model?.copy(),\n parentModel: this._parentModel,\n parentProperty: this._parentProperty\n });\n\n this.copyFieldsTo(descriptor);\n\n return descriptor;\n }\n}\n","import {IDataProvider, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {ActionDescriptorCreateOptsParentType, ActionDescriptorCreateOptsProviderType, ActionDescriptorInst} from './action.descriptor';\n\nexport type ActionDescriptorCreateFromModelOptsType<RunInputType, RunReturnType, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n runInputType?: TypeDescriptor<RunInputType>;\n runReturnType?: TypeDescriptor<RunReturnType>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\nexport type ActionDescriptorCreateOptsType<Model, Service, RunInputType, RunReturnType, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n runInputType?: TypeDescriptor<RunInputType>;\n runReturnType?: TypeDescriptor<RunReturnType>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\nexport type ActionProviderType<Model, Service> = ServiceClassType<Service> | IDataProvider<Model, Service>;\n\nexport const actionGetProviderCfgObj = <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service>) => {\n const cfg: ActionDescriptorCreateOptsProviderType<Model, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.dataProvider = serviceOrDataProvider as IDataProvider<Model, Service>;\n } else {\n cfg.serviceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\n/**\n * Creates and returns an instance of ActionDescriptorInst, allowing customization of the action's behavior through configuration options.\n *\n * @param {string} actionName - The unique name of the action.\n * @param {ActionDescriptorCreateFromModelOptsType<Model, Service, RunInput, RunResult, ValidationInput>} [opts] - Optional configuration object to define the action's behavior, including model, service provider and other.\n * @return {ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput>} An instance of ActionDescriptorInst configured with the provided parameters.\n */\nexport function action<Model, Service = undefined, RunInput = Model, RunResult = Model, ValidationInput = Model>(\n actionName: string,\n opts?: ActionDescriptorCreateOptsType<Model, Service, RunInput, RunResult, ValidationInput>\n): ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput> {\n return new ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput>(actionName, {\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts.serviceProvider) : {}),\n ...opts\n });\n}\n","import {Observable, Subject} from 'rxjs';\n\nimport {DataProviderInst, IDataProvider, IdType, ItemOrObservable, ServiceClassOptType, Undefined} from '@mediusinc/mng-commons/core';\n\nimport {EditorResetEvent} from '../models/form-editor.event';\n\nexport type EditorDataProviderFetchFnType<Model = any, Service = undefined, Id = IdType, Return = ItemOrObservable<Model>> = (\n id: Id,\n service: Service,\n locale: string | undefined\n) => Return;\nexport type EditorDataProviderCreateFnType<CreateModel = any, Model = any, Service = undefined, Item = Undefined<CreateModel>, Return = ItemOrObservable<Undefined<Model>>> = (\n item: Item,\n service: Service\n) => Return;\nexport type EditorDataProviderUpdateFnType<\n UpdateModel = any,\n Model = any,\n Service = undefined,\n Id = IdType,\n Item = Undefined<UpdateModel>,\n Return = ItemOrObservable<Undefined<Model>>\n> = (id: Id, item: Item, service: Service) => Return;\nexport type EditorDataProviderDeleteFnType<Model = any, Service = undefined, Item = undefined, Id = IdType, Return = ItemOrObservable<Undefined<Model>>> = (\n id: Id,\n service: Service,\n item: Item\n) => Return;\nexport type EditorDataProviderFetchMapToFnType<FromModel, ToModel> = (item: FromModel) => ToModel;\n\nexport interface IEditorDataProviderFetch<Model, Service> {\n fetch?: EditorDataProviderFetchFnType<Model, Service>;\n\n withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this;\n}\n\nexport interface IEditorDataProviderCreate<CreateModel, Model, Service> {\n create?: EditorDataProviderCreateFnType<CreateModel, Model, Service>;\n\n withCreate(fn?: EditorDataProviderCreateFnType<CreateModel, Model, Service>): this;\n}\n\nexport interface IEditorDataProviderUpdate<UpdateModel, Model, Service> {\n update?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>;\n\n withUpdate(fn?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>): this;\n}\n\nexport interface IEditorDataProviderDelete<Model, Service> {\n delete?: EditorDataProviderDeleteFnType<Model, Service, any>;\n\n withDelete<Item = undefined>(fn?: EditorDataProviderDeleteFnType<Model, Service, Item>): this;\n}\n\nexport interface IEditorDataProviderFetchMapToCreate<Model, CreateModel> {\n mapFetchItemToCreateItem?: EditorDataProviderFetchMapToFnType<Model, CreateModel>;\n\n withMapFetchItemToCreateItem(fn?: EditorDataProviderFetchMapToFnType<Model, CreateModel>): this;\n}\n\nexport interface IEditorDataProviderFetchMapToUpdate<Model, UpdateModel> {\n mapFetchItemToUpdateItem?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>;\n\n withMapFetchItemToUpdateItem(fn?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>): this;\n}\n\nexport type IEditorDataProviderFnsType<Model, Service, CreateModel = Model, UpdateModel = Model, DeleteModel = Model> = IEditorDataProviderFetch<Model, Service> &\n IEditorDataProviderCreate<CreateModel, Model, Service> &\n IEditorDataProviderUpdate<UpdateModel, Model, Service> &\n IEditorDataProviderDelete<DeleteModel, Service> &\n IEditorDataProviderFetchMapToCreate<Model, CreateModel> &\n IEditorDataProviderFetchMapToUpdate<Model, UpdateModel>;\n\nexport interface IEditorDataProviderSupport<Model> {\n get editorReset$(): Observable<EditorResetEvent<Model>>;\n\n resetEditor(event?: EditorResetEvent<Model>): void;\n}\n\nexport type IEditorDataProvider<Model = any, Service = any, ServiceClass = ServiceClassOptType<Service>, CreateModel = Model, UpdateModel = Model> = IDataProvider<\n Model,\n Service,\n ServiceClass\n> &\n IEditorDataProviderFnsType<Model, Service, CreateModel, UpdateModel> &\n IEditorDataProviderSupport<Model>;\n\nexport class EditorDataProviderInst<Model, Service = any, ServiceClass = ServiceClassOptType<Service>, CreateModel = Model, UpdateModel = Model>\n extends DataProviderInst<Model, Service, ServiceClass>\n implements IEditorDataProvider<Model, Service, ServiceClass, CreateModel, UpdateModel>\n{\n protected readonly _editorResetSubject = new Subject<EditorResetEvent<Model>>();\n\n protected _fetch?: EditorDataProviderFetchFnType<Model, Service>;\n protected _create?: EditorDataProviderCreateFnType<CreateModel, Model, Service>;\n protected _update?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>;\n protected _delete?: EditorDataProviderDeleteFnType<Model, Service, any>;\n protected _mapFetchItemToCreateItem?: EditorDataProviderFetchMapToFnType<Model, CreateModel>;\n protected _mapFetchItemToUpdateItem?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>;\n\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n }\n\n get fetch() {\n return this._fetch;\n }\n\n get create() {\n return this._create;\n }\n\n get update() {\n return this._update;\n }\n\n get delete() {\n return this._delete;\n }\n\n get mapFetchItemToCreateItem() {\n return this._mapFetchItemToCreateItem;\n }\n\n get mapFetchItemToUpdateItem() {\n return this._mapFetchItemToUpdateItem;\n }\n\n get editorReset$() {\n return this._editorResetSubject.asObservable();\n }\n\n /**\n * Sets the fetch function for the EditorDataProvider instance.\n *\n * @param {EditorDataProviderFetchFnType<Model, Service>} fn - The fetch function to be set.\n * @returns {this} - The instance of the EditorDataProvider with the fetch function set.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this {\n this._fetch = fn;\n return this;\n }\n\n /**\n * Sets the create function for the EditorDataProvider.\n *\n * @param {EditorDataProviderCreateFnType<CreateModel, Model, Service>} fn - The function used for creating new items.\n * @returns {this} - Returns the instance of the class.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withCreate(fn?: EditorDataProviderCreateFnType<CreateModel, Model, Service>): this {\n this._create = fn;\n return this;\n }\n\n /**\n * Sets the update function for the EditorDataProvider.\n *\n * @param {EditorDataProviderUpdateFnType<Model, Service>} fn - The update function to be set.\n * @returns {this} - Returns the instance of the object calling this method.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withUpdate(fn?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>): this {\n this._update = fn;\n return this;\n }\n\n /**\n * Sets the delete function for the editor data provider.\n *\n * @param {EditorDataProviderDeleteFnType<Model, Service>} fn - The delete function to be set.\n *\n * @returns {this} - Returns the instance of the current class.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withDelete<Item = undefined>(fn?: EditorDataProviderDeleteFnType<Model, Service, Item>): this {\n this._delete = fn;\n return this;\n }\n\n /**\n * Sets the function to map data from fetch function to create model.\n *\n * @param {EditorDataProviderFetchMapToFnType<Model, CreateModel>} fn - The map function to be set.\n *\n * @returns {this} - Returns the instance of the current class.\n *\n * @typeparam Model The type of data from fetch function to map from.\n * @typeparam CreateModel The type of data to map to.\n */\n withMapFetchItemToCreateItem(fn?: EditorDataProviderFetchMapToFnType<Model, CreateModel>): this {\n this._mapFetchItemToCreateItem = fn;\n return this;\n }\n\n /**\n * Sets the function to map data from fetch function to update model.\n *\n * @param {EditorDataProviderFetchMapToFnType<Model, UpdateModel>} fn - The map function to be set.\n *\n * @returns {this} - Returns the instance of the current class.\n *\n * @typeparam Model The type of data from fetch function to map from.\n * @typeparam UpdateModel The type of data to map to.\n */\n withMapFetchItemToUpdateItem(fn?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>): this {\n this._mapFetchItemToUpdateItem = fn;\n return this;\n }\n\n resetEditor(event?: EditorResetEvent<Model>): void {\n this._editorResetSubject.next(event ?? {});\n }\n}\n","import {Type} from '@angular/core';\n\nimport {CommonsInternalError, ServiceClassType, StyleSizeEnum} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDataProviderInst, IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionEditorRunFnType, ActionNotificationType, ActionRunFnType} from '../models/action-descriptor.types';\nimport {ActionEditorSubmitTypeEnum, ActionPositionEnum, ActionTypeEnum} from '../models/action.type';\nimport {ActionDescriptorCreateOptsParentType, ActionDescriptorInst} from './action.descriptor';\n\nexport type ActionEditorDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType &\n ActionEditorDescriptorCreateOptsProviderType<Model, Service> & {\n model?: ModelDescriptor<Model>;\n isTableviewMainEditor?: boolean;\n };\n\nexport type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: IEditorDataProvider<Model, Service>;\n};\n\nexport class ActionEditorDescriptorInst<\n Item,\n Service = any,\n EditorItem = Item,\n FetchInputItem = Item,\n SubmitReturnItem = Item,\n ValidationInputItem = Item,\n ParentEditorItem = undefined\n> extends ActionDescriptorInst<Item, Service, EditorItem, SubmitReturnItem, ValidationInputItem> {\n private readonly _editorDescriptor: EditorDescriptorInst<EditorItem, ParentEditorItem>;\n protected override readonly _dataProvider?: IEditorDataProvider<Item, any> = undefined;\n\n protected _editorActions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[] = [];\n protected _editorTitle?: string | null = undefined;\n protected _editorTitleParams?: any = undefined;\n\n protected _fetchNotificationOnSuccess?: ActionNotificationType | boolean;\n protected _fetchNotificationOnError?: ActionNotificationType | boolean;\n\n protected _dialogSize = StyleSizeEnum.Normal;\n protected _dialogClassName?: string;\n protected _dialogIsMaximizable?: boolean;\n\n protected _fetchFunction?: ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem>;\n protected _submitFunction?: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>;\n\n protected _editorComponent?: Type<any>;\n\n protected _resubmitEnabled?: boolean;\n protected _resubmitRefetch = true;\n protected _unsavedChangesConfirmation = false;\n\n public constructor(editorDescriptor: EditorDescriptorInst<EditorItem, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>) {\n super(actionName, {\n ...cfg,\n model: cfg?.model ?? (editorDescriptor.model as unknown as ModelDescriptor<Item>)\n });\n\n if (cfg?.serviceType) {\n this._dataProvider = new EditorDataProviderInst<Item, Service>(cfg.serviceType);\n } else if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n }\n\n this._type = ActionTypeEnum.Editor;\n this._editorDescriptor = editorDescriptor;\n this._editorActions.push(actionEditorSubmit(this), actionEditorCancel(this));\n }\n\n public get editorTitle() {\n return this._editorTitle;\n }\n\n public get editorTitleParams() {\n return this._editorTitleParams;\n }\n\n public get editorDescriptor() {\n return this._editorDescriptor;\n }\n\n public get dialogSize() {\n return this._dialogSize;\n }\n\n public get dialogClassName() {\n return this._dialogClassName;\n }\n\n public get dialogIsMaximizable() {\n return this._dialogIsMaximizable;\n }\n\n public get fetchNotificationOnSuccess() {\n return this._fetchNotificationOnSuccess;\n }\n\n public get fetchNotificationOnError() {\n return this._fetchNotificationOnError;\n }\n\n public override get dataProvider() {\n return this._dataProvider;\n }\n\n public override get hasRunFunction(): boolean {\n throw new CommonsInternalError(`Run function cannot be used in editor action for ${this._actionNameLong}. Use submit function instead`);\n }\n\n public override get runFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem> {\n throw new CommonsInternalError(`Run function cannot be used in editor action for ${this._actionNameLong}. Use submit function instead`);\n }\n\n public get hasFetchFunction(): boolean {\n return typeof this._fetchFunction === 'function';\n }\n\n public get fetchFunction() {\n return this._fetchFunction;\n }\n\n public get hasSubmitFunction(): boolean {\n return typeof this._fetchFunction === 'function';\n }\n\n public get submitFunction() {\n return this._submitFunction;\n }\n\n public get editorActions() {\n return this._editorActions;\n }\n\n public get editorComponent() {\n return this._editorComponent;\n }\n\n public get resubmitEnabled() {\n return this._resubmitEnabled;\n }\n\n public get resubmitRefetch() {\n return this._resubmitRefetch;\n }\n\n public get unsavedChangesConfirmation() {\n return this._unsavedChangesConfirmation;\n }\n\n public withEditorTitle(title: string | null, params?: any): this {\n this._editorTitle = title;\n this._editorTitleParams = params;\n return this;\n }\n\n public withDialogSize(size = StyleSizeEnum.Normal): this {\n this._dialogSize = size;\n return this;\n }\n\n public withDialogClassName(className: string): this {\n this._dialogClassName = className;\n return this;\n }\n\n public withDialogMaximizable(isMaximizable = true): this {\n this._dialogIsMaximizable = isMaximizable;\n return this;\n }\n\n public override withRunFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>): this {\n return this.withSubmitFunction(fn);\n }\n\n public withFetchFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem>): this {\n this._fetchFunction = fn;\n return this;\n }\n\n public withSubmitFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>): this {\n this._submitFunction = fn;\n return this;\n }\n\n /**\n * Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.\n *\n * @param opts Provide config for texts or on/off flag for submit (is same as run) or fetch success/error notifications.\n */\n public override withNotifications(\n opts?:\n | {\n submitOnSuccess?: ActionNotificationType | boolean;\n submitOnError?: ActionNotificationType | boolean;\n runOnSuccess?: ActionNotificationType | boolean;\n runOnError?: ActionNotificationType | boolean;\n fetchOnSuccess?: ActionNotificationType | boolean;\n fetchOnError?: ActionNotificationType | boolean;\n }\n | boolean\n ): this {\n super.withNotifications(\n typeof opts === 'boolean'\n ? opts\n : {\n runOnSuccess: opts?.submitOnSuccess ?? opts?.runOnSuccess,\n runOnError: opts?.submitOnError ?? opts?.runOnError\n }\n );\n this._fetchNotificationOnSuccess = typeof opts === 'boolean' ? opts : opts?.fetchOnSuccess;\n this._fetchNotificationOnError = typeof opts === 'boolean' ? opts : opts?.fetchOnError;\n return this;\n }\n\n public withEditorAction(action: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>): this {\n this._editorActions.push(action);\n return this;\n }\n\n public withEditorActions(actions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[]): this {\n this._editorActions = actions;\n return this;\n }\n\n public withEditorComponent(editorComponent: Type<any>): this {\n this._editorComponent = editorComponent;\n return this;\n }\n\n /**\n * Enables or disables resubmit resubmit - this means the form will not exit after successful submission, but will instead remain open.\n *\n * @param {boolean} [enabled=true] - Specifies whether resubmit is enabled or disabled. Defaults to true if not provided.\n * @param {boolean} [refetch=true] - Specifies whether the data should be refetched after resubmit. If not, the data in the form stays as is. Defaults to true if not provided.\n *\n * @returns {this} - Returns the current instance with the resubmit configuration updated.\n */\n public withResubmit(enabled?: boolean, refetch = true): this {\n this._resubmitEnabled = enabled;\n this._resubmitRefetch = refetch;\n return this;\n }\n\n public withUnsavedChangesConfirmation(unsavedChangesConfirmation = true): this {\n this._unsavedChangesConfirmation = unsavedChangesConfirmation;\n return this;\n }\n\n override copyFieldsTo(\n descriptor: ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>\n ): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem> {\n super.copyFieldsTo(descriptor);\n descriptor._editorActions = this._editorActions.map(a => a.copy());\n descriptor._editorTitle = this._editorTitle;\n descriptor._editorTitleParams = this._editorTitleParams != null ? {...this._editorTitleParams} : undefined;\n\n descriptor._fetchNotificationOnSuccess = typeof this._fetchNotificationOnSuccess === 'object' ? {...this._fetchNotificationOnSuccess} : this._fetchNotificationOnSuccess;\n descriptor._fetchNotificationOnError = typeof this._fetchNotificationOnError === 'object' ? {...this._fetchNotificationOnError} : this._fetchNotificationOnError;\n\n descriptor._dialogSize = this._dialogSize;\n descriptor._dialogClassName = this._dialogClassName;\n descriptor._dialogIsMaximizable = this._dialogIsMaximizable;\n descriptor._fetchFunction = this._fetchFunction;\n descriptor._submitFunction = this._submitFunction;\n descriptor._editorComponent = this._editorComponent;\n descriptor._resubmitEnabled = this._resubmitEnabled;\n descriptor._resubmitRefetch = this._resubmitRefetch;\n descriptor._unsavedChangesConfirmation = this._unsavedChangesConfirmation;\n return descriptor;\n }\n\n override copy(): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem> {\n const editor = this._editorDescriptor.copy();\n const descriptor = new ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>(\n editor,\n this._actionName,\n {\n dataProvider: this._dataProvider,\n model: this._model?.copy(),\n parentModel: this._parentModel,\n parentProperty: this._parentProperty\n }\n );\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n}\nexport class ActionEditorSubmitDescriptorInst<Model, EditorModel> extends ActionDescriptorInst<Model, undefined, EditorModel, EditorModel, EditorModel> {\n private readonly _submitType: ActionEditorSubmitTypeEnum;\n\n public constructor(editorActionName: string, editorActionModel: ModelDescriptor<Model> | undefined, submitType = ActionEditorSubmitTypeEnum.Submit) {\n super(submitType === ActionEditorSubmitTypeEnum.Submit ? `${editorActionName}.submit` : `${editorActionName}.cancel`, {model: editorActionModel});\n this._submitType = submitType;\n this._position = ActionPositionEnum.FooterRight;\n }\n\n public get submitType() {\n return this._submitType;\n }\n\n override copy(): ActionEditorSubmitDescriptorInst<Model, EditorModel> {\n const descriptor = new ActionEditorSubmitDescriptorInst<Model, EditorModel>(this._actionName.split('.').slice(0, -1).join('.'), this._model?.copy(), this._submitType);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n}\n\n/**\n * creates primary action with primary button style\n * @param editorAction\n * @param submitType\n */\nexport function actionEditorSubmit<Model, EditorModel>(\n editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any, any>,\n submitType = ActionEditorSubmitTypeEnum.Submit\n): ActionEditorSubmitDescriptorInst<Model, EditorModel> {\n return new ActionEditorSubmitDescriptorInst<Model, EditorModel>(editorAction.actionName, editorAction.model, submitType).withButtonOpts({\n style: {\n severity: editorAction.button?.style?.severity\n }\n });\n}\n\n/**\n * creates secondary button with text button style\n * @param editorAction\n * @param submitType\n */\nexport function actionEditorCancel<Model, EditorModel>(\n editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any, any>,\n submitType = ActionEditorSubmitTypeEnum.Cancel\n): ActionEditorSubmitDescriptorInst<Model, EditorModel> {\n return new ActionEditorSubmitDescriptorInst<Model, EditorModel>(editorAction.actionName, editorAction.model, submitType).withButtonOpts({\n style: {\n text: true,\n severity: 'secondary'\n }\n });\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionEditorDescriptorCreateOptsProviderType, ActionEditorDescriptorInst} from './action-editor.descriptor';\nimport {ActionDescriptorCreateOptsParentType} from './action.descriptor';\n\nexport type ActionEditorProviderType<Model, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service>;\n\nexport type ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n fetchInputType?: TypeDescriptor<FetchInput>;\n submitReturnType?: TypeDescriptor<SubmitReturn>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\nexport const actionEditorGetProviderCfgObj = <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service>) => {\n const cfg: ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IEditorDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.dataProvider = serviceOrDataProvider as IEditorDataProvider<Model, Service>;\n } else {\n cfg.serviceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\n/**\n * Creates an ActionEditorDescriptorInst instance with the provided editor descriptor and options.\n *\n * @param {string} actionName - The name of the action to associate with the editor.\n * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance to be used.\n * @param {ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>} [opts] - Optional configuration options for the ActionEditor.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput>} An instance of ActionEditorDescriptor with the configured parameters.\n */\nexport function actionEditor<\n EditorModel,\n Model = EditorModel,\n Service = undefined,\n FetchInput = Model,\n SubmitReturn = Model,\n ValidationInput = Model,\n ParentEditorItem = undefined\n>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditorItem>,\n opts?: ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>\n): ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput, ParentEditorItem> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput, ParentEditorItem>(editor, actionName, {\n ...opts,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {}),\n model: opts?.model\n });\n}\n","import {Params, QueryParamsHandling} from '@angular/router';\n\nimport {ActionDescriptorConstructorOptsType, ActionDescriptorInst} from './action.descriptor';\n\nexport type ActionLinkDescriptorConstructorOpts<Model> = Omit<ActionDescriptorConstructorOptsType<Model, undefined>, 'serviceType' | 'dataProvider'>;\n\nexport class ActionLinkDescriptorInst<Item, ValidationInputItem = Item> extends ActionDescriptorInst<Item, undefined, undefined, undefined, ValidationInputItem> {\n private _url = '';\n private _pathSegments: string[] = [];\n private _queryParams?: Params;\n private _queryParamsHandling?: QueryParamsHandling;\n private _replaceUrl = false;\n private _target = '_self';\n private _isStyleLink = false;\n\n constructor(actionName = 'link', cfg?: ActionLinkDescriptorConstructorOpts<Item>) {\n super(actionName, cfg);\n }\n\n public get url(): string {\n return this._url;\n }\n\n public get pathSegments(): string[] {\n return this._pathSegments;\n }\n\n public get queryParams(): Params | undefined {\n return this._queryParams;\n }\n\n public get queryParamsHandling(): QueryParamsHandling | undefined {\n return this._queryParamsHandling;\n }\n\n public get replaceUrl(): boolean {\n return this._replaceUrl;\n }\n\n public get target(): string {\n return this._target;\n }\n\n public get isStyleLink(): boolean {\n return this._isStyleLink;\n }\n\n public withHref(url: string): this {\n this._url = url;\n return this;\n }\n\n public withRouterLink(...pathSegments: string[]): this {\n this._pathSegments = pathSegments;\n return this;\n }\n\n public withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this {\n this._queryParams = queryParams;\n this._queryParamsHandling = queryParamsHandling;\n return this;\n }\n\n public withReplaceUrl(replaceUrl = false): this {\n this._replaceUrl = replaceUrl;\n return this;\n }\n\n public withTarget(target: '_self' | '_blank' = '_self'): this {\n this._target = target;\n return this;\n }\n\n public withStyleLink(isStyleLink: boolean): this {\n this._isStyleLink = isStyleLink;\n return this;\n }\n\n public override copy(): ActionLinkDescriptorInst<Item, ValidationInputItem> {\n const descriptor = new ActionLinkDescriptorInst<Item, ValidationInputItem>(this._actionName, {\n model: this._model?.copy(),\n parentModel: this._parentModel,\n parentProperty: this._parentProperty\n });\n this.copyFieldsTo(descriptor); // copy base action\n descriptor._url = this._url;\n descriptor._pathSegments = [...this._pathSegments];\n descriptor._queryParams = {...this._queryParams};\n descriptor._queryParamsHandling = this._queryParamsHandling;\n descriptor._replaceUrl = this._replaceUrl;\n descriptor._target = this._target;\n descriptor._isStyleLink = this._isStyleLink;\n return descriptor;\n }\n}\n","import {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {ActionLinkDescriptorInst} from './action-link.descriptor';\nimport {ActionDescriptorCreateOptsParentType, ActionDescriptorInst} from './action.descriptor';\n\ntype ActionLinkCreateOptsType<Model, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n model?: ModelDescriptor<Model>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\n/**\n * Creates an instance of ActionLinkDescriptorInst with the provided action name and options.\n *\n * @param {string} actionName - The unique name of the action.\n * @param {ActionLinkCreateOptsType<Model, ValidationInput>} [opts] - Optional parameters for configuring the action link, including the model and validation type.\n * @return {ActionLinkDescriptorInst<Model, ValidationInput>} An instance of ActionLinkDescriptorInst initialized with the action name and options.\n */\nexport function actionLink<Model = any, ValidationInput = Model>(actionName: string, opts?: ActionLinkCreateOptsType<Model, ValidationInput>) {\n return new ActionLinkDescriptorInst<Model, ValidationInput>(actionName, {\n ...opts,\n model: opts?.model\n });\n}\n\n/**\n * Generates an ActionLinkDescriptorInst from the provided ActionDescriptorInst.\n *\n * @param {ActionDescriptorInst<Model, any, any, any, ValidationInput>} action - The action descriptor instance that serves as the basis for the action link.\n * @return {ActionLinkDescriptorInst<Model, ValidationInput>} A newly created ActionLinkDescriptorInst configured with the provided action parameters.\n */\nexport function actionLinkFromAction<Model, ValidationInput = Model>(action: ActionDescriptorInst<Model, any, any, any, ValidationInput>) {\n const descriptor = new ActionLinkDescriptorInst<Model, ValidationInput>(action.actionName, {model: action.model});\n\n action.copyFieldsTo(descriptor);\n\n // disable confirmation and notifications\n descriptor.withRunConfirmation(false);\n descriptor.withNotifications(false);\n\n descriptor.withAfterRunAction();\n descriptor.withOnRunErrorAction();\n\n descriptor.withSubactionsAsMenu(false);\n\n return descriptor;\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionProviderType, actionGetProviderCfgObj} from './action-descriptor.factory';\nimport {ActionDescriptorInst} from './action.descriptor';\n\n/**\n * Defines an action to be positioned on a specified editor with editor-specific execution context.\n *\n * @param {string} actionName - The name identifying the action to be performed.\n * @param {EditorDescriptorInst<EditorModel>} editor - The descriptor of the editor on which the action will be placed and executed.\n * @param {Object} [opts] - Options for configuring the action behavior.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.\n * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.\n * @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The position of action on editor.\n * @return {ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>} - An instance representing the configured action descriptor for the specified editor and model.\n */\nexport function actionOnEditor<Model, EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, any>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n }\n): ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel> {\n return new ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>(actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts?.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.FooterLeft);\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionEditorProviderType, actionEditorGetProviderCfgObj} from './action-editor-descriptor.factory';\nimport {ActionEditorDescriptorInst} from './action-editor.descriptor';\n\n/**\n * Creates and returns an instance of `ActionEditorDescriptorInst` when positioned on another (parent) editor.\n *\n * @param {string} actionName - The name of the action associated with the editor.\n * @param {EditorDescriptorInst<EditorModel, ParentEditor>} editor - The editor descriptor defining editor on action.\n * @param {Object} [opts] - Optional parameters for configuring the action editor.\n * @param {ModelDescriptor<Model>} [opts.model] - The descriptor for the model associated with the action.\n * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for the action editor.\n * @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The desired position of action on the editor.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>} A configured instance of `ActionEditorDescriptorInst` representing the action editor.\n */\nexport function actionEditorOnEditor<EditorModel, ParentEditor, Model = EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditor>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n }\n): ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor, ParentEditor> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor, ParentEditor>(editor, actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.FooterLeft);\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionProviderType, actionGetProviderCfgObj} from './action-descriptor.factory';\nimport {ActionDescriptorInst} from './action.descriptor';\n\n/**\n * Defines an action to be positioned on a specified table with table row execution context.\n *\n * @param {string} actionName - The name identifying the action to be performed.\n * @param {TableDescriptorInst<TableModel, any, any>} table - The descriptor of the table on which the action will be placed and executed.\n * @param {Object} [opts] - Options for configuring the action behavior.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.\n * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.\n * @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position of action on table.\n * @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table row and model.\n */\nexport function actionOnTableRow<Model, TableModel, Service = undefined>(\n actionName: string,\n table: TableDescriptorInst<TableModel, any, any>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n }\n): ActionDescriptorInst<Model, Service, TableModel, Model, TableModel> {\n return new ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>(actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts?.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.RowInline);\n}\n\n/**\n * Defines an action to be positioned on a specified table with table header or footer execution context.\n *\n * @param {string} actionName - The name identifying the action to be performed.\n * @param {Object} [opts] - Options for configuring the action behavior.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.\n * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.\n * @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of action on table.\n * @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table top and model.\n */\nexport function actionOnTableTop<Model, Service = undefined>(\n actionName: string,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;\n }\n): ActionDescriptorInst<Model, Service, undefined, Model, undefined> {\n return new ActionDescriptorInst<Model, Service, undefined, Model, undefined>(actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts?.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft);\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionEditorProviderType, actionEditorGetProviderCfgObj} from './action-editor-descriptor.factory';\nimport {ActionEditorDescriptorInst} from './action-editor.descriptor';\n\n/**\n * Creates and returns an ActionEditorDescriptorInst for displaying editor action on table row.\n *\n * @param {string} actionName - The name of the action.\n * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.\n * @param {TableDescriptorInst<TableModel, any, any>} table - The table descriptor instance representing the table on which the action is positioned.\n * @param {Object} [opts] - Optional configurations for the action editor.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.\n * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.\n * @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position where the action should be displayed on the table row.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>} The configured action editor descriptor instance.\n */\nexport function actionEditorOnTableRow<EditorModel, ParentEditorItem, TableModel, Model = EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditorItem>,\n table: TableDescriptorInst<TableModel, any, any>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n }\n): ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel, ParentEditorItem> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel, ParentEditorItem>(editor, actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.RowInline);\n}\n\n/**\n * Creates and returns an action editor descriptor configured with the given parameters.\n * This is used to define an action editor positioned relative to a table.\n *\n * @param {string} actionName - The name of the action.\n * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.\n * @param {Object} [opts] - Optional configurations for the action editor.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.\n * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.\n * @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of the action on the table.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>} The configured action editor descriptor instance.\n */\nexport function actionEditorOnTableTop<EditorModel, ParentEditorItem, Model = EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditorItem>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;\n }\n): ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined, ParentEditorItem> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined, ParentEditorItem>(editor, actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft);\n}\n","import {HttpErrorResponse} from '@angular/common/http';\n\nimport {ACommonsErrorBase, CommonsErrorBaseOptions, ICommonsActionError} from '@mediusinc/mng-commons/core';\n\nimport {IActionContext} from './execution/action-context.model';\n\nexport interface CommonsActionErrorOptions extends CommonsErrorBaseOptions {\n actionContext?: IActionContext<any, any, any>;\n httpError?: HttpErrorResponse;\n}\n\nexport class CommonsActionError extends ACommonsErrorBase implements ICommonsActionError {\n public readonly type = 'CommonsActionError';\n public readonly actionId: string;\n\n public readonly actionContext?: IActionContext<any, any>;\n public readonly httpError?: HttpErrorResponse;\n\n constructor(message: string, actionName: string, options?: CommonsActionErrorOptions) {\n super(message, {\n name: 'CommonsActionError_' + actionName,\n ...options\n });\n\n this.actionId = actionName;\n this.actionContext = options?.actionContext;\n this.httpError = options?.httpError;\n }\n}\n","import {Injector} from '@angular/core';\n\nimport {Observable, isObservable, map, throwError} from 'rxjs';\n\nimport {CommonsInternalError, DataListResult, IDataProvider, Nullable, toObservable} from '@mediusinc/mng-commons/core';\nimport {ITableDataProvider} from '@mediusinc/mng-commons/table/api';\n\nimport {IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {CommonsActionError} from '../models/action-error.model';\nimport {IActionContext} from '../models/execution/action-context.model';\n\nexport function runFnFromDataProviderOrFallback<Item, ParameterItem, Service, Return, FallbackReturn = Return>(\n ctx: IActionContext<Item, ParameterItem, Service>,\n fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null,\n fallback: Observable<FallbackReturn>\n): Observable<Return | FallbackReturn> {\n const dataProviderExec = fn(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n return fallback;\n}\n\nexport function runFnFromDataProviderOrFail<Item, ParameterItem, Service, Return>(\n ctx: IActionContext<Item, ParameterItem, Service>,\n fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null\n): Observable<Return> {\n const dataProviderExec = fn(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n return throwError(\n () =>\n new CommonsActionError(\n `Data provider could not extract function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.i18nBaseKey}) for item id ${ctx.parameters?.itemId}.`,\n ctx.contextLongName,\n {actionContext: ctx}\n )\n );\n}\n\nexport function runGetAllFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined' && typeof ctx.dataProvider['getAll' as keyof object] === 'function') {\n const tableDataProvider = ctx.dataProvider as ITableDataProvider<Item, any>;\n const queryParam = ctx.parameters?.dataListParams ?? {};\n return toObservable(tableDataProvider.getAll(queryParam, ctx.serviceInstance));\n }\n return null;\n}\n\nexport type RunFetchFromDataProviderOptsType = {\n strict?: boolean;\n reason?: RunFetchFromDataProviderReasonType;\n};\nexport type RunFetchFromDataProviderReasonType = 'create' | 'update' | 'fetch';\nexport function runFetchFromDataProvider<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n opts?: RunFetchFromDataProviderOptsType\n): Observable<Item> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any>;\n if (typeof editorDataProvider.fetch === 'function') {\n return ctx.parameters?.itemId\n ? toObservable(editorDataProvider.fetch(ctx.parameters.itemId, ctx.serviceInstance, ctx.parameters.locale)).pipe(\n map(res => {\n if (opts?.reason === 'update') {\n if (opts?.strict && typeof editorDataProvider.mapFetchItemToUpdateItem !== 'function') {\n throw new CommonsInternalError(`mapFetchToUpdate function must be provided in data provider`);\n } else if (typeof editorDataProvider.mapFetchItemToUpdateItem === 'function') {\n return editorDataProvider.mapFetchItemToUpdateItem(res);\n }\n } else if (opts?.reason === 'create') {\n if (opts?.strict && typeof editorDataProvider.mapFetchItemToCreateItem !== 'function') {\n throw new CommonsInternalError(`mapFetchToCreate function must be provided in data provider`);\n } else if (typeof editorDataProvider.mapFetchItemToCreateItem === 'function') {\n return editorDataProvider.mapFetchItemToCreateItem(res);\n }\n }\n return res;\n })\n )\n : null;\n }\n }\n return null;\n}\n\nexport function runCreateFromDataProvider<Item, ParameterItem, Service>(ctx: IActionContext<Item, ParameterItem, Service>): Observable<Nullable<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any, any, ParameterItem>;\n if (typeof editorDataProvider.create === 'function') {\n return ctx.parameters?.item ? toObservable(editorDataProvider.create(ctx.parameters.item, ctx.serviceInstance)) : null;\n }\n }\n return null;\n}\n\nexport function runUpdateFromDataProvider<Item, ParameterItem, service>(ctx: IActionContext<Item, ParameterItem, service>): Observable<Nullable<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any, any, any, ParameterItem>;\n if (typeof editorDataProvider.update === 'function') {\n return ctx.parameters?.itemId ? toObservable(editorDataProvider.update(ctx.parameters.itemId, ctx.parameters.item, ctx.serviceInstance)) : null;\n }\n }\n return null;\n}\n\nexport function runDeleteFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any>;\n if (typeof editorDataProvider.delete === 'function') {\n return ctx.parameters?.itemId ? toObservable(editorDataProvider.delete(ctx.parameters.itemId, ctx.serviceInstance, ctx.parameters.item)) : null; // this is not exactly correct cast as the delete function should never receive Item, but in many cases it ain't so\n }\n }\n return null;\n}\n\n/**\n * Gets service instance of data provider.\n *\n * @param injector Injector instance\n * @param dataProvider Data provider instance.\n */\nexport function getDataProviderService<Item, Service>(injector: Injector, dataProvider?: IDataProvider<Item, Service>): Service | null {\n if (dataProvider?.serviceType) {\n const service = injector.get<Service>(dataProvider.serviceType, undefined, {optional: true});\n if (!service) {\n throw new CommonsInternalError(`Data provider service type ${dataProvider.serviceType} could not be injected.`);\n }\n return service;\n } else {\n return null;\n }\n}\n","/**\n * States of action. Enums ending with \"*Final\" are supposed to be final.\n */\nexport enum ActionInstanceStateEnum {\n TriggerStart, // action was triggered (click or direct)\n TriggerEnd,\n ActivationStart, // action activation started (direct, event or editor)\n ActivationEnd, // action activation ended\n FetchStart, // fetch started\n FetchEnd, // fetch ended\n FetchError, // fetch error\n RunConfirmationStart, // confirmation for run is started\n RunConfirmationEndAccept, // confirmation accepted\n RunConfirmationEndReject, // confirmation rejected\n RunStart, // action was run by calling main function\n RunEnd, // action run function executed\n RunError, // action run function executed with error\n NextActionStart, // next action started\n NextActionEnd, // next action finished\n ErrorActionStart, // error action started\n ErrorActionEnd, // error action finished\n FinishSuccessFinal, // action executed successfully\n FinishErrorFinal, // action executed with error\n FinishDismissedFinal, // action was dismissed by user\n FinishSuccessReactivateFinal, // action executed successfully, another instance will directly start from previous\n FinishComponentDestroyFinal, // action was dismissed by destroying component that was executing it\n FinishRouteUntriggerStart,\n FinishRouteUntriggerEndFinal,\n FinishRouteUntriggerTimeoutFinal\n}\n","/**\n * Default categories for tableview actions\n */\nexport class TableviewActionDefaultCategories {\n public static readonly READ = '_defaultTwRead';\n public static readonly ADD = '_defaultTwAdd';\n public static readonly EDIT = '_defaultTwEdit';\n public static readonly DELETE = '_defaultTwDelete';\n public static readonly DETAILS = '_defaultTwDetails';\n}\n","import {InjectionToken, Type} from '@angular/core';\n\nexport const DATA_LANGUAGE_DROPDOWN_COMPONENT_IT: InjectionToken<Type<any>> = new InjectionToken<Type<any>>('DATA_LANGUAGE_DROPDOWN_COMPONENT');\n","import {Injector} from '@angular/core';\n\nimport {Observable} from 'rxjs';\n\nimport {DataListResult, IDataProvider, Nullable} from '@mediusinc/mng-commons/core';\n\nimport {RunFetchFromDataProviderReasonType, getDataProviderService, runFnFromDataProviderOrFail} from '../helpers/data-provider-executors';\nimport {IActionContext} from '../models/execution/action-context.model';\n\nexport abstract class DataProviderExecutor {\n public runGetAllOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, DataListResult<Item>>(ctx, this.runGetAll.bind(this));\n }\n\n public abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null;\n public abstract runGetAll<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback: Observable<DataListResult<Item>>\n ): Observable<DataListResult<Item>>;\n public abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<DataListResult<Item>> | null;\n public abstract runGetAll<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<DataListResult<Item>>\n ): Observable<DataListResult<Item>> | null;\n\n public runFetchOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason?: RunFetchFromDataProviderReasonType): Observable<Item> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, ctx => this.runFetch(ctx, fetchReason));\n }\n\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason?: RunFetchFromDataProviderReasonType\n ): Observable<Item> | null;\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason: RunFetchFromDataProviderReasonType | undefined,\n fallback: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>>;\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason: RunFetchFromDataProviderReasonType | undefined,\n fallback: undefined\n ): Observable<Nullable<Item>> | null;\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason: RunFetchFromDataProviderReasonType | undefined,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n public runCreateOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, this.runCreate.bind(this));\n }\n\n public abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;\n public abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;\n public abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;\n public abstract runCreate<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n public runUpdateOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, this.runUpdate.bind(this));\n }\n\n public abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;\n public abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;\n public abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;\n public abstract runUpdate<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n public runDeleteOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item | null> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, this.runDelete.bind(this));\n }\n\n public abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null;\n public abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;\n public abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;\n public abstract runDelete<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n /**\n * Gets service instance of data provider.\n *\n * @param injector Injector instance\n * @param dataProvider Data provider instance.\n */\n public getDataProviderService<Item, Service>(injector: Injector, dataProvider?: IDataProvider<Item, Service>): Service | null {\n return getDataProviderService(injector, dataProvider);\n }\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDataProviderInst} from './editor.data-provider';\n\n/**\n * Creates and returns an instance of `EditorDataProviderInst` with the specified options for managing editor data.\n *\n * @param {Object} [opts] - The options object to configure the data provider.\n * @param {TypeDescriptor<Model> | ModelDescriptor<Model>} [opts.type] - The descriptor defining the type of model.\n * @param {ServiceClassType<Service>} [opts.service] - The service class type associated with the data provider.\n * @param {TypeDescriptor<CreateModel> | ModelDescriptor<CreateModel>} [opts.createType] - The descriptor defining the create type.\n * @param {TypeDescriptor<UpdateModel> | ModelDescriptor<UpdateModel>} [opts.updateType] - The descriptor defining the update type.\n * @return {EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>} An instance of `EditorDataProviderInst` configured according to the provided options.\n */\nexport function editorDataProvider<\n Model,\n Service = undefined,\n CreateModel = Model,\n UpdateModel = Model,\n ServiceClass = Service extends undefined ? undefined : ServiceClassType<Service>\n>(opts?: {\n type?: TypeDescriptor<Model> | ModelDescriptor<Model>;\n service?: ServiceClassType<Service>;\n createType?: TypeDescriptor<CreateModel> | ModelDescriptor<Model>;\n updateType?: TypeDescriptor<UpdateModel> | ModelDescriptor<Model>;\n}): EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel> {\n return new EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>(opts?.service as ServiceClass);\n}\n","import {ArrayItemType, CommonsInternalError, ITableDescriptor, ITableviewDescriptor} from '@mediusinc/mng-commons/core';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\nimport {ITableDataProvider} from '@mediusinc/mng-commons/table/api';\n\nimport {FieldsManageAddFieldLookupOpts, IFieldManageSafeWithGetField, IFieldsManageWithGetField} from '../../models/editor-fields.model';\nimport {AFieldDescriptor} from '../field-base.descriptor';\nimport {FieldLookupEnumDescriptor} from '../field-lookup.descriptor';\nimport {FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor} from '../field-many.descriptor';\n\n/**\n * @experimental\n */\nexport class EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, PropertyObjectModel> implements IFieldManageSafeWithGetField<\n EditorModel,\n ParentEditorModel,\n PropertyObjectModel\n> {\n #path: string;\n #editor: IFieldsManageWithGetField<EditorModel, ParentEditorModel>;\n\n constructor(editor: IFieldsManageWithGetField<EditorModel, ParentEditorModel>, basePath: string) {\n this.#editor = editor;\n this.#path = basePath;\n }\n\n nested<Property extends keyof PropertyObjectModel>(\n property: Property\n ): EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, NonNullable<PropertyObjectModel[Property]>> {\n return new EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, NonNullable<PropertyObjectModel[Property]>>(\n this.#editor,\n this.getNestedPropertyPath(property)\n );\n }\n\n getNestedPropertyPath(p: keyof PropertyObjectModel) {\n return `${this.#path}.${p as string}`;\n }\n\n getField<Property extends keyof PropertyObjectModel, FieldModel = NonNullable<PropertyObjectModel[Property]>, FieldValue = PropertyObjectModel[Property]>(\n property: Property\n ): AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> | null {\n return this.#editor.getFieldUnsafe<FieldModel, FieldValue>(this.getNestedPropertyPath(property));\n }\n\n removeField(property: keyof PropertyObjectModel): void {\n this.#editor.removeFieldUnsafe(this.getNestedPropertyPath(property));\n }\n\n addField<PropertyField extends keyof PropertyObjectModel, FieldModel = NonNullable<PropertyObjectModel[PropertyField]>, FieldValue = PropertyObjectModel[PropertyField]>(\n property: PropertyField\n ) {\n return this.#editor.addFieldUnsafe<FieldModel, FieldValue>(this.getNestedPropertyPath(property));\n }\n\n withFields(...properties: (keyof PropertyObjectModel)[]) {\n properties.forEach(p => this.#editor.addFieldUnsafe(this.getNestedPropertyPath(p)));\n return this;\n }\n\n addFieldLookup<\n Property extends keyof PropertyObjectModel,\n Service = undefined,\n FieldModel extends NonNullable<PropertyObjectModel[Property]> = NonNullable<PropertyObjectModel[Property]>,\n FieldValue = PropertyObjectModel[Property]\n >(property: Property, opts?: FieldsManageAddFieldLookupOpts<FieldModel, Service>) {\n return this.#editor.addFieldLookupUnsafe<FieldModel, Service, FieldValue>(this.getNestedPropertyPath(property), opts);\n }\n\n addFieldLookupEnum<Property extends keyof PropertyObjectModel, Enum extends NonNullable<PropertyObjectModel[Property]>>(\n property: Property,\n enumModel: EnumDescriptor<Enum>,\n options?: Array<Enum>\n ): FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel> {\n return this.#editor.addFieldLookupEnumUnsafe<Enum>(this.getNestedPropertyPath(property), enumModel, options);\n }\n\n addFieldManyEditor<Property extends keyof PropertyObjectModel, FieldModel = ArrayItemType<PropertyObjectModel[Property]>, FieldValue = PropertyObjectModel[Property]>(\n property: Property,\n tableviewDescriptor: ITableviewDescriptor<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel>\n ): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {\n return this.#editor.addFieldManyEditorUnsafe<FieldModel, FieldValue>(this.getNestedPropertyPath(property), tableviewDescriptor);\n }\n\n addFieldManyToManyEditor<\n Property extends keyof PropertyObjectModel,\n Service,\n FieldModel = ArrayItemType<PropertyObjectModel[Property]>,\n FieldValue = PropertyObjectModel[Property]\n >(\n property: Property,\n mainTableDescriptor: ITableDescriptor<FieldModel, any, any>,\n lookupTableDescriptor: ITableDescriptor<FieldModel, any, any>,\n lookupDataProvider: ITableDataProvider<FieldModel, Service>\n ): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel> {\n return this.#editor.addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue>(\n this.getNestedPropertyPath(property),\n mainTableDescriptor,\n lookupTableDescriptor,\n lookupDataProvider\n );\n }\n\n addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>) {\n if (!field.property.startsWith(this.#path)) {\n throw new CommonsInternalError(`Field ${field.property} cannot be added to nested object property ${this.#path}: Paths do not match.`);\n }\n this.#editor.addFieldDescriptor(field);\n return this;\n }\n}\n","export enum TableviewEditorTypeEnum {\n None,\n Details,\n Edit,\n Add\n}\n\nexport const EDITOR_DEFAULT_GROUP_NAME = '_default';\n","import {Type} from '@angular/core';\n\nexport enum FieldSizeEnum {\n Small,\n Normal,\n Large\n}\n\nexport enum FieldInputTypeEnum {\n Hidden,\n Label,\n Text,\n Textarea,\n Number,\n Currency,\n Switch,\n Radio,\n Datepicker,\n Mask,\n File,\n ImageFile,\n ImageUrl,\n Custom\n}\n\nexport enum FieldLookupTypeEnum {\n Dropdown,\n Autocomplete,\n Dialog,\n Custom\n}\n\nexport enum FieldManyToManyEditorTypeEnum {\n DialogTableMultiselect\n}\n\nexport enum FieldManyToManyEditorActionEnum {\n Add,\n Delete\n}\n\nexport enum FieldManyEditorTypeEnum {\n DialogEditor\n}\n\nexport enum FieldManyEditorActionEnum {\n View,\n Add,\n Edit,\n Delete\n}\n\nexport enum FieldGroupTypeEnum {\n Tab,\n Fieldset,\n Logical\n}\n\nexport type FieldConfig = object;\n\nexport interface FieldLookupConfig extends FieldConfig {\n table?: {\n headerTitleComponent?: Type<any>;\n columnActionComponent?: Type<any>;\n };\n}\n","import {FieldAsyncBaseValidator, FieldBaseValidator, FieldValidationMessage} from '../models/field-validation.model';\n\nexport type FieldValidationDescriptorOptsType<Property = string> = {errorPath?: Property};\n\nexport class FieldValidationDescriptor<FieldValue, EditorValue, ParentEditorModel = undefined> {\n private readonly _name: string;\n private readonly _validator?: FieldBaseValidator<FieldValue, EditorValue, ParentEditorModel> | FieldAsyncBaseValidator<FieldValue, EditorValue, ParentEditorModel>;\n private readonly _message?: FieldValidationMessage<FieldValue, EditorValue, ParentEditorModel>;\n private readonly _options?: FieldValidationDescriptorOptsType;\n\n constructor(\n name: string,\n validator?: FieldBaseValidator<FieldValue, EditorValue, ParentEditorModel> | FieldAsyncBaseValidator<FieldValue, EditorValue, ParentEditorModel>,\n message?: FieldValidationMessage<FieldValue, EditorValue, ParentEditorModel>,\n options?: FieldValidationDescriptorOptsType\n ) {\n this._name = name;\n this._validator = validator;\n this._message = message;\n this._options = options;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public get validator() {\n return this._validator;\n }\n\n public get message() {\n return this._message;\n }\n\n public get options() {\n return this._options;\n }\n\n public copy(): FieldValidationDescriptor<FieldValue, EditorValue, ParentEditorModel> {\n const opt = this._options ? {...this._options} : undefined;\n return new FieldValidationDescriptor<FieldValue, EditorValue, ParentEditorModel>(this._name, this._validator, this._message, opt);\n }\n}\n","import {FormControl, FormGroup} from '@angular/forms';\n\nimport {FieldType, FormlyFieldConfig} from '@ngx-formly/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {GetterFn, objectDeepCopy} from '@mediusinc/mng-commons/core';\n\nimport {FieldAsyncBaseValidator, FieldAsyncValidator, FieldBaseValidator, FieldValidationMessage, FieldValidator} from '../models/field-validation.model';\nimport {FieldConfig, FieldSizeEnum} from '../models/field.model';\nimport {FormFieldEvent, FormFieldEventData, FormFieldEventTypeEnum} from '../models/form-editor.event';\nimport {CommonsFormlyFieldConfig, CommonsFormlyHookFn} from '../models/formly-field.model';\nimport {FieldValidationDescriptor} from './field-validation.descriptor';\n\nexport const fieldDescriptorEmptyLabelType = '_emptyLabel';\n\nexport abstract class AGenericFieldDescriptor {\n protected _config: FieldConfig = {};\n protected _formlyConfig: FormlyFieldConfig = {};\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n protected constructor() {}\n\n public get config() {\n return this._config;\n }\n\n public get formlyConfig() {\n return this._formlyConfig;\n }\n\n public withConfig(config: FieldConfig): this {\n this._config = config;\n return this;\n }\n\n public withFormlyConfig(formlyConfig: FormlyFieldConfig): this {\n this._formlyConfig = formlyConfig;\n return this;\n }\n\n /**\n * Override toJSON implementation to prevent overflow with circular dependency.\n * @ignore\n */\n protected toJSON(): string {\n const jsonObj = {\n ...this,\n _editor: undefined\n };\n const jsonObjStr = JSON.stringify(jsonObj);\n return jsonObjStr;\n }\n}\n\nexport type FieldValidationOptsType = {\n forceShowMessage?: boolean;\n};\n\nexport type FieldClassNameType = {\n field?: string;\n grid?: string;\n wrapper?: string;\n label?: string;\n control?: string;\n input?: string;\n};\n\nexport abstract class AFieldDescriptor<FieldModel, EditorModel, FieldValue = FieldModel, ParentEditorModel = undefined> extends AGenericFieldDescriptor {\n /** @ignore */ protected readonly _property: string;\n /** @ignore */ protected _label?: string | null;\n /** @ignore */ protected _labelUseModelBase?: boolean;\n /** @ignore */ protected _labelInfoTooltip?: string;\n /** @ignore */ protected _labelInfoTooltipIcon?: string;\n\n /** @ignore */ protected _placeholder?: string;\n /** @ignore */ protected _helpText?: string;\n\n /** @ignore */ protected _required = false;\n /** @ignore */ protected _requiredHideLabelMarker = false;\n /** @ignore */ protected _disabled = false;\n /** @ignore */ protected _defaultValue?: FieldValue;\n /** @ignore */ protected _getter?: GetterFn<FieldValue, EditorModel>;\n /** @ignore */ protected _setter?: (item: EditorModel, value: FieldValue) => void;\n /** @ignore */ protected _validations: Array<FieldValidationDescriptor<any, any, any>> = [];\n /** @ignore */ protected _asyncValidations: Array<FieldValidationDescriptor<any, any, any>> = [];\n /** @ignore */ protected _validationOpts: FieldValidationOptsType = {};\n /** @ignore */ protected _requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n /** @ignore */ protected _disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n /** @ignore */ protected _hiddenExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n /** @ignore */ protected _hiddenResetOnHide?: boolean;\n /** @ignore */ protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n /** @ignore */ protected _onInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _onChanges?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _afterContentInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _afterViewInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _onDestroy?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n\n /** @ignore */ protected _onValueChange?: (field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: any) => void;\n\n /** @ignore */ protected _className?: FieldClassNameType;\n /** @ignore */ protected _size: FieldSizeEnum = FieldSizeEnum.Normal;\n\n // localization\n /** @ignore */ protected _isLocalized = false;\n\n /** @ignore */ protected readonly _eventsSubject = new Subject<FormFieldEvent<FieldValue, EditorModel, ParentEditorModel>>();\n\n protected constructor(property: string) {\n super();\n this._property = property;\n }\n\n public get property() {\n return this._property;\n }\n\n public get label() {\n return this._label;\n }\n\n public get labelUseModelBase() {\n return this._labelUseModelBase;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get helpText() {\n return this._helpText;\n }\n\n public get labelInfoTooltip() {\n return this._labelInfoTooltip;\n }\n\n public get labelInfoTooltipIcon() {\n return this._labelInfoTooltipIcon;\n }\n\n public get required() {\n return this._required;\n }\n\n public get requiredHideLabelMarker() {\n return this._requiredHideLabelMarker;\n }\n\n public get disabled() {\n return this._disabled;\n }\n\n public get defaultValue() {\n return this._defaultValue;\n }\n\n public get getter() {\n return this._getter;\n }\n\n public get setter() {\n return this._setter;\n }\n\n public get validations() {\n return this._validations;\n }\n\n public get asyncValidations() {\n return this._asyncValidations;\n }\n\n public get validationOpts() {\n return this._validationOpts;\n }\n\n public get requiredExpression() {\n return this._requiredExpression;\n }\n\n public get disabledExpression() {\n return this._disabledExpression;\n }\n\n public get hiddenExpression() {\n return this._hiddenExpression;\n }\n\n public get hiddenResetOnHide() {\n return this._hiddenResetOnHide;\n }\n\n public get updateOn() {\n return this._updateOn;\n }\n\n public get onInit() {\n return this._onInit;\n }\n\n public get onChanges() {\n return this._onChanges;\n }\n\n public get afterContentInit() {\n return this._afterContentInit;\n }\n\n public get afterViewInit() {\n return this._afterViewInit;\n }\n\n public get onDestroy() {\n return this._onDestroy;\n }\n\n public get onValueChange() {\n return this._onValueChange;\n }\n\n public get className() {\n return this._className;\n }\n\n public get size() {\n return this._size;\n }\n\n public get isSizeSmall() {\n return this._size === FieldSizeEnum.Small;\n }\n\n public get isSizeLarge() {\n return this._size === FieldSizeEnum.Large;\n }\n\n public get isLocalized() {\n return this._isLocalized;\n }\n\n public abstract copy(): AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>;\n\n /**\n * Set label for field.\n * @param label Full label (i18n path or other string). If null, no label will be used.\n * @param useModelBase If set to true, label will be appended to model's i18n base path.\n */\n public withLabel(label: string | null, useModelBase?: boolean): this {\n this._label = label;\n this._labelUseModelBase = useModelBase;\n return this;\n }\n\n public withEmptyLabel(): this {\n this._label = fieldDescriptorEmptyLabelType;\n return this;\n }\n\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withHelpText(helpText: string): this {\n this._helpText = helpText;\n return this;\n }\n\n /**\n * Sets the label tooltip and optionally a custom icon for the field.\n *\n * @param {string} tooltip - The tooltip text to be displayed.\n * @param {string} [customIcon] - An optional custom icon to be used for the tooltip. If not provided, the default icon is used.\n */\n public withLabelInfoTooltip(tooltip: string, customIcon?: string): this {\n this._labelInfoTooltip = tooltip;\n this._labelInfoTooltipIcon = customIcon ?? this._labelInfoTooltipIcon;\n return this;\n }\n\n public withRequired(required = true, requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, hideLabelMarker = false): this {\n this._required = required;\n if (requiredExpression) {\n this._requiredExpression = requiredExpression;\n }\n this._requiredHideLabelMarker = hideLabelMarker;\n return this;\n }\n\n public withDisabled(disabled = true, disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._disabled = disabled;\n if (disabledExpression) {\n this._disabledExpression = disabledExpression;\n }\n return this;\n }\n\n public withHidden(hiddenExpression: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, resetOnHide?: boolean): this {\n this._hiddenExpression = hiddenExpression;\n this._hiddenResetOnHide = resetOnHide;\n return this;\n }\n\n public withUpdateOn(updateOn: 'change' | 'blur' | 'submit'): this {\n this._updateOn = updateOn;\n return this;\n }\n\n public withOnInit(onInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._onInit = onInit;\n return this;\n }\n\n public withOnChanges(onChanges?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._onChanges = onChanges;\n return this;\n }\n\n public withAfterContentInit(afterContentInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._afterContentInit = afterContentInit;\n return this;\n }\n\n public withAfterViewInit(afterViewInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._afterViewInit = afterViewInit;\n return this;\n }\n\n public withOnDestroy(onDestroy?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._onDestroy = onDestroy;\n return this;\n }\n\n public withOnValueChange(onValueChange?: (field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: FieldValue) => void): this {\n this._onValueChange = onValueChange;\n return this;\n }\n\n public withDefaultValue(defaultValue: FieldValue): this {\n this._defaultValue = defaultValue;\n return this;\n }\n\n public withGetter(fn?: GetterFn<FieldValue, EditorModel>): this {\n this._getter = fn;\n return this;\n }\n\n public withSetter(fn?: (item: EditorModel, value: FieldValue) => void): this {\n this._setter = fn;\n return this;\n }\n\n public withValidation<Value = FieldValue, EditorValue = EditorModel>(\n name: string,\n validator?: FieldValidator<Value, EditorValue, ParentEditorModel>,\n message?: FieldValidationMessage<Value, EditorValue, ParentEditorModel>\n ): this {\n this._validations.push(new FieldValidationDescriptor(name, validator as FieldBaseValidator<Value, EditorValue, ParentEditorModel>, message));\n return this;\n }\n\n public removeValidation(name: string): this {\n this._validations = this._validations.filter(v => v.name !== name);\n return this;\n }\n\n public withAsyncValidation<Value = FieldValue, EditorValue = EditorModel>(\n name: string,\n asyncValidator?: FieldAsyncValidator<Value, EditorValue>,\n message?: FieldValidationMessage<Value, EditorValue>\n ): this {\n this._asyncValidations.push(new FieldValidationDescriptor(name, asyncValidator as FieldAsyncBaseValidator<Value, EditorValue>, message));\n return this;\n }\n\n public removeAsyncValidation(name: string): this {\n this._asyncValidations = this._asyncValidations.filter(v => v.name !== name);\n return this;\n }\n\n public withValidationOpts(validationOpts: FieldValidationOptsType): this {\n this._validationOpts = validationOpts;\n return this;\n }\n\n public withClassName(opts?: string | FieldClassNameType): this {\n if (typeof opts === 'string') {\n this._className = {\n grid: opts\n };\n } else {\n this._className = opts;\n }\n return this;\n }\n\n public withSize(size: FieldSizeEnum = FieldSizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n /**\n * This function adds an icon with text Show all translations above the field and after clicking on it, it displays a new dialog with tableview.\n * This new table view shows all available translations for specific property and allows editing it.\n */\n public localized(): this {\n this._isLocalized = true;\n return this;\n }\n\n public nextEvent(\n type: FormFieldEventTypeEnum,\n component: FieldType<CommonsFormlyFieldConfig<FieldValue, EditorModel, any>>,\n data?: FormFieldEventData<FieldValue, EditorModel>\n ) {\n this._eventsSubject.next({\n type: type,\n fieldComponent: component,\n formComponent: component.props.formEditorComponent,\n form: component?.form as FormGroup,\n fieldFormControl: component.formControl as FormControl,\n fieldFormlyConfig: component.field,\n data: data\n });\n }\n\n public get events$() {\n return this._eventsSubject.asObservable();\n }\n\n protected copyFieldsTo(obj: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>) {\n obj._config = objectDeepCopy(this._config);\n obj._formlyConfig = objectDeepCopy(this._formlyConfig);\n obj._label = this._label;\n obj._placeholder = this._placeholder;\n obj._labelInfoTooltip = this._labelInfoTooltip;\n obj._labelInfoTooltipIcon = this._labelInfoTooltipIcon;\n obj._helpText = this._helpText;\n obj._required = this._required;\n obj._disabled = this._disabled;\n obj._defaultValue = this._defaultValue;\n obj._requiredExpression = this._requiredExpression;\n obj._hiddenExpression = this._hiddenExpression;\n obj._hiddenResetOnHide = this._hiddenResetOnHide;\n obj._updateOn = this._updateOn;\n obj._onInit = this._onInit;\n obj._onChanges = this._onChanges;\n obj._onDestroy = this._onDestroy;\n obj._afterContentInit = this._afterContentInit;\n obj._afterViewInit = this._afterViewInit;\n obj._onValueChange = this._onValueChange;\n obj._disabledExpression = this._disabledExpression;\n obj._className = this._className ? {...this._className} : undefined;\n obj._size = this.size;\n obj._getter = this._getter;\n obj._setter = this._setter;\n obj._isLocalized = this._isLocalized;\n obj._validations = this._validations.map(value => value.copy());\n obj._asyncValidations = this._asyncValidations.map(value => value.copy());\n obj._validationOpts = {...this._validationOpts};\n }\n}\n","import {ButtonSeverity} from 'primeng/button';\nimport {Observable} from 'rxjs';\n\nimport {IActionButtonDescriptor} from '@mediusinc/mng-commons/form/api';\n\nimport {FieldActionContext, FieldActionResult} from '../models/field-action-context.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldActionRunFnType<EditorModel, ParentEditorModel = undefined> = (\n ctx: FieldActionContext<EditorModel, ParentEditorModel>\n) => void | FieldActionResult | Observable<FieldActionResult>;\n\nexport class FieldActionDescriptor<EditorModel, ParentEditorModel = undefined> extends AFieldDescriptor<void, EditorModel, void, ParentEditorModel> {\n protected readonly _fieldActionName: string;\n\n protected _button?: IActionButtonDescriptor;\n\n protected _runFunction?: FieldActionRunFnType<EditorModel>;\n\n private _wrappers = ['field'];\n\n constructor(property: string) {\n super(property);\n this._fieldActionName = property;\n }\n\n public get button() {\n return this._button;\n }\n\n public get runFunction() {\n return this._runFunction;\n }\n\n public get wrappers() {\n return this._wrappers;\n }\n\n public withButton(label?: string | null, icon: string | null = null, severity?: ButtonSeverity): this {\n this._button = {\n ...this._button,\n label,\n icon,\n style: {\n ...this._button?.style,\n severity: severity\n }\n };\n return this;\n }\n\n public withButtonOpts(button?: IActionButtonDescriptor): this {\n this._button = button;\n return this;\n }\n\n public withRunFunction(fn: FieldActionRunFnType<EditorModel>): this {\n this._runFunction = fn;\n return this;\n }\n\n public withWrappers(wrappers: string[]): this {\n this._wrappers = wrappers;\n return this;\n }\n\n public copy(): FieldActionDescriptor<EditorModel, ParentEditorModel> {\n const field = new FieldActionDescriptor<EditorModel, ParentEditorModel>(this._property);\n this.copyFieldsTo(field);\n field._button = {...this._button, style: {...this._button?.style}};\n field._runFunction = this._runFunction?.bind(field);\n field._wrappers = [...this._wrappers];\n return field;\n }\n}\n","import {Observable} from 'rxjs';\n\nimport {objectDeepCopy} from '@mediusinc/mng-commons/core';\n\nimport {EDITOR_DEFAULT_GROUP_NAME} from '../models/editor.model';\nimport {FieldBaseValidator, FormValidationMessage, FormValidator} from '../models/field-validation.model';\nimport {FieldGroupTypeEnum} from '../models/field.model';\nimport {CommonsFormlyFieldConfig} from '../models/formly-field.model';\nimport {AFieldDescriptor, AGenericFieldDescriptor, FieldValidationOptsType} from './field-base.descriptor';\nimport {FieldValidationDescriptor, FieldValidationDescriptorOptsType} from './field-validation.descriptor';\n\nexport abstract class AFieldGroupDescriptor<EditorModel, ParentEditorModel = undefined> extends AGenericFieldDescriptor {\n protected readonly _name: string;\n protected readonly _default: boolean;\n protected _title?: string | null;\n protected _fields: AGenericFieldDescriptor[] = [];\n protected _validations: Array<FieldValidationDescriptor<any, any, any>> = [];\n protected _validationOpts: FieldValidationOptsType = {};\n protected _hiddenExpression?: string | ((field?: CommonsFormlyFieldConfig<EditorModel, EditorModel>) => boolean) | Observable<boolean>;\n\n protected constructor(name: string) {\n super();\n this._name = name;\n this._default = name === EDITOR_DEFAULT_GROUP_NAME;\n }\n\n public removeField(property: string, filterFunction: (fields: AGenericFieldDescriptor[]) => AGenericFieldDescriptor[]): AGenericFieldDescriptor[] {\n this._fields = filterFunction(this._fields);\n return this._fields;\n }\n\n public get title() {\n return this._title;\n }\n\n abstract get type(): FieldGroupTypeEnum;\n\n abstract get fields(): AGenericFieldDescriptor[];\n\n public get validations() {\n return this._validations;\n }\n\n public get validationOpts() {\n return this._validationOpts;\n }\n\n public get name() {\n return this._name;\n }\n\n public get default() {\n return this._default;\n }\n\n public get hiddenExpression() {\n return this._hiddenExpression;\n }\n\n abstract addField(field: AGenericFieldDescriptor): this;\n\n abstract copy(): AFieldGroupDescriptor<EditorModel, ParentEditorModel>;\n\n public withTitle(title?: string | null): this {\n this._title = title;\n return this;\n }\n\n public withValidation<Value = EditorModel, ParentValue = ParentEditorModel>(\n name: string,\n validator?: FormValidator<Value, ParentValue>,\n message?: FormValidationMessage<Value, ParentValue>,\n opts?: FieldValidationDescriptorOptsType\n ) {\n this._validations.push(\n new FieldValidationDescriptor<Value, Value, ParentValue>(name, validator as FieldBaseValidator<Value, Value, ParentValue> | undefined, message, opts)\n );\n return this;\n }\n\n public withValidationOpts(validationOpts: FieldValidationOptsType): this {\n this._validationOpts = validationOpts;\n return this;\n }\n\n public withHidden(hiddenExpression: string | ((field?: CommonsFormlyFieldConfig<EditorModel, EditorModel>) => boolean) | Observable<boolean>): this {\n this._hiddenExpression = hiddenExpression;\n return this;\n }\n}\n\nexport class FieldTabGroupDescriptor<EditorModel> extends AFieldGroupDescriptor<EditorModel> {\n protected override _fields: FieldGroupDescriptor<EditorModel>[] = [];\n\n constructor(name: string) {\n super(name);\n }\n\n public override get type() {\n return FieldGroupTypeEnum.Tab;\n }\n\n public get fields(): Array<FieldGroupDescriptor<EditorModel>> {\n return this._fields as Array<FieldGroupDescriptor<EditorModel>>;\n }\n\n public addField(field: FieldGroupDescriptor<EditorModel>): this {\n this._fields.push(field);\n return this;\n }\n\n public copy(skipFields = false): FieldTabGroupDescriptor<EditorModel> {\n const tab = new FieldTabGroupDescriptor<EditorModel>(this.name);\n tab._config = objectDeepCopy(this._config);\n tab._formlyConfig = objectDeepCopy(this._formlyConfig);\n tab._title = this._title;\n tab._fields = this.fields.map(f => f.copy(skipFields));\n tab._validations = this.validations.map(v => v.copy());\n tab._validationOpts = {...this._validationOpts};\n tab._hiddenExpression = this._hiddenExpression;\n\n return tab;\n }\n}\n\ntype FieldGroupClassNameType = {\n grid?: string;\n};\n\nexport class FieldGroupDescriptor<EditorModel, ParentEditorModel = undefined> extends AFieldGroupDescriptor<EditorModel, ParentEditorModel> {\n private _type = FieldGroupTypeEnum.Fieldset;\n\n protected _className?: FieldGroupClassNameType;\n\n constructor(name: string) {\n super(name);\n if (this._default) {\n this.asLogical();\n }\n }\n\n public override get type() {\n return this._type;\n }\n\n public get fields(): Array<AFieldDescriptor<any, EditorModel>> {\n return this._fields as Array<AFieldDescriptor<any, EditorModel>>;\n }\n\n /**\n * Styling class name configurations for group.\n */\n public get className() {\n return this._className;\n }\n\n public addField(field: AFieldDescriptor<any, EditorModel>): this {\n this._fields.push(field);\n return this;\n }\n\n public asLogical(): this {\n this._type = FieldGroupTypeEnum.Logical;\n return this;\n }\n\n public withClassName(opts?: string | FieldGroupClassNameType): this {\n if (typeof opts === 'string') {\n this._className = {\n grid: opts\n };\n } else {\n this._className = opts;\n }\n return this;\n }\n\n public copy(skipFields = false): FieldGroupDescriptor<EditorModel> {\n const group = new FieldGroupDescriptor<EditorModel>(this.name);\n group._config = objectDeepCopy(this._config);\n group._formlyConfig = objectDeepCopy(this._formlyConfig);\n group._type = this._type;\n group._title = this._title;\n group._hiddenExpression = this._hiddenExpression;\n\n if (!skipFields) {\n group._fields = this.fields.map(f => f.copy());\n }\n group._validations = this.validations.map(v => v.copy());\n group._validationOpts = {...this._validationOpts};\n\n group._className = this._className ? {...this._className} : undefined;\n\n return group;\n }\n}\n","import {\n EnumConstantType,\n EnumValue,\n IDataProvider,\n ILookupDataProvider,\n ILookupDescriptor,\n LookupDataProviderLookupFnType,\n ServiceClassType,\n fromEnumConstantsAsValueArray,\n fromEnumValuesAsValueArray,\n getEnumConstantName\n} from '@mediusinc/mng-commons/core';\nimport {InputTrimType, LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\nimport {ITableDataProvider, TableDescriptorInst, TableSizeEnum} from '@mediusinc/mng-commons/table/api';\n\nimport {FieldLookupConfig, FieldLookupTypeEnum} from '../models/field.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldLookupDescriptorConstructorOptsType<EditorModel, Service, Sorts, Filters extends keyof any> = FieldLookupDescriptorCreateOptsProviderType<\n EditorModel,\n Service,\n Sorts,\n Filters\n> & {\n optionsValueProperty?: string;\n};\n\nexport type FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service, Sorts = keyof FieldModel, Filters extends keyof any = keyof FieldModel> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: ILookupDataProvider<FieldModel, Service, Sorts, Filters>;\n};\n\nexport type FieldLookupProviderType<FieldModel, Service> = ServiceClassType<Service> | ILookupDataProvider<FieldModel, Service, any, any>;\n\nexport type FieldLookupAutocompleteOptsType = {\n openOnFocus?: boolean;\n inlineSearch?: boolean;\n selectFirst?: boolean;\n autoClear?: boolean;\n};\n\nexport const fieldLookupGetProviderCfgObj = <FieldModel, Service>(serviceOrDataProvider?: FieldLookupProviderType<FieldModel, Service>) => {\n const cfg: FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.dataProvider = serviceOrDataProvider as ILookupDataProvider<FieldModel, Service>;\n } else {\n cfg.serviceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\nexport class FieldLookupDescriptor<\n FieldModel,\n EditorModel,\n Service = any,\n FieldValue = FieldModel,\n ParentEditorModel = undefined,\n Sorts = keyof FieldModel,\n Filters extends keyof any = keyof FieldModel\n>\n extends AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>\n implements ILookupDescriptor<FieldModel, Service, Sorts, Filters>\n{\n protected readonly _dataProvider: ILookupDataProvider<FieldModel, Service, Sorts, Filters>;\n protected readonly _optionsValueProperty?: string; // this defines VT!\n\n protected _lookupType: FieldLookupTypeEnum = FieldLookupTypeEnum.Dropdown;\n protected _optionsLabelProperty?: string;\n protected _optionsLabelTranslate = false;\n protected _optionsDisabledProperty?: string;\n protected _optionsTrackProperty?: string;\n\n protected _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus?: boolean;\n protected _autocompleteInlineSearch?: boolean;\n protected _autocompleteAutoClear?: boolean;\n protected _autocompleteSelectFirst?: boolean;\n protected _autocompleteInputTrim?: InputTrimType;\n\n protected _dialogTableDescriptor?: TableDescriptorInst<FieldModel, any, any>;\n protected _dialogTableDataProvider?: ITableDataProvider<FieldModel, any, any, any>;\n\n protected _customComponentName?: string;\n\n constructor(property: string, cfg?: FieldLookupDescriptorConstructorOptsType<FieldModel, Service, Sorts, Filters>) {\n super(property as string);\n\n if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n } else {\n this._dataProvider = new LookupDataProviderInst(cfg?.serviceType);\n }\n\n this._optionsValueProperty = cfg?.optionsValueProperty;\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get optionsLabelProperty() {\n return this._optionsLabelProperty;\n }\n\n public get optionsLabelTranslate() {\n return this._optionsLabelTranslate;\n }\n\n public get optionsValueProperty() {\n return this._optionsValueProperty;\n }\n\n public get optionsDisabledProperty() {\n return this._optionsDisabledProperty;\n }\n\n public get optionsTrackProperty() {\n return this._optionsTrackProperty;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public get autocompleteAutoClear() {\n return this._autocompleteAutoClear;\n }\n\n public get autocompleteSelectFirst() {\n return this._autocompleteSelectFirst;\n }\n\n public get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public get dialogTableDescriptor() {\n return this._dialogTableDescriptor;\n }\n\n public get dialogTableDataProvider() {\n return this._dialogTableDataProvider;\n }\n\n public get customComponentName() {\n return this._customComponentName;\n }\n\n public get trimOption() {\n return this._autocompleteInputTrim;\n }\n\n public withOptionsLabelProperty(property: keyof FieldModel, translate = false): this {\n return this.withOptionsLabelPropertyUnsafe(property as string, translate);\n }\n\n public withOptionsLabelPropertyUnsafe(property: string, translate = false): this {\n this._optionsLabelProperty = property;\n this._optionsLabelTranslate = translate;\n return this;\n }\n\n public withOptionsDisabledProperty(property: keyof FieldModel): this {\n return this.withOptionsDisabledPropertyUnsafe(property as string);\n }\n\n public withOptionsDisabledPropertyUnsafe(property: string): this {\n this._optionsDisabledProperty = property;\n return this;\n }\n\n public withOptionsTrackProperty(property: keyof FieldModel): this {\n return this.withOptionsTrackPropertyUnsafe(property as string);\n }\n\n public withOptionsTrackPropertyUnsafe(property: string): this {\n if (this._optionsValueProperty) {\n return this;\n }\n this._optionsTrackProperty = property;\n return this;\n }\n\n public withLookup(lookup?: LookupDataProviderLookupFnType<FieldModel, Service, Sorts, Filters>): this {\n this._dataProvider.withLookup(lookup);\n return this;\n }\n\n public withInputTrim(trimOption: InputTrimType = 'both'): this {\n this._autocompleteInputTrim = trimOption;\n return this;\n }\n\n public override withConfig(config: FieldLookupConfig): this {\n return super.withConfig(config);\n }\n\n public asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this {\n this._lookupType = FieldLookupTypeEnum.Autocomplete;\n this._autocompleteAutoClear = opts?.autoClear;\n this._autocompleteSelectFirst = opts?.selectFirst;\n this._autocompleteOpenOnFocus = opts?.openOnFocus;\n this._autocompleteInlineSearch = opts?.inlineSearch;\n return this;\n }\n\n public asDialog<Sorts = keyof FieldModel, Filters extends keyof any = keyof FieldModel>(\n lookupTableDescriptor: TableDescriptorInst<FieldModel, Sorts, Filters>,\n tableDataProvider?: ITableDataProvider<FieldModel, any, Sorts, Filters>\n ): this {\n this._lookupType = FieldLookupTypeEnum.Dialog;\n this._dialogTableDescriptor = lookupTableDescriptor;\n this._dialogTableDataProvider = tableDataProvider;\n\n // change default sizing\n if (this._dialogTableDescriptor.size == null) {\n this._dialogTableDescriptor.withSize(TableSizeEnum.Normal);\n }\n\n return this;\n }\n\n public asCustomComponent(customComponentName: string): this {\n this._lookupType = FieldLookupTypeEnum.Custom;\n this._customComponentName = customComponentName;\n return this;\n }\n\n public copy(): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel, Sorts, Filters> {\n const field = new FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel, Sorts, Filters>(this._property, {\n dataProvider: this._dataProvider,\n optionsValueProperty: this._optionsValueProperty\n });\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._optionsLabelProperty = this._optionsLabelProperty;\n field._optionsLabelTranslate = this._optionsLabelTranslate;\n field._optionsDisabledProperty = this._optionsDisabledProperty;\n field._optionsTrackProperty = this._optionsTrackProperty;\n field._dropdownClassName = this._dropdownClassName;\n field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n field._autocompleteInlineSearch = this._autocompleteInlineSearch;\n field._dialogTableDescriptor = this._dialogTableDescriptor;\n return field;\n }\n}\n\nexport class FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel = undefined> extends FieldLookupDescriptor<\n EnumValue,\n EditorModel,\n undefined,\n EnumConstantType,\n ParentEditorModel,\n never,\n never\n> {\n private readonly _enumModel: EnumDescriptor<Enum>;\n private readonly _optionEnumValues: EnumValue[];\n private readonly _options: Enum[] | undefined; // used to ensure proper copying\n\n constructor(property: string, enumModel: EnumDescriptor<Enum>, options?: Array<Enum>) {\n super(property, {\n dataProvider: new LookupDataProviderInst<EnumValue, undefined, never, never, undefined>(undefined),\n optionsValueProperty: 'value'\n });\n this._enumModel = enumModel;\n this._options = options;\n this._optionEnumValues = Array.isArray(options)\n ? fromEnumValuesAsValueArray<Enum>(this._enumModel.type, options, this._enumModel.nameAsValue, this._enumModel.i18nBaseKey ?? undefined)\n : fromEnumConstantsAsValueArray(this._enumModel.type, this._enumModel.nameAsValue, this._enumModel.i18nBaseKey ?? undefined);\n this.withLookup(() => this._optionEnumValues);\n this.withOptionsLabelProperty('title', this._enumModel.i18nBaseKey !== null);\n this.withOptionsDisabledProperty('disabled');\n }\n\n public get enumModel() {\n return this._enumModel;\n }\n\n public withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this {\n for (const disabledOption of disabledOptions) {\n const disabledOptionValue = this._enumModel.nameAsValue ? getEnumConstantName(this._enumModel.type, disabledOption) : disabledOption;\n if (disabledOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);\n if (option) {\n option.disabled = true;\n }\n }\n }\n return this;\n }\n\n public withDefaultValueEnum(defaultValue: EnumConstantType): this {\n const defaultOptionValue = this._enumModel.nameAsValue ? getEnumConstantName(this._enumModel.type, defaultValue) : defaultValue;\n if (defaultOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === defaultOptionValue);\n if (option) {\n this.withDefaultValue(option[this._optionsValueProperty as keyof object]);\n }\n }\n return this;\n }\n\n public override asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this {\n super.asAutocomplete({\n ...opts,\n openOnFocus: opts?.openOnFocus ?? true,\n inlineSearch: opts?.inlineSearch ?? true\n });\n return this;\n }\n\n public override copy(): FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel> {\n const field = new FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel>(this._property, this._enumModel, this._options);\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._optionsLabelProperty = this._optionsLabelProperty;\n field._optionsDisabledProperty = this._optionsDisabledProperty;\n field._optionsTrackProperty = this._optionsTrackProperty;\n return field;\n }\n}\n","import {IDataProvider, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ITableDataProvider, TableDataProviderGetAllFnType, TableDataProviderInst, TableDescriptorInst, TableSizeEnum} from '@mediusinc/mng-commons/table/api';\n\nimport {ActionDescriptorInst} from '../../action/descriptors/action.descriptor';\nimport {TableviewDescriptorInst} from '../../tableview/descriptors/tableview.descriptor';\nimport {FieldManyEditorActionEnum, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorTypeEnum} from '../models/field.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldManyToManyEditorDescriptorConstructorOptsType<FieldModel, Service> = FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service>;\n\nexport type FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service> = {\n lookupServiceType?: ServiceClassType<Service>;\n lookupDataProvider?: ITableDataProvider<FieldModel, Service>;\n};\n\nexport type FieldManyToManyEditorProviderType<FieldModel, Service> = ServiceClassType<Service> | ITableDataProvider<FieldModel, Service>;\n\nexport const fieldManyToManyGetProviderCfgObj = <FieldModel, Service>(serviceOrDataProvider?: FieldManyToManyEditorProviderType<FieldModel, Service>) => {\n const cfg: FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.lookupDataProvider = serviceOrDataProvider as ITableDataProvider<FieldModel, Service>;\n } else {\n cfg.lookupServiceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\nexport class FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service = any, FieldValue = FieldModel[], ParentEditorModel = undefined> extends AFieldDescriptor<\n FieldModel,\n EditorModel,\n FieldValue,\n ParentEditorModel\n> {\n private readonly _mainTableDescriptor: TableDescriptorInst<FieldModel>; // table descriptor for main table component\n private readonly _lookupTableDescriptor: TableDescriptorInst<FieldModel>; // table descriptor for where select will be applied\n private readonly _lookupTableDataProvider: ITableDataProvider<FieldModel, Service>;\n private _fieldType: FieldManyToManyEditorTypeEnum = FieldManyToManyEditorTypeEnum.DialogTableMultiselect;\n private _actions: Array<FieldManyToManyEditorActionEnum> = [FieldManyToManyEditorActionEnum.Add, FieldManyToManyEditorActionEnum.Delete];\n private _hasLookupExcludeValues = false;\n private _excludeFilterProperty = '';\n private _excludeValueProperty = '';\n\n constructor(\n property: string,\n mainTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel>,\n cfg?: FieldManyToManyEditorDescriptorConstructorOptsType<FieldModel, Service>\n ) {\n super(property);\n this._mainTableDescriptor = mainTableDescriptor;\n this._lookupTableDescriptor = lookupTableDescriptor;\n\n if (cfg?.lookupDataProvider) {\n this._lookupTableDataProvider = cfg.lookupDataProvider;\n } else {\n this._lookupTableDataProvider = new TableDataProviderInst(cfg?.lookupServiceType);\n }\n\n // change default sizing if not set\n if (this._mainTableDescriptor.size == null) {\n this._mainTableDescriptor.withSize(TableSizeEnum.Normal);\n }\n if (this._lookupTableDescriptor.size == null) {\n this._lookupTableDescriptor.withSize(TableSizeEnum.Normal);\n }\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get hasLookupExcludeValues() {\n return this._hasLookupExcludeValues;\n }\n\n public get excludeFilterProperty() {\n return this._excludeFilterProperty;\n }\n\n public get excludeValueProperty() {\n return this._excludeValueProperty;\n }\n\n public get mainTableDescriptor() {\n return this._mainTableDescriptor;\n }\n\n public get lookupTableDescriptor() {\n return this._lookupTableDescriptor;\n }\n\n public get lookupTableDataProvider() {\n return this._lookupTableDataProvider;\n }\n\n public withLookup(fn: TableDataProviderGetAllFnType<FieldModel, Service>): this {\n this._lookupTableDataProvider.withGetAll(fn);\n return this;\n }\n\n public withActions(actions: Array<FieldManyToManyEditorActionEnum> = []): this {\n this.actions.push(...actions);\n return this;\n }\n\n public withLookupExclude(filterProperty: keyof FieldModel, valueProperty: keyof FieldModel, hasLookupExclude = true): this {\n return this.withLookupExcludeUnsafe(filterProperty as string, valueProperty as string, hasLookupExclude);\n }\n\n public withLookupExcludeUnsafe(filterProperty: string, valueProperty: string, hasLookupExclude = true): this {\n this._hasLookupExcludeValues = hasLookupExclude;\n this._excludeFilterProperty = filterProperty;\n this._excludeValueProperty = valueProperty;\n return this;\n }\n\n public copy(): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel> {\n const field = new FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel>(\n this._property,\n this._mainTableDescriptor.copy(),\n this._lookupTableDescriptor.copy(),\n {\n lookupDataProvider: this.lookupTableDataProvider\n }\n );\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._actions = this._actions.map(a => a);\n field._hasLookupExcludeValues = this._hasLookupExcludeValues;\n field._excludeFilterProperty = this._excludeFilterProperty;\n field._excludeValueProperty = this._excludeValueProperty;\n return field;\n }\n}\n\nexport class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue = FieldModel[], ParentEditorModel = undefined> extends AFieldDescriptor<\n FieldModel,\n EditorModel,\n FieldValue,\n ParentEditorModel\n> {\n private readonly _tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>;\n private _fieldType: FieldManyEditorTypeEnum = FieldManyEditorTypeEnum.DialogEditor;\n private _fieldActions: Array<FieldManyEditorActionEnum> = [];\n // we allow any action (item is not defined, the same goes for other generics). Developer should define types depending on action's specifics\n private _actions: Array<ActionDescriptorInst<any>> = [];\n\n constructor(property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>) {\n super(property);\n this._tableviewDescriptor = tableviewDescriptor;\n this._fieldActions.push(FieldManyEditorActionEnum.View, FieldManyEditorActionEnum.Add, FieldManyEditorActionEnum.Edit, FieldManyEditorActionEnum.Delete);\n\n // change default sizing\n if (this._tableviewDescriptor.table.size == null) {\n this._tableviewDescriptor.table.withSize(TableSizeEnum.Normal);\n }\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get fieldActions() {\n return this._fieldActions;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get tableviewDescriptor() {\n return this._tableviewDescriptor;\n }\n\n public get tableDescriptor() {\n return this._tableviewDescriptor.table;\n }\n\n public get editorForCreate() {\n return this._tableviewDescriptor.addEditor;\n }\n\n public get editorForRead() {\n return this._tableviewDescriptor.detailsEditor;\n }\n\n public get editorForUpdate() {\n return this._tableviewDescriptor.editEditor;\n }\n\n public withFieldAction(action: FieldManyEditorActionEnum): this {\n this._fieldActions.push(action);\n return this;\n }\n\n public withFieldActions(actions: FieldManyEditorActionEnum[]): this {\n this._fieldActions = actions;\n return this;\n }\n\n public withAction(action: ActionDescriptorInst<any>): this {\n this._actions.push(action);\n return this;\n }\n\n public copy(): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {\n const field = new FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>(this._property, this._tableviewDescriptor.copy());\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._fieldActions = this._fieldActions.map(a => a);\n field._actions = this._actions.map(a => a.copy());\n return field;\n }\n}\n","import {Type} from '@angular/core';\nimport {AbstractControl} from '@angular/forms';\n\nimport {ItemOrObservable, fromEnumConstantsAsValueArray, fromEnumValuesAsValueArray} from '@mediusinc/mng-commons/core';\nimport {EmptyValueType, InputTrimType} from '@mediusinc/mng-commons/form/api';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {FieldImagePreviewComponent} from '../models/field-image-preview.model';\nimport {FieldInputTypeEnum} from '../models/field.model';\nimport {AFormlyCustomFieldComponent} from '../models/formly-custom-field.model';\nimport {CommonsFormlyFieldConfig} from '../models/formly-field.model';\nimport {RadioValue} from '../models/radio.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldInputDescriptorType = string | string[] | number | boolean | Date | File | File[];\n\ntype FieldInputOptsType = {\n emptyValue?: EmptyValueType;\n};\n\ntype FieldInpuTextBaseOptsType = {\n trim?: InputTrimType;\n};\n\nexport type FieldInputTextOptsType = {\n email?: boolean;\n} & FieldInputTextValidationOptsType &\n FieldInpuTextBaseOptsType &\n FieldInputOptsType;\n\nexport type FieldInputTextareaOptsType = {\n rows?: number;\n} & FieldInputTextValidationOptsType &\n FieldInpuTextBaseOptsType &\n FieldInputOptsType;\n\nexport type FieldInputMaskOptsType = {\n mask: string;\n slotChar?: string;\n} & FieldInputOptsType;\n\nexport type FieldInputTextValidationOptsType = {\n minLength?: number;\n maxLength?: number;\n pattern?: string | RegExp;\n};\n\nexport type FieldInputDatePickerDisplayOptsType = {\n format?: string;\n showTime?: boolean;\n showSeconds?: boolean;\n showMilliseconds?: boolean;\n primeTimePicker?: boolean;\n timeSelectInterval?: number;\n timeSelect?: boolean;\n};\n\nexport type FieldInputDateValidationOptsType<FieldValue, EditorModel, ParentEditorModel> = {\n min?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n max?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n};\n\nexport type FieldInputCurrencyOptsType<Property = string> = {\n currencyProperty?: Property;\n currency?: string;\n currencyDisplay?: 'symbol' | 'code' | 'name';\n} & FieldInputNumberGroupingOptsType &\n FieldInputNumberFractionOptsType &\n FieldInputNumberValidationOptsType &\n FieldInputLocaleOptsType &\n FieldInputOptsType;\n\nexport type FieldInputNumberOptsType = FieldInputNumberGroupingOptsType &\n FieldInputNumberFractionOptsType &\n FieldInputNumberValidationOptsType &\n FieldInputLocaleOptsType &\n FieldInputNumberDisplayOptsType &\n FieldInputOptsType;\n\nexport type FieldInputNumberGroupingOptsType = {\n groupSeparator?: boolean;\n};\n\nexport type FieldInputNumberValidationOptsType = {\n min?: number;\n max?: number;\n step?: number;\n autoCorrect?: boolean;\n};\n\nexport type FieldInputNumberFractionOptsType = {\n minFractionDigits?: number;\n maxFractionDigits?: number;\n};\n\nexport type FieldInputLocaleOptsType = {\n locale?: string;\n};\n\nexport type FieldInputNumberDisplayOptsType = {\n prefix?: string;\n suffix?: string;\n};\n\nexport type FieldInputDatePickerOptsType<FieldValue, EditorModel, ParentEditorModel> = FieldInputDatePickerDisplayOptsType &\n FieldInputDateValidationOptsType<FieldValue, EditorModel, ParentEditorModel> &\n FieldDateOptsType;\n\nexport type FieldDateOptsType = {\n asDateObj?: boolean;\n utc?: boolean;\n noTime?: boolean;\n noTimeZone?: boolean;\n};\n\nexport type FieldInputFileOpts = {\n multiple?: boolean;\n maxFileSize?: number;\n accept?: string;\n onFileSelectHandlerFn?: FieldInputFileOnSelectHandlerFnType;\n preview?: boolean;\n previewAllowSvg?: boolean;\n previewComponent?: Type<FieldImagePreviewComponent>;\n};\n\nexport type FieldInputImageUrlOpts = {\n multiple?: boolean;\n preview?: boolean;\n inputVisibleOnDisabled?: boolean;\n previewAllowSvg?: boolean;\n previewComponent?: Type<FieldImagePreviewComponent>;\n};\n\nexport type FieldInputComponentOpts = {\n fieldWrappers?: string[];\n inputs?: Record<string, any>;\n};\n\nexport type FieldInputFileOnSelectHandlerFnType = (file: File[] | null, control: AbstractControl) => void;\nexport type FieldInputDatePickerDynamicMinMaxFnType<Value, FormValue, ParentFormValue> = (\n control: AbstractControl<Value>,\n field: CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>\n) => ItemOrObservable<Date | undefined>;\n\nexport class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDescriptorType, FieldValue = FieldModel, ParentEditorModel = undefined> extends AFieldDescriptor<\n FieldModel,\n EditorModel,\n FieldValue,\n ParentEditorModel\n> {\n private _fieldType: FieldInputTypeEnum = FieldInputTypeEnum.Text;\n\n // textarea specific properties\n private _rows?: number;\n\n // number specific properties\n private _numberMin?: number;\n private _numberMax?: number;\n private _numberStep?: number;\n private _numberAutoCorrect?: boolean;\n private _numberMinFractionDigits?: number;\n private _numberMaxFractionDigits?: number;\n private _numberUseGrouping = true;\n private _locale?: string;\n private _numberPrefix?: string;\n private _numberSuffix?: string;\n\n // currency specific properties\n private _currency?: string;\n private _currencyDisplay: 'symbol' | 'code' | 'name' = 'symbol';\n private _currencyFromProperty?: string;\n\n // radio specific properties\n private _radioOptions: Array<RadioValue> = [];\n private _radioLabelClassName?: string;\n\n // datepicker specific properties\n private _datePickerFormat?: string;\n private _datePickerMin?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n private _datePickerMax?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n private _datePickerShowTime?: boolean;\n private _datePickerShowSeconds?: boolean;\n private _datePickerShowMilliseconds?: boolean;\n private _datePickerPrimeTimePicker?: boolean;\n private _datePickerTimeSelectInterval?: number;\n private _datePickerTimeSelect?: boolean;\n private _datePickerValueUtc?: boolean;\n private _datePickerValueNoTimezone?: boolean;\n private _datePickerValueNoTime?: boolean;\n private _datePickerValueAsDateObj?: boolean;\n\n // input specific properties\n private _maxLength?: number;\n private _minLength?: number;\n private _pattern?: string | RegExp;\n private _validationEmail?: boolean;\n private _textTrim?: InputTrimType;\n\n // mask specific properties\n private _mask?: string;\n private _slotChar?: string;\n\n // file specific properties\n private _fileMultiple?: boolean;\n private _fileMaxFileSize?: number;\n private _fileAccept?: string;\n private _fileOnSelectHandler?: FieldInputFileOnSelectHandlerFnType;\n\n // image specific properties\n private _imagePreview?: boolean;\n private _imageUrlInputHiddenOnDisabled?: boolean;\n private _imagePreviewAllowSvg?: boolean;\n private _imagePreviewComponent?: Type<FieldImagePreviewComponent>;\n\n // custom component properties\n private _customComponentType?: Type<AFormlyCustomFieldComponent<FieldValue, EditorModel, ParentEditorModel>>;\n private _customComponentInputs?: Record<string, any>;\n private _customComponentWrappers?: string[];\n\n // value control\n private _emptyValue?: EmptyValueType;\n\n constructor(property: string) {\n super(property);\n }\n\n /**\n * converts field to given type with additional arguments\n * @param fieldType field type enum\n * @param args any additional arguments for field (optional)\n */\n public asType(fieldType: FieldInputTypeEnum, ...args: any[]): this {\n switch (fieldType) {\n case FieldInputTypeEnum.Hidden:\n return this.asHidden();\n case FieldInputTypeEnum.Label:\n return this.asLabel();\n case FieldInputTypeEnum.Textarea:\n return this.asTextarea(args[0]);\n case FieldInputTypeEnum.Number:\n return this.asNumber(args[0]);\n case FieldInputTypeEnum.Currency:\n return this.asCurrency(args[0]);\n case FieldInputTypeEnum.Switch:\n return this.asSwitch();\n case FieldInputTypeEnum.Radio:\n return this.asRadio(args[0], args[1]);\n case FieldInputTypeEnum.Datepicker:\n return this.asDatePicker(args[0]);\n case FieldInputTypeEnum.Mask:\n return this.asMask(args[0]);\n case FieldInputTypeEnum.File:\n return this.asFile(args[0]);\n case FieldInputTypeEnum.ImageFile:\n return this.asImageFile(args[0]);\n case FieldInputTypeEnum.ImageUrl:\n return this.asImageUrl(args[0]);\n case FieldInputTypeEnum.Custom:\n return this.asCustomComponent(args[0], args[1]);\n case FieldInputTypeEnum.Text:\n return this.asText(args[0]);\n }\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get rows() {\n return this._rows;\n }\n\n public get numberMin() {\n return this._numberMin;\n }\n\n public get numberMax() {\n return this._numberMax;\n }\n\n public get numberStep() {\n return this._numberStep;\n }\n\n public get numberAutoCorrect() {\n return this._numberAutoCorrect;\n }\n\n public get numberMinFractionDigits() {\n return this._numberMinFractionDigits;\n }\n\n public get numberMaxFractionDigits() {\n return this._numberMaxFractionDigits;\n }\n\n public get numberUseGrouping() {\n return this._numberUseGrouping;\n }\n\n public get numberPrefix() {\n return this._numberPrefix;\n }\n\n public get numberSuffix() {\n return this._numberSuffix;\n }\n\n public get radioOptions() {\n return this._radioOptions;\n }\n\n public get radioLabelClassName() {\n return this._radioLabelClassName;\n }\n\n public get datePickerFormat() {\n return this._datePickerFormat;\n }\n\n public get datePickerMin() {\n return this._datePickerMin;\n }\n\n public get datePickerMax() {\n return this._datePickerMax;\n }\n\n public get datePickerShowTime() {\n return this._datePickerShowTime;\n }\n\n public get datePickerShowSeconds() {\n return this._datePickerShowSeconds;\n }\n\n public get datePickerShowMilliseconds() {\n return this._datePickerShowMilliseconds;\n }\n\n public get datePickerPrimeTimePicker() {\n return this._datePickerPrimeTimePicker;\n }\n\n public get datePickerTimeSelect() {\n return this._datePickerTimeSelect;\n }\n\n public get datePickerTimeSelectInterval() {\n return this._datePickerTimeSelectInterval;\n }\n\n public get datePickerValueUtc() {\n return this._datePickerValueUtc;\n }\n\n public get datePickerValueNoTimezone() {\n return this._datePickerValueNoTimezone;\n }\n\n public get datePickerValueNoTime() {\n return this._datePickerValueNoTime;\n }\n\n public get datePickerValueAsDateObj() {\n return this._datePickerValueAsDateObj;\n }\n\n public get maxLength() {\n return this._maxLength;\n }\n\n public get minLength() {\n return this._minLength;\n }\n\n public get pattern() {\n return this._pattern;\n }\n\n public get textTrim() {\n return this._textTrim;\n }\n\n public get emptyValue() {\n return this._emptyValue;\n }\n\n public get validationEmail() {\n return this._validationEmail;\n }\n\n public get mask() {\n return this._mask;\n }\n\n public get slotChar() {\n return this._slotChar;\n }\n\n public get fileMultiple() {\n return this._fileMultiple;\n }\n\n public get fileMaxFileSize() {\n return this._fileMaxFileSize;\n }\n\n public get fileAccept() {\n return this._fileAccept;\n }\n\n public get fileOnSelectHandler() {\n return this._fileOnSelectHandler;\n }\n\n public get imagePreview() {\n return this._imagePreview;\n }\n\n public get imageUrlInputVisibleOnDisabled() {\n return this._imageUrlInputHiddenOnDisabled;\n }\n\n public get imagePreviewAllowSvg() {\n return this._imagePreviewAllowSvg;\n }\n\n public get imagePreviewComponent() {\n return this._imagePreviewComponent;\n }\n\n public get customComponentType() {\n return this._customComponentType;\n }\n\n public get customComponentInputs() {\n return this._customComponentInputs;\n }\n\n public get customComponentWrappers() {\n return this._customComponentWrappers;\n }\n\n public get locale() {\n return this._locale;\n }\n\n public get currency() {\n return this._currency;\n }\n\n public get currencyFromProperty() {\n return this._currencyFromProperty;\n }\n\n public get currencyDisplay() {\n return this._currencyDisplay;\n }\n\n public asHidden(): this {\n this._fieldType = FieldInputTypeEnum.Hidden;\n return this;\n }\n\n public asLabel(): this {\n this._fieldType = FieldInputTypeEnum.Label;\n return this;\n }\n\n public asText(opts?: FieldInputTextOptsType): this {\n this._fieldType = FieldInputTypeEnum.Text;\n return this.withTextValidation(opts)\n .withTextValidationEmail(opts?.email ?? false)\n .withTextCommonOpts(opts)\n .withInputCommonOpts(opts);\n }\n\n public asTextarea(opts?: FieldInputTextareaOptsType): this {\n this._fieldType = FieldInputTypeEnum.Textarea;\n this._rows = opts?.rows;\n return this.withTextValidation(opts).withTextCommonOpts(opts).withInputCommonOpts(opts);\n }\n\n public asNumber(opts?: FieldInputNumberOptsType): this {\n this._fieldType = FieldInputTypeEnum.Number;\n return this.withNumberGrouping(opts?.groupSeparator ?? false)\n .withNumberFractions(opts)\n .withNumberValidation(opts)\n .withLocale(opts?.locale)\n .withNumberDisplay(opts)\n .withInputCommonOpts(opts);\n }\n\n public asCurrency(opts?: FieldInputCurrencyOptsType<keyof EditorModel>): this {\n return this.asCurrencyUnsafe(<FieldInputCurrencyOptsType>{\n ...opts,\n currencyProperty: opts?.currencyProperty ? (opts.currencyProperty as string) : undefined\n }).withInputCommonOpts(opts);\n }\n\n public asCurrencyUnsafe(opts?: FieldInputCurrencyOptsType): this {\n this._fieldType = FieldInputTypeEnum.Currency;\n this._currencyFromProperty = opts?.currencyProperty;\n this._currency = opts?.currency ?? this._currency;\n this._currencyDisplay = opts?.currencyDisplay ?? this._currencyDisplay;\n return this.withNumberGrouping(opts?.groupSeparator ?? false)\n .withNumberFractions({\n maxFractionDigits: opts?.maxFractionDigits ?? 2,\n minFractionDigits: opts?.minFractionDigits ?? 2\n })\n .withNumberValidation(opts)\n .withLocale(opts?.locale)\n .withInputCommonOpts(opts);\n }\n\n public asSwitch(): this {\n this._fieldType = FieldInputTypeEnum.Switch;\n return this;\n }\n\n public asRadio(options: Array<string | number | boolean>, optionsTitlePath?: string): this {\n this._fieldType = FieldInputTypeEnum.Radio;\n this._radioOptions = options.map(o => <RadioValue>{value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}`});\n return this;\n }\n\n public asRadioFromEnum<Enum>(enumModel: EnumDescriptor<Enum>, values?: Array<Enum>): this {\n this._fieldType = FieldInputTypeEnum.Radio;\n this._radioOptions = Array.isArray(values)\n ? fromEnumValuesAsValueArray<Enum>(enumModel.type, values, enumModel.nameAsValue, enumModel.i18nBaseKey ?? undefined)\n : fromEnumConstantsAsValueArray(enumModel.type, enumModel.nameAsValue, enumModel.i18nBaseKey ?? undefined);\n return this;\n }\n\n public asDatePicker(opts?: FieldInputDatePickerOptsType<FieldValue, EditorModel, ParentEditorModel>): this {\n this._fieldType = FieldInputTypeEnum.Datepicker;\n return this.withDateValidation(opts).withDatePickerDisplay(opts).withDateValue({\n asDateObj: opts?.asDateObj,\n utc: opts?.utc,\n noTimeZone: opts?.noTimeZone,\n noTime: opts?.noTime\n });\n }\n\n public asMask(opts?: FieldInputMaskOptsType): this {\n this._fieldType = FieldInputTypeEnum.Mask;\n this._mask = opts?.mask;\n this._slotChar = opts?.slotChar;\n return this.withInputCommonOpts(opts);\n }\n\n public asFile(opts?: FieldInputFileOpts): this {\n this._fieldType = FieldInputTypeEnum.File;\n this._fileMultiple = opts?.multiple;\n this._fileMaxFileSize = opts?.maxFileSize;\n this._fileAccept = opts?.accept;\n return this.withFileOnSelectHandler(opts?.onFileSelectHandlerFn);\n }\n\n public asImageFile(opts?: FieldInputFileOpts): this {\n this.asFile(opts);\n this._fieldType = FieldInputTypeEnum.ImageFile;\n this._imagePreview = opts?.preview;\n this._imagePreviewAllowSvg = opts?.previewAllowSvg;\n this._imagePreviewComponent = opts?.previewComponent;\n return this;\n }\n\n public asImageUrl(opts?: FieldInputImageUrlOpts): this {\n this._fieldType = FieldInputTypeEnum.ImageUrl;\n this._fileMultiple = opts?.multiple;\n this._imagePreview = opts?.preview;\n this._imagePreviewAllowSvg = opts?.previewAllowSvg;\n this._imagePreviewComponent = opts?.previewComponent;\n this._imageUrlInputHiddenOnDisabled = opts?.inputVisibleOnDisabled;\n return this;\n }\n\n public asCustomComponent(component: Type<AFormlyCustomFieldComponent<FieldValue, EditorModel, ParentEditorModel>>, opts?: FieldInputComponentOpts): this {\n this._fieldType = FieldInputTypeEnum.Custom;\n this._customComponentType = component;\n this._customComponentInputs = opts?.inputs;\n this._customComponentWrappers = opts?.fieldWrappers;\n return this;\n }\n\n public withNumberValidation(opts?: FieldInputNumberValidationOptsType): this {\n this._numberStep = opts?.step;\n this._numberAutoCorrect = opts?.autoCorrect;\n this._numberMin = opts?.min;\n this._numberMax = opts?.max;\n return this;\n }\n\n public withLocale(locale?: string): this {\n this._locale = locale;\n return this;\n }\n\n public withNumberFractions(opts?: FieldInputNumberFractionOptsType) {\n this._numberMinFractionDigits = opts?.minFractionDigits;\n this._numberMaxFractionDigits = opts?.maxFractionDigits;\n return this;\n }\n\n public withNumberGrouping(useGrouping = true): this {\n this._numberUseGrouping = useGrouping;\n return this;\n }\n\n public withNumberDisplay(opts?: FieldInputNumberDisplayOptsType): this {\n this._numberPrefix = opts?.prefix;\n this._numberSuffix = opts?.suffix;\n return this;\n }\n\n public withTextareaRows(rows?: number): this {\n this._rows = rows;\n return this;\n }\n\n public withTextValidation(opts?: FieldInputTextValidationOptsType): this {\n this._minLength = opts?.minLength;\n this._maxLength = opts?.maxLength;\n this._pattern = opts?.pattern;\n return this;\n }\n\n /**\n * Common options for text input element (i.e. value value trimming).\n * @param opts\n */\n public withTextCommonOpts(opts?: FieldInpuTextBaseOptsType): this {\n this._textTrim = opts?.trim;\n return this;\n }\n\n /**\n * Common options for input element (i.e. value on empty input).\n * @param opts\n */\n public withInputCommonOpts(opts?: FieldInputOptsType): this {\n this._emptyValue = opts?.emptyValue;\n return this;\n }\n\n public withDatePickerDisplay(opts?: FieldInputDatePickerDisplayOptsType): this {\n this._datePickerFormat = opts?.format;\n this._datePickerShowTime = opts?.showTime;\n this._datePickerShowSeconds = opts?.showSeconds;\n this._datePickerShowMilliseconds = opts?.showMilliseconds;\n this._datePickerPrimeTimePicker = opts?.primeTimePicker;\n this._datePickerTimeSelectInterval = opts?.timeSelectInterval;\n this._datePickerTimeSelect = opts?.timeSelect;\n return this;\n }\n\n public withDateValidation(opts?: FieldInputDateValidationOptsType<FieldValue, EditorModel, ParentEditorModel>): this {\n this._datePickerMin = opts?.min;\n this._datePickerMax = opts?.max;\n return this;\n }\n\n public withRadioOptions(opts: {labelClassName?: string}): this {\n this._radioLabelClassName = opts.labelClassName;\n return this;\n }\n\n public withDateValue(opts?: FieldDateOptsType): this {\n this._datePickerValueAsDateObj = opts?.asDateObj;\n this._datePickerValueUtc = opts?.utc;\n this._datePickerValueNoTimezone = opts?.noTimeZone;\n this._datePickerValueNoTime = opts?.noTime;\n return this;\n }\n\n public withTextValidationEmail(email = true): this {\n this._validationEmail = email;\n return this;\n }\n\n public withFileOnSelectHandler(fn?: FieldInputFileOnSelectHandlerFnType): this {\n this._fileOnSelectHandler = fn;\n return this;\n }\n\n public copy(): FieldInputDescriptor<EditorModel, FieldModel, FieldValue, ParentEditorModel> {\n const field = new FieldInputDescriptor<EditorModel, FieldModel, FieldValue, ParentEditorModel>(this._property);\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._rows = this._rows;\n field._numberMin = this._numberMin;\n field._numberMax = this._numberMax;\n field._numberStep = this._numberStep;\n field._numberAutoCorrect = this._numberAutoCorrect;\n field._numberMinFractionDigits = this._numberMinFractionDigits;\n field._numberMaxFractionDigits = this._numberMaxFractionDigits;\n field._numberUseGrouping = this._numberUseGrouping;\n field._numberPrefix = this._numberPrefix;\n field._numberSuffix = this._numberSuffix;\n field._radioOptions = [...this._radioOptions];\n field._radioLabelClassName = this._radioLabelClassName;\n field._datePickerFormat = this._datePickerFormat;\n field._datePickerMin = this._datePickerMin;\n field._datePickerMax = this._datePickerMax;\n field._datePickerShowTime = this._datePickerShowTime;\n field._datePickerShowSeconds = this._datePickerShowSeconds;\n field._datePickerShowMilliseconds = this._datePickerShowMilliseconds;\n field._datePickerPrimeTimePicker = this._datePickerPrimeTimePicker;\n field._datePickerTimeSelectInterval = this._datePickerTimeSelectInterval;\n field._datePickerTimeSelect = this._datePickerTimeSelect;\n field._datePickerValueUtc = this._datePickerValueUtc;\n field._datePickerValueNoTimezone = this._datePickerValueNoTimezone;\n field._datePickerValueNoTime = this._datePickerValueNoTime;\n field._datePickerValueAsDateObj = this._datePickerValueAsDateObj;\n field._maxLength = this._maxLength;\n field._minLength = this._minLength;\n field._pattern = this._pattern;\n field._mask = this._mask;\n field._slotChar = this._slotChar;\n field._fileMultiple = this._fileMultiple;\n field._fileMaxFileSize = this._fileMaxFileSize;\n field._fileAccept = this._fileAccept;\n field._fileOnSelectHandler = this._fileOnSelectHandler;\n field._imagePreview = this._imagePreview;\n field._imageUrlInputHiddenOnDisabled = this._imageUrlInputHiddenOnDisabled;\n field._imagePreviewAllowSvg = this._imagePreviewAllowSvg;\n field._imagePreviewComponent = this._imagePreviewComponent;\n field._customComponentType = this._customComponentType;\n field._customComponentInputs = this._customComponentInputs;\n field._customComponentWrappers = this._customComponentWrappers;\n field._locale = this._locale;\n field._currency = this._currency;\n field._currencyDisplay = this._currencyDisplay;\n field._currencyFromProperty = this._currencyFromProperty;\n field._textTrim = this._textTrim;\n field._emptyValue = this._emptyValue;\n field._validationEmail = this._validationEmail;\n return field;\n }\n}\n","import {FormGroup} from '@angular/forms';\n\nimport {Subject} from 'rxjs';\n\nimport {ArrayItemType, CommonsInternalError, EnumConstantType, IEditorDescriptor} from '@mediusinc/mng-commons/core';\nimport {EnumDescriptor, ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {ITableDataProvider, TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {TableviewDescriptorInst} from '../../tableview/descriptors/tableview.descriptor';\nimport {FieldsManageAddFieldLookupOpts, IFieldsManageWithGetField} from '../models/editor-fields.model';\nimport {EDITOR_DEFAULT_GROUP_NAME, TableviewEditorTypeEnum} from '../models/editor.model';\nimport {FormValidationMessage, FormValidator} from '../models/field-validation.model';\nimport {FormEvent, FormEventData, FormEventTypeEnum} from '../models/form-editor.event';\nimport {IFormEditorComponent} from '../models/form-editor.interface';\nimport {FieldActionDescriptor} from './field-action.descriptor';\nimport {AFieldDescriptor} from './field-base.descriptor';\nimport {FieldGroupDescriptor, FieldTabGroupDescriptor} from './field-group.descriptor';\nimport {FieldLookupDescriptor, FieldLookupEnumDescriptor, fieldLookupGetProviderCfgObj} from './field-lookup.descriptor';\nimport {FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, fieldManyToManyGetProviderCfgObj} from './field-many.descriptor';\nimport {FieldValidationDescriptorOptsType} from './field-validation.descriptor';\nimport {FieldInputDescriptor, FieldInputDescriptorType} from './field.descriptor';\nimport {EditorDescriptorNestedObjectWrapper} from './wrappers/editor-descriptor-nested-object-wrapper';\n\nexport class EditorDescriptorInst<EditorModel, ParentEditorModel = undefined>\n implements IEditorDescriptor<EditorModel, ParentEditorModel>, IFieldsManageWithGetField<EditorModel, ParentEditorModel>\n{\n public static readonly defaultGroupName = EDITOR_DEFAULT_GROUP_NAME;\n\n /** @ignore */ protected readonly _model: ModelDescriptor<EditorModel>;\n /** @ignore */ protected readonly _tableviewEditorType: TableviewEditorTypeEnum;\n /** @ignore */ protected readonly _tabs: Array<FieldTabGroupDescriptor<EditorModel>> = [];\n /** @ignore */ protected readonly _groups: Array<FieldGroupDescriptor<EditorModel, ParentEditorModel>> = [];\n /** @ignore */ protected _fields: Array<AFieldDescriptor<any, EditorModel>> = [];\n /** @ignore */ protected _currentTabGroup?: FieldTabGroupDescriptor<EditorModel>;\n /** @ignore */ protected _currentGroup?: FieldGroupDescriptor<EditorModel>;\n\n /** @ignore */ protected _autoSave?: boolean;\n /** @ignore */ protected _autoSaveIdentifier?: string;\n\n /** @ignore */ protected _autofocusOnField?: boolean;\n\n /** @ignore */ protected _disabled = false;\n\n /** @ignore */ protected _isLocalized = false;\n /** @ignore */ protected _localizationLocaleProperty?: string;\n /** @ignore */ protected _localizationModel?: ModelDescriptor<any>;\n /** @ignore */ protected _localizationLocalizationProperty?: string;\n\n /** @ignore */ protected readonly _eventsSubject = new Subject<FormEvent<EditorModel, ParentEditorModel>>();\n\n /**\n * Creates new instance of editor descriptor.\n * @param model Model descriptor.\n * @param tableviewEditorType Type of editor in tableview (add, edit, view or none).\n */\n public constructor(model: ModelDescriptor<EditorModel>, tableviewEditorType = TableviewEditorTypeEnum.None) {\n this._model = model;\n this._tableviewEditorType = tableviewEditorType;\n }\n\n /**\n * Model descriptor for editor.\n */\n public get model() {\n return this._model;\n }\n\n /**\n * Editor's tabs.\n */\n public get tabs() {\n return this._tabs;\n }\n\n /**\n * Editor's fields.\n */\n public get fields() {\n return this._fields;\n }\n\n /**\n * Type of editor for tableview.\n */\n public get tableviewEditorType() {\n return this._tableviewEditorType;\n }\n\n /**\n * If editor is disabled.\n */\n public get disabled() {\n return this._disabled;\n }\n\n public get isLocalized() {\n return this._isLocalized;\n }\n\n public get localizationLocaleProperty() {\n return this._localizationLocaleProperty;\n }\n\n public get localizationLocalizationProperty() {\n return this._localizationLocalizationProperty;\n }\n\n public get localizationModel() {\n return this._localizationModel;\n }\n\n public get autoSave() {\n return this._autoSave;\n }\n\n public get autoSaveIdentifier() {\n return this._autoSaveIdentifier;\n }\n\n public get autofocusOnField() {\n return this._autofocusOnField;\n }\n\n /**\n * Dives into nested object to add fields from the nested object on property.\n *\n * @experimental\n *\n * @param property Model property name.\n */\n public nested<Property extends keyof EditorModel>(property: Property): EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, NonNullable<EditorModel[Property]>> {\n return new EditorDescriptorNestedObjectWrapper(this, property as string);\n }\n\n /**\n * Creates new tab group. Next added fields are added to newly created tab group.\n * @param name Name of the group.\n * @param title Title key for the tab.7@return Newly created group descriptor.\n * @return Newly created group descriptor.\n */\n public addTabGroup(name: string, title?: string): FieldTabGroupDescriptor<EditorModel> {\n const tabGroup = new FieldTabGroupDescriptor<EditorModel>(name);\n tabGroup.withTitle(title);\n this.createTabGroupDescriptor(tabGroup);\n return tabGroup;\n }\n\n /**\n * Creates new tab group. Next added fields are added to newly created tab group.\n * @param name Name of the group.\n * @param title Title key for the tab.7@return Newly created group descriptor.\n */\n public withTabGroup(name: string, title?: string): this {\n this.addTabGroup(name, title);\n return this;\n }\n\n /**\n * Gets group by its name (key).\n * @param name Group's key.\n */\n public getGroup(name: string | number): FieldGroupDescriptor<EditorModel> | null {\n return typeof name === 'string' ? (this._groups.find(g => g.name === name) ?? null) : (this._groups[name] ?? null);\n }\n\n /**\n * Creates new field group. Next added fields are added to newly created field group.\n * @param name Name of the group.\n * @param title Title key for the group.\n * @return Newly created group descriptor.\n */\n public addFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<EditorModel> {\n const fieldGroup = new FieldGroupDescriptor<EditorModel>(name);\n fieldGroup.withTitle(title);\n this.createFieldGroupDescriptor(fieldGroup);\n return fieldGroup;\n }\n\n /**\n * Creates new field group. Next added fields are added to newly created field group.\n * @param name Name of the group.\n * @param title Title key for the group.\n */\n public withFieldGroup(name: string, title?: string): this {\n this.addFieldGroup(name, title);\n return this;\n }\n\n /**\n * Gets field by the model property name.\n * @param property Model property name.\n */\n public getField<Property extends keyof EditorModel, FieldModel = NonNullable<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property) {\n return this.getFieldUnsafe<FieldModel, FieldValue>(property as string);\n }\n\n /**\n * Gets field by the model property name (UNSAFE).\n * @param property Model property name.\n */\n public getFieldUnsafe<FieldModel, FieldValue = FieldModel>(property: string): AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> | null {\n return this._fields.find(f => f.property === property) ?? null;\n }\n\n /**\n * Removes field by the model property name.\n * @param property Model property name.\n */\n public removeField(property: keyof EditorModel): void {\n return this.removeFieldUnsafe(property as string);\n }\n\n /**\n * Removes field by the model property name (UNSAFE).\n * @param property Model property name.\n */\n public removeFieldUnsafe(property: string): void {\n const fieldIdx = this._fields.findIndex(f => f.property === property);\n if (fieldIdx < 0) {\n throw new CommonsInternalError(`Field ${property} does not exist.`, {name: 'EditorDescriptorError'});\n }\n for (const group of this._groups) {\n const groupFieldIdx = group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);\n if (groupFieldIdx >= 0) {\n group.fields.splice(groupFieldIdx, 1);\n break;\n }\n }\n this._fields.splice(fieldIdx, 1);\n }\n\n /**\n * Adds field by the descriptor.\n * @param field Field descriptor.\n */\n public addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>): this {\n if (this._fields.some(f => f.property === field.property)) {\n throw new CommonsInternalError(`Field '${field.property}' already exists.`);\n }\n this.createDefaultGroup();\n this._fields.push(field);\n this._currentGroup?.addField(field);\n return this;\n }\n\n /**\n * Adds field by the model property name.\n * @param property Model property name.\n */\n public addField<Property extends keyof EditorModel, FieldModel = NonNullable<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property) {\n return this.addFieldUnsafe<FieldModel, FieldValue>(property as string);\n }\n\n /**\n * Adds field by the model property name (UNSAFE). Property is not checked on editor model.\n * Use {addField} for safe usage.\n * @param property Model property name.\n */\n public addFieldUnsafe<FieldModel = FieldInputDescriptorType, FieldValue = FieldModel>(property: string) {\n const field = new FieldInputDescriptor<EditorModel, FieldModel, FieldValue, ParentEditorModel>(property);\n this.addFieldDescriptor<FieldModel, FieldValue>(field);\n return field;\n }\n\n public withFields(...properties: (keyof EditorModel)[]): this {\n properties.forEach(p => this.addField(p));\n return this;\n }\n\n public addFieldAction(actionName: string): FieldActionDescriptor<EditorModel, ParentEditorModel> {\n const field = new FieldActionDescriptor<EditorModel, ParentEditorModel>(actionName);\n this.addFieldDescriptor(field);\n return field;\n }\n\n /**\n * Adds lookup field.\n *\n * @param {Property} property - The property key of the editor.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam Property - The property key of the EditorModel.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookup<\n Property extends keyof EditorModel,\n Service = undefined,\n LookupModel extends NonNullable<EditorModel[Property]> = NonNullable<EditorModel[Property]>,\n FieldValue = EditorModel[Property]\n >(property: Property, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n return this.addFieldLookupUnsafe<LookupModel, Service, FieldValue>(property as string, opts);\n }\n\n /**\n * [UNSAFE] Adds lookup field.\n * This function is UNSAFE because property is not type-checked.\n *\n * @param {string} property Model property name.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookupUnsafe<LookupModel, Service = undefined, FieldValue = LookupModel>(property: string, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n const field = new FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue, ParentEditorModel>(property, {\n ...(opts?.serviceProvider ? fieldLookupGetProviderCfgObj(opts.serviceProvider) : {})\n });\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookupEnum<Property extends keyof EditorModel, Enum extends NonNullable<EditorModel[Property]>>(\n property: keyof EditorModel,\n enumDesc: EnumDescriptor<Enum>,\n options?: Array<Enum>\n ) {\n return this.addFieldLookupEnumUnsafe<Enum>(property as string, enumDesc, options);\n }\n\n /**\n * Adds enum lookup field.\n * @param property Model's property name.\n * @param enumDesc Type of enum or enum descriptor.\n * @param options Provides subset of enum's available constants.\n */\n public addFieldLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n const field = new FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel>(property, enumDesc, options);\n this.addFieldDescriptor(field);\n return field;\n }\n\n /**\n * Adds table/details/add/edit field for one-to-many (1:n) relations.\n * @param property Model's property name.\n * @param tableviewDescriptor Tableview descriptor for related model.\n */\n public addFieldManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(\n property: Property,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ) {\n return this.addFieldManyEditorUnsafe<FieldModel, FieldValue>(property as string, tableviewDescriptor);\n }\n\n /**\n * Adds table/details/add/edit field for one-to-many (1:n) relations (UNSAFE).\n * @param property Model's property name.\n * @param tableviewDescriptor Tableview descriptor for related model.\n */\n public addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(\n property: string,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {\n const field = new FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>(property, tableviewDescriptor);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyToManyEditor<Property extends keyof EditorModel, ServiceType, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(\n property: Property,\n mainTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupDataProvider: ITableDataProvider<FieldModel, ServiceType, any, any>\n ) {\n return this.addFieldManyToManyEditorUnsafe<FieldModel, ServiceType, FieldValue>(property as string, mainTableDescriptor, lookupTableDescriptor, lookupDataProvider);\n }\n\n public addFieldManyToManyEditorUnsafe<FieldModel, ServiceType, FieldValue = FieldModel[]>(\n property: string,\n mainTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupDataProvider: ITableDataProvider<FieldModel, ServiceType, any, any>\n ): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue, ParentEditorModel> {\n const cfg = fieldManyToManyGetProviderCfgObj(lookupDataProvider);\n const field = new FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue, ParentEditorModel>(\n property,\n mainTableDescriptor,\n lookupTableDescriptor,\n {\n ...cfg\n }\n );\n this.addFieldDescriptor(field);\n return field;\n }\n\n /**\n * Disables field on editor.\n * @param disabled\n */\n public withDisabled(disabled = true): this {\n this._disabled = disabled;\n return this;\n }\n\n /**\n * Adds group validator to editor.\n * @param name Name of the validation.\n * @param validator Field validator function.\n * @param message Field validation message.\n * @param opts Additional configuration for validation.\n */\n public withValidation<Value = EditorModel>(\n name: string,\n validator?: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType<keyof EditorModel>\n ) {\n return this.withValidationUnsafe(name, validator, message, opts as FieldValidationDescriptorOptsType);\n }\n\n /**\n * Adds group validator to editor.\n * @param name Name of the validation.\n * @param validator Field validator function.\n * @param message Field validation message.\n * @param opts Additional configuration for validation.\n */\n public withValidationUnsafe<Value = EditorModel>(\n name: string,\n validator?: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType\n ) {\n if (this._currentGroup) {\n this._currentGroup.withValidation(name, validator, message, opts);\n }\n return this;\n }\n\n public withAutoSave(enabled = true, autoSaveIdentifier?: string): this {\n this._autoSave = enabled;\n this._autoSaveIdentifier = autoSaveIdentifier;\n return this;\n }\n\n public withAutofocusOnField(enabled = true): this {\n this._autofocusOnField = enabled;\n return this;\n }\n\n /**\n * Creates a copy of editor descriptor object.\n */\n public copy(): EditorDescriptorInst<EditorModel, ParentEditorModel> {\n const editor = new EditorDescriptorInst<EditorModel, ParentEditorModel>(this.model.copy(), this.tableviewEditorType);\n\n editor._fields = this._fields.map(f => f.copy());\n const fieldsMap = editor.fields.reduce((map, field) => {\n map.set(field.property, field);\n return map;\n }, new Map<string, any>());\n\n for (const tabGroup of this._tabs) {\n const tabGroupCopy = tabGroup.copy(true);\n // set fields\n for (let i = 0; i < tabGroup.fields.length; i++) {\n const group = tabGroup.fields[i];\n const groupCopy = tabGroupCopy.fields[i];\n\n for (let j = 0; j < group.fields.length; j++) {\n const fieldCopy = fieldsMap.get(group.fields[j].property);\n if (!fieldCopy) {\n throw new CommonsInternalError(`Could not copy editor descriptor: field '${group.fields[j].property}' (tab '${tabGroup.name}', group ${group.name}').`);\n }\n groupCopy.addField(fieldCopy);\n }\n editor._groups.push(groupCopy);\n }\n editor._tabs.push(tabGroupCopy);\n }\n\n editor._currentTabGroup = editor._tabs.length > 0 ? editor._tabs[editor._tabs.length - 1] : undefined;\n if (editor._currentTabGroup) {\n editor._currentGroup = editor._currentTabGroup.fields.length > 0 ? editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1] : undefined;\n }\n\n editor._disabled = this._disabled;\n editor._autoSave = this._autoSave;\n editor._autoSaveIdentifier = this._autoSaveIdentifier;\n editor._autofocusOnField = this._autofocusOnField;\n editor._isLocalized = this._isLocalized;\n editor._localizationLocaleProperty = this._localizationLocaleProperty;\n editor._localizationModel = this._localizationModel;\n editor._localizationLocalizationProperty = this._localizationLocalizationProperty;\n\n return editor;\n }\n\n /**\n * Created group from field group descriptor.\n * @param fieldGroup Field group descriptor.\n * @internal\n */\n public createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<EditorModel, ParentEditorModel>): this {\n this.createDefaultTabGroup();\n this._currentGroup = fieldGroup;\n this._groups.push(fieldGroup);\n this._currentTabGroup?.addField(fieldGroup);\n return this;\n }\n\n /**\n * Creates tab group from tab group descriptor.\n * @param tabGroup Tab group descriptor.\n * @internal\n */\n protected createTabGroupDescriptor(tabGroup: FieldTabGroupDescriptor<EditorModel>): this {\n this._currentTabGroup = tabGroup;\n this._tabs.push(tabGroup);\n return this;\n }\n\n /**\n * Creates default field group.\n * @internal\n */\n private createDefaultGroup() {\n this.createDefaultTabGroup();\n if (this._currentTabGroup?.fields.length === 0) {\n this.addFieldGroup(EditorDescriptorInst.defaultGroupName, null);\n }\n }\n\n /**\n * Creates default tab group.\n * @internal\n */\n private createDefaultTabGroup() {\n if (this._tabs.length === 0) {\n this.addTabGroup(EditorDescriptorInst.defaultGroupName, 'general.general');\n }\n }\n\n /**\n * This function takes care of displaying correct/localized data in the editor\n * @param property property that tells us where on the model are localizations accessible\n * @param model Model for localizations\n * @param localeProperty property by which we find the locale\n */\n public localized<Property extends keyof EditorModel, LocalizationModel = ArrayItemType<EditorModel[Property]>>(\n property: Property,\n model: ModelDescriptor<LocalizationModel>,\n localeProperty: keyof LocalizationModel\n ): this {\n return this.localizedUnsafe(property as string, model, localeProperty as string);\n }\n\n public localizedUnsafe<LocalizationType>(property: string, model: ModelDescriptor<LocalizationType>, localeProperty: string): this {\n this._localizationLocalizationProperty = property as string;\n this._localizationModel = model;\n this._localizationLocaleProperty = localeProperty as string;\n this._isLocalized = true;\n\n return this;\n }\n\n public nextEvent(type: FormEventTypeEnum, component: IFormEditorComponent<any, any>, data?: FormEventData<EditorModel>) {\n this._eventsSubject.next({\n type: type,\n formComponent: component,\n form: component.form as FormGroup,\n data: data\n });\n }\n\n public get events$() {\n return this._eventsSubject.asObservable();\n }\n}\n","import {ModelDescriptor, ModelDescriptorCreateOpts, TypeDescriptor, model} from '@mediusinc/mng-commons/model';\n\nimport {TableviewEditorTypeEnum} from '../models/editor.model';\nimport {EditorDescriptorInst} from './editor.descriptor';\n\nexport type EditorDescriptorCreateBaseOptsType<ParentEditorModel> = {\n tableviewEditorType?: TableviewEditorTypeEnum;\n parentEditorType?: TypeDescriptor<ParentEditorModel> | ModelDescriptor<ParentEditorModel> | EditorDescriptorInst<ParentEditorModel, any>;\n};\nexport type EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel> = ModelDescriptorCreateOpts<EditorModel> & EditorDescriptorCreateBaseOptsType<ParentEditorModel>;\n\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(): EditorDescriptorInst<EditorModel, ParentEditorModel>;\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(\n opts: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>\n): EditorDescriptorInst<EditorModel, ParentEditorModel>;\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(\n model: ModelDescriptor<EditorModel>,\n opts?: EditorDescriptorCreateBaseOptsType<ParentEditorModel>\n): EditorDescriptorInst<EditorModel, ParentEditorModel>;\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(\n modelOrOpts?: ModelDescriptor<EditorModel> | EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>,\n opts?: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>\n) {\n if (modelOrOpts == null) {\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(model<EditorModel>(), opts?.tableviewEditorType);\n } else if (modelOrOpts instanceof ModelDescriptor) {\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(modelOrOpts, opts?.tableviewEditorType);\n } else {\n // this could have autoGenerated if model descriptor is class\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(model<EditorModel>(modelOrOpts), modelOrOpts?.tableviewEditorType);\n }\n}\n","import {AbstractControl, FormControl, FormGroup} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {IFormEditorComponent} from './form-editor.interface';\nimport {CommonsFormlyFieldConfig} from './formly-field.model';\n\nexport interface FormEditorSubmitEvent<Item> {\n formItem: Item;\n success: boolean;\n}\n\nexport enum FormFieldEventTypeEnum {\n ComponentLifecycle = 'ComponentLifecycle',\n ValueChange = 'ValueChange',\n DataProvider = 'DataProvider',\n DialogLifecycle = 'DialogLifecycle',\n RowReorder = 'RowReorder',\n Other = 'Other'\n}\n\nexport enum FormEventTypeEnum {\n ComponentLifecycle = 'ComponentLifecycle',\n ValueChange = 'ValueChange',\n Submit = 'Submit',\n Other = 'Other'\n}\n\nexport class FormFieldEventComponentSubtype {\n public static readonly ON_INIT = 'Component.OnInit';\n public static readonly ON_VIEW_INIT = 'Component.OnViewInit';\n public static readonly ON_CONTENT_INIT = 'Component.OnContentInit';\n public static readonly ON_DESTROY = 'Component.OnDestroy';\n}\n\nexport class FormFieldEventDialogSubtype {\n public static readonly VISIBILITY = 'Dialog.Visibility';\n}\n\nexport interface FormFieldEventData<FieldModel, EditorModel> {\n eventSubtype?: string;\n value?: FieldModel;\n formValue?: EditorModel;\n [key: string]: any;\n}\n\nexport interface FormEventData<EditorModel> {\n eventSubtype?: string;\n value?: EditorModel; // direct value from form.valueChanges, disabled field values and setters are not included\n submitValid?: boolean; // true if form is valid\n submitValue?: EditorModel; // value on submit\n [key: string]: any;\n}\n\nexport interface FormFieldEvent<FieldValue, FormValue, ParentFormValue = undefined> {\n type: FormFieldEventTypeEnum;\n fieldComponent?: FieldType<CommonsFormlyFieldConfig<FieldValue, FormValue, ParentFormValue>>;\n formComponent?: IFormEditorComponent<FormValue, ParentFormValue>;\n fieldFormControl: FormControl<FieldValue>;\n form: FormGroup<{[K in keyof FormValue]: AbstractControl<FormValue[K]>}>;\n fieldFormlyConfig: CommonsFormlyFieldConfig<FieldValue, FormValue, ParentFormValue>;\n data?: FormFieldEventData<FieldValue, FormValue>;\n}\n\nexport interface FormEvent<FormValue, ParentFormValue = undefined> {\n type: FormEventTypeEnum;\n formComponent?: IFormEditorComponent<FormValue, ParentFormValue>;\n form: FormGroup<{[K in keyof FormValue]: AbstractControl<FormValue[K]>}>;\n data?: FormEventData<FormValue>;\n}\n\nexport interface EditorResetEvent<Item> {\n emitEvent?: boolean;\n fetch?: boolean; // if item should be re-fetched again through data provider\n item?: Item; // if present, item value will be used to reset form\n fields?: Partial<Item>;\n data?: {\n [key: string]: any;\n };\n}\n","import {Directive, Input} from '@angular/core';\nimport {AbstractControl, FormControl, FormGroup} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {CommonsFormlyFieldConfig, CommonsFormlyFieldProps} from './formly-field.model';\nimport {CommonsFormlyFormOptions, CommonsFormlyFormState} from './formly-options.model';\n\n@Directive()\nexport abstract class AFormlyCustomFieldComponent<Value, FormValue, ParentFormValue = undefined> extends FieldType<CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>> {\n @Input('field') declare field: CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>;\n @Input('model') _model!: Value;\n @Input('form') _form!: FormGroup<{[K in keyof FormValue]: AbstractControl<FormValue[K]>}>;\n @Input('options') _options!: CommonsFormlyFormOptions<FormValue>;\n @Input('key') _key!: string | number | (string | number)[];\n @Input('formControl') _formControl!: FormControl<Value>;\n @Input('props') _props!: CommonsFormlyFieldProps<Value, FormValue, ParentFormValue>;\n @Input('showError') _showError!: boolean;\n @Input('id') _id!: string;\n @Input('formState') _formState!: CommonsFormlyFormState<FormValue>;\n\n override get model() {\n return this._model;\n }\n\n override get form() {\n return this._form;\n }\n\n override get options() {\n return this._options;\n }\n\n override get key() {\n return this._key;\n }\n\n override get formControl() {\n return this._formControl;\n }\n\n override get props() {\n return this._props;\n }\n\n override get showError() {\n return this._showError;\n }\n\n override get id() {\n return this._id;\n }\n\n override get formState() {\n return this._formState;\n }\n}\n","import {DataProviderInst, ServiceClassOptType} from '@mediusinc/mng-commons/core';\nimport {ITableDataProvider, TableDataProviderGetAllEagerFnType, TableDataProviderGetAllFnType, TableDataProviderInst, TableReloadEvent} from '@mediusinc/mng-commons/table/api';\n\nimport {\n EditorDataProviderCreateFnType,\n EditorDataProviderDeleteFnType,\n EditorDataProviderFetchFnType,\n EditorDataProviderFetchMapToFnType,\n EditorDataProviderInst,\n EditorDataProviderUpdateFnType,\n IEditorDataProvider\n} from '../../editor/data-providers/editor.data-provider';\nimport {EditorResetEvent} from '../../editor/models/form-editor.event';\n\nexport type ITableviewDataProvider<\n Model = any,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = ServiceClassOptType<Service>,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n> = IEditorDataProvider<Model, Service, ServiceClass, CreateModel, UpdateModel> & ITableDataProvider<TableModel, Service, Sorts, Filters, ServiceClass>;\n\nexport class TableviewDataProviderInst<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = ServiceClassOptType<Service>,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>\n extends DataProviderInst<Model, Service, ServiceClass>\n implements\n ITableviewDataProvider<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel>,\n IEditorDataProvider<Model, Service, ServiceClass, CreateModel, UpdateModel>\n{\n protected readonly editorDataProvider: EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>;\n protected readonly tableDataProvider: TableDataProviderInst<TableModel, Service, Sorts, Filters, ServiceClass>;\n\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n this.editorDataProvider = new EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>(serviceType);\n this.tableDataProvider = new TableDataProviderInst<TableModel, Service, Sorts, Filters, ServiceClass>(serviceType);\n }\n\n get isLazy() {\n return this.tableDataProvider.isLazy;\n }\n\n get tableReload$() {\n return this.tableDataProvider.tableReload$;\n }\n\n get editorReset$() {\n return this.editorDataProvider.editorReset$;\n }\n\n get getAll() {\n return this.tableDataProvider.getAll;\n }\n\n get fetch() {\n return this.editorDataProvider.fetch;\n }\n\n get create() {\n return this.editorDataProvider.create;\n }\n\n get update() {\n return this.editorDataProvider.update;\n }\n\n get delete() {\n return this.editorDataProvider.delete;\n }\n\n get mapFetchItemToCreateItem() {\n return this.editorDataProvider.mapFetchItemToCreateItem;\n }\n\n get mapFetchItemToUpdateItem() {\n return this.editorDataProvider.mapFetchItemToUpdateItem;\n }\n\n withGetAll(fn: TableDataProviderGetAllFnType<TableModel, Service, Sorts, Filters>): this {\n this.tableDataProvider.withGetAll(fn);\n return this;\n }\n\n withGetAllEagerly(fn: TableDataProviderGetAllEagerFnType<TableModel, Service>): this {\n this.tableDataProvider.withGetAllEagerly(fn);\n return this;\n }\n\n withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this {\n this.editorDataProvider.withFetch(fn);\n return this;\n }\n\n withCreate(fn?: EditorDataProviderCreateFnType<CreateModel, Model, Service>): this {\n this.editorDataProvider.withCreate(fn);\n return this;\n }\n\n withUpdate(fn?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>): this {\n this.editorDataProvider.withUpdate(fn);\n return this;\n }\n\n withDelete<Item = undefined>(fn?: EditorDataProviderDeleteFnType<Model, Service, Item>): this {\n this.editorDataProvider.withDelete<Item>(fn);\n return this;\n }\n\n withMapFetchItemToCreateItem(fn?: EditorDataProviderFetchMapToFnType<Model, CreateModel>): this {\n this.editorDataProvider.withMapFetchItemToCreateItem(fn);\n return this;\n }\n\n withMapFetchItemToUpdateItem(fn?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>): this {\n this.editorDataProvider.withMapFetchItemToUpdateItem(fn);\n return this;\n }\n\n reloadTable(event?: TableReloadEvent<Sorts, Filters>): void {\n this.tableDataProvider.reloadTable(event);\n }\n\n resetEditor(event?: EditorResetEvent<Model>): void {\n this.editorDataProvider.resetEditor(event);\n }\n}\n\nexport class DynamicTableviewDataProviderInst<Service = any, ServiceClass = ServiceClassOptType<Service>> extends TableviewDataProviderInst<any, Service, any, any, ServiceClass> {\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n }\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {DynamicTableviewDataProviderInst, TableviewDataProviderInst} from './tableview.data-provider';\n\n/**\n * Creates and returns an instance of `TableviewDataProviderInst` with the specified options for managing tableview data.\n *\n * @param {Object} [opts] - The options object to configure the data provider.\n * @param {TypeDescriptor<Model> | ModelDescriptor<Model>} [opts.type] - The descriptor defining the type of model.\n * @param {ServiceClassType<Service>} [opts.service] - The service class type associated with the data provider.\n * @param {TypeDescriptor<CreateModel> | ModelDescriptor<CreateModel>} [opts.filtersType] - The descriptor defining the filters type.\n * @param {TypeDescriptor<UpdateModel> | ModelDescriptor<UpdateModel>} [opts.sortsType] - The descriptor defining the sorts type.\n * @return {TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel>} An instance of `TableviewDataProviderInst` configured according to the provided options.\n */\nexport function tableviewDataProvider<\n Model,\n Service = undefined,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model,\n ServiceClass = Service extends undefined ? undefined : ServiceClassType<Service>\n>(opts?: {\n type?: TypeDescriptor<Model> | ModelDescriptor<Model>;\n service?: ServiceClassType<Service>;\n tableType?: TypeDescriptor<TableModel> | ModelDescriptor<TableModel>;\n createType?: TypeDescriptor<CreateModel> | ModelDescriptor<Model>;\n updateType?: TypeDescriptor<UpdateModel> | ModelDescriptor<Model>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n}): TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel> {\n return new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel>(opts?.service as ServiceClass);\n}\n\nexport function tableviewDynamicDataProvider(): DynamicTableviewDataProviderInst<undefined, undefined>;\nexport function tableviewDynamicDataProvider<Service>(serviceType: ServiceClassType<Service>): DynamicTableviewDataProviderInst<Service, ServiceClassType<Service>>;\nexport function tableviewDynamicDataProvider<Service, ServiceClass = ServiceClassType<Service>>(\n serviceType?: ServiceClass\n): DynamicTableviewDataProviderInst<Service, ServiceClass> {\n return new DynamicTableviewDataProviderInst<Service, ServiceClass>(serviceType as ServiceClass);\n}\n","import {ArrayItemType, EnumConstantType, ILookupDataProvider, ITableviewDescriptor} from '@mediusinc/mng-commons/core';\nimport {FilterDescriptor, FilterDisplayTypeEnum} from '@mediusinc/mng-commons/filter';\nimport {EnumDescriptor, ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {ColumnDescriptor, IColumnsManageInterface, ITableDataProvider, TableDescriptorInst, TableDynamicDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {FieldActionDescriptor} from '../../editor/descriptors/field-action.descriptor';\nimport {AFieldDescriptor} from '../../editor/descriptors/field-base.descriptor';\nimport {FieldLookupDescriptor, FieldLookupEnumDescriptor} from '../../editor/descriptors/field-lookup.descriptor';\nimport {FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor} from '../../editor/descriptors/field-many.descriptor';\nimport {FieldValidationDescriptorOptsType} from '../../editor/descriptors/field-validation.descriptor';\nimport {FieldInputDescriptor, FieldInputDescriptorType} from '../../editor/descriptors/field.descriptor';\nimport {FieldsManageAddFieldLookupOpts, IFieldsManage} from '../../editor/models/editor-fields.model';\nimport {TableviewEditorTypeEnum} from '../../editor/models/editor.model';\nimport {FormValidationMessage, FormValidator} from '../../editor/models/field-validation.model';\nimport {TableviewDescriptorFieldsManageMultiType} from '../models/tableview-descriptor-fields-manage-helper.type';\n\nexport type TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel> = {\n tableModel?: ModelDescriptor<TableModel>;\n addModel?: ModelDescriptor<AddModel>;\n editModel?: ModelDescriptor<EditModel>;\n};\n\nexport class TableviewDescriptorInst<\n TableviewModel,\n Sorts = keyof TableviewModel,\n Filters = keyof TableviewModel,\n ParentEditorModel = undefined,\n TableModel = TableviewModel,\n AddModel = TableviewModel,\n EditModel = TableviewModel,\n FieldsManageModel = TableviewDescriptorFieldsManageMultiType<TableviewModel, AddModel, EditModel>\n>\n implements\n ITableviewDescriptor<TableviewModel, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>,\n IColumnsManageInterface<TableModel, Sorts, Filters>,\n IFieldsManage<FieldsManageModel, ParentEditorModel>\n{\n private readonly _model: ModelDescriptor<TableviewModel>;\n\n protected _table: TableDescriptorInst<TableModel, Sorts, Filters>;\n protected _detailsEditor: EditorDescriptorInst<TableviewModel, ParentEditorModel>;\n protected _addEditor: EditorDescriptorInst<AddModel, ParentEditorModel>;\n protected _editEditor: EditorDescriptorInst<EditModel, ParentEditorModel>;\n\n protected _isLocalized = false;\n\n public constructor(model: ModelDescriptor<TableviewModel>, opts?: TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel>) {\n this._model = model;\n this._table = new TableDescriptorInst<TableModel, Sorts, Filters>(opts?.tableModel ?? (model as unknown as ModelDescriptor<TableModel>));\n this._table.withTitle(`${this._model.i18nBaseKey}.name`);\n this._detailsEditor = new EditorDescriptorInst<TableviewModel, ParentEditorModel>(model, TableviewEditorTypeEnum.Details);\n this._detailsEditor.withDisabled();\n this._addEditor = new EditorDescriptorInst<AddModel, ParentEditorModel>(opts?.addModel ?? (model as unknown as ModelDescriptor<AddModel>), TableviewEditorTypeEnum.Add);\n this._editEditor = new EditorDescriptorInst<EditModel, ParentEditorModel>(\n opts?.editModel ?? (model as unknown as ModelDescriptor<EditModel>),\n TableviewEditorTypeEnum.Edit\n );\n }\n\n public get table() {\n return this._table;\n }\n\n public get detailsEditor() {\n return this._detailsEditor;\n }\n\n public get addEditor() {\n return this._addEditor;\n }\n\n public get editEditor() {\n return this._editEditor;\n }\n\n public get model() {\n return this._model;\n }\n\n public isLocalized() {\n return this._isLocalized;\n }\n\n public withTableDescriptor(descriptor: TableDescriptorInst<TableModel, Sorts, Filters>): this {\n this._table = descriptor;\n return this;\n }\n\n public withEditorDescriptors(descriptor: EditorDescriptorInst<TableviewModel, ParentEditorModel>): this {\n this._detailsEditor = descriptor;\n this._editEditor = descriptor as unknown as EditorDescriptorInst<EditModel, ParentEditorModel>;\n this._addEditor = descriptor as unknown as EditorDescriptorInst<AddModel, ParentEditorModel>;\n return this;\n }\n\n public withDetailsDescriptor(descriptor: EditorDescriptorInst<TableviewModel, ParentEditorModel>): this {\n this._detailsEditor = descriptor;\n return this;\n }\n\n public withAddDescriptor(descriptor: EditorDescriptorInst<AddModel, ParentEditorModel>): this {\n this._addEditor = descriptor;\n return this;\n }\n\n public withEditDescriptor(descriptor: EditorDescriptorInst<EditModel, ParentEditorModel>): this {\n this._editEditor = descriptor;\n return this;\n }\n\n /**\n * creates new copy of editor descriptor and makes it disabled\n * usable in combination with this::withEditorDescriptors, where detailsDescriptor is made non-disabled\n * @param type which editor type to set to disabled\n */\n public withDisabledEditorDescriptor(type = TableviewEditorTypeEnum.Details): this {\n if (type === TableviewEditorTypeEnum.Edit) {\n this._editEditor = this._editEditor.copy().withDisabled();\n } else if (type === TableviewEditorTypeEnum.Details) {\n this._detailsEditor = this._detailsEditor.copy().withDisabled();\n } else if (type === TableviewEditorTypeEnum.Add) {\n this._addEditor = this._addEditor.copy().withDisabled();\n }\n return this;\n }\n\n public withValidation<Value = TableviewModel>(\n name: string,\n expression: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType<keyof FieldsManageModel>\n ): this {\n return this.withValidationUnsafe(name, expression, message, opts as FieldValidationDescriptorOptsType);\n }\n\n public withValidationUnsafe<Value = TableviewModel>(\n name: string,\n expression: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType\n ): this {\n this._detailsEditor.withValidationUnsafe<Value>(name, expression, message, opts);\n this._addEditor.withValidationUnsafe<Value>(name, expression, message, opts);\n this._editEditor.withValidationUnsafe<Value>(name, expression, message, opts);\n return this;\n }\n\n public getColumn<Property extends keyof TableModel, ColumnModel = NonNullable<TableModel[Property]>, ColumnValue = TableModel[Property]>(property: Property) {\n return this._table.getColumn<Property, ColumnModel, ColumnValue>(property);\n }\n\n public getColumnUnsafe<ColumnModel = any, ColumnValue = ColumnModel>(property: string) {\n return this._table.getColumnUnsafe<ColumnModel, ColumnValue>(property);\n }\n\n public removeColumn(property: keyof TableModel): void {\n this._table.removeColumn(property);\n }\n\n public removeColumnUnsafe(property: string): void {\n this._table.removeColumnUnsafe(property);\n }\n\n public withColumn<ColumnModel, ColumnValue = ColumnModel>(column: ColumnDescriptor<ColumnModel, TableModel, ColumnValue>): this {\n this._table.withColumn<ColumnModel, ColumnValue>(column);\n return this;\n }\n\n public addColumn<Property extends keyof TableModel>(property: Property): ColumnDescriptor<NonNullable<TableModel[Property]>, TableModel, TableModel[Property]> {\n return this._table.addColumn(property);\n }\n\n public addColumnEnum<PropertyKey extends keyof TableModel, Enum extends NonNullable<TableModel[PropertyKey]>>(property: PropertyKey, enumDesc: EnumDescriptor<Enum>) {\n return this._table.addColumnEnum(property, enumDesc);\n }\n\n public addColumnUnsafe<ColumnModel = any>(property: string): ColumnDescriptor<ColumnModel, TableModel> {\n return this._table.addColumnUnsafe(property);\n }\n\n public withColumns(...properties: (keyof TableModel)[]): this {\n this._table.withColumns(...properties);\n return this;\n }\n\n public getSort(property: Sorts) {\n return this._table.getSort(property);\n }\n\n public getSortUnsafe(property: string) {\n return this._table.getSortUnsafe(property);\n }\n\n public removeSort(property: Sorts) {\n this._table.removeSort(property);\n }\n\n public removeSortUnsafe(property: string) {\n this._table.removeSortUnsafe(property);\n }\n\n public addSort(property: Sorts, isDefault = false, ascending?: boolean) {\n return this._table.addSort(property, isDefault, ascending);\n }\n\n public addSortUnsafe(property: string, isDefault = false, ascending?: boolean) {\n return this._table.addSortUnsafe(property, isDefault, ascending);\n }\n\n public withSort(property: Sorts, isDefault = false, ascending?: boolean): this {\n this._table.withSort(property, isDefault, ascending);\n return this;\n }\n\n public withSortUnsafe(property: string, isDefault = false, ascending?: boolean): this {\n this._table.withSortUnsafe(property, isDefault, ascending);\n return this;\n }\n\n public withDefaultSort(property: Sorts, ascending?: boolean, enabled?: boolean): this {\n this._table.withDefaultSort(property, ascending, enabled);\n return this;\n }\n\n public withDefaultSortUnsafe(property: string, ascending?: boolean, enabled?: boolean): this {\n this._table.withDefaultSortUnsafe(property, ascending, enabled);\n return this;\n }\n\n public withSorts(...properties: Sorts[]): this {\n this._table.withSorts(...properties);\n return this;\n }\n\n public withSortsUnsafe(...properties: string[]): this {\n this._table.withSortsUnsafe(...properties);\n return this;\n }\n\n public withDefaultSorts(...properties: Sorts[]): this {\n this._table.withDefaultSorts(...properties);\n return this;\n }\n\n public withoutDefaultSorts(): this {\n this._table.withoutDefaultSorts();\n return this;\n }\n\n public getFilter<FilterModel = Filters extends keyof TableModel ? NonNullable<TableModel[Filters]> : any>(property: Filters) {\n return this._table.getFilter<FilterModel>(property);\n }\n\n public getFilterUnsafe<FilterModel = any>(property: string) {\n return this._table.getFilterUnsafe<FilterModel>(property);\n }\n\n public removeFilter(property: Filters) {\n this._table.removeFilter(property);\n }\n\n public removeFilterUnsafe(property: string) {\n this._table.removeFilterUnsafe(property);\n }\n\n public addFilter<FilterModel = Filters extends keyof TableModel ? TableModel[Filters] : never>(property: Filters) {\n return this._table.addFilter<FilterModel>(property);\n }\n\n public addFilterUnsafe<FilterModel>(property: string) {\n return this._table.addFilterUnsafe<FilterModel>(property);\n }\n\n public addFilterLookup<FilterModel = Filters extends keyof TableModel ? NonNullable<TableModel[Filters]> : never, Service = undefined>(\n property: Filters,\n provider?: ILookupDataProvider<FilterModel, Service, any, any>,\n optionsValueProperty?: keyof FilterModel\n ) {\n return this._table.addFilterLookup<FilterModel, Service>(property, provider, optionsValueProperty);\n }\n\n public addFilterLookupUnsafe<FilterModel, Service = undefined>(\n property: string,\n provider?: ILookupDataProvider<FilterModel, Service, any, any>,\n optionsValueProperty?: string\n ) {\n return this._table.addFilterLookupUnsafe<FilterModel, Service>(property, provider, optionsValueProperty);\n }\n\n public addFilterLookupEnum<Enum>(property: Filters, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n return this._table.addFilterLookupEnum<Enum>(property, enumDesc, options);\n }\n\n public addFilterLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n return this._table.addFilterLookupEnumUnsafe<Enum>(property, enumDesc, options);\n }\n\n public addFilterFromColumn<Property extends keyof TableModel, FilterModel = NonNullable<TableModel[Property]>>(\n property: Extract<Filters, Property>,\n displayType?: FilterDisplayTypeEnum,\n forceSimple = false\n ) {\n return this._table.addFilterFromColumn<Property, FilterModel>(property, displayType, forceSimple);\n }\n\n public withFiltersFromColumns(...properties: Extract<Filters, keyof TableModel>[]): this {\n this._table.withFiltersFromColumns(...properties);\n return this;\n }\n\n public withFiltersFromColumnsUnsafe(...properties: string[]): this {\n this._table.withFiltersFromColumnsUnsafe(...properties);\n return this;\n }\n\n public addFilterFromColumnUnsafe(property: string, displayType?: FilterDisplayTypeEnum, forceSimple = false) {\n return this._table.addFilterFromColumnUnsafe(property, displayType, forceSimple);\n }\n\n public withFilter<FilterModel>(property: Filters, filter: FilterDescriptor<FilterModel, TableModel>): this {\n this._table.withFilter<FilterModel>(property, filter);\n return this;\n }\n\n public withFilterUnsafe<FilterModel>(filter: FilterDescriptor<FilterModel, TableModel>): this {\n this._table.withFilterUnsafe<FilterModel>(filter);\n return this;\n }\n\n public removeField(property: keyof FieldsManageModel): void {\n this.removeFieldUnsafe(property as string);\n }\n\n public removeFieldUnsafe(property: string): void {\n this._editEditor.removeFieldUnsafe(property);\n this._addEditor.removeFieldUnsafe(property);\n this._detailsEditor.removeFieldUnsafe(property);\n }\n\n public addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, FieldsManageModel, FieldValue, ParentEditorModel>): this {\n this._detailsEditor.addFieldDescriptor(field as unknown as AFieldDescriptor<any, TableviewModel, FieldValue, ParentEditorModel>);\n this._addEditor.addFieldDescriptor(field as unknown as AFieldDescriptor<any, AddModel, FieldValue, ParentEditorModel>);\n this._editEditor.addFieldDescriptor(field as unknown as AFieldDescriptor<any, EditModel, FieldValue, ParentEditorModel>);\n return this;\n }\n\n public addField<Property extends keyof FieldsManageModel, FieldModel = NonNullable<FieldsManageModel[Property]>, FieldValue = FieldsManageModel[Property]>(property: Property) {\n return this.addFieldUnsafe<FieldModel, FieldValue>(property as string);\n }\n\n public addFieldUnsafe<FieldModel = FieldInputDescriptorType, FieldValue = FieldModel>(property: string) {\n const field = this._detailsEditor.addFieldUnsafe<FieldModel, FieldValue>(property);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldInputDescriptor<FieldsManageModel, FieldModel, FieldValue, ParentEditorModel>;\n }\n\n public withFields(...properties: (keyof FieldsManageModel)[]): this {\n properties.forEach(p => this.addField(p));\n return this;\n }\n\n public addFieldAction(actionName: string): FieldActionDescriptor<FieldsManageModel, ParentEditorModel> {\n const field = this._detailsEditor.addFieldAction(actionName);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldActionDescriptor<FieldsManageModel, ParentEditorModel>;\n }\n\n private addFieldToEditAndAdd<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, any, FieldValue, ParentEditorModel>) {\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n }\n\n /**\n * Adds lookup field.\n *\n * @param {Property} property - The property key of the editor.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam Property - The property key of the EditorModel.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, FieldsManageModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookup<\n Property extends keyof FieldsManageModel,\n Service = undefined,\n LookupModel extends NonNullable<FieldsManageModel[Property]> = NonNullable<FieldsManageModel[Property]>,\n FieldValue = FieldsManageModel[Property]\n >(property: Property, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n return this.addFieldLookupUnsafe<LookupModel, Service, FieldValue>(property as string, opts);\n }\n\n /**\n * [UNSAFE] Adds lookup field.\n * This function is UNSAFE because property is not type-checked.\n *\n * @param {string} property Model property name.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookupUnsafe<LookupModel, Service = undefined, FieldValue = LookupModel>(property: string, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n const field = this._detailsEditor.addFieldLookupUnsafe<LookupModel, Service, FieldValue>(property, opts);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldLookupDescriptor<LookupModel, FieldsManageModel, Service, FieldValue, ParentEditorModel>;\n }\n\n public addFieldLookupEnum<Property extends keyof FieldsManageModel, Enum extends NonNullable<FieldsManageModel[Property]>>(\n property: Property,\n enumDesc: EnumDescriptor<Enum>,\n options?: Array<Enum>\n ) {\n return this.addFieldLookupEnumUnsafe<Enum>(property as string, enumDesc, options);\n }\n\n public addFieldLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n const field = this._detailsEditor.addFieldLookupEnumUnsafe<Enum>(property, enumDesc, options);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldLookupEnumDescriptor<Enum, FieldsManageModel, ParentEditorModel>;\n }\n\n public addFieldManyEditor<Property extends keyof FieldsManageModel, FieldModel = ArrayItemType<FieldsManageModel[Property]>, FieldValue = FieldsManageModel[Property]>(\n property: Property,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, FieldsManageModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ) {\n return this.addFieldManyEditorUnsafe<FieldModel, FieldValue>(property as string, tableviewDescriptor);\n }\n\n public addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(\n property: string,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, FieldsManageModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ) {\n const field = this._detailsEditor.addFieldManyEditorUnsafe<FieldModel, FieldValue>(\n property,\n // cast is needed, because the parent model of TableviewDescriptorInst is expected to be TableviewModel, but it cannot be in case there are different types across details, add or edit\n tableviewDescriptor as TableviewDescriptorInst<FieldModel, any, any, any, FieldModel, FieldModel, FieldModel, FieldModel>\n );\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldManyEditorDescriptor<FieldModel, FieldsManageModel, FieldValue, ParentEditorModel>;\n }\n\n public addFieldManyToManyEditor<\n Property extends keyof FieldsManageModel,\n Service,\n FieldModel = ArrayItemType<FieldsManageModel[Property]>,\n FieldValue = FieldsManageModel[Property]\n >(\n property: Property,\n mainTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupDataProvider: ITableDataProvider<FieldModel, Service>\n ) {\n return this.addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue>(property as string, mainTableDescriptor, lookupTableDescriptor, lookupDataProvider);\n }\n\n public addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue = FieldModel[]>(\n property: string,\n mainTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupDataProvider: ITableDataProvider<FieldModel, Service>\n ) {\n const field = this._detailsEditor.addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue>(property, mainTableDescriptor, lookupTableDescriptor, lookupDataProvider);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldManyToManyEditorDescriptor<FieldModel, FieldsManageModel, Service, FieldValue, ParentEditorModel>;\n }\n\n public withTabGroup(name: string, title?: string): this {\n this._detailsEditor.addTabGroup(name, title);\n this._addEditor.addTabGroup(name, title);\n this._editEditor.addTabGroup(name, title);\n return this;\n }\n\n public withFieldGroup(name: string, title?: string): this {\n this._detailsEditor.addFieldGroup(name, title);\n this._addEditor.addFieldGroup(name, title);\n this._editEditor.addFieldGroup(name, title);\n return this;\n }\n\n public copy(): TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel, FieldsManageModel> {\n const tableview = new TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel, FieldsManageModel>(this._model.copy());\n tableview._table = this._table.copy();\n tableview._detailsEditor = this._detailsEditor.copy();\n tableview._addEditor = this._addEditor.copy();\n tableview._editEditor = this._editEditor.copy();\n tableview._isLocalized = this._isLocalized;\n return tableview;\n }\n\n public localized<Property extends keyof TableviewModel, LocalizationModel = ArrayItemType<TableviewModel[Property]>>(\n property: Property,\n model: ModelDescriptor<LocalizationModel>,\n localeProperty: keyof LocalizationModel\n ): this {\n return this.localizedUnsafe(property as string, model, localeProperty as string);\n }\n\n public localizedUnsafe<LocalizationModel>(property: string, model: ModelDescriptor<LocalizationModel>, localeProperty: string): this {\n this._isLocalized = true;\n this._table.withLocalizationLocaleProperty(localeProperty as string);\n this.detailsEditor.localizedUnsafe(property, model, localeProperty);\n this.addEditor.localizedUnsafe(property, model, localeProperty);\n this.editEditor.localizedUnsafe(property, model, localeProperty);\n\n return this;\n }\n}\n\nexport class TableviewDynamicDescriptorInt extends TableviewDescriptorInst<any> {\n protected override _table: TableDynamicDescriptorInst;\n\n public constructor(model: ModelDescriptor<any>) {\n super(model);\n this._table = new TableDynamicDescriptorInst(this.model);\n }\n\n public override get table() {\n return this._table;\n }\n\n /**\n * sets custom table descriptor\n * @param descriptor\n */\n public override withTableDescriptor(descriptor: TableDynamicDescriptorInst): this {\n this._table = descriptor;\n return this;\n }\n\n /**\n * sets visibility hidden state to column with given property\n * equals to be removing in auto and base tableview descriptor\n * * @param property column's property\n */\n public override removeColumn(property: string): this {\n this._table.removeColumn(property);\n return this;\n }\n\n public withEntityForTranslations(i18nBaseKey: string): this {\n this._table.model.withI18nBase(i18nBaseKey);\n this._detailsEditor.model.withI18nBase(i18nBaseKey);\n return this;\n }\n\n /**\n * creates deep copy of tableview object and its children\n */\n public override copy(): TableviewDynamicDescriptorInt {\n const descriptor = new TableviewDynamicDescriptorInt(this.model.copy());\n descriptor._table = this._table.copy();\n return descriptor;\n }\n}\n","import {ModelDescriptor, ModelDescriptorCreateOpts, TypeDescriptor, model} from '@mediusinc/mng-commons/model';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {TableviewDescriptorFieldsManageMultiType} from '../models/tableview-descriptor-fields-manage-helper.type';\nimport {TableviewDescriptorInst, TableviewDescriptorInstConstructorOpts, TableviewDynamicDescriptorInt} from './tableview.descriptor';\n\ntype TableviewDescriptorCreateSortsFiltersParentOptsType<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined> = {\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Filters>;\n parentEditorType?:\n | TypeDescriptor<ParentEditorModel>\n | ModelDescriptor<ParentEditorModel>\n | EditorDescriptorInst<ParentEditorModel, any>\n | TableviewDescriptorInst<ParentEditorModel, any, any, any, any, ParentEditorModel, ParentEditorModel, ParentEditorModel>;\n};\n\nexport type TableviewDescriptorCreateOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined\n> = TableviewDescriptorCreateSortsFiltersParentOptsType<Model, Sorts, Filters, ParentEditorModel>;\n\nexport type TableviewDescriptorCreateWithModelDescriptorOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined\n> = TableviewDescriptorCreateOptsType<Model, Sorts, Filters, ParentEditorModel> & ModelDescriptorCreateOpts<Model>;\n\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(): TableviewDescriptorInst<\n Model,\n Sorts,\n Filters,\n ParentEditorModel,\n TableModel,\n Model,\n Model,\n Model\n>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n opts: TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n opts: TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n model: ModelDescriptor<Model>,\n opts?: TableviewDescriptorCreateOptsType<Model, Sorts, Filters, ParentEditorModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n modelOrOpts?: ModelDescriptor<Model> | TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>\n) {\n if (modelOrOpts == null) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>(model<Model>());\n } else if (modelOrOpts instanceof ModelDescriptor) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>(modelOrOpts);\n } else {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>(model<Model>(modelOrOpts));\n }\n}\n\nexport type TableviewDescriptorMultiModelCreateOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n> = TableviewDescriptorCreateSortsFiltersParentOptsType<Model, Sorts, Filters, ParentEditorModel> & TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel>;\n\nexport type TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n> = TableviewDescriptorMultiModelCreateOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel> & ModelDescriptorCreateOpts<Model>;\n\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel, TableviewDescriptorFieldsManageMultiType<Model, AddModel, EditModel>>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n opts: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n opts: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n model: ModelDescriptor<Model>,\n opts?: TableviewDescriptorMultiModelCreateOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n modelOrOpts?:\n | ModelDescriptor<Model>\n | TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n) {\n if (modelOrOpts == null) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>(model<Model>());\n } else if (modelOrOpts instanceof ModelDescriptor) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>(modelOrOpts);\n } else {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>(model<Model>(modelOrOpts));\n }\n}\n\nexport function tableviewDynamicDescriptor(\n modelOrOpts?: ModelDescriptor<any> | TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<any>\n): TableviewDynamicDescriptorInt {\n return modelOrOpts instanceof ModelDescriptor\n ? new TableviewDynamicDescriptorInt(modelOrOpts)\n : new TableviewDynamicDescriptorInt(new ModelDescriptor<any>(modelOrOpts?.id as string, modelOrOpts?.title as string, modelOrOpts?.i18nBase as string));\n}\n","import {TranslateService} from '@ngx-translate/core';\n\nimport {GetterPipe} from '@mediusinc/mng-commons/core';\n\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\n\nexport function convertDataToStringWithDelimiter(data: any[], delimiter: string, descriptor: TableviewDescriptorInst<any, any, any>, translate: TranslateService): string {\n const replaceNullValue = (key: any, value: any) => (value === null ? '' : value);\n const getterPipe = new GetterPipe();\n return [\n descriptor.table.columns.map(col => translate.instant(descriptor.model.i18nBaseKey + '.properties.' + col.property)).join(delimiter),\n ...data.map((row: any) =>\n descriptor.table.columns\n .map(column => {\n if (typeof column.getter === 'function') {\n return JSON.stringify(getterPipe.transform(row[column.property], column.getter, row), replaceNullValue);\n } else {\n return JSON.stringify(row[column.property], replaceNullValue);\n }\n })\n .join(delimiter)\n )\n ].join('\\r\\n');\n}\n\nexport function saveFileAs(blob: Blob, filename: string) {\n const blobUrl = URL.createObjectURL(blob);\n const link = document.createElement('a');\n\n link.style.display = 'none';\n link.target = '_blank';\n link.href = blobUrl;\n link.download = filename;\n\n document.body.appendChild(link);\n\n link.dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window\n })\n );\n\n document.body.removeChild(link);\n}\n","import {Injector, inject} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {of, tap} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {CommonsInternalError, ServiceClassType, StyleSizeEnum, copyDataListParams} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {ActionProviderType, actionGetProviderCfgObj} from '../../action/descriptors/action-descriptor.factory';\nimport {ActionEditorProviderType, actionEditorGetProviderCfgObj} from '../../action/descriptors/action-editor-descriptor.factory';\nimport {ActionEditorDescriptorInst, actionEditorCancel} from '../../action/descriptors/action-editor.descriptor';\nimport {actionLink} from '../../action/descriptors/action-link-descriptor.factory';\nimport {ActionLinkDescriptorInst} from '../../action/descriptors/action-link.descriptor';\nimport {ActionDescriptorInst} from '../../action/descriptors/action.descriptor';\nimport {ActionPositionEnum} from '../../action/models/action.type';\nimport {TableviewActionDefaultCategories} from '../../action/models/tableview-action-default-categories.model';\nimport {DataProviderExecutor} from '../../action/services/data-provider-executor.service';\nimport {DATA_LANGUAGE_DROPDOWN_COMPONENT_IT} from '../../action/services/tokens/data-language-dropdown.token';\nimport {IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\nimport {TableviewRouteData} from '../models/tableview-route.model';\nimport {convertDataToStringWithDelimiter, saveFileAs} from './files-export';\n\nexport enum TableviewDefaultActionsEnum {\n Details,\n Add,\n Edit,\n EditOnDetails,\n Delete,\n DeleteOnDetails,\n Refresh,\n Export,\n ExportJson,\n ExportCsv,\n LocalizationLanguageSelect\n}\n\nconst tableviewDefaultActions = [\n TableviewDefaultActionsEnum.Details,\n TableviewDefaultActionsEnum.Add,\n TableviewDefaultActionsEnum.Edit,\n TableviewDefaultActionsEnum.EditOnDetails,\n TableviewDefaultActionsEnum.Delete,\n TableviewDefaultActionsEnum.DeleteOnDetails,\n TableviewDefaultActionsEnum.Refresh,\n TableviewDefaultActionsEnum.Export,\n TableviewDefaultActionsEnum.ExportJson,\n TableviewDefaultActionsEnum.ExportCsv,\n TableviewDefaultActionsEnum.LocalizationLanguageSelect\n];\n\nexport function tableviewGetDefaultActions() {\n return [...tableviewDefaultActions];\n}\n\nexport function tableviewCreateDefaultActions(\n tableview: TableviewDescriptorInst<any, any, any>,\n defaultActions?: TableviewDefaultActionsEnum[],\n defaultActionsOverrides?: Record<number, ActionDescriptorInst<any>>,\n injector?: Injector | null\n): Array<ActionDescriptorInst<any>> {\n return (defaultActions ?? tableviewGetDefaultActions())\n .map(t => tableviewCreateDefaultAction(t, tableview, defaultActions, defaultActionsOverrides, injector))\n .filter(e => e != null) as Array<ActionDescriptorInst<any>>;\n}\n\nexport function tableviewCreateDefaultAction(\n type: TableviewDefaultActionsEnum,\n tableview: TableviewDescriptorInst<any, any, any>,\n defaultActions?: TableviewDefaultActionsEnum[],\n defaultActionsOverrides?: Record<number, ActionDescriptorInst<any>>,\n injector?: Injector | null\n): ActionDescriptorInst<any> | null {\n if (defaultActionsOverrides != null && defaultActionsOverrides[type] !== undefined) {\n return defaultActionsOverrides[type];\n }\n\n switch (type) {\n // table row actions\n case TableviewDefaultActionsEnum.Details:\n return tableviewActionDetailsOnTable(tableview.model, tableview.detailsEditor, {injector});\n case TableviewDefaultActionsEnum.Edit:\n return tableviewActionEditOnTable(tableview.model, tableview.editEditor, {table: tableview.table, injector});\n case TableviewDefaultActionsEnum.Delete:\n return tableviewActionDeleteOnTable(tableview.model, {table: tableview.table, injector});\n // table toolbar actions\n case TableviewDefaultActionsEnum.Add:\n return tableviewActionAddOnTable(tableview.model, tableview.addEditor, {injector});\n case TableviewDefaultActionsEnum.LocalizationLanguageSelect:\n return tableviewActionLocalizationLangSelectOnTable(tableview);\n case TableviewDefaultActionsEnum.Refresh:\n return tableviewActionRefreshOnTable(tableview.model);\n case TableviewDefaultActionsEnum.Export:\n return defaultActions == null || defaultActions.includes(TableviewDefaultActionsEnum.ExportJson) || defaultActions.includes(TableviewDefaultActionsEnum.ExportCsv)\n ? tableviewActionExportOnTable(tableview, {injector: injector, defaultActions: defaultActions})\n : null;\n //details actions\n case TableviewDefaultActionsEnum.EditOnDetails:\n return defaultActions == null || defaultActions.includes(TableviewDefaultActionsEnum.Edit) ? tableviewActionEditOnDetails(tableview.model, {injector}) : null;\n case TableviewDefaultActionsEnum.DeleteOnDetails:\n return defaultActions == null || defaultActions.includes(TableviewDefaultActionsEnum.Delete) ? tableviewActionDeleteOnDetails(tableview.model, {injector}) : null;\n // subactions\n case TableviewDefaultActionsEnum.ExportJson:\n case TableviewDefaultActionsEnum.ExportCsv:\n return null;\n default:\n throw new CommonsInternalError(`Tableview default action of type ${type} not supported`);\n }\n}\n\nfunction getInjector(injector?: Injector | null): Injector | null {\n return injector === undefined ? inject(Injector) : injector;\n}\n\nfunction getRouteData(injector?: Injector | null) {\n return getInjector(injector)?.get(ActivatedRoute)?.snapshot.data as TableviewRouteData | undefined;\n}\n\nexport const tableviewActionEditorDetailsActionName = 'details';\nexport const tableviewActionEditorDetailsRoute = ':itemId';\n\ntype TableviewActionDetailsOnTableOptsType<Model, TableModel, Service> = {\n table?: TableDescriptorInst<TableModel>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n injector?: Injector | null;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n};\n\nexport function tableviewActionDetailsOnTable<Model, TableModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n descriptor: EditorDescriptorInst<Model>,\n opts?: TableviewActionDetailsOnTableOptsType<Model, TableModel, Service>\n): ActionEditorDescriptorInst<Model, Service, Model, TableModel, undefined, TableModel> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasDetails) {\n const action = new ActionEditorDescriptorInst<Model, Service, Model, TableModel, undefined, TableModel>(descriptor, tableviewActionEditorDetailsActionName, {\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts?.serviceProvider) : {}),\n isTableviewMainEditor: true,\n model: model\n });\n action.withPosition(opts?.position ?? ActionPositionEnum.RowClick);\n action.withRouteTrigger(tableviewActionEditorDetailsRoute);\n action.withEditorActions([actionEditorCancel(action)]);\n action.withTableviewCategory(TableviewActionDefaultCategories.DETAILS);\n return action;\n }\n return null;\n}\n\nexport const tableviewActionEditorAddActionName = 'add';\nexport const tableviewActionEditorAddRoute = 'add';\n\nexport type ActionEditorProviderAddType<Model, AddModel, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service, any, AddModel, any>;\n\ntype TableviewActionAddOnTableOptsType<Model, AddModel, Service> = {\n serviceProvider?: ActionEditorProviderAddType<Model, AddModel, Service>;\n injector?: Injector | null;\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionAddOnTable<Model, AddModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n descriptor: EditorDescriptorInst<AddModel>,\n opts?: TableviewActionAddOnTableOptsType<Model, AddModel, Service>\n): ActionEditorDescriptorInst<Model, Service, AddModel, undefined, Model, undefined> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasAdd) {\n const action = new ActionEditorDescriptorInst<Model, Service, AddModel, undefined, Model, undefined>(descriptor, tableviewActionEditorAddActionName, {\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {}),\n isTableviewMainEditor: true,\n model: model\n });\n action\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft)\n .withRouteTrigger(tableviewActionEditorAddRoute)\n .withButtonOpts({\n icon: 'pi pi-plus'\n });\n action.withTableviewCategory(TableviewActionDefaultCategories.ADD);\n action.withUnsavedChangesConfirmation();\n return action;\n }\n return null;\n}\n\nexport const tableviewActionEditorEditActionName = 'edit';\nexport const tableviewActionEditorEditRoute = ':itemId/edit';\n\nexport type ActionEditorProviderEditType<Model, EditModel, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service, any, any, EditModel>;\n\ntype TableviewActionEditOnTableOptsType<Model, EditModel, TableModel, Service> = {\n table?: TableDescriptorInst<TableModel, any, any>;\n serviceProvider?: ActionEditorProviderEditType<Model, EditModel, Service>;\n injector?: Injector | null;\n position?: ActionPositionEnum.RowClick | ActionPositionEnum.RowInline;\n};\n\nexport function tableviewActionEditOnTable<Model, EditModel, TableModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n descriptor: EditorDescriptorInst<EditModel>,\n opts?: TableviewActionEditOnTableOptsType<Model, EditModel, TableModel, Service>\n): ActionEditorDescriptorInst<Model, Service, EditModel, TableModel, Model, TableModel> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasEdit) {\n const action = new ActionEditorDescriptorInst<Model, Service, EditModel, TableModel, Model, TableModel>(descriptor, tableviewActionEditorEditActionName, {\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {}),\n isTableviewMainEditor: true,\n model: model\n });\n action\n .withPosition(opts?.position ?? ActionPositionEnum.RowInline)\n .withButtonOpts({\n label: null,\n icon: 'pi pi-pencil',\n style: {\n size: StyleSizeEnum.Small\n }\n })\n .withRouteTrigger(tableviewActionEditorEditRoute)\n .withTableviewCategory(TableviewActionDefaultCategories.EDIT)\n .withUnsavedChangesConfirmation();\n return action;\n }\n return null;\n}\n\ntype TableviewActionEditOnDetailsOptsType = {\n injector?: Injector | null;\n position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight;\n};\n\nexport function tableviewActionEditOnDetails<Model>(model: ModelDescriptor<Model>, opts?: TableviewActionEditOnDetailsOptsType): ActionLinkDescriptorInst<Model> | null {\n const routeData = getRouteData(opts?.injector);\n if (routeData?.tableviewActions && !routeData.tableviewActions.hasEdit) {\n return null;\n }\n\n const linkAction = actionLink(tableviewActionEditorEditActionName, {model: model});\n linkAction\n .withTableviewCategory(TableviewActionDefaultCategories.EDIT)\n .withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS])\n .withPosition(opts?.position ?? ActionPositionEnum.FooterLeft)\n .withRouterLink('./edit')\n .withQueryParams({}, 'merge')\n .withButtonOpts({\n icon: 'pi pi-pencil',\n style: {\n severity: 'secondary'\n }\n });\n return linkAction;\n}\n\nexport const tableviewActionDeleteActionName = 'delete';\n\ntype TableviewActionDeleteOnTableOptsType<Model, TableModel, Service> = {\n injector?: Injector | null;\n table?: TableDescriptorInst<TableModel, any, any>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n};\n\nexport function tableviewActionDeleteOnTable<Model, TableModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n opts?: TableviewActionDeleteOnTableOptsType<Model, TableModel, Service>\n): ActionDescriptorInst<Model, Service, TableModel, Model, TableModel> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasDelete) {\n const action = new ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>(tableviewActionDeleteActionName, {\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts.serviceProvider) : {}),\n model: model\n })\n .withButtonOpts({\n label: null,\n icon: 'pi pi-trash',\n style: {\n size: StyleSizeEnum.Small,\n severity: 'danger'\n }\n })\n .withPosition(opts?.position ?? ActionPositionEnum.RowInline)\n .withRunConfirmation()\n .withTableviewCategory(TableviewActionDefaultCategories.DELETE);\n return action;\n }\n return null;\n}\n\ntype TableviewActionDeleteOnDetailsOptsType<Model, Service> = {\n injector?: Injector | null;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n};\n\nexport function tableviewActionDeleteOnDetails<Model, Service = undefined>(\n model: ModelDescriptor<Model>,\n opts?: TableviewActionDeleteOnDetailsOptsType<Model, Service>\n): ActionDescriptorInst<Model, Service, Model, Model, Model> | null {\n const action = tableviewActionDeleteOnTable<Model, Model, Service>(model, opts) as unknown as ActionDescriptorInst<Model, Service, Model, Model, Model>;\n const dataProviderExecutor = getInjector(opts?.injector)?.get(DataProviderExecutor);\n if (action) {\n action\n .withTableviewCategory(TableviewActionDefaultCategories.DELETE)\n .withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS])\n .withPosition(ActionPositionEnum.FooterLeft)\n .withRunFunction(ctx =>\n dataProviderExecutor\n ? dataProviderExecutor.runDeleteOrFail(ctx).pipe(\n tap(() => {\n ctx.viewContainer?.reloadTable({});\n ctx.viewContainer?.closeEditor();\n })\n )\n : null\n )\n .withButtonOpts({\n ...action.button,\n label: undefined,\n style: {\n ...action.button?.style,\n size: StyleSizeEnum.Normal\n }\n });\n\n return action;\n }\n\n return null;\n}\n\ntype TableviewActionExportOnTableOptsType = {\n injector?: Injector | null;\n defaultActions?: TableviewDefaultActionsEnum[];\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionExportOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: TableviewActionExportOnTableOptsType\n): ActionDescriptorInst<Model, undefined, undefined, undefined> | null {\n const exportAction = new ActionDescriptorInst<Model, undefined, undefined, undefined>('export', {\n model: descriptor.model\n })\n .withButton(undefined, 'pi pi-download')\n .withSubactionsAsMenu();\n\n const subactions: ActionDescriptorInst<Model, undefined, undefined, undefined>[] = [];\n\n if (opts?.defaultActions == null || opts?.defaultActions.includes(TableviewDefaultActionsEnum.ExportJson)) subactions.push(tableviewActionExportJsonOnTable(descriptor, opts));\n if (opts?.defaultActions == null || opts?.defaultActions.includes(TableviewDefaultActionsEnum.ExportCsv)) subactions.push(tableviewActionExportCsvOnTable(descriptor, opts));\n\n exportAction.withSubactions(...subactions);\n exportAction.withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight);\n return exportAction;\n}\n\nexport function tableviewActionExportJsonOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: Omit<TableviewActionExportOnTableOptsType, 'defaultActions'>\n): ActionDescriptorInst<Model, undefined, undefined, undefined> {\n const dataProviderExecutor = getInjector(opts?.injector)?.get(DataProviderExecutor);\n return new ActionDescriptorInst<Model, undefined, undefined, undefined>('exportJson', {\n model: descriptor.model\n })\n .withRunFunction(ctx => {\n const params = ctx.parameters.dataListParams ? copyDataListParams(ctx.parameters.dataListParams) : {};\n params.offset = 0;\n params.limit = 500;\n ctx.parameters.dataListParams = params;\n return dataProviderExecutor\n ? dataProviderExecutor.runGetAllOrFail(ctx).pipe(\n map(res => {\n const blob = new Blob([JSON.stringify(res.data, undefined, 4)], {type: 'application/json;charset=utf-8'});\n const typeName = ctx.instance.action.model?.i18nBaseKey ?? '';\n saveFileAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.json`);\n return undefined;\n })\n )\n : ctx.parameters.item;\n })\n .withNotifications({runOnSuccess: false})\n .withButton(undefined, 'pi pi-code')\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight);\n}\n\nexport function tableviewActionExportCsvOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: Omit<TableviewActionExportOnTableOptsType, 'defaultActions'>\n): ActionDescriptorInst<Model, undefined, undefined, undefined> {\n const dataProviderExecutor = getInjector(opts?.injector)?.get(DataProviderExecutor);\n return new ActionDescriptorInst<Model, undefined, undefined, undefined>('exportCsv', {\n model: descriptor.model\n })\n .withRunFunction(ctx => {\n const params = ctx.parameters.dataListParams ? copyDataListParams(ctx.parameters.dataListParams) : {};\n params.offset = 0;\n params.limit = 500;\n ctx.parameters.dataListParams = params;\n return dataProviderExecutor\n ? dataProviderExecutor.runGetAllOrFail(ctx).pipe(\n map(res => {\n if (!res.data) {\n return undefined;\n }\n const blob = new Blob([convertDataToStringWithDelimiter(res.data, ',', descriptor, ctx.injector.get(TranslateService))], {\n type: 'text/csv;charset=utf-8'\n });\n const typeName = ctx.instance.action.model?.i18nBaseKey ?? '';\n saveFileAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.csv`);\n return undefined;\n })\n )\n : ctx.parameters.item;\n })\n .withNotifications({runOnSuccess: false})\n .withButton(undefined, 'pi pi-file')\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight);\n}\n\ntype TableviewActionRefreshOnTableOptsType = {\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionRefreshOnTable<Model>(\n descriptor: ModelDescriptor<Model>,\n opts?: TableviewActionRefreshOnTableOptsType\n): ActionDescriptorInst<Model, undefined, undefined, undefined, undefined> | null {\n const action = new ActionDescriptorInst<Model, undefined, undefined, undefined, undefined>('refresh', {\n model: descriptor\n })\n .withPosition(ActionPositionEnum.ToolbarRight)\n .withTableviewCategory(TableviewActionDefaultCategories.READ)\n .withNotifications({runOnSuccess: false})\n .withRunFunction(ctx => {\n ctx.viewContainer?.reloadTable({});\n return of(null);\n })\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight)\n .withButtonOpts({\n icon: 'pi pi-refresh',\n style: {\n severity: 'secondary'\n }\n });\n return action;\n}\n\ntype TableviewLocalizationLangSelectOnTableActionOptsType = {\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionLocalizationLangSelectOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: TableviewLocalizationLangSelectOnTableActionOptsType\n): ActionDescriptorInst<Model, undefined, undefined, undefined, undefined> | null {\n return descriptor.isLocalized()\n ? new ActionDescriptorInst<Model, undefined, undefined, undefined, undefined>('translator', {\n model: descriptor.model\n })\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft)\n .withComponentFromDi(DATA_LANGUAGE_DROPDOWN_COMPONENT_IT)\n : null;\n}\n","import {Injector} from '@angular/core';\n\nimport {Observable} from 'rxjs';\n\nimport {\n ClassFunctionKeyParam1ObjKeyExtendsOfTargetType,\n ClassFunctionKeysWithParamAndReturnType,\n CommonsInternalError,\n IDataProvider,\n IdType,\n Nullable\n} from '@mediusinc/mng-commons/core';\n\nimport {ActionEditorDescriptorInst} from '../../action/descriptors/action-editor.descriptor';\nimport {ActionDescriptorInst} from '../../action/descriptors/action.descriptor';\nimport {ActionPositionEnum} from '../../action/models/action.type';\nimport {TableviewActionDefaultCategories} from '../../action/models/tableview-action-default-categories.model';\nimport {EditorDataProviderFetchMapToFnType} from '../../editor/data-providers/editor.data-provider';\nimport {TableviewDataProviderInst} from '../data-providers/tableview.data-provider';\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\nimport {TableviewInput} from '../models/tableview-input.model';\nimport {TableviewDefaultActionsEnum, tableviewCreateDefaultActions, tableviewGetDefaultActions} from './tableview-default-actions';\n\nexport type TvBuilderSetterParamsType<Descriptor, DataProvider> = {descriptor: Descriptor; dataProvider: DataProvider; injector: Injector};\nexport type TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ValidationInput, Descriptor, DataProvider> = (\n params: TvBuilderSetterParamsType<Descriptor, DataProvider>\n) => Nullable<\n | ActionDescriptorInst<ActionModel, ActionService, ActionInput, ActionResult, ValidationInput>\n | ActionEditorDescriptorInst<ActionModel, ActionService, any, ActionInput, ActionResult, ValidationInput>\n>;\nexport type TvBuilderDescriptorSetterFnType<Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => Descriptor;\nexport type TvBuilderDataProviderSetterFnType<Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => DataProvider;\n\ntype DefaultAction = {\n type: TableviewDefaultActionsEnum;\n descriptor: ActionDescriptorInst<any> | null | undefined;\n};\n\n/**\n * The `TableviewBuilder` class is used to build a tableview configuration.\n * It allows you to set various options such as the descriptor, data provider,\n * default actions, and custom actions for the tableview.\n *\n * @typeparam Model - The main model type.\n * @typeparam Service - The API service type.\n * @typeparam Descriptor - The descriptor type.\n * @typeparam DataProvider - The data provider type.\n * @typeparam Sorts - The sort type representing available sort keys.\n * @typeparam Filters - The filter type representing available filter keys.\n */\nexport class TableviewInputBuilder<\n Model,\n Service,\n Descriptor extends TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>,\n DataProvider extends IDataProvider<Model, Service>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model,\n FieldsModel = Model\n> {\n private defaultActions: DefaultAction[] = tableviewGetDefaultActions().map(a => ({type: a, descriptor: undefined}));\n private readonly _customActions: ActionDescriptorInst<any>[] = [];\n\n constructor(\n private _descriptor: Descriptor,\n private _dataProvider: DataProvider,\n private readonly injector: Injector\n ) {}\n\n private prepareSetterParams(): TvBuilderSetterParamsType<Descriptor, DataProvider> {\n return {descriptor: this._descriptor, dataProvider: this._dataProvider, injector: this.injector};\n }\n\n /**\n * Sets a descriptor instead of the default one.\n *\n * @param {TvBuilderDescriptorSetterFnType<Descriptor, DataProvider>} fn - The function that returns the new descriptor. It should accept a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withDescriptor(fn: TvBuilderDescriptorSetterFnType<Descriptor, DataProvider>): this {\n this._descriptor = fn(this.prepareSetterParams());\n return this;\n }\n\n /**\n * Adjusts the descriptor using the provided adjust function.\n *\n * @param {(descriptor: Descriptor) => void} adjustFn - The function used to adjust the descriptor. It accepts a single parameter of type `Descriptor`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withAdjustDescriptor(adjustFn: (descriptor: Descriptor) => void): this {\n adjustFn(this._descriptor);\n return this;\n }\n\n /**\n * Sets the data provider for the TvBuilder instance\n *\n * @param {TvBuilderDataProviderSetterFnType<Descriptor, DataProvider>} fn - The function that returns the new data provider. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * * @returns {this} - Returns the current instance of the builder.\n */\n withDataProvider(fn: TvBuilderDataProviderSetterFnType<Descriptor, DataProvider>): this {\n this._dataProvider = fn(this.prepareSetterParams());\n return this;\n }\n\n /**\n * Adjusts the data provider using the provided adjust function.\n *\n * @param {(dataProvider: DataProvider) => void} adjustFn - The function used to adjust the data provider. It accepts a single parameter of type `DataProvider`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withAdjustDataProvider(adjustFn: (dataProvider: DataProvider) => void): this {\n adjustFn(this._dataProvider);\n return this;\n }\n\n /**\n * Adjusts the data provider and/or descriptor using the provided adjust function.\n *\n * @param {(params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => void} adjustFn - The function used to adjust the data provider. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withAdjust(adjustFn: (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => void): this {\n adjustFn(this.prepareSetterParams());\n return this;\n }\n\n /**\n * Associates a fetch function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the fetch API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} fnItemIdParamName The parameter name for itemId used as the key within the request object of fetch function on API service.\n */\n withDataServiceFetchFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<Model>>>(\n serviceFn: ServiceFn,\n itemIdParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withFetch((itemId, service) => service[serviceFn]({[itemIdParamName]: itemId}));\n }\n return this;\n }\n\n /**\n * Associates a create function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the create API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, Undefined<EditModel>>} serviceFnItemParamName The parameter name for item used as the key within the request object of create function on API service.\n * @param {EditorDataProviderFetchMapToFnType<Model, AddModel>} [mapFetchItem] Map function to transform model from fetch to form's add model.\n */\n withDataServiceCreateFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(\n serviceFn: ServiceFn,\n serviceFnItemParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, AddModel>,\n mapFetchItem?: EditorDataProviderFetchMapToFnType<Model, AddModel>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withCreate((item, service) => service[serviceFn]({[serviceFnItemParamName]: item}));\n\n if (mapFetchItem) {\n this._dataProvider.withMapFetchItemToCreateItem(mapFetchItem);\n }\n }\n return this;\n }\n\n /**\n * Associates an update function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the update API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, Undefined<EditModel>>} fnItemParamName The parameter name for item used as the key within the request object of update function on API service.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} [fnItemIdParamName] The parameter name for itemId used as the key within the request object of update function on API service.\n * @param {EditorDataProviderFetchMapToFnType<Model, EditModel>} [mapFetchItem] Map function to transform model from fetch to form' edit model.\n */\n withDataServiceUpdateFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(\n serviceFn: ServiceFn,\n fnItemParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, EditModel>,\n fnItemIdParamName?: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>,\n mapFetchItem?: EditorDataProviderFetchMapToFnType<Model, EditModel>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withUpdate((id, item, service) => {\n const params: any = {[fnItemParamName]: item};\n if (fnItemIdParamName) {\n params[fnItemIdParamName] = id;\n }\n return service[serviceFn](params);\n });\n\n if (mapFetchItem) {\n this._dataProvider.withMapFetchItemToUpdateItem(mapFetchItem);\n }\n }\n return this;\n }\n\n /**\n * Associates a delete function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the delete API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} fnItemIdParamName The parameter name for itemId used as the key within the request object of delete function on API service.\n */\n withDataServiceDeleteFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(\n serviceFn: ServiceFn,\n fnItemIdParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withDelete((itemId, service) => service[serviceFn]({[fnItemIdParamName]: itemId}));\n }\n return this;\n }\n\n /**\n * Removes all the default tableview actions.\n *\n * @returns {this} - Returns the current instance of the builder.\n */\n withNoDefaultActions(): this {\n this.defaultActions.forEach(a => (a.descriptor = null));\n return this;\n }\n\n /**\n * Adds the default actions specified in parameters.\n *\n * @param {TableviewDefaultActionsEnum[]} types - The default actions to add.\n * @returns {this} - Returns the current instance of the builder.\n */\n withDefaultActions(...types: TableviewDefaultActionsEnum[]): this {\n types.forEach(type => {\n const action = this.defaultActions.find(a => a.type === type);\n if (action?.descriptor === null) {\n action.descriptor = undefined;\n }\n });\n return this;\n }\n\n /**\n * Removes the default actions specified in parameters.\n *\n * @param {TableviewDefaultActionsEnum[]} types - The default actions to remove.\n * @returns {this} - Returns the current instance of the builder.\n */\n withoutDefaultActions(...types: TableviewDefaultActionsEnum[]): this {\n types.forEach(type => {\n const action = this.defaultActions.find(a => a.type === type);\n if (action) {\n action.descriptor = null;\n }\n });\n return this;\n }\n\n /**\n * Overrides the default action.\n *\n * @param {TableviewDefaultActionsEnum} type - The default actions to override.\n * @param {TvBuilderActionSetterFnType<Model, ActionService , ActionRunInput, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withDefaultActionOverride<ActionService = Service, ActionRunInput = Model, ActionRunResult = Model, ValidationInput = Model>(\n type: TableviewDefaultActionsEnum,\n fn: TvBuilderActionSetterFnType<Model, ActionService, ActionRunInput, ActionRunResult, ValidationInput, Descriptor, DataProvider>\n ): this {\n const action = this.defaultActions.find(a => a.type === type);\n if (action) {\n action.descriptor = fn(this.prepareSetterParams()) ?? null;\n }\n return this;\n }\n\n /**\n * Adds a custom action.\n *\n * @deprecated Use on of {withActionOnTable}, {withActionOnDetailsEditor}, {withActionOnEditEditor} or {withActionOnAddEditor} instead.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunInput, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withAction<ActionModel = Model, ActionService = Service, ActionRunInput = Model, ActionRunResult = Model, ValidationInput = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionRunInput, ActionRunResult, ValidationInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on table row or top (header or toolbar).\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnTable<ActionModel = Model, ActionService = Service, ActionInput extends TableModel | undefined = TableModel, ActionRunResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionRunResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.READ]);\n if (\n ![\n ActionPositionEnum.ToolbarLeft,\n ActionPositionEnum.ToolbarRight,\n ActionPositionEnum.TableHeader,\n ActionPositionEnum.RowInline,\n ActionPositionEnum.RowClick\n ].includes(action.position)\n ) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on table (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on details editor.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnDetailsEditor<ActionModel = Model, ActionService = Service, ActionInput extends Model = Model, ActionResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS]);\n if (![ActionPositionEnum.ToolbarLeft, ActionPositionEnum.ToolbarRight, ActionPositionEnum.FooterLeft, ActionPositionEnum.FooterRight].includes(action.position)) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on details (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on edit editor.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnEditEditor<ActionModel = Model, ActionService = Service, ActionInput extends EditModel = EditModel, ActionResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.EDIT]);\n if (![ActionPositionEnum.ToolbarLeft, ActionPositionEnum.ToolbarRight, ActionPositionEnum.FooterLeft, ActionPositionEnum.FooterRight].includes(action.position)) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on edit (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on add editor.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnAddEditor<ActionModel = Model, ActionService = Service, ActionInput extends AddModel = AddModel, ActionResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.ADD]);\n if (![ActionPositionEnum.ToolbarLeft, ActionPositionEnum.ToolbarRight, ActionPositionEnum.FooterLeft, ActionPositionEnum.FooterRight].includes(action.position)) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on add (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * @internal\n *\n * Builds and returns an instance of ITableview.\n * DO NOT CALL this within tableview create callback function!\n *\n * @return {TableviewInput<Model, Service, Sorts, Filters, TableModel, AddModel, EditModel, Descriptor, DataProvider>} - The built ITableview instance.\n */\n build() {\n return <TableviewInput<Model, Service, Sorts, Filters, TableModel, AddModel, EditModel, Descriptor, DataProvider>>{\n actions: tableviewCreateDefaultActions(\n this._descriptor as TableviewDescriptorInst<any, any, any, any, any, any, any, any>,\n this.defaultActions.filter(a => a.descriptor !== null).map(a => a.type),\n this.defaultActions\n .filter(a => a.descriptor != null)\n .reduce(\n (acc, a) => ({\n ...acc,\n [a.type]: a.descriptor!\n }),\n <Record<number, ActionDescriptorInst<any>>>{}\n ),\n this.injector\n ).concat(this._customActions),\n dataProvider: this._dataProvider,\n descriptor: this._descriptor\n };\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ServiceClassOptType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {TableviewDataProviderInst} from '../data-providers/tableview.data-provider';\nimport {TableviewDescriptorInst, TableviewDescriptorInstConstructorOpts} from '../descriptors/tableview.descriptor';\nimport {TableviewDescriptorFieldsManageMultiType} from '../models/tableview-descriptor-fields-manage-helper.type';\nimport {TableviewInputBuilder} from './tableview-input-builder';\n\n/**\n * Creates a tableview with the given model, service.\n *\n * @param {ModelDescriptor<Model>} model - The model descriptor.\n * @param {ServiceClassType<Service>} [opts.service] - The class type of the service.\n * @param {TypeDescriptor<Sorts> | ModelDescriptor<Sorts>} [opts.sortsType] - Type of sorts\n * @param {TypeDescriptor<Filters> | ModelDescriptor<Filters>} [opts.filtersType] - Type of filters.\n * @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.\n *\n * @returns A tableview instance with descriptor, data provider and actions.\n */\nexport function tableview<Model, Service = undefined, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n model: ModelDescriptor<Model>,\n opts?: {\n service?: ServiceClassType<Service>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n },\n buildFn?: (\n builder: TableviewInputBuilder<Model, Service, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewDataProviderInst<Model, Service, Sorts, Filters>, Sorts, Filters>\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewDataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(new TableviewDescriptorInst<Model, Sorts, Filters>(model), new TableviewDataProviderInst<Model, Service, Sorts, Filters>(opts?.service), inject(Injector));\n buildFn?.(builder);\n return builder.build();\n}\n\ntype TableviewMultiModelOpts<Service, Sorts, Filters, TableModel, AddModel, EditModel> = {\n service?: ServiceClassType<Service>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n} & TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel>;\n\nexport function tableviewMultiModel<\n Model,\n Service = undefined,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model,\n FieldsModel = TableviewDescriptorFieldsManageMultiType<Model, AddModel, EditModel>\n>(\n model: ModelDescriptor<Model>,\n opts?: TableviewMultiModelOpts<Service, Sorts, Filters, TableModel, AddModel, EditModel>,\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>,\n TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassOptType<Service>, TableModel, AddModel, EditModel>,\n Sorts,\n Filters,\n TableModel,\n AddModel,\n EditModel,\n FieldsModel\n >\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>,\n TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassOptType<Service>, TableModel, AddModel, EditModel>,\n Sorts,\n Filters,\n TableModel,\n AddModel,\n EditModel,\n FieldsModel\n >(\n new TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>(model, opts),\n new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassOptType<Service>, TableModel, AddModel, EditModel>(opts?.service),\n inject(Injector)\n );\n buildFn?.(builder);\n return builder.build();\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\n\nimport {TableviewDataProviderInst} from '../data-providers/tableview.data-provider';\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\n\n/**\n * Creates a data provider for from descriptor. DO NOT use if the model is class, because the type (from model descriptor) will not be set in data provider.\n *\n * @param {TableviewDescriptorInst<Model, Sorts, Filters>} descriptor - The table descriptor.\n *\n * @return {TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined, undefined>} - The data provider for the table component.\n */\nexport function tableviewDataProviderFromDescriptor<\n Model,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>(\n descriptor: TableviewDescriptorInst<Model, Sorts, Filters, any, TableModel, CreateModel, UpdateModel, any>\n): TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined, TableModel, CreateModel, UpdateModel>;\n/**\n * Creates a data provider for from descriptor. DO NOT use if the model is class, because the type (from model descriptor) will not be set in data provider.\n *\n * @param {TableviewDescriptorInst<Model, Sorts, Filters>} descriptor - The table descriptor.\n * @param {ServiceClassType<Service>} serviceClass - The service class type.\n *\n * @return {TableviewDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>>} - The data provider for the table component.\n */\nexport function tableviewDataProviderFromDescriptor<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>(\n descriptor: TableviewDescriptorInst<Model, Sorts, Filters, any, TableModel, CreateModel, UpdateModel, any>,\n serviceClass: ServiceClassType<Service>\n): TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassType<Service>, TableModel, CreateModel, UpdateModel>;\nexport function tableviewDataProviderFromDescriptor<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = ServiceClassType<Service>,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>(descriptor: TableviewDescriptorInst<Model, Sorts, Filters, any, TableModel, CreateModel, UpdateModel, any>, serviceType?: ServiceClass) {\n return typeof serviceType !== 'undefined'\n ? new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassType<Service>, TableModel, CreateModel, UpdateModel>(serviceType as ServiceClassType<Service>)\n : new TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined, TableModel, CreateModel, UpdateModel>(undefined);\n}\n","// action descriptors\nexport * from './action/descriptors/action.descriptor';\nexport * from './action/descriptors/action-descriptor.factory';\nexport * from './action/descriptors/action-editor.descriptor';\nexport * from './action/descriptors/action-editor-descriptor.factory';\nexport * from './action/descriptors/action-link.descriptor';\nexport * from './action/descriptors/action-link-descriptor.factory';\nexport * from './action/descriptors/editor-action-descriptor.factory';\nexport * from './action/descriptors/editor-action-editor-descriptor.factory';\nexport * from './action/descriptors/table-action-descriptor.factory';\nexport * from './action/descriptors/table-action-editor-descriptor.factory';\n\n// action helpers\nexport * from './action/helpers/data-provider-executors';\n\n// action model execution\nexport * from './action/models/execution/action-context.model';\nexport * from './action/models/execution/action-context-validation.model';\nexport * from './action/models/execution/action-execution-error.model';\nexport * from './action/models/execution/action-instance.model';\nexport * from './action/models/execution/action-instance-state.model';\nexport * from './action/models/execution/view-container.model';\n\n// action model\nexport * from './action/models/action.type';\nexport * from './action/models/action-component.model';\nexport * from './action/models/action-confirmation.model';\nexport * from './action/models/action-descriptor.types';\nexport * from './action/models/action-editor.model';\nexport * from './action/models/action-error.model';\nexport * from './action/models/tableview-action-default-categories.model';\n\n// action services\nexport * from './action/services/tokens/data-language-dropdown.token';\nexport * from './action/services/data-provider-executor.service';\n\n// editor data providers\nexport * from './editor/data-providers/editor.data-provider';\nexport * from './editor/data-providers/editor-data-provider.factory';\n\n// editor descriptors\nexport * from './editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper';\nexport * from './editor/descriptors/editor.descriptor';\nexport * from './editor/descriptors/editor-descriptor.factory';\nexport * from './editor/descriptors/field.descriptor';\nexport * from './editor/descriptors/field-action.descriptor';\nexport * from './editor/descriptors/field-base.descriptor';\nexport * from './editor/descriptors/field-group.descriptor';\nexport * from './editor/descriptors/field-lookup.descriptor';\nexport * from './editor/descriptors/field-many.descriptor';\nexport * from './editor/descriptors/field-validation.descriptor';\n\n// editor models\nexport * from './editor/models/editor.model';\nexport * from './editor/models/editor-fields.model';\nexport * from './editor/models/field.model';\nexport * from './editor/models/field-action-context.model';\nexport * from './editor/models/field-validation.model';\nexport * from './editor/models/form-editor.event';\nexport * from './editor/models/form-editor.interface';\nexport * from './editor/models/formly-custom-field.model';\nexport * from './editor/models/formly-field.model';\nexport * from './editor/models/formly-options.model';\nexport * from './editor/models/radio.model';\nexport * from './editor/models/field-image-preview.model';\n\n// tableview data providers\nexport * from './tableview/data-providers/tableview.data-provider';\nexport * from './tableview/data-providers/tableview-data-provider.factory';\n\n// tableview descriptors\nexport * from './tableview/descriptors/tableview.descriptor';\nexport * from './tableview/descriptors/tableview-descriptor.factory';\n\n// tableview helpers\nexport * from './tableview/helpers/files-export';\nexport * from './tableview/helpers/tableview-create';\nexport * from './tableview/helpers/tableview-data-provider-descriptor-convert';\nexport * from './tableview/helpers/tableview-default-actions';\nexport * from './tableview/helpers/tableview-input-builder';\n\n// tableview models\nexport * from './tableview/models/tableview-descriptor-fields-manage-helper.type';\nexport * from './tableview/models/tableview-descriptor-helper.type';\nexport * from './tableview/models/tableview-input.model';\nexport * from './tableview/models/tableview-route.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map"],"mappings":";;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC1B,IAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW;AACX,IAAA,kBAA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AA,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AACf,aAAA,CAAC,EACyC,EAAE,CAChD,EACL,IAAI,CAAC,QAAQ,CAChB,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;YAC7B,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,UAAU,EAAE,IAAI,CAAC;SACpB;IACL;AACH;;AC5ZD;;;;;;;;;;AAUG;SACa,SAAS,CACrB,KAA6B,EAC7B,IAIC,EACD,OAES,EAAA;IAET,MAAM,OAAO,GAAG,IAAI,qBAAqB,CAOvC,IAAI,uBAAuB,CAAwB,KAAK,CAAC,EAAE,IAAI,yBAAyB,CAAiC,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5J,IAAA,OAAO,GAAG,OAAO,CAAC;AAClB,IAAA,OAAO,OAAO,CAAC,KAAK,EAAE;AAC1B;SAQgB,mBAAmB,CAU/B,KAA6B,EAC7B,IAAwF,EACxF,OAaS,EAAA;IAET,MAAM,OAAO,GAAG,IAAI,qBAAqB,CAYrC,IAAI,uBAAuB,CAAiF,KAAK,EAAE,IAAI,CAAC,EACxH,IAAI,yBAAyB,CAAgG,IAAI,EAAE,OAAO,CAAC,EAC3I,MAAM,CAAC,QAAQ,CAAC,CACnB;AACD,IAAA,OAAO,GAAG,OAAO,CAAC;AAClB,IAAA,OAAO,OAAO,CAAC,KAAK,EAAE;AAC1B;;ACrDM,SAAU,mCAAmC,CASjD,UAA0G,EAAE,WAA0B,EAAA;IACpI,OAAO,OAAO,WAAW,KAAK;AAC1B,UAAE,IAAI,yBAAyB,CAAkG,WAAwC;AACzK,UAAE,IAAI,yBAAyB,CAAoF,SAAS,CAAC;AACrI;;ACvDA;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mediusinc-mng-commons-tableview-api.mjs","sources":["../../tableview/api/src/action/models/action.type.ts","../../tableview/api/src/action/descriptors/action.descriptor.ts","../../tableview/api/src/action/descriptors/action-descriptor.factory.ts","../../tableview/api/src/editor/data-providers/editor.data-provider.ts","../../tableview/api/src/action/descriptors/action-editor.descriptor.ts","../../tableview/api/src/action/descriptors/action-editor-descriptor.factory.ts","../../tableview/api/src/action/descriptors/action-link.descriptor.ts","../../tableview/api/src/action/descriptors/action-link-descriptor.factory.ts","../../tableview/api/src/action/descriptors/editor-action-descriptor.factory.ts","../../tableview/api/src/action/descriptors/editor-action-editor-descriptor.factory.ts","../../tableview/api/src/action/descriptors/table-action-descriptor.factory.ts","../../tableview/api/src/action/descriptors/table-action-editor-descriptor.factory.ts","../../tableview/api/src/action/models/action-error.model.ts","../../tableview/api/src/action/helpers/data-provider-executors.ts","../../tableview/api/src/action/models/execution/action-instance-state.model.ts","../../tableview/api/src/action/models/tableview-action-default-categories.model.ts","../../tableview/api/src/action/services/tokens/data-language-dropdown.token.ts","../../tableview/api/src/action/services/data-provider-executor.service.ts","../../tableview/api/src/editor/data-providers/editor-data-provider.factory.ts","../../tableview/api/src/editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper.ts","../../tableview/api/src/editor/models/editor.model.ts","../../tableview/api/src/editor/models/field.model.ts","../../tableview/api/src/editor/descriptors/field-validation.descriptor.ts","../../tableview/api/src/editor/descriptors/field-base.descriptor.ts","../../tableview/api/src/editor/descriptors/field-action.descriptor.ts","../../tableview/api/src/editor/descriptors/field-group.descriptor.ts","../../tableview/api/src/editor/descriptors/field-lookup.descriptor.ts","../../tableview/api/src/editor/descriptors/field-many.descriptor.ts","../../tableview/api/src/editor/descriptors/field.descriptor.ts","../../tableview/api/src/editor/descriptors/editor.descriptor.ts","../../tableview/api/src/editor/descriptors/editor-descriptor.factory.ts","../../tableview/api/src/editor/models/form-editor.event.ts","../../tableview/api/src/editor/models/formly-custom-field.model.ts","../../tableview/api/src/tableview/data-providers/tableview.data-provider.ts","../../tableview/api/src/tableview/data-providers/tableview-data-provider.factory.ts","../../tableview/api/src/tableview/descriptors/tableview.descriptor.ts","../../tableview/api/src/tableview/descriptors/tableview-descriptor.factory.ts","../../tableview/api/src/tableview/helpers/files-export.ts","../../tableview/api/src/tableview/helpers/tableview-default-actions.ts","../../tableview/api/src/tableview/helpers/tableview-input-builder.ts","../../tableview/api/src/tableview/helpers/tableview-create.ts","../../tableview/api/src/tableview/helpers/tableview-data-provider-descriptor-convert.ts","../../tableview/api/src/index.ts","../../tableview/api/src/mediusinc-mng-commons-tableview-api.ts"],"sourcesContent":["export enum ActionPositionEnum {\n ToolbarLeft,\n ToolbarRight,\n TableHeader,\n RowInline,\n RowClick,\n FooterLeft,\n FooterRight\n}\n\nexport enum ActionActivationTriggerEnum {\n OnClick, // action is triggered for activation on click\n OnRoute // action is triggered for activation by route url\n}\n\nexport enum ActionTypeEnum {\n Direct, // action is directly activated and executed\n Editor // editor providing middle step for activation\n}\n\nexport enum ActionEditorSubmitTypeEnum {\n Submit,\n Cancel\n}\n","import {InjectionToken, Type} from '@angular/core';\n\nimport {ButtonSeverity} from 'primeng/button';\nimport {of} from 'rxjs';\n\nimport {\n APermissions,\n ClassType,\n CommonsInternalError,\n DataProviderInst,\n IActionDescriptor,\n IDataProvider,\n LoggerService,\n ServiceClassType,\n findReflectTypeName\n} from '@mediusinc/mng-commons/core';\nimport {IActionButtonDescriptor} from '@mediusinc/mng-commons/form/api';\nimport {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {IActionComponent} from '../models/action-component.model';\nimport {ActionConfirmation} from '../models/action-confirmation.model';\nimport {ActionNotificationType, ActionRunFnType, ActionValidationFnType} from '../models/action-descriptor.types';\nimport {ActionActivationTriggerEnum, ActionPositionEnum, ActionTypeEnum} from '../models/action.type';\nimport {IActionContext} from '../models/execution/action-context.model';\n\nexport type ActionDescriptorCreateOptsProviderType<Item, Service> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: IDataProvider<Item, Service>;\n};\n\nexport type ActionDescriptorCreateOptsParentType = {\n parentModel?: ModelDescriptor<any>;\n parentProperty?: string;\n};\n\nexport type ActionDescriptorConstructorOptsType<Item, Service> = ActionDescriptorCreateOptsParentType &\n ActionDescriptorCreateOptsProviderType<Item, Service> & {\n model?: ModelDescriptor<Item>;\n };\n\ntype AfterRunActionType<RunReturnItem> = ActionDescriptorInst<any, any, RunReturnItem, any, undefined>;\ntype OnErrorActionType<RunInputItem> = ActionDescriptorInst<any, any, RunInputItem, any, undefined>;\n\nexport class ActionDescriptorInst<Item, Service = any, RunInputItem = Item, RunReturnItem = Item, ValidationInputItem = RunInputItem> implements IActionDescriptor<Item, Service> {\n protected readonly _model?: ModelDescriptor<Item>;\n protected readonly _actionName: string;\n protected readonly _actionNameLong: string;\n protected readonly _parentModel?: ModelDescriptor<any>;\n protected readonly _parentProperty?: string;\n\n protected readonly _dataProvider?: IDataProvider<Item, Service>;\n\n protected _i18nModelActionBaseKey?: string;\n\n protected _type: ActionTypeEnum = ActionTypeEnum.Direct;\n protected _activationTrigger: ActionActivationTriggerEnum = ActionActivationTriggerEnum.OnClick;\n protected _position: ActionPositionEnum = ActionPositionEnum.ToolbarRight;\n private _positionTableviewCategories?: string[];\n protected _tableviewCategory?: string;\n\n protected _routeUrl: string | null = null;\n\n protected _runFunction?: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>;\n protected _isVisibleFunction?: ActionValidationFnType<ValidationInputItem, Service>;\n protected _isEnabledFunction?: ActionValidationFnType<ValidationInputItem, Service>;\n\n protected _runConfirmation?: ActionConfirmation<Item, RunInputItem, Service>;\n\n protected _runNotificationOnSuccess?: ActionNotificationType | boolean;\n protected _runNotificationOnError?: ActionNotificationType | boolean;\n\n protected _afterRunAction?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>);\n protected _onRunErrorAction?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>);\n\n // security\n protected _permissions?: APermissions;\n\n //button\n protected _button?: IActionButtonDescriptor;\n\n // multiple row selection\n protected _hasItemsSelection = false;\n\n // custom action component\n protected _component?: Type<IActionComponent<Item>>;\n protected _componentFromDi?: InjectionToken<Type<any>>;\n\n // subactions\n protected _subactionsAsMenu = false;\n protected _subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>> = [];\n\n public constructor(actionName: string, cfg?: ActionDescriptorConstructorOptsType<Item, Service>) {\n this._model = cfg?.model;\n this._actionName = actionName;\n\n if ((cfg?.parentModel && !cfg?.parentProperty) || (!cfg?.parentProperty && cfg?.parentProperty)) {\n throw new CommonsInternalError(\n `Provide both the parent model and parent property or none: ${this._actionName}, ${cfg?.parentModel?.i18nBaseKey}, ${cfg?.parentProperty}.`\n );\n }\n this._parentModel = cfg?.parentModel;\n this._parentProperty = cfg?.parentProperty;\n\n this.setI18nModelActionBaseKey();\n\n if (cfg?.serviceType) {\n this._dataProvider = new DataProviderInst<Item, Service>(cfg.serviceType);\n } else if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n }\n\n let displayName = actionName;\n if (this._model) displayName = this._model.i18nBaseKey ? `${this._model.i18nBaseKey}.${displayName}` : displayName;\n if (this._parentModel) {\n displayName = `${this._parentModel.i18nBaseKey}.${this._parentProperty}_${displayName}`;\n }\n this._actionNameLong = displayName;\n }\n\n public get model() {\n return this._model;\n }\n\n public get parentModel() {\n return this._parentModel;\n }\n\n public get parentProperty() {\n return this._parentProperty;\n }\n\n public get i18nModelActionBaseKey() {\n return this._i18nModelActionBaseKey;\n }\n\n public get type() {\n return this._type;\n }\n\n public get activationTrigger() {\n return this._activationTrigger;\n }\n\n public get position() {\n return this._position;\n }\n\n public get routeUrl() {\n return this._routeUrl;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get hasRunFunction(): boolean {\n return typeof this._runFunction === 'function';\n }\n\n public get runFunction(): ActionRunFnType<Item, Service, RunInputItem, RunReturnItem> {\n if (!this._runFunction) {\n throw new CommonsInternalError(`Run function is not defined for action ${this._actionNameLong} and cannot be invoked`);\n }\n return this._runFunction;\n }\n\n public get isVisibleFunction() {\n return this._isVisibleFunction;\n }\n\n public get isEnabledFunction() {\n return this._isEnabledFunction;\n }\n\n public get actionName() {\n return this._actionName;\n }\n\n public get actionNameLong() {\n return this._actionNameLong;\n }\n\n public get runConfirmation() {\n return this._runConfirmation;\n }\n\n public get runNotificationOnSuccess() {\n return this._runNotificationOnSuccess;\n }\n\n public get runNotificationOnError() {\n return this._runNotificationOnError;\n }\n\n public get afterRunAction() {\n return this._afterRunAction;\n }\n\n public get onRunErrorAction() {\n return this._onRunErrorAction;\n }\n\n public get permissions() {\n return this._permissions;\n }\n\n public get tableviewCategory() {\n return this._tableviewCategory;\n }\n\n public get hasItemsSelection() {\n return this._hasItemsSelection;\n }\n\n public get button() {\n return this._button;\n }\n\n public get component() {\n return this._component;\n }\n\n public get componentFromDi() {\n return this._componentFromDi;\n }\n\n public get positionTableviewCategories() {\n return this._positionTableviewCategories;\n }\n\n public get subactionsAsMenu() {\n return this._subactionsAsMenu;\n }\n\n public get subactions() {\n return this._subactions;\n }\n\n protected setI18nModelActionBaseKey(base?: string) {\n if (this._parentModel || this._model) {\n this._i18nModelActionBaseKey = this._parentModel\n ? `${this._parentModel.i18nBaseKey}.actions.${this._parentProperty}_${this._actionName}`\n : `${base ?? this._model!.i18nBaseKey}.actions.${this._actionName}`;\n }\n }\n\n public withRunFunction(fn: ActionRunFnType<Item, Service, RunInputItem, RunReturnItem>): this {\n this._runFunction = fn;\n return this;\n }\n\n public withIsVisibleFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this {\n this._isVisibleFunction = fn;\n return this;\n }\n\n public withIsEnabledFunction(fn?: ActionValidationFnType<ValidationInputItem, Service>): this {\n this._isEnabledFunction = fn;\n return this;\n }\n\n public withRouteTrigger(routeUrl: string): this {\n this._activationTrigger = ActionActivationTriggerEnum.OnRoute;\n this._routeUrl = routeUrl;\n return this;\n }\n\n public withPosition(position: ActionPositionEnum): this {\n this._position = position;\n return this;\n }\n\n /**\n * Creates confirmation action with default style based on action descriptor\n */\n public withRunConfirmation(opts: boolean | ActionConfirmation<Item, RunInputItem, Service> = true): this {\n this._runConfirmation = opts === true ? {} : opts === false ? undefined : opts;\n return this;\n }\n\n /**\n * Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.\n *\n * @param opts Provide config for texts or on/off flag for run success/error notifications.\n */\n public withNotifications(opts?: {runOnSuccess?: ActionNotificationType | boolean; runOnError?: ActionNotificationType | boolean} | boolean): this {\n this._runNotificationOnSuccess = typeof opts === 'boolean' ? opts : opts?.runOnSuccess;\n this._runNotificationOnError = typeof opts === 'boolean' ? opts : opts?.runOnError;\n return this;\n }\n\n public withAfterRunAction(action?: AfterRunActionType<RunReturnItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => AfterRunActionType<RunReturnItem>)): this {\n this._afterRunAction = action;\n return this;\n }\n\n public withOnRunErrorAction(action?: OnErrorActionType<RunInputItem> | ((ctx: IActionContext<Item, RunInputItem, any, any>) => OnErrorActionType<RunInputItem>)): this {\n this._onRunErrorAction = action;\n return this;\n }\n\n public withPermissions(permissions: APermissions): this {\n if (this._tableviewCategory) {\n LoggerService.get().debug(\n `WARNING: Permissions set on action ${this._actionNameLong} with route type '${this._tableviewCategory}' will be omitted in route guard validation.`\n );\n }\n this._permissions = permissions;\n return this;\n }\n\n public withTableviewCategory(category: string): this {\n this._tableviewCategory = category;\n return this;\n }\n\n public withButtonOpts(button?: IActionButtonDescriptor): this {\n this._button = button;\n return this;\n }\n\n public withButton(label?: string | null, icon: string | null = null, severity?: ButtonSeverity): this {\n this._button = {\n ...this._button,\n label,\n icon,\n style: {\n ...this._button?.style,\n severity: severity\n }\n };\n return this;\n }\n\n public withItemsSelection(hasSelection = true): this {\n this._hasItemsSelection = hasSelection;\n this._isEnabledFunction = this._isEnabledFunction ?? (ctx => of((ctx.parameters.selectedItems?.length ?? 0) > 0));\n return this;\n }\n\n public withComponent(component: Type<IActionComponent<Item>>): this {\n this._component = component;\n return this;\n }\n\n public withComponentFromDi(injectionToken: InjectionToken<Type<any>>): this {\n this._componentFromDi = injectionToken;\n return this;\n }\n\n public withPositionTableviewCategories(positionTableviewCategories: string[]): this {\n this._positionTableviewCategories = positionTableviewCategories;\n return this;\n }\n\n public withI18nBase(base: ClassType<unknown> | string): this {\n if (typeof base !== 'string') {\n const typeName = findReflectTypeName(base);\n if (!typeName) {\n throw new CommonsInternalError(`Could not find define i18nBaseKey for ${base} on action ${this.actionNameLong}`);\n }\n base = typeName;\n }\n this.setI18nModelActionBaseKey(base);\n return this;\n }\n\n public withSubactionsAsMenu(subactionsAsMenu = true): this {\n this._subactionsAsMenu = subactionsAsMenu;\n return this;\n }\n\n public withSubactions(...subactions: Array<ActionDescriptorInst<Item, any, RunInputItem, any>>): this {\n this._subactions.push(...subactions);\n return this;\n }\n\n public copyFieldsTo(\n descriptor: ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>\n ): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem> {\n descriptor._i18nModelActionBaseKey = this._i18nModelActionBaseKey;\n descriptor._type = this._type;\n descriptor._activationTrigger = this._activationTrigger;\n descriptor._position = this._position;\n descriptor._positionTableviewCategories = this._positionTableviewCategories ? [...this._positionTableviewCategories] : undefined;\n\n descriptor._tableviewCategory = this._tableviewCategory;\n descriptor._routeUrl = this._routeUrl;\n\n descriptor._runFunction = this._runFunction;\n descriptor._isVisibleFunction = this._isVisibleFunction;\n descriptor._isEnabledFunction = this._isEnabledFunction;\n\n if (this._runConfirmation) {\n descriptor._runConfirmation = {...this._runConfirmation};\n if (this._runConfirmation.acceptButton) {\n descriptor._runConfirmation.acceptButton = {...this._runConfirmation.acceptButton};\n }\n if (this._runConfirmation.rejectButton) {\n descriptor._runConfirmation.rejectButton = {...this._runConfirmation.rejectButton};\n }\n }\n\n descriptor._runNotificationOnSuccess = typeof this._runNotificationOnSuccess === 'object' ? {...this._runNotificationOnSuccess} : this._runNotificationOnSuccess;\n descriptor._runNotificationOnError = typeof this._runNotificationOnError === 'object' ? {...this._runNotificationOnError} : this._runNotificationOnError;\n\n if (this._afterRunAction != null) {\n descriptor._afterRunAction = typeof this._afterRunAction === 'function' ? this._afterRunAction : this._afterRunAction.copy();\n }\n if (this._onRunErrorAction != null) {\n descriptor._onRunErrorAction = typeof this._onRunErrorAction === 'function' ? this._onRunErrorAction : this._onRunErrorAction.copy();\n }\n\n descriptor._permissions = this._permissions;\n\n if (this._button) {\n descriptor._button = {\n ...this._button\n };\n if (this._button.style) {\n descriptor._button.style = {\n ...this._button.style\n };\n }\n }\n\n descriptor._hasItemsSelection = this._hasItemsSelection;\n descriptor._component = this._component;\n descriptor._componentFromDi = this._componentFromDi;\n descriptor._subactionsAsMenu = this._subactionsAsMenu;\n descriptor._subactions = this._subactions.map(a => a.copy());\n\n return descriptor;\n }\n\n public copy(): ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem> {\n const descriptor = new ActionDescriptorInst<Item, Service, RunInputItem, RunReturnItem, ValidationInputItem>(this._actionName, {\n dataProvider: this._dataProvider,\n model: this._model?.copy(),\n parentModel: this._parentModel,\n parentProperty: this._parentProperty\n });\n\n this.copyFieldsTo(descriptor);\n\n return descriptor;\n }\n}\n","import {IDataProvider, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {ActionDescriptorCreateOptsParentType, ActionDescriptorCreateOptsProviderType, ActionDescriptorInst} from './action.descriptor';\n\nexport type ActionDescriptorCreateFromModelOptsType<RunInputType, RunReturnType, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n runInputType?: TypeDescriptor<RunInputType>;\n runReturnType?: TypeDescriptor<RunReturnType>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\nexport type ActionDescriptorCreateOptsType<Model, Service, RunInputType, RunReturnType, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n runInputType?: TypeDescriptor<RunInputType>;\n runReturnType?: TypeDescriptor<RunReturnType>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\nexport type ActionProviderType<Model, Service> = ServiceClassType<Service> | IDataProvider<Model, Service>;\n\nexport const actionGetProviderCfgObj = <Model, Service>(serviceOrDataProvider?: ActionProviderType<Model, Service>) => {\n const cfg: ActionDescriptorCreateOptsProviderType<Model, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.dataProvider = serviceOrDataProvider as IDataProvider<Model, Service>;\n } else {\n cfg.serviceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\n/**\n * Creates and returns an instance of ActionDescriptorInst, allowing customization of the action's behavior through configuration options.\n *\n * @param {string} actionName - The unique name of the action.\n * @param {ActionDescriptorCreateFromModelOptsType<Model, Service, RunInput, RunResult, ValidationInput>} [opts] - Optional configuration object to define the action's behavior, including model, service provider and other.\n * @return {ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput>} An instance of ActionDescriptorInst configured with the provided parameters.\n */\nexport function action<Model, Service = undefined, RunInput = Model, RunResult = Model, ValidationInput = Model>(\n actionName: string,\n opts?: ActionDescriptorCreateOptsType<Model, Service, RunInput, RunResult, ValidationInput>\n): ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput> {\n return new ActionDescriptorInst<Model, Service, RunInput, RunResult, ValidationInput>(actionName, {\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts.serviceProvider) : {}),\n ...opts\n });\n}\n","import {Observable, Subject} from 'rxjs';\n\nimport {DataProviderInst, IDataProvider, IdType, ItemOrObservable, ServiceClassOptType, Undefined} from '@mediusinc/mng-commons/core';\n\nimport {EditorResetEvent} from '../models/form-editor.event';\n\nexport type EditorDataProviderFetchFnType<Model = any, Service = undefined, Id = IdType, Return = ItemOrObservable<Model>> = (\n id: Id,\n service: Service,\n locale: string | undefined\n) => Return;\nexport type EditorDataProviderCreateFnType<CreateModel = any, Model = any, Service = undefined, Item = Undefined<CreateModel>, Return = ItemOrObservable<Undefined<Model>>> = (\n item: Item,\n service: Service\n) => Return;\nexport type EditorDataProviderUpdateFnType<\n UpdateModel = any,\n Model = any,\n Service = undefined,\n Id = IdType,\n Item = Undefined<UpdateModel>,\n Return = ItemOrObservable<Undefined<Model>>\n> = (id: Id, item: Item, service: Service) => Return;\nexport type EditorDataProviderDeleteFnType<Model = any, Service = undefined, Item = undefined, Id = IdType, Return = ItemOrObservable<Undefined<Model>>> = (\n id: Id,\n service: Service,\n item: Item\n) => Return;\nexport type EditorDataProviderFetchMapToFnType<FromModel, ToModel> = (item: FromModel) => ToModel;\n\nexport interface IEditorDataProviderFetch<Model, Service> {\n fetch?: EditorDataProviderFetchFnType<Model, Service>;\n\n withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this;\n}\n\nexport interface IEditorDataProviderCreate<CreateModel, Model, Service> {\n create?: EditorDataProviderCreateFnType<CreateModel, Model, Service>;\n\n withCreate(fn?: EditorDataProviderCreateFnType<CreateModel, Model, Service>): this;\n}\n\nexport interface IEditorDataProviderUpdate<UpdateModel, Model, Service> {\n update?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>;\n\n withUpdate(fn?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>): this;\n}\n\nexport interface IEditorDataProviderDelete<Model, Service> {\n delete?: EditorDataProviderDeleteFnType<Model, Service, any>;\n\n withDelete<Item = undefined>(fn?: EditorDataProviderDeleteFnType<Model, Service, Item>): this;\n}\n\nexport interface IEditorDataProviderFetchMapToCreate<Model, CreateModel> {\n mapFetchItemToCreateItem?: EditorDataProviderFetchMapToFnType<Model, CreateModel>;\n\n withMapFetchItemToCreateItem(fn?: EditorDataProviderFetchMapToFnType<Model, CreateModel>): this;\n}\n\nexport interface IEditorDataProviderFetchMapToUpdate<Model, UpdateModel> {\n mapFetchItemToUpdateItem?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>;\n\n withMapFetchItemToUpdateItem(fn?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>): this;\n}\n\nexport type IEditorDataProviderFnsType<Model, Service, CreateModel = Model, UpdateModel = Model, DeleteModel = Model> = IEditorDataProviderFetch<Model, Service> &\n IEditorDataProviderCreate<CreateModel, Model, Service> &\n IEditorDataProviderUpdate<UpdateModel, Model, Service> &\n IEditorDataProviderDelete<DeleteModel, Service> &\n IEditorDataProviderFetchMapToCreate<Model, CreateModel> &\n IEditorDataProviderFetchMapToUpdate<Model, UpdateModel>;\n\nexport interface IEditorDataProviderSupport<Model> {\n get editorReset$(): Observable<EditorResetEvent<Model>>;\n\n resetEditor(event?: EditorResetEvent<Model>): void;\n}\n\nexport type IEditorDataProvider<Model = any, Service = any, ServiceClass = ServiceClassOptType<Service>, CreateModel = Model, UpdateModel = Model> = IDataProvider<\n Model,\n Service,\n ServiceClass\n> &\n IEditorDataProviderFnsType<Model, Service, CreateModel, UpdateModel> &\n IEditorDataProviderSupport<Model>;\n\nexport class EditorDataProviderInst<Model, Service = any, ServiceClass = ServiceClassOptType<Service>, CreateModel = Model, UpdateModel = Model>\n extends DataProviderInst<Model, Service, ServiceClass>\n implements IEditorDataProvider<Model, Service, ServiceClass, CreateModel, UpdateModel>\n{\n protected readonly _editorResetSubject = new Subject<EditorResetEvent<Model>>();\n\n protected _fetch?: EditorDataProviderFetchFnType<Model, Service>;\n protected _create?: EditorDataProviderCreateFnType<CreateModel, Model, Service>;\n protected _update?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>;\n protected _delete?: EditorDataProviderDeleteFnType<Model, Service, any>;\n protected _mapFetchItemToCreateItem?: EditorDataProviderFetchMapToFnType<Model, CreateModel>;\n protected _mapFetchItemToUpdateItem?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>;\n\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n }\n\n get fetch() {\n return this._fetch;\n }\n\n get create() {\n return this._create;\n }\n\n get update() {\n return this._update;\n }\n\n get delete() {\n return this._delete;\n }\n\n get mapFetchItemToCreateItem() {\n return this._mapFetchItemToCreateItem;\n }\n\n get mapFetchItemToUpdateItem() {\n return this._mapFetchItemToUpdateItem;\n }\n\n get editorReset$() {\n return this._editorResetSubject.asObservable();\n }\n\n /**\n * Sets the fetch function for the EditorDataProvider instance.\n *\n * @param {EditorDataProviderFetchFnType<Model, Service>} fn - The fetch function to be set.\n * @returns {this} - The instance of the EditorDataProvider with the fetch function set.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this {\n this._fetch = fn;\n return this;\n }\n\n /**\n * Sets the create function for the EditorDataProvider.\n *\n * @param {EditorDataProviderCreateFnType<CreateModel, Model, Service>} fn - The function used for creating new items.\n * @returns {this} - Returns the instance of the class.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withCreate(fn?: EditorDataProviderCreateFnType<CreateModel, Model, Service>): this {\n this._create = fn;\n return this;\n }\n\n /**\n * Sets the update function for the EditorDataProvider.\n *\n * @param {EditorDataProviderUpdateFnType<Model, Service>} fn - The update function to be set.\n * @returns {this} - Returns the instance of the object calling this method.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withUpdate(fn?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>): this {\n this._update = fn;\n return this;\n }\n\n /**\n * Sets the delete function for the editor data provider.\n *\n * @param {EditorDataProviderDeleteFnType<Model, Service>} fn - The delete function to be set.\n *\n * @returns {this} - Returns the instance of the current class.\n *\n * @typeparam Model The type of data this DataProvider will handle.\n * @typeparam Service The type of service used by this DataProvider.\n */\n withDelete<Item = undefined>(fn?: EditorDataProviderDeleteFnType<Model, Service, Item>): this {\n this._delete = fn;\n return this;\n }\n\n /**\n * Sets the function to map data from fetch function to create model.\n *\n * @param {EditorDataProviderFetchMapToFnType<Model, CreateModel>} fn - The map function to be set.\n *\n * @returns {this} - Returns the instance of the current class.\n *\n * @typeparam Model The type of data from fetch function to map from.\n * @typeparam CreateModel The type of data to map to.\n */\n withMapFetchItemToCreateItem(fn?: EditorDataProviderFetchMapToFnType<Model, CreateModel>): this {\n this._mapFetchItemToCreateItem = fn;\n return this;\n }\n\n /**\n * Sets the function to map data from fetch function to update model.\n *\n * @param {EditorDataProviderFetchMapToFnType<Model, UpdateModel>} fn - The map function to be set.\n *\n * @returns {this} - Returns the instance of the current class.\n *\n * @typeparam Model The type of data from fetch function to map from.\n * @typeparam UpdateModel The type of data to map to.\n */\n withMapFetchItemToUpdateItem(fn?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>): this {\n this._mapFetchItemToUpdateItem = fn;\n return this;\n }\n\n resetEditor(event?: EditorResetEvent<Model>): void {\n this._editorResetSubject.next(event ?? {});\n }\n}\n","import {Type} from '@angular/core';\n\nimport {CommonsInternalError, ServiceClassType, StyleSizeEnum} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDataProviderInst, IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionEditorRunFnType, ActionNotificationType, ActionRunFnType} from '../models/action-descriptor.types';\nimport {ActionEditorSubmitTypeEnum, ActionPositionEnum, ActionTypeEnum} from '../models/action.type';\nimport {ActionDescriptorCreateOptsParentType, ActionDescriptorInst} from './action.descriptor';\n\nexport type ActionEditorDescriptorConstructorOptsType<Model, Service> = ActionDescriptorCreateOptsParentType &\n ActionEditorDescriptorCreateOptsProviderType<Model, Service> & {\n model?: ModelDescriptor<Model>;\n isTableviewMainEditor?: boolean;\n };\n\nexport type ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: IEditorDataProvider<Model, Service>;\n};\n\nexport class ActionEditorDescriptorInst<\n Item,\n Service = any,\n EditorItem = Item,\n FetchInputItem = Item,\n SubmitReturnItem = Item,\n ValidationInputItem = Item,\n ParentEditorItem = undefined\n> extends ActionDescriptorInst<Item, Service, EditorItem, SubmitReturnItem, ValidationInputItem> {\n private readonly _editorDescriptor: EditorDescriptorInst<EditorItem, ParentEditorItem>;\n protected override readonly _dataProvider?: IEditorDataProvider<Item, any> = undefined;\n\n protected _editorActions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[] = [];\n protected _editorTitle?: string | null = undefined;\n protected _editorTitleParams?: any = undefined;\n\n protected _fetchNotificationOnSuccess?: ActionNotificationType | boolean;\n protected _fetchNotificationOnError?: ActionNotificationType | boolean;\n\n protected _dialogSize = StyleSizeEnum.Normal;\n protected _dialogClassName?: string;\n protected _dialogIsMaximizable?: boolean;\n\n protected _fetchFunction?: ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem>;\n protected _submitFunction?: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>;\n\n protected _editorComponent?: Type<any>;\n\n protected _resubmitEnabled?: boolean;\n protected _resubmitRefetch = true;\n protected _unsavedChangesConfirmation = false;\n\n public constructor(editorDescriptor: EditorDescriptorInst<EditorItem, any>, actionName: string, cfg?: ActionEditorDescriptorConstructorOptsType<Item, Service>) {\n super(actionName, {\n ...cfg,\n model: cfg?.model ?? (editorDescriptor.model as unknown as ModelDescriptor<Item>)\n });\n\n if (cfg?.serviceType) {\n this._dataProvider = new EditorDataProviderInst<Item, Service>(cfg.serviceType);\n } else if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n }\n\n this._type = ActionTypeEnum.Editor;\n this._editorDescriptor = editorDescriptor;\n this._editorActions.push(actionEditorSubmit(this), actionEditorCancel(this));\n }\n\n public get editorTitle() {\n return this._editorTitle;\n }\n\n public get editorTitleParams() {\n return this._editorTitleParams;\n }\n\n public get editorDescriptor() {\n return this._editorDescriptor;\n }\n\n public get dialogSize() {\n return this._dialogSize;\n }\n\n public get dialogClassName() {\n return this._dialogClassName;\n }\n\n public get dialogIsMaximizable() {\n return this._dialogIsMaximizable;\n }\n\n public get fetchNotificationOnSuccess() {\n return this._fetchNotificationOnSuccess;\n }\n\n public get fetchNotificationOnError() {\n return this._fetchNotificationOnError;\n }\n\n public override get dataProvider() {\n return this._dataProvider;\n }\n\n public override get hasRunFunction(): boolean {\n throw new CommonsInternalError(`Run function cannot be used in editor action for ${this._actionNameLong}. Use submit function instead`);\n }\n\n public override get runFunction(): ActionRunFnType<Item, Service, EditorItem, SubmitReturnItem> {\n throw new CommonsInternalError(`Run function cannot be used in editor action for ${this._actionNameLong}. Use submit function instead`);\n }\n\n public get hasFetchFunction(): boolean {\n return typeof this._fetchFunction === 'function';\n }\n\n public get fetchFunction() {\n return this._fetchFunction;\n }\n\n public get hasSubmitFunction(): boolean {\n return typeof this._fetchFunction === 'function';\n }\n\n public get submitFunction() {\n return this._submitFunction;\n }\n\n public get editorActions() {\n return this._editorActions;\n }\n\n public get editorComponent() {\n return this._editorComponent;\n }\n\n public get resubmitEnabled() {\n return this._resubmitEnabled;\n }\n\n public get resubmitRefetch() {\n return this._resubmitRefetch;\n }\n\n public get unsavedChangesConfirmation() {\n return this._unsavedChangesConfirmation;\n }\n\n public withEditorTitle(title: string | null, params?: any): this {\n this._editorTitle = title;\n this._editorTitleParams = params;\n return this;\n }\n\n public withDialogSize(size = StyleSizeEnum.Normal): this {\n this._dialogSize = size;\n return this;\n }\n\n public withDialogClassName(className: string): this {\n this._dialogClassName = className;\n return this;\n }\n\n public withDialogMaximizable(isMaximizable = true): this {\n this._dialogIsMaximizable = isMaximizable;\n return this;\n }\n\n public override withRunFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>): this {\n return this.withSubmitFunction(fn);\n }\n\n public withFetchFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, FetchInputItem, EditorItem>): this {\n this._fetchFunction = fn;\n return this;\n }\n\n public withSubmitFunction(fn: ActionEditorRunFnType<Item, ParentEditorItem, Service, EditorItem, SubmitReturnItem>): this {\n this._submitFunction = fn;\n return this;\n }\n\n /**\n * Override default notifications setup. Notifications can either be overridden with custom text or turned on/off.\n *\n * @param opts Provide config for texts or on/off flag for submit (is same as run) or fetch success/error notifications.\n */\n public override withNotifications(\n opts?:\n | {\n submitOnSuccess?: ActionNotificationType | boolean;\n submitOnError?: ActionNotificationType | boolean;\n runOnSuccess?: ActionNotificationType | boolean;\n runOnError?: ActionNotificationType | boolean;\n fetchOnSuccess?: ActionNotificationType | boolean;\n fetchOnError?: ActionNotificationType | boolean;\n }\n | boolean\n ): this {\n super.withNotifications(\n typeof opts === 'boolean'\n ? opts\n : {\n runOnSuccess: opts?.submitOnSuccess ?? opts?.runOnSuccess,\n runOnError: opts?.submitOnError ?? opts?.runOnError\n }\n );\n this._fetchNotificationOnSuccess = typeof opts === 'boolean' ? opts : opts?.fetchOnSuccess;\n this._fetchNotificationOnError = typeof opts === 'boolean' ? opts : opts?.fetchOnError;\n return this;\n }\n\n public withEditorAction(action: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>): this {\n this._editorActions.push(action);\n return this;\n }\n\n public withEditorActions(actions: ActionDescriptorInst<any, any, EditorItem, any, EditorItem>[]): this {\n this._editorActions = actions;\n return this;\n }\n\n public withEditorComponent(editorComponent: Type<any>): this {\n this._editorComponent = editorComponent;\n return this;\n }\n\n /**\n * Enables or disables resubmit resubmit - this means the form will not exit after successful submission, but will instead remain open.\n *\n * @param {boolean} [enabled=true] - Specifies whether resubmit is enabled or disabled. Defaults to true if not provided.\n * @param {boolean} [refetch=true] - Specifies whether the data should be refetched after resubmit. If not, the data in the form stays as is. Defaults to true if not provided.\n *\n * @returns {this} - Returns the current instance with the resubmit configuration updated.\n */\n public withResubmit(enabled?: boolean, refetch = true): this {\n this._resubmitEnabled = enabled;\n this._resubmitRefetch = refetch;\n return this;\n }\n\n public withUnsavedChangesConfirmation(unsavedChangesConfirmation = true): this {\n this._unsavedChangesConfirmation = unsavedChangesConfirmation;\n return this;\n }\n\n override copyFieldsTo(\n descriptor: ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>\n ): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem> {\n super.copyFieldsTo(descriptor);\n descriptor._editorActions = this._editorActions.map(a => a.copy());\n descriptor._editorTitle = this._editorTitle;\n descriptor._editorTitleParams = this._editorTitleParams != null ? {...this._editorTitleParams} : undefined;\n\n descriptor._fetchNotificationOnSuccess = typeof this._fetchNotificationOnSuccess === 'object' ? {...this._fetchNotificationOnSuccess} : this._fetchNotificationOnSuccess;\n descriptor._fetchNotificationOnError = typeof this._fetchNotificationOnError === 'object' ? {...this._fetchNotificationOnError} : this._fetchNotificationOnError;\n\n descriptor._dialogSize = this._dialogSize;\n descriptor._dialogClassName = this._dialogClassName;\n descriptor._dialogIsMaximizable = this._dialogIsMaximizable;\n descriptor._fetchFunction = this._fetchFunction;\n descriptor._submitFunction = this._submitFunction;\n descriptor._editorComponent = this._editorComponent;\n descriptor._resubmitEnabled = this._resubmitEnabled;\n descriptor._resubmitRefetch = this._resubmitRefetch;\n descriptor._unsavedChangesConfirmation = this._unsavedChangesConfirmation;\n return descriptor;\n }\n\n override copy(): ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem> {\n const editor = this._editorDescriptor.copy();\n const descriptor = new ActionEditorDescriptorInst<Item, Service, EditorItem, FetchInputItem, SubmitReturnItem, ValidationInputItem, ParentEditorItem>(\n editor,\n this._actionName,\n {\n dataProvider: this._dataProvider,\n model: this._model?.copy(),\n parentModel: this._parentModel,\n parentProperty: this._parentProperty\n }\n );\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n}\nexport class ActionEditorSubmitDescriptorInst<Model, EditorModel> extends ActionDescriptorInst<Model, undefined, EditorModel, EditorModel, EditorModel> {\n private readonly _submitType: ActionEditorSubmitTypeEnum;\n\n public constructor(editorActionName: string, editorActionModel: ModelDescriptor<Model> | undefined, submitType = ActionEditorSubmitTypeEnum.Submit) {\n super(submitType === ActionEditorSubmitTypeEnum.Submit ? `${editorActionName}.submit` : `${editorActionName}.cancel`, {model: editorActionModel});\n this._submitType = submitType;\n this._position = ActionPositionEnum.FooterRight;\n }\n\n public get submitType() {\n return this._submitType;\n }\n\n override copy(): ActionEditorSubmitDescriptorInst<Model, EditorModel> {\n const descriptor = new ActionEditorSubmitDescriptorInst<Model, EditorModel>(this._actionName.split('.').slice(0, -1).join('.'), this._model?.copy(), this._submitType);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n}\n\n/**\n * creates primary action with primary button style\n * @param editorAction\n * @param submitType\n */\nexport function actionEditorSubmit<Model, EditorModel>(\n editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any, any>,\n submitType = ActionEditorSubmitTypeEnum.Submit\n): ActionEditorSubmitDescriptorInst<Model, EditorModel> {\n return new ActionEditorSubmitDescriptorInst<Model, EditorModel>(editorAction.actionName, editorAction.model, submitType).withButtonOpts({\n style: {\n severity: editorAction.button?.style?.severity\n }\n });\n}\n\n/**\n * creates secondary button with text button style\n * @param editorAction\n * @param submitType\n */\nexport function actionEditorCancel<Model, EditorModel>(\n editorAction: ActionEditorDescriptorInst<Model, any, EditorModel, any, any, any, any>,\n submitType = ActionEditorSubmitTypeEnum.Cancel\n): ActionEditorSubmitDescriptorInst<Model, EditorModel> {\n return new ActionEditorSubmitDescriptorInst<Model, EditorModel>(editorAction.actionName, editorAction.model, submitType).withButtonOpts({\n style: {\n text: true,\n severity: 'secondary'\n }\n });\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionEditorDescriptorCreateOptsProviderType, ActionEditorDescriptorInst} from './action-editor.descriptor';\nimport {ActionDescriptorCreateOptsParentType} from './action.descriptor';\n\nexport type ActionEditorProviderType<Model, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service>;\n\nexport type ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n fetchInputType?: TypeDescriptor<FetchInput>;\n submitReturnType?: TypeDescriptor<SubmitReturn>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\nexport const actionEditorGetProviderCfgObj = <Model, Service>(serviceOrDataProvider?: ActionEditorProviderType<Model, Service>) => {\n const cfg: ActionEditorDescriptorCreateOptsProviderType<Model, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IEditorDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.dataProvider = serviceOrDataProvider as IEditorDataProvider<Model, Service>;\n } else {\n cfg.serviceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\n/**\n * Creates an ActionEditorDescriptorInst instance with the provided editor descriptor and options.\n *\n * @param {string} actionName - The name of the action to associate with the editor.\n * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance to be used.\n * @param {ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>} [opts] - Optional configuration options for the ActionEditor.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput>} An instance of ActionEditorDescriptor with the configured parameters.\n */\nexport function actionEditor<\n EditorModel,\n Model = EditorModel,\n Service = undefined,\n FetchInput = Model,\n SubmitReturn = Model,\n ValidationInput = Model,\n ParentEditorItem = undefined\n>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditorItem>,\n opts?: ActionEditorDescriptorOptsType<Model, Service, FetchInput, SubmitReturn, ValidationInput>\n): ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput, ParentEditorItem> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, FetchInput, SubmitReturn, ValidationInput, ParentEditorItem>(editor, actionName, {\n ...opts,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {}),\n model: opts?.model\n });\n}\n","import {Params, QueryParamsHandling} from '@angular/router';\n\nimport {ActionDescriptorConstructorOptsType, ActionDescriptorInst} from './action.descriptor';\n\nexport type ActionLinkDescriptorConstructorOpts<Model> = Omit<ActionDescriptorConstructorOptsType<Model, undefined>, 'serviceType' | 'dataProvider'>;\n\nexport class ActionLinkDescriptorInst<Item, ValidationInputItem = Item> extends ActionDescriptorInst<Item, undefined, undefined, undefined, ValidationInputItem> {\n private _url = '';\n private _pathSegments: string[] = [];\n private _queryParams?: Params;\n private _queryParamsHandling?: QueryParamsHandling;\n private _replaceUrl = false;\n private _target = '_self';\n private _isStyleLink = false;\n\n constructor(actionName = 'link', cfg?: ActionLinkDescriptorConstructorOpts<Item>) {\n super(actionName, cfg);\n }\n\n public get url(): string {\n return this._url;\n }\n\n public get pathSegments(): string[] {\n return this._pathSegments;\n }\n\n public get queryParams(): Params | undefined {\n return this._queryParams;\n }\n\n public get queryParamsHandling(): QueryParamsHandling | undefined {\n return this._queryParamsHandling;\n }\n\n public get replaceUrl(): boolean {\n return this._replaceUrl;\n }\n\n public get target(): string {\n return this._target;\n }\n\n public get isStyleLink(): boolean {\n return this._isStyleLink;\n }\n\n public withHref(url: string): this {\n this._url = url;\n return this;\n }\n\n public withRouterLink(...pathSegments: string[]): this {\n this._pathSegments = pathSegments;\n return this;\n }\n\n public withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this {\n this._queryParams = queryParams;\n this._queryParamsHandling = queryParamsHandling;\n return this;\n }\n\n public withReplaceUrl(replaceUrl = false): this {\n this._replaceUrl = replaceUrl;\n return this;\n }\n\n public withTarget(target: '_self' | '_blank' = '_self'): this {\n this._target = target;\n return this;\n }\n\n public withStyleLink(isStyleLink: boolean): this {\n this._isStyleLink = isStyleLink;\n return this;\n }\n\n public override copy(): ActionLinkDescriptorInst<Item, ValidationInputItem> {\n const descriptor = new ActionLinkDescriptorInst<Item, ValidationInputItem>(this._actionName, {\n model: this._model?.copy(),\n parentModel: this._parentModel,\n parentProperty: this._parentProperty\n });\n this.copyFieldsTo(descriptor); // copy base action\n descriptor._url = this._url;\n descriptor._pathSegments = [...this._pathSegments];\n descriptor._queryParams = {...this._queryParams};\n descriptor._queryParamsHandling = this._queryParamsHandling;\n descriptor._replaceUrl = this._replaceUrl;\n descriptor._target = this._target;\n descriptor._isStyleLink = this._isStyleLink;\n return descriptor;\n }\n}\n","import {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {ActionLinkDescriptorInst} from './action-link.descriptor';\nimport {ActionDescriptorCreateOptsParentType, ActionDescriptorInst} from './action.descriptor';\n\ntype ActionLinkCreateOptsType<Model, ValidationInput> = ActionDescriptorCreateOptsParentType & {\n model?: ModelDescriptor<Model>;\n validationType?: TypeDescriptor<ValidationInput>;\n};\n\n/**\n * Creates an instance of ActionLinkDescriptorInst with the provided action name and options.\n *\n * @param {string} actionName - The unique name of the action.\n * @param {ActionLinkCreateOptsType<Model, ValidationInput>} [opts] - Optional parameters for configuring the action link, including the model and validation type.\n * @return {ActionLinkDescriptorInst<Model, ValidationInput>} An instance of ActionLinkDescriptorInst initialized with the action name and options.\n */\nexport function actionLink<Model = any, ValidationInput = Model>(actionName: string, opts?: ActionLinkCreateOptsType<Model, ValidationInput>) {\n return new ActionLinkDescriptorInst<Model, ValidationInput>(actionName, {\n ...opts,\n model: opts?.model\n });\n}\n\n/**\n * Generates an ActionLinkDescriptorInst from the provided ActionDescriptorInst.\n *\n * @param {ActionDescriptorInst<Model, any, any, any, ValidationInput>} action - The action descriptor instance that serves as the basis for the action link.\n * @return {ActionLinkDescriptorInst<Model, ValidationInput>} A newly created ActionLinkDescriptorInst configured with the provided action parameters.\n */\nexport function actionLinkFromAction<Model, ValidationInput = Model>(action: ActionDescriptorInst<Model, any, any, any, ValidationInput>) {\n const descriptor = new ActionLinkDescriptorInst<Model, ValidationInput>(action.actionName, {model: action.model});\n\n action.copyFieldsTo(descriptor);\n\n // disable confirmation and notifications\n descriptor.withRunConfirmation(false);\n descriptor.withNotifications(false);\n\n descriptor.withAfterRunAction();\n descriptor.withOnRunErrorAction();\n\n descriptor.withSubactionsAsMenu(false);\n\n return descriptor;\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionProviderType, actionGetProviderCfgObj} from './action-descriptor.factory';\nimport {ActionDescriptorInst} from './action.descriptor';\n\n/**\n * Defines an action to be positioned on a specified editor with editor-specific execution context.\n *\n * @param {string} actionName - The name identifying the action to be performed.\n * @param {EditorDescriptorInst<EditorModel>} editor - The descriptor of the editor on which the action will be placed and executed.\n * @param {Object} [opts] - Options for configuring the action behavior.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.\n * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.\n * @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The position of action on editor.\n * @return {ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>} - An instance representing the configured action descriptor for the specified editor and model.\n */\nexport function actionOnEditor<Model, EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, any>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n }\n): ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel> {\n return new ActionDescriptorInst<Model, Service, EditorModel, Model, EditorModel>(actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts?.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.FooterLeft);\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionEditorProviderType, actionEditorGetProviderCfgObj} from './action-editor-descriptor.factory';\nimport {ActionEditorDescriptorInst} from './action-editor.descriptor';\n\n/**\n * Creates and returns an instance of `ActionEditorDescriptorInst` when positioned on another (parent) editor.\n *\n * @param {string} actionName - The name of the action associated with the editor.\n * @param {EditorDescriptorInst<EditorModel, ParentEditor>} editor - The editor descriptor defining editor on action.\n * @param {Object} [opts] - Optional parameters for configuring the action editor.\n * @param {ModelDescriptor<Model>} [opts.model] - The descriptor for the model associated with the action.\n * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for the action editor.\n * @param {ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight} [opts.position] - The desired position of action on the editor.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor>} A configured instance of `ActionEditorDescriptorInst` representing the action editor.\n */\nexport function actionEditorOnEditor<EditorModel, ParentEditor, Model = EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditor>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight | ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n }\n): ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor, ParentEditor> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, ParentEditor, EditorModel, ParentEditor, ParentEditor>(editor, actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.FooterLeft);\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionProviderType, actionGetProviderCfgObj} from './action-descriptor.factory';\nimport {ActionDescriptorInst} from './action.descriptor';\n\n/**\n * Defines an action to be positioned on a specified table with table row execution context.\n *\n * @param {string} actionName - The name identifying the action to be performed.\n * @param {TableDescriptorInst<TableModel, any, any>} table - The descriptor of the table on which the action will be placed and executed.\n * @param {Object} [opts] - Options for configuring the action behavior.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.\n * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.\n * @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position of action on table.\n * @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table row and model.\n */\nexport function actionOnTableRow<Model, TableModel, Service = undefined>(\n actionName: string,\n table: TableDescriptorInst<TableModel, any, any>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n }\n): ActionDescriptorInst<Model, Service, TableModel, Model, TableModel> {\n return new ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>(actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts?.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.RowInline);\n}\n\n/**\n * Defines an action to be positioned on a specified table with table header or footer execution context.\n *\n * @param {string} actionName - The name identifying the action to be performed.\n * @param {Object} [opts] - Options for configuring the action behavior.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action.\n * @param {ActionProviderType<Model, Service>} [opts.serviceProvider] - The service provider type for execution context.\n * @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of action on table.\n * @return {ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>} - An instance representing the configured action descriptor for the specified table top and model.\n */\nexport function actionOnTableTop<Model, Service = undefined>(\n actionName: string,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;\n }\n): ActionDescriptorInst<Model, Service, undefined, Model, undefined> {\n return new ActionDescriptorInst<Model, Service, undefined, Model, undefined>(actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts?.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft);\n}\n","import {ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {ActionPositionEnum} from '../models/action.type';\nimport {ActionEditorProviderType, actionEditorGetProviderCfgObj} from './action-editor-descriptor.factory';\nimport {ActionEditorDescriptorInst} from './action-editor.descriptor';\n\n/**\n * Creates and returns an ActionEditorDescriptorInst for displaying editor action on table row.\n *\n * @param {string} actionName - The name of the action.\n * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.\n * @param {TableDescriptorInst<TableModel, any, any>} table - The table descriptor instance representing the table on which the action is positioned.\n * @param {Object} [opts] - Optional configurations for the action editor.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.\n * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.\n * @param {ActionPositionEnum.RowInline | ActionPositionEnum.RowClick} [opts.position] - The position where the action should be displayed on the table row.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel>} The configured action editor descriptor instance.\n */\nexport function actionEditorOnTableRow<EditorModel, ParentEditorItem, TableModel, Model = EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditorItem>,\n table: TableDescriptorInst<TableModel, any, any>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n }\n): ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel, ParentEditorItem> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, TableModel, EditorModel, TableModel, ParentEditorItem>(editor, actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.RowInline);\n}\n\n/**\n * Creates and returns an action editor descriptor configured with the given parameters.\n * This is used to define an action editor positioned relative to a table.\n *\n * @param {string} actionName - The name of the action.\n * @param {EditorDescriptorInst<EditorModel, any>} editor - The editor descriptor instance responsible for configuring the editor behavior.\n * @param {Object} [opts] - Optional configurations for the action editor.\n * @param {ModelDescriptor<Model>} [opts.model] - The model descriptor associated with the action editor.\n * @param {ActionEditorProviderType<Model, Service>} [opts.serviceProvider] - The service provider for additional configurations or services for the action editor.\n * @param {ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader} [opts.position] - The position of the action on the table.\n * @return {ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined>} The configured action editor descriptor instance.\n */\nexport function actionEditorOnTableTop<EditorModel, ParentEditorItem, Model = EditorModel, Service = undefined>(\n actionName: string,\n editor: EditorDescriptorInst<EditorModel, ParentEditorItem>,\n opts?: {\n model?: ModelDescriptor<Model>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight | ActionPositionEnum.TableHeader;\n }\n): ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined, ParentEditorItem> {\n return new ActionEditorDescriptorInst<Model, Service, EditorModel, undefined, EditorModel, undefined, ParentEditorItem>(editor, actionName, {\n model: opts?.model,\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {})\n }).withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft);\n}\n","import {HttpErrorResponse} from '@angular/common/http';\n\nimport {ACommonsErrorBase, CommonsErrorBaseOptions, ICommonsActionError} from '@mediusinc/mng-commons/core';\n\nimport {IActionContext} from './execution/action-context.model';\n\nexport interface CommonsActionErrorOptions extends CommonsErrorBaseOptions {\n actionContext?: IActionContext<any, any, any>;\n httpError?: HttpErrorResponse;\n}\n\nexport class CommonsActionError extends ACommonsErrorBase implements ICommonsActionError {\n public readonly type = 'CommonsActionError';\n public readonly actionId: string;\n\n public readonly actionContext?: IActionContext<any, any>;\n public readonly httpError?: HttpErrorResponse;\n\n constructor(message: string, actionName: string, options?: CommonsActionErrorOptions) {\n super(message, {\n name: 'CommonsActionError_' + actionName,\n ...options\n });\n\n this.actionId = actionName;\n this.actionContext = options?.actionContext;\n this.httpError = options?.httpError;\n }\n}\n","import {Injector} from '@angular/core';\n\nimport {Observable, isObservable, map, throwError} from 'rxjs';\n\nimport {CommonsInternalError, DataListResult, IDataProvider, Nullable, toObservable} from '@mediusinc/mng-commons/core';\nimport {ITableDataProvider} from '@mediusinc/mng-commons/table/api';\n\nimport {IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {CommonsActionError} from '../models/action-error.model';\nimport {IActionContext} from '../models/execution/action-context.model';\n\nexport function runFnFromDataProviderOrFallback<Item, ParameterItem, Service, Return, FallbackReturn = Return>(\n ctx: IActionContext<Item, ParameterItem, Service>,\n fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null,\n fallback: Observable<FallbackReturn>\n): Observable<Return | FallbackReturn> {\n const dataProviderExec = fn(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n return fallback;\n}\n\nexport function runFnFromDataProviderOrFail<Item, ParameterItem, Service, Return>(\n ctx: IActionContext<Item, ParameterItem, Service>,\n fn: (ctx: IActionContext<Item, ParameterItem, Service>) => Observable<Return> | null\n): Observable<Return> {\n const dataProviderExec = fn(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n return throwError(\n () =>\n new CommonsActionError(\n `Data provider could not extract function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.i18nBaseKey}) for item id ${ctx.parameters?.itemId}.`,\n ctx.contextLongName,\n {actionContext: ctx}\n )\n );\n}\n\nexport function runGetAllFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined' && typeof ctx.dataProvider['getAll' as keyof object] === 'function') {\n const tableDataProvider = ctx.dataProvider as ITableDataProvider<Item, any>;\n const queryParam = ctx.parameters?.dataListParams ?? {};\n return toObservable(tableDataProvider.getAll(queryParam, ctx.serviceInstance));\n }\n return null;\n}\n\nexport type RunFetchFromDataProviderOptsType = {\n strict?: boolean;\n reason?: RunFetchFromDataProviderReasonType;\n};\nexport type RunFetchFromDataProviderReasonType = 'create' | 'update' | 'fetch';\nexport function runFetchFromDataProvider<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n opts?: RunFetchFromDataProviderOptsType\n): Observable<Item> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any>;\n if (typeof editorDataProvider.fetch === 'function') {\n return ctx.parameters?.itemId\n ? toObservable(editorDataProvider.fetch(ctx.parameters.itemId, ctx.serviceInstance, ctx.parameters.locale)).pipe(\n map(res => {\n if (opts?.reason === 'update') {\n if (opts?.strict && typeof editorDataProvider.mapFetchItemToUpdateItem !== 'function') {\n throw new CommonsInternalError(`mapFetchToUpdate function must be provided in data provider`);\n } else if (typeof editorDataProvider.mapFetchItemToUpdateItem === 'function') {\n return editorDataProvider.mapFetchItemToUpdateItem(res);\n }\n } else if (opts?.reason === 'create') {\n if (opts?.strict && typeof editorDataProvider.mapFetchItemToCreateItem !== 'function') {\n throw new CommonsInternalError(`mapFetchToCreate function must be provided in data provider`);\n } else if (typeof editorDataProvider.mapFetchItemToCreateItem === 'function') {\n return editorDataProvider.mapFetchItemToCreateItem(res);\n }\n }\n return res;\n })\n )\n : null;\n }\n }\n return null;\n}\n\nexport function runCreateFromDataProvider<Item, ParameterItem, Service>(ctx: IActionContext<Item, ParameterItem, Service>): Observable<Nullable<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any, any, ParameterItem>;\n if (typeof editorDataProvider.create === 'function') {\n return ctx.parameters?.item ? toObservable(editorDataProvider.create(ctx.parameters.item, ctx.serviceInstance)) : null;\n }\n }\n return null;\n}\n\nexport function runUpdateFromDataProvider<Item, ParameterItem, service>(ctx: IActionContext<Item, ParameterItem, service>): Observable<Nullable<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any, any, any, ParameterItem>;\n if (typeof editorDataProvider.update === 'function') {\n return ctx.parameters?.itemId ? toObservable(editorDataProvider.update(ctx.parameters.itemId, ctx.parameters.item, ctx.serviceInstance)) : null;\n }\n }\n return null;\n}\n\nexport function runDeleteFromDataProvider<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<Item, any>;\n if (typeof editorDataProvider.delete === 'function') {\n return ctx.parameters?.itemId ? toObservable(editorDataProvider.delete(ctx.parameters.itemId, ctx.serviceInstance, ctx.parameters.item)) : null; // this is not exactly correct cast as the delete function should never receive Item, but in many cases it ain't so\n }\n }\n return null;\n}\n\n/**\n * Gets service instance of data provider.\n *\n * @param injector Injector instance\n * @param dataProvider Data provider instance.\n */\nexport function getDataProviderService<Item, Service>(injector: Injector, dataProvider?: IDataProvider<Item, Service>): Service | null {\n if (dataProvider?.serviceType) {\n const service = injector.get<Service>(dataProvider.serviceType, undefined, {optional: true});\n if (!service) {\n throw new CommonsInternalError(`Data provider service type ${dataProvider.serviceType} could not be injected.`);\n }\n return service;\n } else {\n return null;\n }\n}\n","/**\n * States of action. Enums ending with \"*Final\" are supposed to be final.\n */\nexport enum ActionInstanceStateEnum {\n TriggerStart, // action was triggered (click or direct)\n TriggerEnd,\n ActivationStart, // action activation started (direct, event or editor)\n ActivationEnd, // action activation ended\n FetchStart, // fetch started\n FetchEnd, // fetch ended\n FetchError, // fetch error\n RunConfirmationStart, // confirmation for run is started\n RunConfirmationEndAccept, // confirmation accepted\n RunConfirmationEndReject, // confirmation rejected\n RunStart, // action was run by calling main function\n RunEnd, // action run function executed\n RunError, // action run function executed with error\n NextActionStart, // next action started\n NextActionEnd, // next action finished\n ErrorActionStart, // error action started\n ErrorActionEnd, // error action finished\n FinishSuccessFinal, // action executed successfully\n FinishErrorFinal, // action executed with error\n FinishDismissedFinal, // action was dismissed by user\n FinishSuccessReactivateFinal, // action executed successfully, another instance will directly start from previous\n FinishComponentDestroyFinal, // action was dismissed by destroying component that was executing it\n FinishRouteUntriggerStart,\n FinishRouteUntriggerEndFinal,\n FinishRouteUntriggerTimeoutFinal\n}\n","/**\n * Default categories for tableview actions\n */\nexport class TableviewActionDefaultCategories {\n public static readonly READ = '_defaultTwRead';\n public static readonly ADD = '_defaultTwAdd';\n public static readonly EDIT = '_defaultTwEdit';\n public static readonly DELETE = '_defaultTwDelete';\n public static readonly DETAILS = '_defaultTwDetails';\n}\n","import {InjectionToken, Type} from '@angular/core';\n\nexport const DATA_LANGUAGE_DROPDOWN_COMPONENT_IT: InjectionToken<Type<any>> = new InjectionToken<Type<any>>('DATA_LANGUAGE_DROPDOWN_COMPONENT');\n","import {Injector} from '@angular/core';\n\nimport {Observable} from 'rxjs';\n\nimport {DataListResult, IDataProvider, Nullable} from '@mediusinc/mng-commons/core';\n\nimport {RunFetchFromDataProviderReasonType, getDataProviderService, runFnFromDataProviderOrFail} from '../helpers/data-provider-executors';\nimport {IActionContext} from '../models/execution/action-context.model';\n\nexport abstract class DataProviderExecutor {\n public runGetAllOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, DataListResult<Item>>(ctx, this.runGetAll.bind(this));\n }\n\n public abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<DataListResult<Item>> | null;\n public abstract runGetAll<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback: Observable<DataListResult<Item>>\n ): Observable<DataListResult<Item>>;\n public abstract runGetAll<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<DataListResult<Item>> | null;\n public abstract runGetAll<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<DataListResult<Item>>\n ): Observable<DataListResult<Item>> | null;\n\n public runFetchOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fetchReason?: RunFetchFromDataProviderReasonType): Observable<Item> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, ctx => this.runFetch(ctx, fetchReason));\n }\n\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason?: RunFetchFromDataProviderReasonType\n ): Observable<Item> | null;\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason: RunFetchFromDataProviderReasonType | undefined,\n fallback: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>>;\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason: RunFetchFromDataProviderReasonType | undefined,\n fallback: undefined\n ): Observable<Nullable<Item>> | null;\n public abstract runFetch<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fetchReason: RunFetchFromDataProviderReasonType | undefined,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n public runCreateOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, this.runCreate.bind(this));\n }\n\n public abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;\n public abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;\n public abstract runCreate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;\n public abstract runCreate<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n public runUpdateOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, this.runUpdate.bind(this));\n }\n\n public abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item> | null;\n public abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;\n public abstract runUpdate<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;\n public abstract runUpdate<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n public runDeleteOrFail<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Item | null> {\n return runFnFromDataProviderOrFail<Item, ParametersItem, Service, Item>(ctx, this.runDelete.bind(this));\n }\n\n public abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>): Observable<Nullable<Item>> | null;\n public abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: Observable<Nullable<Item>>): Observable<Nullable<Item>>;\n public abstract runDelete<Item, ParametersItem, Service>(ctx: IActionContext<Item, ParametersItem, Service>, fallback: undefined): Observable<Nullable<Item>> | null;\n public abstract runDelete<Item, ParametersItem, Service>(\n ctx: IActionContext<Item, ParametersItem, Service>,\n fallback?: Observable<Nullable<Item>>\n ): Observable<Nullable<Item>> | null;\n\n /**\n * Gets service instance of data provider.\n *\n * @param injector Injector instance\n * @param dataProvider Data provider instance.\n */\n public getDataProviderService<Item, Service>(injector: Injector, dataProvider?: IDataProvider<Item, Service>): Service | null {\n return getDataProviderService(injector, dataProvider);\n }\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {EditorDataProviderInst} from './editor.data-provider';\n\n/**\n * Creates and returns an instance of `EditorDataProviderInst` with the specified options for managing editor data.\n *\n * @param {Object} [opts] - The options object to configure the data provider.\n * @param {TypeDescriptor<Model> | ModelDescriptor<Model>} [opts.type] - The descriptor defining the type of model.\n * @param {ServiceClassType<Service>} [opts.service] - The service class type associated with the data provider.\n * @param {TypeDescriptor<CreateModel> | ModelDescriptor<CreateModel>} [opts.createType] - The descriptor defining the create type.\n * @param {TypeDescriptor<UpdateModel> | ModelDescriptor<UpdateModel>} [opts.updateType] - The descriptor defining the update type.\n * @return {EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>} An instance of `EditorDataProviderInst` configured according to the provided options.\n */\nexport function editorDataProvider<\n Model,\n Service = undefined,\n CreateModel = Model,\n UpdateModel = Model,\n ServiceClass = Service extends undefined ? undefined : ServiceClassType<Service>\n>(opts?: {\n type?: TypeDescriptor<Model> | ModelDescriptor<Model>;\n service?: ServiceClassType<Service>;\n createType?: TypeDescriptor<CreateModel> | ModelDescriptor<Model>;\n updateType?: TypeDescriptor<UpdateModel> | ModelDescriptor<Model>;\n}): EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel> {\n return new EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>(opts?.service as ServiceClass);\n}\n","import {ArrayItemType, CommonsInternalError, ITableDescriptor, ITableviewDescriptor} from '@mediusinc/mng-commons/core';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\nimport {ITableDataProvider} from '@mediusinc/mng-commons/table/api';\n\nimport {FieldsManageAddFieldLookupOpts, IFieldManageSafeWithGetField, IFieldsManageWithGetField} from '../../models/editor-fields.model';\nimport {AFieldDescriptor} from '../field-base.descriptor';\nimport {FieldLookupEnumDescriptor} from '../field-lookup.descriptor';\nimport {FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor} from '../field-many.descriptor';\n\n/**\n * @experimental\n */\nexport class EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, PropertyObjectModel> implements IFieldManageSafeWithGetField<\n EditorModel,\n ParentEditorModel,\n PropertyObjectModel\n> {\n #path: string;\n #editor: IFieldsManageWithGetField<EditorModel, ParentEditorModel>;\n\n constructor(editor: IFieldsManageWithGetField<EditorModel, ParentEditorModel>, basePath: string) {\n this.#editor = editor;\n this.#path = basePath;\n }\n\n nested<Property extends keyof PropertyObjectModel>(\n property: Property\n ): EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, NonNullable<PropertyObjectModel[Property]>> {\n return new EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, NonNullable<PropertyObjectModel[Property]>>(\n this.#editor,\n this.getNestedPropertyPath(property)\n );\n }\n\n getNestedPropertyPath(p: keyof PropertyObjectModel) {\n return `${this.#path}.${p as string}`;\n }\n\n getField<Property extends keyof PropertyObjectModel, FieldModel = NonNullable<PropertyObjectModel[Property]>, FieldValue = PropertyObjectModel[Property]>(\n property: Property\n ): AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> | null {\n return this.#editor.getFieldUnsafe<FieldModel, FieldValue>(this.getNestedPropertyPath(property));\n }\n\n removeField(property: keyof PropertyObjectModel): void {\n this.#editor.removeFieldUnsafe(this.getNestedPropertyPath(property));\n }\n\n addField<PropertyField extends keyof PropertyObjectModel, FieldModel = NonNullable<PropertyObjectModel[PropertyField]>, FieldValue = PropertyObjectModel[PropertyField]>(\n property: PropertyField\n ) {\n return this.#editor.addFieldUnsafe<FieldModel, FieldValue>(this.getNestedPropertyPath(property));\n }\n\n withFields(...properties: (keyof PropertyObjectModel)[]) {\n properties.forEach(p => this.#editor.addFieldUnsafe(this.getNestedPropertyPath(p)));\n return this;\n }\n\n addFieldLookup<\n Property extends keyof PropertyObjectModel,\n Service = undefined,\n FieldModel extends NonNullable<PropertyObjectModel[Property]> = NonNullable<PropertyObjectModel[Property]>,\n FieldValue = PropertyObjectModel[Property]\n >(property: Property, opts?: FieldsManageAddFieldLookupOpts<FieldModel, Service>) {\n return this.#editor.addFieldLookupUnsafe<FieldModel, Service, FieldValue>(this.getNestedPropertyPath(property), opts);\n }\n\n addFieldLookupEnum<Property extends keyof PropertyObjectModel, Enum extends NonNullable<PropertyObjectModel[Property]>>(\n property: Property,\n enumModel: EnumDescriptor<Enum>,\n options?: Array<Enum>\n ): FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel> {\n return this.#editor.addFieldLookupEnumUnsafe<Enum>(this.getNestedPropertyPath(property), enumModel, options);\n }\n\n addFieldManyEditor<Property extends keyof PropertyObjectModel, FieldModel = ArrayItemType<PropertyObjectModel[Property]>, FieldValue = PropertyObjectModel[Property]>(\n property: Property,\n tableviewDescriptor: ITableviewDescriptor<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel>\n ): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {\n return this.#editor.addFieldManyEditorUnsafe<FieldModel, FieldValue>(this.getNestedPropertyPath(property), tableviewDescriptor);\n }\n\n addFieldManyToManyEditor<\n Property extends keyof PropertyObjectModel,\n Service,\n FieldModel = ArrayItemType<PropertyObjectModel[Property]>,\n FieldValue = PropertyObjectModel[Property]\n >(\n property: Property,\n mainTableDescriptor: ITableDescriptor<FieldModel, any, any>,\n lookupTableDescriptor: ITableDescriptor<FieldModel, any, any>,\n lookupDataProvider: ITableDataProvider<FieldModel, Service>\n ): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel> {\n return this.#editor.addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue>(\n this.getNestedPropertyPath(property),\n mainTableDescriptor,\n lookupTableDescriptor,\n lookupDataProvider\n );\n }\n\n addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>) {\n if (!field.property.startsWith(this.#path)) {\n throw new CommonsInternalError(`Field ${field.property} cannot be added to nested object property ${this.#path}: Paths do not match.`);\n }\n this.#editor.addFieldDescriptor(field);\n return this;\n }\n}\n","export enum TableviewEditorTypeEnum {\n None,\n Details,\n Edit,\n Add\n}\n\nexport const EDITOR_DEFAULT_GROUP_NAME = '_default';\n","import {Type} from '@angular/core';\n\nexport enum FieldSizeEnum {\n Small,\n Normal,\n Large\n}\n\nexport enum FieldInputTypeEnum {\n Hidden,\n Label,\n Text,\n Textarea,\n Number,\n Currency,\n Switch,\n Radio,\n Datepicker,\n Mask,\n File,\n ImageFile,\n ImageUrl,\n Custom\n}\n\nexport enum FieldLookupTypeEnum {\n Dropdown,\n Autocomplete,\n Dialog,\n Custom\n}\n\nexport enum FieldManyToManyEditorTypeEnum {\n DialogTableMultiselect\n}\n\nexport enum FieldManyToManyEditorActionEnum {\n Add,\n Delete\n}\n\nexport enum FieldManyEditorTypeEnum {\n DialogEditor\n}\n\nexport enum FieldManyEditorActionEnum {\n View,\n Add,\n Edit,\n Delete\n}\n\nexport enum FieldGroupTypeEnum {\n Tab,\n Fieldset,\n Logical\n}\n\nexport type FieldConfig = object;\n\nexport interface FieldLookupConfig extends FieldConfig {\n table?: {\n headerTitleComponent?: Type<any>;\n columnActionComponent?: Type<any>;\n };\n}\n","import {FieldAsyncBaseValidator, FieldBaseValidator, FieldValidationMessage} from '../models/field-validation.model';\n\nexport type FieldValidationDescriptorOptsType<Property = string> = {errorPath?: Property};\n\nexport class FieldValidationDescriptor<FieldValue, EditorValue, ParentEditorModel = undefined> {\n private readonly _name: string;\n private readonly _validator?: FieldBaseValidator<FieldValue, EditorValue, ParentEditorModel> | FieldAsyncBaseValidator<FieldValue, EditorValue, ParentEditorModel>;\n private readonly _message?: FieldValidationMessage<FieldValue, EditorValue, ParentEditorModel>;\n private readonly _options?: FieldValidationDescriptorOptsType;\n\n constructor(\n name: string,\n validator?: FieldBaseValidator<FieldValue, EditorValue, ParentEditorModel> | FieldAsyncBaseValidator<FieldValue, EditorValue, ParentEditorModel>,\n message?: FieldValidationMessage<FieldValue, EditorValue, ParentEditorModel>,\n options?: FieldValidationDescriptorOptsType\n ) {\n this._name = name;\n this._validator = validator;\n this._message = message;\n this._options = options;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public get validator() {\n return this._validator;\n }\n\n public get message() {\n return this._message;\n }\n\n public get options() {\n return this._options;\n }\n\n public copy(): FieldValidationDescriptor<FieldValue, EditorValue, ParentEditorModel> {\n const opt = this._options ? {...this._options} : undefined;\n return new FieldValidationDescriptor<FieldValue, EditorValue, ParentEditorModel>(this._name, this._validator, this._message, opt);\n }\n}\n","import {FormControl, FormGroup} from '@angular/forms';\n\nimport {FieldType, FormlyFieldConfig} from '@ngx-formly/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {GetterFn, objectDeepCopy} from '@mediusinc/mng-commons/core';\n\nimport {FieldAsyncBaseValidator, FieldAsyncValidator, FieldBaseValidator, FieldValidationMessage, FieldValidator} from '../models/field-validation.model';\nimport {FieldConfig, FieldSizeEnum} from '../models/field.model';\nimport {FormFieldEvent, FormFieldEventData, FormFieldEventTypeEnum} from '../models/form-editor.event';\nimport {CommonsFormlyFieldConfig, CommonsFormlyHookFn} from '../models/formly-field.model';\nimport {FieldValidationDescriptor} from './field-validation.descriptor';\n\nexport const fieldDescriptorEmptyLabelType = '_emptyLabel';\n\nexport abstract class AGenericFieldDescriptor {\n protected _config: FieldConfig = {};\n protected _formlyConfig: FormlyFieldConfig = {};\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n protected constructor() {}\n\n public get config() {\n return this._config;\n }\n\n public get formlyConfig() {\n return this._formlyConfig;\n }\n\n public withConfig(config: FieldConfig): this {\n this._config = config;\n return this;\n }\n\n public withFormlyConfig(formlyConfig: FormlyFieldConfig): this {\n this._formlyConfig = formlyConfig;\n return this;\n }\n\n /**\n * Override toJSON implementation to prevent overflow with circular dependency.\n * @ignore\n */\n protected toJSON(): string {\n const jsonObj = {\n ...this,\n _editor: undefined\n };\n const jsonObjStr = JSON.stringify(jsonObj);\n return jsonObjStr;\n }\n}\n\nexport type FieldValidationOptsType = {\n forceShowMessage?: boolean;\n};\n\nexport type FieldClassNameType = {\n field?: string;\n grid?: string;\n wrapper?: string;\n label?: string;\n control?: string;\n input?: string;\n};\n\nexport abstract class AFieldDescriptor<FieldModel, EditorModel, FieldValue = FieldModel, ParentEditorModel = undefined> extends AGenericFieldDescriptor {\n /** @ignore */ protected readonly _property: string;\n /** @ignore */ protected _label?: string | null;\n /** @ignore */ protected _labelUseModelBase?: boolean;\n /** @ignore */ protected _labelInfoTooltip?: string;\n /** @ignore */ protected _labelInfoTooltipIcon?: string;\n\n /** @ignore */ protected _placeholder?: string;\n /** @ignore */ protected _helpText?: string;\n\n /** @ignore */ protected _required = false;\n /** @ignore */ protected _requiredHideLabelMarker = false;\n /** @ignore */ protected _disabled = false;\n /** @ignore */ protected _defaultValue?: FieldValue;\n /** @ignore */ protected _getter?: GetterFn<FieldValue, EditorModel>;\n /** @ignore */ protected _setter?: (item: EditorModel, value: FieldValue) => void;\n /** @ignore */ protected _validations: Array<FieldValidationDescriptor<any, any, any>> = [];\n /** @ignore */ protected _asyncValidations: Array<FieldValidationDescriptor<any, any, any>> = [];\n /** @ignore */ protected _validationOpts: FieldValidationOptsType = {};\n /** @ignore */ protected _requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n /** @ignore */ protected _disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n /** @ignore */ protected _hiddenExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n /** @ignore */ protected _hiddenResetOnHide?: boolean;\n /** @ignore */ protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n /** @ignore */ protected _onInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _onChanges?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _afterContentInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _afterViewInit?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n /** @ignore */ protected _onDestroy?: CommonsFormlyHookFn<FieldValue, EditorModel>;\n\n /** @ignore */ protected _onValueChange?: (field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: any) => void;\n\n /** @ignore */ protected _className?: FieldClassNameType;\n /** @ignore */ protected _size: FieldSizeEnum = FieldSizeEnum.Normal;\n\n // localization\n /** @ignore */ protected _isLocalized = false;\n\n /** @ignore */ protected readonly _eventsSubject = new Subject<FormFieldEvent<FieldValue, EditorModel, ParentEditorModel>>();\n\n protected constructor(property: string) {\n super();\n this._property = property;\n }\n\n public get property() {\n return this._property;\n }\n\n public get label() {\n return this._label;\n }\n\n public get labelUseModelBase() {\n return this._labelUseModelBase;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get helpText() {\n return this._helpText;\n }\n\n public get labelInfoTooltip() {\n return this._labelInfoTooltip;\n }\n\n public get labelInfoTooltipIcon() {\n return this._labelInfoTooltipIcon;\n }\n\n public get required() {\n return this._required;\n }\n\n public get requiredHideLabelMarker() {\n return this._requiredHideLabelMarker;\n }\n\n public get disabled() {\n return this._disabled;\n }\n\n public get defaultValue() {\n return this._defaultValue;\n }\n\n public get getter() {\n return this._getter;\n }\n\n public get setter() {\n return this._setter;\n }\n\n public get validations() {\n return this._validations;\n }\n\n public get asyncValidations() {\n return this._asyncValidations;\n }\n\n public get validationOpts() {\n return this._validationOpts;\n }\n\n public get requiredExpression() {\n return this._requiredExpression;\n }\n\n public get disabledExpression() {\n return this._disabledExpression;\n }\n\n public get hiddenExpression() {\n return this._hiddenExpression;\n }\n\n public get hiddenResetOnHide() {\n return this._hiddenResetOnHide;\n }\n\n public get updateOn() {\n return this._updateOn;\n }\n\n public get onInit() {\n return this._onInit;\n }\n\n public get onChanges() {\n return this._onChanges;\n }\n\n public get afterContentInit() {\n return this._afterContentInit;\n }\n\n public get afterViewInit() {\n return this._afterViewInit;\n }\n\n public get onDestroy() {\n return this._onDestroy;\n }\n\n public get onValueChange() {\n return this._onValueChange;\n }\n\n public get className() {\n return this._className;\n }\n\n public get size() {\n return this._size;\n }\n\n public get isSizeSmall() {\n return this._size === FieldSizeEnum.Small;\n }\n\n public get isSizeLarge() {\n return this._size === FieldSizeEnum.Large;\n }\n\n public get isLocalized() {\n return this._isLocalized;\n }\n\n public abstract copy(): AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>;\n\n /**\n * Set label for field.\n * @param label Full label (i18n path or other string). If null, no label will be used.\n * @param useModelBase If set to true, label will be appended to model's i18n base path.\n */\n public withLabel(label: string | null, useModelBase?: boolean): this {\n this._label = label;\n this._labelUseModelBase = useModelBase;\n return this;\n }\n\n public withEmptyLabel(): this {\n this._label = fieldDescriptorEmptyLabelType;\n return this;\n }\n\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withHelpText(helpText: string): this {\n this._helpText = helpText;\n return this;\n }\n\n /**\n * Sets the label tooltip and optionally a custom icon for the field.\n *\n * @param {string} tooltip - The tooltip text to be displayed.\n * @param {string} [customIcon] - An optional custom icon to be used for the tooltip. If not provided, the default icon is used.\n */\n public withLabelInfoTooltip(tooltip: string, customIcon?: string): this {\n this._labelInfoTooltip = tooltip;\n this._labelInfoTooltipIcon = customIcon ?? this._labelInfoTooltipIcon;\n return this;\n }\n\n public withRequired(required = true, requiredExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, hideLabelMarker = false): this {\n this._required = required;\n if (requiredExpression) {\n this._requiredExpression = requiredExpression;\n }\n this._requiredHideLabelMarker = hideLabelMarker;\n return this;\n }\n\n public withDisabled(disabled = true, disabledExpression?: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._disabled = disabled;\n if (disabledExpression) {\n this._disabledExpression = disabledExpression;\n }\n return this;\n }\n\n public withHidden(hiddenExpression: string | ((field?: FormlyFieldConfig) => boolean) | Observable<boolean>, resetOnHide?: boolean): this {\n this._hiddenExpression = hiddenExpression;\n this._hiddenResetOnHide = resetOnHide;\n return this;\n }\n\n public withUpdateOn(updateOn: 'change' | 'blur' | 'submit'): this {\n this._updateOn = updateOn;\n return this;\n }\n\n public withOnInit(onInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._onInit = onInit;\n return this;\n }\n\n public withOnChanges(onChanges?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._onChanges = onChanges;\n return this;\n }\n\n public withAfterContentInit(afterContentInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._afterContentInit = afterContentInit;\n return this;\n }\n\n public withAfterViewInit(afterViewInit?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._afterViewInit = afterViewInit;\n return this;\n }\n\n public withOnDestroy(onDestroy?: CommonsFormlyHookFn<FieldValue, EditorModel>): this {\n this._onDestroy = onDestroy;\n return this;\n }\n\n public withOnValueChange(onValueChange?: (field: CommonsFormlyFieldConfig<FieldValue, EditorModel>, value: FieldValue) => void): this {\n this._onValueChange = onValueChange;\n return this;\n }\n\n public withDefaultValue(defaultValue: FieldValue): this {\n this._defaultValue = defaultValue;\n return this;\n }\n\n public withGetter(fn?: GetterFn<FieldValue, EditorModel>): this {\n this._getter = fn;\n return this;\n }\n\n public withSetter(fn?: (item: EditorModel, value: FieldValue) => void): this {\n this._setter = fn;\n return this;\n }\n\n public withValidation<Value = FieldValue, EditorValue = EditorModel>(\n name: string,\n validator?: FieldValidator<Value, EditorValue, ParentEditorModel>,\n message?: FieldValidationMessage<Value, EditorValue, ParentEditorModel>\n ): this {\n this._validations.push(new FieldValidationDescriptor(name, validator as FieldBaseValidator<Value, EditorValue, ParentEditorModel>, message));\n return this;\n }\n\n public removeValidation(name: string): this {\n this._validations = this._validations.filter(v => v.name !== name);\n return this;\n }\n\n public withAsyncValidation<Value = FieldValue, EditorValue = EditorModel>(\n name: string,\n asyncValidator?: FieldAsyncValidator<Value, EditorValue>,\n message?: FieldValidationMessage<Value, EditorValue>\n ): this {\n this._asyncValidations.push(new FieldValidationDescriptor(name, asyncValidator as FieldAsyncBaseValidator<Value, EditorValue>, message));\n return this;\n }\n\n public removeAsyncValidation(name: string): this {\n this._asyncValidations = this._asyncValidations.filter(v => v.name !== name);\n return this;\n }\n\n public withValidationOpts(validationOpts: FieldValidationOptsType): this {\n this._validationOpts = validationOpts;\n return this;\n }\n\n public withClassName(opts?: string | FieldClassNameType): this {\n if (typeof opts === 'string') {\n this._className = {\n grid: opts\n };\n } else {\n this._className = opts;\n }\n return this;\n }\n\n public withSize(size: FieldSizeEnum = FieldSizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n /**\n * This function adds an icon with text Show all translations above the field and after clicking on it, it displays a new dialog with tableview.\n * This new table view shows all available translations for specific property and allows editing it.\n */\n public localized(): this {\n this._isLocalized = true;\n return this;\n }\n\n public nextEvent(\n type: FormFieldEventTypeEnum,\n component: FieldType<CommonsFormlyFieldConfig<FieldValue, EditorModel, any>>,\n data?: FormFieldEventData<FieldValue, EditorModel>\n ) {\n this._eventsSubject.next({\n type: type,\n fieldComponent: component,\n formComponent: component.props.formEditorComponent,\n form: component?.form as FormGroup,\n fieldFormControl: component.formControl as FormControl,\n fieldFormlyConfig: component.field,\n data: data\n });\n }\n\n public get events$() {\n return this._eventsSubject.asObservable();\n }\n\n protected copyFieldsTo(obj: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>) {\n obj._config = objectDeepCopy(this._config);\n obj._formlyConfig = objectDeepCopy(this._formlyConfig);\n obj._label = this._label;\n obj._placeholder = this._placeholder;\n obj._labelInfoTooltip = this._labelInfoTooltip;\n obj._labelInfoTooltipIcon = this._labelInfoTooltipIcon;\n obj._helpText = this._helpText;\n obj._required = this._required;\n obj._disabled = this._disabled;\n obj._defaultValue = this._defaultValue;\n obj._requiredExpression = this._requiredExpression;\n obj._hiddenExpression = this._hiddenExpression;\n obj._hiddenResetOnHide = this._hiddenResetOnHide;\n obj._updateOn = this._updateOn;\n obj._onInit = this._onInit;\n obj._onChanges = this._onChanges;\n obj._onDestroy = this._onDestroy;\n obj._afterContentInit = this._afterContentInit;\n obj._afterViewInit = this._afterViewInit;\n obj._onValueChange = this._onValueChange;\n obj._disabledExpression = this._disabledExpression;\n obj._className = this._className ? {...this._className} : undefined;\n obj._size = this.size;\n obj._getter = this._getter;\n obj._setter = this._setter;\n obj._isLocalized = this._isLocalized;\n obj._validations = this._validations.map(value => value.copy());\n obj._asyncValidations = this._asyncValidations.map(value => value.copy());\n obj._validationOpts = {...this._validationOpts};\n }\n}\n","import {ButtonSeverity} from 'primeng/button';\nimport {Observable} from 'rxjs';\n\nimport {IActionButtonDescriptor} from '@mediusinc/mng-commons/form/api';\n\nimport {FieldActionContext, FieldActionResult} from '../models/field-action-context.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldActionRunFnType<EditorModel, ParentEditorModel = undefined> = (\n ctx: FieldActionContext<EditorModel, ParentEditorModel>\n) => void | FieldActionResult | Observable<FieldActionResult>;\n\nexport class FieldActionDescriptor<EditorModel, ParentEditorModel = undefined> extends AFieldDescriptor<void, EditorModel, void, ParentEditorModel> {\n protected readonly _fieldActionName: string;\n\n protected _button?: IActionButtonDescriptor;\n\n protected _runFunction?: FieldActionRunFnType<EditorModel>;\n\n private _wrappers = ['field'];\n\n constructor(property: string) {\n super(property);\n this._fieldActionName = property;\n }\n\n public get button() {\n return this._button;\n }\n\n public get runFunction() {\n return this._runFunction;\n }\n\n public get wrappers() {\n return this._wrappers;\n }\n\n public withButton(label?: string | null, icon: string | null = null, severity?: ButtonSeverity): this {\n this._button = {\n ...this._button,\n label,\n icon,\n style: {\n ...this._button?.style,\n severity: severity\n }\n };\n return this;\n }\n\n public withButtonOpts(button?: IActionButtonDescriptor): this {\n this._button = button;\n return this;\n }\n\n public withRunFunction(fn: FieldActionRunFnType<EditorModel>): this {\n this._runFunction = fn;\n return this;\n }\n\n public withWrappers(wrappers: string[]): this {\n this._wrappers = wrappers;\n return this;\n }\n\n public copy(): FieldActionDescriptor<EditorModel, ParentEditorModel> {\n const field = new FieldActionDescriptor<EditorModel, ParentEditorModel>(this._property);\n this.copyFieldsTo(field);\n field._button = {...this._button, style: {...this._button?.style}};\n field._runFunction = this._runFunction?.bind(field);\n field._wrappers = [...this._wrappers];\n return field;\n }\n}\n","import {Observable} from 'rxjs';\n\nimport {objectDeepCopy} from '@mediusinc/mng-commons/core';\n\nimport {EDITOR_DEFAULT_GROUP_NAME} from '../models/editor.model';\nimport {FieldBaseValidator, FormValidationMessage, FormValidator} from '../models/field-validation.model';\nimport {FieldGroupTypeEnum} from '../models/field.model';\nimport {CommonsFormlyFieldConfig} from '../models/formly-field.model';\nimport {AFieldDescriptor, AGenericFieldDescriptor, FieldValidationOptsType} from './field-base.descriptor';\nimport {FieldValidationDescriptor, FieldValidationDescriptorOptsType} from './field-validation.descriptor';\n\nexport abstract class AFieldGroupDescriptor<EditorModel, ParentEditorModel = undefined> extends AGenericFieldDescriptor {\n protected readonly _name: string;\n protected readonly _default: boolean;\n protected _title?: string | null;\n protected _fields: AGenericFieldDescriptor[] = [];\n protected _validations: Array<FieldValidationDescriptor<any, any, any>> = [];\n protected _validationOpts: FieldValidationOptsType = {};\n protected _hiddenExpression?: string | ((field?: CommonsFormlyFieldConfig<EditorModel, EditorModel>) => boolean) | Observable<boolean>;\n\n protected constructor(name: string) {\n super();\n this._name = name;\n this._default = name === EDITOR_DEFAULT_GROUP_NAME;\n }\n\n public removeField(property: string, filterFunction: (fields: AGenericFieldDescriptor[]) => AGenericFieldDescriptor[]): AGenericFieldDescriptor[] {\n this._fields = filterFunction(this._fields);\n return this._fields;\n }\n\n public get title() {\n return this._title;\n }\n\n abstract get type(): FieldGroupTypeEnum;\n\n abstract get fields(): AGenericFieldDescriptor[];\n\n public get validations() {\n return this._validations;\n }\n\n public get validationOpts() {\n return this._validationOpts;\n }\n\n public get name() {\n return this._name;\n }\n\n public get default() {\n return this._default;\n }\n\n public get hiddenExpression() {\n return this._hiddenExpression;\n }\n\n abstract addField(field: AGenericFieldDescriptor): this;\n\n abstract copy(): AFieldGroupDescriptor<EditorModel, ParentEditorModel>;\n\n public withTitle(title?: string | null): this {\n this._title = title;\n return this;\n }\n\n public withValidation<Value = EditorModel, ParentValue = ParentEditorModel>(\n name: string,\n validator?: FormValidator<Value, ParentValue>,\n message?: FormValidationMessage<Value, ParentValue>,\n opts?: FieldValidationDescriptorOptsType\n ) {\n this._validations.push(\n new FieldValidationDescriptor<Value, Value, ParentValue>(name, validator as FieldBaseValidator<Value, Value, ParentValue> | undefined, message, opts)\n );\n return this;\n }\n\n public withValidationOpts(validationOpts: FieldValidationOptsType): this {\n this._validationOpts = validationOpts;\n return this;\n }\n\n public withHidden(hiddenExpression: string | ((field?: CommonsFormlyFieldConfig<EditorModel, EditorModel>) => boolean) | Observable<boolean>): this {\n this._hiddenExpression = hiddenExpression;\n return this;\n }\n}\n\nexport class FieldTabGroupDescriptor<EditorModel> extends AFieldGroupDescriptor<EditorModel> {\n protected override _fields: FieldGroupDescriptor<EditorModel>[] = [];\n\n constructor(name: string) {\n super(name);\n }\n\n public override get type() {\n return FieldGroupTypeEnum.Tab;\n }\n\n public get fields(): Array<FieldGroupDescriptor<EditorModel>> {\n return this._fields as Array<FieldGroupDescriptor<EditorModel>>;\n }\n\n public addField(field: FieldGroupDescriptor<EditorModel>): this {\n this._fields.push(field);\n return this;\n }\n\n public copy(skipFields = false): FieldTabGroupDescriptor<EditorModel> {\n const tab = new FieldTabGroupDescriptor<EditorModel>(this.name);\n tab._config = objectDeepCopy(this._config);\n tab._formlyConfig = objectDeepCopy(this._formlyConfig);\n tab._title = this._title;\n tab._fields = this.fields.map(f => f.copy(skipFields));\n tab._validations = this.validations.map(v => v.copy());\n tab._validationOpts = {...this._validationOpts};\n tab._hiddenExpression = this._hiddenExpression;\n\n return tab;\n }\n}\n\ntype FieldGroupClassNameType = {\n grid?: string;\n};\n\nexport class FieldGroupDescriptor<EditorModel, ParentEditorModel = undefined> extends AFieldGroupDescriptor<EditorModel, ParentEditorModel> {\n private _type = FieldGroupTypeEnum.Fieldset;\n\n protected _className?: FieldGroupClassNameType;\n\n constructor(name: string) {\n super(name);\n if (this._default) {\n this.asLogical();\n }\n }\n\n public override get type() {\n return this._type;\n }\n\n public get fields(): Array<AFieldDescriptor<any, EditorModel>> {\n return this._fields as Array<AFieldDescriptor<any, EditorModel>>;\n }\n\n /**\n * Styling class name configurations for group.\n */\n public get className() {\n return this._className;\n }\n\n public addField(field: AFieldDescriptor<any, EditorModel>): this {\n this._fields.push(field);\n return this;\n }\n\n public asLogical(): this {\n this._type = FieldGroupTypeEnum.Logical;\n return this;\n }\n\n public withClassName(opts?: string | FieldGroupClassNameType): this {\n if (typeof opts === 'string') {\n this._className = {\n grid: opts\n };\n } else {\n this._className = opts;\n }\n return this;\n }\n\n public copy(skipFields = false): FieldGroupDescriptor<EditorModel> {\n const group = new FieldGroupDescriptor<EditorModel>(this.name);\n group._config = objectDeepCopy(this._config);\n group._formlyConfig = objectDeepCopy(this._formlyConfig);\n group._type = this._type;\n group._title = this._title;\n group._hiddenExpression = this._hiddenExpression;\n\n if (!skipFields) {\n group._fields = this.fields.map(f => f.copy());\n }\n group._validations = this.validations.map(v => v.copy());\n group._validationOpts = {...this._validationOpts};\n\n group._className = this._className ? {...this._className} : undefined;\n\n return group;\n }\n}\n","import {\n EnumConstantType,\n EnumValue,\n IDataProvider,\n ILookupDataProvider,\n ILookupDescriptor,\n LookupDataProviderLookupFnType,\n ServiceClassType,\n fromEnumConstantsAsValueArray,\n fromEnumValuesAsValueArray,\n getEnumConstantName\n} from '@mediusinc/mng-commons/core';\nimport {InputTrimType, LookupDataProviderInst} from '@mediusinc/mng-commons/form/api';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\nimport {ITableDataProvider, TableDescriptorInst, TableSizeEnum} from '@mediusinc/mng-commons/table/api';\n\nimport {FieldLookupConfig, FieldLookupTypeEnum} from '../models/field.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldLookupDescriptorConstructorOptsType<EditorModel, Service, Sorts, Filters extends keyof any> = FieldLookupDescriptorCreateOptsProviderType<\n EditorModel,\n Service,\n Sorts,\n Filters\n> & {\n optionsValueProperty?: string;\n};\n\nexport type FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service, Sorts = keyof FieldModel, Filters extends keyof any = keyof FieldModel> = {\n serviceType?: ServiceClassType<Service>;\n dataProvider?: ILookupDataProvider<FieldModel, Service, Sorts, Filters>;\n};\n\nexport type FieldLookupProviderType<FieldModel, Service> = ServiceClassType<Service> | ILookupDataProvider<FieldModel, Service, any, any>;\n\nexport type FieldLookupAutocompleteOptsType = {\n openOnFocus?: boolean;\n inlineSearch?: boolean;\n selectFirst?: boolean;\n autoClear?: boolean;\n};\n\nexport const fieldLookupGetProviderCfgObj = <FieldModel, Service>(serviceOrDataProvider?: FieldLookupProviderType<FieldModel, Service>) => {\n const cfg: FieldLookupDescriptorCreateOptsProviderType<FieldModel, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.dataProvider = serviceOrDataProvider as ILookupDataProvider<FieldModel, Service>;\n } else {\n cfg.serviceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\nexport class FieldLookupDescriptor<\n FieldModel,\n EditorModel,\n Service = any,\n FieldValue = FieldModel,\n ParentEditorModel = undefined,\n Sorts = keyof FieldModel,\n Filters extends keyof any = keyof FieldModel\n>\n extends AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>\n implements ILookupDescriptor<FieldModel, Service, Sorts, Filters>\n{\n protected readonly _dataProvider: ILookupDataProvider<FieldModel, Service, Sorts, Filters>;\n protected readonly _optionsValueProperty?: string; // this defines VT!\n\n protected _lookupType: FieldLookupTypeEnum = FieldLookupTypeEnum.Dropdown;\n protected _optionsLabelProperty?: string;\n protected _optionsLabelTranslate = false;\n protected _optionsDisabledProperty?: string;\n protected _optionsTrackProperty?: string;\n\n protected _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus?: boolean;\n protected _autocompleteInlineSearch?: boolean;\n protected _autocompleteAutoClear?: boolean;\n protected _autocompleteSelectFirst?: boolean;\n protected _autocompleteInputTrim?: InputTrimType;\n\n protected _dialogTableDescriptor?: TableDescriptorInst<FieldModel, any, any>;\n protected _dialogTableDataProvider?: ITableDataProvider<FieldModel, any, any, any>;\n\n protected _customComponentName?: string;\n\n constructor(property: string, cfg?: FieldLookupDescriptorConstructorOptsType<FieldModel, Service, Sorts, Filters>) {\n super(property as string);\n\n if (cfg?.dataProvider) {\n this._dataProvider = cfg.dataProvider;\n } else {\n this._dataProvider = new LookupDataProviderInst(cfg?.serviceType);\n }\n\n this._optionsValueProperty = cfg?.optionsValueProperty;\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get optionsLabelProperty() {\n return this._optionsLabelProperty;\n }\n\n public get optionsLabelTranslate() {\n return this._optionsLabelTranslate;\n }\n\n public get optionsValueProperty() {\n return this._optionsValueProperty;\n }\n\n public get optionsDisabledProperty() {\n return this._optionsDisabledProperty;\n }\n\n public get optionsTrackProperty() {\n return this._optionsTrackProperty;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public get autocompleteAutoClear() {\n return this._autocompleteAutoClear;\n }\n\n public get autocompleteSelectFirst() {\n return this._autocompleteSelectFirst;\n }\n\n public get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public get dialogTableDescriptor() {\n return this._dialogTableDescriptor;\n }\n\n public get dialogTableDataProvider() {\n return this._dialogTableDataProvider;\n }\n\n public get customComponentName() {\n return this._customComponentName;\n }\n\n public get trimOption() {\n return this._autocompleteInputTrim;\n }\n\n public withOptionsLabelProperty(property: keyof FieldModel, translate = false): this {\n return this.withOptionsLabelPropertyUnsafe(property as string, translate);\n }\n\n public withOptionsLabelPropertyUnsafe(property: string, translate = false): this {\n this._optionsLabelProperty = property;\n this._optionsLabelTranslate = translate;\n return this;\n }\n\n public withOptionsDisabledProperty(property: keyof FieldModel): this {\n return this.withOptionsDisabledPropertyUnsafe(property as string);\n }\n\n public withOptionsDisabledPropertyUnsafe(property: string): this {\n this._optionsDisabledProperty = property;\n return this;\n }\n\n public withOptionsTrackProperty(property: keyof FieldModel): this {\n return this.withOptionsTrackPropertyUnsafe(property as string);\n }\n\n public withOptionsTrackPropertyUnsafe(property: string): this {\n if (this._optionsValueProperty) {\n return this;\n }\n this._optionsTrackProperty = property;\n return this;\n }\n\n public withLookup(lookup?: LookupDataProviderLookupFnType<FieldModel, Service, Sorts, Filters>): this {\n this._dataProvider.withLookup(lookup);\n return this;\n }\n\n public withInputTrim(trimOption: InputTrimType = 'both'): this {\n this._autocompleteInputTrim = trimOption;\n return this;\n }\n\n public override withConfig(config: FieldLookupConfig): this {\n return super.withConfig(config);\n }\n\n public asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this {\n this._lookupType = FieldLookupTypeEnum.Autocomplete;\n this._autocompleteAutoClear = opts?.autoClear;\n this._autocompleteSelectFirst = opts?.selectFirst;\n this._autocompleteOpenOnFocus = opts?.openOnFocus;\n this._autocompleteInlineSearch = opts?.inlineSearch;\n return this;\n }\n\n public asDialog<Sorts = keyof FieldModel, Filters extends keyof any = keyof FieldModel>(\n lookupTableDescriptor: TableDescriptorInst<FieldModel, Sorts, Filters>,\n tableDataProvider?: ITableDataProvider<FieldModel, any, Sorts, Filters>\n ): this {\n this._lookupType = FieldLookupTypeEnum.Dialog;\n this._dialogTableDescriptor = lookupTableDescriptor;\n this._dialogTableDataProvider = tableDataProvider;\n\n // change default sizing\n if (this._dialogTableDescriptor.size == null) {\n this._dialogTableDescriptor.withSize(TableSizeEnum.Normal);\n }\n\n return this;\n }\n\n public asCustomComponent(customComponentName: string): this {\n this._lookupType = FieldLookupTypeEnum.Custom;\n this._customComponentName = customComponentName;\n return this;\n }\n\n public copy(): FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel, Sorts, Filters> {\n const field = new FieldLookupDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel, Sorts, Filters>(this._property, {\n dataProvider: this._dataProvider,\n optionsValueProperty: this._optionsValueProperty\n });\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._optionsLabelProperty = this._optionsLabelProperty;\n field._optionsLabelTranslate = this._optionsLabelTranslate;\n field._optionsDisabledProperty = this._optionsDisabledProperty;\n field._optionsTrackProperty = this._optionsTrackProperty;\n field._dropdownClassName = this._dropdownClassName;\n field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n field._autocompleteInlineSearch = this._autocompleteInlineSearch;\n field._dialogTableDescriptor = this._dialogTableDescriptor;\n return field;\n }\n}\n\nexport class FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel = undefined> extends FieldLookupDescriptor<\n EnumValue,\n EditorModel,\n undefined,\n EnumConstantType,\n ParentEditorModel,\n never,\n never\n> {\n private readonly _enumModel: EnumDescriptor<Enum>;\n private readonly _optionEnumValues: EnumValue[];\n private readonly _options: Enum[] | undefined; // used to ensure proper copying\n\n constructor(property: string, enumModel: EnumDescriptor<Enum>, options?: Array<Enum>) {\n super(property, {\n dataProvider: new LookupDataProviderInst<EnumValue, undefined, never, never, undefined>(undefined),\n optionsValueProperty: 'value'\n });\n this._enumModel = enumModel;\n this._options = options;\n this._optionEnumValues = Array.isArray(options)\n ? fromEnumValuesAsValueArray<Enum>(this._enumModel.type, options, this._enumModel.nameAsValue, this._enumModel.i18nBaseKey ?? undefined)\n : fromEnumConstantsAsValueArray(this._enumModel.type, this._enumModel.nameAsValue, this._enumModel.i18nBaseKey ?? undefined);\n this.withLookup(() => this._optionEnumValues);\n this.withOptionsLabelProperty('title', this._enumModel.i18nBaseKey !== null);\n this.withOptionsDisabledProperty('disabled');\n }\n\n public get enumModel() {\n return this._enumModel;\n }\n\n public withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this {\n for (const disabledOption of disabledOptions) {\n const disabledOptionValue = this._enumModel.nameAsValue ? getEnumConstantName(this._enumModel.type, disabledOption) : disabledOption;\n if (disabledOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);\n if (option) {\n option.disabled = true;\n }\n }\n }\n return this;\n }\n\n public withDefaultValueEnum(defaultValue: EnumConstantType): this {\n const defaultOptionValue = this._enumModel.nameAsValue ? getEnumConstantName(this._enumModel.type, defaultValue) : defaultValue;\n if (defaultOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === defaultOptionValue);\n if (option) {\n this.withDefaultValue(option[this._optionsValueProperty as keyof object]);\n }\n }\n return this;\n }\n\n public override asAutocomplete(opts?: FieldLookupAutocompleteOptsType): this {\n super.asAutocomplete({\n ...opts,\n openOnFocus: opts?.openOnFocus ?? true,\n inlineSearch: opts?.inlineSearch ?? true\n });\n return this;\n }\n\n public override copy(): FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel> {\n const field = new FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel>(this._property, this._enumModel, this._options);\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._optionsLabelProperty = this._optionsLabelProperty;\n field._optionsDisabledProperty = this._optionsDisabledProperty;\n field._optionsTrackProperty = this._optionsTrackProperty;\n return field;\n }\n}\n","import {IDataProvider, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ITableDataProvider, TableDataProviderGetAllFnType, TableDataProviderInst, TableDescriptorInst, TableSizeEnum} from '@mediusinc/mng-commons/table/api';\n\nimport {ActionDescriptorInst} from '../../action/descriptors/action.descriptor';\nimport {TableviewDescriptorInst} from '../../tableview/descriptors/tableview.descriptor';\nimport {FieldManyEditorActionEnum, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorTypeEnum} from '../models/field.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldManyToManyEditorDescriptorConstructorOptsType<FieldModel, Service> = FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service>;\n\nexport type FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service> = {\n lookupServiceType?: ServiceClassType<Service>;\n lookupDataProvider?: ITableDataProvider<FieldModel, Service>;\n};\n\nexport type FieldManyToManyEditorProviderType<FieldModel, Service> = ServiceClassType<Service> | ITableDataProvider<FieldModel, Service>;\n\nexport const fieldManyToManyGetProviderCfgObj = <FieldModel, Service>(serviceOrDataProvider?: FieldManyToManyEditorProviderType<FieldModel, Service>) => {\n const cfg: FieldManyToManyEditorDescriptorCreateOptsProviderType<FieldModel, Service> = {};\n if (serviceOrDataProvider) {\n if ((serviceOrDataProvider as IDataProvider).isDataProvider) {\n // type casting needed, cause there was no other way found to differentiate the types\n cfg.lookupDataProvider = serviceOrDataProvider as ITableDataProvider<FieldModel, Service>;\n } else {\n cfg.lookupServiceType = serviceOrDataProvider as ServiceClassType<Service>;\n }\n }\n return cfg;\n};\n\nexport class FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service = any, FieldValue = FieldModel[], ParentEditorModel = undefined> extends AFieldDescriptor<\n FieldModel,\n EditorModel,\n FieldValue,\n ParentEditorModel\n> {\n private readonly _mainTableDescriptor: TableDescriptorInst<FieldModel>; // table descriptor for main table component\n private readonly _lookupTableDescriptor: TableDescriptorInst<FieldModel>; // table descriptor for where select will be applied\n private readonly _lookupTableDataProvider: ITableDataProvider<FieldModel, Service>;\n private _fieldType: FieldManyToManyEditorTypeEnum = FieldManyToManyEditorTypeEnum.DialogTableMultiselect;\n private _actions: Array<FieldManyToManyEditorActionEnum> = [FieldManyToManyEditorActionEnum.Add, FieldManyToManyEditorActionEnum.Delete];\n private _hasLookupExcludeValues = false;\n private _excludeFilterProperty = '';\n private _excludeValueProperty = '';\n\n constructor(\n property: string,\n mainTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel>,\n cfg?: FieldManyToManyEditorDescriptorConstructorOptsType<FieldModel, Service>\n ) {\n super(property);\n this._mainTableDescriptor = mainTableDescriptor;\n this._lookupTableDescriptor = lookupTableDescriptor;\n\n if (cfg?.lookupDataProvider) {\n this._lookupTableDataProvider = cfg.lookupDataProvider;\n } else {\n this._lookupTableDataProvider = new TableDataProviderInst(cfg?.lookupServiceType);\n }\n\n // change default sizing if not set\n if (this._mainTableDescriptor.size == null) {\n this._mainTableDescriptor.withSize(TableSizeEnum.Normal);\n }\n if (this._lookupTableDescriptor.size == null) {\n this._lookupTableDescriptor.withSize(TableSizeEnum.Normal);\n }\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get hasLookupExcludeValues() {\n return this._hasLookupExcludeValues;\n }\n\n public get excludeFilterProperty() {\n return this._excludeFilterProperty;\n }\n\n public get excludeValueProperty() {\n return this._excludeValueProperty;\n }\n\n public get mainTableDescriptor() {\n return this._mainTableDescriptor;\n }\n\n public get lookupTableDescriptor() {\n return this._lookupTableDescriptor;\n }\n\n public get lookupTableDataProvider() {\n return this._lookupTableDataProvider;\n }\n\n public withLookup(fn: TableDataProviderGetAllFnType<FieldModel, Service>): this {\n this._lookupTableDataProvider.withGetAll(fn);\n return this;\n }\n\n public withActions(actions: Array<FieldManyToManyEditorActionEnum> = []): this {\n this.actions.push(...actions);\n return this;\n }\n\n public withLookupExclude(filterProperty: keyof FieldModel, valueProperty: keyof FieldModel, hasLookupExclude = true): this {\n return this.withLookupExcludeUnsafe(filterProperty as string, valueProperty as string, hasLookupExclude);\n }\n\n public withLookupExcludeUnsafe(filterProperty: string, valueProperty: string, hasLookupExclude = true): this {\n this._hasLookupExcludeValues = hasLookupExclude;\n this._excludeFilterProperty = filterProperty;\n this._excludeValueProperty = valueProperty;\n return this;\n }\n\n public copy(): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel> {\n const field = new FieldManyToManyEditorDescriptor<FieldModel, EditorModel, Service, FieldValue, ParentEditorModel>(\n this._property,\n this._mainTableDescriptor.copy(),\n this._lookupTableDescriptor.copy(),\n {\n lookupDataProvider: this.lookupTableDataProvider\n }\n );\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._actions = this._actions.map(a => a);\n field._hasLookupExcludeValues = this._hasLookupExcludeValues;\n field._excludeFilterProperty = this._excludeFilterProperty;\n field._excludeValueProperty = this._excludeValueProperty;\n return field;\n }\n}\n\nexport class FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue = FieldModel[], ParentEditorModel = undefined> extends AFieldDescriptor<\n FieldModel,\n EditorModel,\n FieldValue,\n ParentEditorModel\n> {\n private readonly _tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>;\n private _fieldType: FieldManyEditorTypeEnum = FieldManyEditorTypeEnum.DialogEditor;\n private _fieldActions: Array<FieldManyEditorActionEnum> = [];\n // we allow any action (item is not defined, the same goes for other generics). Developer should define types depending on action's specifics\n private _actions: Array<ActionDescriptorInst<any>> = [];\n\n constructor(property: string, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>) {\n super(property);\n this._tableviewDescriptor = tableviewDescriptor;\n this._fieldActions.push(FieldManyEditorActionEnum.View, FieldManyEditorActionEnum.Add, FieldManyEditorActionEnum.Edit, FieldManyEditorActionEnum.Delete);\n\n // change default sizing\n if (this._tableviewDescriptor.table.size == null) {\n this._tableviewDescriptor.table.withSize(TableSizeEnum.Normal);\n }\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get fieldActions() {\n return this._fieldActions;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get tableviewDescriptor() {\n return this._tableviewDescriptor;\n }\n\n public get tableDescriptor() {\n return this._tableviewDescriptor.table;\n }\n\n public get editorForCreate() {\n return this._tableviewDescriptor.addEditor;\n }\n\n public get editorForRead() {\n return this._tableviewDescriptor.detailsEditor;\n }\n\n public get editorForUpdate() {\n return this._tableviewDescriptor.editEditor;\n }\n\n public withFieldAction(action: FieldManyEditorActionEnum): this {\n this._fieldActions.push(action);\n return this;\n }\n\n public withFieldActions(actions: FieldManyEditorActionEnum[]): this {\n this._fieldActions = actions;\n return this;\n }\n\n public withAction(action: ActionDescriptorInst<any>): this {\n this._actions.push(action);\n return this;\n }\n\n public copy(): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {\n const field = new FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>(this._property, this._tableviewDescriptor.copy());\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._fieldActions = this._fieldActions.map(a => a);\n field._actions = this._actions.map(a => a.copy());\n return field;\n }\n}\n","import {Type} from '@angular/core';\nimport {AbstractControl} from '@angular/forms';\n\nimport {ItemOrObservable, fromEnumConstantsAsValueArray, fromEnumValuesAsValueArray} from '@mediusinc/mng-commons/core';\nimport {EmptyValueType, InputTrimType} from '@mediusinc/mng-commons/form/api';\nimport {EnumDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {FieldImagePreviewComponent} from '../models/field-image-preview.model';\nimport {FieldInputTypeEnum} from '../models/field.model';\nimport {AFormlyCustomFieldComponent} from '../models/formly-custom-field.model';\nimport {CommonsFormlyFieldConfig} from '../models/formly-field.model';\nimport {RadioValue} from '../models/radio.model';\nimport {AFieldDescriptor} from './field-base.descriptor';\n\nexport type FieldInputDescriptorType = string | string[] | number | boolean | Date | File | File[];\n\ntype FieldInputOptsType = {\n emptyValue?: EmptyValueType;\n};\n\ntype FieldInpuTextBaseOptsType = {\n trim?: InputTrimType;\n};\n\nexport type FieldInputTextOptsType = {\n email?: boolean;\n} & FieldInputTextValidationOptsType &\n FieldInpuTextBaseOptsType &\n FieldInputOptsType;\n\nexport type FieldInputTextareaOptsType = {\n rows?: number;\n} & FieldInputTextValidationOptsType &\n FieldInpuTextBaseOptsType &\n FieldInputOptsType;\n\nexport type FieldInputMaskOptsType = {\n mask: string;\n slotChar?: string;\n} & FieldInputOptsType;\n\nexport type FieldInputTextValidationOptsType = {\n minLength?: number;\n maxLength?: number;\n pattern?: string | RegExp;\n};\n\nexport type FieldInputDatePickerDisplayOptsType = {\n format?: string;\n showTime?: boolean;\n showSeconds?: boolean;\n showMilliseconds?: boolean;\n primeTimePicker?: boolean;\n timeSelectInterval?: number;\n timeSelect?: boolean;\n};\n\nexport type FieldInputDateValidationOptsType<FieldValue, EditorModel, ParentEditorModel> = {\n min?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n max?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n};\n\nexport type FieldInputCurrencyOptsType<Property = string> = {\n currencyProperty?: Property;\n currency?: string;\n currencyDisplay?: 'symbol' | 'code' | 'name';\n} & FieldInputNumberGroupingOptsType &\n FieldInputNumberFractionOptsType &\n FieldInputNumberValidationOptsType &\n FieldInputLocaleOptsType &\n FieldInputOptsType;\n\nexport type FieldInputNumberOptsType = FieldInputNumberGroupingOptsType &\n FieldInputNumberFractionOptsType &\n FieldInputNumberValidationOptsType &\n FieldInputLocaleOptsType &\n FieldInputNumberDisplayOptsType &\n FieldInputOptsType;\n\nexport type FieldInputNumberGroupingOptsType = {\n groupSeparator?: boolean;\n};\n\nexport type FieldInputNumberValidationOptsType = {\n min?: number;\n max?: number;\n step?: number;\n autoCorrect?: boolean;\n};\n\nexport type FieldInputNumberFractionOptsType = {\n minFractionDigits?: number;\n maxFractionDigits?: number;\n};\n\nexport type FieldInputLocaleOptsType = {\n locale?: string;\n};\n\nexport type FieldInputNumberDisplayOptsType = {\n prefix?: string;\n suffix?: string;\n};\n\nexport type FieldInputDatePickerOptsType<FieldValue, EditorModel, ParentEditorModel> = FieldInputDatePickerDisplayOptsType &\n FieldInputDateValidationOptsType<FieldValue, EditorModel, ParentEditorModel> &\n FieldDateOptsType;\n\nexport type FieldDateOptsType = {\n asDateObj?: boolean;\n utc?: boolean;\n noTime?: boolean;\n noTimeZone?: boolean;\n};\n\nexport type FieldInputFileOpts = {\n multiple?: boolean;\n maxFileSize?: number;\n accept?: string;\n onFileSelectHandlerFn?: FieldInputFileOnSelectHandlerFnType;\n preview?: boolean;\n previewAllowSvg?: boolean;\n previewComponent?: Type<FieldImagePreviewComponent>;\n};\n\nexport type FieldInputImageUrlOpts = {\n multiple?: boolean;\n preview?: boolean;\n inputVisibleOnDisabled?: boolean;\n previewAllowSvg?: boolean;\n previewComponent?: Type<FieldImagePreviewComponent>;\n};\n\nexport type FieldInputComponentOpts = {\n fieldWrappers?: string[];\n inputs?: Record<string, any>;\n};\n\nexport type FieldInputFileOnSelectHandlerFnType = (file: File[] | null, control: AbstractControl) => void;\nexport type FieldInputDatePickerDynamicMinMaxFnType<Value, FormValue, ParentFormValue> = (\n control: AbstractControl<Value>,\n field: CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>\n) => ItemOrObservable<Date | undefined>;\n\nexport class FieldInputDescriptor<EditorModel, FieldModel = FieldInputDescriptorType, FieldValue = FieldModel, ParentEditorModel = undefined> extends AFieldDescriptor<\n FieldModel,\n EditorModel,\n FieldValue,\n ParentEditorModel\n> {\n private _fieldType: FieldInputTypeEnum = FieldInputTypeEnum.Text;\n\n // textarea specific properties\n private _rows?: number;\n\n // number specific properties\n private _numberMin?: number;\n private _numberMax?: number;\n private _numberStep?: number;\n private _numberAutoCorrect?: boolean;\n private _numberMinFractionDigits?: number;\n private _numberMaxFractionDigits?: number;\n private _numberUseGrouping = true;\n private _locale?: string;\n private _numberPrefix?: string;\n private _numberSuffix?: string;\n\n // currency specific properties\n private _currency?: string;\n private _currencyDisplay: 'symbol' | 'code' | 'name' = 'symbol';\n private _currencyFromProperty?: string;\n\n // radio specific properties\n private _radioOptions: Array<RadioValue> = [];\n private _radioLabelClassName?: string;\n\n // datepicker specific properties\n private _datePickerFormat?: string;\n private _datePickerMin?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n private _datePickerMax?: Date | FieldInputDatePickerDynamicMinMaxFnType<FieldValue, EditorModel, ParentEditorModel>;\n private _datePickerShowTime?: boolean;\n private _datePickerShowSeconds?: boolean;\n private _datePickerShowMilliseconds?: boolean;\n private _datePickerPrimeTimePicker?: boolean;\n private _datePickerTimeSelectInterval?: number;\n private _datePickerTimeSelect?: boolean;\n private _datePickerValueUtc?: boolean;\n private _datePickerValueNoTimezone?: boolean;\n private _datePickerValueNoTime?: boolean;\n private _datePickerValueAsDateObj?: boolean;\n\n // input specific properties\n private _maxLength?: number;\n private _minLength?: number;\n private _pattern?: string | RegExp;\n private _validationEmail?: boolean;\n private _textTrim?: InputTrimType;\n\n // mask specific properties\n private _mask?: string;\n private _slotChar?: string;\n\n // file specific properties\n private _fileMultiple?: boolean;\n private _fileMaxFileSize?: number;\n private _fileAccept?: string;\n private _fileOnSelectHandler?: FieldInputFileOnSelectHandlerFnType;\n\n // image specific properties\n private _imagePreview?: boolean;\n private _imageUrlInputHiddenOnDisabled?: boolean;\n private _imagePreviewAllowSvg?: boolean;\n private _imagePreviewComponent?: Type<FieldImagePreviewComponent>;\n\n // custom component properties\n private _customComponentType?: Type<AFormlyCustomFieldComponent<FieldValue, EditorModel, ParentEditorModel>>;\n private _customComponentInputs?: Record<string, any>;\n private _customComponentWrappers?: string[];\n\n // value control\n private _emptyValue?: EmptyValueType;\n\n constructor(property: string) {\n super(property);\n }\n\n /**\n * converts field to given type with additional arguments\n * @param fieldType field type enum\n * @param args any additional arguments for field (optional)\n */\n public asType(fieldType: FieldInputTypeEnum, ...args: any[]): this {\n switch (fieldType) {\n case FieldInputTypeEnum.Hidden:\n return this.asHidden();\n case FieldInputTypeEnum.Label:\n return this.asLabel();\n case FieldInputTypeEnum.Textarea:\n return this.asTextarea(args[0]);\n case FieldInputTypeEnum.Number:\n return this.asNumber(args[0]);\n case FieldInputTypeEnum.Currency:\n return this.asCurrency(args[0]);\n case FieldInputTypeEnum.Switch:\n return this.asSwitch();\n case FieldInputTypeEnum.Radio:\n return this.asRadio(args[0], args[1]);\n case FieldInputTypeEnum.Datepicker:\n return this.asDatePicker(args[0]);\n case FieldInputTypeEnum.Mask:\n return this.asMask(args[0]);\n case FieldInputTypeEnum.File:\n return this.asFile(args[0]);\n case FieldInputTypeEnum.ImageFile:\n return this.asImageFile(args[0]);\n case FieldInputTypeEnum.ImageUrl:\n return this.asImageUrl(args[0]);\n case FieldInputTypeEnum.Custom:\n return this.asCustomComponent(args[0], args[1]);\n case FieldInputTypeEnum.Text:\n return this.asText(args[0]);\n }\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get rows() {\n return this._rows;\n }\n\n public get numberMin() {\n return this._numberMin;\n }\n\n public get numberMax() {\n return this._numberMax;\n }\n\n public get numberStep() {\n return this._numberStep;\n }\n\n public get numberAutoCorrect() {\n return this._numberAutoCorrect;\n }\n\n public get numberMinFractionDigits() {\n return this._numberMinFractionDigits;\n }\n\n public get numberMaxFractionDigits() {\n return this._numberMaxFractionDigits;\n }\n\n public get numberUseGrouping() {\n return this._numberUseGrouping;\n }\n\n public get numberPrefix() {\n return this._numberPrefix;\n }\n\n public get numberSuffix() {\n return this._numberSuffix;\n }\n\n public get radioOptions() {\n return this._radioOptions;\n }\n\n public get radioLabelClassName() {\n return this._radioLabelClassName;\n }\n\n public get datePickerFormat() {\n return this._datePickerFormat;\n }\n\n public get datePickerMin() {\n return this._datePickerMin;\n }\n\n public get datePickerMax() {\n return this._datePickerMax;\n }\n\n public get datePickerShowTime() {\n return this._datePickerShowTime;\n }\n\n public get datePickerShowSeconds() {\n return this._datePickerShowSeconds;\n }\n\n public get datePickerShowMilliseconds() {\n return this._datePickerShowMilliseconds;\n }\n\n public get datePickerPrimeTimePicker() {\n return this._datePickerPrimeTimePicker;\n }\n\n public get datePickerTimeSelect() {\n return this._datePickerTimeSelect;\n }\n\n public get datePickerTimeSelectInterval() {\n return this._datePickerTimeSelectInterval;\n }\n\n public get datePickerValueUtc() {\n return this._datePickerValueUtc;\n }\n\n public get datePickerValueNoTimezone() {\n return this._datePickerValueNoTimezone;\n }\n\n public get datePickerValueNoTime() {\n return this._datePickerValueNoTime;\n }\n\n public get datePickerValueAsDateObj() {\n return this._datePickerValueAsDateObj;\n }\n\n public get maxLength() {\n return this._maxLength;\n }\n\n public get minLength() {\n return this._minLength;\n }\n\n public get pattern() {\n return this._pattern;\n }\n\n public get textTrim() {\n return this._textTrim;\n }\n\n public get emptyValue() {\n return this._emptyValue;\n }\n\n public get validationEmail() {\n return this._validationEmail;\n }\n\n public get mask() {\n return this._mask;\n }\n\n public get slotChar() {\n return this._slotChar;\n }\n\n public get fileMultiple() {\n return this._fileMultiple;\n }\n\n public get fileMaxFileSize() {\n return this._fileMaxFileSize;\n }\n\n public get fileAccept() {\n return this._fileAccept;\n }\n\n public get fileOnSelectHandler() {\n return this._fileOnSelectHandler;\n }\n\n public get imagePreview() {\n return this._imagePreview;\n }\n\n public get imageUrlInputVisibleOnDisabled() {\n return this._imageUrlInputHiddenOnDisabled;\n }\n\n public get imagePreviewAllowSvg() {\n return this._imagePreviewAllowSvg;\n }\n\n public get imagePreviewComponent() {\n return this._imagePreviewComponent;\n }\n\n public get customComponentType() {\n return this._customComponentType;\n }\n\n public get customComponentInputs() {\n return this._customComponentInputs;\n }\n\n public get customComponentWrappers() {\n return this._customComponentWrappers;\n }\n\n public get locale() {\n return this._locale;\n }\n\n public get currency() {\n return this._currency;\n }\n\n public get currencyFromProperty() {\n return this._currencyFromProperty;\n }\n\n public get currencyDisplay() {\n return this._currencyDisplay;\n }\n\n public asHidden(): this {\n this._fieldType = FieldInputTypeEnum.Hidden;\n return this;\n }\n\n public asLabel(): this {\n this._fieldType = FieldInputTypeEnum.Label;\n return this;\n }\n\n public asText(opts?: FieldInputTextOptsType): this {\n this._fieldType = FieldInputTypeEnum.Text;\n return this.withTextValidation(opts)\n .withTextValidationEmail(opts?.email ?? false)\n .withTextCommonOpts(opts)\n .withInputCommonOpts(opts);\n }\n\n public asTextarea(opts?: FieldInputTextareaOptsType): this {\n this._fieldType = FieldInputTypeEnum.Textarea;\n this._rows = opts?.rows;\n return this.withTextValidation(opts).withTextCommonOpts(opts).withInputCommonOpts(opts);\n }\n\n public asNumber(opts?: FieldInputNumberOptsType): this {\n this._fieldType = FieldInputTypeEnum.Number;\n return this.withNumberGrouping(opts?.groupSeparator ?? false)\n .withNumberFractions(opts)\n .withNumberValidation(opts)\n .withLocale(opts?.locale)\n .withNumberDisplay(opts)\n .withInputCommonOpts(opts);\n }\n\n public asCurrency(opts?: FieldInputCurrencyOptsType<keyof EditorModel>): this {\n return this.asCurrencyUnsafe(<FieldInputCurrencyOptsType>{\n ...opts,\n currencyProperty: opts?.currencyProperty ? (opts.currencyProperty as string) : undefined\n }).withInputCommonOpts(opts);\n }\n\n public asCurrencyUnsafe(opts?: FieldInputCurrencyOptsType): this {\n this._fieldType = FieldInputTypeEnum.Currency;\n this._currencyFromProperty = opts?.currencyProperty;\n this._currency = opts?.currency ?? this._currency;\n this._currencyDisplay = opts?.currencyDisplay ?? this._currencyDisplay;\n return this.withNumberGrouping(opts?.groupSeparator ?? false)\n .withNumberFractions({\n maxFractionDigits: opts?.maxFractionDigits ?? 2,\n minFractionDigits: opts?.minFractionDigits ?? 2\n })\n .withNumberValidation(opts)\n .withLocale(opts?.locale)\n .withInputCommonOpts(opts);\n }\n\n public asSwitch(): this {\n this._fieldType = FieldInputTypeEnum.Switch;\n return this;\n }\n\n public asRadio(options: Array<string | number | boolean>, optionsTitlePath?: string): this {\n this._fieldType = FieldInputTypeEnum.Radio;\n this._radioOptions = options.map(o => <RadioValue>{value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}`});\n return this;\n }\n\n public asRadioFromEnum<Enum>(enumModel: EnumDescriptor<Enum>, values?: Array<Enum>): this {\n this._fieldType = FieldInputTypeEnum.Radio;\n this._radioOptions = Array.isArray(values)\n ? fromEnumValuesAsValueArray<Enum>(enumModel.type, values, enumModel.nameAsValue, enumModel.i18nBaseKey ?? undefined)\n : fromEnumConstantsAsValueArray(enumModel.type, enumModel.nameAsValue, enumModel.i18nBaseKey ?? undefined);\n return this;\n }\n\n public asDatePicker(opts?: FieldInputDatePickerOptsType<FieldValue, EditorModel, ParentEditorModel>): this {\n this._fieldType = FieldInputTypeEnum.Datepicker;\n return this.withDateValidation(opts).withDatePickerDisplay(opts).withDateValue({\n asDateObj: opts?.asDateObj,\n utc: opts?.utc,\n noTimeZone: opts?.noTimeZone,\n noTime: opts?.noTime\n });\n }\n\n public asMask(opts?: FieldInputMaskOptsType): this {\n this._fieldType = FieldInputTypeEnum.Mask;\n this._mask = opts?.mask;\n this._slotChar = opts?.slotChar;\n return this.withInputCommonOpts(opts);\n }\n\n public asFile(opts?: FieldInputFileOpts): this {\n this._fieldType = FieldInputTypeEnum.File;\n this._fileMultiple = opts?.multiple;\n this._fileMaxFileSize = opts?.maxFileSize;\n this._fileAccept = opts?.accept;\n return this.withFileOnSelectHandler(opts?.onFileSelectHandlerFn);\n }\n\n public asImageFile(opts?: FieldInputFileOpts): this {\n this.asFile(opts);\n this._fieldType = FieldInputTypeEnum.ImageFile;\n this._imagePreview = opts?.preview;\n this._imagePreviewAllowSvg = opts?.previewAllowSvg;\n this._imagePreviewComponent = opts?.previewComponent;\n return this;\n }\n\n public asImageUrl(opts?: FieldInputImageUrlOpts): this {\n this._fieldType = FieldInputTypeEnum.ImageUrl;\n this._fileMultiple = opts?.multiple;\n this._imagePreview = opts?.preview;\n this._imagePreviewAllowSvg = opts?.previewAllowSvg;\n this._imagePreviewComponent = opts?.previewComponent;\n this._imageUrlInputHiddenOnDisabled = opts?.inputVisibleOnDisabled;\n return this;\n }\n\n public asCustomComponent(component: Type<AFormlyCustomFieldComponent<FieldValue, EditorModel, ParentEditorModel>>, opts?: FieldInputComponentOpts): this {\n this._fieldType = FieldInputTypeEnum.Custom;\n this._customComponentType = component;\n this._customComponentInputs = opts?.inputs;\n this._customComponentWrappers = opts?.fieldWrappers;\n return this;\n }\n\n public withNumberValidation(opts?: FieldInputNumberValidationOptsType): this {\n this._numberStep = opts?.step;\n this._numberAutoCorrect = opts?.autoCorrect;\n this._numberMin = opts?.min;\n this._numberMax = opts?.max;\n return this;\n }\n\n public withLocale(locale?: string): this {\n this._locale = locale;\n return this;\n }\n\n public withNumberFractions(opts?: FieldInputNumberFractionOptsType) {\n this._numberMinFractionDigits = opts?.minFractionDigits;\n this._numberMaxFractionDigits = opts?.maxFractionDigits;\n return this;\n }\n\n public withNumberGrouping(useGrouping = true): this {\n this._numberUseGrouping = useGrouping;\n return this;\n }\n\n public withNumberDisplay(opts?: FieldInputNumberDisplayOptsType): this {\n this._numberPrefix = opts?.prefix;\n this._numberSuffix = opts?.suffix;\n return this;\n }\n\n public withTextareaRows(rows?: number): this {\n this._rows = rows;\n return this;\n }\n\n public withTextValidation(opts?: FieldInputTextValidationOptsType): this {\n this._minLength = opts?.minLength;\n this._maxLength = opts?.maxLength;\n this._pattern = opts?.pattern;\n return this;\n }\n\n /**\n * Common options for text input element (i.e. value value trimming).\n * @param opts\n */\n public withTextCommonOpts(opts?: FieldInpuTextBaseOptsType): this {\n this._textTrim = opts?.trim;\n return this;\n }\n\n /**\n * Common options for input element (i.e. value on empty input).\n * @param opts\n */\n public withInputCommonOpts(opts?: FieldInputOptsType): this {\n this._emptyValue = opts?.emptyValue;\n return this;\n }\n\n public withDatePickerDisplay(opts?: FieldInputDatePickerDisplayOptsType): this {\n this._datePickerFormat = opts?.format;\n this._datePickerShowTime = opts?.showTime;\n this._datePickerShowSeconds = opts?.showSeconds;\n this._datePickerShowMilliseconds = opts?.showMilliseconds;\n this._datePickerPrimeTimePicker = opts?.primeTimePicker;\n this._datePickerTimeSelectInterval = opts?.timeSelectInterval;\n this._datePickerTimeSelect = opts?.timeSelect;\n return this;\n }\n\n public withDateValidation(opts?: FieldInputDateValidationOptsType<FieldValue, EditorModel, ParentEditorModel>): this {\n this._datePickerMin = opts?.min;\n this._datePickerMax = opts?.max;\n return this;\n }\n\n public withRadioOptions(opts: {labelClassName?: string}): this {\n this._radioLabelClassName = opts.labelClassName;\n return this;\n }\n\n public withDateValue(opts?: FieldDateOptsType): this {\n this._datePickerValueAsDateObj = opts?.asDateObj;\n this._datePickerValueUtc = opts?.utc;\n this._datePickerValueNoTimezone = opts?.noTimeZone;\n this._datePickerValueNoTime = opts?.noTime;\n return this;\n }\n\n public withTextValidationEmail(email = true): this {\n this._validationEmail = email;\n return this;\n }\n\n public withFileOnSelectHandler(fn?: FieldInputFileOnSelectHandlerFnType): this {\n this._fileOnSelectHandler = fn;\n return this;\n }\n\n public copy(): FieldInputDescriptor<EditorModel, FieldModel, FieldValue, ParentEditorModel> {\n const field = new FieldInputDescriptor<EditorModel, FieldModel, FieldValue, ParentEditorModel>(this._property);\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._rows = this._rows;\n field._numberMin = this._numberMin;\n field._numberMax = this._numberMax;\n field._numberStep = this._numberStep;\n field._numberAutoCorrect = this._numberAutoCorrect;\n field._numberMinFractionDigits = this._numberMinFractionDigits;\n field._numberMaxFractionDigits = this._numberMaxFractionDigits;\n field._numberUseGrouping = this._numberUseGrouping;\n field._numberPrefix = this._numberPrefix;\n field._numberSuffix = this._numberSuffix;\n field._radioOptions = [...this._radioOptions];\n field._radioLabelClassName = this._radioLabelClassName;\n field._datePickerFormat = this._datePickerFormat;\n field._datePickerMin = this._datePickerMin;\n field._datePickerMax = this._datePickerMax;\n field._datePickerShowTime = this._datePickerShowTime;\n field._datePickerShowSeconds = this._datePickerShowSeconds;\n field._datePickerShowMilliseconds = this._datePickerShowMilliseconds;\n field._datePickerPrimeTimePicker = this._datePickerPrimeTimePicker;\n field._datePickerTimeSelectInterval = this._datePickerTimeSelectInterval;\n field._datePickerTimeSelect = this._datePickerTimeSelect;\n field._datePickerValueUtc = this._datePickerValueUtc;\n field._datePickerValueNoTimezone = this._datePickerValueNoTimezone;\n field._datePickerValueNoTime = this._datePickerValueNoTime;\n field._datePickerValueAsDateObj = this._datePickerValueAsDateObj;\n field._maxLength = this._maxLength;\n field._minLength = this._minLength;\n field._pattern = this._pattern;\n field._mask = this._mask;\n field._slotChar = this._slotChar;\n field._fileMultiple = this._fileMultiple;\n field._fileMaxFileSize = this._fileMaxFileSize;\n field._fileAccept = this._fileAccept;\n field._fileOnSelectHandler = this._fileOnSelectHandler;\n field._imagePreview = this._imagePreview;\n field._imageUrlInputHiddenOnDisabled = this._imageUrlInputHiddenOnDisabled;\n field._imagePreviewAllowSvg = this._imagePreviewAllowSvg;\n field._imagePreviewComponent = this._imagePreviewComponent;\n field._customComponentType = this._customComponentType;\n field._customComponentInputs = this._customComponentInputs;\n field._customComponentWrappers = this._customComponentWrappers;\n field._locale = this._locale;\n field._currency = this._currency;\n field._currencyDisplay = this._currencyDisplay;\n field._currencyFromProperty = this._currencyFromProperty;\n field._textTrim = this._textTrim;\n field._emptyValue = this._emptyValue;\n field._validationEmail = this._validationEmail;\n return field;\n }\n}\n","import {FormGroup} from '@angular/forms';\n\nimport {Subject} from 'rxjs';\n\nimport {ArrayItemType, CommonsInternalError, EnumConstantType, IEditorDescriptor} from '@mediusinc/mng-commons/core';\nimport {EnumDescriptor, ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {ITableDataProvider, TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {TableviewDescriptorInst} from '../../tableview/descriptors/tableview.descriptor';\nimport {FieldsManageAddFieldLookupOpts, IFieldsManageWithGetField} from '../models/editor-fields.model';\nimport {EDITOR_DEFAULT_GROUP_NAME, TableviewEditorTypeEnum} from '../models/editor.model';\nimport {FormValidationMessage, FormValidator} from '../models/field-validation.model';\nimport {FormEvent, FormEventData, FormEventTypeEnum} from '../models/form-editor.event';\nimport {IFormEditorComponent} from '../models/form-editor.interface';\nimport {FieldActionDescriptor} from './field-action.descriptor';\nimport {AFieldDescriptor} from './field-base.descriptor';\nimport {FieldGroupDescriptor, FieldTabGroupDescriptor} from './field-group.descriptor';\nimport {FieldLookupDescriptor, FieldLookupEnumDescriptor, fieldLookupGetProviderCfgObj} from './field-lookup.descriptor';\nimport {FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, fieldManyToManyGetProviderCfgObj} from './field-many.descriptor';\nimport {FieldValidationDescriptorOptsType} from './field-validation.descriptor';\nimport {FieldInputDescriptor, FieldInputDescriptorType} from './field.descriptor';\nimport {EditorDescriptorNestedObjectWrapper} from './wrappers/editor-descriptor-nested-object-wrapper';\n\nexport class EditorDescriptorInst<EditorModel, ParentEditorModel = undefined>\n implements IEditorDescriptor<EditorModel, ParentEditorModel>, IFieldsManageWithGetField<EditorModel, ParentEditorModel>\n{\n public static readonly defaultGroupName = EDITOR_DEFAULT_GROUP_NAME;\n\n /** @ignore */ protected readonly _model: ModelDescriptor<EditorModel>;\n /** @ignore */ protected readonly _tableviewEditorType: TableviewEditorTypeEnum;\n /** @ignore */ protected readonly _tabs: Array<FieldTabGroupDescriptor<EditorModel>> = [];\n /** @ignore */ protected readonly _groups: Array<FieldGroupDescriptor<EditorModel, ParentEditorModel>> = [];\n /** @ignore */ protected _fields: Array<AFieldDescriptor<any, EditorModel>> = [];\n /** @ignore */ protected _currentTabGroup?: FieldTabGroupDescriptor<EditorModel>;\n /** @ignore */ protected _currentGroup?: FieldGroupDescriptor<EditorModel>;\n\n /** @ignore */ protected _autoSave?: boolean;\n /** @ignore */ protected _autoSaveIdentifier?: string;\n\n /** @ignore */ protected _autofocusOnField?: boolean;\n\n /** @ignore */ protected _disabled = false;\n\n /** @ignore */ protected _isLocalized = false;\n /** @ignore */ protected _localizationLocaleProperty?: string;\n /** @ignore */ protected _localizationModel?: ModelDescriptor<any>;\n /** @ignore */ protected _localizationLocalizationProperty?: string;\n\n /** @ignore */ protected readonly _eventsSubject = new Subject<FormEvent<EditorModel, ParentEditorModel>>();\n\n /**\n * Creates new instance of editor descriptor.\n * @param model Model descriptor.\n * @param tableviewEditorType Type of editor in tableview (add, edit, view or none).\n */\n public constructor(model: ModelDescriptor<EditorModel>, tableviewEditorType = TableviewEditorTypeEnum.None) {\n this._model = model;\n this._tableviewEditorType = tableviewEditorType;\n }\n\n /**\n * Model descriptor for editor.\n */\n public get model() {\n return this._model;\n }\n\n /**\n * Editor's tabs.\n */\n public get tabs() {\n return this._tabs;\n }\n\n /**\n * Editor's fields.\n */\n public get fields() {\n return this._fields;\n }\n\n /**\n * Type of editor for tableview.\n */\n public get tableviewEditorType() {\n return this._tableviewEditorType;\n }\n\n /**\n * If editor is disabled.\n */\n public get disabled() {\n return this._disabled;\n }\n\n public get isLocalized() {\n return this._isLocalized;\n }\n\n public get localizationLocaleProperty() {\n return this._localizationLocaleProperty;\n }\n\n public get localizationLocalizationProperty() {\n return this._localizationLocalizationProperty;\n }\n\n public get localizationModel() {\n return this._localizationModel;\n }\n\n public get autoSave() {\n return this._autoSave;\n }\n\n public get autoSaveIdentifier() {\n return this._autoSaveIdentifier;\n }\n\n public get autofocusOnField() {\n return this._autofocusOnField;\n }\n\n /**\n * Dives into nested object to add fields from the nested object on property.\n *\n * @experimental\n *\n * @param property Model property name.\n */\n public nested<Property extends keyof EditorModel>(property: Property): EditorDescriptorNestedObjectWrapper<EditorModel, ParentEditorModel, NonNullable<EditorModel[Property]>> {\n return new EditorDescriptorNestedObjectWrapper(this, property as string);\n }\n\n /**\n * Creates new tab group. Next added fields are added to newly created tab group.\n * @param name Name of the group.\n * @param title Title key for the tab.7@return Newly created group descriptor.\n * @return Newly created group descriptor.\n */\n public addTabGroup(name: string, title?: string): FieldTabGroupDescriptor<EditorModel> {\n const tabGroup = new FieldTabGroupDescriptor<EditorModel>(name);\n tabGroup.withTitle(title);\n this.createTabGroupDescriptor(tabGroup);\n return tabGroup;\n }\n\n /**\n * Creates new tab group. Next added fields are added to newly created tab group.\n * @param name Name of the group.\n * @param title Title key for the tab.7@return Newly created group descriptor.\n */\n public withTabGroup(name: string, title?: string): this {\n this.addTabGroup(name, title);\n return this;\n }\n\n /**\n * Gets group by its name (key).\n * @param name Group's key.\n */\n public getGroup(name: string | number): FieldGroupDescriptor<EditorModel> | null {\n return typeof name === 'string' ? (this._groups.find(g => g.name === name) ?? null) : (this._groups[name] ?? null);\n }\n\n /**\n * Creates new field group. Next added fields are added to newly created field group.\n * @param name Name of the group.\n * @param title Title key for the group.\n * @return Newly created group descriptor.\n */\n public addFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<EditorModel> {\n const fieldGroup = new FieldGroupDescriptor<EditorModel>(name);\n fieldGroup.withTitle(title);\n this.createFieldGroupDescriptor(fieldGroup);\n return fieldGroup;\n }\n\n /**\n * Creates new field group. Next added fields are added to newly created field group.\n * @param name Name of the group.\n * @param title Title key for the group.\n */\n public withFieldGroup(name: string, title?: string): this {\n this.addFieldGroup(name, title);\n return this;\n }\n\n /**\n * Gets field by the model property name.\n * @param property Model property name.\n */\n public getField<Property extends keyof EditorModel, FieldModel = NonNullable<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property) {\n return this.getFieldUnsafe<FieldModel, FieldValue>(property as string);\n }\n\n /**\n * Gets field by the model property name (UNSAFE).\n * @param property Model property name.\n */\n public getFieldUnsafe<FieldModel, FieldValue = FieldModel>(property: string): AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> | null {\n return this._fields.find(f => f.property === property) ?? null;\n }\n\n /**\n * Removes field by the model property name.\n * @param property Model property name.\n */\n public removeField(property: keyof EditorModel): void {\n return this.removeFieldUnsafe(property as string);\n }\n\n /**\n * Removes field by the model property name (UNSAFE).\n * @param property Model property name.\n */\n public removeFieldUnsafe(property: string): void {\n const fieldIdx = this._fields.findIndex(f => f.property === property);\n if (fieldIdx < 0) {\n throw new CommonsInternalError(`Field ${property} does not exist.`, {name: 'EditorDescriptorError'});\n }\n for (const group of this._groups) {\n const groupFieldIdx = group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);\n if (groupFieldIdx >= 0) {\n group.fields.splice(groupFieldIdx, 1);\n break;\n }\n }\n this._fields.splice(fieldIdx, 1);\n }\n\n /**\n * Adds field by the descriptor.\n * @param field Field descriptor.\n */\n public addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>): this {\n if (this._fields.some(f => f.property === field.property)) {\n throw new CommonsInternalError(`Field '${field.property}' already exists.`);\n }\n this.createDefaultGroup();\n this._fields.push(field);\n this._currentGroup?.addField(field);\n return this;\n }\n\n /**\n * Adds field by the model property name.\n * @param property Model property name.\n */\n public addField<Property extends keyof EditorModel, FieldModel = NonNullable<EditorModel[Property]>, FieldValue = EditorModel[Property]>(property: Property) {\n return this.addFieldUnsafe<FieldModel, FieldValue>(property as string);\n }\n\n /**\n * Adds field by the model property name (UNSAFE). Property is not checked on editor model.\n * Use {addField} for safe usage.\n * @param property Model property name.\n */\n public addFieldUnsafe<FieldModel = FieldInputDescriptorType, FieldValue = FieldModel>(property: string) {\n const field = new FieldInputDescriptor<EditorModel, FieldModel, FieldValue, ParentEditorModel>(property);\n this.addFieldDescriptor<FieldModel, FieldValue>(field);\n return field;\n }\n\n public withFields(...properties: (keyof EditorModel)[]): this {\n properties.forEach(p => this.addField(p));\n return this;\n }\n\n public addFieldAction(actionName: string): FieldActionDescriptor<EditorModel, ParentEditorModel> {\n const field = new FieldActionDescriptor<EditorModel, ParentEditorModel>(actionName);\n this.addFieldDescriptor(field);\n return field;\n }\n\n /**\n * Adds lookup field.\n *\n * @param {Property} property - The property key of the editor.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam Property - The property key of the EditorModel.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookup<\n Property extends keyof EditorModel,\n Service = undefined,\n LookupModel extends NonNullable<EditorModel[Property]> = NonNullable<EditorModel[Property]>,\n FieldValue = EditorModel[Property]\n >(property: Property, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n return this.addFieldLookupUnsafe<LookupModel, Service, FieldValue>(property as string, opts);\n }\n\n /**\n * [UNSAFE] Adds lookup field.\n * This function is UNSAFE because property is not type-checked.\n *\n * @param {string} property Model property name.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookupUnsafe<LookupModel, Service = undefined, FieldValue = LookupModel>(property: string, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n const field = new FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue, ParentEditorModel>(property, {\n ...(opts?.serviceProvider ? fieldLookupGetProviderCfgObj(opts.serviceProvider) : {})\n });\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookupEnum<Property extends keyof EditorModel, Enum extends NonNullable<EditorModel[Property]>>(\n property: keyof EditorModel,\n enumDesc: EnumDescriptor<Enum>,\n options?: Array<Enum>\n ) {\n return this.addFieldLookupEnumUnsafe<Enum>(property as string, enumDesc, options);\n }\n\n /**\n * Adds enum lookup field.\n * @param property Model's property name.\n * @param enumDesc Type of enum or enum descriptor.\n * @param options Provides subset of enum's available constants.\n */\n public addFieldLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n const field = new FieldLookupEnumDescriptor<Enum, EditorModel, ParentEditorModel>(property, enumDesc, options);\n this.addFieldDescriptor(field);\n return field;\n }\n\n /**\n * Adds table/details/add/edit field for one-to-many (1:n) relations.\n * @param property Model's property name.\n * @param tableviewDescriptor Tableview descriptor for related model.\n */\n public addFieldManyEditor<Property extends keyof EditorModel, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(\n property: Property,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ) {\n return this.addFieldManyEditorUnsafe<FieldModel, FieldValue>(property as string, tableviewDescriptor);\n }\n\n /**\n * Adds table/details/add/edit field for one-to-many (1:n) relations (UNSAFE).\n * @param property Model's property name.\n * @param tableviewDescriptor Tableview descriptor for related model.\n */\n public addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(\n property: string,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, EditorModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ): FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel> {\n const field = new FieldManyEditorDescriptor<FieldModel, EditorModel, FieldValue, ParentEditorModel>(property, tableviewDescriptor);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyToManyEditor<Property extends keyof EditorModel, ServiceType, FieldModel = ArrayItemType<EditorModel[Property]>, FieldValue = EditorModel[Property]>(\n property: Property,\n mainTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupDataProvider: ITableDataProvider<FieldModel, ServiceType, any, any>\n ) {\n return this.addFieldManyToManyEditorUnsafe<FieldModel, ServiceType, FieldValue>(property as string, mainTableDescriptor, lookupTableDescriptor, lookupDataProvider);\n }\n\n public addFieldManyToManyEditorUnsafe<FieldModel, ServiceType, FieldValue = FieldModel[]>(\n property: string,\n mainTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel, any, any>,\n lookupDataProvider: ITableDataProvider<FieldModel, ServiceType, any, any>\n ): FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue, ParentEditorModel> {\n const cfg = fieldManyToManyGetProviderCfgObj(lookupDataProvider);\n const field = new FieldManyToManyEditorDescriptor<FieldModel, EditorModel, ServiceType, FieldValue, ParentEditorModel>(\n property,\n mainTableDescriptor,\n lookupTableDescriptor,\n {\n ...cfg\n }\n );\n this.addFieldDescriptor(field);\n return field;\n }\n\n /**\n * Disables field on editor.\n * @param disabled\n */\n public withDisabled(disabled = true): this {\n this._disabled = disabled;\n return this;\n }\n\n /**\n * Adds group validator to editor.\n * @param name Name of the validation.\n * @param validator Field validator function.\n * @param message Field validation message.\n * @param opts Additional configuration for validation.\n */\n public withValidation<Value = EditorModel>(\n name: string,\n validator?: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType<keyof EditorModel>\n ) {\n return this.withValidationUnsafe(name, validator, message, opts as FieldValidationDescriptorOptsType);\n }\n\n /**\n * Adds group validator to editor.\n * @param name Name of the validation.\n * @param validator Field validator function.\n * @param message Field validation message.\n * @param opts Additional configuration for validation.\n */\n public withValidationUnsafe<Value = EditorModel>(\n name: string,\n validator?: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType\n ) {\n if (this._currentGroup) {\n this._currentGroup.withValidation(name, validator, message, opts);\n }\n return this;\n }\n\n public withAutoSave(enabled = true, autoSaveIdentifier?: string): this {\n this._autoSave = enabled;\n this._autoSaveIdentifier = autoSaveIdentifier;\n return this;\n }\n\n public withAutofocusOnField(enabled = true): this {\n this._autofocusOnField = enabled;\n return this;\n }\n\n /**\n * Creates a copy of editor descriptor object.\n */\n public copy(): EditorDescriptorInst<EditorModel, ParentEditorModel> {\n const editor = new EditorDescriptorInst<EditorModel, ParentEditorModel>(this.model.copy(), this.tableviewEditorType);\n\n editor._fields = this._fields.map(f => f.copy());\n const fieldsMap = editor.fields.reduce((map, field) => {\n map.set(field.property, field);\n return map;\n }, new Map<string, any>());\n\n for (const tabGroup of this._tabs) {\n const tabGroupCopy = tabGroup.copy(true);\n // set fields\n for (let i = 0; i < tabGroup.fields.length; i++) {\n const group = tabGroup.fields[i];\n const groupCopy = tabGroupCopy.fields[i];\n\n for (let j = 0; j < group.fields.length; j++) {\n const fieldCopy = fieldsMap.get(group.fields[j].property);\n if (!fieldCopy) {\n throw new CommonsInternalError(`Could not copy editor descriptor: field '${group.fields[j].property}' (tab '${tabGroup.name}', group ${group.name}').`);\n }\n groupCopy.addField(fieldCopy);\n }\n editor._groups.push(groupCopy);\n }\n editor._tabs.push(tabGroupCopy);\n }\n\n editor._currentTabGroup = editor._tabs.length > 0 ? editor._tabs[editor._tabs.length - 1] : undefined;\n if (editor._currentTabGroup) {\n editor._currentGroup = editor._currentTabGroup.fields.length > 0 ? editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1] : undefined;\n }\n\n editor._disabled = this._disabled;\n editor._autoSave = this._autoSave;\n editor._autoSaveIdentifier = this._autoSaveIdentifier;\n editor._autofocusOnField = this._autofocusOnField;\n editor._isLocalized = this._isLocalized;\n editor._localizationLocaleProperty = this._localizationLocaleProperty;\n editor._localizationModel = this._localizationModel;\n editor._localizationLocalizationProperty = this._localizationLocalizationProperty;\n\n return editor;\n }\n\n /**\n * Created group from field group descriptor.\n * @param fieldGroup Field group descriptor.\n * @internal\n */\n public createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<EditorModel, ParentEditorModel>): this {\n this.createDefaultTabGroup();\n this._currentGroup = fieldGroup;\n this._groups.push(fieldGroup);\n this._currentTabGroup?.addField(fieldGroup);\n return this;\n }\n\n /**\n * Creates tab group from tab group descriptor.\n * @param tabGroup Tab group descriptor.\n * @internal\n */\n protected createTabGroupDescriptor(tabGroup: FieldTabGroupDescriptor<EditorModel>): this {\n this._currentTabGroup = tabGroup;\n this._tabs.push(tabGroup);\n return this;\n }\n\n /**\n * Creates default field group.\n * @internal\n */\n private createDefaultGroup() {\n this.createDefaultTabGroup();\n if (this._currentTabGroup?.fields.length === 0) {\n this.addFieldGroup(EditorDescriptorInst.defaultGroupName, null);\n }\n }\n\n /**\n * Creates default tab group.\n * @internal\n */\n private createDefaultTabGroup() {\n if (this._tabs.length === 0) {\n this.addTabGroup(EditorDescriptorInst.defaultGroupName, 'general.general');\n }\n }\n\n /**\n * This function takes care of displaying correct/localized data in the editor\n * @param property property that tells us where on the model are localizations accessible\n * @param model Model for localizations\n * @param localeProperty property by which we find the locale\n */\n public localized<Property extends keyof EditorModel, LocalizationModel = ArrayItemType<EditorModel[Property]>>(\n property: Property,\n model: ModelDescriptor<LocalizationModel>,\n localeProperty: keyof LocalizationModel\n ): this {\n return this.localizedUnsafe(property as string, model, localeProperty as string);\n }\n\n public localizedUnsafe<LocalizationType>(property: string, model: ModelDescriptor<LocalizationType>, localeProperty: string): this {\n this._localizationLocalizationProperty = property as string;\n this._localizationModel = model;\n this._localizationLocaleProperty = localeProperty as string;\n this._isLocalized = true;\n\n return this;\n }\n\n public nextEvent(type: FormEventTypeEnum, component: IFormEditorComponent<any, any>, data?: FormEventData<EditorModel>) {\n this._eventsSubject.next({\n type: type,\n formComponent: component,\n form: component.form as FormGroup,\n data: data\n });\n }\n\n public get events$() {\n return this._eventsSubject.asObservable();\n }\n}\n","import {ModelDescriptor, ModelDescriptorCreateOpts, TypeDescriptor, model} from '@mediusinc/mng-commons/model';\n\nimport {TableviewEditorTypeEnum} from '../models/editor.model';\nimport {EditorDescriptorInst} from './editor.descriptor';\n\nexport type EditorDescriptorCreateBaseOptsType<ParentEditorModel> = {\n tableviewEditorType?: TableviewEditorTypeEnum;\n parentEditorType?: TypeDescriptor<ParentEditorModel> | ModelDescriptor<ParentEditorModel> | EditorDescriptorInst<ParentEditorModel, any>;\n};\nexport type EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel> = ModelDescriptorCreateOpts<EditorModel> & EditorDescriptorCreateBaseOptsType<ParentEditorModel>;\n\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(): EditorDescriptorInst<EditorModel, ParentEditorModel>;\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(\n opts: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>\n): EditorDescriptorInst<EditorModel, ParentEditorModel>;\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(\n model: ModelDescriptor<EditorModel>,\n opts?: EditorDescriptorCreateBaseOptsType<ParentEditorModel>\n): EditorDescriptorInst<EditorModel, ParentEditorModel>;\nexport function editorDescriptor<EditorModel, ParentEditorModel = undefined>(\n modelOrOpts?: ModelDescriptor<EditorModel> | EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>,\n opts?: EditorDescriptorCreateOptsType<EditorModel, ParentEditorModel>\n) {\n if (modelOrOpts == null) {\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(model<EditorModel>(), opts?.tableviewEditorType);\n } else if (modelOrOpts instanceof ModelDescriptor) {\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(modelOrOpts, opts?.tableviewEditorType);\n } else {\n // this could have autoGenerated if model descriptor is class\n return new EditorDescriptorInst<EditorModel, ParentEditorModel>(model<EditorModel>(modelOrOpts), modelOrOpts?.tableviewEditorType);\n }\n}\n","import {AbstractControl, FormControl, FormGroup} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {IFormEditorComponent} from './form-editor.interface';\nimport {CommonsFormlyFieldConfig} from './formly-field.model';\n\nexport interface FormEditorSubmitEvent<Item> {\n formItem: Item;\n success: boolean;\n}\n\nexport enum FormFieldEventTypeEnum {\n ComponentLifecycle = 'ComponentLifecycle',\n ValueChange = 'ValueChange',\n DataProvider = 'DataProvider',\n DialogLifecycle = 'DialogLifecycle',\n RowReorder = 'RowReorder',\n Other = 'Other'\n}\n\nexport enum FormEventTypeEnum {\n ComponentLifecycle = 'ComponentLifecycle',\n ValueChange = 'ValueChange',\n Submit = 'Submit',\n Other = 'Other'\n}\n\nexport class FormFieldEventComponentSubtype {\n public static readonly ON_INIT = 'Component.OnInit';\n public static readonly ON_VIEW_INIT = 'Component.OnViewInit';\n public static readonly ON_CONTENT_INIT = 'Component.OnContentInit';\n public static readonly ON_DESTROY = 'Component.OnDestroy';\n}\n\nexport class FormFieldEventDialogSubtype {\n public static readonly VISIBILITY = 'Dialog.Visibility';\n}\n\nexport interface FormFieldEventData<FieldModel, EditorModel> {\n eventSubtype?: string;\n value?: FieldModel;\n formValue?: EditorModel;\n [key: string]: any;\n}\n\nexport interface FormEventData<EditorModel> {\n eventSubtype?: string;\n value?: EditorModel; // direct value from form.valueChanges, disabled field values and setters are not included\n submitValid?: boolean; // true if form is valid\n submitValue?: EditorModel; // value on submit\n [key: string]: any;\n}\n\nexport interface FormFieldEvent<FieldValue, FormValue, ParentFormValue = undefined> {\n type: FormFieldEventTypeEnum;\n fieldComponent?: FieldType<CommonsFormlyFieldConfig<FieldValue, FormValue, ParentFormValue>>;\n formComponent?: IFormEditorComponent<FormValue, ParentFormValue>;\n fieldFormControl: FormControl<FieldValue>;\n form: FormGroup<{[K in keyof FormValue]: AbstractControl<FormValue[K]>}>;\n fieldFormlyConfig: CommonsFormlyFieldConfig<FieldValue, FormValue, ParentFormValue>;\n data?: FormFieldEventData<FieldValue, FormValue>;\n}\n\nexport interface FormEvent<FormValue, ParentFormValue = undefined> {\n type: FormEventTypeEnum;\n formComponent?: IFormEditorComponent<FormValue, ParentFormValue>;\n form: FormGroup<{[K in keyof FormValue]: AbstractControl<FormValue[K]>}>;\n data?: FormEventData<FormValue>;\n}\n\nexport interface EditorResetEvent<Item> {\n emitEvent?: boolean;\n fetch?: boolean; // if item should be re-fetched again through data provider\n item?: Item; // if present, item value will be used to reset form\n fields?: Partial<Item>;\n data?: {\n [key: string]: any;\n };\n}\n","import {Directive, Input} from '@angular/core';\nimport {AbstractControl, FormControl, FormGroup} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {CommonsFormlyFieldConfig, CommonsFormlyFieldProps} from './formly-field.model';\nimport {CommonsFormlyFormOptions, CommonsFormlyFormState} from './formly-options.model';\n\n@Directive()\nexport abstract class AFormlyCustomFieldComponent<Value, FormValue, ParentFormValue = undefined> extends FieldType<CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>> {\n @Input('field') declare field: CommonsFormlyFieldConfig<Value, FormValue, ParentFormValue>;\n @Input('model') _model!: Value;\n @Input('form') _form!: FormGroup<{[K in keyof FormValue]: AbstractControl<FormValue[K]>}>;\n @Input('options') _options!: CommonsFormlyFormOptions<FormValue>;\n @Input('key') _key!: string | number | (string | number)[];\n @Input('formControl') _formControl!: FormControl<Value>;\n @Input('props') _props!: CommonsFormlyFieldProps<Value, FormValue, ParentFormValue>;\n @Input('showError') _showError!: boolean;\n @Input('id') _id!: string;\n @Input('formState') _formState!: CommonsFormlyFormState<FormValue>;\n\n override get model() {\n return this._model;\n }\n\n override get form() {\n return this._form;\n }\n\n override get options() {\n return this._options;\n }\n\n override get key() {\n return this._key;\n }\n\n override get formControl() {\n return this._formControl;\n }\n\n override get props() {\n return this._props;\n }\n\n override get showError() {\n return this._showError;\n }\n\n override get id() {\n return this._id;\n }\n\n override get formState() {\n return this._formState;\n }\n}\n","import {DataProviderInst, ServiceClassOptType} from '@mediusinc/mng-commons/core';\nimport {ITableDataProvider, TableDataProviderGetAllEagerFnType, TableDataProviderGetAllFnType, TableDataProviderInst, TableReloadEvent} from '@mediusinc/mng-commons/table/api';\n\nimport {\n EditorDataProviderCreateFnType,\n EditorDataProviderDeleteFnType,\n EditorDataProviderFetchFnType,\n EditorDataProviderFetchMapToFnType,\n EditorDataProviderInst,\n EditorDataProviderUpdateFnType,\n IEditorDataProvider\n} from '../../editor/data-providers/editor.data-provider';\nimport {EditorResetEvent} from '../../editor/models/form-editor.event';\n\nexport type ITableviewDataProvider<\n Model = any,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = ServiceClassOptType<Service>,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n> = IEditorDataProvider<Model, Service, ServiceClass, CreateModel, UpdateModel> & ITableDataProvider<TableModel, Service, Sorts, Filters, ServiceClass>;\n\nexport class TableviewDataProviderInst<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = ServiceClassOptType<Service>,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>\n extends DataProviderInst<Model, Service, ServiceClass>\n implements\n ITableviewDataProvider<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel>,\n IEditorDataProvider<Model, Service, ServiceClass, CreateModel, UpdateModel>\n{\n protected readonly editorDataProvider: EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>;\n protected readonly tableDataProvider: TableDataProviderInst<TableModel, Service, Sorts, Filters, ServiceClass>;\n\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n this.editorDataProvider = new EditorDataProviderInst<Model, Service, ServiceClass, CreateModel, UpdateModel>(serviceType);\n this.tableDataProvider = new TableDataProviderInst<TableModel, Service, Sorts, Filters, ServiceClass>(serviceType);\n }\n\n get isLazy() {\n return this.tableDataProvider.isLazy;\n }\n\n get tableReload$() {\n return this.tableDataProvider.tableReload$;\n }\n\n get editorReset$() {\n return this.editorDataProvider.editorReset$;\n }\n\n get getAll() {\n return this.tableDataProvider.getAll;\n }\n\n get fetch() {\n return this.editorDataProvider.fetch;\n }\n\n get create() {\n return this.editorDataProvider.create;\n }\n\n get update() {\n return this.editorDataProvider.update;\n }\n\n get delete() {\n return this.editorDataProvider.delete;\n }\n\n get mapFetchItemToCreateItem() {\n return this.editorDataProvider.mapFetchItemToCreateItem;\n }\n\n get mapFetchItemToUpdateItem() {\n return this.editorDataProvider.mapFetchItemToUpdateItem;\n }\n\n withGetAll(fn: TableDataProviderGetAllFnType<TableModel, Service, Sorts, Filters>): this {\n this.tableDataProvider.withGetAll(fn);\n return this;\n }\n\n withGetAllEagerly(fn: TableDataProviderGetAllEagerFnType<TableModel, Service>): this {\n this.tableDataProvider.withGetAllEagerly(fn);\n return this;\n }\n\n withFetch(fn: EditorDataProviderFetchFnType<Model, Service>): this {\n this.editorDataProvider.withFetch(fn);\n return this;\n }\n\n withCreate(fn?: EditorDataProviderCreateFnType<CreateModel, Model, Service>): this {\n this.editorDataProvider.withCreate(fn);\n return this;\n }\n\n withUpdate(fn?: EditorDataProviderUpdateFnType<UpdateModel, Model, Service>): this {\n this.editorDataProvider.withUpdate(fn);\n return this;\n }\n\n withDelete<Item = undefined>(fn?: EditorDataProviderDeleteFnType<Model, Service, Item>): this {\n this.editorDataProvider.withDelete<Item>(fn);\n return this;\n }\n\n withMapFetchItemToCreateItem(fn?: EditorDataProviderFetchMapToFnType<Model, CreateModel>): this {\n this.editorDataProvider.withMapFetchItemToCreateItem(fn);\n return this;\n }\n\n withMapFetchItemToUpdateItem(fn?: EditorDataProviderFetchMapToFnType<Model, UpdateModel>): this {\n this.editorDataProvider.withMapFetchItemToUpdateItem(fn);\n return this;\n }\n\n reloadTable(event?: TableReloadEvent<Sorts, Filters>): void {\n this.tableDataProvider.reloadTable(event);\n }\n\n resetEditor(event?: EditorResetEvent<Model>): void {\n this.editorDataProvider.resetEditor(event);\n }\n}\n\nexport class DynamicTableviewDataProviderInst<Service = any, ServiceClass = ServiceClassOptType<Service>> extends TableviewDataProviderInst<any, Service, any, any, ServiceClass> {\n public constructor(serviceType: ServiceClass) {\n super(serviceType);\n }\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {DynamicTableviewDataProviderInst, TableviewDataProviderInst} from './tableview.data-provider';\n\n/**\n * Creates and returns an instance of `TableviewDataProviderInst` with the specified options for managing tableview data.\n *\n * @param {Object} [opts] - The options object to configure the data provider.\n * @param {TypeDescriptor<Model> | ModelDescriptor<Model>} [opts.type] - The descriptor defining the type of model.\n * @param {ServiceClassType<Service>} [opts.service] - The service class type associated with the data provider.\n * @param {TypeDescriptor<CreateModel> | ModelDescriptor<CreateModel>} [opts.filtersType] - The descriptor defining the filters type.\n * @param {TypeDescriptor<UpdateModel> | ModelDescriptor<UpdateModel>} [opts.sortsType] - The descriptor defining the sorts type.\n * @return {TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel>} An instance of `TableviewDataProviderInst` configured according to the provided options.\n */\nexport function tableviewDataProvider<\n Model,\n Service = undefined,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model,\n ServiceClass = Service extends undefined ? undefined : ServiceClassType<Service>\n>(opts?: {\n type?: TypeDescriptor<Model> | ModelDescriptor<Model>;\n service?: ServiceClassType<Service>;\n tableType?: TypeDescriptor<TableModel> | ModelDescriptor<TableModel>;\n createType?: TypeDescriptor<CreateModel> | ModelDescriptor<Model>;\n updateType?: TypeDescriptor<UpdateModel> | ModelDescriptor<Model>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n}): TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel> {\n return new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClass, TableModel, CreateModel, UpdateModel>(opts?.service as ServiceClass);\n}\n\nexport function tableviewDynamicDataProvider(): DynamicTableviewDataProviderInst<undefined, undefined>;\nexport function tableviewDynamicDataProvider<Service>(serviceType: ServiceClassType<Service>): DynamicTableviewDataProviderInst<Service, ServiceClassType<Service>>;\nexport function tableviewDynamicDataProvider<Service, ServiceClass = ServiceClassType<Service>>(\n serviceType?: ServiceClass\n): DynamicTableviewDataProviderInst<Service, ServiceClass> {\n return new DynamicTableviewDataProviderInst<Service, ServiceClass>(serviceType as ServiceClass);\n}\n","import {ArrayItemType, EnumConstantType, ILookupDataProvider, ITableviewDescriptor} from '@mediusinc/mng-commons/core';\nimport {FilterDescriptor, FilterDisplayTypeEnum} from '@mediusinc/mng-commons/filter';\nimport {EnumDescriptor, ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {ColumnDescriptor, IColumnsManageInterface, ITableDataProvider, TableDescriptorInst, TableDynamicDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {FieldActionDescriptor} from '../../editor/descriptors/field-action.descriptor';\nimport {AFieldDescriptor} from '../../editor/descriptors/field-base.descriptor';\nimport {FieldLookupDescriptor, FieldLookupEnumDescriptor} from '../../editor/descriptors/field-lookup.descriptor';\nimport {FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor} from '../../editor/descriptors/field-many.descriptor';\nimport {FieldValidationDescriptorOptsType} from '../../editor/descriptors/field-validation.descriptor';\nimport {FieldInputDescriptor, FieldInputDescriptorType} from '../../editor/descriptors/field.descriptor';\nimport {FieldsManageAddFieldLookupOpts, IFieldsManage} from '../../editor/models/editor-fields.model';\nimport {TableviewEditorTypeEnum} from '../../editor/models/editor.model';\nimport {FormValidationMessage, FormValidator} from '../../editor/models/field-validation.model';\nimport {TableviewDescriptorFieldsManageMultiType} from '../models/tableview-descriptor-fields-manage-helper.type';\n\nexport type TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel> = {\n tableModel?: ModelDescriptor<TableModel>;\n addModel?: ModelDescriptor<AddModel>;\n editModel?: ModelDescriptor<EditModel>;\n};\n\nexport class TableviewDescriptorInst<\n TableviewModel,\n Sorts = keyof TableviewModel,\n Filters = keyof TableviewModel,\n ParentEditorModel = undefined,\n TableModel = TableviewModel,\n AddModel = TableviewModel,\n EditModel = TableviewModel,\n FieldsManageModel = TableviewDescriptorFieldsManageMultiType<TableviewModel, AddModel, EditModel>\n>\n implements\n ITableviewDescriptor<TableviewModel, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>,\n IColumnsManageInterface<TableModel, Sorts, Filters>,\n IFieldsManage<FieldsManageModel, ParentEditorModel>\n{\n private readonly _model: ModelDescriptor<TableviewModel>;\n\n protected _table: TableDescriptorInst<TableModel, Sorts, Filters>;\n protected _detailsEditor: EditorDescriptorInst<TableviewModel, ParentEditorModel>;\n protected _addEditor: EditorDescriptorInst<AddModel, ParentEditorModel>;\n protected _editEditor: EditorDescriptorInst<EditModel, ParentEditorModel>;\n\n protected _isLocalized = false;\n\n public constructor(model: ModelDescriptor<TableviewModel>, opts?: TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel>) {\n this._model = model;\n this._table = new TableDescriptorInst<TableModel, Sorts, Filters>(opts?.tableModel ?? (model as unknown as ModelDescriptor<TableModel>));\n this._table.withTitle(`${this._model.i18nBaseKey}.name`);\n this._detailsEditor = new EditorDescriptorInst<TableviewModel, ParentEditorModel>(model, TableviewEditorTypeEnum.Details);\n this._detailsEditor.withDisabled();\n this._addEditor = new EditorDescriptorInst<AddModel, ParentEditorModel>(opts?.addModel ?? (model as unknown as ModelDescriptor<AddModel>), TableviewEditorTypeEnum.Add);\n this._editEditor = new EditorDescriptorInst<EditModel, ParentEditorModel>(\n opts?.editModel ?? (model as unknown as ModelDescriptor<EditModel>),\n TableviewEditorTypeEnum.Edit\n );\n }\n\n public get table() {\n return this._table;\n }\n\n public get detailsEditor() {\n return this._detailsEditor;\n }\n\n public get addEditor() {\n return this._addEditor;\n }\n\n public get editEditor() {\n return this._editEditor;\n }\n\n public get model() {\n return this._model;\n }\n\n public isLocalized() {\n return this._isLocalized;\n }\n\n public withTableDescriptor(descriptor: TableDescriptorInst<TableModel, Sorts, Filters>): this {\n this._table = descriptor;\n return this;\n }\n\n public withEditorDescriptors(descriptor: EditorDescriptorInst<TableviewModel, ParentEditorModel>): this {\n this._detailsEditor = descriptor;\n this._editEditor = descriptor as unknown as EditorDescriptorInst<EditModel, ParentEditorModel>;\n this._addEditor = descriptor as unknown as EditorDescriptorInst<AddModel, ParentEditorModel>;\n return this;\n }\n\n public withDetailsDescriptor(descriptor: EditorDescriptorInst<TableviewModel, ParentEditorModel>): this {\n this._detailsEditor = descriptor;\n return this;\n }\n\n public withAddDescriptor(descriptor: EditorDescriptorInst<AddModel, ParentEditorModel>): this {\n this._addEditor = descriptor;\n return this;\n }\n\n public withEditDescriptor(descriptor: EditorDescriptorInst<EditModel, ParentEditorModel>): this {\n this._editEditor = descriptor;\n return this;\n }\n\n /**\n * creates new copy of editor descriptor and makes it disabled\n * usable in combination with this::withEditorDescriptors, where detailsDescriptor is made non-disabled\n * @param type which editor type to set to disabled\n */\n public withDisabledEditorDescriptor(type = TableviewEditorTypeEnum.Details): this {\n if (type === TableviewEditorTypeEnum.Edit) {\n this._editEditor = this._editEditor.copy().withDisabled();\n } else if (type === TableviewEditorTypeEnum.Details) {\n this._detailsEditor = this._detailsEditor.copy().withDisabled();\n } else if (type === TableviewEditorTypeEnum.Add) {\n this._addEditor = this._addEditor.copy().withDisabled();\n }\n return this;\n }\n\n public withValidation<Value = TableviewModel>(\n name: string,\n expression: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType<keyof FieldsManageModel>\n ): this {\n return this.withValidationUnsafe(name, expression, message, opts as FieldValidationDescriptorOptsType);\n }\n\n public withValidationUnsafe<Value = TableviewModel>(\n name: string,\n expression: FormValidator<Value, ParentEditorModel>,\n message?: FormValidationMessage<Value, ParentEditorModel>,\n opts?: FieldValidationDescriptorOptsType\n ): this {\n this._detailsEditor.withValidationUnsafe<Value>(name, expression, message, opts);\n this._addEditor.withValidationUnsafe<Value>(name, expression, message, opts);\n this._editEditor.withValidationUnsafe<Value>(name, expression, message, opts);\n return this;\n }\n\n public getColumn<Property extends keyof TableModel, ColumnModel = NonNullable<TableModel[Property]>, ColumnValue = TableModel[Property]>(property: Property) {\n return this._table.getColumn<Property, ColumnModel, ColumnValue>(property);\n }\n\n public getColumnUnsafe<ColumnModel = any, ColumnValue = ColumnModel>(property: string) {\n return this._table.getColumnUnsafe<ColumnModel, ColumnValue>(property);\n }\n\n public removeColumn(property: keyof TableModel): void {\n this._table.removeColumn(property);\n }\n\n public removeColumnUnsafe(property: string): void {\n this._table.removeColumnUnsafe(property);\n }\n\n public withColumn<ColumnModel, ColumnValue = ColumnModel>(column: ColumnDescriptor<ColumnModel, TableModel, ColumnValue>): this {\n this._table.withColumn<ColumnModel, ColumnValue>(column);\n return this;\n }\n\n public addColumn<Property extends keyof TableModel>(property: Property): ColumnDescriptor<NonNullable<TableModel[Property]>, TableModel, TableModel[Property]> {\n return this._table.addColumn(property);\n }\n\n public addColumnEnum<PropertyKey extends keyof TableModel, Enum extends NonNullable<TableModel[PropertyKey]>>(property: PropertyKey, enumDesc: EnumDescriptor<Enum>) {\n return this._table.addColumnEnum(property, enumDesc);\n }\n\n public addColumnUnsafe<ColumnModel = any>(property: string): ColumnDescriptor<ColumnModel, TableModel> {\n return this._table.addColumnUnsafe(property);\n }\n\n public withColumns(...properties: (keyof TableModel)[]): this {\n this._table.withColumns(...properties);\n return this;\n }\n\n public getSort(property: Sorts) {\n return this._table.getSort(property);\n }\n\n public getSortUnsafe(property: string) {\n return this._table.getSortUnsafe(property);\n }\n\n public removeSort(property: Sorts) {\n this._table.removeSort(property);\n }\n\n public removeSortUnsafe(property: string) {\n this._table.removeSortUnsafe(property);\n }\n\n public addSort(property: Sorts, isDefault = false, ascending?: boolean) {\n return this._table.addSort(property, isDefault, ascending);\n }\n\n public addSortUnsafe(property: string, isDefault = false, ascending?: boolean) {\n return this._table.addSortUnsafe(property, isDefault, ascending);\n }\n\n public withSort(property: Sorts, isDefault = false, ascending?: boolean): this {\n this._table.withSort(property, isDefault, ascending);\n return this;\n }\n\n public withSortUnsafe(property: string, isDefault = false, ascending?: boolean): this {\n this._table.withSortUnsafe(property, isDefault, ascending);\n return this;\n }\n\n public withDefaultSort(property: Sorts, ascending?: boolean, enabled?: boolean): this {\n this._table.withDefaultSort(property, ascending, enabled);\n return this;\n }\n\n public withDefaultSortUnsafe(property: string, ascending?: boolean, enabled?: boolean): this {\n this._table.withDefaultSortUnsafe(property, ascending, enabled);\n return this;\n }\n\n public withSorts(...properties: Sorts[]): this {\n this._table.withSorts(...properties);\n return this;\n }\n\n public withSortsUnsafe(...properties: string[]): this {\n this._table.withSortsUnsafe(...properties);\n return this;\n }\n\n public withDefaultSorts(...properties: Sorts[]): this {\n this._table.withDefaultSorts(...properties);\n return this;\n }\n\n public withoutDefaultSorts(): this {\n this._table.withoutDefaultSorts();\n return this;\n }\n\n public getFilter<FilterModel = Filters extends keyof TableModel ? NonNullable<TableModel[Filters]> : any>(property: Filters) {\n return this._table.getFilter<FilterModel>(property);\n }\n\n public getFilterUnsafe<FilterModel = any>(property: string) {\n return this._table.getFilterUnsafe<FilterModel>(property);\n }\n\n public removeFilter(property: Filters) {\n this._table.removeFilter(property);\n }\n\n public removeFilterUnsafe(property: string) {\n this._table.removeFilterUnsafe(property);\n }\n\n public addFilter<FilterModel = Filters extends keyof TableModel ? TableModel[Filters] : never>(property: Filters) {\n return this._table.addFilter<FilterModel>(property);\n }\n\n public addFilterUnsafe<FilterModel>(property: string) {\n return this._table.addFilterUnsafe<FilterModel>(property);\n }\n\n public addFilterLookup<FilterModel = Filters extends keyof TableModel ? NonNullable<TableModel[Filters]> : never, Service = undefined>(\n property: Filters,\n provider?: ILookupDataProvider<FilterModel, Service, any, any>,\n optionsValueProperty?: keyof FilterModel\n ) {\n return this._table.addFilterLookup<FilterModel, Service>(property, provider, optionsValueProperty);\n }\n\n public addFilterLookupUnsafe<FilterModel, Service = undefined>(\n property: string,\n provider?: ILookupDataProvider<FilterModel, Service, any, any>,\n optionsValueProperty?: string\n ) {\n return this._table.addFilterLookupUnsafe<FilterModel, Service>(property, provider, optionsValueProperty);\n }\n\n public addFilterLookupEnum<Enum>(property: Filters, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n return this._table.addFilterLookupEnum<Enum>(property, enumDesc, options);\n }\n\n public addFilterLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n return this._table.addFilterLookupEnumUnsafe<Enum>(property, enumDesc, options);\n }\n\n public addFilterFromColumn<Property extends keyof TableModel, FilterModel = NonNullable<TableModel[Property]>>(\n property: Extract<Filters, Property>,\n displayType?: FilterDisplayTypeEnum,\n forceSimple = false\n ) {\n return this._table.addFilterFromColumn<Property, FilterModel>(property, displayType, forceSimple);\n }\n\n public withFiltersFromColumns(...properties: Extract<Filters, keyof TableModel>[]): this {\n this._table.withFiltersFromColumns(...properties);\n return this;\n }\n\n public withFiltersFromColumnsUnsafe(...properties: string[]): this {\n this._table.withFiltersFromColumnsUnsafe(...properties);\n return this;\n }\n\n public addFilterFromColumnUnsafe(property: string, displayType?: FilterDisplayTypeEnum, forceSimple = false) {\n return this._table.addFilterFromColumnUnsafe(property, displayType, forceSimple);\n }\n\n public withFilter<FilterModel>(property: Filters, filter: FilterDescriptor<FilterModel, TableModel>): this {\n this._table.withFilter<FilterModel>(property, filter);\n return this;\n }\n\n public withFilterUnsafe<FilterModel>(filter: FilterDescriptor<FilterModel, TableModel>): this {\n this._table.withFilterUnsafe<FilterModel>(filter);\n return this;\n }\n\n public removeField(property: keyof FieldsManageModel): void {\n this.removeFieldUnsafe(property as string);\n }\n\n public removeFieldUnsafe(property: string): void {\n this._editEditor.removeFieldUnsafe(property);\n this._addEditor.removeFieldUnsafe(property);\n this._detailsEditor.removeFieldUnsafe(property);\n }\n\n public addFieldDescriptor<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, FieldsManageModel, FieldValue, ParentEditorModel>): this {\n this._detailsEditor.addFieldDescriptor(field as unknown as AFieldDescriptor<any, TableviewModel, FieldValue, ParentEditorModel>);\n this._addEditor.addFieldDescriptor(field as unknown as AFieldDescriptor<any, AddModel, FieldValue, ParentEditorModel>);\n this._editEditor.addFieldDescriptor(field as unknown as AFieldDescriptor<any, EditModel, FieldValue, ParentEditorModel>);\n return this;\n }\n\n public addField<Property extends keyof FieldsManageModel, FieldModel = NonNullable<FieldsManageModel[Property]>, FieldValue = FieldsManageModel[Property]>(property: Property) {\n return this.addFieldUnsafe<FieldModel, FieldValue>(property as string);\n }\n\n public addFieldUnsafe<FieldModel = FieldInputDescriptorType, FieldValue = FieldModel>(property: string) {\n const field = this._detailsEditor.addFieldUnsafe<FieldModel, FieldValue>(property);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldInputDescriptor<FieldsManageModel, FieldModel, FieldValue, ParentEditorModel>;\n }\n\n public withFields(...properties: (keyof FieldsManageModel)[]): this {\n properties.forEach(p => this.addField(p));\n return this;\n }\n\n public addFieldAction(actionName: string): FieldActionDescriptor<FieldsManageModel, ParentEditorModel> {\n const field = this._detailsEditor.addFieldAction(actionName);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldActionDescriptor<FieldsManageModel, ParentEditorModel>;\n }\n\n private addFieldToEditAndAdd<FieldModel, FieldValue = FieldModel>(field: AFieldDescriptor<FieldModel, any, FieldValue, ParentEditorModel>) {\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n }\n\n /**\n * Adds lookup field.\n *\n * @param {Property} property - The property key of the editor.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam Property - The property key of the EditorModel.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, FieldsManageModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookup<\n Property extends keyof FieldsManageModel,\n Service = undefined,\n LookupModel extends NonNullable<FieldsManageModel[Property]> = NonNullable<FieldsManageModel[Property]>,\n FieldValue = FieldsManageModel[Property]\n >(property: Property, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n return this.addFieldLookupUnsafe<LookupModel, Service, FieldValue>(property as string, opts);\n }\n\n /**\n * [UNSAFE] Adds lookup field.\n * This function is UNSAFE because property is not type-checked.\n *\n * @param {string} property Model property name.\n * @param {FieldsManageAddFieldLookupOpts<LookupModel, Service>} opts - Optional parameters configuring type and/or service provider.\n * @typeparam LookupModel - The field model type, defaults to the non-nullable type of the editor's property.\n * @typeparam Service - Service used for data provider.\n * @typeparam FieldValue - The value type of field on editor.\n *\n * @returns {FieldLookupDescriptor<LookupModel, EditorModel, Service, FieldValue>} - The field lookup descriptor.\n */\n public addFieldLookupUnsafe<LookupModel, Service = undefined, FieldValue = LookupModel>(property: string, opts?: FieldsManageAddFieldLookupOpts<LookupModel, Service>) {\n const field = this._detailsEditor.addFieldLookupUnsafe<LookupModel, Service, FieldValue>(property, opts);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldLookupDescriptor<LookupModel, FieldsManageModel, Service, FieldValue, ParentEditorModel>;\n }\n\n public addFieldLookupEnum<Property extends keyof FieldsManageModel, Enum extends NonNullable<FieldsManageModel[Property]>>(\n property: Property,\n enumDesc: EnumDescriptor<Enum>,\n options?: Array<Enum>\n ) {\n return this.addFieldLookupEnumUnsafe<Enum>(property as string, enumDesc, options);\n }\n\n public addFieldLookupEnumUnsafe<Enum = EnumConstantType>(property: string, enumDesc: EnumDescriptor<Enum>, options?: Array<Enum>) {\n const field = this._detailsEditor.addFieldLookupEnumUnsafe<Enum>(property, enumDesc, options);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldLookupEnumDescriptor<Enum, FieldsManageModel, ParentEditorModel>;\n }\n\n public addFieldManyEditor<Property extends keyof FieldsManageModel, FieldModel = ArrayItemType<FieldsManageModel[Property]>, FieldValue = FieldsManageModel[Property]>(\n property: Property,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, FieldsManageModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ) {\n return this.addFieldManyEditorUnsafe<FieldModel, FieldValue>(property as string, tableviewDescriptor);\n }\n\n public addFieldManyEditorUnsafe<FieldModel, FieldValue = FieldModel[]>(\n property: string,\n tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, FieldsManageModel, FieldModel, FieldModel, FieldModel, FieldModel>\n ) {\n const field = this._detailsEditor.addFieldManyEditorUnsafe<FieldModel, FieldValue>(\n property,\n // cast is needed, because the parent model of TableviewDescriptorInst is expected to be TableviewModel, but it cannot be in case there are different types across details, add or edit\n tableviewDescriptor as TableviewDescriptorInst<FieldModel, any, any, any, FieldModel, FieldModel, FieldModel, FieldModel>\n );\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldManyEditorDescriptor<FieldModel, FieldsManageModel, FieldValue, ParentEditorModel>;\n }\n\n public addFieldManyToManyEditor<\n Property extends keyof FieldsManageModel,\n Service,\n FieldModel = ArrayItemType<FieldsManageModel[Property]>,\n FieldValue = FieldsManageModel[Property]\n >(\n property: Property,\n mainTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupDataProvider: ITableDataProvider<FieldModel, Service>\n ) {\n return this.addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue>(property as string, mainTableDescriptor, lookupTableDescriptor, lookupDataProvider);\n }\n\n public addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue = FieldModel[]>(\n property: string,\n mainTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupTableDescriptor: TableDescriptorInst<FieldModel>,\n lookupDataProvider: ITableDataProvider<FieldModel, Service>\n ) {\n const field = this._detailsEditor.addFieldManyToManyEditorUnsafe<FieldModel, Service, FieldValue>(property, mainTableDescriptor, lookupTableDescriptor, lookupDataProvider);\n this.addFieldToEditAndAdd(field);\n return field as unknown as FieldManyToManyEditorDescriptor<FieldModel, FieldsManageModel, Service, FieldValue, ParentEditorModel>;\n }\n\n public withTabGroup(name: string, title?: string): this {\n this._detailsEditor.addTabGroup(name, title);\n this._addEditor.addTabGroup(name, title);\n this._editEditor.addTabGroup(name, title);\n return this;\n }\n\n public withFieldGroup(name: string, title?: string): this {\n this._detailsEditor.addFieldGroup(name, title);\n this._addEditor.addFieldGroup(name, title);\n this._editEditor.addFieldGroup(name, title);\n return this;\n }\n\n public copy(): TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel, FieldsManageModel> {\n const tableview = new TableviewDescriptorInst<TableviewModel, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel, FieldsManageModel>(this._model.copy());\n tableview._table = this._table.copy();\n tableview._detailsEditor = this._detailsEditor.copy();\n tableview._addEditor = this._addEditor.copy();\n tableview._editEditor = this._editEditor.copy();\n tableview._isLocalized = this._isLocalized;\n return tableview;\n }\n\n public localized<Property extends keyof TableviewModel, LocalizationModel = ArrayItemType<TableviewModel[Property]>>(\n property: Property,\n model: ModelDescriptor<LocalizationModel>,\n localeProperty: keyof LocalizationModel\n ): this {\n return this.localizedUnsafe(property as string, model, localeProperty as string);\n }\n\n public localizedUnsafe<LocalizationModel>(property: string, model: ModelDescriptor<LocalizationModel>, localeProperty: string): this {\n this._isLocalized = true;\n this._table.withLocalizationLocaleProperty(localeProperty as string);\n this.detailsEditor.localizedUnsafe(property, model, localeProperty);\n this.addEditor.localizedUnsafe(property, model, localeProperty);\n this.editEditor.localizedUnsafe(property, model, localeProperty);\n\n return this;\n }\n}\n\nexport class TableviewDynamicDescriptorInt extends TableviewDescriptorInst<any> {\n protected override _table: TableDynamicDescriptorInst;\n\n public constructor(model: ModelDescriptor<any>) {\n super(model);\n this._table = new TableDynamicDescriptorInst(this.model);\n }\n\n public override get table() {\n return this._table;\n }\n\n /**\n * sets custom table descriptor\n * @param descriptor\n */\n public override withTableDescriptor(descriptor: TableDynamicDescriptorInst): this {\n this._table = descriptor;\n return this;\n }\n\n /**\n * sets visibility hidden state to column with given property\n * equals to be removing in auto and base tableview descriptor\n * * @param property column's property\n */\n public override removeColumn(property: string): this {\n this._table.removeColumn(property);\n return this;\n }\n\n public withEntityForTranslations(i18nBaseKey: string): this {\n this._table.model.withI18nBase(i18nBaseKey);\n this._detailsEditor.model.withI18nBase(i18nBaseKey);\n return this;\n }\n\n /**\n * creates deep copy of tableview object and its children\n */\n public override copy(): TableviewDynamicDescriptorInt {\n const descriptor = new TableviewDynamicDescriptorInt(this.model.copy());\n descriptor._table = this._table.copy();\n return descriptor;\n }\n}\n","import {ModelDescriptor, ModelDescriptorCreateOpts, TypeDescriptor, model} from '@mediusinc/mng-commons/model';\n\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {TableviewDescriptorFieldsManageMultiType} from '../models/tableview-descriptor-fields-manage-helper.type';\nimport {TableviewDescriptorInst, TableviewDescriptorInstConstructorOpts, TableviewDynamicDescriptorInt} from './tableview.descriptor';\n\ntype TableviewDescriptorCreateSortsFiltersParentOptsType<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined> = {\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Filters>;\n parentEditorType?:\n | TypeDescriptor<ParentEditorModel>\n | ModelDescriptor<ParentEditorModel>\n | EditorDescriptorInst<ParentEditorModel, any>\n | TableviewDescriptorInst<ParentEditorModel, any, any, any, any, ParentEditorModel, ParentEditorModel, ParentEditorModel>;\n};\n\nexport type TableviewDescriptorCreateOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined\n> = TableviewDescriptorCreateSortsFiltersParentOptsType<Model, Sorts, Filters, ParentEditorModel>;\n\nexport type TableviewDescriptorCreateWithModelDescriptorOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined\n> = TableviewDescriptorCreateOptsType<Model, Sorts, Filters, ParentEditorModel> & ModelDescriptorCreateOpts<Model>;\n\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(): TableviewDescriptorInst<\n Model,\n Sorts,\n Filters,\n ParentEditorModel,\n TableModel,\n Model,\n Model,\n Model\n>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n opts: TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n opts: TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n model: ModelDescriptor<Model>,\n opts?: TableviewDescriptorCreateOptsType<Model, Sorts, Filters, ParentEditorModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>;\nexport function tableviewDescriptor<Model, Sorts = keyof Model, Filters = keyof Model, ParentEditorModel = undefined, TableModel = Model>(\n modelOrOpts?: ModelDescriptor<Model> | TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: TableviewDescriptorCreateWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel>\n) {\n if (modelOrOpts == null) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>(model<Model>());\n } else if (modelOrOpts instanceof ModelDescriptor) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>(modelOrOpts);\n } else {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, Model, Model, Model>(model<Model>(modelOrOpts));\n }\n}\n\nexport type TableviewDescriptorMultiModelCreateOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n> = TableviewDescriptorCreateSortsFiltersParentOptsType<Model, Sorts, Filters, ParentEditorModel> & TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel>;\n\nexport type TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n> = TableviewDescriptorMultiModelCreateOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel> & ModelDescriptorCreateOpts<Model>;\n\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel, TableviewDescriptorFieldsManageMultiType<Model, AddModel, EditModel>>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n opts: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n opts: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n model: ModelDescriptor<Model>,\n opts?: TableviewDescriptorMultiModelCreateOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n): TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>;\nexport function tableviewDescriptorMultiModel<\n Model,\n Sorts = keyof Model,\n Filters = keyof Model,\n ParentEditorModel = undefined,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model\n>(\n modelOrOpts?:\n | ModelDescriptor<Model>\n | TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n opts?: TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>\n) {\n if (modelOrOpts == null) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>(model<Model>());\n } else if (modelOrOpts instanceof ModelDescriptor) {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>(modelOrOpts);\n } else {\n return new TableviewDescriptorInst<Model, Sorts, Filters, ParentEditorModel, TableModel, AddModel, EditModel>(model<Model>(modelOrOpts));\n }\n}\n\nexport function tableviewDynamicDescriptor(\n modelOrOpts?: ModelDescriptor<any> | TableviewDescriptorCreateMultiModelWithModelDescriptorOptsType<any>\n): TableviewDynamicDescriptorInt {\n return modelOrOpts instanceof ModelDescriptor\n ? new TableviewDynamicDescriptorInt(modelOrOpts)\n : new TableviewDynamicDescriptorInt(new ModelDescriptor<any>(modelOrOpts?.id as string, modelOrOpts?.title as string, modelOrOpts?.i18nBase as string));\n}\n","import {TranslateService} from '@ngx-translate/core';\n\nimport {GetterPipe} from '@mediusinc/mng-commons/core';\n\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\n\nexport function convertDataToStringWithDelimiter(data: any[], delimiter: string, descriptor: TableviewDescriptorInst<any, any, any>, translate: TranslateService): string {\n const replaceNullValue = (key: any, value: any) => (value === null ? '' : value);\n const getterPipe = new GetterPipe();\n return [\n descriptor.table.columns.map(col => translate.instant(descriptor.model.i18nBaseKey + '.properties.' + col.property)).join(delimiter),\n ...data.map((row: any) =>\n descriptor.table.columns\n .map(column => {\n if (typeof column.getter === 'function') {\n return JSON.stringify(getterPipe.transform(row[column.property], column.getter, row), replaceNullValue);\n } else {\n return JSON.stringify(row[column.property], replaceNullValue);\n }\n })\n .join(delimiter)\n )\n ].join('\\r\\n');\n}\n\nexport function saveFileAs(blob: Blob, filename: string) {\n const blobUrl = URL.createObjectURL(blob);\n const link = document.createElement('a');\n\n link.style.display = 'none';\n link.target = '_blank';\n link.href = blobUrl;\n link.download = filename;\n\n document.body.appendChild(link);\n\n link.dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window\n })\n );\n\n document.body.removeChild(link);\n}\n","import {Injector, inject} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {of, tap} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {CommonsInternalError, ServiceClassType, StyleSizeEnum, copyDataListParams} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableDescriptorInst} from '@mediusinc/mng-commons/table/api';\n\nimport {ActionProviderType, actionGetProviderCfgObj} from '../../action/descriptors/action-descriptor.factory';\nimport {ActionEditorProviderType, actionEditorGetProviderCfgObj} from '../../action/descriptors/action-editor-descriptor.factory';\nimport {ActionEditorDescriptorInst, actionEditorCancel} from '../../action/descriptors/action-editor.descriptor';\nimport {actionLink} from '../../action/descriptors/action-link-descriptor.factory';\nimport {ActionLinkDescriptorInst} from '../../action/descriptors/action-link.descriptor';\nimport {ActionDescriptorInst} from '../../action/descriptors/action.descriptor';\nimport {ActionPositionEnum} from '../../action/models/action.type';\nimport {TableviewActionDefaultCategories} from '../../action/models/tableview-action-default-categories.model';\nimport {DataProviderExecutor} from '../../action/services/data-provider-executor.service';\nimport {DATA_LANGUAGE_DROPDOWN_COMPONENT_IT} from '../../action/services/tokens/data-language-dropdown.token';\nimport {IEditorDataProvider} from '../../editor/data-providers/editor.data-provider';\nimport {EditorDescriptorInst} from '../../editor/descriptors/editor.descriptor';\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\nimport {TableviewRouteData} from '../models/tableview-route.model';\nimport {convertDataToStringWithDelimiter, saveFileAs} from './files-export';\n\nexport enum TableviewDefaultActionsEnum {\n Details,\n Add,\n Edit,\n EditOnDetails,\n Delete,\n DeleteOnDetails,\n Refresh,\n Export,\n ExportJson,\n ExportCsv,\n LocalizationLanguageSelect\n}\n\nconst tableviewDefaultActions = [\n TableviewDefaultActionsEnum.Details,\n TableviewDefaultActionsEnum.Add,\n TableviewDefaultActionsEnum.Edit,\n TableviewDefaultActionsEnum.EditOnDetails,\n TableviewDefaultActionsEnum.Delete,\n TableviewDefaultActionsEnum.DeleteOnDetails,\n TableviewDefaultActionsEnum.Refresh,\n TableviewDefaultActionsEnum.Export,\n TableviewDefaultActionsEnum.ExportJson,\n TableviewDefaultActionsEnum.ExportCsv,\n TableviewDefaultActionsEnum.LocalizationLanguageSelect\n];\n\nexport function tableviewGetDefaultActions() {\n return [...tableviewDefaultActions];\n}\n\nexport function tableviewCreateDefaultActions(\n tableview: TableviewDescriptorInst<any, any, any>,\n defaultActions?: TableviewDefaultActionsEnum[],\n defaultActionsOverrides?: Record<number, ActionDescriptorInst<any>>,\n injector?: Injector | null\n): Array<ActionDescriptorInst<any>> {\n return (defaultActions ?? tableviewGetDefaultActions())\n .map(t => tableviewCreateDefaultAction(t, tableview, defaultActions, defaultActionsOverrides, injector))\n .filter(e => e != null) as Array<ActionDescriptorInst<any>>;\n}\n\nexport function tableviewCreateDefaultAction(\n type: TableviewDefaultActionsEnum,\n tableview: TableviewDescriptorInst<any, any, any>,\n defaultActions?: TableviewDefaultActionsEnum[],\n defaultActionsOverrides?: Record<number, ActionDescriptorInst<any>>,\n injector?: Injector | null\n): ActionDescriptorInst<any> | null {\n if (defaultActionsOverrides != null && defaultActionsOverrides[type] !== undefined) {\n return defaultActionsOverrides[type];\n }\n\n switch (type) {\n // table row actions\n case TableviewDefaultActionsEnum.Details:\n return tableviewActionDetailsOnTable(tableview.model, tableview.detailsEditor, {injector});\n case TableviewDefaultActionsEnum.Edit:\n return tableviewActionEditOnTable(tableview.model, tableview.editEditor, {table: tableview.table, injector});\n case TableviewDefaultActionsEnum.Delete:\n return tableviewActionDeleteOnTable(tableview.model, {table: tableview.table, injector});\n // table toolbar actions\n case TableviewDefaultActionsEnum.Add:\n return tableviewActionAddOnTable(tableview.model, tableview.addEditor, {injector});\n case TableviewDefaultActionsEnum.LocalizationLanguageSelect:\n return tableviewActionLocalizationLangSelectOnTable(tableview);\n case TableviewDefaultActionsEnum.Refresh:\n return tableviewActionRefreshOnTable(tableview.model);\n case TableviewDefaultActionsEnum.Export:\n return defaultActions == null || defaultActions.includes(TableviewDefaultActionsEnum.ExportJson) || defaultActions.includes(TableviewDefaultActionsEnum.ExportCsv)\n ? tableviewActionExportOnTable(tableview, {injector: injector, defaultActions: defaultActions})\n : null;\n //details actions\n case TableviewDefaultActionsEnum.EditOnDetails:\n return defaultActions == null || defaultActions.includes(TableviewDefaultActionsEnum.Edit) ? tableviewActionEditOnDetails(tableview.model, {injector}) : null;\n case TableviewDefaultActionsEnum.DeleteOnDetails:\n return defaultActions == null || defaultActions.includes(TableviewDefaultActionsEnum.Delete) ? tableviewActionDeleteOnDetails(tableview.model, {injector}) : null;\n // subactions\n case TableviewDefaultActionsEnum.ExportJson:\n case TableviewDefaultActionsEnum.ExportCsv:\n return null;\n default:\n throw new CommonsInternalError(`Tableview default action of type ${type} not supported`);\n }\n}\n\nfunction getInjector(injector?: Injector | null): Injector | null {\n return injector === undefined ? inject(Injector) : injector;\n}\n\nfunction getRouteData(injector?: Injector | null) {\n return getInjector(injector)?.get(ActivatedRoute)?.snapshot.data as TableviewRouteData | undefined;\n}\n\nexport const tableviewActionEditorDetailsActionName = 'details';\nexport const tableviewActionEditorDetailsRoute = ':itemId';\n\ntype TableviewActionDetailsOnTableOptsType<Model, TableModel, Service> = {\n table?: TableDescriptorInst<TableModel>;\n serviceProvider?: ActionEditorProviderType<Model, Service>;\n injector?: Injector | null;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n};\n\nexport function tableviewActionDetailsOnTable<Model, TableModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n descriptor: EditorDescriptorInst<Model>,\n opts?: TableviewActionDetailsOnTableOptsType<Model, TableModel, Service>\n): ActionEditorDescriptorInst<Model, Service, Model, TableModel, undefined, TableModel> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasDetails) {\n const action = new ActionEditorDescriptorInst<Model, Service, Model, TableModel, undefined, TableModel>(descriptor, tableviewActionEditorDetailsActionName, {\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts?.serviceProvider) : {}),\n isTableviewMainEditor: true,\n model: model\n });\n action.withPosition(opts?.position ?? ActionPositionEnum.RowClick);\n action.withRouteTrigger(tableviewActionEditorDetailsRoute);\n action.withEditorActions([actionEditorCancel(action)]);\n action.withTableviewCategory(TableviewActionDefaultCategories.DETAILS);\n return action;\n }\n return null;\n}\n\nexport const tableviewActionEditorAddActionName = 'add';\nexport const tableviewActionEditorAddRoute = 'add';\n\nexport type ActionEditorProviderAddType<Model, AddModel, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service, any, AddModel, any>;\n\ntype TableviewActionAddOnTableOptsType<Model, AddModel, Service> = {\n serviceProvider?: ActionEditorProviderAddType<Model, AddModel, Service>;\n injector?: Injector | null;\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionAddOnTable<Model, AddModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n descriptor: EditorDescriptorInst<AddModel>,\n opts?: TableviewActionAddOnTableOptsType<Model, AddModel, Service>\n): ActionEditorDescriptorInst<Model, Service, AddModel, undefined, Model, undefined> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasAdd) {\n const action = new ActionEditorDescriptorInst<Model, Service, AddModel, undefined, Model, undefined>(descriptor, tableviewActionEditorAddActionName, {\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {}),\n isTableviewMainEditor: true,\n model: model\n });\n action\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft)\n .withRouteTrigger(tableviewActionEditorAddRoute)\n .withButtonOpts({\n icon: 'pi pi-plus'\n });\n action.withTableviewCategory(TableviewActionDefaultCategories.ADD);\n action.withUnsavedChangesConfirmation();\n return action;\n }\n return null;\n}\n\nexport const tableviewActionEditorEditActionName = 'edit';\nexport const tableviewActionEditorEditRoute = ':itemId/edit';\n\nexport type ActionEditorProviderEditType<Model, EditModel, Service> = ServiceClassType<Service> | IEditorDataProvider<Model, Service, any, any, EditModel>;\n\ntype TableviewActionEditOnTableOptsType<Model, EditModel, TableModel, Service> = {\n table?: TableDescriptorInst<TableModel, any, any>;\n serviceProvider?: ActionEditorProviderEditType<Model, EditModel, Service>;\n injector?: Injector | null;\n position?: ActionPositionEnum.RowClick | ActionPositionEnum.RowInline;\n};\n\nexport function tableviewActionEditOnTable<Model, EditModel, TableModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n descriptor: EditorDescriptorInst<EditModel>,\n opts?: TableviewActionEditOnTableOptsType<Model, EditModel, TableModel, Service>\n): ActionEditorDescriptorInst<Model, Service, EditModel, TableModel, Model, TableModel> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasEdit) {\n const action = new ActionEditorDescriptorInst<Model, Service, EditModel, TableModel, Model, TableModel>(descriptor, tableviewActionEditorEditActionName, {\n ...(opts?.serviceProvider ? actionEditorGetProviderCfgObj(opts.serviceProvider) : {}),\n isTableviewMainEditor: true,\n model: model\n });\n action\n .withPosition(opts?.position ?? ActionPositionEnum.RowInline)\n .withButtonOpts({\n label: null,\n icon: 'pi pi-pencil',\n style: {\n size: StyleSizeEnum.Small\n }\n })\n .withRouteTrigger(tableviewActionEditorEditRoute)\n .withTableviewCategory(TableviewActionDefaultCategories.EDIT)\n .withUnsavedChangesConfirmation();\n return action;\n }\n return null;\n}\n\ntype TableviewActionEditOnDetailsOptsType = {\n injector?: Injector | null;\n position?: ActionPositionEnum.FooterLeft | ActionPositionEnum.FooterRight;\n};\n\nexport function tableviewActionEditOnDetails<Model>(model: ModelDescriptor<Model>, opts?: TableviewActionEditOnDetailsOptsType): ActionLinkDescriptorInst<Model> | null {\n const routeData = getRouteData(opts?.injector);\n if (routeData?.tableviewActions && !routeData.tableviewActions.hasEdit) {\n return null;\n }\n\n const linkAction = actionLink(tableviewActionEditorEditActionName, {model: model});\n linkAction\n .withTableviewCategory(TableviewActionDefaultCategories.EDIT)\n .withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS])\n .withPosition(opts?.position ?? ActionPositionEnum.FooterLeft)\n .withRouterLink('./edit')\n .withQueryParams({}, 'merge')\n .withButtonOpts({\n icon: 'pi pi-pencil',\n style: {\n severity: 'secondary'\n }\n });\n return linkAction;\n}\n\nexport const tableviewActionDeleteActionName = 'delete';\n\ntype TableviewActionDeleteOnTableOptsType<Model, TableModel, Service> = {\n injector?: Injector | null;\n table?: TableDescriptorInst<TableModel, any, any>;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n};\n\nexport function tableviewActionDeleteOnTable<Model, TableModel, Service = undefined>(\n model: ModelDescriptor<Model>,\n opts?: TableviewActionDeleteOnTableOptsType<Model, TableModel, Service>\n): ActionDescriptorInst<Model, Service, TableModel, Model, TableModel> | null {\n const routeData = getRouteData(opts?.injector);\n if (!routeData?.tableviewActions || routeData.tableviewActions.hasDelete) {\n const action = new ActionDescriptorInst<Model, Service, TableModel, Model, TableModel>(tableviewActionDeleteActionName, {\n ...(opts?.serviceProvider ? actionGetProviderCfgObj(opts.serviceProvider) : {}),\n model: model\n })\n .withButtonOpts({\n label: null,\n icon: 'pi pi-trash',\n style: {\n size: StyleSizeEnum.Small,\n severity: 'danger'\n }\n })\n .withPosition(opts?.position ?? ActionPositionEnum.RowInline)\n .withRunConfirmation()\n .withTableviewCategory(TableviewActionDefaultCategories.DELETE);\n return action;\n }\n return null;\n}\n\ntype TableviewActionDeleteOnDetailsOptsType<Model, Service> = {\n injector?: Injector | null;\n serviceProvider?: ActionProviderType<Model, Service>;\n position?: ActionPositionEnum.RowInline | ActionPositionEnum.RowClick;\n};\n\nexport function tableviewActionDeleteOnDetails<Model, Service = undefined>(\n model: ModelDescriptor<Model>,\n opts?: TableviewActionDeleteOnDetailsOptsType<Model, Service>\n): ActionDescriptorInst<Model, Service, Model, Model, Model> | null {\n const action = tableviewActionDeleteOnTable<Model, Model, Service>(model, opts) as unknown as ActionDescriptorInst<Model, Service, Model, Model, Model>;\n const dataProviderExecutor = getInjector(opts?.injector)?.get(DataProviderExecutor);\n if (action) {\n action\n .withTableviewCategory(TableviewActionDefaultCategories.DELETE)\n .withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS])\n .withPosition(ActionPositionEnum.FooterLeft)\n .withRunFunction(ctx =>\n dataProviderExecutor\n ? dataProviderExecutor.runDeleteOrFail(ctx).pipe(\n tap(() => {\n ctx.viewContainer?.reloadTable({});\n ctx.viewContainer?.closeEditor();\n })\n )\n : null\n )\n .withButtonOpts({\n ...action.button,\n label: undefined,\n style: {\n ...action.button?.style,\n size: StyleSizeEnum.Normal\n }\n });\n\n return action;\n }\n\n return null;\n}\n\ntype TableviewActionExportOnTableOptsType = {\n injector?: Injector | null;\n defaultActions?: TableviewDefaultActionsEnum[];\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionExportOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: TableviewActionExportOnTableOptsType\n): ActionDescriptorInst<Model, undefined, undefined, undefined> | null {\n const exportAction = new ActionDescriptorInst<Model, undefined, undefined, undefined>('export', {\n model: descriptor.model\n })\n .withButton(undefined, 'pi pi-download')\n .withSubactionsAsMenu();\n\n const subactions: ActionDescriptorInst<Model, undefined, undefined, undefined>[] = [];\n\n if (opts?.defaultActions == null || opts?.defaultActions.includes(TableviewDefaultActionsEnum.ExportJson)) subactions.push(tableviewActionExportJsonOnTable(descriptor, opts));\n if (opts?.defaultActions == null || opts?.defaultActions.includes(TableviewDefaultActionsEnum.ExportCsv)) subactions.push(tableviewActionExportCsvOnTable(descriptor, opts));\n\n exportAction.withSubactions(...subactions);\n exportAction.withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight);\n return exportAction;\n}\n\nexport function tableviewActionExportJsonOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: Omit<TableviewActionExportOnTableOptsType, 'defaultActions'>\n): ActionDescriptorInst<Model, undefined, undefined, undefined> {\n const dataProviderExecutor = getInjector(opts?.injector)?.get(DataProviderExecutor);\n return new ActionDescriptorInst<Model, undefined, undefined, undefined>('exportJson', {\n model: descriptor.model\n })\n .withRunFunction(ctx => {\n const params = ctx.parameters.dataListParams ? copyDataListParams(ctx.parameters.dataListParams) : {};\n params.offset = 0;\n params.limit = 500;\n ctx.parameters.dataListParams = params;\n return dataProviderExecutor\n ? dataProviderExecutor.runGetAllOrFail(ctx).pipe(\n map(res => {\n const blob = new Blob([JSON.stringify(res.data, undefined, 4)], {type: 'application/json;charset=utf-8'});\n const typeName = ctx.instance.action.model?.i18nBaseKey ?? '';\n saveFileAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.json`);\n return undefined;\n })\n )\n : ctx.parameters.item;\n })\n .withNotifications({runOnSuccess: false})\n .withButton(undefined, 'pi pi-code')\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight);\n}\n\nexport function tableviewActionExportCsvOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: Omit<TableviewActionExportOnTableOptsType, 'defaultActions'>\n): ActionDescriptorInst<Model, undefined, undefined, undefined> {\n const dataProviderExecutor = getInjector(opts?.injector)?.get(DataProviderExecutor);\n return new ActionDescriptorInst<Model, undefined, undefined, undefined>('exportCsv', {\n model: descriptor.model\n })\n .withRunFunction(ctx => {\n const params = ctx.parameters.dataListParams ? copyDataListParams(ctx.parameters.dataListParams) : {};\n params.offset = 0;\n params.limit = 500;\n ctx.parameters.dataListParams = params;\n return dataProviderExecutor\n ? dataProviderExecutor.runGetAllOrFail(ctx).pipe(\n map(res => {\n if (!res.data) {\n return undefined;\n }\n const blob = new Blob([convertDataToStringWithDelimiter(res.data, ',', descriptor, ctx.injector.get(TranslateService))], {\n type: 'text/csv;charset=utf-8'\n });\n const typeName = ctx.instance.action.model?.i18nBaseKey ?? '';\n saveFileAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.csv`);\n return undefined;\n })\n )\n : ctx.parameters.item;\n })\n .withNotifications({runOnSuccess: false})\n .withButton(undefined, 'pi pi-file')\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight);\n}\n\ntype TableviewActionRefreshOnTableOptsType = {\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionRefreshOnTable<Model>(\n descriptor: ModelDescriptor<Model>,\n opts?: TableviewActionRefreshOnTableOptsType\n): ActionDescriptorInst<Model, undefined, undefined, undefined, undefined> | null {\n const action = new ActionDescriptorInst<Model, undefined, undefined, undefined, undefined>('refresh', {\n model: descriptor\n })\n .withPosition(ActionPositionEnum.ToolbarRight)\n .withTableviewCategory(TableviewActionDefaultCategories.READ)\n .withNotifications({runOnSuccess: false})\n .withRunFunction(ctx => {\n ctx.viewContainer?.reloadTable({});\n return of(null);\n })\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarRight)\n .withButtonOpts({\n icon: 'pi pi-refresh',\n style: {\n severity: 'secondary'\n }\n });\n return action;\n}\n\ntype TableviewLocalizationLangSelectOnTableActionOptsType = {\n position?: ActionPositionEnum.ToolbarLeft | ActionPositionEnum.ToolbarRight;\n};\n\nexport function tableviewActionLocalizationLangSelectOnTable<Model>(\n descriptor: TableviewDescriptorInst<Model>,\n opts?: TableviewLocalizationLangSelectOnTableActionOptsType\n): ActionDescriptorInst<Model, undefined, undefined, undefined, undefined> | null {\n return descriptor.isLocalized()\n ? new ActionDescriptorInst<Model, undefined, undefined, undefined, undefined>('translator', {\n model: descriptor.model\n })\n .withPosition(opts?.position ?? ActionPositionEnum.ToolbarLeft)\n .withComponentFromDi(DATA_LANGUAGE_DROPDOWN_COMPONENT_IT)\n : null;\n}\n","import {Injector} from '@angular/core';\n\nimport {Observable} from 'rxjs';\n\nimport {\n ClassFunctionKeyParam1ObjKeyExtendsOfTargetType,\n ClassFunctionKeysWithParamAndReturnType,\n CommonsInternalError,\n IDataProvider,\n IdType,\n Nullable\n} from '@mediusinc/mng-commons/core';\n\nimport {ActionEditorDescriptorInst} from '../../action/descriptors/action-editor.descriptor';\nimport {ActionDescriptorInst} from '../../action/descriptors/action.descriptor';\nimport {ActionPositionEnum} from '../../action/models/action.type';\nimport {TableviewActionDefaultCategories} from '../../action/models/tableview-action-default-categories.model';\nimport {EditorDataProviderFetchMapToFnType} from '../../editor/data-providers/editor.data-provider';\nimport {TableviewDataProviderInst} from '../data-providers/tableview.data-provider';\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\nimport {TableviewInput} from '../models/tableview-input.model';\nimport {TableviewDefaultActionsEnum, tableviewCreateDefaultActions, tableviewGetDefaultActions} from './tableview-default-actions';\n\nexport type TvBuilderSetterParamsType<Descriptor, DataProvider> = {descriptor: Descriptor; dataProvider: DataProvider; injector: Injector};\nexport type TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ValidationInput, Descriptor, DataProvider> = (\n params: TvBuilderSetterParamsType<Descriptor, DataProvider>\n) => Nullable<\n | ActionDescriptorInst<ActionModel, ActionService, ActionInput, ActionResult, ValidationInput>\n | ActionEditorDescriptorInst<ActionModel, ActionService, any, ActionInput, ActionResult, ValidationInput>\n>;\nexport type TvBuilderDescriptorSetterFnType<Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => Descriptor;\nexport type TvBuilderDataProviderSetterFnType<Descriptor, DataProvider> = (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => DataProvider;\n\ntype DefaultAction = {\n type: TableviewDefaultActionsEnum;\n descriptor: ActionDescriptorInst<any> | null | undefined;\n};\n\n/**\n * The `TableviewBuilder` class is used to build a tableview configuration.\n * It allows you to set various options such as the descriptor, data provider,\n * default actions, and custom actions for the tableview.\n *\n * @typeparam Model - The main model type.\n * @typeparam Service - The API service type.\n * @typeparam Descriptor - The descriptor type.\n * @typeparam DataProvider - The data provider type.\n * @typeparam Sorts - The sort type representing available sort keys.\n * @typeparam Filters - The filter type representing available filter keys.\n */\nexport class TableviewInputBuilder<\n Model,\n Service,\n Descriptor extends TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>,\n DataProvider extends IDataProvider<Model, Service>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model,\n FieldsModel = Model\n> {\n private defaultActions: DefaultAction[] = tableviewGetDefaultActions().map(a => ({type: a, descriptor: undefined}));\n private readonly _customActions: ActionDescriptorInst<any>[] = [];\n\n constructor(\n private _descriptor: Descriptor,\n private _dataProvider: DataProvider,\n private readonly injector: Injector\n ) {}\n\n private prepareSetterParams(): TvBuilderSetterParamsType<Descriptor, DataProvider> {\n return {descriptor: this._descriptor, dataProvider: this._dataProvider, injector: this.injector};\n }\n\n /**\n * Sets a descriptor instead of the default one.\n *\n * @param {TvBuilderDescriptorSetterFnType<Descriptor, DataProvider>} fn - The function that returns the new descriptor. It should accept a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withDescriptor(fn: TvBuilderDescriptorSetterFnType<Descriptor, DataProvider>): this {\n this._descriptor = fn(this.prepareSetterParams());\n return this;\n }\n\n /**\n * Adjusts the descriptor using the provided adjust function.\n *\n * @param {(descriptor: Descriptor) => void} adjustFn - The function used to adjust the descriptor. It accepts a single parameter of type `Descriptor`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withAdjustDescriptor(adjustFn: (descriptor: Descriptor) => void): this {\n adjustFn(this._descriptor);\n return this;\n }\n\n /**\n * Sets the data provider for the TvBuilder instance\n *\n * @param {TvBuilderDataProviderSetterFnType<Descriptor, DataProvider>} fn - The function that returns the new data provider. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * * @returns {this} - Returns the current instance of the builder.\n */\n withDataProvider(fn: TvBuilderDataProviderSetterFnType<Descriptor, DataProvider>): this {\n this._dataProvider = fn(this.prepareSetterParams());\n return this;\n }\n\n /**\n * Adjusts the data provider using the provided adjust function.\n *\n * @param {(dataProvider: DataProvider) => void} adjustFn - The function used to adjust the data provider. It accepts a single parameter of type `DataProvider`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withAdjustDataProvider(adjustFn: (dataProvider: DataProvider) => void): this {\n adjustFn(this._dataProvider);\n return this;\n }\n\n /**\n * Adjusts the data provider and/or descriptor using the provided adjust function.\n *\n * @param {(params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => void} adjustFn - The function used to adjust the data provider. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @returns {this} - Returns the current instance of the builder.\n */\n withAdjust(adjustFn: (params: TvBuilderSetterParamsType<Descriptor, DataProvider>) => void): this {\n adjustFn(this.prepareSetterParams());\n return this;\n }\n\n /**\n * Associates a fetch function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the fetch API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} fnItemIdParamName The parameter name for itemId used as the key within the request object of fetch function on API service.\n */\n withDataServiceFetchFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<Model>>>(\n serviceFn: ServiceFn,\n itemIdParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withFetch((itemId, service) => service[serviceFn]({[itemIdParamName]: itemId}));\n }\n return this;\n }\n\n /**\n * Associates a create function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the create API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, Undefined<EditModel>>} serviceFnItemParamName The parameter name for item used as the key within the request object of create function on API service.\n * @param {EditorDataProviderFetchMapToFnType<Model, AddModel>} [mapFetchItem] Map function to transform model from fetch to form's add model.\n */\n withDataServiceCreateFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(\n serviceFn: ServiceFn,\n serviceFnItemParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, AddModel>,\n mapFetchItem?: EditorDataProviderFetchMapToFnType<Model, AddModel>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withCreate((item, service) => service[serviceFn]({[serviceFnItemParamName]: item}));\n\n if (mapFetchItem) {\n this._dataProvider.withMapFetchItemToCreateItem(mapFetchItem);\n }\n }\n return this;\n }\n\n /**\n * Associates an update function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the update API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, Undefined<EditModel>>} fnItemParamName The parameter name for item used as the key within the request object of update function on API service.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} [fnItemIdParamName] The parameter name for itemId used as the key within the request object of update function on API service.\n * @param {EditorDataProviderFetchMapToFnType<Model, EditModel>} [mapFetchItem] Map function to transform model from fetch to form' edit model.\n */\n withDataServiceUpdateFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(\n serviceFn: ServiceFn,\n fnItemParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, EditModel>,\n fnItemIdParamName?: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>,\n mapFetchItem?: EditorDataProviderFetchMapToFnType<Model, EditModel>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withUpdate((id, item, service) => {\n const params: any = {[fnItemParamName]: item};\n if (fnItemIdParamName) {\n params[fnItemIdParamName] = id;\n }\n return service[serviceFn](params);\n });\n\n if (mapFetchItem) {\n this._dataProvider.withMapFetchItemToUpdateItem(mapFetchItem);\n }\n }\n return this;\n }\n\n /**\n * Associates a delete function for a data provider API service with the specified parameters.\n *\n * @param {ServiceFn} serviceFn The function from the service class that performs the delete API call.\n * Must be a key of the service with a parameter and return an Observable.\n * @param {ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>} fnItemIdParamName The parameter name for itemId used as the key within the request object of delete function on API service.\n */\n withDataServiceDeleteFn<ServiceFn extends ClassFunctionKeysWithParamAndReturnType<Service, any, Observable<any>>>(\n serviceFn: ServiceFn,\n fnItemIdParamName: ClassFunctionKeyParam1ObjKeyExtendsOfTargetType<Service, ServiceFn, IdType>\n ): this {\n if (this._dataProvider instanceof TableviewDataProviderInst) {\n this._dataProvider.withDelete((itemId, service) => service[serviceFn]({[fnItemIdParamName]: itemId}));\n }\n return this;\n }\n\n /**\n * Removes all the default tableview actions.\n *\n * @returns {this} - Returns the current instance of the builder.\n */\n withNoDefaultActions(): this {\n this.defaultActions.forEach(a => (a.descriptor = null));\n return this;\n }\n\n /**\n * Adds the default actions specified in parameters.\n *\n * @param {TableviewDefaultActionsEnum[]} types - The default actions to add.\n * @returns {this} - Returns the current instance of the builder.\n */\n withDefaultActions(...types: TableviewDefaultActionsEnum[]): this {\n types.forEach(type => {\n const action = this.defaultActions.find(a => a.type === type);\n if (action?.descriptor === null) {\n action.descriptor = undefined;\n }\n });\n return this;\n }\n\n /**\n * Removes the default actions specified in parameters.\n *\n * @param {TableviewDefaultActionsEnum[]} types - The default actions to remove.\n * @returns {this} - Returns the current instance of the builder.\n */\n withoutDefaultActions(...types: TableviewDefaultActionsEnum[]): this {\n types.forEach(type => {\n const action = this.defaultActions.find(a => a.type === type);\n if (action) {\n action.descriptor = null;\n }\n });\n return this;\n }\n\n /**\n * Overrides the default action.\n *\n * @param {TableviewDefaultActionsEnum} type - The default actions to override.\n * @param {TvBuilderActionSetterFnType<Model, ActionService , ActionRunInput, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withDefaultActionOverride<ActionService = Service, ActionRunInput = Model, ActionRunResult = Model, ValidationInput = Model>(\n type: TableviewDefaultActionsEnum,\n fn: TvBuilderActionSetterFnType<Model, ActionService, ActionRunInput, ActionRunResult, ValidationInput, Descriptor, DataProvider>\n ): this {\n const action = this.defaultActions.find(a => a.type === type);\n if (action) {\n action.descriptor = fn(this.prepareSetterParams()) ?? null;\n }\n return this;\n }\n\n /**\n * Adds a custom action on table row or top (header or toolbar).\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnTable<ActionModel = Model, ActionService = Service, ActionInput extends TableModel | undefined = TableModel, ActionRunResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionRunResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.READ]);\n if (\n ![\n ActionPositionEnum.ToolbarLeft,\n ActionPositionEnum.ToolbarRight,\n ActionPositionEnum.TableHeader,\n ActionPositionEnum.RowInline,\n ActionPositionEnum.RowClick\n ].includes(action.position)\n ) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on table (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on details editor.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnDetailsEditor<ActionModel = Model, ActionService = Service, ActionInput extends Model = Model, ActionResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS]);\n if (![ActionPositionEnum.ToolbarLeft, ActionPositionEnum.ToolbarRight, ActionPositionEnum.FooterLeft, ActionPositionEnum.FooterRight].includes(action.position)) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on details (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on edit editor.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnEditEditor<ActionModel = Model, ActionService = Service, ActionInput extends EditModel = EditModel, ActionResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.EDIT]);\n if (![ActionPositionEnum.ToolbarLeft, ActionPositionEnum.ToolbarRight, ActionPositionEnum.FooterLeft, ActionPositionEnum.FooterRight].includes(action.position)) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on edit (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * Adds a custom action on add editor.\n *\n * @param {TvBuilderActionSetterFnType<Model, ActionService, ActionRunResult, Descriptor, DataProvider>} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @param {ActionPositionEnum} fn - The function that returns the new action descriptor. It accepts a single parameter of type `TvBuilderSetterParamsType<Descriptor, DataProvider>`.\n * @typeParam ActionService - The service type (same as build `Service` by default).\n * @returns {this} - Returns the current instance of the builder.\n */\n withActionOnAddEditor<ActionModel = Model, ActionService = Service, ActionInput extends AddModel = AddModel, ActionResult = Model>(\n fn: TvBuilderActionSetterFnType<ActionModel, ActionService, ActionInput, ActionResult, ActionInput, Descriptor, DataProvider>\n ): this {\n const action = fn(this.prepareSetterParams());\n if (action) {\n action.withPositionTableviewCategories([TableviewActionDefaultCategories.ADD]);\n if (![ActionPositionEnum.ToolbarLeft, ActionPositionEnum.ToolbarRight, ActionPositionEnum.FooterLeft, ActionPositionEnum.FooterRight].includes(action.position)) {\n throw new CommonsInternalError(`Action ${action.actionNameLong} can not be positioned on add (${action.position}), define valid position.`);\n }\n this._customActions.push(action);\n }\n return this;\n }\n\n /**\n * @internal\n *\n * Builds and returns an instance of ITableview.\n * DO NOT CALL this within tableview create callback function!\n *\n * @return {TableviewInput<Model, Service, Sorts, Filters, TableModel, AddModel, EditModel, Descriptor, DataProvider>} - The built ITableview instance.\n */\n build() {\n return <TableviewInput<Model, Service, Sorts, Filters, TableModel, AddModel, EditModel, Descriptor, DataProvider>>{\n actions: tableviewCreateDefaultActions(\n this._descriptor as TableviewDescriptorInst<any, any, any, any, any, any, any, any>,\n this.defaultActions.filter(a => a.descriptor !== null).map(a => a.type),\n this.defaultActions\n .filter(a => a.descriptor != null)\n .reduce(\n (acc, a) => ({\n ...acc,\n [a.type]: a.descriptor!\n }),\n <Record<number, ActionDescriptorInst<any>>>{}\n ),\n this.injector\n ).concat(this._customActions),\n dataProvider: this._dataProvider,\n descriptor: this._descriptor\n };\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ServiceClassOptType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {ModelDescriptor, TypeDescriptor} from '@mediusinc/mng-commons/model';\n\nimport {TableviewDataProviderInst} from '../data-providers/tableview.data-provider';\nimport {TableviewDescriptorInst, TableviewDescriptorInstConstructorOpts} from '../descriptors/tableview.descriptor';\nimport {TableviewDescriptorFieldsManageMultiType} from '../models/tableview-descriptor-fields-manage-helper.type';\nimport {TableviewInputBuilder} from './tableview-input-builder';\n\n/**\n * Creates a tableview with the given model, service.\n *\n * @param {ModelDescriptor<Model>} model - The model descriptor.\n * @param {ServiceClassType<Service>} [opts.service] - The class type of the service.\n * @param {TypeDescriptor<Sorts> | ModelDescriptor<Sorts>} [opts.sortsType] - Type of sorts\n * @param {TypeDescriptor<Filters> | ModelDescriptor<Filters>} [opts.filtersType] - Type of filters.\n * @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.\n *\n * @returns A tableview instance with descriptor, data provider and actions.\n */\nexport function tableview<Model, Service = undefined, Sorts = keyof Model, Filters extends keyof any = keyof Model>(\n model: ModelDescriptor<Model>,\n opts?: {\n service?: ServiceClassType<Service>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n },\n buildFn?: (\n builder: TableviewInputBuilder<Model, Service, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewDataProviderInst<Model, Service, Sorts, Filters>, Sorts, Filters>\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewDataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(new TableviewDescriptorInst<Model, Sorts, Filters>(model), new TableviewDataProviderInst<Model, Service, Sorts, Filters>(opts?.service), inject(Injector));\n buildFn?.(builder);\n return builder.build();\n}\n\ntype TableviewMultiModelOpts<Service, Sorts, Filters, TableModel, AddModel, EditModel> = {\n service?: ServiceClassType<Service>;\n sortsType?: TypeDescriptor<Sorts> | ModelDescriptor<Sorts>;\n filtersType?: TypeDescriptor<Filters> | ModelDescriptor<Filters>;\n} & TableviewDescriptorInstConstructorOpts<TableModel, AddModel, EditModel>;\n\nexport function tableviewMultiModel<\n Model,\n Service = undefined,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n AddModel = Model,\n EditModel = Model,\n FieldsModel = TableviewDescriptorFieldsManageMultiType<Model, AddModel, EditModel>\n>(\n model: ModelDescriptor<Model>,\n opts?: TableviewMultiModelOpts<Service, Sorts, Filters, TableModel, AddModel, EditModel>,\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>,\n TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassOptType<Service>, TableModel, AddModel, EditModel>,\n Sorts,\n Filters,\n TableModel,\n AddModel,\n EditModel,\n FieldsModel\n >\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>,\n TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassOptType<Service>, TableModel, AddModel, EditModel>,\n Sorts,\n Filters,\n TableModel,\n AddModel,\n EditModel,\n FieldsModel\n >(\n new TableviewDescriptorInst<Model, Sorts, Filters, undefined, TableModel, AddModel, EditModel, FieldsModel>(model, opts),\n new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassOptType<Service>, TableModel, AddModel, EditModel>(opts?.service),\n inject(Injector)\n );\n buildFn?.(builder);\n return builder.build();\n}\n","import {ServiceClassType} from '@mediusinc/mng-commons/core';\n\nimport {TableviewDataProviderInst} from '../data-providers/tableview.data-provider';\nimport {TableviewDescriptorInst} from '../descriptors/tableview.descriptor';\n\n/**\n * Creates a data provider for from descriptor. DO NOT use if the model is class, because the type (from model descriptor) will not be set in data provider.\n *\n * @param {TableviewDescriptorInst<Model, Sorts, Filters>} descriptor - The table descriptor.\n *\n * @return {TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined, undefined>} - The data provider for the table component.\n */\nexport function tableviewDataProviderFromDescriptor<\n Model,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>(\n descriptor: TableviewDescriptorInst<Model, Sorts, Filters, any, TableModel, CreateModel, UpdateModel, any>\n): TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined, TableModel, CreateModel, UpdateModel>;\n/**\n * Creates a data provider for from descriptor. DO NOT use if the model is class, because the type (from model descriptor) will not be set in data provider.\n *\n * @param {TableviewDescriptorInst<Model, Sorts, Filters>} descriptor - The table descriptor.\n * @param {ServiceClassType<Service>} serviceClass - The service class type.\n *\n * @return {TableviewDataProviderInst<Model, Service, Sorts, Filters, undefined, ServiceClassType<Service>>} - The data provider for the table component.\n */\nexport function tableviewDataProviderFromDescriptor<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>(\n descriptor: TableviewDescriptorInst<Model, Sorts, Filters, any, TableModel, CreateModel, UpdateModel, any>,\n serviceClass: ServiceClassType<Service>\n): TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassType<Service>, TableModel, CreateModel, UpdateModel>;\nexport function tableviewDataProviderFromDescriptor<\n Model,\n Service = any,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model,\n ServiceClass = ServiceClassType<Service>,\n TableModel = Model,\n CreateModel = Model,\n UpdateModel = Model\n>(descriptor: TableviewDescriptorInst<Model, Sorts, Filters, any, TableModel, CreateModel, UpdateModel, any>, serviceType?: ServiceClass) {\n return typeof serviceType !== 'undefined'\n ? new TableviewDataProviderInst<Model, Service, Sorts, Filters, ServiceClassType<Service>, TableModel, CreateModel, UpdateModel>(serviceType as ServiceClassType<Service>)\n : new TableviewDataProviderInst<Model, undefined, Sorts, Filters, undefined, TableModel, CreateModel, UpdateModel>(undefined);\n}\n","// action descriptors\nexport * from './action/descriptors/action.descriptor';\nexport * from './action/descriptors/action-descriptor.factory';\nexport * from './action/descriptors/action-editor.descriptor';\nexport * from './action/descriptors/action-editor-descriptor.factory';\nexport * from './action/descriptors/action-link.descriptor';\nexport * from './action/descriptors/action-link-descriptor.factory';\nexport * from './action/descriptors/editor-action-descriptor.factory';\nexport * from './action/descriptors/editor-action-editor-descriptor.factory';\nexport * from './action/descriptors/table-action-descriptor.factory';\nexport * from './action/descriptors/table-action-editor-descriptor.factory';\n\n// action helpers\nexport * from './action/helpers/data-provider-executors';\n\n// action model execution\nexport * from './action/models/execution/action-context.model';\nexport * from './action/models/execution/action-context-validation.model';\nexport * from './action/models/execution/action-execution-error.model';\nexport * from './action/models/execution/action-instance.model';\nexport * from './action/models/execution/action-instance-state.model';\nexport * from './action/models/execution/view-container.model';\n\n// action model\nexport * from './action/models/action.type';\nexport * from './action/models/action-component.model';\nexport * from './action/models/action-confirmation.model';\nexport * from './action/models/action-descriptor.types';\nexport * from './action/models/action-editor.model';\nexport * from './action/models/action-error.model';\nexport * from './action/models/tableview-action-default-categories.model';\n\n// action services\nexport * from './action/services/tokens/data-language-dropdown.token';\nexport * from './action/services/data-provider-executor.service';\n\n// editor data providers\nexport * from './editor/data-providers/editor.data-provider';\nexport * from './editor/data-providers/editor-data-provider.factory';\n\n// editor descriptors\nexport * from './editor/descriptors/wrappers/editor-descriptor-nested-object-wrapper';\nexport * from './editor/descriptors/editor.descriptor';\nexport * from './editor/descriptors/editor-descriptor.factory';\nexport * from './editor/descriptors/field.descriptor';\nexport * from './editor/descriptors/field-action.descriptor';\nexport * from './editor/descriptors/field-base.descriptor';\nexport * from './editor/descriptors/field-group.descriptor';\nexport * from './editor/descriptors/field-lookup.descriptor';\nexport * from './editor/descriptors/field-many.descriptor';\nexport * from './editor/descriptors/field-validation.descriptor';\n\n// editor models\nexport * from './editor/models/editor.model';\nexport * from './editor/models/editor-fields.model';\nexport * from './editor/models/field.model';\nexport * from './editor/models/field-action-context.model';\nexport * from './editor/models/field-validation.model';\nexport * from './editor/models/form-editor.event';\nexport * from './editor/models/form-editor.interface';\nexport * from './editor/models/formly-custom-field.model';\nexport * from './editor/models/formly-field.model';\nexport * from './editor/models/formly-options.model';\nexport * from './editor/models/radio.model';\nexport * from './editor/models/field-image-preview.model';\n\n// tableview data providers\nexport * from './tableview/data-providers/tableview.data-provider';\nexport * from './tableview/data-providers/tableview-data-provider.factory';\n\n// tableview descriptors\nexport * from './tableview/descriptors/tableview.descriptor';\nexport * from './tableview/descriptors/tableview-descriptor.factory';\n\n// tableview helpers\nexport * from './tableview/helpers/files-export';\nexport * from './tableview/helpers/tableview-create';\nexport * from './tableview/helpers/tableview-data-provider-descriptor-convert';\nexport * from './tableview/helpers/tableview-default-actions';\nexport * from './tableview/helpers/tableview-input-builder';\n\n// tableview models\nexport * from './tableview/models/tableview-descriptor-fields-manage-helper.type';\nexport * from './tableview/models/tableview-descriptor-helper.type';\nexport * from './tableview/models/tableview-input.model';\nexport * from './tableview/models/tableview-route.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map"],"mappings":";;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC1B,IAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW;AACX,IAAA,kBAAA,CAAA,kBAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY;AACZ,IAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW;AACX,IAAA,kBAAA,CAAA,kBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS;AACT,IAAA,kBAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACR,IAAA,kBAAA,CAAA,kBAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU;AACV,IAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW;AACf,CAAC,EARW,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;IAUlB;AAAZ,CAAA,UAAY,2BAA2B,EAAA;AACnC,IAAA,2BAAA,CAAA,2BAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;IACP,2BAAA,CAAA,2BAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACX,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,GAAA,EAAA,CAAA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