@magic-xpa/angular 4.1101.0-dev4111.324 → 4.1101.0-dev4111.332
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"magic-xpa-angular.mjs","sources":["../../../../projects/angular/src/controls.metadata.model.ts","../../../../projects/angular/src/services/StylesMapManager.ts","../../../../projects/angular/src/services/engine.magic.service.ts","../../../../projects/angular/src/services/component-list.magic.service.ts","../../../../projects/angular/src/services/commands-collector.magic.service.ts","../../../../projects/angular/src/services/router-commands.magic.service.ts","../../../../projects/angular/src/services/magic.lazy.loader.service.ts","../../../../projects/angular/src/services/subform.magic.service.ts","../../../../projects/angular/src/ui/router-container.magic.component.ts","../../../../projects/angular/src/ui/GuiInteractiveExecutor.ts","../../../../projects/angular/src/ui/magic-modal/base-magic-overlay-container.ts","../../../../projects/angular/src/ui/directives/magicViewContainerRef.directive.ts","../../../../projects/angular/src/ui/magic-modal/magic-overlay-container.ts","../../../../projects/angular/src/services/overlay.conainer.magic.provider.ts","../../../../projects/angular/src/ui/components/base-magic-confirm.component.ts","../../../../projects/angular/src/ui/components/base-magic-alert.component.ts","../../../../projects/angular/src/ui/directives/magic-focus.directive.ts","../../../../projects/angular/src/ui/magic-modal/magic-overlay-container-wrapper.ts","../../../../projects/angular/src/ui/components/magic-alert.component.ts","../../../../projects/angular/src/ui/components/magic-confirmation-box.component.ts","../../../../projects/angular/src/services/confirmation.components.magic.provider.ts","../../../../projects/angular/src/ui/magic-confirmationBox.ts","../../../../projects/angular/src/services/OverlayWindowService.ts","../../../../projects/angular/src/services/task.magics.service.ts","../../../../projects/angular/src/services/table.magic.service.ts","../../../../projects/angular/src/services/title.magic.service.ts","../../../../projects/angular/src/services/magic-color.service.ts","../../../../projects/angular/src/services/accessor.magic.service.ts","../../../../projects/angular/src/services/magic.services.ts","../../../../projects/angular/src/ui/task-base.magic.component.ts","../../../../projects/angular/src/ui/directives/magic/row.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/nocontrol.magic.directive.ts","../../../../projects/angular/src/ui/pipes/date.magic.pipe.ts","../../../../projects/angular/src/ui/directives/mgformat.magic.directive.ts","../../../../projects/angular/src/ui/pipes/time.magic.pipe.ts","../../../../projects/angular/src/ui/directives/range-validator.magic.directive.ts","../../../../projects/angular/src/ui/subform.magic.component.ts","../../../../projects/angular/src/ui/mgerror.magic.component.ts","../../../../projects/angular/src/ui/directives/magic/checkbox.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/combobox.magic.directive.ts","../../../../projects/angular/src/services/exit.magic.service.ts","../../../../projects/angular/src/ui/magic-root.component.ts","../../../../projects/angular/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.ts","../../../../projects/angular/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.ts","../../../../projects/angular/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/input.noformcontrol.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.ts","../../../../projects/angular/src/ui/directives/NonMagicControlDirective.ts","../../../../projects/angular/src/ui/pipes/time24.magic.pipe.ts","../../../../projects/angular/src/magic.core.module.ts","../../../../projects/angular/src/services/mg-date-adapter.ts","../../../../projects/angular/src/services/magic.providers.ts","../../../../projects/angular/src/ui/utils.ts","../../../../projects/angular/src/ui/magic-modal/magic-modal-form.ts"],"sourcesContent":["import {StorageAttribute} from \"@magic-xpa/utils\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\nimport {HtmlProperties, CustomValidator} from \"@magic-xpa/gui\";\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class ControlMetadata {\r\n controlType: string;\r\n dataType: StorageAttribute;\r\n properties: Map<HtmlProperties, any> = new Map();\r\n classesMap: Map<HtmlClasses, any> = new Map();\r\n stylesMap: Map<HtmlClasses, any> = new Map();\r\n removedClass: string;\r\n classes: string ;\r\n rangeValidator: boolean;\r\n\r\n // user properties\r\n userProperties: Map<string, any> = new Map();\r\n\r\n customValidators: Map<string, CustomValidator> = new Map();\r\n\r\n setClass(key, value) {\r\n // for no-control - hold the name of the class to be removed later\r\n if(this.classesMap.has(key)) {\r\n this.removedClass = this.classesMap.get(key);\r\n }\r\n\r\n this.classesMap.set(key, value);\r\n let result = '';\r\n\r\n for (let value of this.classesMap) {\r\n result += value + ' ';\r\n }\r\n this.classes = result;\r\n\r\n }\r\n\r\n setStyle(key, value) {\r\n this.stylesMap.set(key, value);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class ControlsMetadata {\r\n\r\n //values of control\r\n values: Map<string, string> = new Map();\r\n // dictionary of controls with there properties\r\n ControlsProperties: Map<string, ControlMetadata> = new Map();\r\n\r\n rowId: string;\r\n isCreated = false;\r\n isEditing = false;\r\n\r\n get Values(){\r\n return this.values;\r\n }\r\n\r\n getControlMetadata(controlId: string) {\r\n if (!this.ControlsProperties.has(controlId))\r\n this.ControlsProperties.set(controlId, new ControlMetadata());\r\n return this.ControlsProperties.get(controlId);\r\n }\r\n\r\n\r\n\r\n update(obj:any) {\r\n //should we keep the values here ?\r\n //this.values = obj.ControlsValues;\r\n let props: { [id: string]: { [id: string]: string; } } = obj.ControlsMetaData;\r\n for (let controlName in props) {\r\n if (!this.ControlsProperties.has(controlName))\r\n this.ControlsProperties.set(controlName, new ControlMetadata());\r\n let controlMetaData: ControlMetadata = this.ControlsProperties.get(controlName);\r\n for (let property in obj.ControlsMetaData[controlName].Properties)\r\n controlMetaData[property] = obj.ControlsMetaData[controlName].Properties[property];\r\n controlMetaData.controlType = obj.ControlsMetaData[controlName].Type;\r\n }\r\n for (let controlName in obj.ControlsValues) {\r\n this.setValue(controlName, obj.ControlsValues[controlName]);\r\n }\r\n }\r\n\r\n setValue(controlName: string, value: any): void {\r\n this.values.set(controlName, value);\r\n }\r\n\r\n getProperty(controlId: string, prop: HtmlProperties) {\r\n if (this.ControlsProperties.has(controlId)) {\r\n if (this.ControlsProperties.get(controlId).properties.has(prop)) {\r\n return this.ControlsProperties.get(controlId).properties.get(prop);\r\n }\r\n }\r\n return \"\";\r\n }\r\n\r\n\r\n getValue(controlName: string){\r\n return this.values.get(controlName);\r\n }\r\n\r\n\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class Records {\r\n data: Map<number, ControlsMetadata> = new Map();\r\n list: ControlsMetadata[] = []; //used for sequential access in table\r\n includesFirst: boolean;\r\n includesLast: boolean;\r\n guiTopIndex: number;\r\n recordsBeforeCurrentView: number = 0;\r\n isEmptyDataView: boolean = false;\r\n sizeUpdated: boolean = false; //used for evaluating the RecordsSizeChange.\r\n\r\n getRow(dvRowId: number): ControlsMetadata {\r\n return this.list[dvRowId + this.recordsBeforeCurrentView];\r\n }\r\n\r\n markRowAsCreated(guiRowId: number): void {\r\n if (guiRowId < this.list.length) {\r\n this.addRow(guiRowId);\r\n this.data.get(guiRowId).isCreated = true;\r\n }\r\n }\r\n\r\n markRowAsNotCreated(guiRowId: number): void {\r\n if (guiRowId < this.list.length)\r\n this.data.get(guiRowId).isCreated = false;\r\n }\r\n\r\n\r\n isRowCreated(guiRowId: number): boolean {\r\n if (guiRowId < this.list.length) {\r\n if (!this.data.has(guiRowId) || isNullOrUndefined(this.data.get(guiRowId)))\r\n return false;\r\n else\r\n return this.data.get(guiRowId).isCreated;\r\n }\r\n return false;\r\n }\r\n\r\n /*\r\n * for row editing\r\n * */\r\n startRowEditing(guiRowId: number): void {\r\n if (guiRowId < this.list.length && this.data.has(guiRowId))\r\n this.data.get(guiRowId).isEditing = true;\r\n }\r\n\r\n /*\r\n * stop row editing on row Id\r\n * */\r\n stopRowEditing(guiRowId: number): void {\r\n if (guiRowId < this.list.length && this.data.has(guiRowId))\r\n this.data.get(guiRowId).isEditing = false;\r\n }\r\n\r\n /*\r\n * return if row is in editing\r\n * Called by the HTML code, so parameter is a string, not a numebr\r\n * */\r\n isRowInRowEditing(guiRowId: string): boolean {\r\n if (+guiRowId < this.list.length) {\r\n if (!this.data.has(+guiRowId) || isNullOrUndefined(this.data.get(+guiRowId)))\r\n return false;\r\n else\r\n return this.data.get(+guiRowId).isEditing;\r\n }\r\n return false;\r\n }\r\n\r\n update(obj) {\r\n\r\n if (obj.fullRefresh && obj.rows.length != this.list.length) {\r\n this.data = new Map();\r\n this.list = new Array<ControlsMetadata>();\r\n }\r\n for (let rowId in obj.rows) {\r\n if (!this.data.has(+rowId) || this.data.get(+rowId) === null)\r\n this.data.set(+rowId, new ControlsMetadata());\r\n let controlsData: ControlsMetadata = this.data.get(+rowId);\r\n controlsData.update(obj.rows[rowId]);\r\n controlsData.rowId = rowId;\r\n }\r\n for (var [key, value] of this.data) {\r\n this.list[key] = value;\r\n }\r\n\r\n }\r\n\r\n updateSize(len: number) {\r\n if (this.list.length != len) {\r\n if (len < this.list.length) {\r\n //remove rows\r\n for (let i = len; i < this.list.length; i++) {\r\n this.data.delete(i);\r\n }\r\n\r\n }\r\n this.list.length = len;\r\n this.sizeUpdated = true;\r\n\r\n }\r\n }\r\n\r\n\r\n /**\r\n * crears data for the first record\r\n * @param template\r\n */\r\n clearFirstTableRecord(template: { [id: string]: string; }) {\r\n if (this.list.length >= 1) {\r\n for (const key in template) {\r\n if (template[key] == '1' && this.list[0].ControlsProperties.has(key)) {\r\n this.list[0].ControlsProperties.get(key).properties = new Map() ;\r\n }\r\n }\r\n }\r\n }\r\n\r\n addRow(guiRowId: number) {\r\n if (guiRowId !== 0 || !this.data.has(guiRowId) || isNullOrUndefined(this.data.get(guiRowId))) {\r\n this.data.set(guiRowId, new ControlsMetadata());\r\n this.data.get(guiRowId).rowId = \"\"+guiRowId;\r\n this.list[guiRowId] = this.data.get(guiRowId);\r\n }\r\n }\r\n\r\n createFirst() {\r\n this.addRow(0);\r\n }\r\n\r\n fromJson(data: string) {\r\n var obj = JSON.parse(data);\r\n this.update(obj);\r\n }\r\n\r\n setGuiTopIndex(topIndex: number) {\r\n this.guiTopIndex = topIndex;\r\n }\r\n\r\n getGuiTopIndex(): number {\r\n return this.guiTopIndex;\r\n }\r\n\r\n}\r\n\r\n /**\r\n * @ignore\r\n */\r\nexport enum HtmlClasses {\r\n Color = \"color\",\r\n font = \"font\",\r\n FocusColor=\"focuscolor\",\r\n HintColor=\"hintcolor\",\r\n}\r\n","import {MagicProperties} from \"@magic-xpa/utils\"\r\nimport {NString, isNullOrUndefined} from \"@magic-xpa/mscorelib\"\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class StylesMapManager {\r\n static StylesMap: Map<string, any> = new Map<string, any>(\r\n [\r\n [MagicProperties.LineDivider, new Map<any, any>([[true, \"solid\"], [false, \"hidden\"]])],\r\n [MagicProperties.ImageFile, \"url('\\{0}\\')\"],\r\n [MagicProperties.Wallpaper, \"url('\\{0}\\')\"]\r\n ]\r\n );\r\n\r\n static MagicPropertyToHtmlAttributeMap: Map<string, string> = new Map<string, string>(\r\n [\r\n [MagicProperties.LineDivider, \"border-bottom-style\"],\r\n [MagicProperties.ImageFile, \"background-image\"],\r\n [MagicProperties.Wallpaper, \"background-image\"]\r\n ]\r\n );\r\n\r\n static magicValueGetStyle(styleName: string, magicValue: any): string {\r\n let style: string = \"\";\r\n\r\n if (!isNullOrUndefined(magicValue)) {\r\n let value = StylesMapManager.StylesMap.get(styleName);\r\n if (value.constructor === Map) {\r\n style = value.get(magicValue);\r\n }\r\n else if (value.constructor === String) {\r\n style = NString.Format(value.toString(), magicValue);\r\n }\r\n }\r\n\r\n return style;\r\n }\r\n}\r\n","import {Injectable} from \"@angular/core\";\r\nimport {Subject} from \"rxjs\";\r\n\r\nimport {IGuiEvent, MagicBridge} from \"@magic-xpa/engine\";\r\nimport {GuiCommand, GuiInteractive} from \"@magic-xpa/gui\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EngineMagicService {\r\n magicBridge = MagicBridge;\r\n isStub = false;\r\n // true when user is logged in magic\r\n isLoggedIn = false;\r\n //TODO - unregister\r\n refreshDom: Subject<GuiCommand> = new Subject();\r\n interactiveCommands: Subject<GuiInteractive> = new Subject();\r\n\r\n startMagicEngine(httpClient: HttpClient, args: Map<string, string>) {\r\n this.magicBridge.registerExecuteCommandsCallback(data => {\r\n if (!this.isStub) {\r\n try {\r\n const list = data as GuiCommand[];\r\n for (let c of list) {\r\n this.refreshDom.next(c);\r\n }\r\n }\r\n catch (e) {\r\n console.dir(e);\r\n console.log('magic engine not found');\r\n console.log('moving to stub mode');\r\n this.isStub = true;\r\n }\r\n }\r\n });\r\n\r\n this.magicBridge.registerInteractiveCallback(data => {\r\n if (!this.isStub) {\r\n this.interactiveCommands.next(data);\r\n }\r\n });\r\n\r\n this.magicBridge.Initialize(httpClient, args);\r\n }\r\n\r\n async terminateMagic(): Promise<void> {\r\n await this.magicBridge.TerminateMagic();\r\n }\r\n\r\n insertEvent(guiEvent: IGuiEvent): void {\r\n if (!this.isStub)\r\n this.magicBridge.insertEvent(guiEvent);\r\n }\r\n\r\n GetRangedValue(taskId: string, controlName: string, value: string): string {\r\n return this.magicBridge.GetRangedValue(taskId, controlName, value);\r\n }\r\n\r\n GetControlPictureMask(taskId: string, controlName: string): any {\r\n return this.magicBridge.GetControlPictureMask(taskId, controlName);\r\n }\r\n\r\n GetFormattedValue(taskId: string, controlName: string, value: any, rowId?: string): any {\r\n return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);\r\n }\r\n\r\n ValidateControlValue(taskId: string, controlName: string, value: any): string {\r\n return this.magicBridge.ValidateControlValue(taskId, controlName, value);\r\n }\r\n\r\n GetFldRanges(taskId: string, controlName: string): string {\r\n return this.magicBridge.GetFldRanges(taskId, controlName);\r\n }\r\n\r\n saveData(data:string)\r\n {\r\n //this.magicBridge.saveData(data);\r\n }\r\n\r\n getIsLoggedIn():boolean{\r\n return this.isLoggedIn;\r\n }\r\n\r\n setIsLoggedIn(setIsLoggedIn: boolean){\r\n this.isLoggedIn = setIsLoggedIn;\r\n }\r\n\r\n TransCacheExists(): boolean {\r\n return this.magicBridge.TransCacheExists();\r\n }\r\n\r\n TerminateContextUsingFetchAPI(): void {\r\n this.magicBridge.TerminateContextUsingFetchAPI();\r\n }\r\n}\r\n","import { Injectable, NgModuleRef } from '@angular/core';\r\n\r\n\r\nexport interface ComponentData {\r\n component:any;\r\n moduleRef:NgModuleRef<any>;\r\n}\r\n\r\nexport interface ModuleData {\r\n moduleName: string;\r\n modulePath: string;\r\n}\r\n\r\n/**\r\n * Manages the list of components in a project, and the project title\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ComponentListMagicService{\r\n\r\n /**\r\n * Map of project components\r\n */\r\n components = new Map<string,ComponentData>();\r\n /**\r\n * Map of project dialogs\r\n */\r\n dialogs = new Map<string,any>();\r\n\r\n lazyLoadModulesMap = null;\r\n\r\n getData(name:string, mustHaveData: boolean){\r\n let data :ComponentData= null;\r\n\r\n let haveData: boolean =this.components.has(name);\r\n if (!haveData && mustHaveData) {\r\n console.log(\"Error: Component: \" + name + \" does not exist in components map\");\r\n }\r\n\r\n if (haveData)\r\n data = this.components.get(name)\r\n\r\n return data;\r\n }\r\n\r\n\r\n /**\r\n * Return a component according to name\r\n * @param name Name of requested component\r\n * @returns The requested component\r\n */\r\n getComponent(name:string, mustHaveData:boolean = true){\r\n let data: ComponentData = this.getData(name, mustHaveData)\r\n return data ? data.component : null;\r\n }\r\n\r\n addComponents(componentList:any , modulRef?:NgModuleRef<any>){\r\n for(let key in componentList){\r\n let data :ComponentData = {moduleRef:modulRef, component:componentList[key]};\r\n this.components.set(key,data);\r\n }\r\n }\r\n\r\n /**\r\n * Return a component according to name\r\n * @param name Name of requested component\r\n * @returns The requested component\r\n */\r\n getModuleRef (name:string){\r\n let data: ComponentData = this.getData(name, false)\r\n return data ? data.moduleRef : null;;\r\n }\r\n\r\n /**\r\n * Return the lazy load module details of the specified component\r\n * @param name: Name of requested component\r\n * @returns: lazy load module details\r\n */\r\n getLazyLoadModuleData (name:string): ModuleData {\r\n return (this.lazyLoadModulesMap != null && this.lazyLoadModulesMap.hasOwnProperty(name)) ? this.lazyLoadModulesMap[name] : null;\r\n }\r\n\r\n/**\r\n * Project title\r\n */\r\n title : string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { EngineMagicService } from './engine.magic.service';\r\nimport { GuiCommand } from '@magic-xpa/gui';\r\nimport { List } from '@magic-xpa/mscorelib';\r\nimport { Logger } from '@magic-xpa/utils';\r\nimport { Subscription } from 'rxjs';\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CommandsCollectorMagicService {\r\n private count: number = 0;\r\n private commands: List<GuiCommand> = new List<GuiCommand>();\r\n private subscription: Subscription = null;\r\n\r\n constructor(protected magic: EngineMagicService) {\r\n }\r\n\r\n startCollecting() {\r\n this.count++;\r\n Logger.Instance.WriteDevToLog(\"CommandsCollectorMagicService.startCollecting() --- \" + this.count);\r\n\r\n if (this.subscription === null) {\r\n this.subscription = this.magic.refreshDom\r\n .subscribe(command => {\r\n this.commands.push(command);\r\n });\r\n }\r\n }\r\n\r\n stopCollecting() {\r\n this.count--;\r\n Logger.Instance.WriteDevToLog(\"CommandsCollectorMagicService.stopCollecting() --- \" + this.count);\r\n\r\n if (this.count === 0) {\r\n this.subscription.unsubscribe();\r\n this.subscription = null;\r\n }\r\n }\r\n\r\n GetCommands(taskId: string): GuiCommand[] {\r\n const commands: GuiCommand[] = this.commands.filter( (command: GuiCommand) => command.TaskTag === taskId);\r\n commands.forEach(command => { this.commands.Remove(command); });\r\n\r\n return commands;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { List,isNullOrUndefined} from '@magic-xpa/mscorelib';\r\nimport { ISubformMagicService } from './ISubformMagicService';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class RouteCommand {\r\n callerMgSubformServiceRef: ISubformMagicService;\r\n routerOutletName: string;\r\n formName: string;\r\n parameters: any;\r\n routeParams: List<any>;\r\n}\r\n/**\r\n * @ignore\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RouterCommandsMagicService {\r\n private pendingRouteCommands: RouteCommand[] = [];\r\n\r\n AddRouteCommand (routeCommand: RouteCommand) {\r\n this.pendingRouteCommands.push(routeCommand);\r\n }\r\n\r\n ExecuteNextCommand() {\r\n let pendingRouteCommand: RouteCommand = this.pendingRouteCommands.shift();\r\n\r\n if (!isNullOrUndefined(pendingRouteCommand)) {\r\n pendingRouteCommand.callerMgSubformServiceRef.ExecuteRouteCommand(pendingRouteCommand);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn : 'root'\r\n})\r\nexport class MagicLazyLoaderService {\r\n Load(path: string): Promise<any> {\r\n return Promise.reject('error in loading module :' + path);\r\n }\r\n}\r\n","import { Compiler, Component, Injectable, Injector, NgModuleRef } from '@angular/core';\nimport { TaskMagicService } from './task.magics.service';\nimport { List, isNullOrUndefined } from '@magic-xpa/mscorelib';\nimport { GuiCommand } from '@magic-xpa/gui';\nimport {ComponentListMagicService, ModuleData} from './component-list.magic.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CommandsCollectorMagicService } from './commands-collector.magic.service';\nimport { RouteDefinition } from '../interfaces/sub-form-definition.iterface';\nimport { RouteCommand, RouterCommandsMagicService } from '../services/router-commands.magic.service';\nimport { ISubformMagicService } from './ISubformMagicService';\nimport { RouterContainerMagicComponent } from '../ui/router-container.magic.component';\nimport { MagicLazyLoaderService } from './magic.lazy.loader.service';\n\n\n/**\n * Service for managing subforms and routing\n */\n@Injectable()\nexport class SubformMagicService implements ISubformMagicService{\n\n subformsDict /*:{ [x: string]: SubformDefinition }*/ = {};\n routesDict: { [x: string]: string } = {}; // dictionary of router outlet to router path\n currentRouteDefinition: RouteDefinition = null;\n\n static currentCallerMgSubformServiceRef: any = null;\n\n static routerContainers: Array<RouterContainerMagicComponent> = new Array();\n\n constructor(private task: TaskMagicService,\n protected activatedRoute: ActivatedRoute,\n protected componentList: ComponentListMagicService,\n protected pendingCommandsCollector: CommandsCollectorMagicService,\n protected router: Router,\n protected routerCommandsMagicService: RouterCommandsMagicService,\n private componentListMagicService: ComponentListMagicService,\n private loader: MagicLazyLoaderService,\n private injector: Injector,\n private compiler: Compiler) {\n }\n\n /**\n * Finds and returns the component according to the subform name\n * @param subformName\n * @returns\n */\n mgGetComp(subformName: string): Component {\n if (subformName in this.subformsDict) {\n let formName: string = this.subformsDict[subformName].formName;\n if (formName)\n return this.componentList.getComponent(formName);\n }\n return null;\n }\n\n /**\n * Returns the parameters of the subform\n * @param subformName\n * @returns\n */\n mgGetParameters(subformName: string): any {\n if (subformName in this.subformsDict) {\n return this.subformsDict[subformName].parameters;\n }\n else\n return '';\n }\n\n /**\n * @ignore\n */\n deleteSubformComp (subformControlName: string, formName: string) {\n\n if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0)\n {\n if (this.subformsDict[subformControlName].formName === formName) {\n\n this.subformsDict[subformControlName] = {};\n this.task.refreshView();\n }\n }\n }\n\n /**\n * @ignore\n */\n addSubformComp (subformControlName: string, formName: string, taskId: string, taskDescription: any, routerPath: string, params: List<any>, inDefaultOutlet: boolean) {\n this.pendingCommandsCollector.startCollecting();\n\n let refreshNeeded = false;\n if (isNullOrUndefined(routerPath)) { // call in destination subform\n if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0)\n {\n if (this.subformsDict[subformControlName].formName === formName) {\n\n this.subformsDict[subformControlName] = {};\n this.task.refreshView();\n }\n }\n\n // Load the lazy load module, if needed\n let moduleRef: NgModuleRef<any> = this.componentListMagicService.getModuleRef(formName);\n\n if (moduleRef == null) {\n let lazyLoadModule: ModuleData = this.componentListMagicService.getLazyLoadModuleData(formName);\n\n if (lazyLoadModule != null) {\n const Magic: string = 'Magic';\n const Module: string = 'Module';\n\n // extract name of module(XX) from 'MagicXXModule'\n const moduleName = lazyLoadModule.moduleName.slice(Magic.length, -Module.length);\n this.loader.Load(moduleName).then( m => {\n const compiled = this.compiler.compileModuleAndAllComponentsSync(<any>m[lazyLoadModule.moduleName]);\n moduleRef = compiled.ngModuleFactory.create(this.injector);\n this.subformsDict[subformControlName] = {\n formName,\n parameters: {taskIdParam: taskId, taskDescription: taskDescription}\n };\n this.task.refreshView();\n });\n }\n }\n else {\n this.subformsDict[subformControlName] = {\n formName,\n parameters: {taskIdParam: taskId, taskDescription: taskDescription}\n };\n //this.ref.detectChanges();\n refreshNeeded = true;\n }\n }\n else { // call route\n if (inDefaultOutlet)\n subformControlName = 'primary';\n\n let routeParams: List<any> = new List();\n routeParams.push(routerPath);\n if (params !== null) {\n routeParams = <List<any>>routeParams.concat(params);\n }\n\n let routeCommand: RouteCommand = {\n callerMgSubformServiceRef: this,\n routerOutletName: subformControlName,\n formName: formName,\n parameters: {taskIdParam: taskId, taskDescription: taskDescription},\n routeParams: routeParams\n };\n\n // If SubformMagicService.currentCallerMgSubformServiceRef !== null means that router.navigate() is already\n // called once, but angular has not yet executed it (ngOnInit of the new component is not called).\n // In such a case, do not executed router.navigate() again. Because, angular ignores the previous one.\n // So, put a command in the queue which will be executed after the first one is executed.\n if (SubformMagicService.currentCallerMgSubformServiceRef === null)\n this.ExecuteRouteCommand(routeCommand);\n else\n this.routerCommandsMagicService.AddRouteCommand(routeCommand);\n }\n if ( refreshNeeded)\n this.task.refreshView();\n }\n\n /**\n * Open the subform using a route command\n */\n ExecuteRouteCommand(routeCommand: RouteCommand)\n {\n let currentSubformMagicService: SubformMagicService = <SubformMagicService>routeCommand.callerMgSubformServiceRef;\n let relativeRoute = SubformMagicService.getRelativeRoute(currentSubformMagicService.activatedRoute);\n\n if (currentSubformMagicService.routesDict[routeCommand.routerOutletName] === routeCommand.routeParams[0])\n {\n // If the specified router outlet already hosts the same router path, router.navigate() doesn't actually navigate.\n // So, first clear the outlet (passing null route params, clears the outlet) and then navigate again.\n currentSubformMagicService.router.navigate([{outlets: {[routeCommand.routerOutletName]: null}}], {relativeTo: relativeRoute})\n .then((result:boolean) => {\n SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;\n currentSubformMagicService.currentRouteDefinition = {\n formName: routeCommand.formName,\n parameters: routeCommand.parameters\n };\n\n currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);\n });\n }\n else {\n SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;\n currentSubformMagicService.currentRouteDefinition = {\n formName: routeCommand.formName,\n parameters: routeCommand.parameters\n };\n\n if (SubformMagicService.routerContainers.length > 0) {\n let routeContainer = SubformMagicService.routerContainers[0];\n SubformMagicService.routerContainers.shift();\n routeContainer.initializeComponent();\n }\n else {\n currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);\n }\n }\n }\n\n private PerformRouterNavigate(routerOutletName: string, routeParams: List<any>)\n {\n let relativeRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\n\n this.router.navigate([{ outlets: { [routerOutletName]: routeParams } }], { relativeTo: relativeRoute })\n .then((result:boolean)=> {\n if (result !== null && !result) {\n let subformMagicService: SubformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;\n subformMagicService.currentRouteDefinition = null;\n\n SubformMagicService.currentCallerMgSubformServiceRef = null;\n subformMagicService.pendingCommandsCollector.stopCollecting();\n subformMagicService.routerCommandsMagicService.ExecuteNextCommand();\n }\n }\n );\n }\n\n /**\n * @ignore\n */\n init()\n {\n // If commands were issued for this task before ngOnInit(), they were not executed because task had not registered for them.\n // So, execute them now.\n const pendingCommands: GuiCommand[] = this.pendingCommandsCollector.GetCommands(this.task.taskId);\n if (pendingCommands.length > 0) {\n pendingCommands.forEach(command => {this.task.executeCommand(command);});\n this.task.refreshView();\n }\n\n this.pendingCommandsCollector.stopCollecting();\n }\n\n /**\n * @ignore\n */\n refreshView() {\n this.task.refreshView();\n }\n\n ///\n // return the relative route\n //\n static getRelativeRoute(sendActivatedRoute: ActivatedRoute){\n let currentActiveRoute = sendActivatedRoute;\n if (currentActiveRoute.snapshot.routeConfig !== null && currentActiveRoute.snapshot.routeConfig.path === '') {\n currentActiveRoute = currentActiveRoute.parent;\n if (!currentActiveRoute.snapshot.routeConfig.loadChildren)\n console.log('getRelativeRoute(): both path and currentActiveRoute.snapshot.routeConfig.loadChildren are empty.');\n }\n return currentActiveRoute;\n }\n}\n","import { Component, OnInit, ViewContainerRef } from '@angular/core';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport { TaskBaseMagicComponent } from './task-base.magic.component';\r\nimport { EngineMagicService } from '../services/engine.magic.service';\r\nimport { getGuiEventObj, IGuiEvent } from '@magic-xpa/engine';\r\nimport { List } from '@magic-xpa/mscorelib';\r\nimport { StrUtil } from '@magic-xpa/utils';\r\nimport { ComponentListMagicService } from '../services/component-list.magic.service';\r\nimport { SubformMagicService } from '../services/subform.magic.service';\r\nimport { CommandsCollectorMagicService } from '../services/commands-collector.magic.service';\r\nimport { RouterCommandsMagicService } from '../services/router-commands.magic.service';\r\nimport { TaskMagicService } from '../services/task.magics.service';\r\n\r\n/**\r\n * Mock component, implements routing by connecting the requested URL with the appropriate Magic task\r\n */\r\n@Component({\r\n selector: 'magic-route-outlet',\r\n template: `\r\n `\r\n})\r\nexport class RouterContainerMagicComponent implements OnInit {\r\n private componentRef = null;\r\n private parentMgSubformService: SubformMagicService = null;\r\n private static lastRoute: string = \"/\";\r\n\r\n static get LastRoute(): string {\r\n return RouterContainerMagicComponent.lastRoute;\r\n }\r\n\r\n /**\r\n *\r\n * @param changeDetectorRef\r\n * @param activatedRoute\r\n * @param magic\r\n * @param componentFactoryResolver\r\n * @param viewContainerRef\r\n * @param componentList\r\n * @param pendingCommandsCollector\r\n */\r\n constructor(private activatedRoute: ActivatedRoute,\r\n protected router: Router,\r\n protected magic: EngineMagicService,\r\n private containerTaskService: TaskMagicService,\r\n private viewContainerRef: ViewContainerRef,\r\n private componentList: ComponentListMagicService,\r\n protected pendingCommandsCollector: CommandsCollectorMagicService,\r\n protected routerCommandsMagicService: RouterCommandsMagicService) {}\r\n\r\n /**\r\n * Initialization\r\n */\r\n ngOnInit() {\r\n let subformMagicService: SubformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;\r\n\r\n let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\r\n\r\n RouterContainerMagicComponent.lastRoute = this.router.url;\r\n\r\n if (subformMagicService == null || subformMagicService.currentRouteDefinition === null) {\r\n this.insertRouteEvent(currentActiveRoute);\r\n\r\n SubformMagicService.routerContainers.push(this);\r\n }\r\n else {\r\n this.initializeComponent();\r\n }\r\n }\r\n\r\n private insertRouteEvent(currentActiveRoute: ActivatedRoute) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('RouterNavigate', null, 0);\r\n guiEvent.RouterPath = currentActiveRoute.snapshot.routeConfig.path;\r\n\r\n if (currentActiveRoute.snapshot.outlet !== 'primary')\r\n guiEvent.RouterOutletName = currentActiveRoute.snapshot.outlet;\r\n\r\n\r\n // if this is LoadOnDemandModuleMagicComponent it's mean that this is load on demand module and we\r\n // need to take the path form routeConfig.path\r\n\r\n let calcRouterPath: string = currentActiveRoute.routeConfig.path;\r\n // add the RouterPath only if exist\r\n if (calcRouterPath.length > 0)\r\n {\r\n let routerPath: string = calcRouterPath;\r\n let tokens: string[] = StrUtil.tokenize(routerPath, \"/:\");\r\n guiEvent.RouterPath = tokens[0];\r\n\r\n guiEvent.RouterParams = new List();\r\n for (let i = 1; i < tokens.length; i++) {\r\n guiEvent.RouterParams.push(currentActiveRoute.snapshot.params[tokens[i]]);\r\n }\r\n }\r\n\r\n this.containerTaskService.insertEvent(guiEvent);\r\n }\r\n\r\n initializeComponent() {\r\n // re-init subformMagicService since it may change after executing \"RouterNavigate\" event.\r\n let subformMagicService: SubformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;\r\n if (subformMagicService.currentRouteDefinition !== null) {\r\n let comp = this.componentList.getComponent(subformMagicService.currentRouteDefinition.formName);\r\n this.componentRef = this.viewContainerRef.createComponent(comp);\r\n Object.assign(this.componentRef.instance, subformMagicService.currentRouteDefinition.parameters);\r\n\r\n\r\n let myActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\r\n\r\n let routeParams: string[] = StrUtil.tokenize(myActiveRoute.snapshot.routeConfig.path, \"/:\");\r\n subformMagicService.routesDict[myActiveRoute.snapshot.outlet] = routeParams[0];\r\n\r\n this.parentMgSubformService = subformMagicService;\r\n subformMagicService.currentRouteDefinition = null;\r\n SubformMagicService.currentCallerMgSubformServiceRef = null;\r\n\r\n //When the component is initialized, then also we get the notification for paramMap subscription.\r\n //But in this case, we do not have to raise the event, because magic engine itself has initiated the route with the same parameters.\r\n //So, control it via ignoreParamChange flag.\r\n let ignoreParamChange = true;\r\n myActiveRoute.paramMap.subscribe(params => {\r\n if (!ignoreParamChange)\r\n this.insertRouteEvent(myActiveRoute);\r\n ignoreParamChange = false;\r\n });\r\n\r\n this.parentMgSubformService.refreshView();\r\n\r\n this.routerCommandsMagicService.ExecuteNextCommand();\r\n }\r\n }\r\n\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy() {\r\n // TODO Routing: Call close() only if the task is not already closed.\r\n // Task can be closed when a router is overlayed by another task via call operation.\r\n if (this.componentRef != null)\r\n {\r\n (<TaskBaseMagicComponent>this.componentRef.instance).task.close();\r\n\r\n let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\r\n this.parentMgSubformService.routesDict[currentActiveRoute.outlet] = \"\";\r\n\r\n RouterContainerMagicComponent.lastRoute = this.router.url;\r\n }\r\n }\r\n\r\n}\r\n","import {GuiInteractive, HtmlProperties, InteractiveCommandType} from '@magic-xpa/gui';\r\nimport {TaskBaseMagicComponent} from './task-base.magic.component';\r\nimport {isNullOrUndefined} from '@magic-xpa/mscorelib';\r\nimport {TaskMagicService} from '../services/task.magics.service';\r\nimport {OverlayWindowService} from '../services/OverlayWindowService';\r\nimport {RouterContainerMagicComponent} from \"./router-container.magic.component\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class GuiInteractiveExecutor {\r\n command: GuiInteractive;\r\n component: TaskBaseMagicComponent;\r\n task: TaskMagicService;\r\n overlayService: OverlayWindowService;\r\n\r\n\r\n Run(): void {\r\n // Sets the currentContextID\r\n try {\r\n switch (this.command._commandType) {\r\n\r\n case InteractiveCommandType.GET_VALUE:\r\n this.onValue();\r\n break;\r\n\r\n case InteractiveCommandType.GET_ROWS_IN_PAGE:\r\n this.onGetRowsInPage();\r\n break;\r\n case InteractiveCommandType.GET_MAX_ROWS_IN_PAGINATED_TABLE:\r\n this.onGetMaxRowsInPaginatedTable();\r\n break;\r\n case InteractiveCommandType.MESSAGE_BOX:\r\n this.OnMessageBox();\r\n break;\r\n case InteractiveCommandType.GET_TOP_INDEX:\r\n this.OnGetTopIndex();\r\n break;\r\n case InteractiveCommandType.GET_IS_ROW_EDITING:\r\n this.OnGetIsRowEditing();\r\n break;\r\n case InteractiveCommandType.SET_TITLE:\r\n this.OnSetTitle();\r\n break;\r\n case InteractiveCommandType.REFRESH_PAGE:\r\n this.OnRefreshPage();\r\n break;\r\n case InteractiveCommandType.GET_LAST_ROUTE:\r\n this.OnGetLastRoute();\r\n break;\r\n case InteractiveCommandType.OPEN_FORM:\r\n this.OnOpenForm();\r\n break;\r\n }\r\n } catch (ex) {\r\n throw ex;\r\n //want to see all the exceptions for now\r\n }\r\n }\r\n\r\n\r\n public static executeInteractiveCommand(task: TaskMagicService, guiIntactiveCommand: GuiInteractive, overlayService: OverlayWindowService) {\r\n let executor = new GuiInteractiveExecutor();\r\n executor.task = task;\r\n executor.command = guiIntactiveCommand;\r\n executor.overlayService = overlayService;\r\n executor.Run();\r\n }\r\n\r\n private onValue(): void {\r\n let guiRowId: number = this.task.getGuiRowId(+this.command._line, this.task.isTableControl(this.command.controlName) || this.command._obj2.IsTableChild);\r\n let result = this.task.getFormControl(guiRowId.toString(), this.command.controlName);\r\n let val: any;\r\n if (!isNullOrUndefined(result)) {\r\n val = result.value;\r\n } else if (this.task.isTableControl(this.command.controlName))\r\n val = this.task.getValue(this.command.controlName, guiRowId.toString());\r\n\r\n // If this is Three State Checkbox, then check if value is indeterminate.\r\n if(this.command._boolVal){\r\n const indeterminate = this.task.getProperty(this.command.controlName,HtmlProperties.CheckBoxIndeterminate,guiRowId.toString());\r\n if(indeterminate)\r\n val = null;\r\n }\r\n\r\n val = this.task.ConvertValToNative(this.command.controlName, guiRowId, val);\r\n\r\n this.command._mgValue.obj = val;\r\n }\r\n\r\n private onGetRowsInPage(): void {\r\n this.command._intVal1 = this.task.tableService.getPageSize();\r\n if (this.task.oldPageSize == 0)\r\n this.task.oldPageSize = this.command._intVal1;\r\n }\r\n\r\n private onGetMaxRowsInPaginatedTable(): void {\r\n this.command._intVal1 = this.task.tableService.getMaxRowsInTable();\r\n }\r\n\r\n private OnMessageBox() {\r\n this.overlayService.openConfirmationBox(this.command._mgValue.title, this.command._mgValue.str, this.command._mgValue.style);\r\n }\r\n\r\n private OnOpenForm(): void {\r\n if (this.command._boolVal)\r\n this.overlayService.loadAndOpenModule(this.command.controlName, this.command._mgValue.str, this.command._mgValue.path);\r\n }\r\n\r\n private OnSetTitle() {\r\n this.task.setTitle(this.command._mgValue.title);\r\n }\r\n\r\n private OnRefreshPage() {\r\n let navigateToRootRoute = this.command._boolVal;\r\n let initialUrl:string = this.command._obj1;\r\n if (navigateToRootRoute)\r\n window.location.replace (initialUrl);\r\n else\r\n window.location.reload();\r\n }\r\n\r\n private OnGetTopIndex(): void {\r\n this.command._intVal1 = this.task.tableService.getTableTopIndex();\r\n }\r\n\r\n private OnGetIsRowEditing(): void {\r\n let dvRowIndex: number = this.command._intVal1;\r\n let guiRowIndex: number = this.task.getGuiRowId(dvRowIndex, true);\r\n let isLineMode: boolean = this.command._boolVal;\r\n\r\n if (isLineMode && (isNullOrUndefined(guiRowIndex) || isNullOrUndefined(this.task.Records.list[guiRowIndex])))\r\n this.command._boolVal = false;\r\n else\r\n this.command._boolVal = this.task.Records.list[guiRowIndex].isEditing;\r\n }\r\n\r\n private OnGetLastRoute(): void {\r\n this.command.resultString = RouterContainerMagicComponent.LastRoute;\r\n }\r\n}\r\n","import { Input, Output } from \"@angular/core\";\r\n@Input()\r\n@Output()\r\nexport abstract class BaseMagicOverlayContainer {\r\n /**\r\n *\r\n */\r\n @Input() abstract ModalComp;\r\n\r\n /**\r\n *\r\n */\r\n @Input() abstract ModalCompParameters: any;\r\n\r\n /**\r\n *\r\n */\r\n @Output() abstract onClose;\r\n}\r\n","import { Directive, ViewContainerRef } from \"@angular/core\";\nimport { IMagicViewContainerRef } from \"../../interfaces/sub-form-definition.iterface\";\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\n\n/**\n * Directive for setting ViewContainerRef on element\n */\n@Directive({\n selector: '[magicViewContainerRef]',\n})\nexport class MagicViewContainerRef {\n constructor(private vcRef: ViewContainerRef) {\n // For angular 10 - find the component from the views\n let comp = ((<any>this.vcRef)._hostLView).find(v => v as IMagicViewContainerRef != null && !isNullOrUndefined((v as IMagicViewContainerRef).setViewContainerRef));\n comp.setViewContainerRef(vcRef);\n }\n}\n\n","import {\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { MagicModalInterface } from './magic-modal-interface';\r\nimport { isNullOrUndefined } from '@magic-xpa/mscorelib';\r\nimport { BaseMagicOverlayContainer } from './base-magic-overlay-container';\r\nimport { IMagicViewContainerRef } from '../../..';\r\n\r\n/**\r\n * Creates a modal window for Magic modal window components\r\n */\r\n@Component({\r\n selector: 'app-magic-overlay-container',\r\n template: `\r\n <div>\r\n <div class=\"modal-background\" (click)=\"OnBackgroundClick()\">\r\n <button (click)=\"OnClose()\" tabindex=\"-1\" style=\"float:right; border: none; background-color: transparent; outline: none; color: white\" *ngIf=\"!getShowTitleBar()\">X</button>\r\n </div>\r\n <div #modalForeground class=\"modal-foreground\" [ngStyle]=\"getStyle()\">\r\n <div #modalheader class=\"modal-header\" *ngIf=\"getShowTitleBar()\">\r\n {{getText()}}\r\n <button (click)=\"OnClose()\" style=\"float:right\" tabindex=\"-1\">X</button>\r\n </div>\r\n <div [ngStyle]=\"getClientAreaStyles()\">\r\n <div #modalbody magicViewContainerRef>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n styleUrls: ['./magic-overlay-container.css']\r\n})\r\nexport class MagicOverlayContainer extends BaseMagicOverlayContainer implements OnInit , IMagicViewContainerRef{\r\n /**\r\n * HTML to be displayed in the modal window\r\n */\r\n modalbodyViewContainerRef : ViewContainerRef;\r\n\r\n /**\r\n * Header of the modal window\r\n */\r\n @ViewChild('modalheader', { static: false }) headerElementRef: ElementRef;\r\n /**\r\n * Foreground of the modal window\r\n */\r\n @ViewChild('modalForeground', { static: false }) foregroundElementRef: ElementRef;\r\n\r\n /**\r\n *\r\n */\r\n @Input() ModalComp = null;\r\n /**\r\n *\r\n */\r\n @Input() ModalCompParameters: any = {};\r\n\r\n @Output() onClose = new EventEmitter<void>();\r\n\r\n /**\r\n *\r\n */\r\n private componentRef = null;\r\n\r\n /**\r\n *\r\n * @param injector\r\n * @param componentFactoryResolver\r\n */\r\n constructor(\r\n\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n ngOnInit() {\r\n this.componentRef = this.modalbodyViewContainerRef.createComponent(this.ModalComp);\r\n Object.assign(this.componentRef.instance, this.ModalCompParameters);\r\n }\r\n\r\n\r\n setViewContainerRef(vcRef: ViewContainerRef){\r\n this.modalbodyViewContainerRef = vcRef;\r\n }\r\n\r\n\r\n /**\r\n * Returns the form name\r\n * @returns\r\n */\r\n getText() {\r\n if (this.componentRef !== null) {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n return comp.FormName();\r\n }\r\n else\r\n return '';\r\n }\r\n\r\n /**\r\n * Returns CSS styles for the window\r\n * @returns\r\n */\r\n getStyle() {\r\n let styles = {};\r\n if (this.componentRef != undefined) {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n\r\n styles['width'] = comp.Width();\r\n styles['height'] = comp.Height();\r\n\r\n if (comp.IsCenteredToWindow()) {\r\n styles['margin'] = 'auto';\r\n }\r\n else {\r\n styles['margin-left'] = comp.X() + 'px';\r\n styles['margin-top'] = comp.Y() + 'px';\r\n }\r\n }\r\n return styles;\r\n }\r\n\r\n /**\r\n * Returns the CSS styles for the client area\r\n * @returns\r\n */\r\n getClientAreaStyles() {\r\n let styles = {};\r\n if (this.componentRef != undefined) {\r\n const headerHeight = this.getShowTitleBar() && !isNullOrUndefined(this.headerElementRef) ? (this.headerElementRef.nativeElement.offsetHeight + 1) : 0;\r\n if (!isNullOrUndefined(this.foregroundElementRef)) {\r\n const foregroundHeight = this.foregroundElementRef.nativeElement.offsetHeight;\r\n styles['height'] = (foregroundHeight - headerHeight) + 'px';\r\n\r\n const foregroundWidth = this.foregroundElementRef.nativeElement.offsetWidth;\r\n styles['width'] = (foregroundWidth) + 'px';\r\n }\r\n styles['overflow'] = 'auto';\r\n }\r\n return styles;\r\n }\r\n\r\n /**\r\n * Should the title bar be displayed\r\n * @returns\r\n */\r\n getShowTitleBar() {\r\n if (this.componentRef != undefined) {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n return comp.ShowTitleBar();\r\n }\r\n }\r\n\r\n /**\r\n *\r\n */\r\n OnClose() {\r\n this.onClose.emit();\r\n }\r\n\r\n /**\r\n * Handles click in the background window\r\n */\r\n OnBackgroundClick() {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n\r\n if (comp.ShouldCloseOnBackgroundClick())\r\n this.OnClose();\r\n }\r\n}\r\n","/**\r\n * Service managing overlay windows\r\n * This is Magic's default provider\r\n */\r\nimport { Injectable } from \"@angular/core\";\r\nimport { MagicOverlayContainer } from \"../ui/magic-modal/magic-overlay-container\";\r\n\r\n@Injectable()\r\nexport class OverlayContainerMagicProvider {\r\n getComponent() {\r\n return MagicOverlayContainer;\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n\n/**\n * This is a base class for the magic confirm components\n */\n@Component({\n selector: 'mg-base-confirm',\n template: '',\n styles: ['']\n})\nexport class BaseMagicConfirmComponent {\n\n /**\n * title of the component\n */\n @Input() title: string;\n\n /**\n * message of the component\n */\n @Input() message: string;\n\n /**\n * onClose Event - to be raised when the component is closed\n * should pass true when OK is pressed and false when cancel is pressed\n */\n @Output() onClose = new EventEmitter<boolean>();\n\n\n /**\n * raises close Event\n * @param result true when OK is pressed and false when cancel is pressed\n *\n */\n OnClose(result) {\n this.onClose.emit(result);\n }\n}\n","\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\n\n/**\n * This is a base class for the magic alert components\n */\n@Component({\n selector: 'mg-base-alert',\n template: '',\n styles: ['']\n})\nexport class BaseMagicAlertComponent {\n\n\n /**\n * title of the component\n */\n @Input() title: string;\n\n /**\n * message of the component\n */\n @Input() message: string;\n\n /**\n * onClose Event - to be raised when the component is closed\n\n */\n @Output() onClose = new EventEmitter<void>();\n\n\n\n /**\n * close magic alert\n */\n OnClose() {\n this.onClose.emit();\n }\n}\n","import { Directive, ElementRef } from \"@angular/core\";\n\n/**\n * Directive for setting focus on element\n */\n@Directive({\n selector: '[magicFocus]'\n})\nexport class MagicFocusDirective {\n\n constructor(private hostElement: ElementRef) {}\n ngAfterViewInit() {\n this.hostElement.nativeElement.focus();\n }\n\n}\n","import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ViewChild,\r\n ViewContainerRef,\r\n ElementRef, NgModuleRef,\r\n Injector, ChangeDetectorRef, Compiler\r\n} from '@angular/core';\r\nimport { BaseMagicOverlayContainer } from \"./base-magic-overlay-container\";\r\nimport { BaseMagicConfirmComponent } from \"../components/base-magic-confirm.component\";\r\nimport { BaseMagicAlertComponent } from \"../components/base-magic-alert.component\";\r\nimport { OverlayType } from \"@magic-xpa/gui\";\r\nimport { ComponentListMagicService, ModuleData } from \"../../services/component-list.magic.service\";\r\nimport { IMagicViewContainerRef } from \"../../..\";\r\nimport {isNullOrUndefined} from '@magic-xpa/mscorelib';\r\nimport { MagicLazyLoaderService } from '../../services/magic.lazy.loader.service';\r\n\r\n\r\n@Component({\r\n selector: 'app-magic-overlay-container-wrapper',\r\n template: `\r\n <div>\r\n <div class=\"overlay-container-wrapper-background\" tabIndex=\"0\" style=\"width: 0px; height: 0px;\" magicFocus></div>\r\n <div class=\"overlay-container-wrapper-background\" #overlayContainerWrapper>\r\n <div #overlayContent magicViewContainerRef>\r\n </div>\r\n </div>\r\n <div class=\"overlay-container-wrapper-background\" tabIndex=\"0\" style=\"width: 0px; height: 0px;\" ></div>\r\n </div>\r\n `,\r\n styles: [`\r\n .overlay-container-wrapper-background {\r\n /* modal background fixed across whole screen */\r\n position: fixed;\r\n top: 0;\r\n z-index: 999;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n }\r\n `]\r\n})\r\nexport class MagicOverlayContainerWrapper implements IMagicViewContainerRef {\r\n /**\r\n *\r\n */\r\n @Input() public Component = null;\r\n /**\r\n *\r\n */\r\n @Input() public Parameters: any = {};\r\n\r\n @Input() private OverlayTypeParam: OverlayType;\r\n\r\n @Output() private onClose = new EventEmitter<void>();\r\n\r\n /**\r\n * HTML to be displayed in the modal window\r\n */\r\n overlayContentViewContainerRef: ViewContainerRef;\r\n\r\n @ViewChild('overlayContainerWrapper', { static: true }) overlayContainerWrapperElementRef: ElementRef;\r\n\r\n /**\r\n * @ignore\r\n * contais data of allowed base components to use\r\n */\r\n static allowedBaseComps = new Map<number, {comp: any, error: string}>([\r\n [OverlayType.Overlay, {comp: BaseMagicOverlayContainer, error:'BaseMagicOverlayContainer . Overlay '}],\r\n [OverlayType.Alert, {comp: BaseMagicAlertComponent, error:'BaseMagicAlertComponent. Alert '}],\r\n [OverlayType.ConfirmationBox, {comp: BaseMagicConfirmComponent, error :'BaseMagicConfirmComponent. Confirmation '}]\r\n ]);\r\n /**\r\n *\r\n * @param componentFactoryResolver\r\n */\r\n constructor(private componentListMagicService: ComponentListMagicService,\r\n private magicLazyModuleLoader: MagicLazyLoaderService,\r\n private injector: Injector,\r\n private changeDetectorRef:ChangeDetectorRef,\r\n private compiler: Compiler) {\r\n }\r\n\r\n /**\r\n *\r\n */\r\n ngOnInit() {\r\n let moduleRef: NgModuleRef<any> = this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);\r\n\r\n if (moduleRef == null) {\r\n let lazyLoadModule: ModuleData = this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName);\r\n\r\n if (lazyLoadModule != null) {\r\n const Magic: string = 'Magic';\r\n const Module: string = 'Module';\r\n\r\n // extract name of module(XX) from 'MagicXXModule'\r\n const moduleName = lazyLoadModule.moduleName.slice(Magic.length, -Module.length);\r\n this.magicLazyModuleLoader.Load(moduleName).then(m => {\r\n const compiled = this.compiler.compileModuleAndAllComponentsSync(<any>m[lazyLoadModule.moduleName]);\r\n moduleRef = compiled.ngModuleFactory.create(this.injector);\r\n this.loadComponent(moduleRef);\r\n });\r\n }\r\n else {\r\n this.loadComponent(null);\r\n }\r\n } else\r\n this.loadComponent(moduleRef);\r\n }\r\n\r\n private loadComponent(moduleRef: NgModuleRef<any>) {\r\n this.Parameters.ModalComp = this.componentListMagicService.getComponent(this.Parameters.MagicFormName, !isNullOrUndefined(this.Parameters.MagicFormName));\r\n\r\n\r\n let componentRef = this.overlayContentViewContainerRef.createComponent(this.Component);\r\n let allowedBaseComp = MagicOverlayContainerWrapper.allowedBaseComps.get(this.OverlayTypeParam);\r\n\r\n\r\n if (componentRef.instance instanceof allowedBaseComp.comp) {\r\n Object.assign(componentRef.instance, this.Parameters);\r\n (<any>componentRef.instance).onClose.subscribe((res) => {\r\n this.onClose.emit(res);\r\n });\r\n } else {\r\n let msg = \"Provided window container should subclass of : \" + allowedBaseComp.error + \"window will not work properly.\";\r\n alert(msg);\r\n }\r\n }\r\n\r\n setViewContainerRef(vcRef: ViewContainerRef){\r\n this.overlayContentViewContainerRef = vcRef;\r\n }\r\n\r\n GetRootElement(): HTMLElement {\r\n return this.overlayContainerWrapperElementRef.nativeElement;\r\n }\r\n\r\n DetectChanges()\r\n {\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n}\r\n","import { Component } from '@angular/core';\nimport { BaseMagicAlertComponent } from './base-magic-alert.component';\n\n\n/***\n * This is sample component for the alert message\n */\n@Component({\n selector: 'sample-magic-alert-component',\n template: `<div>\n <div class=\"mg-message-background\">\n <h2> {{title}}</h2>\n <p>{{message}} </p>\n\n <button (click)=\"OnClose()\">OK</button>\n </div>\n </div>`,\n styles: [`\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n `]\n})\nexport class MagicAlertComponent extends BaseMagicAlertComponent{\n\n}\n","import { Component } from '@angular/core';\nimport { BaseMagicConfirmComponent } from './base-magic-confirm.component';\n\n/***\n * This is sample component for the confirmation box\n */\n@Component({\n selector: 'sample-magic-confirmation-box',\n template: `<div>\n <div class=\"mg-message-background\">\n <h2> {{title}}</h2>\n {{message}}\n <br>\n <br>\n\n <button (click)=\"OnClose(true)\">OK</button>\n <button class=\"cancel\" (click)=\"OnClose(false)\">Cancel</button>\n </div>\n </div>`,\n styles: [`\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n \n button.cancel {\n background-color: #C1C1C1;\n }\n `]\n})\nexport class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {\n\n}\n","/**\r\n * Service managing overlay windows\r\n * This is Magic's default provider\r\n */\r\nimport { Injectable } from \"@angular/core\";\r\nimport { MagicAlertComponent } from '../ui/components/magic-alert.component';\r\nimport { MagicConfirmationBoxComponent } from \"../ui/components/magic-confirmation-box.component\";\r\n\r\n/**\r\n * Service managing alert and confirmation windows\r\n * This is Magic's default provider\r\n */\r\n@Injectable()\r\nexport class ConfirmationComponentsMagicProvider {\r\n\r\n /**\r\n * Return true when use default javascript alert and confirmation or return false to provide custom components\r\n * @returns true is we want to use default javascript alert and confirmation\r\n */\r\n showDefaultConfirmations():boolean{\r\n return true; \r\n }\r\n\r\n /**\r\n * Returns component that will replace javascript alert. The component will be used only if showDefaultConfirmations = false\r\n * @returns component that will replace javascript Alert\r\n */\r\n getAlertComponent() : any {\r\n return MagicAlertComponent;\r\n }\r\n\r\n /**\r\n * Returns component that will replace javascript confirmation box. The component will be used only if showDefaultConfirmations = false\r\n * @returns component that will replace javascript confirmation box\r\n */\r\n getConfirmtionComponent() : any {\r\n return MagicConfirmationBoxComponent;\r\n }\r\n\r\n\r\n\r\n}\r\n","import {Styles} from \"@magic-xpa/gui\";\r\n\r\n/**\r\n * Displays a message-box\r\n */\r\nexport class confirmationBox {\r\n\r\n /**\r\n * @ignore\r\n */\r\n public static isConfirmBox(style : Styles): Boolean{\r\n\r\n // button format mask is in first nibble from right\r\n let buttonMode = <number>style & 0x0F;\r\n\r\n var isConfirm = (buttonMode === Styles.MSGBOX_BUTTON_OK_CANCEL) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_YES_NO_CANCEL) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_YES_NO) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_RETRY_CANCEL);\r\n\r\n return (isConfirm);\r\n }\r\n\r\n /**\r\n * Converts the result from the HTML window to the expected result type\r\n * @param style Result received from HTML window\r\n * @param okWasPressed Was the \"OK\" pressed\r\n * @returns MessageBox result type\r\n */\r\n public static convertToExcpectedResultBox (style: Styles, okWasPressed: Boolean ): Styles{\r\n\r\n // button format mask is in first nibble from right\r\n let buttonMode = <number>style & 0x0F;\r\n\r\n let retValue = Styles.MSGBOX_RESULT_OK;\r\n\r\n if (buttonMode === Styles.MSGBOX_BUTTON_OK)\r\n retValue = Styles.MSGBOX_RESULT_OK;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_OK_CANCEL)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_OK : Styles.MSGBOX_RESULT_CANCEL;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_ABORT : Styles.MSGBOX_RESULT_RETRY;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_YES_NO_CANCEL)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_YES : Styles.MSGBOX_RESULT_NO;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_YES_NO)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_YES : Styles.MSGBOX_RESULT_NO;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_RETRY_CANCEL)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_RETRY : Styles.MSGBOX_RESULT_CANCEL;\r\n\r\n return retValue;\r\n }\r\n\r\n /**\r\n * Show a message box as an HTML window\r\n * @param title Title of the message box\r\n * @param message Message that will be display in the message box\r\n * @param style Style that include buttons \\ Icons\r\n * @returns MessageBox result\r\n */\r\n public static showConfirmationBox(title: string, message: string, style: Styles): boolean {\r\n\r\n let okWasPressed = false;\r\n// check if it is confirmation box\r\n let isConfirm = this.isConfirmBox(style);\r\n\r\n // the title will be added to the string and we will add new line after the title\r\n let titleAndString = title + '\\n'+ '\\n' + message;\r\n\r\n if (isConfirm)\r\n okWasPressed = confirm(titleAndString);\r\n else {\r\n alert(titleAndString);\r\n okWasPressed = true;\r\n }\r\n\r\n // return the result from the user\r\n return okWasPressed; \r\n }\r\n}\r\n","import { Component, ComponentRef, Injectable, Injector, ChangeDetectorRef, Compiler,\r\n NgModuleRef,\r\n ViewContainerRef\r\n} from \"@angular/core\";\r\nimport {ComponentListMagicService, ModuleData} from \"./component-list.magic.service\";\r\nimport {EngineMagicService} from \"./engine.magic.service\";\r\nimport {IGuiEvent, getGuiEventObj} from \"@magic-xpa/engine\";\r\nimport { OverlayContainerMagicProvider } from \"./overlay.conainer.magic.provider\";\r\nimport { MagicOverlayContainerWrapper } from \"../ui/magic-modal/magic-overlay-container-wrapper\";\r\nimport { ConfirmationComponentsMagicProvider } from \"./confirmation.components.magic.provider\";\r\nimport { OverlayType, Styles } from \"@magic-xpa/gui\";\r\nimport { confirmationBox } from \"../ui/magic-confirmationBox\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\nimport {MagicLazyLoaderService} from \"./magic.lazy.loader.service\";\r\n\r\n\r\n\r\n\r\n/**\r\n * Service managing overlay windows\r\n */\r\n@Injectable({\r\n providedIn:'root'\r\n})\r\nexport class OverlayWindowService {\r\n\r\n constructor(\r\n protected componentList:ComponentListMagicService,\r\n protected engineMagicService: EngineMagicService,\r\n private magicLazyModuleLoader: MagicLazyLoaderService,\r\n private injector: Injector,\r\n private compiler: Compiler,\r\n private overlayContainerMagicProvider: OverlayContainerMagicProvider,\r\n private confirmationComponentsMagicProvider: ConfirmationComponentsMagicProvider) {\r\n }\r\n\r\n // The view reference of container of overlay window\r\n private overlayWindowsContainerViewRef: ViewContainerRef;\r\n\r\n private overlayWindowFocusManager: OverlayWindowFocusManager = null;\r\n\r\n private changeDetectorRef: ChangeDetectorRef = null;\r\n\r\n init(overlayWindowsContainerViewRef: ViewContainerRef, rootMagicElement: Element, changeDetectorRef: ChangeDetectorRef) {\r\n this.overlayWindowsContainerViewRef = overlayWindowsContainerViewRef;\r\n this.overlayWindowFocusManager = new OverlayWindowFocusManager(rootMagicElement);\r\n this.changeDetectorRef = changeDetectorRef;\r\n }\r\n\r\n loadAndOpenModule (formName: string, taskId: string, taskDescription: string): void {\r\n let moduleRef: NgModuleRef<any> = this.componentList.getModuleRef(formName);\r\n\r\n if (moduleRef == null) {\r\n let lazyLoadModule: ModuleData = this.componentList.getLazyLoadModuleData(formName);\r\n\r\n if (lazyLoadModule != null) {\r\n const Magic: string = 'Magic';\r\n const Module: string = 'Module';\r\n\r\n // extract name of module(XX) from 'MagicXXModule'\r\n const moduleName = lazyLoadModule.moduleName.slice(Magic.length, -Module.length);\r\n this.magicLazyModuleLoader.Load(moduleName).then(m => {\r\n const compiled = this.compiler.compileModuleAndAllComponentsSync(<any>m[lazyLoadModule.moduleName]);\r\n moduleRef = compiled.ngModuleFactory.create(this.injector);\r\n this.open(formName, taskId, taskDescription);\r\n this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);\r\n });\r\n }\r\n }\r\n else {\r\n this.open(formName, taskId, taskDescription);\r\n this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);\r\n }\r\n }\r\n\r\n open(formName: string, taskId: string, taskDescription: string) {\r\n\r\n // for overlay which are lazy loaded don't find data in component-list\r\n let comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null :this.componentList.getComponent(formName);\r\n let parameters = { taskIdParam: taskId, taskDescription: taskDescription };\r\n\r\n let componentRef = this.createModalComponent({ MagicFormName: formName, ModalComp: comp, ModalCompParameters: parameters}, <Component>this.overlayContainerMagicProvider.getComponent(), OverlayType.Overlay);\r\n\r\n componentRef.instance.onClose.subscribe(() => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"close\", null, 0);\r\n guiEvent.TaskID = taskId;\r\n this.engineMagicService.insertEvent(guiEvent);\r\n });\r\n\r\n //using the same changeDetectorRef from root-component\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n close(commandStr: string) {\r\n // Close the overlay by removing the overlay window from its container\r\n this.overlayWindowsContainerViewRef.remove();\r\n this.overlayWindowFocusManager.popDialog();\r\n\r\n let guiEvent1: IGuiEvent = getGuiEventObj(\"dispose\", null, 0);\r\n guiEvent1.TaskID = commandStr;\r\n this.engineMagicService.insertEvent(guiEvent1);\r\n }\r\n\r\n\r\n /**\r\n * Open Confirmation box\r\n * @param title title of the box\r\n * @param msg message\r\n * @param style Magic style\r\n */\r\n openConfirmationBox( title: string, msg: string, style: Styles) {\r\n\r\n //show default confirmations\r\n if (this.confirmationComponentsMagicProvider.showDefaultConfirmations())\r\n {\r\n let res = confirmationBox.showConfirmationBox(title, msg, style);\r\n this.finishConfirmation( style, res);\r\n\r\n }\r\n else\r\n {\r\n //show custom confirmations\r\n let comp = confirmationBox.isConfirmBox(style) ? this.confirmationComponentsMagicProvider.getConfirmtionComponent() :this.confirmationComponentsMagicProvider.getAlertComponent() ;\r\n let overlayType = confirmationBox.isConfirmBox(style)? OverlayType.ConfirmationBox : OverlayType.Alert;\r\n let componentRef = this.createModalComponent({ title: title, message: msg }, comp, overlayType);\r\n\r\n componentRef.instance.onClose.subscribe((res : boolean) => {\r\n this.overlayWindowsContainerViewRef.remove();\r\n this.overlayWindowFocusManager.popDialog();\r\n this.finishConfirmation( style, res);\r\n });\r\n }\r\n }\r\n /**\r\n * This method is called on close of the confirmation\r\n * @param style Magic style\r\n * @param result\r\n */\r\n finishConfirmation(style: Styles, result: boolean ) {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"confirmationClosed\", null, 0);\r\n guiEvent.keyCode = <number>confirmationBox.convertToExcpectedResultBox(style, result);\r\n this.engineMagicService.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * creates a modal component. Can be used for overlay, message box or confirmation box\r\n * @param parameters component's parameters\r\n * @param component components to create\r\n */\r\n private createModalComponent(parameters: any, component: Component, overlayType: OverlayType): ComponentRef<any> {\r\n let componentRef;\r\n let magicModalContainerParameters = {\r\n Component: component,\r\n Parameters: parameters,\r\n OverlayTypeParam: overlayType\r\n\r\n };\r\n\r\n // Create the UI component of modal window\r\n let viewCRef : ViewContainerRef = <ViewContainerRef>this.overlayWindowsContainerViewRef;\r\n componentRef = viewCRef.createComponent(MagicOverlayContainerWrapper);\r\n\r\n // Set the data to newly created component\r\n Object.assign(componentRef.instance, magicModalContainerParameters);\r\n\r\n this.overlayWindowFocusManager.pushDialog(componentRef.instance.GetRootElement());\r\n\r\n componentRef.instance.DetectChanges();\r\n\r\n return componentRef;\r\n }\r\n}\r\n\r\nclass OverlayWindowFocusManager\r\n{\r\n private rootMagicElement: Element = null;\r\n private openDialogList: Array<DialogInfo> = new Array(0);\r\n private ignoreUtilFocusChanges: boolean = false;\r\n private lastFocus = null;\r\n private focusListener = null;\r\n\r\n constructor (rootMagicElement: Element) {\r\n this.rootMagicElement = rootMagicElement;\r\n }\r\n\r\n pushDialog(rootElement: HTMLElement) {\r\n if (this.openDialogList.length === 0) {\r\n this.focusListener = this.trapFocus.bind(this);\r\n document.addEventListener('focus', this.focusListener, true);\r\n }\r\n\r\n this.openDialogList.push(new DialogInfo(rootElement, (document.activeElement instanceof HTMLElement ? <HTMLElement>document.activeElement : null)));\r\n }\r\n\r\n popDialog() {\r\n const dialogInfo = this.openDialogList.pop();\r\n this.attemptFocus(dialogInfo.FocusElementOnClose);\r\n\r\n if (this.openDialogList.length === 0) {\r\n document.removeEventListener('focus', this.focusListener, true);\r\n this.focusListener = null;\r\n }\r\n }\r\n\r\n trapFocus (event) {\r\n if (this.ignoreUtilFocusChanges) {\r\n return;\r\n }\r\n\r\n if (this.openDialogList.length > 0) {\r\n var currentDialog = this.openDialogList[this.openDialogList.length - 1].RootElement;\r\n if (currentDialog.contains(event.target)) {\r\n this.lastFocus = event.target;\r\n }\r\n else {\r\n if (this.rootMagicElement.contains(event.target)) {\r\n this.focusFirstDescendant(currentDialog);\r\n if (this.lastFocus == document.activeElement) {\r\n this.focusLastDescendant(currentDialog);\r\n }\r\n }\r\n this.lastFocus = document.activeElement;\r\n }\r\n }\r\n }\r\n\r\n private focusFirstDescendant (element) {\r\n for (var i = 0; i < element.childNodes.length; i++) {\r\n var child = element.childNodes[i];\r\n if (this.attemptFocus(child) ||\r\n this.focusFirstDescendant(child)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n private focusLastDescendant (element) {\r\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\r\n var child = element.childNodes[i];\r\n if (this.attemptFocus(child) ||\r\n this.focusLastDescendant(child)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n private attemptFocus (element) {\r\n if (!this.isFocusable(element)) {\r\n return false;\r\n }\r\n\r\n this.ignoreUtilFocusChanges = true;\r\n try {\r\n element.focus();\r\n }\r\n catch (e) {\r\n }\r\n this.ignoreUtilFocusChanges = false;\r\n return (document.activeElement === element);\r\n };\r\n\r\n private isFocusable (element) {\r\n if (isNullOrUndefined(element))\r\n return false;\r\n\r\n if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) {\r\n return true;\r\n }\r\n else if (element.tabIndex < 0)\r\n return false;\r\n\r\n if (element.disabled) {\r\n return false;\r\n }\r\n\r\n switch (element.nodeName) {\r\n case 'A':\r\n return !!element.href && element.rel != 'ignore';\r\n case 'INPUT':\r\n return element.type != 'hidden' && element.type != 'file';\r\n case 'BUTTON':\r\n case 'SELECT':\r\n case 'TEXTAREA':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n}\r\n\r\nclass DialogInfo\r\n{\r\n private rootElement: HTMLElement;\r\n private focusElementOnClose: HTMLElement;\r\n\r\n constructor(rootElement: HTMLElement, focusElementOnClose: HTMLElement) {\r\n this.rootElement = rootElement;\r\n this.focusElementOnClose = focusElementOnClose;\r\n }\r\n\r\n get RootElement(): HTMLElement {\r\n return this.rootElement;\r\n }\r\n\r\n get FocusElementOnClose(): HTMLElement {\r\n return this.focusElementOnClose;\r\n }\r\n}\r\n\r\n\r\n","import {EventEmitter, Injectable} from '@angular/core';\r\nimport {AbstractControl, FormControl, FormGroup, ValidationErrors, ValidatorFn} from '@angular/forms';\r\nimport {filter} from 'rxjs/operators';\r\nimport {Subject, Subscription, EMPTY} from 'rxjs';\r\n\r\nimport {isNullOrUndefined, isUndefined} from '@magic-xpa/mscorelib';\r\nimport {StylesMapManager} from './StylesMapManager';\r\n\r\nimport {EngineMagicService} from './engine.magic.service';\r\nimport {ControlMetadata, Records} from '../controls.metadata.model';\r\nimport {CommandType, CustomValidator, GuiCommand, GuiConstants, GuiInteractive, HtmlProperties} from '@magic-xpa/gui';\r\n\r\nimport {NString, StringBuilder} from '@magic-xpa/mscorelib';\r\nimport {StorageAttribute} from '@magic-xpa/utils';\r\nimport {getGuiEventObj, IGuiEvent} from '@magic-xpa/engine';\r\nimport {SubformMagicService} from './subform.magic.service';\r\nimport {TitleMagicService} from './title.magic.service';\r\nimport {AccessorMagicService} from './accessor.magic.service';\r\nimport {GuiInteractiveExecutor} from '../ui/GuiInteractiveExecutor';\r\nimport {OverlayWindowService} from './OverlayWindowService';\r\n\r\n/**\r\n * Main service to connect the UI with the Magic WebCLient\r\n */\r\n@Injectable()\r\nexport class TaskMagicService {\r\n\r\n /**\r\n * Service to provide table-related functionalities\r\n */\r\n public tableService: any;\r\n /**\r\n * Collection of data for all controls\r\n */\r\n Records: any = new Records();\r\n /**\r\n * FormGroup collection for line mode\r\n */\r\n formGroups: Array<FormGroup> = [];\r\n /**\r\n * FormGroup for all controls in screen mode\r\n */\r\n ScreenModeControls: FormGroup;\r\n /**\r\n * @ignore\r\n */\r\n refreshDom: Subject<GuiCommand> = new Subject();\r\n /**\r\n * @ignore\r\n */\r\n subscribeRefreshDom: Subscription;\r\n /**\r\n * @ignore\r\n */\r\n detectChanges: Subject<any> = new Subject();\r\n /**\r\n * @ignore\r\n */\r\n subscribeInteractiveCommands: Subscription;\r\n\r\n /**\r\n * @ignore\r\n */\r\n interactiveCommands: Subject<GuiInteractive>= new Subject();\r\n\r\n /**\r\n * @ignore\r\n * This event is emitted when the selected row in a table changes.\r\n */\r\n OnSelectedRowChanged: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n customPropertiesSubject: Subject<any> = new Subject();\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n recordsCountChangeSubject: Subject<any> = new Subject();\r\n\r\n mgLoadSubject: Subject<any> = new Subject();\r\n\r\n /**\r\n * @ignore\r\n */\r\n public template: { [id: string]: string; };\r\n /**\r\n * Service to provide subform-related functionalities\r\n */\r\n public mgSubformService: SubformMagicService;\r\n /**\r\n * Service to provide the title-change functionality\r\n */\r\n public mgTitleService: TitleMagicService;\r\n /**\r\n * Service which enables getting/setting values from/to the Magic WebClient engine\r\n */\r\n public mgAccessorService: AccessorMagicService;\r\n\r\n public mgInputDateFormat;\r\n\r\n /**\r\n * @ignore\r\n */\r\n oldPageSize = 0;\r\n\r\n /**\r\n *\r\n * @param magic\r\n */\r\n constructor(protected magic: EngineMagicService, private overlayWindowService: OverlayWindowService) {\r\n this.Records.setGuiTopIndex(0);\r\n this.mgInputDateFormat = null;\r\n }\r\n\r\n /**\r\n * returns true if used is logged in\r\n * @returns\r\n */\r\n public getIsLoggenIn(): boolean {\r\n return this.magic.getIsLoggedIn();\r\n }\r\n\r\n /**\r\n * Id of task to which this service refers\r\n */\r\n _taskId: string;\r\n\r\n /**\r\n * returns the task Id\r\n * @returns\r\n */\r\n get taskId() {\r\n return this._taskId;\r\n }\r\n\r\n /**\r\n * Sets the task Id\r\n * @param value the task id to set\r\n */\r\n set taskId(value) {\r\n // debugger;\r\n this._taskId = value;\r\n }\r\n\r\n /**\r\n * Returns the task's data in Screen mode\r\n * @returns\r\n */\r\n get ScreenControlsData() {\r\n return this.Records.list['0'];\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n settemplate(value: any) {\r\n this.template = value;\r\n }\r\n\r\n\r\n /**\r\n * Builds the FormControl for each and every control\r\n */\r\n buildScreenModeControls() {\r\n const group: FormGroup = new FormGroup({});\r\n for (const key in this.template) {\r\n\r\n if (this.template[key] == '0') {\r\n let fc = new FormControl('');\r\n this.setStubValue(0, fc, key);\r\n group.addControl(key, fc);\r\n }\r\n }\r\n\r\n this.ScreenModeControls = group;\r\n }\r\n\r\n /**\r\n * Is the control a table control\r\n * @param id Id of the control\r\n * @returns\r\n */\r\n isTableControl(id: string): boolean {\r\n return this.template[id] == '1';\r\n }\r\n\r\n getMgInputDateFormat(): string {return this.mgInputDateFormat;}\r\n\r\n /**\r\n * Returns the FormControl of a control\r\n * @param guiRowid Id of the requested row\r\n * @param id Id of the control\r\n * @returns\r\n */\r\n getFormControl(guiRowid: string, id: string): AbstractControl {\r\n let c: AbstractControl;\r\n let group: FormGroup = this.isTableControl(id) ? this.formGroups[guiRowid] : this.ScreenModeControls;\r\n if (!isNullOrUndefined(group)) {\r\n group.get(id);\r\n c = group.controls[id];\r\n }\r\n return c;\r\n }\r\n\r\n /**\r\n * handle the change of text for input control inside table\r\n * @param guiRowId Id of the row for which the FormControls are built\r\n * set the new value of the formcontrol\r\n */\r\n setInputTextValue(controlId: string, guiRowid: string, val: any) {\r\n this.setValue(controlId, guiRowid, this.ConvertValToNative(controlId, 0, val));\r\n\r\n const fc = this.getFormControl(guiRowid, controlId);\r\n if (!isNullOrUndefined(val))\r\n fc.setValue(val);\r\n }\r\n\r\n /**\r\n * Build the FormControls for a table row\r\n * @param guiRowId Id of the row for which the FormControls are built\r\n */\r\n buildTableRowControls(guiRowId: number) {\r\n\r\n const group: FormGroup = new FormGroup({});\r\n\r\n for (const key in this.template) {\r\n\r\n if (this.template[key] == '1') {\r\n let fc = new FormControl('');\r\n this.setStubValue(guiRowId, fc, key);\r\n group.addControl(key, fc);\r\n }\r\n }\r\n this.formGroups[guiRowId] = group;\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @ignore\r\n */\r\n updateRecordsBeforeCurrentView(value: number) {\r\n this.Records.recordsBeforeCurrentView = value;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setIncludesFirst(value: boolean): void {\r\n this.Records.includesFirst = value;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setIncludesLast(value: boolean): void {\r\n this.Records.includesLast = value;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n markRowAsCreated(guiRowId: number): void {\r\n this.Records.markRowAsCreated(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n markRowAsNotCreated(guiRowId: number): void {\r\n this.Records.markRowAsNotCreated(guiRowId);\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n startRowEditing(guiRowId: number): void {\r\n this.Records.startRowEditing(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n stopRowEditing(guiRowId: number): void {\r\n this.Records.stopRowEditing(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n isRowInRowEditing(guiRowId: string): boolean {\r\n return this.Records.isRowInRowEditing(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setIsEmptyDataView(isEmpty: boolean) {\r\n if (this.Records.isEmptyDataView !== isEmpty) {\r\n\r\n if (isEmpty)\r\n this.recordsCountChangeSubject.next(0);\r\n\r\n this.Records.isEmptyDataView = isEmpty;\r\n this.tableService.refreshDataSource();\r\n this.refreshView();\r\n }\r\n }\r\n\r\n /**\r\n * Initialize the service to work with the task\r\n * @param taskId Id of the task\r\n * @param taskDescription\r\n */\r\n initTask(taskId, taskDescription) {\r\n this.Records.createFirst();\r\n this.oldPageSize = 0;\r\n if (this.IsStub()) {\r\n this.loadData();\r\n } else {\r\n this.taskId = taskId;\r\n this.settemplate(taskDescription);\r\n }\r\n this.buildScreenModeControls();\r\n\r\n // remove previous subscriptions\r\n if(!isNullOrUndefined(this.subscribeRefreshDom))\r\n this.subscribeRefreshDom.unsubscribe();\r\n if(!isNullOrUndefined(this.subscribeInteractiveCommands))\r\n this.subscribeInteractiveCommands.unsubscribe();\r\n\r\n this.subscribeRefreshDom = this.magic.refreshDom.pipe(filter(command => command.TaskTag === this.taskId))\r\n .subscribe(command => {\r\n // console.log(\"Task \" + command.TaskTag + \"command \" + command.CommandType);\r\n this.executeCommand(command);\r\n });\r\n this.subscribeInteractiveCommands = this.magic.interactiveCommands\r\n .pipe(filter(command => command.TaskTag === this.taskId))\r\n .subscribe(command => {\r\n // console.log(\"Task \" + command.TaskTag + \"command \" + command.CommandType);\r\n this.executeInteractiveCommand(command);\r\n });\r\n\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n refreshView() {\r\n this.detectChanges.next('');\r\n }\r\n\r\n /**\r\n * Insert an event to the Magic WebClient event queue\r\n * @param guiEvent The event to insert\r\n */\r\n insertEvent(guiEvent: IGuiEvent): void {\r\n guiEvent.TaskID = this.taskId;\r\n this.magic.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n GetControlPictureMask(controlName: string): any {\r\n return this.magic.GetControlPictureMask(this.taskId, controlName);\r\n }\r\n\r\n /**\r\n * Validates the control value, using the Magic WebClient\r\n * @param controlName Id of validated control\r\n * @param value value to be validated\r\n * @returns If validation fails, returns error message, else returns null\r\n */\r\n ValidateControlValue(controlName: string, value: any): string {\r\n return this.magic.ValidateControlValue(this.taskId, controlName, value);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n GetRangedValue(controlName: string, value: string): string {\r\n return this.magic.GetRangedValue(this.taskId, controlName, value);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n GetFldRanges(controlName: string): string {\r\n return this.magic.GetFldRanges(this.taskId, controlName);\r\n }\r\n\r\n /**\r\n * returns the value of a property of the control\r\n * @param controlId Id of control\r\n * @param prop Property\r\n * @param guiRowId Row Id, if applicable\r\n * @returns Property value\r\n */\r\n getProperty(controlId: string, prop: HtmlProperties, guiRowId?: string) {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n if (this.IsStub())\r\n return this.getPropertyStub(this.Records.list[guiRowId], controlId, prop);\r\n else {\r\n let rec = this.Records.list[guiRowId];\r\n if (isNullOrUndefined(rec))\r\n debugger;\r\n else\r\n return this.Records.list[guiRowId].getProperty(controlId, prop);\r\n\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getPropertyStub(ControlsProperties: any, controlId, prop) {\r\n ControlsProperties = ControlsProperties.ControlsProperties;\r\n if (controlId in ControlsProperties) {\r\n if (prop in ControlsProperties[controlId].properties) {\r\n return ControlsProperties[controlId].properties[prop];\r\n }\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getStyleStub(ControlsProperties: any, controlId, styleName: string) {\r\n ControlsProperties = ControlsProperties.ControlsProperties;\r\n return ControlsProperties[controlId].stylesMap.get(styleName);\r\n }\r\n\r\n /**\r\n * Return the CSS classes used for this control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @returns String containing the classes currently defined for this control\r\n */\r\n getClasses(controlId: string, guiRowId?: string): string {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n return this.Records.list[guiRowId].getControlMetadata(controlId).classes;\r\n\r\n }\r\n\r\n /**\r\n * Return the value of a style used for a control\r\n * @param controlId Id of control\r\n * @param styleName Name of style\r\n * @param guiRowId Row Id, if applicable\r\n * @returns value of style of the control\r\n */\r\n getStyle(controlId: string, styleName: string, guiRowId?: string): string {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n if (this.IsStub())\r\n return this.getStyleStub(this.Records.list[guiRowId], controlId, styleName);\r\n else {\r\n let magicValue = this.Records.list[guiRowId].getControlMetadata(controlId).stylesMap.get(styleName);\r\n return StylesMapManager.magicValueGetStyle(styleName, magicValue);\r\n }\r\n }\r\n\r\n /**\r\n * Return the value of a control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @returns value of the control\r\n */\r\n getValue(controlId: string, guiRowId?: string) {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';\r\n\r\n }\r\n\r\n /**\r\n * Return the formatted value of a control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @returns value of the control\r\n */\r\n getFormattedValue(controlName: string, val: any, rowId?: string): string {\r\n\r\n return this.magic.GetFormattedValue(this.taskId, controlName, val, rowId);\r\n }\r\n\r\n /**\r\n * Sets the value of a control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @param value Value to set\r\n */\r\n setValue(controlId: string, guiRowId: string, value: any): void {\r\n return this.Records.list[guiRowId].setValue(controlId, value);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n protected executeInteractiveCommand(guiInteractiveCommand: GuiInteractive)\r\n {\r\n GuiInteractiveExecutor.executeInteractiveCommand(this, guiInteractiveCommand, this.overlayWindowService);\r\n this.interactiveCommands.next(guiInteractiveCommand)\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n handleSetProperty(command: GuiCommand, isTableChild: boolean): void {\r\n let controlId = command.CtrlName;\r\n let dvRowId: number = (command.line || 0);\r\n let guiRowId: number = this.getGuiRowId(dvRowId, isTableChild);\r\n let properties: ControlMetadata;\r\n\r\n if (command.Operation === HtmlProperties.SelectedRow) {\r\n if (command.obj1 !== GuiConstants.NO_ROW_SELECTED) {\r\n guiRowId = this.getGuiRowId(command.obj1, true);\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.properties.set(command.Operation, command.line);\r\n this.tableService.selectRow(guiRowId.toString());\r\n this.OnSelectedRowChanged.emit(guiRowId.toString());\r\n }\r\n } else if (command.Operation === HtmlProperties.Enabled) {\r\n let c = this.getFormControl(guiRowId.toString(), controlId);\r\n if (!isNullOrUndefined(c)) {\r\n if (command.obj1)\r\n c.enable();\r\n else\r\n c.disable();\r\n }\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.properties.set(command.Operation, command.obj1);\r\n } else {\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.properties.set(<HtmlProperties>command.Operation, command.obj1);\r\n }\r\n }\r\n\r\n\r\n executeCommand(command: GuiCommand): void {\r\n let dvRowId: number = (command.line || 0);\r\n let guiRowId: number = 0;\r\n let controlId = command.CtrlName;\r\n let properties: ControlMetadata;\r\n let isTableChild: boolean = this.isTableControl(controlId);\r\n\r\n // For non-input type controls on table.\r\n if (command.obj !== null)\r\n isTableChild = isTableChild || command.obj.IsTableChild;\r\n\r\n guiRowId = this.getGuiRowId(dvRowId, isTableChild);\r\n\r\n switch (command.CommandType) {\r\n case CommandType.SET_IS_LOGGED_IN:\r\n break;\r\n\r\n case CommandType.SET_TABLE_TOP_INDEX:\r\n this.tableService.setTableTopIndex(command.number);\r\n break;\r\n case CommandType.REFRESH_TASK:\r\n this.tableService.refreshDataSource();\r\n this.refreshView();\r\n\r\n break;\r\n case CommandType.SET_TABLE_ITEMS_COUNT:\r\n if (!isUndefined(command.number)) {\r\n this.tableService.updateTableSize(command.number);\r\n\r\n if (command.number > 0 && this.Records.sizeUpdated &&\r\n !this.Records.isEmptyDataView) {\r\n this.recordsCountChangeSubject.next(command.number);\r\n this.Records.sizeUpdated = false;\r\n }\r\n }\r\n break;\r\n case CommandType.SET_CHUNK_SIZE:\r\n if (!isUndefined(command.number)) {\r\n this.tableService.setChunkSize(command.number);\r\n }\r\n break;\r\n case CommandType.SET_RECORDS_BEFORE_CURRENT_VIEW:\r\n this.updateRecordsBeforeCurrentView(command.number);\r\n break;\r\n\r\n case CommandType.CREATE_TABLE_ROW:\r\n guiRowId = this.getGuiRowId(command.number, true);\r\n this.buildTableRowControls(guiRowId);\r\n this.markRowAsCreated(guiRowId);\r\n break;\r\n\r\n case CommandType.SET_IS_ROW_EDITING:\r\n guiRowId = this.getGuiRowId(command.line, command.value);\r\n this.startRowEditing(guiRowId);\r\n break;\r\n\r\n case CommandType.SET_NOT_IS_ROW_EDITING:\r\n guiRowId = this.getGuiRowId(command.line, command.value);\r\n this.stopRowEditing(guiRowId);\r\n break;\r\n\r\n\r\n case CommandType.UNDO_CREATE_TABLE_ROW:\r\n this.markRowAsNotCreated(this.getGuiRowId(command.number, true));\r\n break;\r\n\r\n\r\n case CommandType.SET_TABLE_INCLUDES_FIRST:\r\n this.setIncludesFirst(command.Bool1);\r\n break;\r\n case CommandType.SET_TABLE_INCLUDES_LAST:\r\n this.setIncludesLast(command.Bool1);\r\n break;\r\n\r\n\r\n case CommandType.SET_PROPERTY:\r\n this.handleSetProperty(command, isTableChild);\r\n if (command.Operation == HtmlProperties.ReadOnly ||\r\n command.Operation == HtmlProperties.ItemsList ||\r\n command.Operation == HtmlProperties.CheckBoxIndeterminate)\r\n this.refreshDom.next(command);\r\n break;\r\n\r\n case CommandType.PROP_SET_USER_PROPERTY:\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n // if the property has changed, set the property and raise the subject\r\n if(properties.userProperties.get(command.Operation)!== command.obj1) {\r\n properties.userProperties.set(command.Operation, command.obj1);\r\n // the property name is of format <controlName>~<propertyName>\r\n this.customPropertiesSubject.next({ propertyName: controlId + '~' + command.Operation, value: command.obj1, rowId: guiRowId });\r\n }\r\n break;\r\n\r\n case CommandType.PROP_SET_CUSTOM_VALIDATOR: {\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n\r\n let control = this.getFormControl(guiRowId.toString(), controlId);\r\n if (control != null) {\r\n properties.customValidators.set(command.Operation, command.obj1);\r\n if (control.validator != null)\r\n control.setValidators([control.validator, this.customValidator(guiRowId.toString(), controlId)]);\r\n else\r\n control.setValidators(this.customValidator(guiRowId.toString(), controlId));\r\n\r\n control.updateValueAndValidity();\r\n }\r\n }\r\n break;\r\n\r\n case CommandType.SET_CLASS:\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.setClass(command.Operation, command.obj1);\r\n break;\r\n\r\n case CommandType.SET_STYLE:\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.setStyle(command.Operation, command.obj1);\r\n break;\r\n\r\n case CommandType.SET_ATTRIBUTE:\r\n properties = this.Records.list[0].getControlMetadata(controlId);\r\n properties.dataType = <StorageAttribute>String.fromCharCode(command.number);\r\n break;\r\n\r\n case CommandType.SET_VALUE:\r\n this.Records.list[guiRowId].values[controlId] = command.value;\r\n let c = this.getFormControl(guiRowId.toString(), controlId);\r\n if (!isNullOrUndefined(c)) {\r\n c.setValue(this.ConvertValFromNative(controlId, command.line, command.value));\r\n }\r\n\r\n break;\r\n\r\n case CommandType.CREATE_SUB_FORM:\r\n this.mgSubformService.addSubformComp(command.CtrlName, command.userDropFormat.toString(), command.str, command.fileName, command.contextID, command.params, command.Bool1);\r\n break;\r\n\r\n case CommandType.CLOSE_SUB_FORM:\r\n this.mgSubformService.deleteSubformComp(command.CtrlName, command.userDropFormat.toString());\r\n break;\r\n\r\n case CommandType.SET_EMPTY_DATAVIEW:\r\n this.setIsEmptyDataView(command.Bool1);\r\n break;\r\n\r\n case CommandType.SET_FOCUS:\r\n this.refreshDom.next(command);\r\n break;\r\n\r\n case CommandType.SET_WC_IDLE:\r\n this.mgLoadSubject.next(EMPTY);\r\n break;\r\n }\r\n\r\n }\r\n\r\n /**\r\n custom validator\r\n */\r\n customValidator(rowid: string, id: string): ValidatorFn {\r\n\r\n return (control: AbstractControl): ValidationErrors => {\r\n let controlMetadata: ControlMetadata;\r\n controlMetadata = this.Records.list[rowid].getControlMetadata(id);\r\n for (let key of controlMetadata.customValidators.keys()) {\r\n let validator = controlMetadata.customValidators.get(key);\r\n if (!(<CustomValidator>validator).isValid()) {\r\n return { [key]: true };\r\n }\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n /**\r\n * COnvert a value from Magic format to native format\r\n * @param controlId Id of control\r\n * @param rowId Row Id, if applicable\r\n * @param val Value to convert\r\n * @returns Converted value\r\n */\r\n ConvertValToNative(controlId: string, rowId: number, val: any): any {\r\n\r\n let properties: ControlMetadata;\r\n properties = this.Records.list[0].getControlMetadata(controlId);\r\n\r\n switch (properties.dataType) {\r\n\r\n case StorageAttribute.BOOLEAN: {\r\n if (typeof val === 'string') {\r\n let ranges: string = this.GetFldRanges(controlId);\r\n let found: number = ranges.indexOf(',');\r\n let trueOption: string = ranges.substr(0, found);\r\n let falseOption: string = ranges.substr(found + 1);\r\n if (NString.Equals(val, trueOption, true))\r\n return true;\r\n else if (NString.Equals(val, falseOption, true))\r\n return false;\r\n else\r\n return val;\r\n } else\r\n return val;\r\n }\r\n\r\n case StorageAttribute.TIME: {\r\n if (typeof val === 'string'){\r\n let idx = val.indexOf(':',0);\r\n let hours: number = +val.substr(0, idx);\r\n let minutes: number = +val.substr(idx+1, 2);\r\n let seconds = 0;\r\n if (val.length > 5) {\r\n idx = val.indexOf(':', idx + 1);\r\n if (idx >= 0)\r\n seconds = +val.substr(idx + 1, 2);\r\n }\r\n if (val.indexOf('PM')>0)\r\n hours += 12;\r\n let dt: Date = new Date();\r\n dt.setHours(hours);\r\n dt.setMinutes(minutes);\r\n dt.setSeconds(seconds);\r\n\r\n\r\n return dt;\r\n } else\r\n return val;\r\n }\r\n\r\n case StorageAttribute.NUMERIC:\r\n if (isUndefined(val))\r\n return val;\r\n else return (val != null) ? (typeof val === 'string') ? val : +val : null;\r\n default:\r\n return val;\r\n }\r\n }\r\n\r\n /**\r\n * Convert a value from native to Magic format\r\n * @param controlId Id of control\r\n * @param rowId Row Id, if applicable\r\n * @param val Value to convert\r\n * @returns Converted value\r\n */\r\n ConvertValFromNative(controlId: string, rowId: number, val: any): any {\r\n\r\n let properties: ControlMetadata;\r\n properties = this.Records.list[0].getControlMetadata(controlId);\r\n\r\n switch (properties.dataType) {\r\n\r\n case StorageAttribute.TIME: {\r\n if (val instanceof Date) {\r\n let str: StringBuilder = new StringBuilder();\r\n let format: string = val.getHours() > 9 ? '{0}' : '0{0}';\r\n str.AppendFormat(format, val.getHours().toString());\r\n str.Append(':');\r\n format = val.getMinutes() > 9 ? '{0}' : '0{0}';\r\n str.AppendFormat(format, val.getMinutes().toString());\r\n if ( val.getSeconds() > 0) {\r\n str.Append(':');\r\n format = val.getSeconds() > 9 ? '{0}' : '0{0}';\r\n str.AppendFormat(format, val.getSeconds().toString());\r\n }\r\n return str.ToString();\r\n } else\r\n return val;\r\n }\r\n case StorageAttribute.BOOLEAN: {\r\n let properties: ControlMetadata;\r\n properties = this.Records.list['0'].getControlMetadata(controlId);\r\n if (typeof val === 'boolean' && properties.rangeValidator) {\r\n let ranges: string = this.GetFldRanges(controlId);\r\n let found: number = ranges.indexOf(',');\r\n let trueOption: string = ranges.substr(0, found);\r\n let falseOption: string = ranges.substr(found + 1);\r\n if (val)\r\n return trueOption;\r\n else\r\n return falseOption;\r\n } else\r\n return val;\r\n }\r\n\r\n default:\r\n return val;\r\n }\r\n }\r\n\r\n /**\r\n * Handle resize and also fetch chunk of records if having an empty view.\r\n * @ignore\r\n * @param pageSize : PageSize\r\n * @param topGuiRowId : GuiRowId of first record in view.\r\n */\r\n resize(pageSize: number, topGuiRowId: number): void {\r\n let guiEvent: IGuiEvent = getGuiEventObj('resize', 'table', 0);\r\n guiEvent.PageSize = pageSize;\r\n\r\n //As 'getRows' event also gets executed, set the guiEvent.Line parameter.\r\n guiEvent.Line = topGuiRowId;\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Fetches data for new table rows when scrolling done\r\n */\r\n onScrollDown() {\r\n if (!this.Records.includesLast) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('getRows', '', 0);\r\n guiEvent.Line = this.formGroups.length;\r\n this.insertEvent(guiEvent);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the new browser window title\r\n * @param newTitle New window title\r\n */\r\n setTitle(newTitle: string) {\r\n this.mgTitleService.setTitle(newTitle);\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n getGuiRowId(dvRowId: number, isTableControl: boolean): number {\r\n return (isTableControl ? dvRowId + this.Records.recordsBeforeCurrentView : 0);\r\n }\r\n\r\n /**\r\n *\r\n * @ignore\r\n */\r\n getDvRowId(guiRowId: number): number {\r\n return (guiRowId - this.Records.recordsBeforeCurrentView);\r\n }\r\n\r\n /**\r\n * Clean up the service when it is no longer needed\r\n */\r\n dispose() {\r\n this.refreshDom.complete();\r\n this.detectChanges.complete();\r\n this.subscribeInteractiveCommands.unsubscribe();\r\n this.subscribeRefreshDom.unsubscribe();\r\n this.interactiveCommands.complete();\r\n this.customPropertiesSubject.complete();\r\n this.OnSelectedRowChanged.complete();\r\n }\r\n\r\n ///////////////////////////////\r\n //Events:\r\n\r\n /**\r\n * Handle the Combobox \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n * @param line Row Id, if applicable\r\n */\r\n onComboboxSelectionChanged(event: Event, idx: string, line: number) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, line);\r\n\r\n if (typeof (event) == 'number') {\r\n guiEvent.Value = event;\r\n }\r\n else {\r\n if (!isNullOrUndefined(event.target)) {\r\n let indexes: number[] = new Array<number>((<any>event.target).selectedOptions.length);\r\n for (let i = 0; i < (<any>event.target).selectedOptions.length; i++) {\r\n indexes[i] = (<HTMLOptionElement>(<any>event.target).selectedOptions[i]).index;\r\n }\r\n guiEvent.Value = indexes.join(',');\r\n } else\r\n guiEvent.Value = (<any>event).value;\r\n }\r\n\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Handle the Listbox \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n */\r\n onListBoxSelectionChanged(event: Event, idx: string) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, 0);\r\n\r\n let selectedOptions;\r\n if (!isNullOrUndefined(event.target))\r\n selectedOptions = (<any>event.target).selectedOptions;\r\n else\r\n selectedOptions = (<any>event).source.selectedOptions.selected;\r\n\r\n let length = selectedOptions.length;\r\n let indexes: number[] = new Array<number>(length);\r\n\r\n for (let i = 0; i < length; i++) {\r\n if (!isNullOrUndefined(event.target))\r\n indexes[i] = (selectedOptions[i]).index;\r\n else\r\n indexes[i] = (selectedOptions[i]).value;\r\n }\r\n guiEvent.Value = <any>indexes; // TODO: fix\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Handle the Checkbox \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n * @param rowId Row Id, if applicable\r\n */\r\n onCheckChanged(event: Event, idx: string, rowId: number) {\r\n if (typeof rowId === 'undefined')\r\n rowId = 0;\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, rowId);\r\n\r\n if (typeof (event) == 'boolean') {\r\n guiEvent.Value = event;\r\n }\r\n else if(typeof (event) == 'string') {\r\n if(event == \"unchecked\")\r\n { // @ts-ignore\r\n guiEvent.Value = false;\r\n }\r\n else if( event == 'indeterminate')\r\n guiEvent.Value = null;\r\n else if(event == 'checked')\r\n { // @ts-ignore\r\n guiEvent.Value = true;\r\n }\r\n }\r\n else {\r\n if (typeof event.target === 'undefined')\r\n guiEvent.Value = (<any>(event)).checked;\r\n else\r\n guiEvent.Value = (<any>(event.target)).checked;\r\n }\r\n\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Handle tab selection change, caused by UI events\r\n * @param idx Id of the control raising the event\r\n * @param layer Id of selected tabpage\r\n */\r\n mgOnTabSelectionChanged(idx: string, layer: number) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, 0);\r\n guiEvent.Value = layer.toString();\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n\r\n /**\r\n * Handle the Radio button \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n */\r\n mgOnRadioSelectionChanged(idx: string) {\r\n let result = this.getFormControl('0', idx);\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, 0);\r\n if(typeof result.value !== 'number')\r\n guiEvent.Value = result.value.index;\r\n else\r\n guiEvent.Value = result.value.toString();\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Inserts the \"close\" event to the magic WebClient event queue\r\n */\r\n close() {\r\n this.insertEvent(getGuiEventObj('close', null, 0));\r\n }\r\n\r\n\r\n ///////////////////////////////\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n IsStub(): boolean {\r\n return this.magic.isStub;\r\n\r\n }\r\n\r\n //////////////////////////////////////////////////////////////\r\n ///Stub handling\r\n /**\r\n * @ignore\r\n */\r\n jsonData: string;\r\n\r\n /**\r\n * @ignore\r\n */\r\n saveData(data: string) {\r\n this.magic.saveData(data);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n public createData() {\r\n let myData = {\r\n records: this.Records,\r\n template: this.template\r\n };\r\n let text: string = 'loadData():any {\\n' +\r\n ' let stubData = ' + JSON.stringify(myData) + ';\\n' +\r\n ' this.loadStubData(stubData);}';\r\n console.log(text);\r\n this.saveData(text);\r\n\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n public loadStubData(stubData: any) {\r\n\r\n this.Records = stubData.records;\r\n this.settemplate(stubData.template);\r\n this.taskId = '1';\r\n for (let i = 0; i < this.Records.list.length; i++)\r\n this.buildTableRowControls(i);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n public loadData() {\r\n alert('Please, overwrite method loadData');\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setStubValue(guiRowId: number, fc: FormControl, name: string) {\r\n if (this.IsStub()) {\r\n try {\r\n let val = this.Records.list[guiRowId].values[name];\r\n fc.setValue(val);\r\n } catch (e) {\r\n }\r\n }\r\n }\r\n\r\n // End of stub handlin\r\n /////////////////////////////////////////////////////////////////\r\n}\r\n\r\n","import { Injectable } from '@angular/core';\nimport { TaskMagicService } from \"./task.magics.service\";\nimport { ComponentListMagicService } from \"./component-list.magic.service\";\n\n/**\n * Implements various table-related functionalities\n */\n@Injectable()\nexport class TableMagicService {\n\n selectedItem : any;\n private chunkSize: number;\n\n /**\n *\n * @param componentList Component-mapping service\n * @param task Magic task service\n */\n constructor( protected componentList: ComponentListMagicService, protected task: TaskMagicService) {\n }\n\n public shouldOpenFieldTextEditor: boolean = true;\n\n /**\n * Refreshes the DataSource\n */\n refreshDataSource(): void {\n }\n\n /**\n * Returns the table page size\n * chunkSize as default value for non-paginated tables.\n */\n getPageSize(): number {\n return this.chunkSize;\n }\n\n setChunkSize(size: number): void{\n this.chunkSize = size;\n }\n\n /**\n * Returns max no of rows in the table.\n */\n getMaxRowsInTable(): number{\n return this.task.Records.list.length;\n }\n\n /**\n * Selects the specified row\n * @param rowId The row to select\n */\n selectRow(rowId: string): void {\n this.selectedItem = rowId;\n }\n\n getSelectedRow() : any{\n return this.selectedItem;\n }\n\n /**\n * Returns the selected row\n */\n selectedRow(): any {\n return null;\n }\n\n /**\n * Selects the specified page\n * @param pageId The page to select\n */\n selectPage(pageId: number): void {\n }\n\n /**\n * Returns whether a dialog should be opened for the HTML element\n * @param element The HTML element for which a dialog may be needed\n * @returns\n */\n OpenDialogForControl(element: HTMLElement): boolean\n {\n if (element.tagName === \"MAT-SELECT\" || element.tagName === \"MAT-CHECKBOX\" ||\n element.tagName === \"INPUT\" ||\n element.tagName === \"SELECT\")\n return false;\n return true;\n }\n\n /**\n * Returns the dialog used to edit values\n */\n getDialog(): any {\n return null;\n }\n\n /**\n * Handles the table \"scrolled\" event\n */\n onScrollDown() {\n this.task.onScrollDown();\n }\n\n /**\n * To be overwitten in specific implelemtations\n */\n sortData(e){}\n\n /**\n * To be overwitten in specific implelemtations\n */\n mgOnPaginateChange(e, changeSelectedRow?: boolean){}\n\n mgOptionChanged(e) { }\n\n /**\n * Change the number of lines in a table\n * @param size New number of lines in table\n */\n updateTableSize(size: number) {\n if (size === 0) // never remove row 0 for now\n {\n size = 1;\n this.task.Records.clearFirstTableRecord(this.task.template);\n }\n\n this.task.formGroups.length = size;\n this.task.Records.updateSize(size);\n this.task.setIncludesFirst(false);\n }\n\n /**\n * @ignore\n */\n setTableTopIndex(value: number) {\n if (!this.task.Records.includesFirst)\n value++;\n\n this.task.Records.setGuiTopIndex(value);\n }\n\n /**\n * @ignore\n */\n getTableTopIndex():number\n {\n let topIndex: number = this.task.Records.getGuiTopIndex();\n\n if (!this.task.Records.includesFirst)\n topIndex--;\n\n return topIndex;\n }\n}\n\n","import { Injectable } from '@angular/core';\r\nimport {Title} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Enables changing the browser title using Magic expression (SetTitle)\r\n */\r\n@Injectable()\r\nexport class TitleMagicService {\r\n /**\r\n *\r\n * @param titleService Angular's title-changing class\r\n */\r\n constructor(protected titleService: Title) {\r\n }\r\n\r\n /**\r\n * Set the new title of the window\r\n * @param newTitle New title of the window\r\n */\r\n setTitle(newTitle: string) {\r\n this.titleService.setTitle( newTitle );\r\n }\r\n\r\n}\r\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n\nexport let COLOR_FILE_NAME = new InjectionToken<string>('colorFile', {\n providedIn: 'root',\n factory: () => 'clr_rnt.eng'\n});\nexport const MAGIC_FG_COLOR: number = 1;\nexport const MAGIC_BG_COLOR: number = 2;\n\n\nconst SYSTEM_FG: number = 2;\nconst SYSTEM_BG: number = 4;\nconst SYSTEM_FG_AND_SYSTEM_BG = 6 ;\nconst TRANSPERENT_BG: number = 1;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MagicColorService {\n public colorFileName = 'clr_rnt.eng';\n\n public getColorFilePath() {\n return 'assets/' + this.colorFileName;\n }\n\n private colorsData;\n private fileNotFound = false;\n\n // public static FILE_NAME;\n constructor(private http: HttpClient, @Inject(COLOR_FILE_NAME) colorFile1: string = 'clr_rnt.eng') {\n if (colorFile1)\n this.colorFileName = colorFile1;\n else\n this.colorFileName = 'clr_rnt.eng';\n }\n\n private getColorData() {\n\n if (!this.colorsData) {\n this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {\n this.colorsData = resp.replace(/\\n/g, '@').split('@');\n },\n error1 => {\n console.error('File not found ' + this.colorFileName);\n this.fileNotFound = true;\n });\n\n }\n\n }\n\n private hexToRgba(hex: any, isTransperent: boolean): any {\n let shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n // convert it to format : aarrggbb\n hex = hex.replace(shorthandRegex, function(m: any, r: any, g: any, b: any, a: any) {\n return a + a + r + r + g + g + b + b;\n });\n\n let result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n\n let rgb = {\n 'red': parseInt(result![4], 16),\n 'green': parseInt(result![3], 16),\n 'blue': parseInt(result![2], 16),\n 'alpha': (255 - parseInt(result![1], 16)) / 255\n };\n if (isTransperent)\n rgb.alpha = 0;\n\n return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + rgb.alpha + ')';\n }\n\n /**\n * Returns the rgba value of specified color\n * @returns : value in format rgba(128,128,128,1)\n * @param : colorNumber -0 based index of color for which RGBA values are returned\n * @param: colorType : 1-MAGIC_FG_COLOR, 2-MAGIC_BG_COLOR\n */\n public getColor(colorIndex: number, colorType: number) {\n let isTransperent = false;\n if (!this.colorsData && !this.fileNotFound)\n this.getColorData();\n if (this.colorsData) { // color exists\n if (this.colorsData[colorIndex - 1]) {\n\n const grayHashCode = '00808080';\n let hex = grayHashCode;\n let color: string[] = this.colorsData[colorIndex - 1].split(','); // get the color details\n let colorAtrributes = +color[3];\n\n // color[0] - name, color[1] - FG color, color[2] - BG color\n // color[3] - attr flags (1 - transperent, 2 - system FG, 4 - system bg)\n\n\n switch (colorType) {\n case MAGIC_FG_COLOR:\n if (colorAtrributes != SYSTEM_FG && colorAtrributes !=SYSTEM_FG_AND_SYSTEM_BG)\n hex = (color[1]);\n break;\n case MAGIC_BG_COLOR:\n if (colorAtrributes != SYSTEM_BG && colorAtrributes !=SYSTEM_FG_AND_SYSTEM_BG) {\n if (colorAtrributes == TRANSPERENT_BG)\n isTransperent = true;\n hex = (color[2]);\n }\n break;\n default:\n console.log('Please enter valid color type : 1-FG, 2-BG ' + colorIndex);\n return '';\n }\n\n return this.hexToRgba('#' + hex, isTransperent);\n } else\n console.log('Could not get color for number ' + colorIndex);\n }\n\n return '';\n }\n}\n","import { Injectable } from '@angular/core';\r\nimport { TaskMagicService } from './task.magics.service';\r\nimport { ControlMetadata, ControlsMetadata } from '../controls.metadata.model';\r\nimport { CustomValidator, GuiEnvironment, HtmlProperties, PIC } from '@magic-xpa/gui';\r\nimport { isNullOrUndefined , StringBuilder} from '@magic-xpa/mscorelib';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { getGuiEventObj, IGuiEvent, CookieService} from '@magic-xpa/engine';\r\nimport { Logger, PICInterface, StorageAttribute } from '@magic-xpa/utils';\r\nimport { MagicColorService } from './magic-color.service';\r\nimport { MaskitoOptions } from \"@maskito/core\";\r\nimport { maskitoTimeOptionsGenerator } from \"@maskito/kit\";\r\n/**\r\n * Provides the UI with values calculated by the Magic WebClient\r\n */\r\n@Injectable()\r\nexport class AccessorMagicService {\r\n Logger: any = null;\r\n\r\n public readonly hhmm: MaskitoOptions = maskitoTimeOptionsGenerator({mode: 'HH:MM'});\r\n public readonly hhmmss: MaskitoOptions = maskitoTimeOptionsGenerator({mode: 'HH:MM:SS'});\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(protected task: TaskMagicService,protected magicColor: MagicColorService) {\r\n this.Logger = Logger.Instance;\r\n }\r\n\r\n /**\r\n * Checks if the control is read-only\r\n * @param controlId Id of control\r\n * @returns Is the control not read-only\r\n */\r\n // CheckReadOnly\r\n checkIsReadOnly(controlId: string): boolean {\r\n let properties: ControlMetadata;\r\n properties = this.task.Records.list[0].getControlMetadata(controlId);\r\n if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns the text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns The text of the control\r\n */\r\n // mgGetText\r\n getText(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.Text, rowId);\r\n }\r\n /**\r\n * Gets the text of the tab page\r\n * @param controlId Id of control\r\n * @param layer Id of tabpage\r\n * @returns Text of tabpage\r\n */\r\n // mgGetTabpageText\r\n getTabpageText(controlId: string, layer: number): string {\r\n const items = this.task.getProperty(controlId, HtmlProperties.ItemsList);\r\n if (typeof items !== \"undefined\")\r\n return items[layer].displayValue;\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Gets the image defined for the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns Image set on control\r\n */\r\n // mgGetImage\r\n getImage(controlId: string, rowId?: string): string {\r\n let result = this.task.getProperty(controlId, HtmlProperties.Image, rowId);\r\n return result;\r\n\r\n }\r\n\r\n /**\r\n * Returns whether an image is set for this control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns returns true if control has an image set on it\r\n */\r\n // mgIsImageExists\r\n isImageExists(controlId: string, rowId?: string): boolean {\r\n let result = this.task.getProperty(controlId, HtmlProperties.Image, rowId);\r\n return !isNullOrUndefined(result);\r\n\r\n }\r\n\r\n /**\r\n * Gets the CSS classes set on the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns The classes for this control\r\n */\r\n // mgGetClasses\r\n getClasses(controlId: string, rowId?: string) :string {\r\n return this.task.getClasses(controlId, rowId);\r\n }\r\n\r\n /**\r\n * Gets the CSS styles set on the control\r\n * @param controlId Id of control\r\n * @param styleName NAme of style requested\r\n * @param rowId Id of row, if applicable\r\n * @returns The style set on the control\r\n */\r\n // mgGetStyle\r\n getStyle(controlId: string, styleName: string, rowId?: string): string {\r\n let style = this.task.getStyle(controlId, styleName, rowId)\r\n return style;\r\n }\r\n\r\n /**\r\n * Returns whether a control is visible or not\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns Is the control visible or hidden\r\n */\r\n // mgGetVisible\r\n getVisible(controlId: string, rowId?: string) : string {\r\n let vis: Boolean = this.getProperty(controlId, HtmlProperties.Visible, rowId);\r\n return vis ? 'visible' : 'hidden';\r\n }\r\n\r\n /**\r\n * Returns alpha mask of a control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns alpha mask of the control\r\n */\r\n // getAlphaMask\r\n getAlphaMask(controlId: string, rowId?: string):string{\r\n if (isNullOrUndefined(controlId))\r\n return null;\r\n let pic: PIC = this.task.GetControlPictureMask(controlId);\r\n let mask: string = pic.getMask();\r\n let valueStr: StringBuilder = new StringBuilder();\r\n\r\n for (let i: number = 0; i < mask.length; i++) {\r\n switch (mask.charCodeAt(i)) {\r\n case PICInterface.PIC_N:\r\n valueStr.Append(\"0\");\r\n break;\r\n case PICInterface.PIC_U:\r\n case PICInterface.PIC_L:\r\n case PICInterface.PIC_X:\r\n valueStr.Append(\"A\");\r\n break;\r\n\r\n default:\r\n valueStr.Append(mask.charAt(i));\r\n break;\r\n }\r\n }\r\n\r\n return (pic != null) ? valueStr.toString() : null;\r\n }\r\n /**\r\n * Returns object representing numeric picture\r\n * @param picture string which is defined in magic\r\n * @returns object representing numeric picture\r\n */\r\n // mgGetNumericPicture\r\n getNumericPicture(picture: string) : any {\r\n var obj = {};\r\n if (isNullOrUndefined(picture))\r\n return obj;\r\n\r\n let pic: PIC = new PIC(picture, StorageAttribute.NUMERIC, 0);\r\n\r\n\r\n\r\n obj['prefix'] = \"\"\r\n if (pic.getPosPref_().length > 0 && pic.getNegPref_().length > 0) {\r\n let pref = '-'+pic.getPosPref_();\r\n if (pref == pic.getNegPref_())\r\n obj['prefix'] = pic.getPosPref_();\r\n }\r\n if(pic.getPosSuff_().length > 0)\r\n obj['suffix'] = pic.getPosSuff_();\r\n else\r\n obj['suffix'] = \"\";\r\n\r\n if(pic.isNegative())\r\n obj['allowNegative'] = true;\r\n else\r\n obj['allowNegative'] = false;\r\n if(pic.getDec()>= 0)\r\n obj['precision'] = pic.getDec();\r\n\r\n if(pic.isLeft())\r\n obj['align']=\"left\";\r\n\r\n obj['decimal'] = GuiEnvironment.Environment.GetDecimal();\r\n if(pic.withComa())\r\n obj['thousands']=GuiEnvironment.Environment.GetThousands();\r\n else\r\n obj['thousands']=\"\";\r\n\r\n if(pic.getWholes())\r\n obj['wholes']=pic.getWholes();\r\n\r\n return obj;\r\n }\r\n\r\n /**\r\n * Returns whether a control should have the \"required\" attribute set on it\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetMustInput\r\n getMustInput(controlId: string, rowId?: string) : string {\r\n let vis: Boolean = this.getProperty(controlId, HtmlProperties.MustInput, rowId);\r\n return vis ? 'true' : 'false';\r\n }\r\n\r\n /**\r\n * Returns whether a control is disabled\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgIsDisabled\r\n isDisabled(controlId: string, rowId?: string): any{\r\n let result = this.getProperty(controlId, HtmlProperties.Enabled, rowId);\r\n return result === true ? null : true;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // getProperty (not changed)\r\n getProperty(controlId: string, prop: HtmlProperties, rowId?: string) {\r\n return this.task.getProperty(controlId, prop, rowId);\r\n }\r\n\r\n /**\r\n * Returns the title (tooltip) text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetTitle\r\n getTitle(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.Tooltip, rowId);\r\n }\r\n\r\n /**\r\n * Returns the title (tooltip) text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetTitle for zoom button\r\n getZoomButtonTitle(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.ZoomButtonTooltip, rowId);\r\n }\r\n\r\n /**\r\n * Gets the selection control's selected value\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // getSelectedValue\r\n getSelectedValue(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.SelectedValue, rowId);\r\n }\r\n\r\n /**\r\n * Gets the place-holder text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetPlaceholder\r\n getPlaceholder(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.PlaceHolder, rowId);\r\n }\r\n\r\n /**\r\n * Returns a type for input controls - should the control be a simple text or a password control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetType\r\n getType(controlId: string, rowId?: string): string {\r\n let result = this.task.getProperty(controlId, HtmlProperties.Password, rowId);\r\n return result ? \"password\" : \"text\"\r\n }\r\n\r\n /**\r\n * Returns the tab-index of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetTabIndex\r\n getTabIndex(controlId: string, rowId?: string): number {\r\n return this.task.getProperty(controlId, HtmlProperties.TabIndex, rowId);\r\n }\r\n\r\n /**\r\n * Returns the value of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n /// mgGetValue -->\r\n getValue(controlId: string, rowId?: string): any {\r\n let val = this.task.getValue(controlId, rowId);\r\n return val;\r\n }\r\n\r\n /**\r\n * Returns the formatted value of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n /// mgGetValue -->\r\n getFormattedValue(controlId: string, rowId?: string): string {\r\n let val = this.task.getValue(controlId, rowId);\r\n val = this.task.getFormattedValue(controlId, val, rowId);\r\n return val;\r\n }\r\n\r\n /**\r\n * Returns the Picture of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n /// getPicture -->\r\n getPicture(controlId: string, rowId?: string): string {\r\n\r\n if (isNullOrUndefined(controlId))\r\n return null;\r\n let pic: PIC = this.task.GetControlPictureMask(controlId);\r\n return (pic != null) ? pic.getFormat().toString() : null;\r\n\r\n }\r\n\r\n /**\r\n * Returns the custom (user) properties of the control\r\n * @param controlId Id of control\r\n * @param propertyName Name of requested property\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetCustomProperty\r\n getCustomProperty(controlId: string, propertyNameOrRowID?: string, rowId?: string) : any\r\n {\r\n if(controlId.indexOf('~')== -1)\r\n return this.getCustomProperty_1(controlId, propertyNameOrRowID, rowId);\r\n else {\r\n let cid: string = controlId.split('~')[0];\r\n let propName: string = controlId.split('~')[1];\r\n\r\n return this.getCustomProperty_1(cid, propName, propertyNameOrRowID);\r\n }\r\n }\r\n\r\n getCustomProperty_1(controlId: string, propertyName: string, rowId?: string)\r\n {\r\n let userProperties;\r\n if (isNullOrUndefined(rowId))\r\n rowId = '0';\r\n let rec = this.task.Records.list[rowId];\r\n if (isNullOrUndefined(rec))\r\n debugger;\r\n else {\r\n const controlMetadata = rec.getControlMetadata(controlId);\r\n\r\n if (controlMetadata.userProperties.has(propertyName)) {\r\n userProperties = controlMetadata.userProperties.get(propertyName);\r\n }\r\n }\r\n return userProperties;\r\n }\r\n\r\n /**\r\n * Gets the values of the items of a selection control\r\n * @param id Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetItemListValues\r\n getItemListValues(id: string, rowId?: string) : Array<{index: number, displayValue: string}> {\r\n return this.getProperty(id, HtmlProperties.ItemsList, rowId);\r\n }\r\n\r\n /**\r\n * Gets the filtered items list based on the current value of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n getFilteredList(controlId: string, rowId?: string): Array<{index: number, displayValue: string}> {\r\n if (isNullOrUndefined(rowId))\r\n rowId = '0';\r\n\r\n let items = this.getItemListValues(controlId, rowId);\r\n let value: string = this.task.getFormControl(rowId, controlId).value;\r\n if (value !== null && value !== \"\" && items instanceof Array) {\r\n value = value.toLowerCase();\r\n return items.filter(option => option.displayValue.toLowerCase().includes(value));\r\n }\r\n else\r\n return items;\r\n }\r\n\r\n /**\r\n * Gets the display value of the item from items of a selection control\r\n * @param id Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n getDisplayValue(id, rowId?) {\r\n let displayValue:string =\"\"\r\n\r\n let o = this.getProperty(id, HtmlProperties.ItemsList, rowId);\r\n let value = this.task.getValue(id, rowId)\r\n if (value >=0 && value <o.length && !isNullOrUndefined(o[value]))\r\n displayValue = o[value].displayValue;\r\n return displayValue\r\n }\r\n\r\n /**\r\n * Returns whether a tab page is selected or not\r\n * @param index of current option in iterarotr\r\n * @param control Id of list control\r\n * @returns\r\n */ // isOptionSelected\r\n isOptionSelected(index, controlId) {\r\n let val = this.task.getValue(controlId, \"0\");\r\n for (let item of val) {\r\n if (item === index)\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns whether a tab page is selected or not - used for the tab buttons\r\n * @param controlId Id of control\r\n * @param layer Id of the tab page\r\n * @returns\r\n */ // mgIsTabPageSelected\r\n isTabPageSelected(controlId: string, layer: number): boolean {\r\n let val = this.task.getProperty(controlId, HtmlProperties.SelectedValue);\r\n return val == (layer - 1); // comparing string to number!\r\n }\r\n\r\n /**\r\n * Returns whether a tab page layer is selected or not - used for the div which represents the tab page\r\n * @param controlId Id of control\r\n * @param layer Id of the tab page\r\n * @returns\r\n */ // mgIsTabLayerSelected\r\n isTabPageLayerSelected(controlId: string, layer: number): boolean {\r\n let val = this.task.getProperty(controlId, HtmlProperties.SelectedLayer);\r\n return val == (layer - 1); // comparing string to number!\r\n }\r\n\r\n /**\r\n * Returns the index of the selected tab page\r\n * @param controlId Id of control\r\n * @returns\r\n */\r\n getTabSelectedIndex(controlId: string) {\r\n let val = this.task.getProperty(controlId, HtmlProperties.SelectedValue);\r\n return val; // comparing string to number!\r\n }\r\n\r\n\r\n // private methodes\r\n /**\r\n * @ignore\r\n */\r\n // mgIfRowCreated\r\n ifRowCreated(row): boolean {\r\n if (row == null)\r\n return false;\r\n let rowId = typeof row == \"number\" ? row.toString() : row.rowId;\r\n let result = this.getFormGroupByRow(rowId);\r\n return !isNullOrUndefined(result);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // mgGetFormGroupByRow\r\n getFormGroupByRow(id: string): FormGroup {\r\n return this.task.formGroups[id];\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // isRowSelected (not changed)\r\n isRowSelected(controlId, rowId?) {\r\n const selectedRow = this.task.getProperty(controlId, HtmlProperties.SelectedRow, \"0\");\r\n return selectedRow == rowId;\r\n }\r\n\r\n /**\r\n * Returns whether a row is in edit state\r\n * @param row\r\n */\r\n isRowInRowEditing(row?: any): boolean {\r\n let guiRowId : string = '0';\r\n guiRowId= typeof row == \"number\" ? row.toString() : row.rowId;\r\n return this.task.isRowInRowEditing(guiRowId)\r\n }\r\n\r\n /**\r\n * Returns whether a row is in edit state, use this method while control outside table control\r\n * @param row\r\n */\r\n isCurrentInRowEditing(): boolean {\r\n\r\n let row = this.task.tableService.getSelectedRow();\r\n\r\n return this.task.isRowInRowEditing(row)\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // GetGuiTopIndex\r\n guiTopIndex(): number {\r\n return this.task.tableService.getTableTopIndex();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getErrMsg(id: string,rowId: string): string\r\n {\r\n let c = this.task.getFormControl(rowId, id);\r\n if (c.hasError('required'))\r\n return 'Control must be updated.';\r\n if (c.hasError('pattern')){\r\n //To check whether the numeric field allowed only positive values or not.\r\n if(c.errors.pattern.actualValue < 0 && !c.errors.pattern.requiredPattern.includes('-'))\r\n return 'Value must be non-negative';\r\n if(c.errors.pattern.requiredPattern.includes('.')){\r\n const numericFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[0];\r\n const decimalFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[1];\r\n const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\\d+)/)[1];\r\n const actualDecimalLimit = c.errors.pattern.requiredPattern.match(/(?:[^,]+,){2}(\\d+)/)[1];\r\n if(numericFormat.length > actualNumericLimit || decimalFormat.length > actualDecimalLimit){\r\n return \"Numeric format is limited to \" + actualNumericLimit + \".\"+ actualDecimalLimit + \" digits\"\r\n }\r\n }else if(!c.errors.pattern.requiredPattern.includes('.') && !Number.isInteger(c.errors.pattern.actualValue)){\r\n const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\\d+)/)[1];\r\n return \"Numeric format is limited to \" + actualNumericLimit + \".\"+ 0 + \" digits\"\r\n }else{\r\n const numericFormat = Math.abs(c.errors.pattern.actualValue).toString();\r\n const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\\d+)/)[1];\r\n if(numericFormat.length > actualNumericLimit){\r\n return \"Numeric format is limited to \" + actualNumericLimit + \".\"+ 0 + \" digits\"\r\n }\r\n }\r\n }\r\n if (c.hasError('rangevalidator'))\r\n return c.errors.rangevalidator.errorMsg;\r\n if (c.hasError('maxlength'))\r\n return 'Max length allowed is : ' + c.errors.maxlength.requiredLength;\r\n if (c.hasError('max'))\r\n return 'Max value allowed is : ' + c.errors.max.max;\r\n\r\n let controlMetadata = this.task.Records.list[rowId].getControlMetadata(id);\r\n for (let key of controlMetadata.customValidators.keys())\r\n {\r\n if (c.hasError(key)) {\r\n let customValidator: CustomValidator = controlMetadata.customValidators.get(key);\r\n return customValidator.getErrMessage();\r\n }\r\n }\r\n\r\n return 'unknown error';\r\n }\r\n\r\n /**\r\n * Sets a user-supplied value to the specified control\r\n * @param controlName\r\n * @param value\r\n * @param refreshDisplay\r\n */\r\n setValueToControl(controlName: string, value: any, refreshDisplay?: boolean){\r\n if(typeof refreshDisplay === \"undefined\")\r\n refreshDisplay = true;\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"setexternalvalue\", controlName, 0);\r\n guiEvent.externalValue = value;\r\n guiEvent.param = refreshDisplay;\r\n this.task.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n isDataviewEmpty() : boolean {\r\n return this.task.Records.isEmptyDataView;\r\n }\r\n\r\n /**\r\n * simulates a click event on the specified control, for the Magic engine\r\n * @param controlName\r\n * @param rowId\r\n */\r\n simulateClick(controlName: string, rowId?: number){\r\n if (typeof rowId === \"undefined\")\r\n rowId = 0;\r\n this.task.insertEvent(getGuiEventObj('click', controlName, rowId));\r\n }\r\n\r\n /**\r\n * Return Boolean TRUE if user logged in Else it will return FALSE\r\n */\r\n isLoggedIn(): boolean {\r\n return this.task.getIsLoggenIn();\r\n }\r\n\r\n /**\r\n * Returns JS object containing the records with all table fields.\r\n */\r\n GetFormRecords(): any {\r\n let rowId: number = 0;\r\n let recArray: any;\r\n\r\n if (!isNullOrUndefined(this.task.Records) && this.task.Records.list.length > 0 ) {\r\n let recList: ControlsMetadata[] = this.task.Records.list;\r\n let tableControls: string[] = new Array();\r\n\r\n //Generate list of table fields names\r\n for (const key in this.task.template) {\r\n if (this.task.template[key] == '1')\r\n tableControls.push(key);\r\n }\r\n\r\n recArray = new Array();\r\n\r\n //Update the records as list of objects with values for table fields.\r\n if (tableControls.length > 0) {\r\n recList.forEach((ctrlMetaData: ControlsMetadata) => {\r\n if (this.task.Records.isRowCreated(rowId)) {\r\n var formRecord = {};\r\n formRecord['rowId'] = rowId;\r\n tableControls.forEach((ctrlId: string) => {\r\n formRecord[ctrlId] = ctrlMetaData.values[ctrlId];\r\n });\r\n\r\n recArray.push(formRecord)\r\n }\r\n });\r\n }\r\n }\r\n\r\n return recArray;\r\n }\r\n\r\n /**\r\n * SetCookie : set the cookie with specified name and value in browser\r\n * expires - expiration time\r\n * path - path which much exists in order so that cookie is sent as header\r\n * domain - specifies which hosts are allowed to receive the cookie\r\n * secure - specifies if cookie is secure ( works only with HTTPS)\r\n * sameSite - lets servers specify whether/when cookies are sent with cross-site requests\r\n */\r\n SetCookie(name: string, value: any, expires?: Date, path? , domain? , secure?, sameSite ?) {\r\n CookieService.setCookie(name, value, expires, path, domain, secure, sameSite);\r\n }\r\n\r\n /**\r\n * GetCookie : get the cookie with specified name and value in browser\r\n */\r\n GetCookie(name: string): any {\r\n return CookieService.getCookie(name);\r\n }\r\n\r\n /**\r\n * DeleteCookie : deletes the cookie\r\n */\r\n DeleteCookie(name: string): any {\r\n return CookieService.deleteCookie(name);\r\n }\r\n\r\n /**\r\n * get RGBA color from color file\r\n */\r\n public getColor(colorNumber: number, colorType) {\r\n return this.magicColor.getColor(colorNumber, colorType);\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\nimport { SubformMagicService } from \"./subform.magic.service\";\r\nimport { TableMagicService } from \"./table.magic.service\";\r\nimport { TaskMagicService } from \"./task.magics.service\";\r\nimport { TitleMagicService } from \"./title.magic.service\";\r\nimport { AccessorMagicService } from \"./accessor.magic.service\";\r\n\r\n\r\n/**\r\n * Central place for adding the Magic services\r\n */\r\n@Injectable()\r\nexport class MagicServices{\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n public task: TaskMagicService,\r\n public subformService: SubformMagicService,\r\n public tableService: TableMagicService,\r\n public titleService: TitleMagicService,\r\n public mgAccessorService: AccessorMagicService,\r\n ) {\r\n\r\n task.tableService = tableService;\r\n task.mgSubformService = subformService;\r\n task.mgTitleService = titleService;\r\n task.mgAccessorService = mgAccessorService;\r\n }\r\n\r\n\r\n}\r\n","import {AfterViewInit, ChangeDetectorRef, Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {FormGroup} from '@angular/forms';\r\nimport { MagicProperties} from \"@magic-xpa/utils\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\n\r\nimport {TaskMagicService} from \"../services/task.magics.service\";\r\nimport { SubformMagicService } from \"../services/subform.magic.service\";\r\nimport { TableMagicService } from \"../services/table.magic.service\";\r\nimport { MagicServices } from \"../services/magic.services\";\r\nimport { AccessorMagicService } from \"../services/accessor.magic.service\";\r\n\r\n/**\r\n * Base component representing a Magic task\r\n */\r\n@Component({\r\n selector: 'task-magic',\r\n providers: [TaskMagicService, SubformMagicService, TableMagicService],\r\n template: ''\r\n})\r\nexport class TaskBaseMagicComponent implements OnInit, OnDestroy, AfterViewInit {\r\n\r\n /**\r\n * Id of task, used for initializing the task service\r\n */\r\n @Input() taskIdParam: string;\r\n /**\r\n * @ignore\r\n */\r\n @Input() taskDescription: string;\r\n\r\n /**\r\n * @ignore\r\n */\r\n magicProperties = MagicProperties;\r\n\r\n /**\r\n *\r\n * @param ref changes-detector object\r\n * @param magicServices Access point for all Magic services\r\n */\r\n constructor(protected ref: ChangeDetectorRef,\r\n public magicServices: MagicServices\r\n ) { }\r\n\r\n /**\r\n * Returns the Magic task service\r\n * @returns\r\n */\r\n get task(): TaskMagicService {\r\n return this.magicServices.task;\r\n }\r\n\r\n /**\r\n * Returns the Magic subform service\r\n * @returns\r\n */\r\n get mgSub(): SubformMagicService {\r\n return this.magicServices.subformService;\r\n }\r\n\r\n /**\r\n * Returns the Magic table service\r\n * @returns\r\n */\r\n get tableService(): TableMagicService {\r\n return this.magicServices.tableService;\r\n }\r\n\r\n /**\r\n * Returns the Magic accessor service\r\n * @returns\r\n */\r\n get mg(): AccessorMagicService {\r\n return this.magicServices.mgAccessorService;\r\n }\r\n\r\n\r\n /**\r\n * Returns the task Id\r\n * @returns\r\n */\r\n get taskId() {\r\n return this.task.taskId;\r\n }\r\n\r\n /**\r\n * Returns the FormGroup for screen-mode forms\r\n * @returns\r\n */\r\n get screenFormGroup(): FormGroup {\r\n return this.task.ScreenModeControls;\r\n }\r\n\r\n /**\r\n * Interface implementation\r\n */\r\n ngOnInit() {\r\n\r\n this.task.detectChanges.pipe().subscribe(c => {\r\n this.ref.detectChanges();\r\n });\r\n this.task.initTask(this.taskIdParam, this.taskDescription);\r\n\r\n this.createFormControlsAccessor(this.screenFormGroup);\r\n this.setInputDateFormat();\r\n\r\n // subcribe to custom property changes\r\n this.task.customPropertiesSubject.pipe().subscribe(property => {\r\n this.PropertyChanged(property.propertyName, property.rowId, property.value);\r\n });\r\n\r\n // subcribe to records count changes\r\n this.task.recordsCountChangeSubject.pipe().subscribe(value => {\r\n this.RecordsCountChanged(value);\r\n });\r\n\r\n // subcribe to mgLoad change\r\n this.task.mgLoadSubject.pipe().subscribe(value =>{\r\n this.mgOnLoad();\r\n });\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n createFormControlsAccessor(formGroup: FormGroup) {}\r\n\r\n /**\r\n * @ignore\r\n */\r\n setInputDateFormat () {}\r\n\r\n /**\r\n * This method is called when the value of any custom property is updated in Magic\r\n * propertyName : name of property which is updated. The format is <controlname>~<propertyname>\r\n * rowId : row number of the updated property for controls in table control (0 for controls outside table)\r\n * value : updated value of the property\r\n * @returns : void\r\n * To use the method override it in your component and check the property name and write you code ..for eg\r\n * if(propertyName == 'controlname~propertyName') {// your code}\r\n * else { // your code}\r\n */\r\n PropertyChanged(propertyName:string, rowId : number, value : any) : void {\r\n // intentionally left blank because the implementation should be in the derived class\r\n }\r\n\r\n /**\r\n * Records count change subject is subscribed to change in its value. This method will be called\r\n * as the value of records count is received at from server.\r\n * @returns : void\r\n * To use the method override it in your component.\r\n */\r\n RecordsCountChanged(recordsCount : number) : void {\r\n // intentionally left blank because the implementation should be in the derived class\r\n }\r\n\r\n /**\r\n * This method will be called once engine informs UI about loading of first set of data is sent to client\r\n * and client has reached its first idle time.\r\n * @returns : void\r\n * To use the method override it in your component.\r\n */\r\n mgOnLoad() : void {\r\n // intentionally left blank because the implementation should be in the derived class\r\n }\r\n /**\r\n * Interface implementation\r\n */\r\n ngAfterViewInit() {\r\n this.mgSub.init();\r\n }\r\n\r\n ngAfterContentChecked() : void {\r\n if(!isNullOrUndefined(this.tableService.getPageSize()) && this.task.oldPageSize != this.tableService.getPageSize()) {\r\n this.task.resize(this.tableService.getPageSize(), 0);\r\n this.task.oldPageSize = this.tableService.getPageSize();\r\n }\r\n }\r\n\r\n /**\r\n * Interface implementation\r\n */\r\n ngOnDestroy(): void {\r\n this.task.dispose();\r\n }\r\n}\r\n\r\n","\r\nimport { Directive, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\r\nimport {TaskMagicService} from \"../../../services/task.magics.service\";\r\nimport {getGuiEventObj} from \"@magic-xpa/engine\";\r\nimport { filter } from \"rxjs/operators\";\r\nimport { Subscription } from \"rxjs\";\r\nimport {MagicDirective} from \"../../directives/magic.directive\"\r\n\r\n/**\r\n * @ignore\r\n */\r\n @Directive({\r\n selector: '[magicRow]'\r\n })\r\n\r\n\r\nexport class RowMagicDirective implements OnInit, OnDestroy{\r\n @Input('magicRow') rowId: string;\r\n\r\n /**\r\n * The HTML element connected to this directive\r\n */\r\n protected htmlElement: HTMLElement;\r\n\r\n /**\r\n * @ignore\r\n */\r\n private rowChangedSubscriber: Subscription = null;\r\n\r\n constructor(\r\n protected _task : TaskMagicService,\r\n protected element: ElementRef\r\n )\r\n {\r\n this.htmlElement = this.element.nativeElement;\r\n }\r\n\r\n /**\r\n * Initializes this object\r\n */\r\n ngOnInit(): void {\r\n this.rowChangedSubscriber = this._task\r\n .OnSelectedRowChanged.pipe(filter(rowId => rowId === this.rowId))\r\n .subscribe(rowId => {\r\n if (!this.isInView(this.htmlElement))\r\n this.htmlElement.scrollIntoView();\r\n }\r\n );\r\n }\r\n\r\n private isInView(element): boolean {\r\n const rect = element.getBoundingClientRect();\r\n const parentRect = element.parentElement.getBoundingClientRect();\r\n return (\r\n rect.top >= parentRect.top &&\r\n rect.bottom <= parentRect.bottom\r\n );\r\n }\r\n\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy() {\r\n // Don't know why, but when the table is loaded for the first time, we\r\n // get ngOnInit() for the 1st row (rowId = \"0\") and then ngOnDestroy()\r\n // for number of rows in the page but here this.rowId is undefined.\r\n // Since ngOnInit() was not called for all these rows, this.rowChangedSubscriber\r\n // is null and hence crashes.\r\n // So, the condition to check nulity is added.\r\n if (this.rowChangedSubscriber !== null) {\r\n this.rowChangedSubscriber.unsubscribe();\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick($event) {\r\n if(this.rowId != '') {\r\n this._task.insertEvent(getGuiEventObj('click', \"magicRow\", +this.rowId));\r\n if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)\r\n event.cancelBubble = true;\r\n }\r\n }\r\n }\r\n","import { Directive, ElementRef, Input, OnDestroy, OnInit, Optional, Renderer2, ViewContainerRef } from \"@angular/core\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\n\r\nimport {\r\n CommandType,\r\n GuiCommand,\r\n GuiConstants,\r\n GuiInteractive,\r\n HtmlProperties,\r\n InteractiveCommandType,\r\n Modifiers\r\n} from \"@magic-xpa/gui\";\r\nimport { getGuiEventObj, IGuiEvent } from \"@magic-xpa/engine\";\r\n\r\nimport { TaskBaseMagicComponent } from \"../task-base.magic.component\";\r\nimport { TaskMagicService } from \"../../services/task.magics.service\";\r\nimport { debounceTime, filter, map } from \"rxjs/operators\";\r\nimport { RowMagicDirective } from \"./magic/row.magic.directive\";\r\nimport { Subscription, fromEvent } from \"rxjs\";\r\nimport { BindingLevel, MgControlType, StorageAttributeType } from \"@magic-xpa/utils\";\r\nimport { Platform } from \"@angular/cdk/platform\";\r\n\r\n\r\n/**\r\n * Connects HTML elements to the Magic Web Client engine\r\n */\r\n@Directive({\r\n selector: \"[magic]\"\r\n})\r\n\r\nexport class MagicDirective implements OnInit, OnDestroy {\r\n @Input(\"magic\") set magic(val) {\r\n this.id = val;\r\n this.selector = \"magic\";\r\n };\r\n\r\n /**\r\n * This flag is used when we only want to register to events, but do not want to execute commands sent from server\r\n */\r\n @Input(\"eventsOnly\") set eventsOnly(val) {\r\n console.log(\"eventsOnly\");\r\n this.eventsOnlyVal = true;\r\n\r\n };\r\n\r\n /**\r\n * pollTime: after which value will be sent to magic\r\n */\r\n @Input() public pollTime: number = 200;\r\n\r\n /**\r\n * Row id of the control, for when it is on a table\r\n */\r\n @Input() public rowId: string;\r\n /**\r\n *\r\n */\r\n //@Input() events: any[] = [];\r\n\r\n /**\r\n * The HTML element connected to this directive\r\n */\r\n protected htmlElement: HTMLElement;\r\n /**\r\n * Magic's component handling this control\r\n */\r\n public component: TaskBaseMagicComponent;\r\n /**\r\n * Collection of event handlers for this element\r\n */\r\n private eventHandlers: { [key: string]: () => void; } = {};\r\n /**\r\n * Id of this element\r\n */\r\n public id: string;\r\n /**\r\n * @ignore\r\n */\r\n protected selector: string;\r\n /**\r\n * @ignore\r\n */\r\n subscribeRefreshDom: Subscription;\r\n\r\n private focusUnlistener: (() => void);\r\n\r\n public eventsOnlyVal = false;\r\n\r\n public static opened = false;\r\n\r\n public static noOfAutoCompleteBoxesOpened =0;\r\n\r\n subscribeInteractiveCommands: Subscription;\r\n\r\n /**\r\n *\r\n * @param _task The task service\r\n * @param element The element for which the directive is applied\r\n * @param renderer Renderer for the element\r\n * @param vcRef\r\n * @param platform\r\n * @param magicRow\r\n */\r\n constructor(\r\n protected _task: TaskMagicService,\r\n protected element: ElementRef,\r\n protected renderer: Renderer2,\r\n protected vcRef: ViewContainerRef,\r\n public platform: Platform,\r\n @Optional() protected magicRow: RowMagicDirective) {\r\n\r\n this.htmlElement = this.element.nativeElement;\r\n //let c = (<any>this.vcRef)._view;\r\n //while (!(c instanceof TaskBaseMagicComponent)) {\r\n // c = c.component;\r\n //}\r\n //this.component = c;\r\n if (!(typeof magicRow === \"undefined\" || magicRow === null))\r\n this.rowId = magicRow.rowId;\r\n }\r\n\r\n /**\r\n * Get the task service\r\n * @returns\r\n */\r\n get task(): TaskMagicService {\r\n return this._task;\r\n }\r\n\r\n /**\r\n * Register to the events this element may need to handle\r\n */\r\n protected regEvents() {\r\n // Handle events for which event handler may be removed and restored\r\n this.eventHandlers[\"focusin\"] = this.OnFocus.bind(this);\r\n\r\n Object.keys(this.eventHandlers).forEach((key) => {\r\n this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);\r\n });\r\n\r\n // Handle events with anonymous event handlers\r\n let events: string[] = [\"click\", \"mousedown\", \"dblclick\"];// ,'resize', 'load', 'unload'\r\n events.forEach(event => {\r\n this.renderer.listen(this.htmlElement, event, (e) => {\r\n\r\n // check if the event is fired from zoom button ( to identify the connected zoom button in engine)\r\n let fromButton = false;\r\n if(this.htmlElement instanceof HTMLButtonElement)\r\n fromButton = true;\r\n\r\n /**\r\n * In the case of Safari or Chrome browser on IOS, when a button is clicked, the browser does not receive\r\n * focus event hence the zoom action is not executed. So in order to receive focus event, enabling it exclusively\r\n * in the case of Safari or Chrome browser on IOS and Safari browser on Mac.\r\n */\r\n if (fromButton && (this.platform.IOS || this.platform.SAFARI))\r\n this.task.insertEvent(getGuiEventObj(\"focus\", this.id, +this.rowId));\r\n\r\n this.task.insertEvent(getGuiEventObj(event, this.id, +this.rowId, fromButton));\r\n if (MagicDirective.noOfAutoCompleteBoxesOpened< 1)\r\n e.cancelBubble = true;\r\n });\r\n });\r\n\r\n\r\n this.renderer.listen(this.htmlElement, \"change\", (e) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, +this.rowId);\r\n\r\n if ((<any>(event.target)).selectedIndex !== undefined) {\r\n guiEvent.Value = (<any>(event.target)).selectedIndex.toString();\r\n e.cancelBubble = true;\r\n this.task.insertEvent(guiEvent);\r\n }\r\n\r\n });\r\n\r\n // handle the input event\r\n fromEvent(this.htmlElement, \"input\").pipe(\r\n map((event: any) => {\r\n return event.target.value;\r\n }),\r\n debounceTime(this.pollTime) // time after which value will be sent to magic\r\n ).subscribe((x) => {\r\n if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {\r\n // Don't support character binding for date/time values\r\n let attribute : StorageAttributeType = this.task.Records.list[0].getControlMetadata(this.id).dataType;\r\n if(attribute !== StorageAttributeType.Date && attribute != StorageAttributeType.Time)\r\n this.task.mgAccessorService.setValueToControl(this.id, x, true);\r\n }\r\n });\r\n\r\n this.renderer.listen(this.htmlElement, \"keydown\", (e: KeyboardEvent) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"keydown\", this.id, +this.rowId);\r\n guiEvent.modifiers = Modifiers.MODIFIER_NONE;\r\n\r\n if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)\r\n guiEvent.modifiers = Modifiers.MODIFIER_ALT;\r\n\r\n else if (e.ctrlKey && e.keyCode !== GuiConstants.KEY_CTRL)\r\n guiEvent.modifiers = Modifiers.MODIFIER_CTRL;\r\n\r\n let supportedKey = e.keyCode === GuiConstants.KEY_PG_UP ||\r\n e.keyCode === GuiConstants.KEY_PG_DOWN ||\r\n e.keyCode === GuiConstants.KEY_LEFT ||\r\n e.keyCode === GuiConstants.KEY_RIGHT ||\r\n e.keyCode === GuiConstants.KEY_UP ||\r\n e.keyCode === GuiConstants.KEY_DOWN ||\r\n e.keyCode === GuiConstants.KEY_ESC ||\r\n e.keyCode === GuiConstants.KEY_HOME ||\r\n e.keyCode === GuiConstants.KEY_END ||\r\n e.keyCode === GuiConstants.KEY_RETURN ||\r\n (e.keyCode >= GuiConstants.KEY_F1 && e.keyCode <= GuiConstants.KEY_F12);\r\n\r\n if (guiEvent.modifiers !== Modifiers.MODIFIER_NONE || supportedKey) {\r\n guiEvent.keyCode = e.keyCode;\r\n\r\n // Defect 160021 fixed - don't set e.cancelBubble when combobox is opened and esc key is pressed\r\n if (e.keyCode !== GuiConstants.KEY_ESC || e.keyCode === GuiConstants.KEY_ESC && (!MagicDirective.opened && MagicDirective.noOfAutoCompleteBoxesOpened < 1))\r\n e.cancelBubble = true;\r\n\r\n this.task.insertEvent(guiEvent);\r\n }\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Handle focus event\r\n */\r\n private OnFocus() {\r\n this.task.insertEvent(getGuiEventObj(\"focus\", this.id, +this.rowId));\r\n event.cancelBubble = true;\r\n }\r\n\r\n /**\r\n * Is the command's element the same as this directive's element\r\n * @param command\r\n * @returns true/false\r\n */\r\n public IsSameElement(command) {\r\n let line: number = command.line;\r\n\r\n if (this.task.isTableControl(command.CtrlName))\r\n line = this.task.getGuiRowId(line, true);\r\n\r\n return (command.CtrlName === this.id &&\r\n (line === +this.rowId ||\r\n (line === 0 && isNullOrUndefined(this.rowId))));\r\n }\r\n\r\n /**\r\n * Is the command's element the same as this directive's component\r\n * @param command\r\n * @returns true/false\r\n */\r\n private IsSameComponent(command: GuiInteractive) {\r\n return (command.controlName === this.id);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n private regUpdatesUI() {\r\n this.subscribeRefreshDom = this.task\r\n .refreshDom.pipe(filter(c => this.IsSameElement(c)))\r\n .subscribe(a => {\r\n let command: GuiCommand = a;\r\n if (isNullOrUndefined(this.rowId))\r\n this.rowId = \"0\";\r\n try {\r\n if (!this.eventsOnlyVal)\r\n this.handleCommand(command);\r\n } catch (ex) {\r\n console.dir(ex);\r\n }\r\n }\r\n );\r\n\r\n this.subscribeInteractiveCommands = this.task.interactiveCommands\r\n .pipe(filter(c => this.IsSameComponent(c)))\r\n .subscribe(command => {\r\n this.handleInteractiveCommands(command);\r\n });\r\n }\r\n\r\n /**\r\n * Initializes this object\r\n */\r\n ngOnInit(): void {\r\n this.regEvents();\r\n this.regUpdatesUI();\r\n }\r\n\r\n /**\r\n * Handles the commands received from the Magic WebClient engine\r\n * @param command\r\n */\r\n handleCommand(command: GuiCommand) {\r\n switch (command.CommandType) {\r\n\r\n case CommandType.SET_PROPERTY:\r\n this.handleSetProperty(command);\r\n break;\r\n\r\n case CommandType.SET_FOCUS:\r\n this.focusUnlistener();\r\n // Do not set focus on connected zoom button\r\n if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))\r\n this.htmlElement.focus();\r\n this.focusUnlistener = this.renderer.listen(this.htmlElement, \"focusin\", this.eventHandlers[\"focusin\"]);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * handle the interactive commands like CallJS\r\n */\r\n handleInteractiveCommands(command: GuiInteractive) {\r\n switch (command._commandType) {\r\n case InteractiveCommandType.CALL_JS:\r\n let methodName: string = command._str;\r\n let args: Array<any> = command.arguments;\r\n let magicComponent: TaskBaseMagicComponent = ((<any>this.vcRef)._hostLView).find(v => v instanceof TaskBaseMagicComponent);\r\n let resultString = \"\";\r\n\r\n try {\r\n if (!isNullOrUndefined(magicComponent[methodName])) {\r\n // invoke the method on instance of magic componenet\r\n resultString = magicComponent[methodName].apply(magicComponent, args);\r\n }\r\n else\r\n console.error(\"Instance method \" + methodName + \" does not exists\"); // when method is not found\r\n } catch (e) {\r\n // any other exception\r\n console.error(e.message);\r\n }\r\n command.resultString = resultString; // update the return value\r\n break;\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Handle the Magic set-property command\r\n * @param command\r\n */\r\n handleSetProperty(command: GuiCommand) {\r\n switch (command.Operation) {\r\n case HtmlProperties.ReadOnly: {\r\n if(command.obj.Type == MgControlType.CTRL_TYPE_TEXT)\r\n if (command.obj1 != true)\r\n this.renderer.removeAttribute(this.htmlElement, command.Operation);\r\n else\r\n this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy(): void {\r\n\r\n this.subscribeRefreshDom.unsubscribe();\r\n }\r\n}\r\n","import {Directive, ElementRef, Input, Renderer2, ViewContainerRef, Optional} from '@angular/core';\r\nimport {CommandType, GuiCommand} from \"@magic-xpa/gui\";\r\nimport {IGuiEvent, getGuiEventObj} from \"@magic-xpa/engine\";\r\nimport {ControlMetadata} from \"../../../controls.metadata.model\";\r\nimport {HtmlProperties} from \"@magic-xpa/gui\";\r\nimport {MagicDirective} from \"../magic.directive\";\r\nimport {TaskMagicService} from \"../../../services/task.magics.service\";\r\nimport {StylesMapManager} from \"../../../services/StylesMapManager\";\r\nimport {RowMagicDirective} from \"./row.magic.directive\";\r\nimport {Platform} from \"@angular/cdk/platform\";\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n selector: '[magicnc]'\r\n})\r\n\r\nexport class NoControlMagicDirective extends MagicDirective {\r\n\r\n @Input('magicnc') set magic(val) {this.id = val; this.selector = 'magicnc';};\r\n\r\n constructor(\r\n _task : TaskMagicService,\r\n element : ElementRef,\r\n renderer: Renderer2,\r\n vcRef : ViewContainerRef,\r\n platform: Platform,\r\n @Optional() magicRow: RowMagicDirective) {\r\n super(_task, element, renderer, vcRef, platform, magicRow);\r\n }\r\n\r\n regEvents() {\r\n super.regEvents()\r\n\r\n if (this.htmlElement instanceof HTMLSelectElement) {\r\n this.htmlElement.addEventListener('change', (e) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, 0);\r\n guiEvent.Value = (<any>(event.target)).selectedIndex.toString()\r\n this.task.insertEvent(guiEvent);\r\n });\r\n }\r\n\r\n if (this.isRadio()) {\r\n this.htmlElement.addEventListener('change', (e) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, 0);\r\n guiEvent.Value = (<any>(e.target)).value;\r\n this.task.insertEvent(guiEvent);\r\n });\r\n }\r\n\r\n if(this.isTabControl()) {\r\n const tabControl = this.htmlElement.children[0];\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, 0);\r\n for (var i = 0; i < tabControl.children.length; i++) {\r\n tabControl.children[i].addEventListener('click', (e) => {\r\n guiEvent.Value = ((<number><any>(<Element>e.currentTarget).getAttribute('layer'))-1).toString();\r\n this.task.insertEvent(guiEvent);\r\n });\r\n }\r\n }\r\n }\r\n\r\n // is the div a tab control\r\n isTabControl() {\r\n return this.htmlElement instanceof HTMLDivElement &&\r\n this.htmlElement.children[0].getAttribute('magicMark')=== \"magicTabControl\";\r\n }\r\n\r\n // is the div a radio buttons wrapper\r\n isRadio() {\r\n return this.htmlElement instanceof HTMLDivElement &&\r\n this.htmlElement.children[0].getAttribute('magicMark') === \"magicRadio\";\r\n }\r\n\r\n handleCommand(command: GuiCommand) {\r\n super.handleCommand(command);\r\n\r\n switch (command.CommandType) {\r\n case CommandType.SET_CLASS:\r\n //remove the class which was replaced by this new one, as registered in the ControlMetadata\r\n const controlMetadata:ControlMetadata = this._task.Records.list[0].getControlMetadata(this.id);\r\n if(controlMetadata.removedClass != '') {\r\n this.htmlElement.classList.remove(controlMetadata.removedClass);\r\n controlMetadata.removedClass = '';\r\n }\r\n this.htmlElement.classList.add(command.obj1);\r\n break;\r\n\r\n case CommandType.SET_VALUE:\r\n if (this.htmlElement instanceof HTMLLabelElement)\r\n (<HTMLLabelElement>this.htmlElement).innerText = command.value;\r\n\r\n if (this.htmlElement instanceof HTMLSelectElement)\r\n (<HTMLSelectElement>this.htmlElement).value = command.value;\r\n\r\n if (this.htmlElement instanceof HTMLAnchorElement) //hyper-text button\r\n (<HTMLAnchorElement>this.htmlElement).text = command.value;\r\n\r\n if (this.htmlElement instanceof HTMLInputElement)\r\n {\r\n if((<HTMLInputElement>this.htmlElement).type === \"checkbox\") {\r\n (<HTMLInputElement>this.htmlElement).checked = command.value;\r\n }\r\n else {\r\n (<HTMLInputElement>this.htmlElement).value = command.value;\r\n }\r\n }\r\n\r\n if (this.htmlElement instanceof HTMLButtonElement)\r\n {\r\n (<HTMLButtonElement>this.htmlElement).innerHTML = command.value;\r\n }\r\n\r\n break;\r\n\r\n case CommandType.SET_PROPERTY:\r\n this.handleSetProperty(command);\r\n break;\r\n\r\n case CommandType.SET_STYLE:\r\n let value: string = StylesMapManager.magicValueGetStyle(command.Operation, command.obj1);\r\n let attribute: string = StylesMapManager.MagicPropertyToHtmlAttributeMap.get(command.Operation);\r\n this.htmlElement.setAttribute(\"style\", attribute + \":\" + value);\r\n break;\r\n }\r\n }\r\n\r\n\r\n // handle set-property commands\r\n handleSetProperty(command: GuiCommand) {\r\n super.handleSetProperty(command);\r\n switch (command.Operation) {\r\n case HtmlProperties.Text:\r\n if (this.htmlElement instanceof HTMLLabelElement)\r\n (<HTMLLabelElement>this.htmlElement).innerText = command.obj1;\r\n\r\n break;\r\n\r\n case HtmlProperties.Image:\r\n if (this.htmlElement instanceof HTMLImageElement)\r\n (<HTMLImageElement>this.htmlElement).src = command.obj1;\r\n else\r\n this.htmlElement.setAttribute(\"src\", command.obj1);\r\n\r\n break;\r\n\r\n case HtmlProperties.ItemsList:\r\n if (this.htmlElement instanceof HTMLSelectElement) {\r\n\r\n // clear the list\r\n var len = this.htmlElement.length;\r\n for (var i = len - 1; i >= 0; i--) {\r\n this.htmlElement.remove(i);\r\n }\r\n\r\n for (let s of command.obj1) {\r\n let elem = document.createElement(\"option\");\r\n elem.text = s.displayValue;\r\n elem.value = s.index;\r\n (<HTMLSelectElement>this.htmlElement).add(elem);\r\n }\r\n }\r\n else if(this.isTabControl() && this.htmlElement.children.length > 0) {\r\n const tabControl = this.htmlElement.children[0];\r\n\r\n for (var i = 0; i < tabControl.children.length; i++) {\r\n if(tabControl.children[i] instanceof HTMLButtonElement) {\r\n (<HTMLElement>tabControl.children[i]).innerText = command.obj1[i].displayValue;\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case HtmlProperties.Visible:\r\n this.htmlElement.setAttribute('style', 'visibility:' + (command.obj1 ? 'visible' : 'hidden'));\r\n break;\r\n\r\n case HtmlProperties.Enabled:\r\n if (command.obj1 === false)\r\n this.htmlElement.setAttribute(\"disabled\", \"true\");\r\n else\r\n this.htmlElement.removeAttribute(\"disabled\");\r\n break;\r\n\r\n case HtmlProperties.TabIndex:\r\n this.htmlElement.setAttribute(command.Operation, command.obj1);\r\n break;\r\n\r\n case HtmlProperties.SelectedValue:\r\n if (this.htmlElement instanceof HTMLSelectElement)\r\n (<HTMLSelectElement>this.htmlElement).value = command.obj1;\r\n else if(this.isTabControl() && this.htmlElement.children.length > 0){\r\n const tabControl = this.htmlElement.children[0];\r\n\r\n for (var i = 0; i < tabControl.children.length; i++) {\r\n let child = tabControl.children[i];\r\n const layer = (<number><any>child.getAttribute('layer'))-1;\r\n\r\n if(child instanceof HTMLButtonElement) {\r\n // set button style\r\n if ( layer == command.obj1) { // compare int to string\r\n child.classList.add('tab_button_active');\r\n }\r\n else {\r\n child.classList.remove('tab_button_active');\r\n }\r\n } else {\r\n // not a buton - hide unselected tabpages\r\n let style = (layer == command.obj1) ? 'display: inline' : 'display: none';\r\n child.setAttribute('style', style);\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case HtmlProperties.PlaceHolder:\r\n this.htmlElement.setAttribute(\"placeholder\", command.obj1);\r\n break;\r\n\r\n case HtmlProperties.Tooltip:\r\n this.htmlElement.setAttribute(\"title\", command.obj1);\r\n break;\r\n\r\n case HtmlProperties.Password:\r\n if (command.obj1 === false)\r\n this.htmlElement.setAttribute(\"type\", \"text\");\r\n else\r\n this.htmlElement.setAttribute(\"type\", \"password\");\r\n break;\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {StringBuilder, isNullOrUndefined} from \"@magic-xpa/mscorelib\"\r\nimport {PICInterface} from \"@magic-xpa/utils\"\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class Constants {\r\n static readonly DATE_FMT = 'dd/MMM/yyyy';\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Pipe({\r\n name: 'magicDate'\r\n})\r\nexport class DateMagicPipe extends DatePipe implements PipeTransform {\r\n\r\n constructor(protected _task: TaskMagicService) {\r\n super('en-US');\r\n\r\n }\r\n\r\n transform(value: any, controlId: string): any {\r\n\r\n let mask: string = this._task.GetControlPictureMask (controlId).getMask();\r\n let formatStr: string = null;\r\n let mgDateFormatter = new MgDateFormatter();\r\n if (!isNullOrUndefined(value) && mask !== null) {\r\n formatStr = mgDateFormatter.ConvertMgDateFormatToAngular (mask);\r\n // If control is label control of table, due to query mode, then save the format here.\r\n if (formatStr != null && this._task.isTableControl(controlId)) {\r\n if (this._task.mgInputDateFormat == null)\r\n this._task.mgInputDateFormat = formatStr;\r\n else\r\n formatStr = this._task.mgInputDateFormat;\r\n }\r\n return super.transform(value, formatStr);\r\n }\r\n else\r\n value = \"\";\r\n\r\n return value;\r\n }\r\n}\r\n\r\nexport class MgDateFormatter {\r\n\r\n ConvertMgDateFormatToAngular(mgDateMask: string) : string\r\n {\r\n let formatStr: StringBuilder = new StringBuilder ();\r\n\r\n if (mgDateMask !== null) {\r\n for (let i: number = 0; i < mgDateMask.length;) {\r\n switch (mgDateMask.charCodeAt(i)) {\r\n case PICInterface.PIC_YYYY:\r\n formatStr.Append('yyyy');\r\n i += 4;\r\n break;\r\n case PICInterface.PIC_MMD:\r\n formatStr.Append('MM');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_YY:\r\n formatStr.Append('yy');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_MMM:\r\n {\r\n let cnt = 0;\r\n for (;i < mgDateMask.length; i++)\r\n if (mgDateMask.charCodeAt(i) == PICInterface.PIC_MMM)\r\n cnt++;\r\n else\r\n break;\r\n\r\n if (cnt == 3)\r\n formatStr.Append('MMM');\r\n if (cnt > 3)\r\n formatStr.Append('MMMM');\r\n }\r\n\r\n break;\r\n case PICInterface.PIC_DD:\r\n formatStr.Append('dd');\r\n i += 2;\r\n\r\n break;\r\n\r\n case PICInterface.PIC_WWW: {\r\n let cnt = 0;\r\n for (;i < mgDateMask.length; i++)\r\n if (mgDateMask.charCodeAt(i) == PICInterface.PIC_WWW)\r\n cnt++;\r\n else\r\n break;\r\n\r\n if (cnt == 3)\r\n formatStr.Append('EEE');\r\n if (cnt > 3)\r\n formatStr.Append('EEEE');\r\n }\r\n\r\n break;\r\n\r\n default:\r\n formatStr.Append(mgDateMask.charAt(i));\r\n i++;\r\n break;\r\n }\r\n }\r\n return formatStr.ToString();\r\n }\r\n else\r\n return \"dd-mm-yyyy\"; // return default format.\r\n\r\n }\r\n}\r\n","import {Directive, HostListener} from '@angular/core';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {StringBuilder, RefParam} from '@magic-xpa/mscorelib';\r\nimport {PICInterface, StorageAttribute} from '@magic-xpa/utils';\r\nimport {MagicDirective} from './magic.directive';\r\nimport {AbstractControl, Validators} from '@angular/forms';\r\nimport {PIC} from '@magic-xpa/gui';\r\nimport {MgDateFormatter} from '../pipes/date.magic.pipe';\r\nimport {isUndefined} from '@magic-xpa/mscorelib';\r\nimport {Environment, LastFocusedManager} from \"@magic-xpa/engine\";\r\n/**\r\n * Perform Magic validation on input controls which hold alphanumeric strings\r\n */\r\n@Directive({\r\n selector: '[mgFormat]'\r\n})\r\n\r\n\r\nexport class MgformatMagicDirective {\r\n\r\n datePasteFlag: boolean = false;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n protected magicDir: MagicDirective ,\r\n protected _task: TaskMagicService\r\n\r\n ) { }\r\n\r\n ngAfterViewInit() {\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n\r\n if(control != null && this._task.mgInputDateFormat == null) {\r\n // get the first date control's format.\r\n let pic: PIC = this._task.GetControlPictureMask(this.magicDir.id);\r\n if (pic.getAttr() == StorageAttribute.DATE ) {\r\n this.formatDate(pic);\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n /**\r\n * This can be used to set pattern\r\n * On input, verifies the input matches the required mask\r\n */\r\n @HostListener('focus', ['$event'])\r\n public onFocusEvent($event){\r\n this.calculatePattern();\r\n }\r\n\r\n @HostListener('paste', ['$event'])\r\n onPaste(event: ClipboardEvent) {\r\n /**\r\n * This flag is needed to skip execution of dateMasking() method when user paste date in input control.\r\n * This is only needed when \"StorageAttribute\" is DATE. But to check type of \"StorageAttribute\", we\r\n need to execute getControlMetadata() method. So, to reduce this execution overload we set\r\n \"datePasteFlag\" directly.\r\n */\r\n this.datePasteFlag = true;\r\n }\r\n\r\n @HostListener('input', ['$event'])\r\n public onInputEvent(event){\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;\r\n if (attr == StorageAttribute.DATE){\r\n if(!this.datePasteFlag)\r\n this.dateMasking(event);\r\n\r\n this.datePasteFlag = false;\r\n }\r\n this.calculatePattern();\r\n }\r\n\r\n\r\n //This method inserts '/' as a separator while entering date in the textbox.\r\n //Example: 10/10/2023\r\n dateMasking(event){\r\n\r\n const input = event.target;\r\n let cursorPos = event.target.selectionStart;\r\n const separator = this._task.mgInputDateFormat.includes('/')? '/':'-';\r\n\r\n if(cursorPos >= input.value.length) {\r\n\r\n const value = input.value.replace(/[^a-zA-Z0-9/-]/g, '');\r\n\r\n if (this._task.mgInputDateFormat == \"dd/MM/yyyy\" || this._task.mgInputDateFormat == \"MM/dd/yyyy\" ||this._task.mgInputDateFormat == \"dd-MM-yyyy\" ||this._task.mgInputDateFormat == \"MM-dd-yyyy\") {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2) + separator + value.slice(2);\r\n else if (value.length == 4 && value[3] == separator)\r\n input.value = value.slice(0, 3) + '01' + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 3) + '0' + value.slice(3);\r\n else if(value.length == 6 && value[5] != separator)\r\n input.value = value.slice(0, 5)+ separator + value.slice(5);\r\n else if(value.length >= 10)\r\n input.value = value.slice(0, 10);\r\n\r\n } else if (this._task.mgInputDateFormat == \"yyyy/MM/dd\" || this._task.mgInputDateFormat == \"yyyy/dd/MM\" || this._task.mgInputDateFormat == \"yyyy-MM-dd\" || this._task.mgInputDateFormat == \"yyyy-dd-MM\") {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '0000' + separator;\r\n else if(value.length == 2 && value[1] == separator)\r\n input.value = '000' + value.slice(0);\r\n else if(value.length == 3 && value[2] == separator)\r\n input.value = '00' + value.slice(0);\r\n else if(value.length == 4 && value[3] == separator)\r\n input.value = '0' + value.slice(0);\r\n else if(value.length == 5 && value[4] != separator)\r\n input.value = value.slice(0, 4) + separator + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 5) + '01' + value.slice(5);\r\n else if(value.length == 7 && value[6] == separator)\r\n input.value = value.slice(0, 5) + '0' + value.slice(5);\r\n else if(value.length == 8 && value[7] != separator)\r\n input.value = value.slice(0, 7) + separator + value.slice(7);\r\n else if(value.length >= 10)\r\n input.value = value.slice(0, 10);\r\n\r\n } else if (this._task.mgInputDateFormat == \"dd/MM/yy\" || this._task.mgInputDateFormat == \"yy/MM/dd\" || this._task.mgInputDateFormat == \"MM/dd/yy\" || this._task.mgInputDateFormat == \"yy/dd/MM\" ||this._task.mgInputDateFormat == \"dd-MM-yy\" || this._task.mgInputDateFormat == \"yy-MM-dd\" || this._task.mgInputDateFormat == \"MM-dd-yy\" || this._task.mgInputDateFormat == \"yy-dd-MM\") {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if (value.length == 4 && value[3] == separator)\r\n input.value = value.slice(0, 3) + '01' + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 3) + '0' + value.slice(3);\r\n else if(value.length == 6 && value[5] != separator)\r\n input.value = value.slice(0, 5)+ separator + value.slice(5);\r\n else if(value.length >= 8)\r\n input.value = value.slice(0, 8);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"dd/MMM/yy\" || this._task.mgInputDateFormat == \"dd-MMM-yy\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 9)\r\n input.value = value.slice(0, 9);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"dd/MMM/yyyy\" || this._task.mgInputDateFormat == \"dd-MMM-yyyy\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 11)\r\n input.value = value.slice(0, 11);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"yy/dd/MMM\" || this._task.mgInputDateFormat == \"yy-dd-MMM\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '00' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if (value.length == 4 && value[3] == separator)\r\n input.value = value.slice(0, 3) + '01' + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 3) + '0' + value.slice(3);\r\n else if(value.length == 6 && value[5] != separator)\r\n input.value = value.slice(0, 5) + separator + value.slice(5);\r\n else if(value.length >= 9)\r\n input.value = value.slice(0, 9);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"yyyy/dd/MMM\" || this._task.mgInputDateFormat == \"yyyy-dd-MMM\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '0000' + separator;\r\n else if(value.length == 2 && value[1] == separator)\r\n input.value = '000' + value.slice(0);\r\n else if(value.length == 3 && value[2] == separator)\r\n input.value = '00' + value.slice(0);\r\n else if(value.length == 4 && value[3] == separator)\r\n input.value = '0' + value.slice(0);\r\n else if(value.length == 5 && value[4] != separator)\r\n input.value = value.slice(0, 4) + separator + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 5) + '01' + value.slice(5);\r\n else if(value.length == 7 && value[6] == separator)\r\n input.value = value.slice(0, 5) + '0' + value.slice(5);\r\n else if(value.length == 8 && value[7] != separator)\r\n input.value = value.slice(0, 7) + separator + value.slice(7);\r\n else if(value.length >= 11)\r\n input.value = value.slice(0, 11);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"MMM/dd/yy\" || this._task.mgInputDateFormat == \"MMM-dd-yy\" ) {\r\n if(value.length == 4 && value[3] != separator)\r\n input.value = value.slice(0, 3) + separator + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 4)+ '01' + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 4)+ '0' + value.slice(4);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 9)\r\n input.value = value.slice(0, 9);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"MMM/dd/yyyy\" || this._task.mgInputDateFormat == \"MMM-dd-yyyy\" ) {\r\n if(value.length == 4 && value[3] != separator)\r\n input.value = value.slice(0, 3) + separator + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 4)+ '01' + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 4)+ '0' + value.slice(4);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 11)\r\n input.value = value.slice(0, 11);\r\n\r\n }\r\n }\r\n if(cursorPos < input.value.length && input.value.length > this._task.mgInputDateFormat.length){\r\n let inputDate = input.value;\r\n let start = input.selectionStart-1;\r\n let end = input.selectionEnd-1;\r\n let indexToRemove = input.selectionStart-1;\r\n\r\n input.value = inputDate.slice(0,indexToRemove) + inputDate.slice(indexToRemove + 1);\r\n input.setSelectionRange(start, end);\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // This can be used to implement uppercase/lower case\r\n @HostListener('change', ['$event'])\r\n public onChangeEvent(event){\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;\r\n\r\n switch (attr)\r\n {\r\n case StorageAttribute.ALPHA:\r\n case StorageAttribute.UNICODE:\r\n this.formatAlphaUnicode (control);\r\n break;\r\n case StorageAttribute.BOOLEAN:\r\n this.formatBoolean(control);\r\n break;\r\n\r\n }\r\n }\r\n\r\n\r\n @HostListener('blur', ['$event'])\r\n public onBlurEvent(event) {\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType; \r\n\r\n if(attr == StorageAttribute.DATE){\r\n const century = Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx());\r\n this.formatDateWithCentury(event.target.value, century, control);\r\n }\r\n\r\n }\r\n\r\n /** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */\r\n formatDateWithCentury(userInput: string, century: number, control: AbstractControl) {\r\n const dateFormat = this._task.mgInputDateFormat;\r\n const separator = userInput.includes('/') ? '/' : \"-\";\r\n let centuryVal = parseInt(century.toString().slice(0, 2));\r\n if(userInput.length == 0)\r\n return ;\r\n\r\n if ((dateFormat == 'dd/MMM/yyyy' || dateFormat == 'dd-MMM-yyyy')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'dd/MM/yyyy' || dateFormat == 'dd-MM-yyyy' || dateFormat == 'd/M/yyyy' || dateFormat == 'd-M-yyyy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'MM/dd/yyyy' || dateFormat == 'MM-dd-yyyy' || dateFormat == 'M/d/yyyy' || dateFormat == 'M-d-yyyy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if ((dateFormat == 'MMM/dd/yyyy' || dateFormat == 'MMM-dd-yyyy')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/MM/dd' || dateFormat == 'yyyy-MM-dd')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments3(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/dd/MM' || dateFormat == 'yyyy-dd-MM')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n if ((day < 32 && month < 13)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/dd/MMM' || dateFormat == 'yyyy-dd-MMM')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'dd/MM/yy' || dateFormat == 'dd-MM-yy' || dateFormat == 'd/M/yy' || dateFormat == 'd-M-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'MM/dd/yy' || dateFormat == 'MM-dd-yy' || dateFormat == 'M/d/yy' || dateFormat == 'M-d-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yy/MM/dd' || dateFormat == 'yy-MM-dd')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments3(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yy/dd/MM' || dateFormat == 'yy-dd-MM')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'dd/MMM/yy' || dateFormat == 'dd-MMM-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yy/dd/MMM' || dateFormat == 'yy-dd-MMM')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'MMM/dd/yy' || dateFormat == 'MMM-dd-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/MMM/dd' || dateFormat == 'yyyy-MMM-dd' ||dateFormat == 'yy/MMM/dd' || dateFormat == 'yy-MMM-dd')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments3(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if(dateFormat == 'yyyy/MM' || dateFormat == 'yyyy-MM'){\r\n const dateArray: string[] = userInput.split(separator);\r\n const month = dateArray[1];\r\n const year = Number(dateArray[0]);\r\n if (Number(month) < 13) {\r\n this.updateYear(1, month, year, separator, century, centuryVal, control);\r\n }\r\n }\r\n }\r\n\r\n updateYear(day:number, month:string, year:number, separator:string, century:number, centuryVal:number, control:AbstractControl){\r\n let updatedYear = year.toString().length === 2 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '' + year :\r\n year.toString().length === 1 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '0' + year :\r\n year;\r\n\r\n control.setValue(new Date(`${updatedYear}${separator}${month}${separator}${day}`))\r\n }\r\n\r\n getDateSegments1(dateArray){\r\n const day = Number(dateArray[0]);\r\n const month = dateArray[1];\r\n const year = Number(dateArray[2]);\r\n return [day, month, year];\r\n }\r\n\r\n getDateSegments2(dateArray){\r\n const day = Number(dateArray[1]);\r\n const month = dateArray[0];\r\n const year = Number(dateArray[2]);\r\n return [day, month, year];\r\n }\r\n\r\n getDateSegments3(dateArray){\r\n const day = Number(dateArray[2]);\r\n const month = dateArray[1];\r\n const year = Number(dateArray[0]);\r\n return [day, month, year];\r\n }\r\n\r\n getDateSegments4(dateArray){\r\n const day = Number(dateArray[1]);\r\n const month = dateArray[2];\r\n const year = Number(dateArray[0]);\r\n return [day, month, year];\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n calculatePattern ()\r\n {\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n\r\n if(control != null ) {\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;\r\n if (attr == StorageAttribute.NUMERIC || attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {\r\n let pic: PIC = this._task.GetControlPictureMask(this.magicDir.id);\r\n\r\n if (this.isPatternGenerationNeeded(attr, pic)) {\r\n let pattern: string = this.generatePattern(attr, pic);\r\n if (control.validator == null)\r\n control.setValidators(Validators.pattern(pattern));\r\n else\r\n control.setValidators([control.validator, Validators.pattern(pattern)]);\r\n }\r\n else {\r\n if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {\r\n if (control.validator == null)\r\n control.setValidators(Validators.maxLength(pic.getMaskLength()));\r\n else {\r\n // re-set all validators again\r\n if (pic.isFormatExp()) {\r\n control.setValidators(Validators.maxLength(pic.getMaskLength()));\r\n if (isUndefined(this.magicDir.rowId))\r\n this.magicDir.rowId = '0';\r\n control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);\r\n }\r\n else\r\n control.setValidators([control.validator, Validators.maxLength(pic.getMaskLength())]);\r\n }\r\n\r\n // control.setValidators(Validators.maxLength(pic.getMaskLength()));\r\n control.updateValueAndValidity();\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n formatDate(pic: PIC): void {\r\n let mgDateFormatter = new MgDateFormatter();\r\n this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());\r\n }\r\n /**\r\n * @ignore\r\n */\r\n formatAlphaUnicode(control: AbstractControl): void {\r\n let value: string = control.value;\r\n\r\n if (value !== null && value.length > 0) {\r\n const newValue: string = this._task.GetRangedValue(this.magicDir.id, value);\r\n if (newValue != null)\r\n value = newValue;\r\n\r\n let pic: PIC = this._task.GetControlPictureMask(this.magicDir.id);\r\n let mask: string = pic.getMask();\r\n let valueStr: StringBuilder = new StringBuilder();\r\n\r\n for (let i: number = 0; i < value.length; i++) {\r\n switch (mask.charCodeAt(i)) {\r\n case PICInterface.PIC_U:\r\n valueStr.Append(value.charAt(i).toUpperCase());\r\n break;\r\n case PICInterface.PIC_L:\r\n valueStr.Append(value.charAt(i).toLowerCase());\r\n break;\r\n default:\r\n valueStr.Append(value.charAt(i));\r\n break;\r\n }\r\n }\r\n\r\n control.setValue(valueStr.ToString());\r\n\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n formatBoolean (control: AbstractControl): void {\r\n let value: string = control.value;\r\n if (value !== null && value.length > 0) {\r\n let newValue: string = this._task.GetRangedValue (this.magicDir.id , value);\r\n if (newValue.toUpperCase().startsWith(value.toUpperCase())) {\r\n control.setValue(newValue);\r\n } else {\r\n control.setValue(value);\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n /// <summary>\r\n /// generate pattern from fld's format\r\n /// </summary>\r\n generatePattern (attribute: StorageAttribute, pic: PIC): string {\r\n let pattern: string = '';\r\n\r\n switch (attribute)\r\n {\r\n case StorageAttribute.NUMERIC:\r\n pattern = this.generatePatternForNumber(pic);\r\n break;\r\n case StorageAttribute.ALPHA:\r\n case StorageAttribute.UNICODE:\r\n pattern = this.generatePatternForAlpha(pic);\r\n break;\r\n }\r\n\r\n return pattern;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n /// <summary>\r\n /// generate pattern for Alpha\r\n /// </summary>\r\n generatePatternForNumber(pic: PIC): string {\r\n let patternStr: StringBuilder = new StringBuilder ();\r\n\r\n patternStr.Append('^');\r\n if (pic.isNegative())\r\n patternStr.Append('-?');\r\n if (pic.getWholes())\r\n patternStr.AppendFormat('\\\\d{{0},{1}}', 0, pic.getWholes());\r\n if (pic.getDec())\r\n patternStr.AppendFormat('(\\\\.\\\\d{1,{0}})?', pic.getDec());\r\n patternStr.Append('$');\r\n\r\n return patternStr.ToString();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n isPatternGenerationNeeded (attr : StorageAttribute, pic : PIC): boolean {\r\n\r\n switch (attr) {\r\n case StorageAttribute.NUMERIC:\r\n return true;\r\n\r\n case StorageAttribute.ALPHA:\r\n case StorageAttribute.UNICODE:\r\n return (pic.getMaskChars() > 0) ? true : false;\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n /// <summary>\r\n /// generate pattern for Alpha\r\n /// </summary>\r\n generatePatternForAlpha(pic : PIC): string {\r\n let cnt: number = 0;\r\n let inputAllChars: boolean = false;\r\n let closeSet: boolean = false;\r\n let mask: string = pic.getMask();\r\n let pattern: StringBuilder = new StringBuilder();\r\n\r\n pattern.Append('^');\r\n for (let i: number = 0; i < mask.length;)\r\n {\r\n //start new subset , if mask[i] is one of these.\r\n if (inputAllChars && (mask.charCodeAt(i) == PICInterface.PIC_N || mask.charCodeAt(i) == PICInterface.PIC_U || mask.charCodeAt(i) == PICInterface.PIC_L\r\n || mask.charCodeAt(i) == PICInterface.PIC_X))\r\n {\r\n pattern.Append('(');\r\n closeSet = true;\r\n inputAllChars = false;\r\n }\r\n\r\n cnt = 0;\r\n switch (mask.charCodeAt(i))\r\n {\r\n case PICInterface.PIC_U:\r\n case PICInterface.PIC_X:\r\n case PICInterface.PIC_L:\r\n {\r\n pattern.Append('.');\r\n let inputAllCharsRef: RefParam<boolean> = new RefParam<boolean>(false);\r\n let dirs: string = PICInterface.PIC_U.toString();\r\n dirs += PICInterface.PIC_L.toString();\r\n dirs += PICInterface.PIC_X.toString();\r\n cnt = this.getDirectiveCount(mask, i, dirs, inputAllCharsRef);\r\n inputAllChars = inputAllCharsRef.value;\r\n i += cnt;\r\n\r\n }\r\n break;\r\n case PICInterface.PIC_N:\r\n {\r\n pattern.Append('\\\\d');\r\n let inputAllCharsRef: RefParam<boolean> = new RefParam<boolean>(false);\r\n cnt = this.getDirectiveCount(mask, i, PICInterface.PIC_L.toString(), inputAllCharsRef);\r\n inputAllChars = inputAllCharsRef.value;\r\n i += cnt;\r\n }\r\n break;\r\n\r\n default:\r\n pattern.Append(mask[i]);\r\n i++;\r\n break;\r\n }\r\n if (cnt > 0)\r\n pattern.AppendFormat('{{0},{1}}', inputAllChars ? cnt : 0, cnt);\r\n if (closeSet)\r\n pattern.Append(')');\r\n closeSet = false;\r\n\r\n }\r\n pattern.Append('$');\r\n return pattern.ToString();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getDirectiveCount(mask: string, idx: number, pattern: string, changeInPattern: RefParam<boolean> ): number {\r\n\r\n changeInPattern.value = false;\r\n let patternCount: number = 0;\r\n\r\n // find max chars\r\n while (idx < mask.length && this.IsPatternMatches(mask.charCodeAt(idx).toString(), pattern))\r\n { patternCount++; idx++; }\r\n\r\n\r\n if (idx < mask.length)\r\n changeInPattern.value = true;\r\n\r\n return patternCount;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n IsPatternMatches(mask: string, pattern: string): boolean {\r\n\r\n for (let i:number = 0; i < pattern.length; i++)\r\n if (mask == pattern[i])\r\n return true;\r\n return false;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {StringBuilder} from \"@magic-xpa/mscorelib\"\r\nimport {PICInterface} from \"@magic-xpa/utils\"\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Pipe({\r\n name: 'magicTime'\r\n})\r\nexport class TimeMagicPipe extends DatePipe implements PipeTransform {\r\n\r\n constructor(protected _task: TaskMagicService) {\r\n super('en-US');\r\n }\r\n\r\n transform(value: any, controlId: string): any {\r\n let mask: string = this._task.GetControlPictureMask (controlId).getMask();\r\n let formatStr: StringBuilder = new StringBuilder ();\r\n\r\n if (typeof value !== \"undefined\" && mask !== null) {\r\n for (let i: number = 0; i < mask.length;) {\r\n switch (mask.charCodeAt(i)) {\r\n case PICInterface.PIC_HH:\r\n formatStr.Append('hh');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_MMT:\r\n formatStr.Append('mm');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_SS:\r\n formatStr.Append('ss');\r\n i += 2;\r\n break;\r\n default:\r\n formatStr.Append(mask.charAt(i));\r\n i++;\r\n break;\r\n }\r\n }\r\n\r\n formatStr.Append(' a');\r\n return super.transform(value, formatStr.ToString());\r\n }\r\n return value;\r\n }\r\n}\r\n","import { Directive, ViewContainerRef } from '@angular/core';\r\nimport { FormControl, NG_VALIDATORS, Validator } from '@angular/forms';\r\nimport { TaskMagicService } from '../../services/task.magics.service';\r\nimport { ControlMetadata } from '../../controls.metadata.model';\r\n\r\n/**\r\n * Validates the field range.\r\n */\r\n@Directive({\r\n selector: '[rangevalidator] ',\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: RangeValidatorMagicDirective,\r\n\r\n multi: true,\r\n\r\n }\r\n ]\r\n})\r\n\r\nexport class RangeValidatorMagicDirective implements Validator {\r\n\r\n /**\r\n *\r\n * @param _task The task service\r\n * @param vcRef\r\n */\r\n constructor(protected _task: TaskMagicService, protected vcRef: ViewContainerRef) {\r\n }\r\n\r\n /**\r\n * Validation method\r\n * @param c FormControl to validate\r\n * @returns If validation fails, return error message, else returns null\r\n */\r\n validate(c: FormControl) {\r\n let controlName: string;\r\n controlName = this.getControlName (c);\r\n let properties: ControlMetadata;\r\n properties = this._task.Records.list[\"0\"].getControlMetadata(controlName);\r\n properties.rangeValidator = true;\r\n let errMsg: string = null;\r\n if (c.dirty)\r\n errMsg = this._task.ValidateControlValue (controlName, this._task.ConvertValToNative(controlName, 0, c.value));\r\n let isValid: boolean = (errMsg == null) ? true : false;\r\n if (isValid) {\r\n return null;\r\n }\r\n else {\r\n return {\r\n rangevalidator: {\r\n errorMsg : errMsg\r\n }\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getControlName(c: FormControl): string | null {\r\n const formGroup = c.parent.controls;\r\n return Object.keys(formGroup).find(name => c === formGroup[name]) || null;\r\n }\r\n}\r\n","import {Component, Input, ViewContainerRef} from \"@angular/core\";\r\nimport {TaskBaseMagicComponent} from \"./task-base.magic.component\";\r\nimport { SubformMagicService } from \"../services/subform.magic.service\";\r\nimport { isNullOrUndefined } from '@magic-xpa/mscorelib';\r\n\r\n/**\r\n * Represents a Magic subform\r\n */\r\n@Component({\r\n selector: 'magic-subform',\r\n template: `\r\n <ndc-dynamic\r\n *ngIf=\"Component\" \r\n [ndcDynamicComponent]=\"Component\" \r\n [ndcDynamicInputs]=\"Parameters\">\r\n </ndc-dynamic>\r\n`})\r\n\r\n\r\nexport class SubformMagicComponent {\r\n /**\r\n * @ignore\r\n */\r\n id : string;\r\n\r\n /**\r\n * @ignore\r\n */\r\n @Input('magic') set magic(val) {this.id = val; };\r\n\r\n /**\r\n * @ignore\r\n */\r\n component: TaskBaseMagicComponent = null;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(private vcRef: ViewContainerRef, protected mgSub: SubformMagicService) {\r\n // For angular 13 - find the component from _hostLView\r\n this.component = ((<any>this.vcRef)._hostLView).find(v => !isNullOrUndefined((v as TaskBaseMagicComponent)));\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n get Component(): Component {\r\n return this.mgSub.mgGetComp(this.id);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n get Parameters(): any {\r\n return this.mgSub.mgGetParameters(this.id);\r\n }\r\n}\r\n\r\n","import { ChangeDetectorRef, Component, ElementRef, Input, ViewChild } from \"@angular/core\";\r\nimport {AccessorMagicService} from \"../services/accessor.magic.service\";\r\nimport {TaskMagicService} from \"../services/task.magics.service\";\r\nimport { isUndefined } from \"@magic-xpa/mscorelib\";\r\n\r\n/**\r\n * Represents a Magic subform\r\n */\r\n@Component({\r\n selector: 'mgError',\r\n template: `<div *ngIf=\"HasErrors(id)\">\r\n <div #customContent>\r\n <ng-content></ng-content>\r\n </div>\r\n <span *ngIf=\"defaultDisplay\">\r\n {{mgService.getErrMsg(id, rowId)}} \r\n </span>\r\n </div>\r\n`})\r\n\r\n\r\nexport class ErrorMagicComponent {\r\n /**\r\n * @ignore\r\n */\r\n id: string;\r\n rowId: string;\r\n /**\r\n * @ignore\r\n */\r\n @Input('magic') set magic(val) {\r\n this.id = val;\r\n };\r\n\r\n @Input('rowId') set rowId1(val) {\r\n this.rowId = val;\r\n };\r\n\r\n // if true - display standard magic error message, if false - customer has provides his own content and we'll use it\r\n defaultDisplay = true;\r\n\r\n @ViewChild('customContent', { static: false }) set CustomContent(innerComponent: ElementRef) {\r\n this.defaultDisplay = innerComponent == undefined || this.isEmpty(innerComponent.nativeElement);\r\n this.changeDetectorRef.detectChanges();\r\n };\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(protected _task: TaskMagicService, public mgService: AccessorMagicService, protected changeDetectorRef: ChangeDetectorRef ) {\r\n this.rowId = \"0\";\r\n }\r\n\r\n /**\r\n * returns true if the html element has no children\r\n * @param element\r\n */\r\n isEmpty(element: HTMLElement): boolean {\r\n const nodes = element.childNodes;\r\n for (let i = 0; i < nodes.length; i++) {\r\n const node = nodes.item(i);\r\n if (node.nodeType !== 8 && nodes.item(i).textContent.trim().length !== 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n HasErrors(id: string): boolean {\r\n if (!isUndefined(id)) {\r\n let control = this._task.getFormControl(this.rowId, id);\r\n if (control !== null) {\r\n if (control.dirty && (control.hasError('pattern') || control.hasError('required') ||\r\n control.hasError('rangevalidator') || control.hasError('maxlength') || control.hasError('max')))\r\n return true;\r\n if (control.touched && control.hasError('required'))\r\n return true;\r\n\r\n if(this._task.Records.list[this.rowId] && this._task.Records.list[this.rowId].getControlMetadata(id)){\r\n let controlMetadata = this._task.Records.list[this.rowId].getControlMetadata(id);\r\n for (let customValidator of controlMetadata.customValidators.keys()) {\r\n if (control.hasError(customValidator))\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n","import {Directive, ElementRef, HostListener, Input} from '@angular/core';\r\nimport { MagicDirective } from '../magic.directive';\r\nimport {TaskMagicService} from \"../../../services/task.magics.service\";\r\nimport {getGuiEventObj, IGuiEvent} from \"@magic-xpa/engine\";\r\nimport {filter} from \"rxjs/operators\";\r\nimport {CommandType, GuiCommand, HtmlProperties} from \"@magic-xpa/gui\";\r\n\r\n\r\n/**\r\n * Directive for checkboxes, to handle the 'change' event\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n input[type=checkbox][magic]:not([noFormControl])\r\n`,\r\n })\r\nexport class CheckboxMagicDirective {\r\n @Input() threeState: boolean = false;\r\n private subscribeRefreshDom: any = null;\r\n private isIndeterminate: boolean = false;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor( protected magicDirective: MagicDirective,\r\n private el: ElementRef,\r\n protected task: TaskMagicService,) {\r\n }\r\n\r\n /**\r\n * Handles the Checkbox 'change' event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n if(this.threeState) {\r\n this.handleThreeState();\r\n }\r\n else {\r\n this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if(this.threeState){\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"setAsThreeState\", this.magicDirective.id, +this.magicDirective.rowId);\r\n this.task.insertEvent(guiEvent);\r\n this.el.nativeElement.indeterminate = this.isIndeterminate = this.task.getProperty(this.magicDirective.id, HtmlProperties.CheckBoxIndeterminate, this.magicDirective.rowId);\r\n this.regUpdatesUI();\r\n }\r\n }\r\n private regUpdatesUI() {\r\n this.subscribeRefreshDom = this.task\r\n .refreshDom.pipe(filter(c => this.magicDirective.IsSameElement(c)))\r\n .subscribe(a => {\r\n let command: GuiCommand = a;\r\n try {\r\n this.handleCommand(command);\r\n } catch (ex) {\r\n console.dir(ex);\r\n }\r\n }\r\n );\r\n }\r\n handleCommand(command: GuiCommand){\r\n if (command.CommandType == CommandType.SET_PROPERTY &&\r\n command.Operation == HtmlProperties.CheckBoxIndeterminate) {\r\n this.isIndeterminate = this.el.nativeElement.indeterminate = command.obj1;\r\n }\r\n }\r\n private handleThreeState() {\r\n let value : string = '';\r\n let prevCheckedValue = this.task.getValue(this.magicDirective.id, this.magicDirective.rowId);\r\n const checkbox = this.el.nativeElement;\r\n if (this.isIndeterminate) {\r\n checkbox.checked = false;\r\n checkbox.indeterminate = false;\r\n value = 'unchecked';\r\n } else if (prevCheckedValue) {\r\n checkbox.checked = false;\r\n checkbox.indeterminate = true;\r\n value = 'indeterminate';\r\n } else if (!prevCheckedValue) {\r\n checkbox.checked = true;\r\n checkbox.indeterminate = false;\r\n value = 'checked';\r\n }\r\n // @ts-ignore\r\n this.magicDirective.task.onCheckChanged(value, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy(): void {\r\n if(this.subscribeRefreshDom !== null)\r\n this.subscribeRefreshDom.unsubscribe();\r\n }\r\n}\r\n\r\n\r\n","import { Directive, HostListener } from '@angular/core';\r\nimport { MagicDirective } from '../magic.directive';\r\nimport { GuiCommand, HtmlProperties } from \"@magic-xpa/gui\";\r\nimport { filter } from \"rxjs/operators\";\r\n\r\n\r\n/**\r\n * Directive for comboboxes, to handle the 'change' event\r\n */\r\n@Directive({\r\n selector:\r\n `select[magic]:not([multiple])`,\r\n })\r\nexport class ComboboxMagicDirective{\r\n\r\n constructor(protected magicDirective: MagicDirective) {\r\n // subcribe to refreshDom. This is a special case for native select HTML control.\r\n // to refresh the selected property. Else by default, HTML element doesn't get refreshed as per\r\n // selected value and 1st element remains selected.\r\n this.magicDirective.task.refreshDom.pipe(filter(c => this.magicDirective.IsSameElement(c))).subscribe(value =>{\r\n let command: GuiCommand = value;\r\n if (command.Operation === HtmlProperties.ItemsList)\r\n this.onComboboxItemsListChanged();\r\n });\r\n }\r\n\r\n /**\r\n * Handles the Combobox 'change' event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.onComboboxSelectionChanged($event, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n\r\n /**\r\n * To refresh Combobox selection as per selected property.\r\n */\r\n onComboboxItemsListChanged(): void {\r\n this.magicDirective.task.refreshView();\r\n }\r\n}\r\n\r\n\r\n","import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * This service supports custom actions on magic exit\r\n */\r\n@Injectable()\r\nexport class ExitMagicService {\r\n\r\n\r\n /**\r\n * Override this method to implement custom logic on magic exit\r\n */\r\n exitMagic() {\r\n console.log(\"Magic application terminated\");\r\n }\r\n\r\n}\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n Optional,\r\n TemplateRef,\r\n ViewChild,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { CommandType, GuiCommand } from '@magic-xpa/gui';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { EngineMagicService } from '../services/engine.magic.service';\r\nimport { ComponentListMagicService } from '../services/component-list.magic.service';\r\nimport { GuiInteractiveExecutor } from './GuiInteractiveExecutor';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ExitMagicService } from '../services/exit.magic.service';\r\nimport { OverlayWindowService } from '../services/OverlayWindowService';\r\nimport { IMagicViewContainerRef } from '../..';\r\nimport { CommandsCollectorMagicService } from '../services/commands-collector.magic.service';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport {ActivatedRoute, NavigationEnd, Router} from \"@angular/router\";\r\n\r\n/**\r\n * Root Magic component\r\n */\r\n@Component({\r\n selector: 'magic-root',\r\n providers: [\r\n // ExitMagicService\r\n ],\r\n template: `\r\n <div #magicRoot>\r\n <ndc-dynamic\r\n *ngIf = \"RootComponent !== null\"\r\n [ndcDynamicComponent]=\"RootComponent\"\r\n [ndcDynamicInputs] =\"RootComponentParameters\">\r\n </ndc-dynamic>\r\n\r\n <div #overlayWindowsContainer magicViewContainerRef>\r\n </div>\r\n </div>\r\n\r\n <div class=\"spinner-background\" *ngIf=\"showSpinner\">\r\n <ng-container [ngTemplateOutlet]=\"SpinnerTemplate ? SpinnerTemplate:defaultSpinner\"></ng-container>\r\n </div>\r\n\r\n <ng-template #defaultSpinner>\r\n <div class=\"mgSpinnerClass\"></div>\r\n </ng-template>\r\n `,\r\n styles: [`\r\n .mgSpinnerClass {\r\n border: 10px solid #cccccc; /* Light grey */\r\n border-top: 10px solid black; /* Blue */\r\n border-radius: 50%;\r\n position: fixed;\r\n margin: auto;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: 100px;\r\n height: 100px;\r\n animation: spin 2s linear infinite;\r\n }\r\n .spinner-background {\r\n /* background fixed across whole screen */\r\n position: fixed;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 1000;\r\n left: 0;\r\n opacity: 0.5;\r\n }\r\n @keyframes spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n }\r\n `]\r\n})\r\nexport class MagicShellComponent implements AfterViewInit, IMagicViewContainerRef {\r\n /**\r\n * Root component to be displayed in the window\r\n */\r\n RootComponent : Component = null;\r\n /**\r\n * parameters for the Root Component\r\n */\r\n RootComponentParameters : any;\r\n\r\n overlayWindowsContainerViewRef: ViewContainerRef;\r\n\r\n @ViewChild('magicRoot', { static: true }) rootMagicElementRef: ElementRef;\r\n\r\n @Input() SpinnerTemplate: TemplateRef<any>;\r\n\r\n showSpinner: boolean;\r\n magicEngineTerminated: boolean = false;\r\n\r\n /**\r\n *\r\n * @param magic Magic's service\r\n * @param componentList Magic component list\r\n * @param changeDetectorRef Changes detector\r\n * @param titleService Title setting service\r\n * @param httpClient The native httpClient instance\r\n * @param exitMagicService Magic exit service\r\n */\r\n constructor(protected engineMagicService: EngineMagicService,\r\n protected componentList:ComponentListMagicService,\r\n protected changeDetectorRef: ChangeDetectorRef,\r\n private titleService: Title,\r\n private overlayWindowService: OverlayWindowService,\r\n private httpClient: HttpClient,\r\n private pendingCommandsCollector: CommandsCollectorMagicService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n @Optional() public exitMagicService: ExitMagicService) {\r\n\r\n this.initialize();\r\n this.setTitle();\r\n }\r\n\r\n /**\r\n * Before-unload event listener\r\n * @param event\r\n */\r\n @HostListener('window:beforeunload', ['$event'])\r\n onBeforeUnload(event) {\r\n if(this.engineMagicService.TransCacheExists())\r\n {\r\n // Show the confirmation box before unloading the browser\r\n event.returnValue = 'Are you sure?';\r\n return 'Are you sure?';\r\n }\r\n else\r\n {\r\n // terminate the magic server context using fetch API with keep-alive\r\n this.engineMagicService.TerminateContextUsingFetchAPI();\r\n this.magicEngineTerminated = true;\r\n }\r\n }\r\n\r\n @HostListener('window:unload', ['$event'])\r\n onUnload(event) {\r\n // Chrome provides an opportunity to terminate the context after user approves the browser unload alert\r\n if(!this.magicEngineTerminated)\r\n this.engineMagicService.TerminateContextUsingFetchAPI();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement, this.changeDetectorRef);\r\n\r\n let subscription = this.router.events\r\n .pipe(filter(e => e instanceof NavigationEnd))\r\n .subscribe(e => {\r\n if (this.router.navigated) {\r\n const queryParams = this.route.snapshot.queryParams;\r\n const queryParamsMap = new Map<string, string>();\r\n\r\n // Iterate over the queryParams object and populate the Map\r\n for (const key in queryParams) {\r\n if (queryParams.hasOwnProperty(key)) {\r\n queryParamsMap.set(key, queryParams[key].toString());\r\n }\r\n }\r\n\r\n this.engineMagicService.startMagicEngine(this.httpClient, queryParamsMap);\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n\r\n setViewContainerRef(vcRef: ViewContainerRef){\r\n this.overlayWindowsContainerViewRef = vcRef;\r\n }\r\n\r\n /**\r\n * Initialization of Magic mechanisms\r\n */\r\n initialize() {\r\n this.registerUICommands();\r\n }\r\n\r\n /**\r\n * Set the title\r\n */\r\n public setTitle( ) {\r\n const newTitle: string = this.componentList.title;\r\n this.titleService.setTitle( newTitle );\r\n }\r\n\r\n /**\r\n * Set the component according to requested form\r\n * @param formName Name of the form to open\r\n * @param taskId Id of opening task\r\n * @param taskDescription TODO\r\n * @param isModal whether modal window is being opened\r\n */\r\n private setComponent(formName: string, taskId: string, taskDescription: string, isModal: boolean) {\r\n this.pendingCommandsCollector.startCollecting();\r\n\r\n if(isModal) {\r\n this.overlayWindowService.open(formName, taskId, taskDescription);\r\n }\r\n else {\r\n this.RootComponent = this.componentList.getComponent(formName);\r\n this.RootComponentParameters = { taskIdParam: taskId, taskDescription: taskDescription };\r\n }\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n registerUICommands() {\r\n this.engineMagicService.refreshDom.pipe(\r\n filter(command => command.TaskTag === '0'))\r\n .subscribe(command => {\r\n this.executeCommand(command);\r\n });\r\n this.engineMagicService\r\n .interactiveCommands.pipe(\r\n filter(command => command.TaskTag === '0'))\r\n .subscribe(command => {\r\n GuiInteractiveExecutor.executeInteractiveCommand(null, command, this.overlayWindowService);\r\n });\r\n }\r\n\r\n /**\r\n * Execute commands received from the Magic WebClient engine\r\n * @param command\r\n */\r\n executeCommand(command: GuiCommand): void {\r\n switch (command.CommandType) {\r\n case CommandType.OPEN_FORM:\r\n this.setComponent(command.str, command.stringList[0], command.stringList[1], command.Bool1);\r\n break;\r\n\r\n case CommandType.SET_IS_LOGGED_IN:\r\n this.engineMagicService.setIsLoggedIn(command.Bool1);\r\n break;\r\n\r\n case CommandType.CLOSE_FORM:\r\n if (this.RootComponent != null && command.str === this.RootComponentParameters.taskIdParam) {\r\n this.RootComponent = null;\r\n this.RootComponentParameters = {};\r\n\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n else { // Close modal window\r\n this.overlayWindowService.close(command.str);\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n break;\r\n\r\n case CommandType.RELOAD_PAGE:\r\n window.location.reload();\r\n break;\r\n\r\n case CommandType.SHOW_SPINNER:\r\n if (this.showSpinner != command.Bool1) {\r\n this.showSpinner = command.Bool1;\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n break;\r\n\r\n case CommandType.EXIT_MAGIC:\r\n if (this.exitMagicService)\r\n this.exitMagicService.exitMagic();\r\n break;\r\n\r\n case CommandType.SHOW_HTML_ERROR:\r\n window.document.write(command.str);\r\n break;\r\n }\r\n }\r\n}\r\n","import { Directive, forwardRef } from '@angular/core';\r\nimport { CheckboxControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => MagicCheckboxControlValueAccessor),\r\n multi: true,\r\n};\r\n\r\n/**\r\n * Value accessor for Checkbox without a FormControl\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n input[type=checkbox][magic]:not([formControlName]):not([no-form-control]),\r\n input[type=checkbox][magic]:not([formControl]),\r\n input[type=checkbox][magic]:not([ngModel])\r\n `,\r\n host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'},\r\n providers: [CHECKBOX_VALUE_ACCESSOR]\r\n})\r\nexport class MagicCheckboxControlValueAccessor extends CheckboxControlValueAccessor {\r\n\r\n}\r\n","import { Directive, forwardRef } from '@angular/core';\r\nimport { DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const MAGIC_DEFAULT_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => MagicDefaultValueAccessor),\r\n multi: true\r\n};\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n selector: `\r\n input[magic]:not([type=checkbox]):not([formControlName]):not([no-form-control]),\r\n textarea[magic]:not([formControlName]):not([noFormControl]):not([no-form-control])\r\n `,\r\n host: {\r\n '(input)': '$any(this)._handleInput($event.target.value)',\r\n '(blur)': 'onTouched()',\r\n '(compositionstart)': '$any(this)._compositionStart()',\r\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\r\n },\r\n providers: [MAGIC_DEFAULT_VALUE_ACCESSOR],\r\n exportAs: 'magic'\r\n})\r\nexport class MagicDefaultValueAccessor extends DefaultValueAccessor {\r\n\r\n /*constructor(_renderer: Renderer2, _elementRef: ElementRef, @Optional() @Inject(COMPOSITION_BUFFER_MODE) _compositionMode: boolean) {\r\n super(_renderer, _elementRef, _compositionMode);\r\n debugger;\r\n }*/\r\n\r\n}\r\n","import { Directive, HostListener } from \"@angular/core\";\r\nimport { MagicDirective } from \"../magic.directive\";\r\n\r\n\r\n/**\r\n * Directive for checkboxes which should not have a form control\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n input[type=checkbox][magic]:([noFormControl]) \r\n `,\r\n})\r\nexport class CheckboxNoFormControlMagicDirective {\r\n constructor(protected magicDirective: MagicDirective) {\r\n }\r\n\r\n\r\n /**\r\n * Handle the 'Checkbox' change event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n}\r\n","import {Directive, HostListener} from \"@angular/core\";\r\nimport {MagicDirective} from '../magic.directive';\r\n\r\n\r\n/**\r\n * Directive for non-checkbox input controls which do not have a form control\r\n */\r\n@Directive({\r\n selector: `input[magic]:([noFormControl]):not([type=checkbox]),\r\n textarea[magic]:([noFormControl]):not([type=checkbox])`\r\n\r\n})\r\nexport class InputNoFormControlMagicDirective {\r\n constructor(protected magicDirective: MagicDirective) {\r\n }\r\n\r\n\r\n /**\r\n * Handles the 'change' event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.setInputTextValue(this.magicDirective.id,\r\n this.magicDirective.rowId,\r\n (<HTMLInputElement>event.srcElement).value)\r\n }\r\n}\r\n","import {\r\n Directive,\r\n ElementRef,\r\n forwardRef,\r\n HostListener,\r\n Renderer2\r\n} from \"@angular/core\";\r\nimport {AbstractControl, ControlValueAccessor, NG_VALUE_ACCESSOR} from \"@angular/forms\";\r\nimport {MagicDirective} from \"../../../magic.directive\";\r\nimport {TaskMagicService} from \"../../../../../services/task.magics.service\";\r\nimport {Environment, LastFocusedManager} from \"@magic-xpa/engine\";\r\n\r\nexport const DATE_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DateValueAccessor),\r\n multi: true\r\n};\r\n\r\n/**\r\n * The accessor for writing a value and listening to changes on a date input element\r\n *\r\n * ### Example\r\n * `<input type=\"date\" name=\"birthday\" ngModel dateInput>`\r\n * OR\r\n * `<input type=\"date\" formControlName=\"birthday\" dateInput>`\r\n */\r\n@Directive({\r\n selector: \"[dateInput]\",\r\n providers: [DATE_VALUE_ACCESSOR]\r\n})\r\nexport class DateValueAccessor implements ControlValueAccessor {\r\n @HostListener(\"input\", [\"$event.target.valueAsDate\"])\r\n onChange = (_: any) => {};\r\n @HostListener(\"blur\", [])\r\n onTouched = () => {};\r\n\r\n @HostListener('blur', ['$event'])\r\n public onBlurEvent(event) {\r\n const century = Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx());\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);\r\n\r\n this.formatDateWithCentury(event.target.value, century, control);\r\n }\r\n\r\n constructor(private renderer: Renderer2, private elementRef: ElementRef,\r\n protected magicDir: MagicDirective ,\r\n protected _task: TaskMagicService) {}\r\n\r\n\r\n /** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */\r\n formatDateWithCentury(userInput:string, century:number, control: AbstractControl){\r\n const separator = userInput.includes('/')?'/':\"-\";\r\n let centuryVal = parseInt(century.toString().slice(0, 2));\r\n if(userInput.length == 0)\r\n return ;\r\n\r\n const dateArray: string[] = userInput.split(separator);\r\n const day = Number(dateArray[2]);\r\n const month = Number(dateArray[1]);\r\n const year = Number(dateArray[0]);\r\n\r\n let updatedYear = year.toString().length === 2 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '' + year :\r\n year.toString().length === 1 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '0' + year :\r\n year;\r\n\r\n control.setValue(new Date(`${updatedYear}${separator}${month}${separator}${day}`))\r\n }\r\n\r\n\r\n /** Writes a new value to the element (model -> view) */\r\n writeValue(value: Date): void {\r\n if (!value) {\r\n this.renderer.setProperty(this.elementRef.nativeElement, \"value\", null);\r\n return;\r\n }\r\n\r\n this.renderer.setProperty(\r\n this.elementRef.nativeElement,\r\n \"valueAsDate\",\r\n new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate()))\r\n );\r\n }\r\n\r\n /** Registers a callback function, called when value changes (view -> model) */\r\n registerOnChange(fn: (_: any) => void): void {\r\n this.onChange = v =>\r\n fn(\r\n v instanceof Date\r\n ? new Date(v.getUTCFullYear(), v.getUTCMonth(), v.getUTCDate())\r\n : v\r\n );\r\n }\r\n\r\n /** Registers a callback function, called when the control is blurred */\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n /** Enables or disables the element when the control status changes */\r\n setDisabledState(isDisabled: boolean): void {\r\n this.renderer.setProperty(\r\n this.elementRef.nativeElement,\r\n \"disabled\",\r\n isDisabled\r\n );\r\n }\r\n}\r\n","import {Directive, ElementRef, Input, OnInit, Renderer2, ViewContainerRef} from '@angular/core';\r\nimport {getGuiEventObj} from '@magic-xpa/engine';\r\nimport {TaskBaseMagicComponent} from '../task-base.magic.component';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {Subscription} from 'rxjs';\r\n\r\n/**\r\n * Responsible for connecting HTML elements to the Magic WebClient engine showing it is not Magic Control but a Dummy control which is used to notify only receeive focus event for now\r\n */\r\n@Directive({\r\n selector: '[NonMagicControl]'\r\n})\r\n\r\nexport class NonMagicControlDirective implements OnInit {\r\n @Input('NonMagicControl')\r\n set magic(val) {\r\n this.id = val;\r\n this.selector = 'NonMagicControl';\r\n };\r\n\r\n /**\r\n * The HTML element connected to this directive\r\n */\r\n protected htmlElement: HTMLElement;\r\n /**\r\n * Magic's component handling this control\r\n */\r\n public component: TaskBaseMagicComponent;\r\n /**\r\n * Collection of event handlers for this element\r\n */\r\n private eventHandlers: { [key: string]: () => void; } = {};\r\n /**\r\n * Id of this element\r\n */\r\n public id: string;\r\n /**\r\n * @ignore\r\n */\r\n protected selector: string;\r\n /**\r\n * @ignore\r\n */\r\n subscribeRefreshDom: Subscription;\r\n\r\n\r\n public eventsOnlyVal = false;\r\n\r\n\r\n /**\r\n *\r\n * @param _task The task service\r\n * @param element The element for which the directive is applied\r\n * @param renderer Renderer for the element\r\n * @param vcRef\r\n */\r\n constructor(protected _task: TaskMagicService,\r\n protected element: ElementRef,\r\n protected renderer: Renderer2,\r\n protected vcRef: ViewContainerRef) {\r\n\r\n this.htmlElement = this.element.nativeElement;\r\n }\r\n\r\n /**\r\n * Get the task service\r\n * @returns\r\n */\r\n get task(): TaskMagicService {\r\n return this._task;\r\n }\r\n\r\n /**\r\n * Register to the events this element may need to handle\r\n */\r\n protected regEvents() {\r\n\r\n // Handle events for which event handler may be removed and restored\r\n this.eventHandlers['focusin'] = this.OnFocus.bind(this);\r\n Object.keys(this.eventHandlers).forEach((key) => {\r\n this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Handle focus event\r\n */\r\n private OnFocus() {\r\n this.task.insertEvent(getGuiEventObj('focusOnNonMagicControl', '', -1));\r\n event.cancelBubble = true;\r\n }\r\n\r\n /**\r\n * Initialize this object\r\n */\r\n ngOnInit(): void {\r\n this.regEvents();\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport {TaskMagicService} from \"../../services/task.magics.service\";\r\n\r\n@Pipe({\r\n name: 'magicTime24'\r\n})\r\nexport class Time24MagicPipe implements PipeTransform {\r\n\r\n constructor(protected _task: TaskMagicService) {\r\n\r\n }\r\n\r\n transform(value: any, controlId: string): any {\r\n let mask: string = this._task.GetControlPictureMask (controlId).getMask();\r\n\r\n if (typeof value !== \"undefined\" && value !== null && mask !== null) {\r\n\r\n const date = new Date(value);\r\n const hours = date.getHours().toString().padStart(2, '0');\r\n const minutes = date.getMinutes().toString().padStart(2, '0');\r\n const seconds = date.getSeconds().toString().padStart(2, '0');\r\n\r\n if(mask.length == 5){\r\n return `${hours}:${minutes}`;\r\n }else if(mask.length > 5){\r\n return `${hours}:${minutes}:${seconds}`;\r\n }\r\n }\r\n return value;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DynamicModule } from 'ng-dynamic-component';\r\nimport { NoControlMagicDirective } from './ui/directives/magic/nocontrol.magic.directive';\r\nimport { MagicOverlayContainer } from './ui/magic-modal/magic-overlay-container';\r\nimport { RouterContainerMagicComponent } from './ui/router-container.magic.component';\r\nimport { MgformatMagicDirective } from './ui/directives/mgformat.magic.directive';\r\nimport { DateMagicPipe } from './ui/pipes/date.magic.pipe';\r\nimport { TimeMagicPipe } from './ui/pipes/time.magic.pipe';\r\nimport { RangeValidatorMagicDirective } from './ui/directives/range-validator.magic.directive';\r\nimport { SubformMagicComponent } from './ui/subform.magic.component';\r\nimport { ErrorMagicComponent } from './ui/mgerror.magic.component';\r\nimport { CheckboxMagicDirective } from './ui/directives/magic/checkbox.magic.directive';\r\nimport { ComboboxMagicDirective } from './ui/directives/magic/combobox.magic.directive';\r\nimport { MagicShellComponent } from './ui/magic-root.component';\r\nimport { MagicCheckboxControlValueAccessor } from './ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive';\r\nimport { MagicDefaultValueAccessor } from './ui/directives/magic/form-controls/control-value-accessors/default.cva.directive';\r\nimport { MagicDirective } from './ui/directives/magic.directive';\r\nimport { TaskBaseMagicComponent } from './ui/task-base.magic.component';\r\nimport { RowMagicDirective } from './ui/directives/magic/row.magic.directive';\r\nimport { CheckboxNoFormControlMagicDirective } from './ui/directives/magic/checkbox-noformcontrol.magic.directive';\r\nimport { InputNoFormControlMagicDirective } from './ui/directives/magic/input.noformcontrol.magic.directive';\r\nimport { DateValueAccessor } from './ui/directives/magic/form-controls/control-value-accessors/date.cva.directive';\r\nimport { OverlayContainerMagicProvider } from './services/overlay.conainer.magic.provider';\r\nimport { MagicOverlayContainerWrapper } from './ui/magic-modal/magic-overlay-container-wrapper';\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { NonMagicControlDirective } from './ui/directives/NonMagicControlDirective';\r\nimport { MagicAlertComponent } from './ui/components/magic-alert.component';\r\nimport { ConfirmationComponentsMagicProvider } from './services/confirmation.components.magic.provider';\r\nimport { MagicConfirmationBoxComponent } from './ui/components/magic-confirmation-box.component';\r\nimport { MagicFocusDirective } from './ui/directives/magic-focus.directive';\r\nimport { BaseMagicAlertComponent } from './ui/components/base-magic-alert.component';\r\nimport { BaseMagicConfirmComponent } from './ui/components/base-magic-confirm.component';\r\nimport { MagicViewContainerRef } from './ui/directives/magicViewContainerRef.directive';\r\nimport { MaskitoModule } from \"@maskito/angular\";\r\nimport { Time24MagicPipe } from \"./ui/pipes/time24.magic.pipe\";\r\n/**\r\n * @ignore\r\n */\r\nconst decs = [\r\n MagicDirective,\r\n CheckboxMagicDirective,\r\n CheckboxNoFormControlMagicDirective,\r\n InputNoFormControlMagicDirective,\r\n ComboboxMagicDirective,\r\n RowMagicDirective,\r\n\r\n MagicCheckboxControlValueAccessor,\r\n MagicDefaultValueAccessor,\r\n DateValueAccessor,\r\n TaskBaseMagicComponent,\r\n MagicOverlayContainer,\r\n MagicAlertComponent,\r\n MagicConfirmationBoxComponent,\r\n BaseMagicAlertComponent,\r\n BaseMagicConfirmComponent,\r\n MagicOverlayContainerWrapper,\r\n RouterContainerMagicComponent,\r\n MagicShellComponent,\r\n SubformMagicComponent,\r\n ErrorMagicComponent,\r\n NoControlMagicDirective,\r\n\r\n MgformatMagicDirective,\r\n DateMagicPipe,\r\n TimeMagicPipe,\r\n RangeValidatorMagicDirective,\r\n NonMagicControlDirective,\r\n MagicFocusDirective,\r\n MagicViewContainerRef,\r\n Time24MagicPipe\r\n\r\n\r\n];\r\n\r\n/**\r\n * @ignore\r\n */\r\n@NgModule({\r\n declarations: [...decs],\r\n exports : [...decs,MaskitoModule],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n DynamicModule,\r\n HttpClientModule\r\n ],\r\n //Customizable providers\r\n providers:[ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider]\r\n})\r\nexport class MagicModule {\r\n\r\n}\r\n","import {MAT_DATE_LOCALE, NativeDateAdapter} from '@angular/material/core';\r\nimport { formatDate } from '@angular/common';\r\nimport {TaskMagicService} from \"./task.magics.service\";\r\nimport {Inject, Injectable} from \"@angular/core\";\r\n\r\nexport const MG_FORMATS = {\r\n parse: {dateInput: {month: 'short', year: 'numeric', day: 'numeric'}},\r\n display: {\r\n dateInput: 'input',\r\n monthYearLabel: {year: 'numeric', month: 'short'},\r\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\r\n monthYearA11yLabel: {year: 'numeric', month: 'long'}\r\n }\r\n};\r\n\r\n\r\n@Injectable()\r\nexport class MgDateAdapter extends NativeDateAdapter {\r\n public mgdtfmt: string = null;\r\n constructor(\r\n protected task: TaskMagicService,\r\n @Inject(MAT_DATE_LOCALE) public localeId: string\r\n ) {\r\n\r\n super(localeId);\r\n this.setLocale(localeId);\r\n }\r\n\r\n parse (value: any) : Date | null\r\n {\r\n let valueStr: string = value;\r\n let date = 0, month = 0, year = 0;\r\n let mgDateMask: string = this.mgdtfmt;\r\n let sep = valueStr.indexOf('/') > 0 ? '/' : '-';\r\n\r\n if (value == null || value == \"\") return null;\r\n if (this.mgdtfmt == null && this.task.mgInputDateFormat != null)\r\n this.mgdtfmt = this.task.mgInputDateFormat;\r\n if ((this.mgdtfmt.indexOf('MMM') > 0) || (this.mgdtfmt.indexOf('MMMM') > 0))\r\n return new Date(value);\r\n if (mgDateMask !== null) {\r\n for (let i=0; i < mgDateMask.length;) {\r\n switch (mgDateMask[i]) {\r\n case 'd': {\r\n let tmpStr: string;\r\n let len = valueStr.indexOf(sep, 0);\r\n tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);\r\n if (len > -1)\r\n valueStr = valueStr.substr(len+1);\r\n for (;mgDateMask[i] == 'd'; i++);\r\n date = (Number)(tmpStr);\r\n }\r\n break;\r\n case 'M': {\r\n let tmpStr: string;\r\n let len = valueStr.indexOf(sep, 0);\r\n tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);\r\n\r\n if (len > -1)\r\n valueStr = valueStr.substr(len+1);\r\n\r\n for (; mgDateMask[i] == 'M' ;i++);\r\n month = (Number)(tmpStr) > 0 ? (Number)(tmpStr)- 1 : 0;\r\n }\r\n break;\r\n case 'y': {\r\n let tmpStr;\r\n let len = valueStr.indexOf(sep, 0);\r\n tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);\r\n if (len > -1) {\r\n valueStr = valueStr.substr(len + 1);\r\n }\r\n for (; mgDateMask[i] == 'y' ;i++);\r\n year = (Number)(tmpStr);\r\n }\r\n break;\r\n default:\r\n i++;\r\n break;\r\n }\r\n }\r\n\r\n if (month == 0 && year == 0 && date == 0)\r\n return null;\r\n return new Date(year, month, date);\r\n }\r\n\r\n}\r\n\r\nformat(date: Date, displayFormat: Object): string {\r\n if (this.mgdtfmt == null && this.task.mgInputDateFormat != null)\r\n this.mgdtfmt = this.task.mgInputDateFormat;\r\n if (displayFormat === 'input') {\r\n if (this.mgdtfmt == null)\r\n this.mgdtfmt = 'M/d/yyyy'; //default format\r\n return formatDate(date,this.mgdtfmt,this.locale);\r\n } else {\r\n return date.toDateString();\r\n }\r\n }\r\n}\r\n\r\n","import { MagicServices } from \"./magic.services\";\r\nimport { TaskMagicService } from \"./task.magics.service\";\r\nimport { SubformMagicService } from \"./subform.magic.service\";\r\nimport { TableMagicService } from \"./table.magic.service\";\r\nimport { TitleMagicService } from \"./title.magic.service\";\r\nimport { AccessorMagicService } from \"./accessor.magic.service\";\r\nimport {MgDateAdapter, MG_FORMATS} from \"./mg-date-adapter\";\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\n\r\nexport const matDateProviders = [\r\n {provide: DateAdapter, useClass: MgDateAdapter},\r\n {provide: MAT_DATE_FORMATS, useValue: MG_FORMATS}\r\n];\r\n\r\n\r\n/**\r\n * Magic service providers\r\n */\r\nexport const basicMagicProviders = [\r\n MagicServices,\r\n TaskMagicService,\r\n SubformMagicService,\r\n TitleMagicService,\r\n AccessorMagicService,\r\n matDateProviders,\r\n];\r\n\r\n\r\n\r\n export const magicProviders = [\r\n ...basicMagicProviders,\r\n TableMagicService\r\n];\r\n","/**\r\n * @ignore\r\n */\r\n///////////////////////////////////////////////////////////\r\n// class to hold gui-related helper methods\r\n///////////////////////////////////////////////////////////\r\nexport class utils {\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Calculate the distance between the control and the supplied x,y coordinates\r\n ///////////////////////////////////////////////////////////\r\n static getDistance(control: Element, x: number, y: number): number {\r\n\r\n let left = control.clientLeft, top = control.clientTop;\r\n\r\n let dx, dy: number;\r\n const right = left + control.clientWidth;\r\n const bottom = top + control.clientHeight;\r\n\r\n if (x < left) {\r\n dx = left - x;\r\n } else if (x > right) {\r\n dx = x - right;\r\n } else {\r\n dx = 0;\r\n }\r\n\r\n if (y < top) {\r\n dy = top - y;\r\n } else if (y > bottom) {\r\n dy = y - bottom;\r\n } else {\r\n dy = 0;\r\n }\r\n const ret = (dx * dx + dy * dy)\r\n return ret;\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n //\r\n ///////////////////////////////////////////////////////////\r\n static getDimentions(el) {\r\n let xPos = 0;\r\n let yPos = 0;\r\n let width = el.width;\r\n let height = el.height;\r\n\r\n while (el) {\r\n if (el.tagName == \"BODY\") {\r\n // deal with browser quirks with body/window/document and page scroll\r\n let xScroll = el.scrollLeft || document.documentElement.scrollLeft;\r\n let yScroll = el.scrollTop || document.documentElement.scrollTop;\r\n\r\n xPos += (el.offsetLeft - xScroll + el.clientLeft);\r\n yPos += (el.offsetTop - yScroll + el.clientTop);\r\n } else {\r\n // for all other non-BODY elements\r\n xPos += (el.offsetLeft - el.scrollLeft + el.clientLeft);\r\n yPos += (el.offsetTop - el.scrollTop + el.clientTop);\r\n }\r\n\r\n el = el.offsetParent;\r\n\r\n }\r\n return {\r\n x: xPos,\r\n y: yPos,\r\n width: width,\r\n height: height\r\n };\r\n }\r\n\r\n}\r\n","/**\r\n * @ignore\r\n */\r\nexport class ModalFormDefinition {\r\n taskId: string = \"\";\r\n comp: any = null;\r\n parameters: any = {};\r\n}\r\n"],"names":["i1.EngineMagicService","i1.TaskMagicService","i3.ComponentListMagicService","i4.CommandsCollectorMagicService","i5.RouterCommandsMagicService","i6.MagicLazyLoaderService","i1","i2.EngineMagicService","i3.TaskMagicService","i4.ComponentListMagicService","i5.CommandsCollectorMagicService","i6.RouterCommandsMagicService","i1.ComponentListMagicService","i2.MagicLazyLoaderService","i3.MagicLazyLoaderService","i4.OverlayContainerMagicProvider","i5.ConfirmationComponentsMagicProvider","i2.OverlayWindowService","i2.TaskMagicService","i2.MagicColorService","i2.SubformMagicService","i3.TableMagicService","i4.TitleMagicService","i5.AccessorMagicService","i1.MagicServices","i2","i3.RowMagicDirective","i1.MagicDirective","i1.SubformMagicService","i2.AccessorMagicService","i2.ComponentListMagicService","i3","i4.OverlayWindowService","i5","i6.CommandsCollectorMagicService","i7","i8.ExitMagicService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAOa,eAAe,CAAA;AAC1B,IAAA,WAAW,CAAS;AACpB,IAAA,QAAQ,CAAmB;AAC3B,IAAA,UAAU,GAA6B,IAAI,GAAG,EAAE,CAAC;AACjD,IAAA,UAAU,GAA0B,IAAI,GAAG,EAAE,CAAC;AAC9C,IAAA,SAAS,GAA0B,IAAI,GAAG,EAAE,CAAC;AAC7C,IAAA,YAAY,CAAS;AACrB,IAAA,OAAO,CAAW;AAClB,IAAA,cAAc,CAAU;AAGxB,IAAA,cAAc,GAAqB,IAAI,GAAG,EAAE,CAAC;AAE7C,IAAA,gBAAgB,GAAiC,IAAI,GAAG,EAAE,CAAC;IAE3D,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAA;QAEjB,IAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAC3B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC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U,GAAG,EAAE,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AACxD,gBAAA,IAAI,KAAK,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AACtD,aAAA;AAED,YAAA,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC;AAEtB,SAAA;QACD,OAAO;AACL,YAAA,CAAC,EAAE,IAAI;AACP,YAAA,CAAC,EAAE,IAAI;AACP,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,MAAM,EAAE,MAAM;SACf,CAAC;KACH;AAEF;;MCrEY,mBAAmB,CAAA;IAC9B,MAAM,GAAW,EAAE,CAAC;IACpB,IAAI,GAAQ,IAAI,CAAC;IACjB,UAAU,GAAQ,EAAE,CAAC;AACtB;;;;"}
|
1
|
+
{"version":3,"file":"magic-xpa-angular.mjs","sources":["../../../../projects/angular/src/controls.metadata.model.ts","../../../../projects/angular/src/services/StylesMapManager.ts","../../../../projects/angular/src/services/engine.magic.service.ts","../../../../projects/angular/src/services/component-list.magic.service.ts","../../../../projects/angular/src/services/commands-collector.magic.service.ts","../../../../projects/angular/src/services/router-commands.magic.service.ts","../../../../projects/angular/src/services/magic.lazy.loader.service.ts","../../../../projects/angular/src/services/subform.magic.service.ts","../../../../projects/angular/src/ui/router-container.magic.component.ts","../../../../projects/angular/src/ui/GuiInteractiveExecutor.ts","../../../../projects/angular/src/ui/magic-modal/base-magic-overlay-container.ts","../../../../projects/angular/src/ui/directives/magicViewContainerRef.directive.ts","../../../../projects/angular/src/ui/magic-modal/magic-overlay-container.ts","../../../../projects/angular/src/services/overlay.conainer.magic.provider.ts","../../../../projects/angular/src/ui/components/base-magic-confirm.component.ts","../../../../projects/angular/src/ui/components/base-magic-alert.component.ts","../../../../projects/angular/src/ui/directives/magic-focus.directive.ts","../../../../projects/angular/src/ui/magic-modal/magic-overlay-container-wrapper.ts","../../../../projects/angular/src/ui/components/magic-alert.component.ts","../../../../projects/angular/src/ui/components/magic-confirmation-box.component.ts","../../../../projects/angular/src/services/confirmation.components.magic.provider.ts","../../../../projects/angular/src/ui/magic-confirmationBox.ts","../../../../projects/angular/src/services/OverlayWindowService.ts","../../../../projects/angular/src/services/task.magics.service.ts","../../../../projects/angular/src/services/table.magic.service.ts","../../../../projects/angular/src/services/title.magic.service.ts","../../../../projects/angular/src/services/magic-color.service.ts","../../../../projects/angular/src/services/accessor.magic.service.ts","../../../../projects/angular/src/services/magic.services.ts","../../../../projects/angular/src/ui/task-base.magic.component.ts","../../../../projects/angular/src/ui/directives/magic/row.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/nocontrol.magic.directive.ts","../../../../projects/angular/src/ui/pipes/date.magic.pipe.ts","../../../../projects/angular/src/ui/directives/mgformat.magic.directive.ts","../../../../projects/angular/src/ui/pipes/time.magic.pipe.ts","../../../../projects/angular/src/ui/directives/range-validator.magic.directive.ts","../../../../projects/angular/src/ui/subform.magic.component.ts","../../../../projects/angular/src/ui/mgerror.magic.component.ts","../../../../projects/angular/src/ui/directives/magic/checkbox.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/combobox.magic.directive.ts","../../../../projects/angular/src/services/exit.magic.service.ts","../../../../projects/angular/src/ui/magic-root.component.ts","../../../../projects/angular/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.ts","../../../../projects/angular/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.ts","../../../../projects/angular/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/input.noformcontrol.magic.directive.ts","../../../../projects/angular/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.ts","../../../../projects/angular/src/ui/directives/NonMagicControlDirective.ts","../../../../projects/angular/src/ui/pipes/time24.magic.pipe.ts","../../../../projects/angular/src/magic.core.module.ts","../../../../projects/angular/src/services/mg-date-adapter.ts","../../../../projects/angular/src/services/magic.providers.ts","../../../../projects/angular/src/ui/utils.ts","../../../../projects/angular/src/ui/magic-modal/magic-modal-form.ts"],"sourcesContent":["import {StorageAttribute} from \"@magic-xpa/utils\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\nimport {HtmlProperties, CustomValidator} from \"@magic-xpa/gui\";\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class ControlMetadata {\r\n controlType: string;\r\n dataType: StorageAttribute;\r\n properties: Map<HtmlProperties, any> = new Map();\r\n classesMap: Map<HtmlClasses, any> = new Map();\r\n stylesMap: Map<HtmlClasses, any> = new Map();\r\n removedClass: string;\r\n classes: string ;\r\n rangeValidator: boolean;\r\n\r\n // user properties\r\n userProperties: Map<string, any> = new Map();\r\n\r\n customValidators: Map<string, CustomValidator> = new Map();\r\n\r\n setClass(key, value) {\r\n // for no-control - hold the name of the class to be removed later\r\n if(this.classesMap.has(key)) {\r\n this.removedClass = this.classesMap.get(key);\r\n }\r\n\r\n this.classesMap.set(key, value);\r\n let result = '';\r\n\r\n for (let value of this.classesMap) {\r\n result += value + ' ';\r\n }\r\n this.classes = result;\r\n\r\n }\r\n\r\n setStyle(key, value) {\r\n this.stylesMap.set(key, value);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class ControlsMetadata {\r\n\r\n //values of control\r\n values: Map<string, string> = new Map();\r\n // dictionary of controls with there properties\r\n ControlsProperties: Map<string, ControlMetadata> = new Map();\r\n\r\n rowId: string;\r\n isCreated = false;\r\n isEditing = false;\r\n\r\n get Values(){\r\n return this.values;\r\n }\r\n\r\n getControlMetadata(controlId: string) {\r\n if (!this.ControlsProperties.has(controlId))\r\n this.ControlsProperties.set(controlId, new ControlMetadata());\r\n return this.ControlsProperties.get(controlId);\r\n }\r\n\r\n\r\n\r\n update(obj:any) {\r\n //should we keep the values here ?\r\n //this.values = obj.ControlsValues;\r\n let props: { [id: string]: { [id: string]: string; } } = obj.ControlsMetaData;\r\n for (let controlName in props) {\r\n if (!this.ControlsProperties.has(controlName))\r\n this.ControlsProperties.set(controlName, new ControlMetadata());\r\n let controlMetaData: ControlMetadata = this.ControlsProperties.get(controlName);\r\n for (let property in obj.ControlsMetaData[controlName].Properties)\r\n controlMetaData[property] = obj.ControlsMetaData[controlName].Properties[property];\r\n controlMetaData.controlType = obj.ControlsMetaData[controlName].Type;\r\n }\r\n for (let controlName in obj.ControlsValues) {\r\n this.setValue(controlName, obj.ControlsValues[controlName]);\r\n }\r\n }\r\n\r\n setValue(controlName: string, value: any): void {\r\n this.values.set(controlName, value);\r\n }\r\n\r\n getProperty(controlId: string, prop: HtmlProperties) {\r\n if (this.ControlsProperties.has(controlId)) {\r\n if (this.ControlsProperties.get(controlId).properties.has(prop)) {\r\n return this.ControlsProperties.get(controlId).properties.get(prop);\r\n }\r\n }\r\n return \"\";\r\n }\r\n\r\n\r\n getValue(controlName: string){\r\n return this.values.get(controlName);\r\n }\r\n\r\n\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class Records {\r\n data: Map<number, ControlsMetadata> = new Map();\r\n list: ControlsMetadata[] = []; //used for sequential access in table\r\n includesFirst: boolean;\r\n includesLast: boolean;\r\n guiTopIndex: number;\r\n recordsBeforeCurrentView: number = 0;\r\n isEmptyDataView: boolean = false;\r\n sizeUpdated: boolean = false; //used for evaluating the RecordsSizeChange.\r\n\r\n getRow(dvRowId: number): ControlsMetadata {\r\n return this.list[dvRowId + this.recordsBeforeCurrentView];\r\n }\r\n\r\n markRowAsCreated(guiRowId: number): void {\r\n if (guiRowId < this.list.length) {\r\n this.addRow(guiRowId);\r\n this.data.get(guiRowId).isCreated = true;\r\n }\r\n }\r\n\r\n markRowAsNotCreated(guiRowId: number): void {\r\n if (guiRowId < this.list.length)\r\n this.data.get(guiRowId).isCreated = false;\r\n }\r\n\r\n\r\n isRowCreated(guiRowId: number): boolean {\r\n if (guiRowId < this.list.length) {\r\n if (!this.data.has(guiRowId) || isNullOrUndefined(this.data.get(guiRowId)))\r\n return false;\r\n else\r\n return this.data.get(guiRowId).isCreated;\r\n }\r\n return false;\r\n }\r\n\r\n /*\r\n * for row editing\r\n * */\r\n startRowEditing(guiRowId: number): void {\r\n if (guiRowId < this.list.length && this.data.has(guiRowId))\r\n this.data.get(guiRowId).isEditing = true;\r\n }\r\n\r\n /*\r\n * stop row editing on row Id\r\n * */\r\n stopRowEditing(guiRowId: number): void {\r\n if (guiRowId < this.list.length && this.data.has(guiRowId))\r\n this.data.get(guiRowId).isEditing = false;\r\n }\r\n\r\n /*\r\n * return if row is in editing\r\n * Called by the HTML code, so parameter is a string, not a numebr\r\n * */\r\n isRowInRowEditing(guiRowId: string): boolean {\r\n if (+guiRowId < this.list.length) {\r\n if (!this.data.has(+guiRowId) || isNullOrUndefined(this.data.get(+guiRowId)))\r\n return false;\r\n else\r\n return this.data.get(+guiRowId).isEditing;\r\n }\r\n return false;\r\n }\r\n\r\n update(obj) {\r\n\r\n if (obj.fullRefresh && obj.rows.length != this.list.length) {\r\n this.data = new Map();\r\n this.list = new Array<ControlsMetadata>();\r\n }\r\n for (let rowId in obj.rows) {\r\n if (!this.data.has(+rowId) || this.data.get(+rowId) === null)\r\n this.data.set(+rowId, new ControlsMetadata());\r\n let controlsData: ControlsMetadata = this.data.get(+rowId);\r\n controlsData.update(obj.rows[rowId]);\r\n controlsData.rowId = rowId;\r\n }\r\n for (var [key, value] of this.data) {\r\n this.list[key] = value;\r\n }\r\n\r\n }\r\n\r\n updateSize(len: number) {\r\n if (this.list.length != len) {\r\n if (len < this.list.length) {\r\n //remove rows\r\n for (let i = len; i < this.list.length; i++) {\r\n this.data.delete(i);\r\n }\r\n\r\n }\r\n this.list.length = len;\r\n this.sizeUpdated = true;\r\n\r\n }\r\n }\r\n\r\n\r\n /**\r\n * crears data for the first record\r\n * @param template\r\n */\r\n clearFirstTableRecord(template: { [id: string]: string; }) {\r\n if (this.list.length >= 1) {\r\n for (const key in template) {\r\n if (template[key] == '1' && this.list[0].ControlsProperties.has(key)) {\r\n this.list[0].ControlsProperties.get(key).properties = new Map() ;\r\n }\r\n }\r\n }\r\n }\r\n\r\n addRow(guiRowId: number) {\r\n if (guiRowId !== 0 || !this.data.has(guiRowId) || isNullOrUndefined(this.data.get(guiRowId))) {\r\n this.data.set(guiRowId, new ControlsMetadata());\r\n this.data.get(guiRowId).rowId = \"\"+guiRowId;\r\n this.list[guiRowId] = this.data.get(guiRowId);\r\n }\r\n }\r\n\r\n createFirst() {\r\n this.addRow(0);\r\n }\r\n\r\n fromJson(data: string) {\r\n var obj = JSON.parse(data);\r\n this.update(obj);\r\n }\r\n\r\n setGuiTopIndex(topIndex: number) {\r\n this.guiTopIndex = topIndex;\r\n }\r\n\r\n getGuiTopIndex(): number {\r\n return this.guiTopIndex;\r\n }\r\n\r\n}\r\n\r\n /**\r\n * @ignore\r\n */\r\nexport enum HtmlClasses {\r\n Color = \"color\",\r\n font = \"font\",\r\n FocusColor=\"focuscolor\",\r\n HintColor=\"hintcolor\",\r\n}\r\n","import {MagicProperties} from \"@magic-xpa/utils\"\r\nimport {NString, isNullOrUndefined} from \"@magic-xpa/mscorelib\"\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class StylesMapManager {\r\n static StylesMap: Map<string, any> = new Map<string, any>(\r\n [\r\n [MagicProperties.LineDivider, new Map<any, any>([[true, \"solid\"], [false, \"hidden\"]])],\r\n [MagicProperties.ImageFile, \"url('\\{0}\\')\"],\r\n [MagicProperties.Wallpaper, \"url('\\{0}\\')\"]\r\n ]\r\n );\r\n\r\n static MagicPropertyToHtmlAttributeMap: Map<string, string> = new Map<string, string>(\r\n [\r\n [MagicProperties.LineDivider, \"border-bottom-style\"],\r\n [MagicProperties.ImageFile, \"background-image\"],\r\n [MagicProperties.Wallpaper, \"background-image\"]\r\n ]\r\n );\r\n\r\n static magicValueGetStyle(styleName: string, magicValue: any): string {\r\n let style: string = \"\";\r\n\r\n if (!isNullOrUndefined(magicValue)) {\r\n let value = StylesMapManager.StylesMap.get(styleName);\r\n if (value.constructor === Map) {\r\n style = value.get(magicValue);\r\n }\r\n else if (value.constructor === String) {\r\n style = NString.Format(value.toString(), magicValue);\r\n }\r\n }\r\n\r\n return style;\r\n }\r\n}\r\n","import {Injectable} from \"@angular/core\";\r\nimport {Subject} from \"rxjs\";\r\n\r\nimport {IGuiEvent, MagicBridge} from \"@magic-xpa/engine\";\r\nimport {GuiCommand, GuiInteractive} from \"@magic-xpa/gui\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EngineMagicService {\r\n magicBridge = MagicBridge;\r\n isStub = false;\r\n // true when user is logged in magic\r\n isLoggedIn = false;\r\n //TODO - unregister\r\n refreshDom: Subject<GuiCommand> = new Subject();\r\n interactiveCommands: Subject<GuiInteractive> = new Subject();\r\n\r\n startMagicEngine(httpClient: HttpClient, args: Map<string, string>) {\r\n this.magicBridge.registerExecuteCommandsCallback(data => {\r\n if (!this.isStub) {\r\n try {\r\n const list = data as GuiCommand[];\r\n for (let c of list) {\r\n this.refreshDom.next(c);\r\n }\r\n }\r\n catch (e) {\r\n console.dir(e);\r\n console.log('magic engine not found');\r\n console.log('moving to stub mode');\r\n this.isStub = true;\r\n }\r\n }\r\n });\r\n\r\n this.magicBridge.registerInteractiveCallback(data => {\r\n if (!this.isStub) {\r\n this.interactiveCommands.next(data);\r\n }\r\n });\r\n\r\n this.magicBridge.Initialize(httpClient, args);\r\n }\r\n\r\n async terminateMagic(): Promise<void> {\r\n await this.magicBridge.TerminateMagic();\r\n }\r\n\r\n insertEvent(guiEvent: IGuiEvent): void {\r\n if (!this.isStub)\r\n this.magicBridge.insertEvent(guiEvent);\r\n }\r\n\r\n GetRangedValue(taskId: string, controlName: string, value: string): string {\r\n return this.magicBridge.GetRangedValue(taskId, controlName, value);\r\n }\r\n\r\n GetControlPictureMask(taskId: string, controlName: string): any {\r\n return this.magicBridge.GetControlPictureMask(taskId, controlName);\r\n }\r\n\r\n GetFormattedValue(taskId: string, controlName: string, value: any, rowId?: string): any {\r\n return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);\r\n }\r\n\r\n ValidateControlValue(taskId: string, controlName: string, value: any): string {\r\n return this.magicBridge.ValidateControlValue(taskId, controlName, value);\r\n }\r\n\r\n GetFldRanges(taskId: string, controlName: string): string {\r\n return this.magicBridge.GetFldRanges(taskId, controlName);\r\n }\r\n\r\n saveData(data:string)\r\n {\r\n //this.magicBridge.saveData(data);\r\n }\r\n\r\n getIsLoggedIn():boolean{\r\n return this.isLoggedIn;\r\n }\r\n\r\n setIsLoggedIn(setIsLoggedIn: boolean){\r\n this.isLoggedIn = setIsLoggedIn;\r\n }\r\n\r\n TransCacheExists(): boolean {\r\n return this.magicBridge.TransCacheExists();\r\n }\r\n\r\n TerminateContextUsingFetchAPI(): void {\r\n this.magicBridge.TerminateContextUsingFetchAPI();\r\n }\r\n}\r\n","import { Injectable, NgModuleRef } from '@angular/core';\r\n\r\n\r\nexport interface ComponentData {\r\n component:any;\r\n moduleRef:NgModuleRef<any>;\r\n}\r\n\r\nexport interface ModuleData {\r\n moduleName: string;\r\n modulePath: string;\r\n}\r\n\r\n/**\r\n * Manages the list of components in a project, and the project title\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ComponentListMagicService{\r\n\r\n /**\r\n * Map of project components\r\n */\r\n components = new Map<string,ComponentData>();\r\n /**\r\n * Map of project dialogs\r\n */\r\n dialogs = new Map<string,any>();\r\n\r\n lazyLoadModulesMap = null;\r\n\r\n getData(name:string, mustHaveData: boolean){\r\n let data :ComponentData= null;\r\n\r\n let haveData: boolean =this.components.has(name);\r\n if (!haveData && mustHaveData) {\r\n console.log(\"Error: Component: \" + name + \" does not exist in components map\");\r\n }\r\n\r\n if (haveData)\r\n data = this.components.get(name)\r\n\r\n return data;\r\n }\r\n\r\n\r\n /**\r\n * Return a component according to name\r\n * @param name Name of requested component\r\n * @returns The requested component\r\n */\r\n getComponent(name:string, mustHaveData:boolean = true){\r\n let data: ComponentData = this.getData(name, mustHaveData)\r\n return data ? data.component : null;\r\n }\r\n\r\n addComponents(componentList:any , modulRef?:NgModuleRef<any>){\r\n for(let key in componentList){\r\n let data :ComponentData = {moduleRef:modulRef, component:componentList[key]};\r\n this.components.set(key,data);\r\n }\r\n }\r\n\r\n /**\r\n * Return a component according to name\r\n * @param name Name of requested component\r\n * @returns The requested component\r\n */\r\n getModuleRef (name:string){\r\n let data: ComponentData = this.getData(name, false)\r\n return data ? data.moduleRef : null;;\r\n }\r\n\r\n /**\r\n * Return the lazy load module details of the specified component\r\n * @param name: Name of requested component\r\n * @returns: lazy load module details\r\n */\r\n getLazyLoadModuleData (name:string): ModuleData {\r\n return (this.lazyLoadModulesMap != null && this.lazyLoadModulesMap.hasOwnProperty(name)) ? this.lazyLoadModulesMap[name] : null;\r\n }\r\n\r\n/**\r\n * Project title\r\n */\r\n title : string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { EngineMagicService } from './engine.magic.service';\r\nimport { GuiCommand } from '@magic-xpa/gui';\r\nimport { List } from '@magic-xpa/mscorelib';\r\nimport { Logger } from '@magic-xpa/utils';\r\nimport { Subscription } from 'rxjs';\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CommandsCollectorMagicService {\r\n private count: number = 0;\r\n private commands: List<GuiCommand> = new List<GuiCommand>();\r\n private subscription: Subscription = null;\r\n\r\n constructor(protected magic: EngineMagicService) {\r\n }\r\n\r\n startCollecting() {\r\n this.count++;\r\n Logger.Instance.WriteDevToLog(\"CommandsCollectorMagicService.startCollecting() --- \" + this.count);\r\n\r\n if (this.subscription === null) {\r\n this.subscription = this.magic.refreshDom\r\n .subscribe(command => {\r\n this.commands.push(command);\r\n });\r\n }\r\n }\r\n\r\n stopCollecting() {\r\n this.count--;\r\n Logger.Instance.WriteDevToLog(\"CommandsCollectorMagicService.stopCollecting() --- \" + this.count);\r\n\r\n if (this.count === 0) {\r\n this.subscription.unsubscribe();\r\n this.subscription = null;\r\n }\r\n }\r\n\r\n GetCommands(taskId: string): GuiCommand[] {\r\n const commands: GuiCommand[] = this.commands.filter( (command: GuiCommand) => command.TaskTag === taskId);\r\n commands.forEach(command => { this.commands.Remove(command); });\r\n\r\n return commands;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { List,isNullOrUndefined} from '@magic-xpa/mscorelib';\r\nimport { ISubformMagicService } from './ISubformMagicService';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class RouteCommand {\r\n callerMgSubformServiceRef: ISubformMagicService;\r\n routerOutletName: string;\r\n formName: string;\r\n parameters: any;\r\n routeParams: List<any>;\r\n}\r\n/**\r\n * @ignore\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RouterCommandsMagicService {\r\n private pendingRouteCommands: RouteCommand[] = [];\r\n\r\n AddRouteCommand (routeCommand: RouteCommand) {\r\n this.pendingRouteCommands.push(routeCommand);\r\n }\r\n\r\n ExecuteNextCommand() {\r\n let pendingRouteCommand: RouteCommand = this.pendingRouteCommands.shift();\r\n\r\n if (!isNullOrUndefined(pendingRouteCommand)) {\r\n pendingRouteCommand.callerMgSubformServiceRef.ExecuteRouteCommand(pendingRouteCommand);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn : 'root'\r\n})\r\nexport class MagicLazyLoaderService {\r\n Load(path: string): Promise<any> {\r\n return Promise.reject('error in loading module :' + path);\r\n }\r\n}\r\n","import { Compiler, Component, Injectable, Injector, NgModuleRef } from '@angular/core';\nimport { TaskMagicService } from './task.magics.service';\nimport { List, isNullOrUndefined } from '@magic-xpa/mscorelib';\nimport { GuiCommand } from '@magic-xpa/gui';\nimport {ComponentListMagicService, ModuleData} from './component-list.magic.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CommandsCollectorMagicService } from './commands-collector.magic.service';\nimport { RouteDefinition } from '../interfaces/sub-form-definition.iterface';\nimport { RouteCommand, RouterCommandsMagicService } from '../services/router-commands.magic.service';\nimport { ISubformMagicService } from './ISubformMagicService';\nimport { RouterContainerMagicComponent } from '../ui/router-container.magic.component';\nimport { MagicLazyLoaderService } from './magic.lazy.loader.service';\n\n\n/**\n * Service for managing subforms and routing\n */\n@Injectable()\nexport class SubformMagicService implements ISubformMagicService{\n\n subformsDict /*:{ [x: string]: SubformDefinition }*/ = {};\n routesDict: { [x: string]: string } = {}; // dictionary of router outlet to router path\n currentRouteDefinition: RouteDefinition = null;\n\n static currentCallerMgSubformServiceRef: any = null;\n\n static routerContainers: Array<RouterContainerMagicComponent> = new Array();\n\n constructor(private task: TaskMagicService,\n protected activatedRoute: ActivatedRoute,\n protected componentList: ComponentListMagicService,\n protected pendingCommandsCollector: CommandsCollectorMagicService,\n protected router: Router,\n protected routerCommandsMagicService: RouterCommandsMagicService,\n private componentListMagicService: ComponentListMagicService,\n private loader: MagicLazyLoaderService,\n private injector: Injector,\n private compiler: Compiler) {\n }\n\n /**\n * Finds and returns the component according to the subform name\n * @param subformName\n * @returns\n */\n mgGetComp(subformName: string): Component {\n if (subformName in this.subformsDict) {\n let formName: string = this.subformsDict[subformName].formName;\n if (formName)\n return this.componentList.getComponent(formName);\n }\n return null;\n }\n\n /**\n * Returns the parameters of the subform\n * @param subformName\n * @returns\n */\n mgGetParameters(subformName: string): any {\n if (subformName in this.subformsDict) {\n return this.subformsDict[subformName].parameters;\n }\n else\n return '';\n }\n\n /**\n * @ignore\n */\n deleteSubformComp (subformControlName: string, formName: string) {\n\n if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0)\n {\n if (this.subformsDict[subformControlName].formName === formName) {\n\n this.subformsDict[subformControlName] = {};\n this.task.refreshView();\n }\n }\n }\n\n /**\n * @ignore\n */\n addSubformComp (subformControlName: string, formName: string, taskId: string, taskDescription: any, routerPath: string, params: List<any>, inDefaultOutlet: boolean) {\n this.pendingCommandsCollector.startCollecting();\n\n let refreshNeeded = false;\n if (isNullOrUndefined(routerPath)) { // call in destination subform\n if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0)\n {\n if (this.subformsDict[subformControlName].formName === formName) {\n\n this.subformsDict[subformControlName] = {};\n this.task.refreshView();\n }\n }\n\n // Load the lazy load module, if needed\n let moduleRef: NgModuleRef<any> = this.componentListMagicService.getModuleRef(formName);\n\n if (moduleRef == null) {\n let lazyLoadModule: ModuleData = this.componentListMagicService.getLazyLoadModuleData(formName);\n\n if (lazyLoadModule != null) {\n const Magic: string = 'Magic';\n const Module: string = 'Module';\n\n // extract name of module(XX) from 'MagicXXModule'\n const moduleName = lazyLoadModule.moduleName.slice(Magic.length, -Module.length);\n this.loader.Load(moduleName).then( m => {\n const compiled = this.compiler.compileModuleAndAllComponentsSync(<any>m[lazyLoadModule.moduleName]);\n moduleRef = compiled.ngModuleFactory.create(this.injector);\n this.subformsDict[subformControlName] = {\n formName,\n parameters: {taskIdParam: taskId, taskDescription: taskDescription}\n };\n this.task.refreshView();\n });\n }\n }\n else {\n this.subformsDict[subformControlName] = {\n formName,\n parameters: {taskIdParam: taskId, taskDescription: taskDescription}\n };\n //this.ref.detectChanges();\n refreshNeeded = true;\n }\n }\n else { // call route\n if (inDefaultOutlet)\n subformControlName = 'primary';\n\n let routeParams: List<any> = new List();\n routeParams.push(routerPath);\n if (params !== null) {\n routeParams = <List<any>>routeParams.concat(params);\n }\n\n let routeCommand: RouteCommand = {\n callerMgSubformServiceRef: this,\n routerOutletName: subformControlName,\n formName: formName,\n parameters: {taskIdParam: taskId, taskDescription: taskDescription},\n routeParams: routeParams\n };\n\n // If SubformMagicService.currentCallerMgSubformServiceRef !== null means that router.navigate() is already\n // called once, but angular has not yet executed it (ngOnInit of the new component is not called).\n // In such a case, do not executed router.navigate() again. Because, angular ignores the previous one.\n // So, put a command in the queue which will be executed after the first one is executed.\n if (SubformMagicService.currentCallerMgSubformServiceRef === null)\n this.ExecuteRouteCommand(routeCommand);\n else\n this.routerCommandsMagicService.AddRouteCommand(routeCommand);\n }\n if ( refreshNeeded)\n this.task.refreshView();\n }\n\n /**\n * Open the subform using a route command\n */\n ExecuteRouteCommand(routeCommand: RouteCommand)\n {\n let currentSubformMagicService: SubformMagicService = <SubformMagicService>routeCommand.callerMgSubformServiceRef;\n let relativeRoute = SubformMagicService.getRelativeRoute(currentSubformMagicService.activatedRoute);\n\n if (currentSubformMagicService.routesDict[routeCommand.routerOutletName] === routeCommand.routeParams[0])\n {\n // If the specified router outlet already hosts the same router path, router.navigate() doesn't actually navigate.\n // So, first clear the outlet (passing null route params, clears the outlet) and then navigate again.\n currentSubformMagicService.router.navigate([{outlets: {[routeCommand.routerOutletName]: null}}], {relativeTo: relativeRoute})\n .then((result:boolean) => {\n SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;\n currentSubformMagicService.currentRouteDefinition = {\n formName: routeCommand.formName,\n parameters: routeCommand.parameters\n };\n\n currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);\n });\n }\n else {\n SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;\n currentSubformMagicService.currentRouteDefinition = {\n formName: routeCommand.formName,\n parameters: routeCommand.parameters\n };\n\n if (SubformMagicService.routerContainers.length > 0) {\n let routeContainer = SubformMagicService.routerContainers[0];\n SubformMagicService.routerContainers.shift();\n routeContainer.initializeComponent();\n }\n else {\n currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);\n }\n }\n }\n\n private PerformRouterNavigate(routerOutletName: string, routeParams: List<any>)\n {\n let relativeRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\n\n this.router.navigate([{ outlets: { [routerOutletName]: routeParams } }], { relativeTo: relativeRoute })\n .then((result:boolean)=> {\n if (result !== null && !result) {\n let subformMagicService: SubformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;\n subformMagicService.currentRouteDefinition = null;\n\n SubformMagicService.currentCallerMgSubformServiceRef = null;\n subformMagicService.pendingCommandsCollector.stopCollecting();\n subformMagicService.routerCommandsMagicService.ExecuteNextCommand();\n }\n }\n );\n }\n\n /**\n * @ignore\n */\n init()\n {\n // If commands were issued for this task before ngOnInit(), they were not executed because task had not registered for them.\n // So, execute them now.\n const pendingCommands: GuiCommand[] = this.pendingCommandsCollector.GetCommands(this.task.taskId);\n if (pendingCommands.length > 0) {\n pendingCommands.forEach(command => {this.task.executeCommand(command);});\n this.task.refreshView();\n }\n\n this.pendingCommandsCollector.stopCollecting();\n }\n\n /**\n * @ignore\n */\n refreshView() {\n this.task.refreshView();\n }\n\n ///\n // return the relative route\n //\n static getRelativeRoute(sendActivatedRoute: ActivatedRoute){\n let currentActiveRoute = sendActivatedRoute;\n if (currentActiveRoute.snapshot.routeConfig !== null && currentActiveRoute.snapshot.routeConfig.path === '') {\n currentActiveRoute = currentActiveRoute.parent;\n if (!currentActiveRoute.snapshot.routeConfig.loadChildren)\n console.log('getRelativeRoute(): both path and currentActiveRoute.snapshot.routeConfig.loadChildren are empty.');\n }\n return currentActiveRoute;\n }\n}\n","import { Component, OnInit, ViewContainerRef } from '@angular/core';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport { TaskBaseMagicComponent } from './task-base.magic.component';\r\nimport { EngineMagicService } from '../services/engine.magic.service';\r\nimport { getGuiEventObj, IGuiEvent } from '@magic-xpa/engine';\r\nimport { List } from '@magic-xpa/mscorelib';\r\nimport { StrUtil } from '@magic-xpa/utils';\r\nimport { ComponentListMagicService } from '../services/component-list.magic.service';\r\nimport { SubformMagicService } from '../services/subform.magic.service';\r\nimport { CommandsCollectorMagicService } from '../services/commands-collector.magic.service';\r\nimport { RouterCommandsMagicService } from '../services/router-commands.magic.service';\r\nimport { TaskMagicService } from '../services/task.magics.service';\r\n\r\n/**\r\n * Mock component, implements routing by connecting the requested URL with the appropriate Magic task\r\n */\r\n@Component({\r\n selector: 'magic-route-outlet',\r\n template: `\r\n `\r\n})\r\nexport class RouterContainerMagicComponent implements OnInit {\r\n private componentRef = null;\r\n private parentMgSubformService: SubformMagicService = null;\r\n private static lastRoute: string = \"/\";\r\n\r\n static get LastRoute(): string {\r\n return RouterContainerMagicComponent.lastRoute;\r\n }\r\n\r\n /**\r\n *\r\n * @param changeDetectorRef\r\n * @param activatedRoute\r\n * @param magic\r\n * @param componentFactoryResolver\r\n * @param viewContainerRef\r\n * @param componentList\r\n * @param pendingCommandsCollector\r\n */\r\n constructor(private activatedRoute: ActivatedRoute,\r\n protected router: Router,\r\n protected magic: EngineMagicService,\r\n private containerTaskService: TaskMagicService,\r\n private viewContainerRef: ViewContainerRef,\r\n private componentList: ComponentListMagicService,\r\n protected pendingCommandsCollector: CommandsCollectorMagicService,\r\n protected routerCommandsMagicService: RouterCommandsMagicService) {}\r\n\r\n /**\r\n * Initialization\r\n */\r\n ngOnInit() {\r\n let subformMagicService: SubformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;\r\n\r\n let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\r\n\r\n RouterContainerMagicComponent.lastRoute = this.router.url;\r\n\r\n if (subformMagicService == null || subformMagicService.currentRouteDefinition === null) {\r\n this.insertRouteEvent(currentActiveRoute);\r\n\r\n SubformMagicService.routerContainers.push(this);\r\n }\r\n else {\r\n this.initializeComponent();\r\n }\r\n }\r\n\r\n private insertRouteEvent(currentActiveRoute: ActivatedRoute) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('RouterNavigate', null, 0);\r\n guiEvent.RouterPath = currentActiveRoute.snapshot.routeConfig.path;\r\n\r\n if (currentActiveRoute.snapshot.outlet !== 'primary')\r\n guiEvent.RouterOutletName = currentActiveRoute.snapshot.outlet;\r\n\r\n\r\n // if this is LoadOnDemandModuleMagicComponent it's mean that this is load on demand module and we\r\n // need to take the path form routeConfig.path\r\n\r\n let calcRouterPath: string = currentActiveRoute.routeConfig.path;\r\n // add the RouterPath only if exist\r\n if (calcRouterPath.length > 0)\r\n {\r\n let routerPath: string = calcRouterPath;\r\n let tokens: string[] = StrUtil.tokenize(routerPath, \"/:\");\r\n guiEvent.RouterPath = tokens[0];\r\n\r\n guiEvent.RouterParams = new List();\r\n for (let i = 1; i < tokens.length; i++) {\r\n guiEvent.RouterParams.push(currentActiveRoute.snapshot.params[tokens[i]]);\r\n }\r\n }\r\n\r\n this.containerTaskService.insertEvent(guiEvent);\r\n }\r\n\r\n initializeComponent() {\r\n // re-init subformMagicService since it may change after executing \"RouterNavigate\" event.\r\n let subformMagicService: SubformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;\r\n if (subformMagicService.currentRouteDefinition !== null) {\r\n let comp = this.componentList.getComponent(subformMagicService.currentRouteDefinition.formName);\r\n this.componentRef = this.viewContainerRef.createComponent(comp);\r\n Object.assign(this.componentRef.instance, subformMagicService.currentRouteDefinition.parameters);\r\n\r\n\r\n let myActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\r\n\r\n let routeParams: string[] = StrUtil.tokenize(myActiveRoute.snapshot.routeConfig.path, \"/:\");\r\n subformMagicService.routesDict[myActiveRoute.snapshot.outlet] = routeParams[0];\r\n\r\n this.parentMgSubformService = subformMagicService;\r\n subformMagicService.currentRouteDefinition = null;\r\n SubformMagicService.currentCallerMgSubformServiceRef = null;\r\n\r\n //When the component is initialized, then also we get the notification for paramMap subscription.\r\n //But in this case, we do not have to raise the event, because magic engine itself has initiated the route with the same parameters.\r\n //So, control it via ignoreParamChange flag.\r\n let ignoreParamChange = true;\r\n myActiveRoute.paramMap.subscribe(params => {\r\n if (!ignoreParamChange)\r\n this.insertRouteEvent(myActiveRoute);\r\n ignoreParamChange = false;\r\n });\r\n\r\n this.parentMgSubformService.refreshView();\r\n\r\n this.routerCommandsMagicService.ExecuteNextCommand();\r\n }\r\n }\r\n\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy() {\r\n // TODO Routing: Call close() only if the task is not already closed.\r\n // Task can be closed when a router is overlayed by another task via call operation.\r\n if (this.componentRef != null)\r\n {\r\n (<TaskBaseMagicComponent>this.componentRef.instance).task.close();\r\n\r\n let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);\r\n this.parentMgSubformService.routesDict[currentActiveRoute.outlet] = \"\";\r\n\r\n RouterContainerMagicComponent.lastRoute = this.router.url;\r\n }\r\n }\r\n\r\n}\r\n","import {GuiInteractive, HtmlProperties, InteractiveCommandType} from '@magic-xpa/gui';\r\nimport {TaskBaseMagicComponent} from './task-base.magic.component';\r\nimport {isNullOrUndefined} from '@magic-xpa/mscorelib';\r\nimport {TaskMagicService} from '../services/task.magics.service';\r\nimport {OverlayWindowService} from '../services/OverlayWindowService';\r\nimport {RouterContainerMagicComponent} from \"./router-container.magic.component\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class GuiInteractiveExecutor {\r\n command: GuiInteractive;\r\n component: TaskBaseMagicComponent;\r\n task: TaskMagicService;\r\n overlayService: OverlayWindowService;\r\n\r\n\r\n Run(): void {\r\n // Sets the currentContextID\r\n try {\r\n switch (this.command._commandType) {\r\n\r\n case InteractiveCommandType.GET_VALUE:\r\n this.onValue();\r\n break;\r\n\r\n case InteractiveCommandType.GET_ROWS_IN_PAGE:\r\n this.onGetRowsInPage();\r\n break;\r\n case InteractiveCommandType.GET_MAX_ROWS_IN_PAGINATED_TABLE:\r\n this.onGetMaxRowsInPaginatedTable();\r\n break;\r\n case InteractiveCommandType.MESSAGE_BOX:\r\n this.OnMessageBox();\r\n break;\r\n case InteractiveCommandType.GET_TOP_INDEX:\r\n this.OnGetTopIndex();\r\n break;\r\n case InteractiveCommandType.GET_IS_ROW_EDITING:\r\n this.OnGetIsRowEditing();\r\n break;\r\n case InteractiveCommandType.SET_TITLE:\r\n this.OnSetTitle();\r\n break;\r\n case InteractiveCommandType.REFRESH_PAGE:\r\n this.OnRefreshPage();\r\n break;\r\n case InteractiveCommandType.GET_LAST_ROUTE:\r\n this.OnGetLastRoute();\r\n break;\r\n case InteractiveCommandType.OPEN_FORM:\r\n this.OnOpenForm();\r\n break;\r\n }\r\n } catch (ex) {\r\n throw ex;\r\n //want to see all the exceptions for now\r\n }\r\n }\r\n\r\n\r\n public static executeInteractiveCommand(task: TaskMagicService, guiIntactiveCommand: GuiInteractive, overlayService: OverlayWindowService) {\r\n let executor = new GuiInteractiveExecutor();\r\n executor.task = task;\r\n executor.command = guiIntactiveCommand;\r\n executor.overlayService = overlayService;\r\n executor.Run();\r\n }\r\n\r\n private onValue(): void {\r\n let guiRowId: number = this.task.getGuiRowId(+this.command._line, this.task.isTableControl(this.command.controlName) || this.command._obj2.IsTableChild);\r\n let result = this.task.getFormControl(guiRowId.toString(), this.command.controlName);\r\n let val: any;\r\n if (!isNullOrUndefined(result)) {\r\n val = result.value;\r\n } else if (this.task.isTableControl(this.command.controlName))\r\n val = this.task.getValue(this.command.controlName, guiRowId.toString());\r\n\r\n // If this is Three State Checkbox, then check if value is indeterminate.\r\n if(this.command._boolVal){\r\n const indeterminate = this.task.getProperty(this.command.controlName,HtmlProperties.CheckBoxIndeterminate,guiRowId.toString());\r\n if(indeterminate)\r\n val = null;\r\n }\r\n\r\n val = this.task.ConvertValToNative(this.command.controlName, guiRowId, val);\r\n\r\n this.command._mgValue.obj = val;\r\n }\r\n\r\n private onGetRowsInPage(): void {\r\n this.command._intVal1 = this.task.tableService.getPageSize();\r\n if (this.task.oldPageSize == 0)\r\n this.task.oldPageSize = this.command._intVal1;\r\n }\r\n\r\n private onGetMaxRowsInPaginatedTable(): void {\r\n this.command._intVal1 = this.task.tableService.getMaxRowsInTable();\r\n }\r\n\r\n private OnMessageBox() {\r\n this.overlayService.openConfirmationBox(this.command._mgValue.title, this.command._mgValue.str, this.command._mgValue.style);\r\n }\r\n\r\n private OnOpenForm(): void {\r\n if (this.command._boolVal)\r\n this.overlayService.loadAndOpenModule(this.command.controlName, this.command._mgValue.str, this.command._mgValue.path);\r\n }\r\n\r\n private OnSetTitle() {\r\n this.task.setTitle(this.command._mgValue.title);\r\n }\r\n\r\n private OnRefreshPage() {\r\n let navigateToRootRoute = this.command._boolVal;\r\n let initialUrl:string = this.command._obj1;\r\n if (navigateToRootRoute)\r\n window.location.replace (initialUrl);\r\n else\r\n window.location.reload();\r\n }\r\n\r\n private OnGetTopIndex(): void {\r\n this.command._intVal1 = this.task.tableService.getTableTopIndex();\r\n }\r\n\r\n private OnGetIsRowEditing(): void {\r\n let dvRowIndex: number = this.command._intVal1;\r\n let guiRowIndex: number = this.task.getGuiRowId(dvRowIndex, true);\r\n let isLineMode: boolean = this.command._boolVal;\r\n\r\n if (isLineMode && (isNullOrUndefined(guiRowIndex) || isNullOrUndefined(this.task.Records.list[guiRowIndex])))\r\n this.command._boolVal = false;\r\n else\r\n this.command._boolVal = this.task.Records.list[guiRowIndex].isEditing;\r\n }\r\n\r\n private OnGetLastRoute(): void {\r\n this.command.resultString = RouterContainerMagicComponent.LastRoute;\r\n }\r\n}\r\n","import { Input, Output } from \"@angular/core\";\r\n@Input()\r\n@Output()\r\nexport abstract class BaseMagicOverlayContainer {\r\n /**\r\n *\r\n */\r\n @Input() abstract ModalComp;\r\n\r\n /**\r\n *\r\n */\r\n @Input() abstract ModalCompParameters: any;\r\n\r\n /**\r\n *\r\n */\r\n @Output() abstract onClose;\r\n}\r\n","import { Directive, ViewContainerRef } from \"@angular/core\";\nimport { IMagicViewContainerRef } from \"../../interfaces/sub-form-definition.iterface\";\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\n\n/**\n * Directive for setting ViewContainerRef on element\n */\n@Directive({\n selector: '[magicViewContainerRef]',\n})\nexport class MagicViewContainerRef {\n constructor(private vcRef: ViewContainerRef) {\n // For angular 10 - find the component from the views\n let comp = ((<any>this.vcRef)._hostLView).find(v => v as IMagicViewContainerRef != null && !isNullOrUndefined((v as IMagicViewContainerRef).setViewContainerRef));\n comp.setViewContainerRef(vcRef);\n }\n}\n\n","import {\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { MagicModalInterface } from './magic-modal-interface';\r\nimport { isNullOrUndefined } from '@magic-xpa/mscorelib';\r\nimport { BaseMagicOverlayContainer } from './base-magic-overlay-container';\r\nimport { IMagicViewContainerRef } from '../../..';\r\n\r\n/**\r\n * Creates a modal window for Magic modal window components\r\n */\r\n@Component({\r\n selector: 'app-magic-overlay-container',\r\n template: `\r\n <div>\r\n <div class=\"modal-background\" (click)=\"OnBackgroundClick()\">\r\n <button (click)=\"OnClose()\" tabindex=\"-1\" style=\"float:right; border: none; background-color: transparent; outline: none; color: white\" *ngIf=\"!getShowTitleBar()\">X</button>\r\n </div>\r\n <div #modalForeground class=\"modal-foreground\" [ngStyle]=\"getStyle()\">\r\n <div #modalheader class=\"modal-header\" *ngIf=\"getShowTitleBar()\">\r\n {{getText()}}\r\n <button (click)=\"OnClose()\" style=\"float:right\" tabindex=\"-1\">X</button>\r\n </div>\r\n <div [ngStyle]=\"getClientAreaStyles()\">\r\n <div #modalbody magicViewContainerRef>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n styleUrls: ['./magic-overlay-container.css']\r\n})\r\nexport class MagicOverlayContainer extends BaseMagicOverlayContainer implements OnInit , IMagicViewContainerRef{\r\n /**\r\n * HTML to be displayed in the modal window\r\n */\r\n modalbodyViewContainerRef : ViewContainerRef;\r\n\r\n /**\r\n * Header of the modal window\r\n */\r\n @ViewChild('modalheader', { static: false }) headerElementRef: ElementRef;\r\n /**\r\n * Foreground of the modal window\r\n */\r\n @ViewChild('modalForeground', { static: false }) foregroundElementRef: ElementRef;\r\n\r\n /**\r\n *\r\n */\r\n @Input() ModalComp = null;\r\n /**\r\n *\r\n */\r\n @Input() ModalCompParameters: any = {};\r\n\r\n @Output() onClose = new EventEmitter<void>();\r\n\r\n /**\r\n *\r\n */\r\n private componentRef = null;\r\n\r\n /**\r\n *\r\n * @param injector\r\n * @param componentFactoryResolver\r\n */\r\n constructor(\r\n\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n ngOnInit() {\r\n this.componentRef = this.modalbodyViewContainerRef.createComponent(this.ModalComp);\r\n Object.assign(this.componentRef.instance, this.ModalCompParameters);\r\n }\r\n\r\n\r\n setViewContainerRef(vcRef: ViewContainerRef){\r\n this.modalbodyViewContainerRef = vcRef;\r\n }\r\n\r\n\r\n /**\r\n * Returns the form name\r\n * @returns\r\n */\r\n getText() {\r\n if (this.componentRef !== null) {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n return comp.FormName();\r\n }\r\n else\r\n return '';\r\n }\r\n\r\n /**\r\n * Returns CSS styles for the window\r\n * @returns\r\n */\r\n getStyle() {\r\n let styles = {};\r\n if (this.componentRef != undefined) {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n\r\n styles['width'] = comp.Width();\r\n styles['height'] = comp.Height();\r\n\r\n if (comp.IsCenteredToWindow()) {\r\n styles['margin'] = 'auto';\r\n }\r\n else {\r\n styles['margin-left'] = comp.X() + 'px';\r\n styles['margin-top'] = comp.Y() + 'px';\r\n }\r\n }\r\n return styles;\r\n }\r\n\r\n /**\r\n * Returns the CSS styles for the client area\r\n * @returns\r\n */\r\n getClientAreaStyles() {\r\n let styles = {};\r\n if (this.componentRef != undefined) {\r\n const headerHeight = this.getShowTitleBar() && !isNullOrUndefined(this.headerElementRef) ? (this.headerElementRef.nativeElement.offsetHeight + 1) : 0;\r\n if (!isNullOrUndefined(this.foregroundElementRef)) {\r\n const foregroundHeight = this.foregroundElementRef.nativeElement.offsetHeight;\r\n styles['height'] = (foregroundHeight - headerHeight) + 'px';\r\n\r\n const foregroundWidth = this.foregroundElementRef.nativeElement.offsetWidth;\r\n styles['width'] = (foregroundWidth) + 'px';\r\n }\r\n styles['overflow'] = 'auto';\r\n }\r\n return styles;\r\n }\r\n\r\n /**\r\n * Should the title bar be displayed\r\n * @returns\r\n */\r\n getShowTitleBar() {\r\n if (this.componentRef != undefined) {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n return comp.ShowTitleBar();\r\n }\r\n }\r\n\r\n /**\r\n *\r\n */\r\n OnClose() {\r\n this.onClose.emit();\r\n }\r\n\r\n /**\r\n * Handles click in the background window\r\n */\r\n OnBackgroundClick() {\r\n let comp: MagicModalInterface = this.componentRef.instance as MagicModalInterface;\r\n\r\n if (comp.ShouldCloseOnBackgroundClick())\r\n this.OnClose();\r\n }\r\n}\r\n","/**\r\n * Service managing overlay windows\r\n * This is Magic's default provider\r\n */\r\nimport { Injectable } from \"@angular/core\";\r\nimport { MagicOverlayContainer } from \"../ui/magic-modal/magic-overlay-container\";\r\n\r\n@Injectable()\r\nexport class OverlayContainerMagicProvider {\r\n getComponent() {\r\n return MagicOverlayContainer;\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n\n/**\n * This is a base class for the magic confirm components\n */\n@Component({\n selector: 'mg-base-confirm',\n template: '',\n styles: ['']\n})\nexport class BaseMagicConfirmComponent {\n\n /**\n * title of the component\n */\n @Input() title: string;\n\n /**\n * message of the component\n */\n @Input() message: string;\n\n /**\n * onClose Event - to be raised when the component is closed\n * should pass true when OK is pressed and false when cancel is pressed\n */\n @Output() onClose = new EventEmitter<boolean>();\n\n\n /**\n * raises close Event\n * @param result true when OK is pressed and false when cancel is pressed\n *\n */\n OnClose(result) {\n this.onClose.emit(result);\n }\n}\n","\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\n\n/**\n * This is a base class for the magic alert components\n */\n@Component({\n selector: 'mg-base-alert',\n template: '',\n styles: ['']\n})\nexport class BaseMagicAlertComponent {\n\n\n /**\n * title of the component\n */\n @Input() title: string;\n\n /**\n * message of the component\n */\n @Input() message: string;\n\n /**\n * onClose Event - to be raised when the component is closed\n\n */\n @Output() onClose = new EventEmitter<void>();\n\n\n\n /**\n * close magic alert\n */\n OnClose() {\n this.onClose.emit();\n }\n}\n","import { Directive, ElementRef } from \"@angular/core\";\n\n/**\n * Directive for setting focus on element\n */\n@Directive({\n selector: '[magicFocus]'\n})\nexport class MagicFocusDirective {\n\n constructor(private hostElement: ElementRef) {}\n ngAfterViewInit() {\n this.hostElement.nativeElement.focus();\n }\n\n}\n","import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ViewChild,\r\n ViewContainerRef,\r\n ElementRef, NgModuleRef,\r\n Injector, ChangeDetectorRef, Compiler\r\n} from '@angular/core';\r\nimport { BaseMagicOverlayContainer } from \"./base-magic-overlay-container\";\r\nimport { BaseMagicConfirmComponent } from \"../components/base-magic-confirm.component\";\r\nimport { BaseMagicAlertComponent } from \"../components/base-magic-alert.component\";\r\nimport { OverlayType } from \"@magic-xpa/gui\";\r\nimport { ComponentListMagicService, ModuleData } from \"../../services/component-list.magic.service\";\r\nimport { IMagicViewContainerRef } from \"../../..\";\r\nimport {isNullOrUndefined} from '@magic-xpa/mscorelib';\r\nimport { MagicLazyLoaderService } from '../../services/magic.lazy.loader.service';\r\n\r\n\r\n@Component({\r\n selector: 'app-magic-overlay-container-wrapper',\r\n template: `\r\n <div>\r\n <div class=\"overlay-container-wrapper-background\" tabIndex=\"0\" style=\"width: 0px; height: 0px;\" magicFocus></div>\r\n <div class=\"overlay-container-wrapper-background\" #overlayContainerWrapper>\r\n <div #overlayContent magicViewContainerRef>\r\n </div>\r\n </div>\r\n <div class=\"overlay-container-wrapper-background\" tabIndex=\"0\" style=\"width: 0px; height: 0px;\" ></div>\r\n </div>\r\n `,\r\n styles: [`\r\n .overlay-container-wrapper-background {\r\n /* modal background fixed across whole screen */\r\n position: fixed;\r\n top: 0;\r\n z-index: 999;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n }\r\n `]\r\n})\r\nexport class MagicOverlayContainerWrapper implements IMagicViewContainerRef {\r\n /**\r\n *\r\n */\r\n @Input() public Component = null;\r\n /**\r\n *\r\n */\r\n @Input() public Parameters: any = {};\r\n\r\n @Input() private OverlayTypeParam: OverlayType;\r\n\r\n @Output() private onClose = new EventEmitter<void>();\r\n\r\n /**\r\n * HTML to be displayed in the modal window\r\n */\r\n overlayContentViewContainerRef: ViewContainerRef;\r\n\r\n @ViewChild('overlayContainerWrapper', { static: true }) overlayContainerWrapperElementRef: ElementRef;\r\n\r\n /**\r\n * @ignore\r\n * contais data of allowed base components to use\r\n */\r\n static allowedBaseComps = new Map<number, {comp: any, error: string}>([\r\n [OverlayType.Overlay, {comp: BaseMagicOverlayContainer, error:'BaseMagicOverlayContainer . Overlay '}],\r\n [OverlayType.Alert, {comp: BaseMagicAlertComponent, error:'BaseMagicAlertComponent. Alert '}],\r\n [OverlayType.ConfirmationBox, {comp: BaseMagicConfirmComponent, error :'BaseMagicConfirmComponent. Confirmation '}]\r\n ]);\r\n /**\r\n *\r\n * @param componentFactoryResolver\r\n */\r\n constructor(private componentListMagicService: ComponentListMagicService,\r\n private magicLazyModuleLoader: MagicLazyLoaderService,\r\n private injector: Injector,\r\n private changeDetectorRef:ChangeDetectorRef,\r\n private compiler: Compiler) {\r\n }\r\n\r\n /**\r\n *\r\n */\r\n ngOnInit() {\r\n let moduleRef: NgModuleRef<any> = this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);\r\n\r\n if (moduleRef == null) {\r\n let lazyLoadModule: ModuleData = this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName);\r\n\r\n if (lazyLoadModule != null) {\r\n const Magic: string = 'Magic';\r\n const Module: string = 'Module';\r\n\r\n // extract name of module(XX) from 'MagicXXModule'\r\n const moduleName = lazyLoadModule.moduleName.slice(Magic.length, -Module.length);\r\n this.magicLazyModuleLoader.Load(moduleName).then(m => {\r\n const compiled = this.compiler.compileModuleAndAllComponentsSync(<any>m[lazyLoadModule.moduleName]);\r\n moduleRef = compiled.ngModuleFactory.create(this.injector);\r\n this.loadComponent(moduleRef);\r\n });\r\n }\r\n else {\r\n this.loadComponent(null);\r\n }\r\n } else\r\n this.loadComponent(moduleRef);\r\n }\r\n\r\n private loadComponent(moduleRef: NgModuleRef<any>) {\r\n this.Parameters.ModalComp = this.componentListMagicService.getComponent(this.Parameters.MagicFormName, !isNullOrUndefined(this.Parameters.MagicFormName));\r\n\r\n\r\n let componentRef = this.overlayContentViewContainerRef.createComponent(this.Component);\r\n let allowedBaseComp = MagicOverlayContainerWrapper.allowedBaseComps.get(this.OverlayTypeParam);\r\n\r\n\r\n if (componentRef.instance instanceof allowedBaseComp.comp) {\r\n Object.assign(componentRef.instance, this.Parameters);\r\n (<any>componentRef.instance).onClose.subscribe((res) => {\r\n this.onClose.emit(res);\r\n });\r\n } else {\r\n let msg = \"Provided window container should subclass of : \" + allowedBaseComp.error + \"window will not work properly.\";\r\n alert(msg);\r\n }\r\n }\r\n\r\n setViewContainerRef(vcRef: ViewContainerRef){\r\n this.overlayContentViewContainerRef = vcRef;\r\n }\r\n\r\n GetRootElement(): HTMLElement {\r\n return this.overlayContainerWrapperElementRef.nativeElement;\r\n }\r\n\r\n DetectChanges()\r\n {\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n}\r\n","import { Component } from '@angular/core';\nimport { BaseMagicAlertComponent } from './base-magic-alert.component';\n\n\n/***\n * This is sample component for the alert message\n */\n@Component({\n selector: 'sample-magic-alert-component',\n template: `<div>\n <div class=\"mg-message-background\">\n <h2> {{title}}</h2>\n <p>{{message}} </p>\n\n <button (click)=\"OnClose()\">OK</button>\n </div>\n </div>`,\n styles: [`\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n `]\n})\nexport class MagicAlertComponent extends BaseMagicAlertComponent{\n\n}\n","import { Component } from '@angular/core';\nimport { BaseMagicConfirmComponent } from './base-magic-confirm.component';\n\n/***\n * This is sample component for the confirmation box\n */\n@Component({\n selector: 'sample-magic-confirmation-box',\n template: `<div>\n <div class=\"mg-message-background\">\n <h2> {{title}}</h2>\n {{message}}\n <br>\n <br>\n\n <button (click)=\"OnClose(true)\">OK</button>\n <button class=\"cancel\" (click)=\"OnClose(false)\">Cancel</button>\n </div>\n </div>`,\n styles: [`\n .mg-message-background {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n \n button.cancel {\n background-color: #C1C1C1;\n }\n `]\n})\nexport class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {\n\n}\n","/**\r\n * Service managing overlay windows\r\n * This is Magic's default provider\r\n */\r\nimport { Injectable } from \"@angular/core\";\r\nimport { MagicAlertComponent } from '../ui/components/magic-alert.component';\r\nimport { MagicConfirmationBoxComponent } from \"../ui/components/magic-confirmation-box.component\";\r\n\r\n/**\r\n * Service managing alert and confirmation windows\r\n * This is Magic's default provider\r\n */\r\n@Injectable()\r\nexport class ConfirmationComponentsMagicProvider {\r\n\r\n /**\r\n * Return true when use default javascript alert and confirmation or return false to provide custom components\r\n * @returns true is we want to use default javascript alert and confirmation\r\n */\r\n showDefaultConfirmations():boolean{\r\n return true; \r\n }\r\n\r\n /**\r\n * Returns component that will replace javascript alert. The component will be used only if showDefaultConfirmations = false\r\n * @returns component that will replace javascript Alert\r\n */\r\n getAlertComponent() : any {\r\n return MagicAlertComponent;\r\n }\r\n\r\n /**\r\n * Returns component that will replace javascript confirmation box. The component will be used only if showDefaultConfirmations = false\r\n * @returns component that will replace javascript confirmation box\r\n */\r\n getConfirmtionComponent() : any {\r\n return MagicConfirmationBoxComponent;\r\n }\r\n\r\n\r\n\r\n}\r\n","import {Styles} from \"@magic-xpa/gui\";\r\n\r\n/**\r\n * Displays a message-box\r\n */\r\nexport class confirmationBox {\r\n\r\n /**\r\n * @ignore\r\n */\r\n public static isConfirmBox(style : Styles): Boolean{\r\n\r\n // button format mask is in first nibble from right\r\n let buttonMode = <number>style & 0x0F;\r\n\r\n var isConfirm = (buttonMode === Styles.MSGBOX_BUTTON_OK_CANCEL) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_YES_NO_CANCEL) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_YES_NO) ||\r\n (buttonMode === Styles.MSGBOX_BUTTON_RETRY_CANCEL);\r\n\r\n return (isConfirm);\r\n }\r\n\r\n /**\r\n * Converts the result from the HTML window to the expected result type\r\n * @param style Result received from HTML window\r\n * @param okWasPressed Was the \"OK\" pressed\r\n * @returns MessageBox result type\r\n */\r\n public static convertToExcpectedResultBox (style: Styles, okWasPressed: Boolean ): Styles{\r\n\r\n // button format mask is in first nibble from right\r\n let buttonMode = <number>style & 0x0F;\r\n\r\n let retValue = Styles.MSGBOX_RESULT_OK;\r\n\r\n if (buttonMode === Styles.MSGBOX_BUTTON_OK)\r\n retValue = Styles.MSGBOX_RESULT_OK;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_OK_CANCEL)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_OK : Styles.MSGBOX_RESULT_CANCEL;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_ABORT : Styles.MSGBOX_RESULT_RETRY;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_YES_NO_CANCEL)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_YES : Styles.MSGBOX_RESULT_NO;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_YES_NO)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_YES : Styles.MSGBOX_RESULT_NO;\r\n else if (buttonMode === Styles.MSGBOX_BUTTON_RETRY_CANCEL)\r\n retValue = okWasPressed ? Styles.MSGBOX_RESULT_RETRY : Styles.MSGBOX_RESULT_CANCEL;\r\n\r\n return retValue;\r\n }\r\n\r\n /**\r\n * Show a message box as an HTML window\r\n * @param title Title of the message box\r\n * @param message Message that will be display in the message box\r\n * @param style Style that include buttons \\ Icons\r\n * @returns MessageBox result\r\n */\r\n public static showConfirmationBox(title: string, message: string, style: Styles): boolean {\r\n\r\n let okWasPressed = false;\r\n// check if it is confirmation box\r\n let isConfirm = this.isConfirmBox(style);\r\n\r\n // the title will be added to the string and we will add new line after the title\r\n let titleAndString = title + '\\n'+ '\\n' + message;\r\n\r\n if (isConfirm)\r\n okWasPressed = confirm(titleAndString);\r\n else {\r\n alert(titleAndString);\r\n okWasPressed = true;\r\n }\r\n\r\n // return the result from the user\r\n return okWasPressed; \r\n }\r\n}\r\n","import { Component, ComponentRef, Injectable, Injector, ChangeDetectorRef, Compiler,\r\n NgModuleRef,\r\n ViewContainerRef\r\n} from \"@angular/core\";\r\nimport {ComponentListMagicService, ModuleData} from \"./component-list.magic.service\";\r\nimport {EngineMagicService} from \"./engine.magic.service\";\r\nimport {IGuiEvent, getGuiEventObj} from \"@magic-xpa/engine\";\r\nimport { OverlayContainerMagicProvider } from \"./overlay.conainer.magic.provider\";\r\nimport { MagicOverlayContainerWrapper } from \"../ui/magic-modal/magic-overlay-container-wrapper\";\r\nimport { ConfirmationComponentsMagicProvider } from \"./confirmation.components.magic.provider\";\r\nimport { OverlayType, Styles } from \"@magic-xpa/gui\";\r\nimport { confirmationBox } from \"../ui/magic-confirmationBox\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\nimport {MagicLazyLoaderService} from \"./magic.lazy.loader.service\";\r\n\r\n\r\n\r\n\r\n/**\r\n * Service managing overlay windows\r\n */\r\n@Injectable({\r\n providedIn:'root'\r\n})\r\nexport class OverlayWindowService {\r\n\r\n constructor(\r\n protected componentList:ComponentListMagicService,\r\n protected engineMagicService: EngineMagicService,\r\n private magicLazyModuleLoader: MagicLazyLoaderService,\r\n private injector: Injector,\r\n private compiler: Compiler,\r\n private overlayContainerMagicProvider: OverlayContainerMagicProvider,\r\n private confirmationComponentsMagicProvider: ConfirmationComponentsMagicProvider) {\r\n }\r\n\r\n // The view reference of container of overlay window\r\n private overlayWindowsContainerViewRef: ViewContainerRef;\r\n\r\n private overlayWindowFocusManager: OverlayWindowFocusManager = null;\r\n\r\n private changeDetectorRef: ChangeDetectorRef = null;\r\n\r\n init(overlayWindowsContainerViewRef: ViewContainerRef, rootMagicElement: Element, changeDetectorRef: ChangeDetectorRef) {\r\n this.overlayWindowsContainerViewRef = overlayWindowsContainerViewRef;\r\n this.overlayWindowFocusManager = new OverlayWindowFocusManager(rootMagicElement);\r\n this.changeDetectorRef = changeDetectorRef;\r\n }\r\n\r\n loadAndOpenModule (formName: string, taskId: string, taskDescription: string): void {\r\n let moduleRef: NgModuleRef<any> = this.componentList.getModuleRef(formName);\r\n\r\n if (moduleRef == null) {\r\n let lazyLoadModule: ModuleData = this.componentList.getLazyLoadModuleData(formName);\r\n\r\n if (lazyLoadModule != null) {\r\n const Magic: string = 'Magic';\r\n const Module: string = 'Module';\r\n\r\n // extract name of module(XX) from 'MagicXXModule'\r\n const moduleName = lazyLoadModule.moduleName.slice(Magic.length, -Module.length);\r\n this.magicLazyModuleLoader.Load(moduleName).then(m => {\r\n const compiled = this.compiler.compileModuleAndAllComponentsSync(<any>m[lazyLoadModule.moduleName]);\r\n moduleRef = compiled.ngModuleFactory.create(this.injector);\r\n this.open(formName, taskId, taskDescription);\r\n this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);\r\n });\r\n }\r\n }\r\n else {\r\n this.open(formName, taskId, taskDescription);\r\n this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);\r\n }\r\n }\r\n\r\n open(formName: string, taskId: string, taskDescription: string) {\r\n\r\n // for overlay which are lazy loaded don't find data in component-list\r\n let comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null :this.componentList.getComponent(formName);\r\n let parameters = { taskIdParam: taskId, taskDescription: taskDescription };\r\n\r\n let componentRef = this.createModalComponent({ MagicFormName: formName, ModalComp: comp, ModalCompParameters: parameters}, <Component>this.overlayContainerMagicProvider.getComponent(), OverlayType.Overlay);\r\n\r\n componentRef.instance.onClose.subscribe(() => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"close\", null, 0);\r\n guiEvent.TaskID = taskId;\r\n this.engineMagicService.insertEvent(guiEvent);\r\n });\r\n\r\n //using the same changeDetectorRef from root-component\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n close(commandStr: string) {\r\n // Close the overlay by removing the overlay window from its container\r\n this.overlayWindowsContainerViewRef.remove();\r\n this.overlayWindowFocusManager.popDialog();\r\n\r\n let guiEvent1: IGuiEvent = getGuiEventObj(\"dispose\", null, 0);\r\n guiEvent1.TaskID = commandStr;\r\n this.engineMagicService.insertEvent(guiEvent1);\r\n }\r\n\r\n\r\n /**\r\n * Open Confirmation box\r\n * @param title title of the box\r\n * @param msg message\r\n * @param style Magic style\r\n */\r\n openConfirmationBox( title: string, msg: string, style: Styles) {\r\n\r\n //show default confirmations\r\n if (this.confirmationComponentsMagicProvider.showDefaultConfirmations())\r\n {\r\n let res = confirmationBox.showConfirmationBox(title, msg, style);\r\n this.finishConfirmation( style, res);\r\n\r\n }\r\n else\r\n {\r\n //show custom confirmations\r\n let comp = confirmationBox.isConfirmBox(style) ? this.confirmationComponentsMagicProvider.getConfirmtionComponent() :this.confirmationComponentsMagicProvider.getAlertComponent() ;\r\n let overlayType = confirmationBox.isConfirmBox(style)? OverlayType.ConfirmationBox : OverlayType.Alert;\r\n let componentRef = this.createModalComponent({ title: title, message: msg }, comp, overlayType);\r\n\r\n componentRef.instance.onClose.subscribe((res : boolean) => {\r\n this.overlayWindowsContainerViewRef.remove();\r\n this.overlayWindowFocusManager.popDialog();\r\n this.finishConfirmation( style, res);\r\n });\r\n }\r\n }\r\n /**\r\n * This method is called on close of the confirmation\r\n * @param style Magic style\r\n * @param result\r\n */\r\n finishConfirmation(style: Styles, result: boolean ) {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"confirmationClosed\", null, 0);\r\n guiEvent.keyCode = <number>confirmationBox.convertToExcpectedResultBox(style, result);\r\n this.engineMagicService.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * creates a modal component. Can be used for overlay, message box or confirmation box\r\n * @param parameters component's parameters\r\n * @param component components to create\r\n */\r\n private createModalComponent(parameters: any, component: Component, overlayType: OverlayType): ComponentRef<any> {\r\n let componentRef;\r\n let magicModalContainerParameters = {\r\n Component: component,\r\n Parameters: parameters,\r\n OverlayTypeParam: overlayType\r\n\r\n };\r\n\r\n // Create the UI component of modal window\r\n let viewCRef : ViewContainerRef = <ViewContainerRef>this.overlayWindowsContainerViewRef;\r\n componentRef = viewCRef.createComponent(MagicOverlayContainerWrapper);\r\n\r\n // Set the data to newly created component\r\n Object.assign(componentRef.instance, magicModalContainerParameters);\r\n\r\n this.overlayWindowFocusManager.pushDialog(componentRef.instance.GetRootElement());\r\n\r\n componentRef.instance.DetectChanges();\r\n\r\n return componentRef;\r\n }\r\n}\r\n\r\nclass OverlayWindowFocusManager\r\n{\r\n private rootMagicElement: Element = null;\r\n private openDialogList: Array<DialogInfo> = new Array(0);\r\n private ignoreUtilFocusChanges: boolean = false;\r\n private lastFocus = null;\r\n private focusListener = null;\r\n\r\n constructor (rootMagicElement: Element) {\r\n this.rootMagicElement = rootMagicElement;\r\n }\r\n\r\n pushDialog(rootElement: HTMLElement) {\r\n if (this.openDialogList.length === 0) {\r\n this.focusListener = this.trapFocus.bind(this);\r\n document.addEventListener('focus', this.focusListener, true);\r\n }\r\n\r\n this.openDialogList.push(new DialogInfo(rootElement, (document.activeElement instanceof HTMLElement ? <HTMLElement>document.activeElement : null)));\r\n }\r\n\r\n popDialog() {\r\n const dialogInfo = this.openDialogList.pop();\r\n this.attemptFocus(dialogInfo.FocusElementOnClose);\r\n\r\n if (this.openDialogList.length === 0) {\r\n document.removeEventListener('focus', this.focusListener, true);\r\n this.focusListener = null;\r\n }\r\n }\r\n\r\n trapFocus (event) {\r\n if (this.ignoreUtilFocusChanges) {\r\n return;\r\n }\r\n\r\n if (this.openDialogList.length > 0) {\r\n var currentDialog = this.openDialogList[this.openDialogList.length - 1].RootElement;\r\n if (currentDialog.contains(event.target)) {\r\n this.lastFocus = event.target;\r\n }\r\n else {\r\n if (this.rootMagicElement.contains(event.target)) {\r\n this.focusFirstDescendant(currentDialog);\r\n if (this.lastFocus == document.activeElement) {\r\n this.focusLastDescendant(currentDialog);\r\n }\r\n }\r\n this.lastFocus = document.activeElement;\r\n }\r\n }\r\n }\r\n\r\n private focusFirstDescendant (element) {\r\n for (var i = 0; i < element.childNodes.length; i++) {\r\n var child = element.childNodes[i];\r\n if (this.attemptFocus(child) ||\r\n this.focusFirstDescendant(child)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n private focusLastDescendant (element) {\r\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\r\n var child = element.childNodes[i];\r\n if (this.attemptFocus(child) ||\r\n this.focusLastDescendant(child)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n private attemptFocus (element) {\r\n if (!this.isFocusable(element)) {\r\n return false;\r\n }\r\n\r\n this.ignoreUtilFocusChanges = true;\r\n try {\r\n element.focus();\r\n }\r\n catch (e) {\r\n }\r\n this.ignoreUtilFocusChanges = false;\r\n return (document.activeElement === element);\r\n };\r\n\r\n private isFocusable (element) {\r\n if (isNullOrUndefined(element))\r\n return false;\r\n\r\n if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) {\r\n return true;\r\n }\r\n else if (element.tabIndex < 0)\r\n return false;\r\n\r\n if (element.disabled) {\r\n return false;\r\n }\r\n\r\n switch (element.nodeName) {\r\n case 'A':\r\n return !!element.href && element.rel != 'ignore';\r\n case 'INPUT':\r\n return element.type != 'hidden' && element.type != 'file';\r\n case 'BUTTON':\r\n case 'SELECT':\r\n case 'TEXTAREA':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n}\r\n\r\nclass DialogInfo\r\n{\r\n private rootElement: HTMLElement;\r\n private focusElementOnClose: HTMLElement;\r\n\r\n constructor(rootElement: HTMLElement, focusElementOnClose: HTMLElement) {\r\n this.rootElement = rootElement;\r\n this.focusElementOnClose = focusElementOnClose;\r\n }\r\n\r\n get RootElement(): HTMLElement {\r\n return this.rootElement;\r\n }\r\n\r\n get FocusElementOnClose(): HTMLElement {\r\n return this.focusElementOnClose;\r\n }\r\n}\r\n\r\n\r\n","import {EventEmitter, Injectable} from '@angular/core';\r\nimport {AbstractControl, FormControl, FormGroup, ValidationErrors, ValidatorFn} from '@angular/forms';\r\nimport {filter} from 'rxjs/operators';\r\nimport {Subject, Subscription, EMPTY} from 'rxjs';\r\n\r\nimport {isNullOrUndefined, isUndefined} from '@magic-xpa/mscorelib';\r\nimport {StylesMapManager} from './StylesMapManager';\r\n\r\nimport {EngineMagicService} from './engine.magic.service';\r\nimport {ControlMetadata, Records} from '../controls.metadata.model';\r\nimport {CommandType, CustomValidator, GuiCommand, GuiConstants, GuiInteractive, HtmlProperties} from '@magic-xpa/gui';\r\n\r\nimport {NString, StringBuilder} from '@magic-xpa/mscorelib';\r\nimport {StorageAttribute} from '@magic-xpa/utils';\r\nimport {getGuiEventObj, IGuiEvent} from '@magic-xpa/engine';\r\nimport {SubformMagicService} from './subform.magic.service';\r\nimport {TitleMagicService} from './title.magic.service';\r\nimport {AccessorMagicService} from './accessor.magic.service';\r\nimport {GuiInteractiveExecutor} from '../ui/GuiInteractiveExecutor';\r\nimport {OverlayWindowService} from './OverlayWindowService';\r\n\r\n/**\r\n * Main service to connect the UI with the Magic WebCLient\r\n */\r\n@Injectable()\r\nexport class TaskMagicService {\r\n\r\n /**\r\n * Service to provide table-related functionalities\r\n */\r\n public tableService: any;\r\n /**\r\n * Collection of data for all controls\r\n */\r\n Records: any = new Records();\r\n /**\r\n * FormGroup collection for line mode\r\n */\r\n formGroups: Array<FormGroup> = [];\r\n /**\r\n * FormGroup for all controls in screen mode\r\n */\r\n ScreenModeControls: FormGroup;\r\n /**\r\n * @ignore\r\n */\r\n refreshDom: Subject<GuiCommand> = new Subject();\r\n /**\r\n * @ignore\r\n */\r\n subscribeRefreshDom: Subscription;\r\n /**\r\n * @ignore\r\n */\r\n detectChanges: Subject<any> = new Subject();\r\n /**\r\n * @ignore\r\n */\r\n subscribeInteractiveCommands: Subscription;\r\n\r\n /**\r\n * @ignore\r\n */\r\n interactiveCommands: Subject<GuiInteractive>= new Subject();\r\n\r\n /**\r\n * @ignore\r\n * This event is emitted when the selected row in a table changes.\r\n */\r\n OnSelectedRowChanged: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n customPropertiesSubject: Subject<any> = new Subject();\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n recordsCountChangeSubject: Subject<any> = new Subject();\r\n\r\n mgLoadSubject: Subject<any> = new Subject();\r\n\r\n /**\r\n * @ignore\r\n */\r\n public template: { [id: string]: string; };\r\n /**\r\n * Service to provide subform-related functionalities\r\n */\r\n public mgSubformService: SubformMagicService;\r\n /**\r\n * Service to provide the title-change functionality\r\n */\r\n public mgTitleService: TitleMagicService;\r\n /**\r\n * Service which enables getting/setting values from/to the Magic WebClient engine\r\n */\r\n public mgAccessorService: AccessorMagicService;\r\n\r\n public mgInputDateFormat;\r\n\r\n /**\r\n * @ignore\r\n */\r\n oldPageSize = 0;\r\n\r\n /**\r\n *\r\n * @param magic\r\n */\r\n constructor(protected magic: EngineMagicService, private overlayWindowService: OverlayWindowService) {\r\n this.Records.setGuiTopIndex(0);\r\n this.mgInputDateFormat = null;\r\n }\r\n\r\n /**\r\n * returns true if used is logged in\r\n * @returns\r\n */\r\n public getIsLoggenIn(): boolean {\r\n return this.magic.getIsLoggedIn();\r\n }\r\n\r\n /**\r\n * Id of task to which this service refers\r\n */\r\n _taskId: string;\r\n\r\n /**\r\n * returns the task Id\r\n * @returns\r\n */\r\n get taskId() {\r\n return this._taskId;\r\n }\r\n\r\n /**\r\n * Sets the task Id\r\n * @param value the task id to set\r\n */\r\n set taskId(value) {\r\n // debugger;\r\n this._taskId = value;\r\n }\r\n\r\n /**\r\n * Returns the task's data in Screen mode\r\n * @returns\r\n */\r\n get ScreenControlsData() {\r\n return this.Records.list['0'];\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n settemplate(value: any) {\r\n this.template = value;\r\n }\r\n\r\n\r\n /**\r\n * Builds the FormControl for each and every control\r\n */\r\n buildScreenModeControls() {\r\n const group: FormGroup = new FormGroup({});\r\n for (const key in this.template) {\r\n\r\n if (this.template[key] == '0') {\r\n let fc = new FormControl('');\r\n this.setStubValue(0, fc, key);\r\n group.addControl(key, fc);\r\n }\r\n }\r\n\r\n this.ScreenModeControls = group;\r\n }\r\n\r\n /**\r\n * Is the control a table control\r\n * @param id Id of the control\r\n * @returns\r\n */\r\n isTableControl(id: string): boolean {\r\n return this.template[id] == '1';\r\n }\r\n\r\n getMgInputDateFormat(): string {return this.mgInputDateFormat;}\r\n\r\n /**\r\n * Returns the FormControl of a control\r\n * @param guiRowid Id of the requested row\r\n * @param id Id of the control\r\n * @returns\r\n */\r\n getFormControl(guiRowid: string, id: string): AbstractControl {\r\n let c: AbstractControl;\r\n let group: FormGroup = this.isTableControl(id) ? this.formGroups[guiRowid] : this.ScreenModeControls;\r\n if (!isNullOrUndefined(group)) {\r\n group.get(id);\r\n c = group.controls[id];\r\n }\r\n return c;\r\n }\r\n\r\n /**\r\n * handle the change of text for input control inside table\r\n * @param guiRowId Id of the row for which the FormControls are built\r\n * set the new value of the formcontrol\r\n */\r\n setInputTextValue(controlId: string, guiRowid: string, val: any) {\r\n this.setValue(controlId, guiRowid, this.ConvertValToNative(controlId, 0, val));\r\n\r\n const fc = this.getFormControl(guiRowid, controlId);\r\n if (!isNullOrUndefined(val))\r\n fc.setValue(val);\r\n }\r\n\r\n /**\r\n * Build the FormControls for a table row\r\n * @param guiRowId Id of the row for which the FormControls are built\r\n */\r\n buildTableRowControls(guiRowId: number) {\r\n\r\n const group: FormGroup = new FormGroup({});\r\n\r\n for (const key in this.template) {\r\n\r\n if (this.template[key] == '1') {\r\n let fc = new FormControl('');\r\n this.setStubValue(guiRowId, fc, key);\r\n group.addControl(key, fc);\r\n }\r\n }\r\n this.formGroups[guiRowId] = group;\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @ignore\r\n */\r\n updateRecordsBeforeCurrentView(value: number) {\r\n this.Records.recordsBeforeCurrentView = value;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setIncludesFirst(value: boolean): void {\r\n this.Records.includesFirst = value;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setIncludesLast(value: boolean): void {\r\n this.Records.includesLast = value;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n markRowAsCreated(guiRowId: number): void {\r\n this.Records.markRowAsCreated(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n markRowAsNotCreated(guiRowId: number): void {\r\n this.Records.markRowAsNotCreated(guiRowId);\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n startRowEditing(guiRowId: number): void {\r\n this.Records.startRowEditing(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n stopRowEditing(guiRowId: number): void {\r\n this.Records.stopRowEditing(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n isRowInRowEditing(guiRowId: string): boolean {\r\n return this.Records.isRowInRowEditing(guiRowId);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setIsEmptyDataView(isEmpty: boolean) {\r\n if (this.Records.isEmptyDataView !== isEmpty) {\r\n\r\n if (isEmpty)\r\n this.recordsCountChangeSubject.next(0);\r\n\r\n this.Records.isEmptyDataView = isEmpty;\r\n this.tableService.refreshDataSource();\r\n this.refreshView();\r\n }\r\n }\r\n\r\n /**\r\n * Initialize the service to work with the task\r\n * @param taskId Id of the task\r\n * @param taskDescription\r\n */\r\n initTask(taskId, taskDescription) {\r\n this.Records.createFirst();\r\n this.oldPageSize = 0;\r\n if (this.IsStub()) {\r\n this.loadData();\r\n } else {\r\n this.taskId = taskId;\r\n this.settemplate(taskDescription);\r\n }\r\n this.buildScreenModeControls();\r\n\r\n // remove previous subscriptions\r\n if(!isNullOrUndefined(this.subscribeRefreshDom))\r\n this.subscribeRefreshDom.unsubscribe();\r\n if(!isNullOrUndefined(this.subscribeInteractiveCommands))\r\n this.subscribeInteractiveCommands.unsubscribe();\r\n\r\n this.subscribeRefreshDom = this.magic.refreshDom.pipe(filter(command => command.TaskTag === this.taskId))\r\n .subscribe(command => {\r\n // console.log(\"Task \" + command.TaskTag + \"command \" + command.CommandType);\r\n this.executeCommand(command);\r\n });\r\n this.subscribeInteractiveCommands = this.magic.interactiveCommands\r\n .pipe(filter(command => command.TaskTag === this.taskId))\r\n .subscribe(command => {\r\n // console.log(\"Task \" + command.TaskTag + \"command \" + command.CommandType);\r\n this.executeInteractiveCommand(command);\r\n });\r\n\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n refreshView() {\r\n this.detectChanges.next('');\r\n }\r\n\r\n /**\r\n * Insert an event to the Magic WebClient event queue\r\n * @param guiEvent The event to insert\r\n */\r\n insertEvent(guiEvent: IGuiEvent): void {\r\n guiEvent.TaskID = this.taskId;\r\n this.magic.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n GetControlPictureMask(controlName: string): any {\r\n return this.magic.GetControlPictureMask(this.taskId, controlName);\r\n }\r\n\r\n /**\r\n * Validates the control value, using the Magic WebClient\r\n * @param controlName Id of validated control\r\n * @param value value to be validated\r\n * @returns If validation fails, returns error message, else returns null\r\n */\r\n ValidateControlValue(controlName: string, value: any): string {\r\n return this.magic.ValidateControlValue(this.taskId, controlName, value);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n GetRangedValue(controlName: string, value: string): string {\r\n return this.magic.GetRangedValue(this.taskId, controlName, value);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n GetFldRanges(controlName: string): string {\r\n return this.magic.GetFldRanges(this.taskId, controlName);\r\n }\r\n\r\n /**\r\n * returns the value of a property of the control\r\n * @param controlId Id of control\r\n * @param prop Property\r\n * @param guiRowId Row Id, if applicable\r\n * @returns Property value\r\n */\r\n getProperty(controlId: string, prop: HtmlProperties, guiRowId?: string) {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n if (this.IsStub())\r\n return this.getPropertyStub(this.Records.list[guiRowId], controlId, prop);\r\n else {\r\n let rec = this.Records.list[guiRowId];\r\n if (isNullOrUndefined(rec))\r\n debugger;\r\n else\r\n return this.Records.list[guiRowId].getProperty(controlId, prop);\r\n\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getPropertyStub(ControlsProperties: any, controlId, prop) {\r\n ControlsProperties = ControlsProperties.ControlsProperties;\r\n if (controlId in ControlsProperties) {\r\n if (prop in ControlsProperties[controlId].properties) {\r\n return ControlsProperties[controlId].properties[prop];\r\n }\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getStyleStub(ControlsProperties: any, controlId, styleName: string) {\r\n ControlsProperties = ControlsProperties.ControlsProperties;\r\n return ControlsProperties[controlId].stylesMap.get(styleName);\r\n }\r\n\r\n /**\r\n * Return the CSS classes used for this control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @returns String containing the classes currently defined for this control\r\n */\r\n getClasses(controlId: string, guiRowId?: string): string {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n return this.Records.list[guiRowId].getControlMetadata(controlId).classes;\r\n\r\n }\r\n\r\n /**\r\n * Return the value of a style used for a control\r\n * @param controlId Id of control\r\n * @param styleName Name of style\r\n * @param guiRowId Row Id, if applicable\r\n * @returns value of style of the control\r\n */\r\n getStyle(controlId: string, styleName: string, guiRowId?: string): string {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n if (this.IsStub())\r\n return this.getStyleStub(this.Records.list[guiRowId], controlId, styleName);\r\n else {\r\n let magicValue = this.Records.list[guiRowId].getControlMetadata(controlId).stylesMap.get(styleName);\r\n return StylesMapManager.magicValueGetStyle(styleName, magicValue);\r\n }\r\n }\r\n\r\n /**\r\n * Return the value of a control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @returns value of the control\r\n */\r\n getValue(controlId: string, guiRowId?: string) {\r\n if (isNullOrUndefined(guiRowId))\r\n guiRowId = '0';\r\n return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';\r\n\r\n }\r\n\r\n /**\r\n * Return the formatted value of a control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @returns value of the control\r\n */\r\n getFormattedValue(controlName: string, val: any, rowId?: string): string {\r\n\r\n return this.magic.GetFormattedValue(this.taskId, controlName, val, rowId);\r\n }\r\n\r\n /**\r\n * Sets the value of a control\r\n * @param controlId Id of control\r\n * @param guiRowId Row Id, if applicable\r\n * @param value Value to set\r\n */\r\n setValue(controlId: string, guiRowId: string, value: any): void {\r\n return this.Records.list[guiRowId].setValue(controlId, value);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n protected executeInteractiveCommand(guiInteractiveCommand: GuiInteractive)\r\n {\r\n GuiInteractiveExecutor.executeInteractiveCommand(this, guiInteractiveCommand, this.overlayWindowService);\r\n this.interactiveCommands.next(guiInteractiveCommand)\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n handleSetProperty(command: GuiCommand, isTableChild: boolean): void {\r\n let controlId = command.CtrlName;\r\n let dvRowId: number = (command.line || 0);\r\n let guiRowId: number = this.getGuiRowId(dvRowId, isTableChild);\r\n let properties: ControlMetadata;\r\n\r\n if (command.Operation === HtmlProperties.SelectedRow) {\r\n if (command.obj1 !== GuiConstants.NO_ROW_SELECTED) {\r\n guiRowId = this.getGuiRowId(command.obj1, true);\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.properties.set(command.Operation, command.line);\r\n this.tableService.selectRow(guiRowId.toString());\r\n this.OnSelectedRowChanged.emit(guiRowId.toString());\r\n }\r\n } else if (command.Operation === HtmlProperties.Enabled) {\r\n let c = this.getFormControl(guiRowId.toString(), controlId);\r\n if (!isNullOrUndefined(c)) {\r\n if (command.obj1)\r\n c.enable();\r\n else\r\n c.disable();\r\n }\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.properties.set(command.Operation, command.obj1);\r\n } else {\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.properties.set(<HtmlProperties>command.Operation, command.obj1);\r\n }\r\n }\r\n\r\n\r\n executeCommand(command: GuiCommand): void {\r\n let dvRowId: number = (command.line || 0);\r\n let guiRowId: number = 0;\r\n let controlId = command.CtrlName;\r\n let properties: ControlMetadata;\r\n let isTableChild: boolean = this.isTableControl(controlId);\r\n\r\n // For non-input type controls on table.\r\n if (command.obj !== null)\r\n isTableChild = isTableChild || command.obj.IsTableChild;\r\n\r\n guiRowId = this.getGuiRowId(dvRowId, isTableChild);\r\n\r\n switch (command.CommandType) {\r\n case CommandType.SET_IS_LOGGED_IN:\r\n break;\r\n\r\n case CommandType.SET_TABLE_TOP_INDEX:\r\n this.tableService.setTableTopIndex(command.number);\r\n break;\r\n case CommandType.REFRESH_TASK:\r\n this.tableService.refreshDataSource();\r\n this.refreshView();\r\n\r\n break;\r\n case CommandType.SET_TABLE_ITEMS_COUNT:\r\n if (!isUndefined(command.number)) {\r\n this.tableService.updateTableSize(command.number);\r\n\r\n if (command.number > 0 && this.Records.sizeUpdated &&\r\n !this.Records.isEmptyDataView) {\r\n this.recordsCountChangeSubject.next(command.number);\r\n this.Records.sizeUpdated = false;\r\n }\r\n }\r\n break;\r\n case CommandType.SET_CHUNK_SIZE:\r\n if (!isUndefined(command.number)) {\r\n this.tableService.setChunkSize(command.number);\r\n }\r\n break;\r\n case CommandType.SET_RECORDS_BEFORE_CURRENT_VIEW:\r\n this.updateRecordsBeforeCurrentView(command.number);\r\n break;\r\n\r\n case CommandType.CREATE_TABLE_ROW:\r\n guiRowId = this.getGuiRowId(command.number, true);\r\n this.buildTableRowControls(guiRowId);\r\n this.markRowAsCreated(guiRowId);\r\n break;\r\n\r\n case CommandType.SET_IS_ROW_EDITING:\r\n guiRowId = this.getGuiRowId(command.line, command.value);\r\n this.startRowEditing(guiRowId);\r\n break;\r\n\r\n case CommandType.SET_NOT_IS_ROW_EDITING:\r\n guiRowId = this.getGuiRowId(command.line, command.value);\r\n this.stopRowEditing(guiRowId);\r\n break;\r\n\r\n\r\n case CommandType.UNDO_CREATE_TABLE_ROW:\r\n this.markRowAsNotCreated(this.getGuiRowId(command.number, true));\r\n break;\r\n\r\n\r\n case CommandType.SET_TABLE_INCLUDES_FIRST:\r\n this.setIncludesFirst(command.Bool1);\r\n break;\r\n case CommandType.SET_TABLE_INCLUDES_LAST:\r\n this.setIncludesLast(command.Bool1);\r\n break;\r\n\r\n\r\n case CommandType.SET_PROPERTY:\r\n this.handleSetProperty(command, isTableChild);\r\n if (command.Operation == HtmlProperties.ReadOnly ||\r\n command.Operation == HtmlProperties.ItemsList ||\r\n command.Operation == HtmlProperties.CheckBoxIndeterminate)\r\n this.refreshDom.next(command);\r\n break;\r\n\r\n case CommandType.PROP_SET_USER_PROPERTY:\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n // if the property has changed, set the property and raise the subject\r\n if(properties.userProperties.get(command.Operation)!== command.obj1) {\r\n properties.userProperties.set(command.Operation, command.obj1);\r\n // the property name is of format <controlName>~<propertyName>\r\n this.customPropertiesSubject.next({ propertyName: controlId + '~' + command.Operation, value: command.obj1, rowId: guiRowId });\r\n }\r\n break;\r\n\r\n case CommandType.PROP_SET_CUSTOM_VALIDATOR: {\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n\r\n let control = this.getFormControl(guiRowId.toString(), controlId);\r\n if (control != null) {\r\n properties.customValidators.set(command.Operation, command.obj1);\r\n if (control.validator != null)\r\n control.setValidators([control.validator, this.customValidator(guiRowId.toString(), controlId)]);\r\n else\r\n control.setValidators(this.customValidator(guiRowId.toString(), controlId));\r\n\r\n control.updateValueAndValidity();\r\n }\r\n }\r\n break;\r\n\r\n case CommandType.SET_CLASS:\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.setClass(command.Operation, command.obj1);\r\n break;\r\n\r\n case CommandType.SET_STYLE:\r\n properties = this.Records.list[guiRowId].getControlMetadata(controlId);\r\n properties.setStyle(command.Operation, command.obj1);\r\n break;\r\n\r\n case CommandType.SET_ATTRIBUTE:\r\n properties = this.Records.list[0].getControlMetadata(controlId);\r\n properties.dataType = <StorageAttribute>String.fromCharCode(command.number);\r\n break;\r\n\r\n case CommandType.SET_VALUE:\r\n this.Records.list[guiRowId].values[controlId] = command.value;\r\n let c = this.getFormControl(guiRowId.toString(), controlId);\r\n if (!isNullOrUndefined(c)) {\r\n c.setValue(this.ConvertValFromNative(controlId, command.line, command.value));\r\n }\r\n\r\n break;\r\n\r\n case CommandType.CREATE_SUB_FORM:\r\n this.mgSubformService.addSubformComp(command.CtrlName, command.userDropFormat.toString(), command.str, command.fileName, command.contextID, command.params, command.Bool1);\r\n break;\r\n\r\n case CommandType.CLOSE_SUB_FORM:\r\n this.mgSubformService.deleteSubformComp(command.CtrlName, command.userDropFormat.toString());\r\n break;\r\n\r\n case CommandType.SET_EMPTY_DATAVIEW:\r\n this.setIsEmptyDataView(command.Bool1);\r\n break;\r\n\r\n case CommandType.SET_FOCUS:\r\n this.refreshDom.next(command);\r\n break;\r\n\r\n case CommandType.SET_WC_IDLE:\r\n this.mgLoadSubject.next(EMPTY);\r\n break;\r\n }\r\n\r\n }\r\n\r\n /**\r\n custom validator\r\n */\r\n customValidator(rowid: string, id: string): ValidatorFn {\r\n\r\n return (control: AbstractControl): ValidationErrors => {\r\n let controlMetadata: ControlMetadata;\r\n controlMetadata = this.Records.list[rowid].getControlMetadata(id);\r\n for (let key of controlMetadata.customValidators.keys()) {\r\n let validator = controlMetadata.customValidators.get(key);\r\n if (!(<CustomValidator>validator).isValid()) {\r\n return { [key]: true };\r\n }\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n /**\r\n * COnvert a value from Magic format to native format\r\n * @param controlId Id of control\r\n * @param rowId Row Id, if applicable\r\n * @param val Value to convert\r\n * @returns Converted value\r\n */\r\n ConvertValToNative(controlId: string, rowId: number, val: any): any {\r\n\r\n let properties: ControlMetadata;\r\n properties = this.Records.list[0].getControlMetadata(controlId);\r\n\r\n switch (properties.dataType) {\r\n\r\n case StorageAttribute.BOOLEAN: {\r\n if (typeof val === 'string') {\r\n let ranges: string = this.GetFldRanges(controlId);\r\n let found: number = ranges.indexOf(',');\r\n let trueOption: string = ranges.substr(0, found);\r\n let falseOption: string = ranges.substr(found + 1);\r\n if (NString.Equals(val, trueOption, true))\r\n return true;\r\n else if (NString.Equals(val, falseOption, true))\r\n return false;\r\n else\r\n return val;\r\n } else\r\n return val;\r\n }\r\n\r\n case StorageAttribute.TIME: {\r\n if (typeof val === 'string'){\r\n let idx = val.indexOf(':',0);\r\n let hours: number = +val.substr(0, idx);\r\n let minutes: number = +val.substr(idx+1, 2);\r\n let seconds = 0;\r\n if (val.length > 5) {\r\n idx = val.indexOf(':', idx + 1);\r\n if (idx >= 0)\r\n seconds = +val.substr(idx + 1, 2);\r\n }\r\n if (val.indexOf('PM')>0)\r\n hours += 12;\r\n let dt: Date = new Date();\r\n dt.setHours(hours);\r\n dt.setMinutes(minutes);\r\n dt.setSeconds(seconds);\r\n\r\n\r\n return dt;\r\n } else\r\n return val;\r\n }\r\n\r\n case StorageAttribute.NUMERIC:\r\n if (isUndefined(val))\r\n return val;\r\n else return (val != null) ? (typeof val === 'string') ? val : +val : null;\r\n default:\r\n return val;\r\n }\r\n }\r\n\r\n /**\r\n * Convert a value from native to Magic format\r\n * @param controlId Id of control\r\n * @param rowId Row Id, if applicable\r\n * @param val Value to convert\r\n * @returns Converted value\r\n */\r\n ConvertValFromNative(controlId: string, rowId: number, val: any): any {\r\n\r\n let properties: ControlMetadata;\r\n properties = this.Records.list[0].getControlMetadata(controlId);\r\n\r\n switch (properties.dataType) {\r\n\r\n case StorageAttribute.TIME: {\r\n if (val instanceof Date) {\r\n let str: StringBuilder = new StringBuilder();\r\n let format: string = val.getHours() > 9 ? '{0}' : '0{0}';\r\n str.AppendFormat(format, val.getHours().toString());\r\n str.Append(':');\r\n format = val.getMinutes() > 9 ? '{0}' : '0{0}';\r\n str.AppendFormat(format, val.getMinutes().toString());\r\n if ( val.getSeconds() > 0) {\r\n str.Append(':');\r\n format = val.getSeconds() > 9 ? '{0}' : '0{0}';\r\n str.AppendFormat(format, val.getSeconds().toString());\r\n }\r\n return str.ToString();\r\n } else\r\n return val;\r\n }\r\n case StorageAttribute.BOOLEAN: {\r\n let properties: ControlMetadata;\r\n properties = this.Records.list['0'].getControlMetadata(controlId);\r\n if (typeof val === 'boolean' && properties.rangeValidator) {\r\n let ranges: string = this.GetFldRanges(controlId);\r\n let found: number = ranges.indexOf(',');\r\n let trueOption: string = ranges.substr(0, found);\r\n let falseOption: string = ranges.substr(found + 1);\r\n if (val)\r\n return trueOption;\r\n else\r\n return falseOption;\r\n } else\r\n return val;\r\n }\r\n\r\n default:\r\n return val;\r\n }\r\n }\r\n\r\n /**\r\n * Handle resize and also fetch chunk of records if having an empty view.\r\n * @ignore\r\n * @param pageSize : PageSize\r\n * @param topGuiRowId : GuiRowId of first record in view.\r\n */\r\n resize(pageSize: number, topGuiRowId: number): void {\r\n let guiEvent: IGuiEvent = getGuiEventObj('resize', 'table', 0);\r\n guiEvent.PageSize = pageSize;\r\n\r\n //As 'getRows' event also gets executed, set the guiEvent.Line parameter.\r\n guiEvent.Line = topGuiRowId;\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Fetches data for new table rows when scrolling done\r\n */\r\n onScrollDown() {\r\n if (!this.Records.includesLast) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('getRows', '', 0);\r\n guiEvent.Line = this.formGroups.length;\r\n this.insertEvent(guiEvent);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the new browser window title\r\n * @param newTitle New window title\r\n */\r\n setTitle(newTitle: string) {\r\n this.mgTitleService.setTitle(newTitle);\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n getGuiRowId(dvRowId: number, isTableControl: boolean): number {\r\n return (isTableControl ? dvRowId + this.Records.recordsBeforeCurrentView : 0);\r\n }\r\n\r\n /**\r\n *\r\n * @ignore\r\n */\r\n getDvRowId(guiRowId: number): number {\r\n return (guiRowId - this.Records.recordsBeforeCurrentView);\r\n }\r\n\r\n /**\r\n * Clean up the service when it is no longer needed\r\n */\r\n dispose() {\r\n this.refreshDom.complete();\r\n this.detectChanges.complete();\r\n this.subscribeInteractiveCommands.unsubscribe();\r\n this.subscribeRefreshDom.unsubscribe();\r\n this.interactiveCommands.complete();\r\n this.customPropertiesSubject.complete();\r\n this.OnSelectedRowChanged.complete();\r\n }\r\n\r\n ///////////////////////////////\r\n //Events:\r\n\r\n /**\r\n * Handle the Combobox \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n * @param line Row Id, if applicable\r\n */\r\n onComboboxSelectionChanged(event: Event, idx: string, line: number) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, line);\r\n\r\n if (typeof (event) == 'number') {\r\n guiEvent.Value = event;\r\n }\r\n else {\r\n if (!isNullOrUndefined(event.target)) {\r\n let indexes: number[] = new Array<number>((<any>event.target).selectedOptions.length);\r\n for (let i = 0; i < (<any>event.target).selectedOptions.length; i++) {\r\n indexes[i] = (<HTMLOptionElement>(<any>event.target).selectedOptions[i]).index;\r\n }\r\n guiEvent.Value = indexes.join(',');\r\n } else\r\n guiEvent.Value = (<any>event).value;\r\n }\r\n\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Handle the Listbox \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n */\r\n onListBoxSelectionChanged(event: Event, idx: string) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, 0);\r\n\r\n let selectedOptions;\r\n if (!isNullOrUndefined(event.target))\r\n selectedOptions = (<any>event.target).selectedOptions;\r\n else\r\n selectedOptions = (<any>event).source.selectedOptions.selected;\r\n\r\n let length = selectedOptions.length;\r\n let indexes: number[] = new Array<number>(length);\r\n\r\n for (let i = 0; i < length; i++) {\r\n if (!isNullOrUndefined(event.target))\r\n indexes[i] = (selectedOptions[i]).index;\r\n else\r\n indexes[i] = (selectedOptions[i]).value;\r\n }\r\n guiEvent.Value = <any>indexes; // TODO: fix\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Handle the Checkbox \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n * @param rowId Row Id, if applicable\r\n */\r\n onCheckChanged(event: Event, idx: string, rowId: number) {\r\n if (typeof rowId === 'undefined')\r\n rowId = 0;\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, rowId);\r\n\r\n if (typeof (event) == 'boolean') {\r\n guiEvent.Value = event;\r\n }\r\n else if(typeof (event) == 'string') {\r\n if(event == \"unchecked\")\r\n { // @ts-ignore\r\n guiEvent.Value = false;\r\n }\r\n else if( event == 'indeterminate')\r\n guiEvent.Value = null;\r\n else if(event == 'checked')\r\n { // @ts-ignore\r\n guiEvent.Value = true;\r\n }\r\n }\r\n else {\r\n if (typeof event.target === 'undefined')\r\n guiEvent.Value = (<any>(event)).checked;\r\n else\r\n guiEvent.Value = (<any>(event.target)).checked;\r\n }\r\n\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Handle tab selection change, caused by UI events\r\n * @param idx Id of the control raising the event\r\n * @param layer Id of selected tabpage\r\n */\r\n mgOnTabSelectionChanged(idx: string, layer: number) {\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, 0);\r\n guiEvent.Value = layer.toString();\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n\r\n /**\r\n * Handle the Radio button \"change\" event\r\n * @param event The event received from the UI\r\n * @param idx Id of the control raising the event\r\n */\r\n mgOnRadioSelectionChanged(idx: string) {\r\n let result = this.getFormControl('0', idx);\r\n let guiEvent: IGuiEvent = getGuiEventObj('selectionchanged', idx, 0);\r\n if(typeof result.value !== 'number')\r\n guiEvent.Value = result.value.index;\r\n else\r\n guiEvent.Value = result.value.toString();\r\n this.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * Inserts the \"close\" event to the magic WebClient event queue\r\n */\r\n close() {\r\n this.insertEvent(getGuiEventObj('close', null, 0));\r\n }\r\n\r\n\r\n ///////////////////////////////\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n IsStub(): boolean {\r\n return this.magic.isStub;\r\n\r\n }\r\n\r\n //////////////////////////////////////////////////////////////\r\n ///Stub handling\r\n /**\r\n * @ignore\r\n */\r\n jsonData: string;\r\n\r\n /**\r\n * @ignore\r\n */\r\n saveData(data: string) {\r\n this.magic.saveData(data);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n public createData() {\r\n let myData = {\r\n records: this.Records,\r\n template: this.template\r\n };\r\n let text: string = 'loadData():any {\\n' +\r\n ' let stubData = ' + JSON.stringify(myData) + ';\\n' +\r\n ' this.loadStubData(stubData);}';\r\n console.log(text);\r\n this.saveData(text);\r\n\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n public loadStubData(stubData: any) {\r\n\r\n this.Records = stubData.records;\r\n this.settemplate(stubData.template);\r\n this.taskId = '1';\r\n for (let i = 0; i < this.Records.list.length; i++)\r\n this.buildTableRowControls(i);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n public loadData() {\r\n alert('Please, overwrite method loadData');\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n setStubValue(guiRowId: number, fc: FormControl, name: string) {\r\n if (this.IsStub()) {\r\n try {\r\n let val = this.Records.list[guiRowId].values[name];\r\n fc.setValue(val);\r\n } catch (e) {\r\n }\r\n }\r\n }\r\n\r\n // End of stub handlin\r\n /////////////////////////////////////////////////////////////////\r\n}\r\n\r\n","import { Injectable } from '@angular/core';\nimport { TaskMagicService } from \"./task.magics.service\";\nimport { ComponentListMagicService } from \"./component-list.magic.service\";\n\n/**\n * Implements various table-related functionalities\n */\n@Injectable()\nexport class TableMagicService {\n\n selectedItem : any;\n private chunkSize: number;\n\n /**\n *\n * @param componentList Component-mapping service\n * @param task Magic task service\n */\n constructor( protected componentList: ComponentListMagicService, protected task: TaskMagicService) {\n }\n\n public shouldOpenFieldTextEditor: boolean = true;\n\n /**\n * Refreshes the DataSource\n */\n refreshDataSource(): void {\n }\n\n /**\n * Returns the table page size\n * chunkSize as default value for non-paginated tables.\n */\n getPageSize(): number {\n return this.chunkSize;\n }\n\n setChunkSize(size: number): void{\n this.chunkSize = size;\n }\n\n /**\n * Returns max no of rows in the table.\n */\n getMaxRowsInTable(): number{\n return this.task.Records.list.length;\n }\n\n /**\n * Selects the specified row\n * @param rowId The row to select\n */\n selectRow(rowId: string): void {\n this.selectedItem = rowId;\n }\n\n getSelectedRow() : any{\n return this.selectedItem;\n }\n\n /**\n * Returns the selected row\n */\n selectedRow(): any {\n return null;\n }\n\n /**\n * Selects the specified page\n * @param pageId The page to select\n */\n selectPage(pageId: number): void {\n }\n\n /**\n * Returns whether a dialog should be opened for the HTML element\n * @param element The HTML element for which a dialog may be needed\n * @returns\n */\n OpenDialogForControl(element: HTMLElement): boolean\n {\n if (element.tagName === \"MAT-SELECT\" || element.tagName === \"MAT-CHECKBOX\" ||\n element.tagName === \"INPUT\" ||\n element.tagName === \"SELECT\")\n return false;\n return true;\n }\n\n /**\n * Returns the dialog used to edit values\n */\n getDialog(): any {\n return null;\n }\n\n /**\n * Handles the table \"scrolled\" event\n */\n onScrollDown() {\n this.task.onScrollDown();\n }\n\n /**\n * To be overwitten in specific implelemtations\n */\n sortData(e){}\n\n /**\n * To be overwitten in specific implelemtations\n */\n mgOnPaginateChange(e, changeSelectedRow?: boolean){}\n\n mgOptionChanged(e) { }\n\n /**\n * Change the number of lines in a table\n * @param size New number of lines in table\n */\n updateTableSize(size: number) {\n if (size === 0) // never remove row 0 for now\n {\n size = 1;\n this.task.Records.clearFirstTableRecord(this.task.template);\n }\n\n this.task.formGroups.length = size;\n this.task.Records.updateSize(size);\n this.task.setIncludesFirst(false);\n }\n\n /**\n * @ignore\n */\n setTableTopIndex(value: number) {\n if (!this.task.Records.includesFirst)\n value++;\n\n this.task.Records.setGuiTopIndex(value);\n }\n\n /**\n * @ignore\n */\n getTableTopIndex():number\n {\n let topIndex: number = this.task.Records.getGuiTopIndex();\n\n if (!this.task.Records.includesFirst)\n topIndex--;\n\n return topIndex;\n }\n}\n\n","import { Injectable } from '@angular/core';\r\nimport {Title} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Enables changing the browser title using Magic expression (SetTitle)\r\n */\r\n@Injectable()\r\nexport class TitleMagicService {\r\n /**\r\n *\r\n * @param titleService Angular's title-changing class\r\n */\r\n constructor(protected titleService: Title) {\r\n }\r\n\r\n /**\r\n * Set the new title of the window\r\n * @param newTitle New title of the window\r\n */\r\n setTitle(newTitle: string) {\r\n this.titleService.setTitle( newTitle );\r\n }\r\n\r\n}\r\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n\nexport let COLOR_FILE_NAME = new InjectionToken<string>('colorFile', {\n providedIn: 'root',\n factory: () => 'clr_rnt.eng'\n});\nexport const MAGIC_FG_COLOR: number = 1;\nexport const MAGIC_BG_COLOR: number = 2;\n\n\nconst SYSTEM_FG: number = 2;\nconst SYSTEM_BG: number = 4;\nconst SYSTEM_FG_AND_SYSTEM_BG = 6 ;\nconst TRANSPERENT_BG: number = 1;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MagicColorService {\n public colorFileName = 'clr_rnt.eng';\n\n public getColorFilePath() {\n return 'assets/' + this.colorFileName;\n }\n\n private colorsData;\n private fileNotFound = false;\n\n // public static FILE_NAME;\n constructor(private http: HttpClient, @Inject(COLOR_FILE_NAME) colorFile1: string = 'clr_rnt.eng') {\n if (colorFile1)\n this.colorFileName = colorFile1;\n else\n this.colorFileName = 'clr_rnt.eng';\n }\n\n private getColorData() {\n\n if (!this.colorsData) {\n this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {\n this.colorsData = resp.replace(/\\n/g, '@').split('@');\n },\n error1 => {\n console.error('File not found ' + this.colorFileName);\n this.fileNotFound = true;\n });\n\n }\n\n }\n\n private hexToRgba(hex: any, isTransperent: boolean): any {\n let shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n // convert it to format : aarrggbb\n hex = hex.replace(shorthandRegex, function(m: any, r: any, g: any, b: any, a: any) {\n return a + a + r + r + g + g + b + b;\n });\n\n let result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n\n let rgb = {\n 'red': parseInt(result![4], 16),\n 'green': parseInt(result![3], 16),\n 'blue': parseInt(result![2], 16),\n 'alpha': (255 - parseInt(result![1], 16)) / 255\n };\n if (isTransperent)\n rgb.alpha = 0;\n\n return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + rgb.alpha + ')';\n }\n\n /**\n * Returns the rgba value of specified color\n * @returns : value in format rgba(128,128,128,1)\n * @param : colorNumber -0 based index of color for which RGBA values are returned\n * @param: colorType : 1-MAGIC_FG_COLOR, 2-MAGIC_BG_COLOR\n */\n public getColor(colorIndex: number, colorType: number) {\n let isTransperent = false;\n if (!this.colorsData && !this.fileNotFound)\n this.getColorData();\n if (this.colorsData) { // color exists\n if (this.colorsData[colorIndex - 1]) {\n\n const grayHashCode = '00808080';\n let hex = grayHashCode;\n let color: string[] = this.colorsData[colorIndex - 1].split(','); // get the color details\n let colorAtrributes = +color[3];\n\n // color[0] - name, color[1] - FG color, color[2] - BG color\n // color[3] - attr flags (1 - transperent, 2 - system FG, 4 - system bg)\n\n\n switch (colorType) {\n case MAGIC_FG_COLOR:\n if (colorAtrributes != SYSTEM_FG && colorAtrributes !=SYSTEM_FG_AND_SYSTEM_BG)\n hex = (color[1]);\n break;\n case MAGIC_BG_COLOR:\n if (colorAtrributes != SYSTEM_BG && colorAtrributes !=SYSTEM_FG_AND_SYSTEM_BG) {\n if (colorAtrributes == TRANSPERENT_BG)\n isTransperent = true;\n hex = (color[2]);\n }\n break;\n default:\n console.log('Please enter valid color type : 1-FG, 2-BG ' + colorIndex);\n return '';\n }\n\n return this.hexToRgba('#' + hex, isTransperent);\n } else\n console.log('Could not get color for number ' + colorIndex);\n }\n\n return '';\n }\n}\n","import { Injectable } from '@angular/core';\r\nimport { TaskMagicService } from './task.magics.service';\r\nimport { ControlMetadata, ControlsMetadata } from '../controls.metadata.model';\r\nimport { CustomValidator, GuiEnvironment, HtmlProperties, PIC } from '@magic-xpa/gui';\r\nimport { isNullOrUndefined , StringBuilder} from '@magic-xpa/mscorelib';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { getGuiEventObj, IGuiEvent, CookieService} from '@magic-xpa/engine';\r\nimport { Logger, PICInterface, StorageAttribute } from '@magic-xpa/utils';\r\nimport { MagicColorService } from './magic-color.service';\r\nimport { MaskitoOptions } from \"@maskito/core\";\r\nimport { maskitoTimeOptionsGenerator } from \"@maskito/kit\";\r\n/**\r\n * Provides the UI with values calculated by the Magic WebClient\r\n */\r\n@Injectable()\r\nexport class AccessorMagicService {\r\n Logger: any = null;\r\n\r\n public readonly hhmm: MaskitoOptions = maskitoTimeOptionsGenerator({mode: 'HH:MM'});\r\n public readonly hhmmss: MaskitoOptions = maskitoTimeOptionsGenerator({mode: 'HH:MM:SS'});\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(protected task: TaskMagicService,protected magicColor: MagicColorService) {\r\n this.Logger = Logger.Instance;\r\n }\r\n\r\n /**\r\n * Checks if the control is read-only\r\n * @param controlId Id of control\r\n * @returns Is the control not read-only\r\n */\r\n // CheckReadOnly\r\n checkIsReadOnly(controlId: string): boolean {\r\n let properties: ControlMetadata;\r\n properties = this.task.Records.list[0].getControlMetadata(controlId);\r\n if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns the text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns The text of the control\r\n */\r\n // mgGetText\r\n getText(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.Text, rowId);\r\n }\r\n /**\r\n * Gets the text of the tab page\r\n * @param controlId Id of control\r\n * @param layer Id of tabpage\r\n * @returns Text of tabpage\r\n */\r\n // mgGetTabpageText\r\n getTabpageText(controlId: string, layer: number): string {\r\n const items = this.task.getProperty(controlId, HtmlProperties.ItemsList);\r\n if (typeof items !== \"undefined\")\r\n return items[layer].displayValue;\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Gets the image defined for the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns Image set on control\r\n */\r\n // mgGetImage\r\n getImage(controlId: string, rowId?: string): string {\r\n let result = this.task.getProperty(controlId, HtmlProperties.Image, rowId);\r\n return result;\r\n\r\n }\r\n\r\n /**\r\n * Returns whether an image is set for this control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns returns true if control has an image set on it\r\n */\r\n // mgIsImageExists\r\n isImageExists(controlId: string, rowId?: string): boolean {\r\n let result = this.task.getProperty(controlId, HtmlProperties.Image, rowId);\r\n return !isNullOrUndefined(result);\r\n\r\n }\r\n\r\n /**\r\n * Gets the CSS classes set on the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns The classes for this control\r\n */\r\n // mgGetClasses\r\n getClasses(controlId: string, rowId?: string) :string {\r\n return this.task.getClasses(controlId, rowId);\r\n }\r\n\r\n /**\r\n * Gets the CSS styles set on the control\r\n * @param controlId Id of control\r\n * @param styleName NAme of style requested\r\n * @param rowId Id of row, if applicable\r\n * @returns The style set on the control\r\n */\r\n // mgGetStyle\r\n getStyle(controlId: string, styleName: string, rowId?: string): string {\r\n let style = this.task.getStyle(controlId, styleName, rowId)\r\n return style;\r\n }\r\n\r\n /**\r\n * Returns whether a control is visible or not\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns Is the control visible or hidden\r\n */\r\n // mgGetVisible\r\n getVisible(controlId: string, rowId?: string) : string {\r\n let vis: Boolean = this.getProperty(controlId, HtmlProperties.Visible, rowId);\r\n return vis ? 'visible' : 'hidden';\r\n }\r\n\r\n /**\r\n * Returns alpha mask of a control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns alpha mask of the control\r\n */\r\n // getAlphaMask\r\n getAlphaMask(controlId: string, rowId?: string):string{\r\n if (isNullOrUndefined(controlId))\r\n return null;\r\n let pic: PIC = this.task.GetControlPictureMask(controlId);\r\n let mask: string = pic.getMask();\r\n let valueStr: StringBuilder = new StringBuilder();\r\n\r\n for (let i: number = 0; i < mask.length; i++) {\r\n switch (mask.charCodeAt(i)) {\r\n case PICInterface.PIC_N:\r\n valueStr.Append(\"0\");\r\n break;\r\n case PICInterface.PIC_U:\r\n case PICInterface.PIC_L:\r\n case PICInterface.PIC_X:\r\n valueStr.Append(\"A\");\r\n break;\r\n\r\n default:\r\n valueStr.Append(mask.charAt(i));\r\n break;\r\n }\r\n }\r\n\r\n return (pic != null) ? valueStr.toString() : null;\r\n }\r\n /**\r\n * Returns object representing numeric picture\r\n * @param picture string which is defined in magic\r\n * @returns object representing numeric picture\r\n */\r\n // mgGetNumericPicture\r\n getNumericPicture(picture: string) : any {\r\n var obj = {};\r\n if (isNullOrUndefined(picture))\r\n return obj;\r\n\r\n let pic: PIC = new PIC(picture, StorageAttribute.NUMERIC, 0);\r\n\r\n\r\n\r\n obj['prefix'] = \"\"\r\n if (pic.getPosPref_().length > 0 && pic.getNegPref_().length > 0) {\r\n let pref = '-'+pic.getPosPref_();\r\n if (pref == pic.getNegPref_())\r\n obj['prefix'] = pic.getPosPref_();\r\n }\r\n if(pic.getPosSuff_().length > 0)\r\n obj['suffix'] = pic.getPosSuff_();\r\n else\r\n obj['suffix'] = \"\";\r\n\r\n if(pic.isNegative())\r\n obj['allowNegative'] = true;\r\n else\r\n obj['allowNegative'] = false;\r\n if(pic.getDec()>= 0)\r\n obj['precision'] = pic.getDec();\r\n\r\n if(pic.isLeft())\r\n obj['align']=\"left\";\r\n\r\n obj['decimal'] = GuiEnvironment.Environment.GetDecimal();\r\n if(pic.withComa())\r\n obj['thousands']=GuiEnvironment.Environment.GetThousands();\r\n else\r\n obj['thousands']=\"\";\r\n\r\n if(pic.getWholes())\r\n obj['wholes']=pic.getWholes();\r\n\r\n return obj;\r\n }\r\n\r\n /**\r\n * Returns whether a control should have the \"required\" attribute set on it\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetMustInput\r\n getMustInput(controlId: string, rowId?: string) : string {\r\n let vis: Boolean = this.getProperty(controlId, HtmlProperties.MustInput, rowId);\r\n return vis ? 'true' : 'false';\r\n }\r\n\r\n /**\r\n * Returns whether a control is disabled\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgIsDisabled\r\n isDisabled(controlId: string, rowId?: string): any{\r\n let result = this.getProperty(controlId, HtmlProperties.Enabled, rowId);\r\n return result === true ? null : true;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // getProperty (not changed)\r\n getProperty(controlId: string, prop: HtmlProperties, rowId?: string) {\r\n return this.task.getProperty(controlId, prop, rowId);\r\n }\r\n\r\n /**\r\n * Returns the title (tooltip) text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetTitle\r\n getTitle(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.Tooltip, rowId);\r\n }\r\n\r\n /**\r\n * Returns the title (tooltip) text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetTitle for zoom button\r\n getZoomButtonTitle(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.ZoomButtonTooltip, rowId);\r\n }\r\n\r\n /**\r\n * Gets the selection control's selected value\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // getSelectedValue\r\n getSelectedValue(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.SelectedValue, rowId);\r\n }\r\n\r\n /**\r\n * Gets the place-holder text of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetPlaceholder\r\n getPlaceholder(controlId: string, rowId?: string): string {\r\n return this.task.getProperty(controlId, HtmlProperties.PlaceHolder, rowId);\r\n }\r\n\r\n /**\r\n * Returns a type for input controls - should the control be a simple text or a password control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetType\r\n getType(controlId: string, rowId?: string): string {\r\n let result = this.task.getProperty(controlId, HtmlProperties.Password, rowId);\r\n return result ? \"password\" : \"text\"\r\n }\r\n\r\n /**\r\n * Returns the tab-index of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetTabIndex\r\n getTabIndex(controlId: string, rowId?: string): number {\r\n return this.task.getProperty(controlId, HtmlProperties.TabIndex, rowId);\r\n }\r\n\r\n /**\r\n * Returns the value of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n /// mgGetValue -->\r\n getValue(controlId: string, rowId?: string): any {\r\n let val = this.task.getValue(controlId, rowId);\r\n return val;\r\n }\r\n\r\n /**\r\n * Returns the formatted value of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n /// mgGetValue -->\r\n getFormattedValue(controlId: string, rowId?: string): string {\r\n let val = this.task.getValue(controlId, rowId);\r\n val = this.task.getFormattedValue(controlId, val, rowId);\r\n return val;\r\n }\r\n\r\n /**\r\n * Returns the Picture of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n /// getPicture -->\r\n getPicture(controlId: string, rowId?: string): string {\r\n\r\n if (isNullOrUndefined(controlId))\r\n return null;\r\n let pic: PIC = this.task.GetControlPictureMask(controlId);\r\n return (pic != null) ? pic.getFormat().toString() : null;\r\n\r\n }\r\n\r\n /**\r\n * Returns the custom (user) properties of the control\r\n * @param controlId Id of control\r\n * @param propertyName Name of requested property\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetCustomProperty\r\n getCustomProperty(controlId: string, propertyNameOrRowID?: string, rowId?: string) : any\r\n {\r\n if(controlId.indexOf('~')== -1)\r\n return this.getCustomProperty_1(controlId, propertyNameOrRowID, rowId);\r\n else {\r\n let cid: string = controlId.split('~')[0];\r\n let propName: string = controlId.split('~')[1];\r\n\r\n return this.getCustomProperty_1(cid, propName, propertyNameOrRowID);\r\n }\r\n }\r\n\r\n getCustomProperty_1(controlId: string, propertyName: string, rowId?: string)\r\n {\r\n let userProperties;\r\n if (isNullOrUndefined(rowId))\r\n rowId = '0';\r\n let rec = this.task.Records.list[rowId];\r\n if (isNullOrUndefined(rec))\r\n debugger;\r\n else {\r\n const controlMetadata = rec.getControlMetadata(controlId);\r\n\r\n if (controlMetadata.userProperties.has(propertyName)) {\r\n userProperties = controlMetadata.userProperties.get(propertyName);\r\n }\r\n }\r\n return userProperties;\r\n }\r\n\r\n /**\r\n * Gets the values of the items of a selection control\r\n * @param id Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n // mgGetItemListValues\r\n getItemListValues(id: string, rowId?: string) : Array<{index: number, displayValue: string}> {\r\n return this.getProperty(id, HtmlProperties.ItemsList, rowId);\r\n }\r\n\r\n /**\r\n * Gets the filtered items list based on the current value of the control\r\n * @param controlId Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n getFilteredList(controlId: string, rowId?: string): Array<{index: number, displayValue: string}> {\r\n if (isNullOrUndefined(rowId))\r\n rowId = '0';\r\n\r\n let items = this.getItemListValues(controlId, rowId);\r\n let value: string = this.task.getFormControl(rowId, controlId).value;\r\n if (value !== null && value !== \"\" && items instanceof Array) {\r\n value = value.toLowerCase();\r\n return items.filter(option => option.displayValue.toLowerCase().includes(value));\r\n }\r\n else\r\n return items;\r\n }\r\n\r\n /**\r\n * Gets the display value of the item from items of a selection control\r\n * @param id Id of control\r\n * @param rowId Id of row, if applicable\r\n * @returns\r\n */\r\n getDisplayValue(id, rowId?) {\r\n let displayValue:string =\"\"\r\n\r\n let o = this.getProperty(id, HtmlProperties.ItemsList, rowId);\r\n let value = this.task.getValue(id, rowId)\r\n if (value >=0 && value <o.length && !isNullOrUndefined(o[value]))\r\n displayValue = o[value].displayValue;\r\n return displayValue\r\n }\r\n\r\n /**\r\n * Returns whether a tab page is selected or not\r\n * @param index of current option in iterarotr\r\n * @param control Id of list control\r\n * @returns\r\n */ // isOptionSelected\r\n isOptionSelected(index, controlId) {\r\n let val = this.task.getValue(controlId, \"0\");\r\n for (let item of val) {\r\n if (item === index)\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns whether a tab page is selected or not - used for the tab buttons\r\n * @param controlId Id of control\r\n * @param layer Id of the tab page\r\n * @returns\r\n */ // mgIsTabPageSelected\r\n isTabPageSelected(controlId: string, layer: number): boolean {\r\n let val = this.task.getProperty(controlId, HtmlProperties.SelectedValue);\r\n return val == (layer - 1); // comparing string to number!\r\n }\r\n\r\n /**\r\n * Returns whether a tab page layer is selected or not - used for the div which represents the tab page\r\n * @param controlId Id of control\r\n * @param layer Id of the tab page\r\n * @returns\r\n */ // mgIsTabLayerSelected\r\n isTabPageLayerSelected(controlId: string, layer: number): boolean {\r\n let val = this.task.getProperty(controlId, HtmlProperties.SelectedLayer);\r\n return val == (layer - 1); // comparing string to number!\r\n }\r\n\r\n /**\r\n * Returns the index of the selected tab page\r\n * @param controlId Id of control\r\n * @returns\r\n */\r\n getTabSelectedIndex(controlId: string) {\r\n let val = this.task.getProperty(controlId, HtmlProperties.SelectedValue);\r\n return val; // comparing string to number!\r\n }\r\n\r\n\r\n // private methodes\r\n /**\r\n * @ignore\r\n */\r\n // mgIfRowCreated\r\n ifRowCreated(row): boolean {\r\n if (row == null)\r\n return false;\r\n let rowId = typeof row == \"number\" ? row.toString() : row.rowId;\r\n let result = this.getFormGroupByRow(rowId);\r\n return !isNullOrUndefined(result);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // mgGetFormGroupByRow\r\n getFormGroupByRow(id: string): FormGroup {\r\n return this.task.formGroups[id];\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // isRowSelected (not changed)\r\n isRowSelected(controlId, rowId?) {\r\n const selectedRow = this.task.getProperty(controlId, HtmlProperties.SelectedRow, \"0\");\r\n return selectedRow == rowId;\r\n }\r\n\r\n /**\r\n * Returns whether a row is in edit state\r\n * @param row\r\n */\r\n isRowInRowEditing(row?: any): boolean {\r\n let guiRowId : string = '0';\r\n guiRowId= typeof row == \"number\" ? row.toString() : row.rowId;\r\n return this.task.isRowInRowEditing(guiRowId)\r\n }\r\n\r\n /**\r\n * Returns whether a row is in edit state, use this method while control outside table control\r\n * @param row\r\n */\r\n isCurrentInRowEditing(): boolean {\r\n\r\n let row = this.task.tableService.getSelectedRow();\r\n\r\n return this.task.isRowInRowEditing(row)\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // GetGuiTopIndex\r\n guiTopIndex(): number {\r\n return this.task.tableService.getTableTopIndex();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getErrMsg(id: string,rowId: string): string\r\n {\r\n let c = this.task.getFormControl(rowId, id);\r\n if (c.hasError('required'))\r\n return 'Control must be updated.';\r\n if (c.hasError('pattern')){\r\n //To check whether the numeric field allowed only positive values or not.\r\n if(c.errors.pattern.actualValue < 0 && !c.errors.pattern.requiredPattern.includes('-'))\r\n return 'Value must be non-negative';\r\n if(c.errors.pattern.requiredPattern.includes('.')){\r\n const numericFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[0];\r\n const decimalFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[1];\r\n const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\\d+)/)[1];\r\n const actualDecimalLimit = c.errors.pattern.requiredPattern.match(/(?:[^,]+,){2}(\\d+)/)[1];\r\n if(numericFormat.length > actualNumericLimit || decimalFormat.length > actualDecimalLimit){\r\n return \"Numeric format is limited to \" + actualNumericLimit + \".\"+ actualDecimalLimit + \" digits\"\r\n }\r\n }else if(!c.errors.pattern.requiredPattern.includes('.') && !Number.isInteger(c.errors.pattern.actualValue)){\r\n const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\\d+)/)[1];\r\n return \"Numeric format is limited to \" + actualNumericLimit + \".\"+ 0 + \" digits\"\r\n }else{\r\n const numericFormat = Math.abs(c.errors.pattern.actualValue).toString();\r\n const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\\d+)/)[1];\r\n if(numericFormat.length > actualNumericLimit){\r\n return \"Numeric format is limited to \" + actualNumericLimit + \".\"+ 0 + \" digits\"\r\n }\r\n }\r\n }\r\n if (c.hasError('rangevalidator'))\r\n return c.errors.rangevalidator.errorMsg;\r\n if (c.hasError('maxlength'))\r\n return 'Max length allowed is : ' + c.errors.maxlength.requiredLength;\r\n if (c.hasError('max'))\r\n return 'Max value allowed is : ' + c.errors.max.max;\r\n\r\n let controlMetadata = this.task.Records.list[rowId].getControlMetadata(id);\r\n for (let key of controlMetadata.customValidators.keys())\r\n {\r\n if (c.hasError(key)) {\r\n let customValidator: CustomValidator = controlMetadata.customValidators.get(key);\r\n return customValidator.getErrMessage();\r\n }\r\n }\r\n\r\n return 'unknown error';\r\n }\r\n\r\n /**\r\n * Sets a user-supplied value to the specified control\r\n * @param controlName\r\n * @param value\r\n * @param refreshDisplay\r\n */\r\n setValueToControl(controlName: string, value: any, refreshDisplay?: boolean){\r\n if(typeof refreshDisplay === \"undefined\")\r\n refreshDisplay = true;\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"setexternalvalue\", controlName, 0);\r\n guiEvent.externalValue = value;\r\n guiEvent.param = refreshDisplay;\r\n this.task.insertEvent(guiEvent);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n isDataviewEmpty() : boolean {\r\n return this.task.Records.isEmptyDataView;\r\n }\r\n\r\n /**\r\n * simulates a click event on the specified control, for the Magic engine\r\n * @param controlName\r\n * @param rowId\r\n */\r\n simulateClick(controlName: string, rowId?: number){\r\n if (typeof rowId === \"undefined\")\r\n rowId = 0;\r\n this.task.insertEvent(getGuiEventObj('click', controlName, rowId));\r\n }\r\n\r\n /**\r\n * Return Boolean TRUE if user logged in Else it will return FALSE\r\n */\r\n isLoggedIn(): boolean {\r\n return this.task.getIsLoggenIn();\r\n }\r\n\r\n /**\r\n * Returns JS object containing the records with all table fields.\r\n */\r\n GetFormRecords(): any {\r\n let rowId: number = 0;\r\n let recArray: any;\r\n\r\n if (!isNullOrUndefined(this.task.Records) && this.task.Records.list.length > 0 ) {\r\n let recList: ControlsMetadata[] = this.task.Records.list;\r\n let tableControls: string[] = new Array();\r\n\r\n //Generate list of table fields names\r\n for (const key in this.task.template) {\r\n if (this.task.template[key] == '1')\r\n tableControls.push(key);\r\n }\r\n\r\n recArray = new Array();\r\n\r\n //Update the records as list of objects with values for table fields.\r\n if (tableControls.length > 0) {\r\n recList.forEach((ctrlMetaData: ControlsMetadata) => {\r\n if (this.task.Records.isRowCreated(rowId)) {\r\n var formRecord = {};\r\n formRecord['rowId'] = rowId;\r\n tableControls.forEach((ctrlId: string) => {\r\n formRecord[ctrlId] = ctrlMetaData.values[ctrlId];\r\n });\r\n\r\n recArray.push(formRecord)\r\n }\r\n });\r\n }\r\n }\r\n\r\n return recArray;\r\n }\r\n\r\n /**\r\n * SetCookie : set the cookie with specified name and value in browser\r\n * expires - expiration time\r\n * path - path which much exists in order so that cookie is sent as header\r\n * domain - specifies which hosts are allowed to receive the cookie\r\n * secure - specifies if cookie is secure ( works only with HTTPS)\r\n * sameSite - lets servers specify whether/when cookies are sent with cross-site requests\r\n */\r\n SetCookie(name: string, value: any, expires?: Date, path? , domain? , secure?, sameSite ?) {\r\n CookieService.setCookie(name, value, expires, path, domain, secure, sameSite);\r\n }\r\n\r\n /**\r\n * GetCookie : get the cookie with specified name and value in browser\r\n */\r\n GetCookie(name: string): any {\r\n return CookieService.getCookie(name);\r\n }\r\n\r\n /**\r\n * DeleteCookie : deletes the cookie\r\n */\r\n DeleteCookie(name: string): any {\r\n return CookieService.deleteCookie(name);\r\n }\r\n\r\n /**\r\n * get RGBA color from color file\r\n */\r\n public getColor(colorNumber: number, colorType) {\r\n return this.magicColor.getColor(colorNumber, colorType);\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\nimport { SubformMagicService } from \"./subform.magic.service\";\r\nimport { TableMagicService } from \"./table.magic.service\";\r\nimport { TaskMagicService } from \"./task.magics.service\";\r\nimport { TitleMagicService } from \"./title.magic.service\";\r\nimport { AccessorMagicService } from \"./accessor.magic.service\";\r\n\r\n\r\n/**\r\n * Central place for adding the Magic services\r\n */\r\n@Injectable()\r\nexport class MagicServices{\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n public task: TaskMagicService,\r\n public subformService: SubformMagicService,\r\n public tableService: TableMagicService,\r\n public titleService: TitleMagicService,\r\n public mgAccessorService: AccessorMagicService,\r\n ) {\r\n\r\n task.tableService = tableService;\r\n task.mgSubformService = subformService;\r\n task.mgTitleService = titleService;\r\n task.mgAccessorService = mgAccessorService;\r\n }\r\n\r\n\r\n}\r\n","import {AfterViewInit, ChangeDetectorRef, Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {FormGroup} from '@angular/forms';\r\nimport { MagicProperties} from \"@magic-xpa/utils\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\n\r\nimport {TaskMagicService} from \"../services/task.magics.service\";\r\nimport { SubformMagicService } from \"../services/subform.magic.service\";\r\nimport { TableMagicService } from \"../services/table.magic.service\";\r\nimport { MagicServices } from \"../services/magic.services\";\r\nimport { AccessorMagicService } from \"../services/accessor.magic.service\";\r\n\r\n/**\r\n * Base component representing a Magic task\r\n */\r\n@Component({\r\n selector: 'task-magic',\r\n providers: [TaskMagicService, SubformMagicService, TableMagicService],\r\n template: ''\r\n})\r\nexport class TaskBaseMagicComponent implements OnInit, OnDestroy, AfterViewInit {\r\n\r\n /**\r\n * Id of task, used for initializing the task service\r\n */\r\n @Input() taskIdParam: string;\r\n /**\r\n * @ignore\r\n */\r\n @Input() taskDescription: string;\r\n\r\n /**\r\n * @ignore\r\n */\r\n magicProperties = MagicProperties;\r\n\r\n /**\r\n *\r\n * @param ref changes-detector object\r\n * @param magicServices Access point for all Magic services\r\n */\r\n constructor(protected ref: ChangeDetectorRef,\r\n public magicServices: MagicServices\r\n ) { }\r\n\r\n /**\r\n * Returns the Magic task service\r\n * @returns\r\n */\r\n get task(): TaskMagicService {\r\n return this.magicServices.task;\r\n }\r\n\r\n /**\r\n * Returns the Magic subform service\r\n * @returns\r\n */\r\n get mgSub(): SubformMagicService {\r\n return this.magicServices.subformService;\r\n }\r\n\r\n /**\r\n * Returns the Magic table service\r\n * @returns\r\n */\r\n get tableService(): TableMagicService {\r\n return this.magicServices.tableService;\r\n }\r\n\r\n /**\r\n * Returns the Magic accessor service\r\n * @returns\r\n */\r\n get mg(): AccessorMagicService {\r\n return this.magicServices.mgAccessorService;\r\n }\r\n\r\n\r\n /**\r\n * Returns the task Id\r\n * @returns\r\n */\r\n get taskId() {\r\n return this.task.taskId;\r\n }\r\n\r\n /**\r\n * Returns the FormGroup for screen-mode forms\r\n * @returns\r\n */\r\n get screenFormGroup(): FormGroup {\r\n return this.task.ScreenModeControls;\r\n }\r\n\r\n /**\r\n * Interface implementation\r\n */\r\n ngOnInit() {\r\n\r\n this.task.detectChanges.pipe().subscribe(c => {\r\n this.ref.detectChanges();\r\n });\r\n this.task.initTask(this.taskIdParam, this.taskDescription);\r\n\r\n this.createFormControlsAccessor(this.screenFormGroup);\r\n this.setInputDateFormat();\r\n\r\n // subcribe to custom property changes\r\n this.task.customPropertiesSubject.pipe().subscribe(property => {\r\n this.PropertyChanged(property.propertyName, property.rowId, property.value);\r\n });\r\n\r\n // subcribe to records count changes\r\n this.task.recordsCountChangeSubject.pipe().subscribe(value => {\r\n this.RecordsCountChanged(value);\r\n });\r\n\r\n // subcribe to mgLoad change\r\n this.task.mgLoadSubject.pipe().subscribe(value =>{\r\n this.mgOnLoad();\r\n });\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n createFormControlsAccessor(formGroup: FormGroup) {}\r\n\r\n /**\r\n * @ignore\r\n */\r\n setInputDateFormat () {}\r\n\r\n /**\r\n * This method is called when the value of any custom property is updated in Magic\r\n * propertyName : name of property which is updated. The format is <controlname>~<propertyname>\r\n * rowId : row number of the updated property for controls in table control (0 for controls outside table)\r\n * value : updated value of the property\r\n * @returns : void\r\n * To use the method override it in your component and check the property name and write you code ..for eg\r\n * if(propertyName == 'controlname~propertyName') {// your code}\r\n * else { // your code}\r\n */\r\n PropertyChanged(propertyName:string, rowId : number, value : any) : void {\r\n // intentionally left blank because the implementation should be in the derived class\r\n }\r\n\r\n /**\r\n * Records count change subject is subscribed to change in its value. This method will be called\r\n * as the value of records count is received at from server.\r\n * @returns : void\r\n * To use the method override it in your component.\r\n */\r\n RecordsCountChanged(recordsCount : number) : void {\r\n // intentionally left blank because the implementation should be in the derived class\r\n }\r\n\r\n /**\r\n * This method will be called once engine informs UI about loading of first set of data is sent to client\r\n * and client has reached its first idle time.\r\n * @returns : void\r\n * To use the method override it in your component.\r\n */\r\n mgOnLoad() : void {\r\n // intentionally left blank because the implementation should be in the derived class\r\n }\r\n /**\r\n * Interface implementation\r\n */\r\n ngAfterViewInit() {\r\n this.mgSub.init();\r\n }\r\n\r\n ngAfterContentChecked() : void {\r\n if(!isNullOrUndefined(this.tableService.getPageSize()) && this.task.oldPageSize != this.tableService.getPageSize()) {\r\n this.task.resize(this.tableService.getPageSize(), 0);\r\n this.task.oldPageSize = this.tableService.getPageSize();\r\n }\r\n }\r\n\r\n /**\r\n * Interface implementation\r\n */\r\n ngOnDestroy(): void {\r\n this.task.dispose();\r\n }\r\n}\r\n\r\n","\r\nimport { Directive, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\r\nimport {TaskMagicService} from \"../../../services/task.magics.service\";\r\nimport {getGuiEventObj} from \"@magic-xpa/engine\";\r\nimport { filter } from \"rxjs/operators\";\r\nimport { Subscription } from \"rxjs\";\r\nimport {MagicDirective} from \"../../directives/magic.directive\"\r\n\r\n/**\r\n * @ignore\r\n */\r\n @Directive({\r\n selector: '[magicRow]'\r\n })\r\n\r\n\r\nexport class RowMagicDirective implements OnInit, OnDestroy{\r\n @Input('magicRow') rowId: string;\r\n\r\n /**\r\n * The HTML element connected to this directive\r\n */\r\n protected htmlElement: HTMLElement;\r\n\r\n /**\r\n * @ignore\r\n */\r\n private rowChangedSubscriber: Subscription = null;\r\n\r\n constructor(\r\n protected _task : TaskMagicService,\r\n protected element: ElementRef\r\n )\r\n {\r\n this.htmlElement = this.element.nativeElement;\r\n }\r\n\r\n /**\r\n * Initializes this object\r\n */\r\n ngOnInit(): void {\r\n this.rowChangedSubscriber = this._task\r\n .OnSelectedRowChanged.pipe(filter(rowId => rowId === this.rowId))\r\n .subscribe(rowId => {\r\n if (!this.isInView(this.htmlElement))\r\n this.htmlElement.scrollIntoView();\r\n }\r\n );\r\n }\r\n\r\n private isInView(element): boolean {\r\n const rect = element.getBoundingClientRect();\r\n const parentRect = element.parentElement.getBoundingClientRect();\r\n return (\r\n rect.top >= parentRect.top &&\r\n rect.bottom <= parentRect.bottom\r\n );\r\n }\r\n\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy() {\r\n // Don't know why, but when the table is loaded for the first time, we\r\n // get ngOnInit() for the 1st row (rowId = \"0\") and then ngOnDestroy()\r\n // for number of rows in the page but here this.rowId is undefined.\r\n // Since ngOnInit() was not called for all these rows, this.rowChangedSubscriber\r\n // is null and hence crashes.\r\n // So, the condition to check nulity is added.\r\n if (this.rowChangedSubscriber !== null) {\r\n this.rowChangedSubscriber.unsubscribe();\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick($event) {\r\n if(this.rowId != '') {\r\n this._task.insertEvent(getGuiEventObj('click', \"magicRow\", +this.rowId));\r\n if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)\r\n event.cancelBubble = true;\r\n }\r\n }\r\n }\r\n","import { Directive, ElementRef, Input, OnDestroy, OnInit, Optional, Renderer2, ViewContainerRef } from \"@angular/core\";\r\nimport { isNullOrUndefined } from \"@magic-xpa/mscorelib\";\r\n\r\nimport {\r\n CommandType,\r\n GuiCommand,\r\n GuiConstants,\r\n GuiInteractive,\r\n HtmlProperties,\r\n InteractiveCommandType,\r\n Modifiers\r\n} from \"@magic-xpa/gui\";\r\nimport { getGuiEventObj, IGuiEvent } from \"@magic-xpa/engine\";\r\n\r\nimport { TaskBaseMagicComponent } from \"../task-base.magic.component\";\r\nimport { TaskMagicService } from \"../../services/task.magics.service\";\r\nimport { debounceTime, filter, map } from \"rxjs/operators\";\r\nimport { RowMagicDirective } from \"./magic/row.magic.directive\";\r\nimport { Subscription, fromEvent } from \"rxjs\";\r\nimport { BindingLevel, MgControlType, StorageAttributeType } from \"@magic-xpa/utils\";\r\nimport { Platform } from \"@angular/cdk/platform\";\r\n\r\n\r\n/**\r\n * Connects HTML elements to the Magic Web Client engine\r\n */\r\n@Directive({\r\n selector: \"[magic]\"\r\n})\r\n\r\nexport class MagicDirective implements OnInit, OnDestroy {\r\n @Input(\"magic\") set magic(val) {\r\n this.id = val;\r\n this.selector = \"magic\";\r\n };\r\n\r\n /**\r\n * This flag is used when we only want to register to events, but do not want to execute commands sent from server\r\n */\r\n @Input(\"eventsOnly\") set eventsOnly(val) {\r\n console.log(\"eventsOnly\");\r\n this.eventsOnlyVal = true;\r\n\r\n };\r\n\r\n /**\r\n * pollTime: after which value will be sent to magic\r\n */\r\n @Input() public pollTime: number = 200;\r\n\r\n /**\r\n * Row id of the control, for when it is on a table\r\n */\r\n @Input() public rowId: string;\r\n /**\r\n *\r\n */\r\n //@Input() events: any[] = [];\r\n\r\n /**\r\n * The HTML element connected to this directive\r\n */\r\n protected htmlElement: HTMLElement;\r\n /**\r\n * Magic's component handling this control\r\n */\r\n public component: TaskBaseMagicComponent;\r\n /**\r\n * Collection of event handlers for this element\r\n */\r\n private eventHandlers: { [key: string]: () => void; } = {};\r\n /**\r\n * Id of this element\r\n */\r\n public id: string;\r\n /**\r\n * @ignore\r\n */\r\n protected selector: string;\r\n /**\r\n * @ignore\r\n */\r\n subscribeRefreshDom: Subscription;\r\n\r\n private focusUnlistener: (() => void);\r\n\r\n public eventsOnlyVal = false;\r\n\r\n public static opened = false;\r\n\r\n public static noOfAutoCompleteBoxesOpened =0;\r\n\r\n subscribeInteractiveCommands: Subscription;\r\n\r\n /**\r\n *\r\n * @param _task The task service\r\n * @param element The element for which the directive is applied\r\n * @param renderer Renderer for the element\r\n * @param vcRef\r\n * @param platform\r\n * @param magicRow\r\n */\r\n constructor(\r\n protected _task: TaskMagicService,\r\n protected element: ElementRef,\r\n protected renderer: Renderer2,\r\n protected vcRef: ViewContainerRef,\r\n public platform: Platform,\r\n @Optional() protected magicRow: RowMagicDirective) {\r\n\r\n this.htmlElement = this.element.nativeElement;\r\n //let c = (<any>this.vcRef)._view;\r\n //while (!(c instanceof TaskBaseMagicComponent)) {\r\n // c = c.component;\r\n //}\r\n //this.component = c;\r\n if (!(typeof magicRow === \"undefined\" || magicRow === null))\r\n this.rowId = magicRow.rowId;\r\n }\r\n\r\n /**\r\n * Get the task service\r\n * @returns\r\n */\r\n get task(): TaskMagicService {\r\n return this._task;\r\n }\r\n\r\n /**\r\n * Register to the events this element may need to handle\r\n */\r\n protected regEvents() {\r\n // Handle events for which event handler may be removed and restored\r\n this.eventHandlers[\"focusin\"] = this.OnFocus.bind(this);\r\n\r\n Object.keys(this.eventHandlers).forEach((key) => {\r\n this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);\r\n });\r\n\r\n // Handle events with anonymous event handlers\r\n let events: string[] = [\"click\", \"mousedown\", \"dblclick\"];// ,'resize', 'load', 'unload'\r\n events.forEach(event => {\r\n this.renderer.listen(this.htmlElement, event, (e) => {\r\n\r\n // check if the event is fired from zoom button ( to identify the connected zoom button in engine)\r\n let fromButton = false;\r\n if(this.htmlElement instanceof HTMLButtonElement)\r\n fromButton = true;\r\n\r\n /**\r\n * In the case of Safari or Chrome browser on IOS, when a button is clicked, the browser does not receive\r\n * focus event hence the zoom action is not executed. So in order to receive focus event, enabling it exclusively\r\n * in the case of Safari or Chrome browser on IOS and Safari browser on Mac.\r\n */\r\n if (fromButton && (this.platform.IOS || this.platform.SAFARI))\r\n this.task.insertEvent(getGuiEventObj(\"focus\", this.id, +this.rowId));\r\n\r\n this.task.insertEvent(getGuiEventObj(event, this.id, +this.rowId, fromButton));\r\n if (MagicDirective.noOfAutoCompleteBoxesOpened< 1)\r\n e.cancelBubble = true;\r\n });\r\n });\r\n\r\n\r\n this.renderer.listen(this.htmlElement, \"change\", (e) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, +this.rowId);\r\n\r\n if ((<any>(event.target)).selectedIndex !== undefined) {\r\n guiEvent.Value = (<any>(event.target)).selectedIndex.toString();\r\n e.cancelBubble = true;\r\n this.task.insertEvent(guiEvent);\r\n }\r\n\r\n });\r\n\r\n // handle the input event\r\n fromEvent(this.htmlElement, \"input\").pipe(\r\n map((event: any) => {\r\n return event.target.value;\r\n }),\r\n debounceTime(this.pollTime) // time after which value will be sent to magic\r\n ).subscribe((x) => {\r\n if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {\r\n // Don't support character binding for date/time values\r\n let attribute : StorageAttributeType = this.task.Records.list[0].getControlMetadata(this.id).dataType;\r\n if(attribute !== StorageAttributeType.Date && attribute != StorageAttributeType.Time)\r\n this.task.mgAccessorService.setValueToControl(this.id, x, true);\r\n }\r\n });\r\n\r\n this.renderer.listen(this.htmlElement, \"keydown\", (e: KeyboardEvent) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"keydown\", this.id, +this.rowId);\r\n guiEvent.modifiers = Modifiers.MODIFIER_NONE;\r\n\r\n if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)\r\n guiEvent.modifiers = Modifiers.MODIFIER_ALT;\r\n\r\n else if (e.ctrlKey && e.keyCode !== GuiConstants.KEY_CTRL)\r\n guiEvent.modifiers = Modifiers.MODIFIER_CTRL;\r\n\r\n let supportedKey = e.keyCode === GuiConstants.KEY_PG_UP ||\r\n e.keyCode === GuiConstants.KEY_PG_DOWN ||\r\n e.keyCode === GuiConstants.KEY_LEFT ||\r\n e.keyCode === GuiConstants.KEY_RIGHT ||\r\n e.keyCode === GuiConstants.KEY_UP ||\r\n e.keyCode === GuiConstants.KEY_DOWN ||\r\n e.keyCode === GuiConstants.KEY_ESC ||\r\n e.keyCode === GuiConstants.KEY_HOME ||\r\n e.keyCode === GuiConstants.KEY_END ||\r\n e.keyCode === GuiConstants.KEY_RETURN ||\r\n (e.keyCode >= GuiConstants.KEY_F1 && e.keyCode <= GuiConstants.KEY_F12);\r\n\r\n if (guiEvent.modifiers !== Modifiers.MODIFIER_NONE || supportedKey) {\r\n guiEvent.keyCode = e.keyCode;\r\n\r\n // Defect 160021 fixed - don't set e.cancelBubble when combobox is opened and esc key is pressed\r\n if (e.keyCode !== GuiConstants.KEY_ESC || e.keyCode === GuiConstants.KEY_ESC && (!MagicDirective.opened && MagicDirective.noOfAutoCompleteBoxesOpened < 1))\r\n e.cancelBubble = true;\r\n\r\n this.task.insertEvent(guiEvent);\r\n }\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Handle focus event\r\n */\r\n private OnFocus() {\r\n this.task.insertEvent(getGuiEventObj(\"focus\", this.id, +this.rowId));\r\n event.cancelBubble = true;\r\n }\r\n\r\n /**\r\n * Is the command's element the same as this directive's element\r\n * @param command\r\n * @returns true/false\r\n */\r\n public IsSameElement(command) {\r\n let line: number = command.line;\r\n\r\n if (this.task.isTableControl(command.CtrlName))\r\n line = this.task.getGuiRowId(line, true);\r\n\r\n return (command.CtrlName === this.id &&\r\n (line === +this.rowId ||\r\n (line === 0 && isNullOrUndefined(this.rowId))));\r\n }\r\n\r\n /**\r\n * Is the command's element the same as this directive's component\r\n * @param command\r\n * @returns true/false\r\n */\r\n private IsSameComponent(command: GuiInteractive) {\r\n return (command.controlName === this.id);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n private regUpdatesUI() {\r\n this.subscribeRefreshDom = this.task\r\n .refreshDom.pipe(filter(c => this.IsSameElement(c)))\r\n .subscribe(a => {\r\n let command: GuiCommand = a;\r\n if (isNullOrUndefined(this.rowId))\r\n this.rowId = \"0\";\r\n try {\r\n if (!this.eventsOnlyVal)\r\n this.handleCommand(command);\r\n } catch (ex) {\r\n console.dir(ex);\r\n }\r\n }\r\n );\r\n\r\n this.subscribeInteractiveCommands = this.task.interactiveCommands\r\n .pipe(filter(c => this.IsSameComponent(c)))\r\n .subscribe(command => {\r\n this.handleInteractiveCommands(command);\r\n });\r\n }\r\n\r\n /**\r\n * Initializes this object\r\n */\r\n ngOnInit(): void {\r\n this.regEvents();\r\n this.regUpdatesUI();\r\n }\r\n\r\n /**\r\n * Handles the commands received from the Magic WebClient engine\r\n * @param command\r\n */\r\n handleCommand(command: GuiCommand) {\r\n switch (command.CommandType) {\r\n\r\n case CommandType.SET_PROPERTY:\r\n this.handleSetProperty(command);\r\n break;\r\n\r\n case CommandType.SET_FOCUS:\r\n this.focusUnlistener();\r\n // Do not set focus on connected zoom button\r\n if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))\r\n this.htmlElement.focus();\r\n this.focusUnlistener = this.renderer.listen(this.htmlElement, \"focusin\", this.eventHandlers[\"focusin\"]);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * handle the interactive commands like CallJS\r\n */\r\n handleInteractiveCommands(command: GuiInteractive) {\r\n switch (command._commandType) {\r\n case InteractiveCommandType.CALL_JS:\r\n let methodName: string = command._str;\r\n let args: Array<any> = command.arguments;\r\n let magicComponent: TaskBaseMagicComponent = ((<any>this.vcRef)._hostLView).find(v => v instanceof TaskBaseMagicComponent);\r\n let resultString = \"\";\r\n\r\n try {\r\n if (!isNullOrUndefined(magicComponent[methodName])) {\r\n // invoke the method on instance of magic componenet\r\n resultString = magicComponent[methodName].apply(magicComponent, args);\r\n }\r\n else\r\n console.error(\"Instance method \" + methodName + \" does not exists\"); // when method is not found\r\n } catch (e) {\r\n // any other exception\r\n console.error(e.message);\r\n }\r\n command.resultString = resultString; // update the return value\r\n break;\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Handle the Magic set-property command\r\n * @param command\r\n */\r\n handleSetProperty(command: GuiCommand) {\r\n switch (command.Operation) {\r\n case HtmlProperties.ReadOnly: {\r\n if(command.obj.Type == MgControlType.CTRL_TYPE_TEXT)\r\n if (command.obj1 != true)\r\n this.renderer.removeAttribute(this.htmlElement, command.Operation);\r\n else\r\n this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy(): void {\r\n\r\n this.subscribeRefreshDom.unsubscribe();\r\n }\r\n}\r\n","import {Directive, ElementRef, Input, Renderer2, ViewContainerRef, Optional} from '@angular/core';\r\nimport {CommandType, GuiCommand} from \"@magic-xpa/gui\";\r\nimport {IGuiEvent, getGuiEventObj} from \"@magic-xpa/engine\";\r\nimport {ControlMetadata} from \"../../../controls.metadata.model\";\r\nimport {HtmlProperties} from \"@magic-xpa/gui\";\r\nimport {MagicDirective} from \"../magic.directive\";\r\nimport {TaskMagicService} from \"../../../services/task.magics.service\";\r\nimport {StylesMapManager} from \"../../../services/StylesMapManager\";\r\nimport {RowMagicDirective} from \"./row.magic.directive\";\r\nimport {Platform} from \"@angular/cdk/platform\";\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n selector: '[magicnc]'\r\n})\r\n\r\nexport class NoControlMagicDirective extends MagicDirective {\r\n\r\n @Input('magicnc') set magic(val) {this.id = val; this.selector = 'magicnc';};\r\n\r\n constructor(\r\n _task : TaskMagicService,\r\n element : ElementRef,\r\n renderer: Renderer2,\r\n vcRef : ViewContainerRef,\r\n platform: Platform,\r\n @Optional() magicRow: RowMagicDirective) {\r\n super(_task, element, renderer, vcRef, platform, magicRow);\r\n }\r\n\r\n regEvents() {\r\n super.regEvents()\r\n\r\n if (this.htmlElement instanceof HTMLSelectElement) {\r\n this.htmlElement.addEventListener('change', (e) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, 0);\r\n guiEvent.Value = (<any>(event.target)).selectedIndex.toString()\r\n this.task.insertEvent(guiEvent);\r\n });\r\n }\r\n\r\n if (this.isRadio()) {\r\n this.htmlElement.addEventListener('change', (e) => {\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, 0);\r\n guiEvent.Value = (<any>(e.target)).value;\r\n this.task.insertEvent(guiEvent);\r\n });\r\n }\r\n\r\n if(this.isTabControl()) {\r\n const tabControl = this.htmlElement.children[0];\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"selectionchanged\", this.id, 0);\r\n for (var i = 0; i < tabControl.children.length; i++) {\r\n tabControl.children[i].addEventListener('click', (e) => {\r\n guiEvent.Value = ((<number><any>(<Element>e.currentTarget).getAttribute('layer'))-1).toString();\r\n this.task.insertEvent(guiEvent);\r\n });\r\n }\r\n }\r\n }\r\n\r\n // is the div a tab control\r\n isTabControl() {\r\n return this.htmlElement instanceof HTMLDivElement &&\r\n this.htmlElement.children[0].getAttribute('magicMark')=== \"magicTabControl\";\r\n }\r\n\r\n // is the div a radio buttons wrapper\r\n isRadio() {\r\n return this.htmlElement instanceof HTMLDivElement &&\r\n this.htmlElement.children[0].getAttribute('magicMark') === \"magicRadio\";\r\n }\r\n\r\n handleCommand(command: GuiCommand) {\r\n super.handleCommand(command);\r\n\r\n switch (command.CommandType) {\r\n case CommandType.SET_CLASS:\r\n //remove the class which was replaced by this new one, as registered in the ControlMetadata\r\n const controlMetadata:ControlMetadata = this._task.Records.list[0].getControlMetadata(this.id);\r\n if(controlMetadata.removedClass != '') {\r\n this.htmlElement.classList.remove(controlMetadata.removedClass);\r\n controlMetadata.removedClass = '';\r\n }\r\n this.htmlElement.classList.add(command.obj1);\r\n break;\r\n\r\n case CommandType.SET_VALUE:\r\n if (this.htmlElement instanceof HTMLLabelElement)\r\n (<HTMLLabelElement>this.htmlElement).innerText = command.value;\r\n\r\n if (this.htmlElement instanceof HTMLSelectElement)\r\n (<HTMLSelectElement>this.htmlElement).value = command.value;\r\n\r\n if (this.htmlElement instanceof HTMLAnchorElement) //hyper-text button\r\n (<HTMLAnchorElement>this.htmlElement).text = command.value;\r\n\r\n if (this.htmlElement instanceof HTMLInputElement)\r\n {\r\n if((<HTMLInputElement>this.htmlElement).type === \"checkbox\") {\r\n (<HTMLInputElement>this.htmlElement).checked = command.value;\r\n }\r\n else {\r\n (<HTMLInputElement>this.htmlElement).value = command.value;\r\n }\r\n }\r\n\r\n if (this.htmlElement instanceof HTMLButtonElement)\r\n {\r\n (<HTMLButtonElement>this.htmlElement).innerHTML = command.value;\r\n }\r\n\r\n break;\r\n\r\n case CommandType.SET_PROPERTY:\r\n this.handleSetProperty(command);\r\n break;\r\n\r\n case CommandType.SET_STYLE:\r\n let value: string = StylesMapManager.magicValueGetStyle(command.Operation, command.obj1);\r\n let attribute: string = StylesMapManager.MagicPropertyToHtmlAttributeMap.get(command.Operation);\r\n this.htmlElement.setAttribute(\"style\", attribute + \":\" + value);\r\n break;\r\n }\r\n }\r\n\r\n\r\n // handle set-property commands\r\n handleSetProperty(command: GuiCommand) {\r\n super.handleSetProperty(command);\r\n switch (command.Operation) {\r\n case HtmlProperties.Text:\r\n if (this.htmlElement instanceof HTMLLabelElement)\r\n (<HTMLLabelElement>this.htmlElement).innerText = command.obj1;\r\n\r\n break;\r\n\r\n case HtmlProperties.Image:\r\n if (this.htmlElement instanceof HTMLImageElement)\r\n (<HTMLImageElement>this.htmlElement).src = command.obj1;\r\n else\r\n this.htmlElement.setAttribute(\"src\", command.obj1);\r\n\r\n break;\r\n\r\n case HtmlProperties.ItemsList:\r\n if (this.htmlElement instanceof HTMLSelectElement) {\r\n\r\n // clear the list\r\n var len = this.htmlElement.length;\r\n for (var i = len - 1; i >= 0; i--) {\r\n this.htmlElement.remove(i);\r\n }\r\n\r\n for (let s of command.obj1) {\r\n let elem = document.createElement(\"option\");\r\n elem.text = s.displayValue;\r\n elem.value = s.index;\r\n (<HTMLSelectElement>this.htmlElement).add(elem);\r\n }\r\n }\r\n else if(this.isTabControl() && this.htmlElement.children.length > 0) {\r\n const tabControl = this.htmlElement.children[0];\r\n\r\n for (var i = 0; i < tabControl.children.length; i++) {\r\n if(tabControl.children[i] instanceof HTMLButtonElement) {\r\n (<HTMLElement>tabControl.children[i]).innerText = command.obj1[i].displayValue;\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case HtmlProperties.Visible:\r\n this.htmlElement.setAttribute('style', 'visibility:' + (command.obj1 ? 'visible' : 'hidden'));\r\n break;\r\n\r\n case HtmlProperties.Enabled:\r\n if (command.obj1 === false)\r\n this.htmlElement.setAttribute(\"disabled\", \"true\");\r\n else\r\n this.htmlElement.removeAttribute(\"disabled\");\r\n break;\r\n\r\n case HtmlProperties.TabIndex:\r\n this.htmlElement.setAttribute(command.Operation, command.obj1);\r\n break;\r\n\r\n case HtmlProperties.SelectedValue:\r\n if (this.htmlElement instanceof HTMLSelectElement)\r\n (<HTMLSelectElement>this.htmlElement).value = command.obj1;\r\n else if(this.isTabControl() && this.htmlElement.children.length > 0){\r\n const tabControl = this.htmlElement.children[0];\r\n\r\n for (var i = 0; i < tabControl.children.length; i++) {\r\n let child = tabControl.children[i];\r\n const layer = (<number><any>child.getAttribute('layer'))-1;\r\n\r\n if(child instanceof HTMLButtonElement) {\r\n // set button style\r\n if ( layer == command.obj1) { // compare int to string\r\n child.classList.add('tab_button_active');\r\n }\r\n else {\r\n child.classList.remove('tab_button_active');\r\n }\r\n } else {\r\n // not a buton - hide unselected tabpages\r\n let style = (layer == command.obj1) ? 'display: inline' : 'display: none';\r\n child.setAttribute('style', style);\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case HtmlProperties.PlaceHolder:\r\n this.htmlElement.setAttribute(\"placeholder\", command.obj1);\r\n break;\r\n\r\n case HtmlProperties.Tooltip:\r\n this.htmlElement.setAttribute(\"title\", command.obj1);\r\n break;\r\n\r\n case HtmlProperties.Password:\r\n if (command.obj1 === false)\r\n this.htmlElement.setAttribute(\"type\", \"text\");\r\n else\r\n this.htmlElement.setAttribute(\"type\", \"password\");\r\n break;\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {StringBuilder, isNullOrUndefined} from \"@magic-xpa/mscorelib\"\r\nimport {PICInterface} from \"@magic-xpa/utils\"\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class Constants {\r\n static readonly DATE_FMT = 'dd/MMM/yyyy';\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Pipe({\r\n name: 'magicDate'\r\n})\r\nexport class DateMagicPipe extends DatePipe implements PipeTransform {\r\n\r\n constructor(protected _task: TaskMagicService) {\r\n super('en-US');\r\n\r\n }\r\n\r\n transform(value: any, controlId: string): any {\r\n\r\n let mask: string = this._task.GetControlPictureMask (controlId).getMask();\r\n let formatStr: string = null;\r\n let mgDateFormatter = new MgDateFormatter();\r\n if (!isNullOrUndefined(value) && mask !== null) {\r\n formatStr = mgDateFormatter.ConvertMgDateFormatToAngular (mask);\r\n // If control is label control of table, due to query mode, then save the format here.\r\n if (formatStr != null && this._task.isTableControl(controlId)) {\r\n if (this._task.mgInputDateFormat == null)\r\n this._task.mgInputDateFormat = formatStr;\r\n else\r\n formatStr = this._task.mgInputDateFormat;\r\n }\r\n return super.transform(value, formatStr);\r\n }\r\n else\r\n value = \"\";\r\n\r\n return value;\r\n }\r\n}\r\n\r\nexport class MgDateFormatter {\r\n\r\n ConvertMgDateFormatToAngular(mgDateMask: string) : string\r\n {\r\n let formatStr: StringBuilder = new StringBuilder ();\r\n\r\n if (mgDateMask !== null) {\r\n for (let i: number = 0; i < mgDateMask.length;) {\r\n switch (mgDateMask.charCodeAt(i)) {\r\n case PICInterface.PIC_YYYY:\r\n formatStr.Append('yyyy');\r\n i += 4;\r\n break;\r\n case PICInterface.PIC_MMD:\r\n formatStr.Append('MM');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_YY:\r\n formatStr.Append('yy');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_MMM:\r\n {\r\n let cnt = 0;\r\n for (;i < mgDateMask.length; i++)\r\n if (mgDateMask.charCodeAt(i) == PICInterface.PIC_MMM)\r\n cnt++;\r\n else\r\n break;\r\n\r\n if (cnt == 3)\r\n formatStr.Append('MMM');\r\n if (cnt > 3)\r\n formatStr.Append('MMMM');\r\n }\r\n\r\n break;\r\n case PICInterface.PIC_DD:\r\n formatStr.Append('dd');\r\n i += 2;\r\n\r\n break;\r\n\r\n case PICInterface.PIC_WWW: {\r\n let cnt = 0;\r\n for (;i < mgDateMask.length; i++)\r\n if (mgDateMask.charCodeAt(i) == PICInterface.PIC_WWW)\r\n cnt++;\r\n else\r\n break;\r\n\r\n if (cnt == 3)\r\n formatStr.Append('EEE');\r\n if (cnt > 3)\r\n formatStr.Append('EEEE');\r\n }\r\n\r\n break;\r\n\r\n default:\r\n formatStr.Append(mgDateMask.charAt(i));\r\n i++;\r\n break;\r\n }\r\n }\r\n return formatStr.ToString();\r\n }\r\n else\r\n return \"dd-mm-yyyy\"; // return default format.\r\n\r\n }\r\n}\r\n","import {Directive, HostListener} from '@angular/core';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {StringBuilder, RefParam} from '@magic-xpa/mscorelib';\r\nimport {PICInterface, StorageAttribute} from '@magic-xpa/utils';\r\nimport {MagicDirective} from './magic.directive';\r\nimport {AbstractControl, Validators} from '@angular/forms';\r\nimport {PIC} from '@magic-xpa/gui';\r\nimport {MgDateFormatter} from '../pipes/date.magic.pipe';\r\nimport {isUndefined} from '@magic-xpa/mscorelib';\r\nimport {Environment, LastFocusedManager} from \"@magic-xpa/engine\";\r\n/**\r\n * Perform Magic validation on input controls which hold alphanumeric strings\r\n */\r\n@Directive({\r\n selector: '[mgFormat]'\r\n})\r\n\r\n\r\nexport class MgformatMagicDirective {\r\n\r\n datePasteFlag: boolean = false;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n protected magicDir: MagicDirective ,\r\n protected _task: TaskMagicService\r\n\r\n ) { }\r\n\r\n ngAfterViewInit() {\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n\r\n if(control != null && this._task.mgInputDateFormat == null) {\r\n // get the first date control's format.\r\n let pic: PIC = this._task.GetControlPictureMask(this.magicDir.id);\r\n if (pic.getAttr() == StorageAttribute.DATE ) {\r\n this.formatDate(pic);\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n /**\r\n * This can be used to set pattern\r\n * On input, verifies the input matches the required mask\r\n */\r\n @HostListener('focus', ['$event'])\r\n public onFocusEvent($event){\r\n this.calculatePattern();\r\n }\r\n\r\n @HostListener('paste', ['$event'])\r\n onPaste(event: ClipboardEvent) {\r\n /**\r\n * This flag is needed to skip execution of dateMasking() method when user paste date in input control.\r\n * This is only needed when \"StorageAttribute\" is DATE. But to check type of \"StorageAttribute\", we\r\n need to execute getControlMetadata() method. So, to reduce this execution overload we set\r\n \"datePasteFlag\" directly.\r\n */\r\n this.datePasteFlag = true;\r\n }\r\n\r\n @HostListener('input', ['$event'])\r\n public onInputEvent(event){\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;\r\n if (attr == StorageAttribute.DATE){\r\n if(!this.datePasteFlag)\r\n this.dateMasking(event);\r\n\r\n this.datePasteFlag = false;\r\n }\r\n this.calculatePattern();\r\n }\r\n\r\n\r\n //This method inserts '/' as a separator while entering date in the textbox.\r\n //Example: 10/10/2023\r\n dateMasking(event){\r\n\r\n const input = event.target;\r\n let cursorPos = event.target.selectionStart;\r\n const separator = this._task.mgInputDateFormat.includes('/')? '/':'-';\r\n\r\n if(cursorPos >= input.value.length) {\r\n\r\n const value = input.value.replace(/[^a-zA-Z0-9/-]/g, '');\r\n\r\n if (this._task.mgInputDateFormat == \"dd/MM/yyyy\" || this._task.mgInputDateFormat == \"MM/dd/yyyy\" ||this._task.mgInputDateFormat == \"dd-MM-yyyy\" ||this._task.mgInputDateFormat == \"MM-dd-yyyy\") {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2) + separator + value.slice(2);\r\n else if (value.length == 4 && value[3] == separator)\r\n input.value = value.slice(0, 3) + '01' + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 3) + '0' + value.slice(3);\r\n else if(value.length == 6 && value[5] != separator)\r\n input.value = value.slice(0, 5)+ separator + value.slice(5);\r\n else if(value.length >= 10)\r\n input.value = value.slice(0, 10);\r\n\r\n } else if (this._task.mgInputDateFormat == \"yyyy/MM/dd\" || this._task.mgInputDateFormat == \"yyyy/dd/MM\" || this._task.mgInputDateFormat == \"yyyy-MM-dd\" || this._task.mgInputDateFormat == \"yyyy-dd-MM\") {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '0000' + separator;\r\n else if(value.length == 2 && value[1] == separator)\r\n input.value = '000' + value.slice(0);\r\n else if(value.length == 3 && value[2] == separator)\r\n input.value = '00' + value.slice(0);\r\n else if(value.length == 4 && value[3] == separator)\r\n input.value = '0' + value.slice(0);\r\n else if(value.length == 5 && value[4] != separator)\r\n input.value = value.slice(0, 4) + separator + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 5) + '01' + value.slice(5);\r\n else if(value.length == 7 && value[6] == separator)\r\n input.value = value.slice(0, 5) + '0' + value.slice(5);\r\n else if(value.length == 8 && value[7] != separator)\r\n input.value = value.slice(0, 7) + separator + value.slice(7);\r\n else if(value.length >= 10)\r\n input.value = value.slice(0, 10);\r\n\r\n } else if (this._task.mgInputDateFormat == \"dd/MM/yy\" || this._task.mgInputDateFormat == \"yy/MM/dd\" || this._task.mgInputDateFormat == \"MM/dd/yy\" || this._task.mgInputDateFormat == \"yy/dd/MM\" ||this._task.mgInputDateFormat == \"dd-MM-yy\" || this._task.mgInputDateFormat == \"yy-MM-dd\" || this._task.mgInputDateFormat == \"MM-dd-yy\" || this._task.mgInputDateFormat == \"yy-dd-MM\") {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if (value.length == 4 && value[3] == separator)\r\n input.value = value.slice(0, 3) + '01' + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 3) + '0' + value.slice(3);\r\n else if(value.length == 6 && value[5] != separator)\r\n input.value = value.slice(0, 5)+ separator + value.slice(5);\r\n else if(value.length >= 8)\r\n input.value = value.slice(0, 8);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"dd/MMM/yy\" || this._task.mgInputDateFormat == \"dd-MMM-yy\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 9)\r\n input.value = value.slice(0, 9);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"dd/MMM/yyyy\" || this._task.mgInputDateFormat == \"dd-MMM-yyyy\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '01' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 11)\r\n input.value = value.slice(0, 11);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"yy/dd/MMM\" || this._task.mgInputDateFormat == \"yy-dd-MMM\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '00' + separator;\r\n else if (value.length == 2 && value[1] == separator)\r\n input.value = 0 + value;\r\n else if(value.length == 3 && value[2] != separator)\r\n input.value = value.slice(0, 2)+ separator + value.slice(2);\r\n else if (value.length == 4 && value[3] == separator)\r\n input.value = value.slice(0, 3) + '01' + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 3) + '0' + value.slice(3);\r\n else if(value.length == 6 && value[5] != separator)\r\n input.value = value.slice(0, 5) + separator + value.slice(5);\r\n else if(value.length >= 9)\r\n input.value = value.slice(0, 9);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"yyyy/dd/MMM\" || this._task.mgInputDateFormat == \"yyyy-dd-MMM\" ) {\r\n if(value.length == 1 && value[0] == separator)\r\n input.value = '0000' + separator;\r\n else if(value.length == 2 && value[1] == separator)\r\n input.value = '000' + value.slice(0);\r\n else if(value.length == 3 && value[2] == separator)\r\n input.value = '00' + value.slice(0);\r\n else if(value.length == 4 && value[3] == separator)\r\n input.value = '0' + value.slice(0);\r\n else if(value.length == 5 && value[4] != separator)\r\n input.value = value.slice(0, 4) + separator + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 5) + '01' + value.slice(5);\r\n else if(value.length == 7 && value[6] == separator)\r\n input.value = value.slice(0, 5) + '0' + value.slice(5);\r\n else if(value.length == 8 && value[7] != separator)\r\n input.value = value.slice(0, 7) + separator + value.slice(7);\r\n else if(value.length >= 11)\r\n input.value = value.slice(0, 11);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"MMM/dd/yy\" || this._task.mgInputDateFormat == \"MMM-dd-yy\" ) {\r\n if(value.length == 4 && value[3] != separator)\r\n input.value = value.slice(0, 3) + separator + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 4)+ '01' + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 4)+ '0' + value.slice(4);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 9)\r\n input.value = value.slice(0, 9);\r\n\r\n } else if (this._task.mgInputDateFormat ==\"MMM/dd/yyyy\" || this._task.mgInputDateFormat == \"MMM-dd-yyyy\" ) {\r\n if(value.length == 4 && value[3] != separator)\r\n input.value = value.slice(0, 3) + separator + value.slice(3);\r\n else if(value.length == 5 && value[4] == separator)\r\n input.value = value.slice(0, 4)+ '01' + value.slice(4);\r\n else if(value.length == 6 && value[5] == separator)\r\n input.value = value.slice(0, 4)+ '0' + value.slice(4);\r\n else if(value.length == 7 && value[6] != separator)\r\n input.value = value.slice(0, 6)+ separator + value.slice(6);\r\n else if(value.length >= 11)\r\n input.value = value.slice(0, 11);\r\n\r\n }\r\n }\r\n if(cursorPos < input.value.length && input.value.length > this._task.mgInputDateFormat.length){\r\n let inputDate = input.value;\r\n let start = input.selectionStart-1;\r\n let end = input.selectionEnd-1;\r\n let indexToRemove = input.selectionStart-1;\r\n\r\n input.value = inputDate.slice(0,indexToRemove) + inputDate.slice(indexToRemove + 1);\r\n input.setSelectionRange(start, end);\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n // This can be used to implement uppercase/lower case\r\n @HostListener('change', ['$event'])\r\n public onChangeEvent(event){\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;\r\n\r\n switch (attr)\r\n {\r\n case StorageAttribute.ALPHA:\r\n case StorageAttribute.UNICODE:\r\n this.formatAlphaUnicode (control);\r\n break;\r\n case StorageAttribute.BOOLEAN:\r\n this.formatBoolean(control);\r\n break;\r\n\r\n }\r\n }\r\n\r\n\r\n @HostListener('blur', ['$event'])\r\n public onBlurEvent(event) {\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType; \r\n\r\n if(attr == StorageAttribute.DATE){\r\n const century = Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx());\r\n this.formatDateWithCentury(event.target.value, century, control);\r\n }\r\n\r\n }\r\n\r\n /** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */\r\n formatDateWithCentury(userInput: string, century: number, control: AbstractControl) {\r\n const dateFormat = this._task.mgInputDateFormat;\r\n const separator = userInput.includes('/') ? '/' : \"-\";\r\n let centuryVal = parseInt(century.toString().slice(0, 2));\r\n if(userInput.length == 0)\r\n return ;\r\n\r\n if ((dateFormat == 'dd/MMM/yyyy' || dateFormat == 'dd-MMM-yyyy')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'dd/MM/yyyy' || dateFormat == 'dd-MM-yyyy' || dateFormat == 'd/M/yyyy' || dateFormat == 'd-M-yyyy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'MM/dd/yyyy' || dateFormat == 'MM-dd-yyyy' || dateFormat == 'M/d/yyyy' || dateFormat == 'M-d-yyyy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if ((dateFormat == 'MMM/dd/yyyy' || dateFormat == 'MMM-dd-yyyy')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/MM/dd' || dateFormat == 'yyyy-MM-dd')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments3(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/dd/MM' || dateFormat == 'yyyy-dd-MM')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n if ((day < 32 && month < 13)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/dd/MMM' || dateFormat == 'yyyy-dd-MMM')) {\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'dd/MM/yy' || dateFormat == 'dd-MM-yy' || dateFormat == 'd/M/yy' || dateFormat == 'd-M-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'MM/dd/yy' || dateFormat == 'MM-dd-yy' || dateFormat == 'M/d/yy' || dateFormat == 'M-d-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yy/MM/dd' || dateFormat == 'yy-MM-dd')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments3(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yy/dd/MM' || dateFormat == 'yy-dd-MM')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n if((day < 32 && month < 13)){\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'dd/MMM/yy' || dateFormat == 'dd-MMM-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments1(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yy/dd/MMM' || dateFormat == 'yy-dd-MMM')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments4(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'MMM/dd/yy' || dateFormat == 'MMM-dd-yy')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments2(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if((dateFormat == 'yyyy/MMM/dd' || dateFormat == 'yyyy-MMM-dd' ||dateFormat == 'yy/MMM/dd' || dateFormat == 'yy-MMM-dd')){\r\n const dateArray: string[] = userInput.split(separator);\r\n const [day, month, year] = this.getDateSegments3(dateArray);\r\n const isMonthInNumber: boolean = !isNaN(Number(month));\r\n if ((isMonthInNumber && day < 32 && Number(month) < 13) || (!isMonthInNumber && day < 32)) {\r\n this.updateYear(day, month, year, separator, century, centuryVal, control);\r\n }\r\n\r\n }else if(dateFormat == 'yyyy/MM' || dateFormat == 'yyyy-MM'){\r\n const dateArray: string[] = userInput.split(separator);\r\n const month = dateArray[1];\r\n const year = Number(dateArray[0]);\r\n if (Number(month) < 13) {\r\n this.updateYear(1, month, year, separator, century, centuryVal, control);\r\n }\r\n }\r\n }\r\n\r\n updateYear(day:number, month:string, year:number, separator:string, century:number, centuryVal:number, control:AbstractControl){\r\n let updatedYear = year.toString().length === 2 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '' + year :\r\n year.toString().length === 1 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '0' + year :\r\n year;\r\n\r\n control.setValue(new Date(`${updatedYear}${separator}${month}${separator}${day}`))\r\n }\r\n\r\n getDateSegments1(dateArray){\r\n const day = Number(dateArray[0]);\r\n const month = dateArray[1];\r\n const year = Number(dateArray[2]);\r\n return [day, month, year];\r\n }\r\n\r\n getDateSegments2(dateArray){\r\n const day = Number(dateArray[1]);\r\n const month = dateArray[0];\r\n const year = Number(dateArray[2]);\r\n return [day, month, year];\r\n }\r\n\r\n getDateSegments3(dateArray){\r\n const day = Number(dateArray[2]);\r\n const month = dateArray[1];\r\n const year = Number(dateArray[0]);\r\n return [day, month, year];\r\n }\r\n\r\n getDateSegments4(dateArray){\r\n const day = Number(dateArray[1]);\r\n const month = dateArray[2];\r\n const year = Number(dateArray[0]);\r\n return [day, month, year];\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n calculatePattern ()\r\n {\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id );\r\n\r\n if(control != null ) {\r\n let attr: StorageAttribute = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;\r\n if (attr == StorageAttribute.NUMERIC || attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {\r\n let pic: PIC = this._task.GetControlPictureMask(this.magicDir.id);\r\n\r\n if (this.isPatternGenerationNeeded(attr, pic)) {\r\n let pattern: string = this.generatePattern(attr, pic);\r\n if (control.validator == null)\r\n control.setValidators(Validators.pattern(pattern));\r\n else\r\n control.setValidators([control.validator, Validators.pattern(pattern)]);\r\n }\r\n else {\r\n if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {\r\n if (control.validator == null)\r\n control.setValidators(Validators.maxLength(pic.getMaskLength()));\r\n else {\r\n // re-set all validators again\r\n if (pic.isFormatExp()) {\r\n control.setValidators(Validators.maxLength(pic.getMaskLength()));\r\n if (isUndefined(this.magicDir.rowId))\r\n this.magicDir.rowId = '0';\r\n control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);\r\n }\r\n else\r\n control.setValidators([control.validator, Validators.maxLength(pic.getMaskLength())]);\r\n }\r\n\r\n // control.setValidators(Validators.maxLength(pic.getMaskLength()));\r\n control.updateValueAndValidity();\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n formatDate(pic: PIC): void {\r\n let mgDateFormatter = new MgDateFormatter();\r\n this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());\r\n }\r\n /**\r\n * @ignore\r\n */\r\n formatAlphaUnicode(control: AbstractControl): void {\r\n let value: string = control.value;\r\n\r\n if (value !== null && value.length > 0) {\r\n const newValue: string = this._task.GetRangedValue(this.magicDir.id, value);\r\n if (newValue != null)\r\n value = newValue;\r\n\r\n let pic: PIC = this._task.GetControlPictureMask(this.magicDir.id);\r\n let mask: string = pic.getMask();\r\n let valueStr: StringBuilder = new StringBuilder();\r\n\r\n for (let i: number = 0; i < value.length; i++) {\r\n switch (mask.charCodeAt(i)) {\r\n case PICInterface.PIC_U:\r\n valueStr.Append(value.charAt(i).toUpperCase());\r\n break;\r\n case PICInterface.PIC_L:\r\n valueStr.Append(value.charAt(i).toLowerCase());\r\n break;\r\n default:\r\n valueStr.Append(value.charAt(i));\r\n break;\r\n }\r\n }\r\n\r\n control.setValue(valueStr.ToString());\r\n\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n formatBoolean (control: AbstractControl): void {\r\n let value: string = control.value;\r\n if (value !== null && value.length > 0) {\r\n let newValue: string = this._task.GetRangedValue (this.magicDir.id , value);\r\n if (newValue.toUpperCase().startsWith(value.toUpperCase())) {\r\n control.setValue(newValue);\r\n } else {\r\n control.setValue(value);\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n /// <summary>\r\n /// generate pattern from fld's format\r\n /// </summary>\r\n generatePattern (attribute: StorageAttribute, pic: PIC): string {\r\n let pattern: string = '';\r\n\r\n switch (attribute)\r\n {\r\n case StorageAttribute.NUMERIC:\r\n pattern = this.generatePatternForNumber(pic);\r\n break;\r\n case StorageAttribute.ALPHA:\r\n case StorageAttribute.UNICODE:\r\n pattern = this.generatePatternForAlpha(pic);\r\n break;\r\n }\r\n\r\n return pattern;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n /// <summary>\r\n /// generate pattern for Alpha\r\n /// </summary>\r\n generatePatternForNumber(pic: PIC): string {\r\n let patternStr: StringBuilder = new StringBuilder ();\r\n\r\n patternStr.Append('^');\r\n if (pic.isNegative())\r\n patternStr.Append('-?');\r\n if (pic.getWholes())\r\n patternStr.AppendFormat('\\\\d{{0},{1}}', 0, pic.getWholes());\r\n if (pic.getDec())\r\n patternStr.AppendFormat('(\\\\.\\\\d{1,{0}})?', pic.getDec());\r\n patternStr.Append('$');\r\n\r\n return patternStr.ToString();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n isPatternGenerationNeeded (attr : StorageAttribute, pic : PIC): boolean {\r\n\r\n switch (attr) {\r\n case StorageAttribute.NUMERIC:\r\n return true;\r\n\r\n case StorageAttribute.ALPHA:\r\n case StorageAttribute.UNICODE:\r\n return (pic.getMaskChars() > 0) ? true : false;\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n /// <summary>\r\n /// generate pattern for Alpha\r\n /// </summary>\r\n generatePatternForAlpha(pic : PIC): string {\r\n let cnt: number = 0;\r\n let inputAllChars: boolean = false;\r\n let closeSet: boolean = false;\r\n let mask: string = pic.getMask();\r\n let pattern: StringBuilder = new StringBuilder();\r\n\r\n pattern.Append('^');\r\n for (let i: number = 0; i < mask.length;)\r\n {\r\n //start new subset , if mask[i] is one of these.\r\n if (inputAllChars && (mask.charCodeAt(i) == PICInterface.PIC_N || mask.charCodeAt(i) == PICInterface.PIC_U || mask.charCodeAt(i) == PICInterface.PIC_L\r\n || mask.charCodeAt(i) == PICInterface.PIC_X))\r\n {\r\n pattern.Append('(');\r\n closeSet = true;\r\n inputAllChars = false;\r\n }\r\n\r\n cnt = 0;\r\n switch (mask.charCodeAt(i))\r\n {\r\n case PICInterface.PIC_U:\r\n case PICInterface.PIC_X:\r\n case PICInterface.PIC_L:\r\n {\r\n pattern.Append('.');\r\n let inputAllCharsRef: RefParam<boolean> = new RefParam<boolean>(false);\r\n let dirs: string = PICInterface.PIC_U.toString();\r\n dirs += PICInterface.PIC_L.toString();\r\n dirs += PICInterface.PIC_X.toString();\r\n cnt = this.getDirectiveCount(mask, i, dirs, inputAllCharsRef);\r\n inputAllChars = inputAllCharsRef.value;\r\n i += cnt;\r\n\r\n }\r\n break;\r\n case PICInterface.PIC_N:\r\n {\r\n pattern.Append('\\\\d');\r\n let inputAllCharsRef: RefParam<boolean> = new RefParam<boolean>(false);\r\n cnt = this.getDirectiveCount(mask, i, PICInterface.PIC_L.toString(), inputAllCharsRef);\r\n inputAllChars = inputAllCharsRef.value;\r\n i += cnt;\r\n }\r\n break;\r\n\r\n default:\r\n pattern.Append(mask[i]);\r\n i++;\r\n break;\r\n }\r\n if (cnt > 0)\r\n pattern.AppendFormat('{{0},{1}}', inputAllChars ? cnt : 0, cnt);\r\n if (closeSet)\r\n pattern.Append(')');\r\n closeSet = false;\r\n\r\n }\r\n pattern.Append('$');\r\n return pattern.ToString();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getDirectiveCount(mask: string, idx: number, pattern: string, changeInPattern: RefParam<boolean> ): number {\r\n\r\n changeInPattern.value = false;\r\n let patternCount: number = 0;\r\n\r\n // find max chars\r\n while (idx < mask.length && this.IsPatternMatches(mask.charCodeAt(idx).toString(), pattern))\r\n { patternCount++; idx++; }\r\n\r\n\r\n if (idx < mask.length)\r\n changeInPattern.value = true;\r\n\r\n return patternCount;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n IsPatternMatches(mask: string, pattern: string): boolean {\r\n\r\n for (let i:number = 0; i < pattern.length; i++)\r\n if (mask == pattern[i])\r\n return true;\r\n return false;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {StringBuilder} from \"@magic-xpa/mscorelib\"\r\nimport {PICInterface} from \"@magic-xpa/utils\"\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Pipe({\r\n name: 'magicTime'\r\n})\r\nexport class TimeMagicPipe extends DatePipe implements PipeTransform {\r\n\r\n constructor(protected _task: TaskMagicService) {\r\n super('en-US');\r\n }\r\n\r\n transform(value: any, controlId: string): any {\r\n let mask: string = this._task.GetControlPictureMask (controlId).getMask();\r\n let formatStr: StringBuilder = new StringBuilder ();\r\n\r\n if (typeof value !== \"undefined\" && mask !== null) {\r\n for (let i: number = 0; i < mask.length;) {\r\n switch (mask.charCodeAt(i)) {\r\n case PICInterface.PIC_HH:\r\n formatStr.Append('hh');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_MMT:\r\n formatStr.Append('mm');\r\n i += 2;\r\n break;\r\n case PICInterface.PIC_SS:\r\n formatStr.Append('ss');\r\n i += 2;\r\n break;\r\n default:\r\n formatStr.Append(mask.charAt(i));\r\n i++;\r\n break;\r\n }\r\n }\r\n\r\n formatStr.Append(' a');\r\n return super.transform(value, formatStr.ToString());\r\n }\r\n return value;\r\n }\r\n}\r\n","import { Directive, ViewContainerRef } from '@angular/core';\r\nimport { FormControl, NG_VALIDATORS, Validator } from '@angular/forms';\r\nimport { TaskMagicService } from '../../services/task.magics.service';\r\nimport { ControlMetadata } from '../../controls.metadata.model';\r\n\r\n/**\r\n * Validates the field range.\r\n */\r\n@Directive({\r\n selector: '[rangevalidator] ',\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: RangeValidatorMagicDirective,\r\n\r\n multi: true,\r\n\r\n }\r\n ]\r\n})\r\n\r\nexport class RangeValidatorMagicDirective implements Validator {\r\n\r\n /**\r\n *\r\n * @param _task The task service\r\n * @param vcRef\r\n */\r\n constructor(protected _task: TaskMagicService, protected vcRef: ViewContainerRef) {\r\n }\r\n\r\n /**\r\n * Validation method\r\n * @param c FormControl to validate\r\n * @returns If validation fails, return error message, else returns null\r\n */\r\n validate(c: FormControl) {\r\n let controlName: string;\r\n controlName = this.getControlName (c);\r\n let properties: ControlMetadata;\r\n properties = this._task.Records.list[\"0\"].getControlMetadata(controlName);\r\n properties.rangeValidator = true;\r\n let errMsg: string = null;\r\n if (c.dirty)\r\n errMsg = this._task.ValidateControlValue (controlName, this._task.ConvertValToNative(controlName, 0, c.value));\r\n let isValid: boolean = (errMsg == null) ? true : false;\r\n if (isValid) {\r\n return null;\r\n }\r\n else {\r\n return {\r\n rangevalidator: {\r\n errorMsg : errMsg\r\n }\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n getControlName(c: FormControl): string | null {\r\n const formGroup = c.parent.controls;\r\n return Object.keys(formGroup).find(name => c === formGroup[name]) || null;\r\n }\r\n}\r\n","import {Component, Input, ViewContainerRef} from \"@angular/core\";\r\nimport {TaskBaseMagicComponent} from \"./task-base.magic.component\";\r\nimport { SubformMagicService } from \"../services/subform.magic.service\";\r\nimport { isNullOrUndefined } from '@magic-xpa/mscorelib';\r\n\r\n/**\r\n * Represents a Magic subform\r\n */\r\n@Component({\r\n selector: 'magic-subform',\r\n template: `\r\n <ndc-dynamic\r\n *ngIf=\"Component\" \r\n [ndcDynamicComponent]=\"Component\" \r\n [ndcDynamicInputs]=\"Parameters\">\r\n </ndc-dynamic>\r\n`})\r\n\r\n\r\nexport class SubformMagicComponent {\r\n /**\r\n * @ignore\r\n */\r\n id : string;\r\n\r\n /**\r\n * @ignore\r\n */\r\n @Input('magic') set magic(val) {this.id = val; };\r\n\r\n /**\r\n * @ignore\r\n */\r\n component: TaskBaseMagicComponent = null;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(private vcRef: ViewContainerRef, protected mgSub: SubformMagicService) {\r\n // For angular 13 - find the component from _hostLView\r\n this.component = ((<any>this.vcRef)._hostLView).find(v => !isNullOrUndefined((v as TaskBaseMagicComponent)));\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n get Component(): Component {\r\n return this.mgSub.mgGetComp(this.id);\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n get Parameters(): any {\r\n return this.mgSub.mgGetParameters(this.id);\r\n }\r\n}\r\n\r\n","import { ChangeDetectorRef, Component, ElementRef, Input, ViewChild } from \"@angular/core\";\r\nimport {AccessorMagicService} from \"../services/accessor.magic.service\";\r\nimport {TaskMagicService} from \"../services/task.magics.service\";\r\nimport { isUndefined } from \"@magic-xpa/mscorelib\";\r\n\r\n/**\r\n * Represents a Magic subform\r\n */\r\n@Component({\r\n selector: 'mgError',\r\n template: `<div *ngIf=\"HasErrors(id)\">\r\n <div #customContent>\r\n <ng-content></ng-content>\r\n </div>\r\n <span *ngIf=\"defaultDisplay\">\r\n {{mgService.getErrMsg(id, rowId)}} \r\n </span>\r\n </div>\r\n`})\r\n\r\n\r\nexport class ErrorMagicComponent {\r\n /**\r\n * @ignore\r\n */\r\n id: string;\r\n rowId: string;\r\n /**\r\n * @ignore\r\n */\r\n @Input('magic') set magic(val) {\r\n this.id = val;\r\n };\r\n\r\n @Input('rowId') set rowId1(val) {\r\n this.rowId = val;\r\n };\r\n\r\n // if true - display standard magic error message, if false - customer has provides his own content and we'll use it\r\n defaultDisplay = true;\r\n\r\n @ViewChild('customContent', { static: false }) set CustomContent(innerComponent: ElementRef) {\r\n this.defaultDisplay = innerComponent == undefined || this.isEmpty(innerComponent.nativeElement);\r\n this.changeDetectorRef.detectChanges();\r\n };\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(protected _task: TaskMagicService, public mgService: AccessorMagicService, protected changeDetectorRef: ChangeDetectorRef ) {\r\n this.rowId = \"0\";\r\n }\r\n\r\n /**\r\n * returns true if the html element has no children\r\n * @param element\r\n */\r\n isEmpty(element: HTMLElement): boolean {\r\n const nodes = element.childNodes;\r\n for (let i = 0; i < nodes.length; i++) {\r\n const node = nodes.item(i);\r\n if (node.nodeType !== 8 && nodes.item(i).textContent.trim().length !== 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n HasErrors(id: string): boolean {\r\n if (!isUndefined(id)) {\r\n let control = this._task.getFormControl(this.rowId, id);\r\n if (control !== null) {\r\n if (control.dirty && (control.hasError('pattern') || control.hasError('required') ||\r\n control.hasError('rangevalidator') || control.hasError('maxlength') || control.hasError('max')))\r\n return true;\r\n if (control.touched && control.hasError('required'))\r\n return true;\r\n\r\n if(this._task.Records.list[this.rowId] && this._task.Records.list[this.rowId].getControlMetadata(id)){\r\n let controlMetadata = this._task.Records.list[this.rowId].getControlMetadata(id);\r\n for (let customValidator of controlMetadata.customValidators.keys()) {\r\n if (control.hasError(customValidator))\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n","import {Directive, ElementRef, HostListener, Input} from '@angular/core';\r\nimport { MagicDirective } from '../magic.directive';\r\nimport {TaskMagicService} from \"../../../services/task.magics.service\";\r\nimport {getGuiEventObj, IGuiEvent} from \"@magic-xpa/engine\";\r\nimport {filter} from \"rxjs/operators\";\r\nimport {CommandType, GuiCommand, HtmlProperties} from \"@magic-xpa/gui\";\r\n\r\n\r\n/**\r\n * Directive for checkboxes, to handle the 'change' event\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n input[type=checkbox][magic]:not([noFormControl])\r\n`,\r\n })\r\nexport class CheckboxMagicDirective {\r\n @Input() threeState: boolean = false;\r\n private subscribeRefreshDom: any = null;\r\n private isIndeterminate: boolean = false;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor( protected magicDirective: MagicDirective,\r\n private el: ElementRef,\r\n protected task: TaskMagicService,) {\r\n }\r\n\r\n /**\r\n * Handles the Checkbox 'change' event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n if(this.threeState) {\r\n this.handleThreeState();\r\n }\r\n else {\r\n this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if(this.threeState){\r\n let guiEvent: IGuiEvent = getGuiEventObj(\"setAsThreeState\", this.magicDirective.id, +this.magicDirective.rowId);\r\n this.task.insertEvent(guiEvent);\r\n this.el.nativeElement.indeterminate = this.isIndeterminate = this.task.getProperty(this.magicDirective.id, HtmlProperties.CheckBoxIndeterminate, this.magicDirective.rowId);\r\n this.regUpdatesUI();\r\n }\r\n }\r\n private regUpdatesUI() {\r\n this.subscribeRefreshDom = this.task\r\n .refreshDom.pipe(filter(c => this.magicDirective.IsSameElement(c)))\r\n .subscribe(a => {\r\n let command: GuiCommand = a;\r\n try {\r\n this.handleCommand(command);\r\n } catch (ex) {\r\n console.dir(ex);\r\n }\r\n }\r\n );\r\n }\r\n handleCommand(command: GuiCommand){\r\n if (command.CommandType == CommandType.SET_PROPERTY &&\r\n command.Operation == HtmlProperties.CheckBoxIndeterminate) {\r\n this.isIndeterminate = this.el.nativeElement.indeterminate = command.obj1;\r\n }\r\n }\r\n private handleThreeState() {\r\n let value : string = '';\r\n let prevCheckedValue = this.task.getValue(this.magicDirective.id, this.magicDirective.rowId);\r\n const checkbox = this.el.nativeElement;\r\n if (this.isIndeterminate) {\r\n checkbox.checked = false;\r\n checkbox.indeterminate = false;\r\n value = 'unchecked';\r\n } else if (prevCheckedValue) {\r\n checkbox.checked = false;\r\n checkbox.indeterminate = true;\r\n value = 'indeterminate';\r\n } else if (!prevCheckedValue) {\r\n checkbox.checked = true;\r\n checkbox.indeterminate = false;\r\n value = 'checked';\r\n }\r\n // @ts-ignore\r\n this.magicDirective.task.onCheckChanged(value, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n /**\r\n * Cleanup\r\n */\r\n ngOnDestroy(): void {\r\n if(this.subscribeRefreshDom !== null)\r\n this.subscribeRefreshDom.unsubscribe();\r\n }\r\n}\r\n\r\n\r\n","import { Directive, HostListener } from '@angular/core';\r\nimport { MagicDirective } from '../magic.directive';\r\nimport { GuiCommand, HtmlProperties } from \"@magic-xpa/gui\";\r\nimport { filter } from \"rxjs/operators\";\r\n\r\n\r\n/**\r\n * Directive for comboboxes, to handle the 'change' event\r\n */\r\n@Directive({\r\n selector:\r\n `select[magic]:not([multiple])`,\r\n })\r\nexport class ComboboxMagicDirective{\r\n\r\n constructor(protected magicDirective: MagicDirective) {\r\n // subcribe to refreshDom. This is a special case for native select HTML control.\r\n // to refresh the selected property. Else by default, HTML element doesn't get refreshed as per\r\n // selected value and 1st element remains selected.\r\n this.magicDirective.task.refreshDom.pipe(filter(c => this.magicDirective.IsSameElement(c))).subscribe(value =>{\r\n let command: GuiCommand = value;\r\n if (command.Operation === HtmlProperties.ItemsList)\r\n this.onComboboxItemsListChanged();\r\n });\r\n }\r\n\r\n /**\r\n * Handles the Combobox 'change' event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.onComboboxSelectionChanged($event, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n\r\n /**\r\n * To refresh Combobox selection as per selected property.\r\n */\r\n onComboboxItemsListChanged(): void {\r\n this.magicDirective.task.refreshView();\r\n }\r\n}\r\n\r\n\r\n","import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * This service supports custom actions on magic exit\r\n */\r\n@Injectable()\r\nexport class ExitMagicService {\r\n\r\n\r\n /**\r\n * Override this method to implement custom logic on magic exit\r\n */\r\n exitMagic() {\r\n console.log(\"Magic application terminated\");\r\n }\r\n\r\n}\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n Optional,\r\n TemplateRef,\r\n ViewChild,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { CommandType, GuiCommand } from '@magic-xpa/gui';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { EngineMagicService } from '../services/engine.magic.service';\r\nimport { ComponentListMagicService } from '../services/component-list.magic.service';\r\nimport { GuiInteractiveExecutor } from './GuiInteractiveExecutor';\r\nimport { filter } from 'rxjs/operators';\r\nimport { ExitMagicService } from '../services/exit.magic.service';\r\nimport { OverlayWindowService } from '../services/OverlayWindowService';\r\nimport { IMagicViewContainerRef } from '../..';\r\nimport { CommandsCollectorMagicService } from '../services/commands-collector.magic.service';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport {ActivatedRoute, NavigationEnd, Router} from \"@angular/router\";\r\n\r\n/**\r\n * Root Magic component\r\n */\r\n@Component({\r\n selector: 'magic-root',\r\n providers: [\r\n // ExitMagicService\r\n ],\r\n template: `\r\n <div #magicRoot>\r\n <ndc-dynamic\r\n *ngIf = \"RootComponent !== null\"\r\n [ndcDynamicComponent]=\"RootComponent\"\r\n [ndcDynamicInputs] =\"RootComponentParameters\">\r\n </ndc-dynamic>\r\n\r\n <div #overlayWindowsContainer magicViewContainerRef>\r\n </div>\r\n </div>\r\n\r\n <div class=\"spinner-background\" *ngIf=\"showSpinner\">\r\n <ng-container [ngTemplateOutlet]=\"SpinnerTemplate ? SpinnerTemplate:defaultSpinner\"></ng-container>\r\n </div>\r\n\r\n <ng-template #defaultSpinner>\r\n <div class=\"mgSpinnerClass\"></div>\r\n </ng-template>\r\n `,\r\n styles: [`\r\n .mgSpinnerClass {\r\n border: 10px solid #cccccc; /* Light grey */\r\n border-top: 10px solid black; /* Blue */\r\n border-radius: 50%;\r\n position: fixed;\r\n margin: auto;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n width: 100px;\r\n height: 100px;\r\n animation: spin 2s linear infinite;\r\n }\r\n .spinner-background {\r\n /* background fixed across whole screen */\r\n position: fixed;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 1000;\r\n left: 0;\r\n opacity: 0.5;\r\n }\r\n @keyframes spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n }\r\n `]\r\n})\r\nexport class MagicShellComponent implements AfterViewInit, IMagicViewContainerRef {\r\n /**\r\n * Root component to be displayed in the window\r\n */\r\n RootComponent : Component = null;\r\n /**\r\n * parameters for the Root Component\r\n */\r\n RootComponentParameters : any;\r\n\r\n overlayWindowsContainerViewRef: ViewContainerRef;\r\n\r\n @ViewChild('magicRoot', { static: true }) rootMagicElementRef: ElementRef;\r\n\r\n @Input() SpinnerTemplate: TemplateRef<any>;\r\n\r\n showSpinner: boolean;\r\n magicEngineTerminated: boolean = false;\r\n\r\n /**\r\n *\r\n * @param magic Magic's service\r\n * @param componentList Magic component list\r\n * @param changeDetectorRef Changes detector\r\n * @param titleService Title setting service\r\n * @param httpClient The native httpClient instance\r\n * @param exitMagicService Magic exit service\r\n */\r\n constructor(protected engineMagicService: EngineMagicService,\r\n protected componentList:ComponentListMagicService,\r\n protected changeDetectorRef: ChangeDetectorRef,\r\n private titleService: Title,\r\n private overlayWindowService: OverlayWindowService,\r\n private httpClient: HttpClient,\r\n private pendingCommandsCollector: CommandsCollectorMagicService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n @Optional() public exitMagicService: ExitMagicService) {\r\n\r\n this.initialize();\r\n this.setTitle();\r\n }\r\n\r\n /**\r\n * Before-unload event listener\r\n * @param event\r\n */\r\n @HostListener('window:beforeunload', ['$event'])\r\n onBeforeUnload(event) {\r\n if(this.engineMagicService.TransCacheExists())\r\n {\r\n // Show the confirmation box before unloading the browser\r\n event.returnValue = 'Are you sure?';\r\n return 'Are you sure?';\r\n }\r\n else\r\n {\r\n // terminate the magic server context using fetch API with keep-alive\r\n this.engineMagicService.TerminateContextUsingFetchAPI();\r\n this.magicEngineTerminated = true;\r\n }\r\n }\r\n\r\n @HostListener('window:unload', ['$event'])\r\n onUnload(event) {\r\n // Chrome provides an opportunity to terminate the context after user approves the browser unload alert\r\n if(!this.magicEngineTerminated)\r\n this.engineMagicService.TerminateContextUsingFetchAPI();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement, this.changeDetectorRef);\r\n\r\n let subscription = this.router.events\r\n .pipe(filter(e => e instanceof NavigationEnd))\r\n .subscribe(e => {\r\n if (this.router.navigated) {\r\n const queryParams = this.route.snapshot.queryParams;\r\n const queryParamsMap = new Map<string, string>();\r\n\r\n // Iterate over the queryParams object and populate the Map\r\n for (const key in queryParams) {\r\n if (queryParams.hasOwnProperty(key)) {\r\n queryParamsMap.set(key, queryParams[key].toString());\r\n }\r\n }\r\n\r\n this.engineMagicService.startMagicEngine(this.httpClient, queryParamsMap);\r\n subscription.unsubscribe();\r\n }\r\n });\r\n }\r\n\r\n setViewContainerRef(vcRef: ViewContainerRef){\r\n this.overlayWindowsContainerViewRef = vcRef;\r\n }\r\n\r\n /**\r\n * Initialization of Magic mechanisms\r\n */\r\n initialize() {\r\n this.registerUICommands();\r\n }\r\n\r\n /**\r\n * Set the title\r\n */\r\n public setTitle( ) {\r\n const newTitle: string = this.componentList.title;\r\n this.titleService.setTitle( newTitle );\r\n }\r\n\r\n /**\r\n * Set the component according to requested form\r\n * @param formName Name of the form to open\r\n * @param taskId Id of opening task\r\n * @param taskDescription TODO\r\n * @param isModal whether modal window is being opened\r\n */\r\n private setComponent(formName: string, taskId: string, taskDescription: string, isModal: boolean) {\r\n this.pendingCommandsCollector.startCollecting();\r\n\r\n if(isModal) {\r\n this.overlayWindowService.open(formName, taskId, taskDescription);\r\n }\r\n else {\r\n this.RootComponent = this.componentList.getComponent(formName);\r\n this.RootComponentParameters = { taskIdParam: taskId, taskDescription: taskDescription };\r\n }\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n registerUICommands() {\r\n this.engineMagicService.refreshDom.pipe(\r\n filter(command => command.TaskTag === '0'))\r\n .subscribe(command => {\r\n this.executeCommand(command);\r\n });\r\n this.engineMagicService\r\n .interactiveCommands.pipe(\r\n filter(command => command.TaskTag === '0'))\r\n .subscribe(command => {\r\n GuiInteractiveExecutor.executeInteractiveCommand(null, command, this.overlayWindowService);\r\n });\r\n }\r\n\r\n /**\r\n * Execute commands received from the Magic WebClient engine\r\n * @param command\r\n */\r\n executeCommand(command: GuiCommand): void {\r\n switch (command.CommandType) {\r\n case CommandType.OPEN_FORM:\r\n this.setComponent(command.str, command.stringList[0], command.stringList[1], command.Bool1);\r\n break;\r\n\r\n case CommandType.SET_IS_LOGGED_IN:\r\n this.engineMagicService.setIsLoggedIn(command.Bool1);\r\n break;\r\n\r\n case CommandType.CLOSE_FORM:\r\n if (this.RootComponent != null && command.str === this.RootComponentParameters.taskIdParam) {\r\n this.RootComponent = null;\r\n this.RootComponentParameters = {};\r\n\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n else { // Close modal window\r\n this.overlayWindowService.close(command.str);\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n break;\r\n\r\n case CommandType.RELOAD_PAGE:\r\n window.location.reload();\r\n break;\r\n\r\n case CommandType.SHOW_SPINNER:\r\n if (this.showSpinner != command.Bool1) {\r\n this.showSpinner = command.Bool1;\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n break;\r\n\r\n case CommandType.EXIT_MAGIC:\r\n if (this.exitMagicService)\r\n this.exitMagicService.exitMagic();\r\n break;\r\n\r\n case CommandType.SHOW_HTML_ERROR:\r\n window.document.write(command.str);\r\n break;\r\n }\r\n }\r\n}\r\n","import { Directive, forwardRef } from '@angular/core';\r\nimport { CheckboxControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => MagicCheckboxControlValueAccessor),\r\n multi: true,\r\n};\r\n\r\n/**\r\n * Value accessor for Checkbox without a FormControl\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n input[type=checkbox][magic]:not([formControlName]):not([no-form-control]),\r\n input[type=checkbox][magic]:not([formControl]),\r\n input[type=checkbox][magic]:not([ngModel])\r\n `,\r\n host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'},\r\n providers: [CHECKBOX_VALUE_ACCESSOR]\r\n})\r\nexport class MagicCheckboxControlValueAccessor extends CheckboxControlValueAccessor {\r\n\r\n}\r\n","import { Directive, forwardRef } from '@angular/core';\r\nimport { DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const MAGIC_DEFAULT_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => MagicDefaultValueAccessor),\r\n multi: true\r\n};\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n selector: `\r\n input[magic]:not([type=checkbox]):not([formControlName]):not([no-form-control]),\r\n textarea[magic]:not([formControlName]):not([noFormControl]):not([no-form-control])\r\n `,\r\n host: {\r\n '(input)': '$any(this)._handleInput($event.target.value)',\r\n '(blur)': 'onTouched()',\r\n '(compositionstart)': '$any(this)._compositionStart()',\r\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\r\n },\r\n providers: [MAGIC_DEFAULT_VALUE_ACCESSOR],\r\n exportAs: 'magic'\r\n})\r\nexport class MagicDefaultValueAccessor extends DefaultValueAccessor {\r\n\r\n /*constructor(_renderer: Renderer2, _elementRef: ElementRef, @Optional() @Inject(COMPOSITION_BUFFER_MODE) _compositionMode: boolean) {\r\n super(_renderer, _elementRef, _compositionMode);\r\n debugger;\r\n }*/\r\n\r\n}\r\n","import { Directive, HostListener } from \"@angular/core\";\r\nimport { MagicDirective } from \"../magic.directive\";\r\n\r\n\r\n/**\r\n * Directive for checkboxes which should not have a form control\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n input[type=checkbox][magic]:([noFormControl]) \r\n `,\r\n})\r\nexport class CheckboxNoFormControlMagicDirective {\r\n constructor(protected magicDirective: MagicDirective) {\r\n }\r\n\r\n\r\n /**\r\n * Handle the 'Checkbox' change event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);\r\n }\r\n}\r\n","import {Directive, HostListener} from \"@angular/core\";\r\nimport {MagicDirective} from '../magic.directive';\r\n\r\n\r\n/**\r\n * Directive for non-checkbox input controls which do not have a form control\r\n */\r\n@Directive({\r\n selector: `input[magic]:([noFormControl]):not([type=checkbox]),\r\n textarea[magic]:([noFormControl]):not([type=checkbox])`\r\n\r\n})\r\nexport class InputNoFormControlMagicDirective {\r\n constructor(protected magicDirective: MagicDirective) {\r\n }\r\n\r\n\r\n /**\r\n * Handles the 'change' event - pass it to the Magic engine\r\n */\r\n @HostListener('change', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.setInputTextValue(this.magicDirective.id,\r\n this.magicDirective.rowId,\r\n (<HTMLInputElement>event.srcElement).value)\r\n }\r\n}\r\n","import {\r\n Directive,\r\n ElementRef,\r\n forwardRef,\r\n HostListener,\r\n Renderer2\r\n} from \"@angular/core\";\r\nimport {AbstractControl, ControlValueAccessor, NG_VALUE_ACCESSOR} from \"@angular/forms\";\r\nimport {MagicDirective} from \"../../../magic.directive\";\r\nimport {TaskMagicService} from \"../../../../../services/task.magics.service\";\r\nimport {Environment, LastFocusedManager} from \"@magic-xpa/engine\";\r\n\r\nexport const DATE_VALUE_ACCESSOR: any = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => DateValueAccessor),\r\n multi: true\r\n};\r\n\r\n/**\r\n * The accessor for writing a value and listening to changes on a date input element\r\n *\r\n * ### Example\r\n * `<input type=\"date\" name=\"birthday\" ngModel dateInput>`\r\n * OR\r\n * `<input type=\"date\" formControlName=\"birthday\" dateInput>`\r\n */\r\n@Directive({\r\n selector: \"[dateInput]\",\r\n providers: [DATE_VALUE_ACCESSOR]\r\n})\r\nexport class DateValueAccessor implements ControlValueAccessor {\r\n @HostListener(\"input\", [\"$event.target.valueAsDate\"])\r\n onChange = (_: any) => {};\r\n @HostListener(\"blur\", [])\r\n onTouched = () => {};\r\n\r\n @HostListener('blur', ['$event'])\r\n public onBlurEvent(event) {\r\n const century = Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx());\r\n let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);\r\n\r\n this.formatDateWithCentury(event.target.value, century, control);\r\n }\r\n\r\n constructor(private renderer: Renderer2, private elementRef: ElementRef,\r\n protected magicDir: MagicDirective ,\r\n protected _task: TaskMagicService) {}\r\n\r\n\r\n /** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */\r\n formatDateWithCentury(userInput:string, century:number, control: AbstractControl){\r\n const separator = userInput.includes('/')?'/':\"-\";\r\n let centuryVal = parseInt(century.toString().slice(0, 2));\r\n if(userInput.length == 0)\r\n return ;\r\n\r\n const dateArray: string[] = userInput.split(separator);\r\n const day = Number(dateArray[2]);\r\n const month = Number(dateArray[1]);\r\n const year = Number(dateArray[0]);\r\n\r\n let updatedYear = year.toString().length === 2 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '' + year :\r\n year.toString().length === 1 ? (year < century % 100 ? centuryVal + 1 : centuryVal) + '0' + year :\r\n year;\r\n\r\n control.setValue(new Date(`${updatedYear}${separator}${month}${separator}${day}`))\r\n }\r\n\r\n\r\n /** Writes a new value to the element (model -> view) */\r\n writeValue(value: Date): void {\r\n if (!value) {\r\n this.renderer.setProperty(this.elementRef.nativeElement, \"value\", null);\r\n return;\r\n }\r\n\r\n this.renderer.setProperty(\r\n this.elementRef.nativeElement,\r\n \"valueAsDate\",\r\n new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate()))\r\n );\r\n }\r\n\r\n /** Registers a callback function, called when value changes (view -> model) */\r\n registerOnChange(fn: (_: any) => void): void {\r\n this.onChange = v =>\r\n fn(\r\n v instanceof Date\r\n ? new Date(v.getUTCFullYear(), v.getUTCMonth(), v.getUTCDate())\r\n : v\r\n );\r\n }\r\n\r\n /** Registers a callback function, called when the control is blurred */\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n /** Enables or disables the element when the control status changes */\r\n setDisabledState(isDisabled: boolean): void {\r\n this.renderer.setProperty(\r\n this.elementRef.nativeElement,\r\n \"disabled\",\r\n isDisabled\r\n );\r\n }\r\n}\r\n","import {Directive, ElementRef, Input, OnInit, Renderer2, ViewContainerRef} from '@angular/core';\r\nimport {getGuiEventObj} from '@magic-xpa/engine';\r\nimport {TaskBaseMagicComponent} from '../task-base.magic.component';\r\nimport {TaskMagicService} from '../../services/task.magics.service';\r\nimport {Subscription} from 'rxjs';\r\n\r\n/**\r\n * Responsible for connecting HTML elements to the Magic WebClient engine showing it is not Magic Control but a Dummy control which is used to notify only receeive focus event for now\r\n */\r\n@Directive({\r\n selector: '[NonMagicControl]'\r\n})\r\n\r\nexport class NonMagicControlDirective implements OnInit {\r\n @Input('NonMagicControl')\r\n set magic(val) {\r\n this.id = val;\r\n this.selector = 'NonMagicControl';\r\n };\r\n\r\n /**\r\n * The HTML element connected to this directive\r\n */\r\n protected htmlElement: HTMLElement;\r\n /**\r\n * Magic's component handling this control\r\n */\r\n public component: TaskBaseMagicComponent;\r\n /**\r\n * Collection of event handlers for this element\r\n */\r\n private eventHandlers: { [key: string]: () => void; } = {};\r\n /**\r\n * Id of this element\r\n */\r\n public id: string;\r\n /**\r\n * @ignore\r\n */\r\n protected selector: string;\r\n /**\r\n * @ignore\r\n */\r\n subscribeRefreshDom: Subscription;\r\n\r\n\r\n public eventsOnlyVal = false;\r\n\r\n\r\n /**\r\n *\r\n * @param _task The task service\r\n * @param element The element for which the directive is applied\r\n * @param renderer Renderer for the element\r\n * @param vcRef\r\n */\r\n constructor(protected _task: TaskMagicService,\r\n protected element: ElementRef,\r\n protected renderer: Renderer2,\r\n protected vcRef: ViewContainerRef) {\r\n\r\n this.htmlElement = this.element.nativeElement;\r\n }\r\n\r\n /**\r\n * Get the task service\r\n * @returns\r\n */\r\n get task(): TaskMagicService {\r\n return this._task;\r\n }\r\n\r\n /**\r\n * Register to the events this element may need to handle\r\n */\r\n protected regEvents() {\r\n\r\n // Handle events for which event handler may be removed and restored\r\n this.eventHandlers['focusin'] = this.OnFocus.bind(this);\r\n Object.keys(this.eventHandlers).forEach((key) => {\r\n this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Handle focus event\r\n */\r\n private OnFocus() {\r\n this.task.insertEvent(getGuiEventObj('focusOnNonMagicControl', '', -1));\r\n event.cancelBubble = true;\r\n }\r\n\r\n /**\r\n * Initialize this object\r\n */\r\n ngOnInit(): void {\r\n this.regEvents();\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport {TaskMagicService} from \"../../services/task.magics.service\";\r\n\r\n@Pipe({\r\n name: 'magicTime24'\r\n})\r\nexport class Time24MagicPipe implements PipeTransform {\r\n\r\n constructor(protected _task: TaskMagicService) {\r\n\r\n }\r\n\r\n transform(value: any, controlId: string): any {\r\n let mask: string = this._task.GetControlPictureMask (controlId).getMask();\r\n\r\n if (typeof value !== \"undefined\" && value !== null && mask !== null) {\r\n\r\n const date = new Date(value);\r\n const hours = date.getHours().toString().padStart(2, '0');\r\n const minutes = date.getMinutes().toString().padStart(2, '0');\r\n const seconds = date.getSeconds().toString().padStart(2, '0');\r\n\r\n if(mask.length == 5){\r\n return `${hours}:${minutes}`;\r\n }else if(mask.length > 5){\r\n return `${hours}:${minutes}:${seconds}`;\r\n }\r\n }\r\n return value;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DynamicModule } from 'ng-dynamic-component';\r\nimport { NoControlMagicDirective } from './ui/directives/magic/nocontrol.magic.directive';\r\nimport { MagicOverlayContainer } from './ui/magic-modal/magic-overlay-container';\r\nimport { RouterContainerMagicComponent } from './ui/router-container.magic.component';\r\nimport { MgformatMagicDirective } from './ui/directives/mgformat.magic.directive';\r\nimport { DateMagicPipe } from './ui/pipes/date.magic.pipe';\r\nimport { TimeMagicPipe } from './ui/pipes/time.magic.pipe';\r\nimport { RangeValidatorMagicDirective } from './ui/directives/range-validator.magic.directive';\r\nimport { SubformMagicComponent } from './ui/subform.magic.component';\r\nimport { ErrorMagicComponent } from './ui/mgerror.magic.component';\r\nimport { CheckboxMagicDirective } from './ui/directives/magic/checkbox.magic.directive';\r\nimport { ComboboxMagicDirective } from './ui/directives/magic/combobox.magic.directive';\r\nimport { MagicShellComponent } from './ui/magic-root.component';\r\nimport { MagicCheckboxControlValueAccessor } from './ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive';\r\nimport { MagicDefaultValueAccessor } from './ui/directives/magic/form-controls/control-value-accessors/default.cva.directive';\r\nimport { MagicDirective } from './ui/directives/magic.directive';\r\nimport { TaskBaseMagicComponent } from './ui/task-base.magic.component';\r\nimport { RowMagicDirective } from './ui/directives/magic/row.magic.directive';\r\nimport { CheckboxNoFormControlMagicDirective } from './ui/directives/magic/checkbox-noformcontrol.magic.directive';\r\nimport { InputNoFormControlMagicDirective } from './ui/directives/magic/input.noformcontrol.magic.directive';\r\nimport { DateValueAccessor } from './ui/directives/magic/form-controls/control-value-accessors/date.cva.directive';\r\nimport { OverlayContainerMagicProvider } from './services/overlay.conainer.magic.provider';\r\nimport { MagicOverlayContainerWrapper } from './ui/magic-modal/magic-overlay-container-wrapper';\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { NonMagicControlDirective } from './ui/directives/NonMagicControlDirective';\r\nimport { MagicAlertComponent } from './ui/components/magic-alert.component';\r\nimport { ConfirmationComponentsMagicProvider } from './services/confirmation.components.magic.provider';\r\nimport { MagicConfirmationBoxComponent } from './ui/components/magic-confirmation-box.component';\r\nimport { MagicFocusDirective } from './ui/directives/magic-focus.directive';\r\nimport { BaseMagicAlertComponent } from './ui/components/base-magic-alert.component';\r\nimport { BaseMagicConfirmComponent } from './ui/components/base-magic-confirm.component';\r\nimport { MagicViewContainerRef } from './ui/directives/magicViewContainerRef.directive';\r\nimport { MaskitoModule } from \"@maskito/angular\";\r\nimport { Time24MagicPipe } from \"./ui/pipes/time24.magic.pipe\";\r\n/**\r\n * @ignore\r\n */\r\nconst decs = [\r\n MagicDirective,\r\n CheckboxMagicDirective,\r\n CheckboxNoFormControlMagicDirective,\r\n InputNoFormControlMagicDirective,\r\n ComboboxMagicDirective,\r\n RowMagicDirective,\r\n\r\n MagicCheckboxControlValueAccessor,\r\n MagicDefaultValueAccessor,\r\n DateValueAccessor,\r\n TaskBaseMagicComponent,\r\n MagicOverlayContainer,\r\n MagicAlertComponent,\r\n MagicConfirmationBoxComponent,\r\n BaseMagicAlertComponent,\r\n BaseMagicConfirmComponent,\r\n MagicOverlayContainerWrapper,\r\n RouterContainerMagicComponent,\r\n MagicShellComponent,\r\n SubformMagicComponent,\r\n ErrorMagicComponent,\r\n NoControlMagicDirective,\r\n\r\n MgformatMagicDirective,\r\n DateMagicPipe,\r\n TimeMagicPipe,\r\n RangeValidatorMagicDirective,\r\n NonMagicControlDirective,\r\n MagicFocusDirective,\r\n MagicViewContainerRef,\r\n Time24MagicPipe\r\n\r\n\r\n];\r\n\r\n/**\r\n * @ignore\r\n */\r\n@NgModule({\r\n declarations: [...decs],\r\n exports : [...decs,MaskitoModule],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n DynamicModule,\r\n HttpClientModule\r\n ],\r\n //Customizable providers\r\n providers:[ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider]\r\n})\r\nexport class MagicModule {\r\n\r\n}\r\n","import {MAT_DATE_LOCALE, NativeDateAdapter} from '@angular/material/core';\r\nimport { formatDate } from '@angular/common';\r\nimport {TaskMagicService} from \"./task.magics.service\";\r\nimport {Inject, Injectable} from \"@angular/core\";\r\n\r\nexport const MG_FORMATS = {\r\n parse: {dateInput: {month: 'short', year: 'numeric', day: 'numeric'}},\r\n display: {\r\n dateInput: 'input',\r\n monthYearLabel: {year: 'numeric', month: 'short'},\r\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\r\n monthYearA11yLabel: {year: 'numeric', month: 'long'}\r\n }\r\n};\r\n\r\n\r\n@Injectable()\r\nexport class MgDateAdapter extends NativeDateAdapter {\r\n public mgdtfmt: string = null;\r\n constructor(\r\n protected task: TaskMagicService,\r\n @Inject(MAT_DATE_LOCALE) public localeId: string\r\n ) {\r\n\r\n super(localeId);\r\n this.setLocale(localeId);\r\n }\r\n\r\n parse (value: any) : Date | null\r\n {\r\n let valueStr: string = value;\r\n let date = 0, month = 0, year = 0;\r\n let mgDateMask: string = this.mgdtfmt;\r\n let sep = valueStr.indexOf('/') > 0 ? '/' : '-';\r\n\r\n if (value == null || value == \"\") return null;\r\n if (this.mgdtfmt == null && this.task.mgInputDateFormat != null)\r\n this.mgdtfmt = this.task.mgInputDateFormat;\r\n if ((this.mgdtfmt.indexOf('MMM') > 0) || (this.mgdtfmt.indexOf('MMMM') > 0))\r\n return new Date(value);\r\n if (mgDateMask !== null) {\r\n for (let i=0; i < mgDateMask.length;) {\r\n switch (mgDateMask[i]) {\r\n case 'd': {\r\n let tmpStr: string;\r\n let len = valueStr.indexOf(sep, 0);\r\n tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);\r\n if (len > -1)\r\n valueStr = valueStr.substr(len+1);\r\n for (;mgDateMask[i] == 'd'; i++);\r\n date = (Number)(tmpStr);\r\n }\r\n break;\r\n case 'M': {\r\n let tmpStr: string;\r\n let len = valueStr.indexOf(sep, 0);\r\n tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);\r\n\r\n if (len > -1)\r\n valueStr = valueStr.substr(len+1);\r\n\r\n for (; mgDateMask[i] == 'M' ;i++);\r\n month = (Number)(tmpStr) > 0 ? (Number)(tmpStr)- 1 : 0;\r\n }\r\n break;\r\n case 'y': {\r\n let tmpStr;\r\n let len = valueStr.indexOf(sep, 0);\r\n tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);\r\n if (len > -1) {\r\n valueStr = valueStr.substr(len + 1);\r\n }\r\n for (; mgDateMask[i] == 'y' ;i++);\r\n year = (Number)(tmpStr);\r\n }\r\n break;\r\n default:\r\n i++;\r\n break;\r\n }\r\n }\r\n\r\n if (month == 0 && year == 0 && date == 0)\r\n return null;\r\n return new Date(year, month, date);\r\n }\r\n\r\n}\r\n\r\nformat(date: Date, displayFormat: Object): string {\r\n if (this.mgdtfmt == null && this.task.mgInputDateFormat != null)\r\n this.mgdtfmt = this.task.mgInputDateFormat;\r\n if (displayFormat === 'input') {\r\n if (this.mgdtfmt == null)\r\n this.mgdtfmt = 'M/d/yyyy'; //default format\r\n return formatDate(date,this.mgdtfmt,this.locale);\r\n } else {\r\n return date.toDateString();\r\n }\r\n }\r\n}\r\n\r\n","import { MagicServices } from \"./magic.services\";\r\nimport { TaskMagicService } from \"./task.magics.service\";\r\nimport { SubformMagicService } from \"./subform.magic.service\";\r\nimport { TableMagicService } from \"./table.magic.service\";\r\nimport { TitleMagicService } from \"./title.magic.service\";\r\nimport { AccessorMagicService } from \"./accessor.magic.service\";\r\nimport {MgDateAdapter, MG_FORMATS} from \"./mg-date-adapter\";\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\n\r\nexport const matDateProviders = [\r\n {provide: DateAdapter, useClass: MgDateAdapter},\r\n {provide: MAT_DATE_FORMATS, useValue: MG_FORMATS}\r\n];\r\n\r\n\r\n/**\r\n * Magic service providers\r\n */\r\nexport const basicMagicProviders = [\r\n MagicServices,\r\n TaskMagicService,\r\n SubformMagicService,\r\n TitleMagicService,\r\n AccessorMagicService,\r\n matDateProviders,\r\n];\r\n\r\n\r\n\r\n export const magicProviders = [\r\n ...basicMagicProviders,\r\n TableMagicService\r\n];\r\n","/**\r\n * @ignore\r\n */\r\n///////////////////////////////////////////////////////////\r\n// class to hold gui-related helper methods\r\n///////////////////////////////////////////////////////////\r\nexport class utils {\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Calculate the distance between the control and the supplied x,y coordinates\r\n ///////////////////////////////////////////////////////////\r\n static getDistance(control: Element, x: number, y: number): number {\r\n\r\n let left = control.clientLeft, top = control.clientTop;\r\n\r\n let dx, dy: number;\r\n const right = left + control.clientWidth;\r\n const bottom = top + control.clientHeight;\r\n\r\n if (x < left) {\r\n dx = left - x;\r\n } else if (x > right) {\r\n dx = x - right;\r\n } else {\r\n dx = 0;\r\n }\r\n\r\n if (y < top) {\r\n dy = top - y;\r\n } else if (y > bottom) {\r\n dy = y - bottom;\r\n } else {\r\n dy = 0;\r\n }\r\n const ret = (dx * dx + dy * dy)\r\n return ret;\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n //\r\n ///////////////////////////////////////////////////////////\r\n static getDimentions(el) {\r\n let xPos = 0;\r\n let yPos = 0;\r\n let width = el.width;\r\n let height = el.height;\r\n\r\n while (el) {\r\n if (el.tagName == \"BODY\") {\r\n // deal with browser quirks with body/window/document and page scroll\r\n let xScroll = el.scrollLeft || document.documentElement.scrollLeft;\r\n let yScroll = el.scrollTop || document.documentElement.scrollTop;\r\n\r\n xPos += (el.offsetLeft - xScroll + el.clientLeft);\r\n yPos += (el.offsetTop - yScroll + el.clientTop);\r\n } else {\r\n // for all other non-BODY elements\r\n xPos += (el.offsetLeft - el.scrollLeft + el.clientLeft);\r\n yPos += (el.offsetTop - el.scrollTop + el.clientTop);\r\n }\r\n\r\n el = el.offsetParent;\r\n\r\n }\r\n return {\r\n x: xPos,\r\n y: yPos,\r\n width: width,\r\n height: height\r\n };\r\n }\r\n\r\n}\r\n","/**\r\n * @ignore\r\n */\r\nexport class ModalFormDefinition {\r\n taskId: string = \"\";\r\n comp: any = null;\r\n parameters: any = {};\r\n}\r\n"],"names":["i1.EngineMagicService","i1.TaskMagicService","i3.ComponentListMagicService","i4.CommandsCollectorMagicService","i5.RouterCommandsMagicService","i6.MagicLazyLoaderService","i1","i2.EngineMagicService","i3.TaskMagicService","i4.ComponentListMagicService","i5.CommandsCollectorMagicService","i6.RouterCommandsMagicService","i1.ComponentListMagicService","i2.MagicLazyLoaderService","i3.MagicLazyLoaderService","i4.OverlayContainerMagicProvider","i5.ConfirmationComponentsMagicProvider","i2.OverlayWindowService","i2.TaskMagicService","i2.MagicColorService","i2.SubformMagicService","i3.TableMagicService","i4.TitleMagicService","i5.AccessorMagicService","i1.MagicServices","i2","i3.RowMagicDirective","i1.MagicDirective","i1.SubformMagicService","i2.AccessorMagicService","i2.ComponentListMagicService","i3","i4.OverlayWindowService","i5","i6.CommandsCollectorMagicService","i7","i8.ExitMagicService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAOa,eAAe,CAAA;AAC1B,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,UAAU,GAA6B,IAAI,GAAG,EAAE;AAChD,IAAA,UAAU,GAA0B,IAAI,GAAG,EAAE;AAC7C,IAAA,SAAS,GAA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