@yomotech/view-toolkit 1.0.30 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yomotech-view-toolkit.mjs","sources":["../../../projects/view-toolkit/src/lib/services/native-platform.ts","../../../projects/view-toolkit/src/lib/containers/pagination/pagination.component.ts","../../../projects/view-toolkit/src/lib/containers/pagination/pagination.component.html","../../../projects/view-toolkit/src/lib/components/string/string.ts","../../../projects/view-toolkit/src/lib/components/string/string.html","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.types.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.service.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.directive.ts","../../../projects/view-toolkit/src/lib/services/request.service.ts","../../../projects/view-toolkit/src/lib/services/utility.service.ts","../../../projects/view-toolkit/src/lib/services/calendar-locale.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/date-time-picker.service.ts","../../../projects/view-toolkit/src/lib/pipes/placeholder.pipe.ts","../../../projects/view-toolkit/src/lib/services/notification.service.ts","../../../projects/view-toolkit/src/lib/services/request-timeout.service.ts","../../../projects/view-toolkit/src/lib/services/remote-list.service.ts","../../../projects/view-toolkit/src/lib/services/couchdb.ts","../../../projects/view-toolkit/src/lib/services/config.service.ts","../../../projects/view-toolkit/src/lib/containers/card/card.component.ts","../../../projects/view-toolkit/src/lib/containers/card/card.component.html","../../../projects/view-toolkit/src/lib/components/label/label.ts","../../../projects/view-toolkit/src/lib/components/label/label.html","../../../projects/view-toolkit/src/lib/containers/form/form.component.ts","../../../projects/view-toolkit/src/lib/containers/form/form.component.html","../../../projects/view-toolkit/src/lib/containers/grid/grid.component.ts","../../../projects/view-toolkit/src/lib/containers/grid/grid.component.html","../../../projects/view-toolkit/src/lib/containers/header-menu/header-menu.component.ts","../../../projects/view-toolkit/src/lib/containers/header-menu/header-menu.component.html","../../../projects/view-toolkit/src/lib/services/network-log.service.ts","../../../projects/view-toolkit/src/lib/containers/logs/logs.component.ts","../../../projects/view-toolkit/src/lib/containers/logs/logs.component.html","../../../projects/view-toolkit/src/lib/components/field-renderer/field-policy.ts","../../../projects/view-toolkit/src/lib/controls/control-base.ts","../../../projects/view-toolkit/src/lib/controls/text-control.component.ts","../../../projects/view-toolkit/src/lib/controls/numeric-control.component.ts","../../../projects/view-toolkit/src/lib/controls/toggle-control.component.ts","../../../projects/view-toolkit/src/lib/controls/selection-control.component.ts","../../../projects/view-toolkit/src/lib/components/field-renderer/temporal-policy.ts","../../../projects/view-toolkit/src/lib/controls/temporal-control.component.ts","../../../projects/view-toolkit/src/lib/controls/media-control.component.ts","../../../projects/view-toolkit/src/lib/components/field-renderer/field-renderer.component.ts","../../../projects/view-toolkit/src/lib/components/field-renderer/field-renderer.component.html","../../../projects/view-toolkit/src/lib/components/textbox/textbox.ts","../../../projects/view-toolkit/src/lib/components/textbox/textbox.html","../../../projects/view-toolkit/src/lib/containers/model/model.component.ts","../../../projects/view-toolkit/src/lib/containers/model/model.component.html","../../../projects/view-toolkit/src/lib/components/autocomplete/autocomplete.ts","../../../projects/view-toolkit/src/lib/components/autocomplete/autocomplete.html","../../../projects/view-toolkit/src/lib/components/button/button.ts","../../../projects/view-toolkit/src/lib/components/button/button.html","../../../projects/view-toolkit/src/lib/components/date/date.ts","../../../projects/view-toolkit/src/lib/components/date/date.html","../../../projects/view-toolkit/src/lib/components/dropdown/dropdown.ts","../../../projects/view-toolkit/src/lib/components/dropdown/dropdown.html","../../../projects/view-toolkit/src/lib/components/error-message/error-message.ts","../../../projects/view-toolkit/src/lib/components/error-message/error-message.html","../../../projects/view-toolkit/src/lib/components/time/time.ts","../../../projects/view-toolkit/src/lib/components/time/time.html","../../../projects/view-toolkit/src/lib/services/mobile-oidc.service.ts","../../../projects/view-toolkit/src/lib/services/mobile-keycloak.service.ts","../../../projects/view-toolkit/src/lib/containers/side-menu/side-menu.component.ts","../../../projects/view-toolkit/src/lib/containers/side-menu/side-menu.component.html","../../../projects/view-toolkit/src/lib/view-toolkit.module.ts","../../../projects/view-toolkit/src/lib/app-version.ts","../../../projects/view-toolkit/src/lib/services/app-version-reset.service.ts","../../../projects/view-toolkit/src/lib/services/mobile-okta.service.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.layouts.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.component.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.component.html","../../../projects/view-toolkit/src/public-api.ts","../../../projects/view-toolkit/src/yomotech-view-toolkit.ts"],"sourcesContent":["// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - new: isNativeMobile(), the one answer to \"is this the app on iOS or Android\". The runtime asked\r\n// Angular CDK's Platform (platform.IOS / platform.ANDROID), which reads the browser's user agent;\r\n// an iPad has reported itself as a Mac there since iPadOS 13, so on the iPad the app behaved like\r\n// the web version - it signed in through the web flow (Keycloak: \"Invalid parameter:\r\n// redirect_uri\"). Capacitor knows the platform the app runs on.\r\n\r\nimport { Capacitor } from '@capacitor/core';\r\n\r\n/** True in the native app on iOS (iPhone and iPad) and Android; false in a browser. */\r\nexport function isNativeMobile(): boolean {\r\n const platform = Capacitor.getPlatform();\r\n\r\n return Capacitor.isNativePlatform() && (platform === 'ios' || platform === 'android');\r\n}\r\n\r\n/**\r\n * True in the native app on a phone - upright and in landscape alike (its shorter screen side is\r\n * below 600pt). Tablets get the tablet and desktop styles by width.\r\n */\r\nexport function isNativePhone(): boolean {\r\n return isNativeMobile() && Math.min(window.screen.width, window.screen.height) < 600;\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\nimport {\r\n Platform,\r\n PlatformModule\r\n} from '@angular/cdk/platform';\r\n\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport {\r\n Component,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n Output\r\n} from '@angular/core';\r\n\r\nimport { FormsModule } from '@angular/forms';\r\nimport { isNativeMobile } from '../../services/native-platform';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'vl-pagination',\r\n templateUrl: './pagination.component.html',\r\n styleUrl: './pagination.component.css',\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n PlatformModule\r\n ]\r\n})\r\nexport class PaginationComponent implements OnInit {\r\n @Input() itemInfo: any = {\r\n layoutSchema: {},\r\n propertySchema: {},\r\n data: []\r\n };\r\n\r\n @Input() pageSize: any;\r\n @Input() currentPage: number = 0;\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() pages: number[] = [];\r\n\r\n @Output() pageSizeChange =\r\n new EventEmitter<any>();\r\n\r\n @Output() onGoToPage =\r\n new EventEmitter<any>();\r\n\r\n isMobile: boolean = false;\r\n\r\n constructor(\r\n private platform: Platform\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.updateDeviceMode();\r\n }\r\n\r\n @HostListener('window:resize')\r\n onWindowResize(): void {\r\n this.updateDeviceMode();\r\n }\r\n\r\n private updateDeviceMode(): void {\r\n const isNativeApp =\r\n isNativeMobile();\r\n\r\n const isSmallScreen =\r\n typeof window !== 'undefined' &&\r\n window.innerWidth <= 768;\r\n\r\n this.isMobile =\r\n isNativeApp || isSmallScreen;\r\n }\r\n\r\n get isFirstPage(): boolean {\r\n return (\r\n !this.pages?.length ||\r\n this.currentPage <= 0\r\n );\r\n }\r\n\r\n get isLastPage(): boolean {\r\n return (\r\n !this.pages?.length ||\r\n this.currentPage >=\r\n this.pages.length - 1\r\n );\r\n }\r\n\r\n /*\r\n * Desktop returns the original schema style unchanged.\r\n * Mobile overrides only the layout direction.\r\n */\r\n get paginationStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.style\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n display: 'flex',\r\n 'flex-direction': 'column',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n gap: '8px',\r\n width: '100%',\r\n padding: '8px',\r\n overflow: 'hidden',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n get listStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.listStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n display: 'flex',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n 'flex-wrap': 'nowrap',\r\n gap: '4px',\r\n width: '100%',\r\n margin: '0',\r\n padding: '0',\r\n overflow: 'hidden',\r\n 'list-style': 'none',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n get sizeControlStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.sizeControlStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n display: 'flex',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n gap: '8px',\r\n width: '100%',\r\n 'min-width': '0',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n getPaginationCaption(){\r\n let caption = this.itemInfo?.layoutSchema?.pagination?.caption;\r\n if(caption && this.selectedLanguageInfo && this.selectedLanguageInfo.selectedLanguage && this.selectedLanguageInfo.selectedLanguage[caption]){\r\n caption = this.selectedLanguageInfo.selectedLanguage[caption];\r\n }\r\n return caption;\r\n }\r\n\r\n get labelStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.labelStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n 'white-space': 'nowrap',\r\n 'font-size': baseStyle['font-size'] || '13px'\r\n };\r\n }\r\n\r\n get selectStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.selectStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n width: '68px',\r\n 'min-width': '68px',\r\n 'max-width': '68px'\r\n };\r\n }\r\n\r\n get pageSummaryStyle(): Record<string, any> {\r\n const pagination =\r\n this.itemInfo?.layoutSchema\r\n ?.pagination || {};\r\n\r\n const baseStyle = this.getStyle(\r\n pagination.itemStyle\r\n );\r\n\r\n const activeStyle = this.getStyle(\r\n pagination.activeItemStyle\r\n );\r\n\r\n return {\r\n ...baseStyle,\r\n ...activeStyle,\r\n width: '64px',\r\n 'min-width': '64px',\r\n height: '32px',\r\n padding: '0 6px',\r\n cursor: 'default',\r\n 'pointer-events': 'none',\r\n 'white-space': 'nowrap',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n getStyle(\r\n styleObject: any\r\n ): Record<string, any> {\r\n if (\r\n !styleObject ||\r\n typeof styleObject !== 'object'\r\n ) {\r\n return {};\r\n }\r\n\r\n const {\r\n classes,\r\n ...styleWithoutClasses\r\n } = styleObject;\r\n\r\n return styleWithoutClasses;\r\n }\r\n\r\n getPageItemStyle(\r\n page?: number,\r\n disabled: boolean = false\r\n ): Record<string, any> {\r\n const pagination =\r\n this.itemInfo?.layoutSchema\r\n ?.pagination || {};\r\n\r\n const baseStyle = this.getStyle(\r\n pagination.itemStyle\r\n );\r\n\r\n const activeStyle =\r\n page !== undefined &&\r\n this.currentPage === page\r\n ? this.getStyle(\r\n pagination.activeItemStyle\r\n )\r\n : {};\r\n\r\n const disabledStyle = disabled\r\n ? this.getStyle(\r\n pagination.disabledItemStyle\r\n )\r\n : {};\r\n\r\n /*\r\n * Desktop gets no additional styling.\r\n */\r\n const mobileStyle = this.isMobile\r\n ? {\r\n width: '32px',\r\n 'min-width': '32px',\r\n height: '32px',\r\n padding: '0'\r\n }\r\n : {};\r\n\r\n return {\r\n ...baseStyle,\r\n ...activeStyle,\r\n ...disabledStyle,\r\n ...mobileStyle,\r\n 'pointer-events': disabled\r\n ? 'none'\r\n : 'auto'\r\n };\r\n }\r\n\r\n invokeOnPageSizeChange(\r\n pageSize: any\r\n ): void {\r\n const normalizedPageSize =\r\n Number(pageSize);\r\n\r\n if (\r\n !Number.isFinite(\r\n normalizedPageSize\r\n ) ||\r\n normalizedPageSize <= 0\r\n ) {\r\n return;\r\n }\r\n\r\n this.pageSizeChange.emit(\r\n normalizedPageSize\r\n );\r\n }\r\n\r\n invokeGoToPage(page: number): void {\r\n if (\r\n page < 0 ||\r\n page > this.pages.length - 1 ||\r\n page === this.currentPage\r\n ) {\r\n return;\r\n }\r\n\r\n this.onGoToPage.emit(page);\r\n }\r\n}","<div [ngStyle]=\"paginationStyle\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n ««\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n «\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\r\n »\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\r\n »»\r\n </li>\r\n\r\n </ng-container>\r\n\r\n <!-- Compact mobile pagination -->\r\n <ng-container *ngIf=\"isMobile\">\r\n\r\n <!-- First -->\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\">\r\n ««\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\">\r\n «\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\">\r\n {{ currentPage + 1 }} / {{ pages.length }}\r\n </li>\r\n\r\n <!-- Next -->\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\">\r\n »\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\">\r\n »»\r\n </li>\r\n\r\n </ng-container>\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" [ngStyle]=\"sizeControlStyle\">\r\n <label for=\"pageSize\" [ngStyle]=\"labelStyle\">\r\n {{ getPaginationCaption() }}\r\n </label>\r\n\r\n <select id=\"pageSize\" [(ngModel)]=\"pageSize\" (change)=\"invokeOnPageSizeChange(pageSize)\"\r\n [ngStyle]=\"selectStyle\">\r\n <option *ngFor=\"\r\n let size of\r\n itemInfo?.layoutSchema\r\n ?.pagination?.pageSizeOptions ||\r\n [5, 10, 15, 20]\r\n \" [value]=\"size\">\r\n {{ size }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n</div>","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-string',\r\n standalone: true,\r\n templateUrl: './string.html',\r\n styleUrl: './string.css',\r\n})\r\nexport class String {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n}\r\n","<h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n</h5>","// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: resolveCustomKeyboardType. The keyboards were only switched on by option.keyboardType,\r\n// which no layout schema sets, so on the devices every field got the system keyboard and the\r\n// toolkit keyboards never appeared. The type of the attribute now selects the keyboard;\r\n// option.keyboardType still wins, and 'native' or 'none' keeps the system keyboard for a field\r\n\r\nexport type CustomKeyboardType =\r\n | 'email'\r\n | 'numeric'\r\n | 'alpha'\r\n | 'string'\r\n | 'date'\r\n | 'time';\r\n\r\nexport function normalizeCustomKeyboardType(\r\n value: unknown\r\n): CustomKeyboardType | null {\r\n if (\r\n value === 'email' ||\r\n value === 'numeric' ||\r\n value === 'alpha' ||\r\n value === 'string' ||\r\n value === 'date' ||\r\n value === 'time'\r\n ) {\r\n return value;\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Keyboard for a field: option.keyboardType when the layout sets one, otherwise derived from the\r\n * attribute (property schema) type. Returns null where the system keyboard stays in charge.\r\n */\r\nexport function resolveCustomKeyboardType(\r\n option: any,\r\n property: any\r\n): CustomKeyboardType | null {\r\n const explicit = option?.keyboardType;\r\n\r\n if (explicit === 'native' || explicit === 'none') {\r\n return null;\r\n }\r\n\r\n const normalized = normalizeCustomKeyboardType(explicit);\r\n\r\n if (normalized) {\r\n return normalized;\r\n }\r\n\r\n if (option?.password) {\r\n return null;\r\n }\r\n\r\n if (option?.email || property?.format === 'email') {\r\n return 'email';\r\n }\r\n\r\n switch (property?.type) {\r\n case 'date':\r\n return 'date';\r\n case 'time':\r\n return 'time';\r\n case 'number':\r\n case 'integer':\r\n return 'numeric';\r\n case 'string':\r\n case 'autocomplete':\r\n return 'string';\r\n default:\r\n return null;\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: keyboard and calendar take the background colour of the page behind them\r\n// (--vl-page-background; a project may set --vl-keyboard-background instead)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: scrolling the dialog with the toolkit keyboard open brought up the iOS keyboard. The press\r\n// that starts a swipe closed the toolkit keyboard and gave the field its inputmode back while it\r\n// still had the focus. Now only a tap closes it, and inputmode=\"none\" stays until the field has\r\n// lost the focus\r\n// - change: in landscape keyboard and calendar dock at the right edge on every device - phone and\r\n// tablet, in a dialog and on a page without one (e.g. \"Booked Time Recording\"); on the iPad and on\r\n// pages they came at the bottom over the full width. Dialog or page stand left of the panel\r\n// (app styles, vl-side-dock / vl-side-layout)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: string accepts every printable character and alpha every letter of any language. The\r\n// old A-Z rules rejected ä, ö, ü, ß and all punctuation the new layouts offer\r\n// - new: reserveBottomArea / releaseBottomArea. A date or time picker docked at the bottom takes\r\n// the place of the keyboard, and the dialog has to end above it exactly as it does above the\r\n// keyboard, otherwise the lower fields and the save button lie underneath\r\n// - change: the keyboard starts with its last measured height instead of the 360 px CSS fallback\r\n// - change: switching between keyboard and picker - either way - keeps the bottom area reserved, so the dialog\r\n// no longer jumps up and down in between\r\n// - change: on iOS the active field is no longer set readonly, only inputmode=\"none\"; iOS draws no\r\n// cursor in a readonly field, so tapping into a date to change the month did nothing\r\n// - change: date and time are edited at the cursor - a digit overwrites the one right of it,\r\n// Backspace at the end removes a digit and inside the value steps one digit back; before,\r\n// both only worked at the end\r\n// - change: every typed key sends keydown before input, as a real keyboard does. PrimeNG DatePicker\r\n// ignores input without it, so dates typed on the toolkit keyboard were lost\r\n// - change: open() clears a stale \"picker open\" flag when no picker panel is left in the page\r\n// - change: endPickerOverlay can skip the 250 ms reopen pause. When the user closes a picker by\r\n// tapping into its field, that tap must open the keyboard, not be swallowed as a focus bounce\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-09\r\n// - fix: the tapped field now always stands fully above the keyboard. In a dialog scrolled while\r\n// the calendar was open, a time field tapped near its lower edge stayed three quarters hidden\r\n// under the keyboard that replaced the calendar. It moves only once the tap is complete: the\r\n// keyboard opens on touch-down, and scrolling before the finger lifted sent the click past the\r\n// field, which lost its focus and its green frame\r\n// - fix: a field near the bottom lost its focus and green frame: the keyboard opens on touch-down\r\n// right under the finger, and the click of the same tap landed on the keyboard. Once the tap is\r\n// complete the field gets its focus back\r\n// - fix: tapping a text field while the time or date picker was open brought up the system\r\n// keyboard. The toolkit keyboard refused to open while a picker was open, the picker closed only\r\n// afterwards. A tap into a field outside the picker now closes the picker first\r\n// - fix: turning the device with the keyboard open kept the portrait keyboard height reserved; in\r\n// landscape only a 20 px strip of the dialog was left. The height is measured again on resize\r\n// - new: side dock. Where a panel docked at the bottom would leave less than about two fields of\r\n// the dialog visible and there is room beside it - a phone in landscape - the keyboard and the\r\n// calendar both dock at the right edge over the full height, the dialog stands beside them.\r\n// Decided from the space at hand (dockAtSide), the same for keyboard and calendar, so switching\r\n// between them never moves the dialog. Switching from one field to the next keeps the dock\r\n// - fix: a tap outside closes the keyboard at once but frees its space only once the tap is\r\n// complete; freed at touch-down the dialog moved under the finger and the tap missed - the close\r\n// button of the dialog needed a second tap\r\n// - change: the panel lines up with the dialog - at the side with its upper and lower edge, at the\r\n// bottom with its left and right edge; the dialog keeps its own size. At the side the panel is\r\n// 320 px wide, the calendar's natural width, the dialog gets the rest - at half the screen the\r\n// calendar was wider than the dialog\r\n// - new: sideDockWidth() exported - the app keeps the dialog left of the side panels for as long\r\n// as it is open, so it no longer moves and flickers when a keyboard or the calendar comes or goes\r\n\r\nimport { Injectable, signal } from '@angular/core';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { Keyboard } from '@capacitor/keyboard';\r\nimport { CustomKeyboardType } from './custom-keyboard.types';\r\n\r\nexport type CustomKeyboardTarget =\r\n | HTMLInputElement\r\n | HTMLTextAreaElement;\r\n\r\ninterface CustomKeyboardSession {\r\n target: CustomKeyboardTarget;\r\n type: CustomKeyboardType;\r\n originalReadOnly: boolean;\r\n originalInputMode: string | null;\r\n originalInputType: string | null;\r\n}\r\n\r\n/** Set on body while keyboard or calendar stand at the right edge instead of the bottom. */\r\nexport const SIDE_DOCK_CLASS = 'vl-side-dock';\r\n/** Dialog content (about two fields) that has to stay visible above a panel docked at the bottom. */\r\nconst MIN_VISIBLE_CONTENT = 150;\r\n/** Width the dialog needs at least to stand beside a panel docked at the side. */\r\nconst MIN_DIALOG_WIDTH = 360;\r\n/** Width of keyboard and calendar at the side - the calendar's natural width. */\r\nconst SIDE_PANEL_WIDTH = 320;\r\n\r\n/**\r\n * Side or bottom, decided from the space at hand rather than a device or an orientation: docked at\r\n * the bottom, a panel (keyboard or calendar, up to about half the height) must leave about two of\r\n * the dialog's fields visible below its header. If it would not and the dialog still has room\r\n * beside a panel, the panels dock at the right edge - and the dialog stands left of them for as\r\n * long as it is open, so it never moves. Returns the width kept free at the right (panel plus its\r\n * distance to the screen edge), or null for the bottom. Also used by the app to place the dialog.\r\n */\r\nexport function sideDockWidth(): number | null {\r\n const platform = Capacitor.getPlatform();\r\n\r\n if (!Capacitor.isNativePlatform() || (platform !== 'ios' && platform !== 'android')) {\r\n return null;\r\n }\r\n\r\n const width = window.innerWidth;\r\n const height = window.innerHeight;\r\n const sideWidth = SIDE_PANEL_WIDTH + Math.max(8, safeAreaRight());\r\n const bottomPanel = Math.min(height * 0.52, 420);\r\n const dialog = document.querySelector<HTMLElement>('.p-dialog');\r\n const header = dialog?.querySelector<HTMLElement>('.p-dialog-header');\r\n const contentTop = dialog\r\n ? Math.max(dialog.getBoundingClientRect().top, 0) + (header?.getBoundingClientRect().height ?? 0)\r\n : 0;\r\n // In landscape the panels stand at the right edge - phone and tablet, dialog or page alike -\r\n // and dialog or page stand left of them. Upright they dock at the bottom, unless a dialog would\r\n // keep too little visible above them.\r\n const landscape = width > height;\r\n const tooLittleHeight = !!dialog && height - bottomPanel - contentTop < MIN_VISIBLE_CONTENT;\r\n const roomBeside = width - sideWidth >= MIN_DIALOG_WIDTH;\r\n\r\n return (landscape || tooLittleHeight) && roomBeside ? sideWidth : null;\r\n}\r\n\r\n/** The right safe-area inset in px; a custom property holds env() only as text. */\r\nfunction safeAreaRight(): number {\r\n const probe = document.createElement('div');\r\n probe.style.cssText = 'position:fixed;visibility:hidden;padding-right:env(safe-area-inset-right, 0px)';\r\n document.body.appendChild(probe);\r\n const inset = parseFloat(getComputedStyle(probe).paddingRight) || 0;\r\n probe.remove();\r\n return inset;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CustomKeyboardService {\r\n private openingSuspendedUntil = 0;\r\n private tapsTracked = false;\r\n private lastPointerDownAt = 0;\r\n private lastClickAt = 0;\r\n /** Set by DateTimePickerService: closes the open picker when another field is tapped. */\r\n private pickerCloser: (() => void) | null = null;\r\n /** Watches the dialog a side-docked panel lines up with. */\r\n private dialogObserver: { target: HTMLElement; observer: ResizeObserver } | null = null;\r\n\r\n constructor() {\r\n // From the start: the very first tap into a field has to be seen as well.\r\n this.trackTaps();\r\n\r\n // Turning the device changes the keyboard's height; the reserved area has to follow.\r\n window.addEventListener('resize', () => {\r\n if (this.activeSession()) {\r\n this.applyDock();\r\n this.updateKeyboardHeight();\r\n }\r\n });\r\n }\r\n private lastKeyboardHeight = 0;\r\n private pickerOverlayOpen = false;\r\n private pickerTriggerPressedUntil = 0;\r\n readonly interactionBlocked = signal(false);\r\n private interactionUnlockTimer: number | null = null;\r\n readonly activeSession =\r\n signal<CustomKeyboardSession | null>(null);\r\n\r\n isNativeMobile(): boolean {\r\n return (\r\n Capacitor.isNativePlatform() &&\r\n (\r\n Capacitor.getPlatform() === 'android' ||\r\n Capacitor.getPlatform() === 'ios'\r\n )\r\n );\r\n }\r\n\r\n async open(\r\n target: CustomKeyboardTarget,\r\n type: CustomKeyboardType\r\n ): Promise<void> {\r\n /*\r\n * A picker whose dialog was destroyed never reports its end. With no picker panel left in\r\n * the page the flag is stale; keeping it would block every keyboard from now on.\r\n */\r\n if (\r\n this.pickerOverlayOpen &&\r\n !document.querySelector('.model-datepicker-panel')\r\n ) {\r\n this.endPickerOverlay({ suspendReopen: false });\r\n }\r\n\r\n /*\r\n * A field outside the open picker was tapped: the picker gives way, otherwise this field\r\n * would get its focus without a toolkit keyboard - and with the system keyboard.\r\n */\r\n if (\r\n this.pickerOverlayOpen &&\r\n this.pickerCloser &&\r\n !target.closest('.model-datepicker-panel')\r\n ) {\r\n this.pickerCloser();\r\n }\r\n\r\n if (\r\n !this.isNativeMobile() ||\r\n target.disabled ||\r\n this.pickerOverlayOpen ||\r\n Date.now() < this.openingSuspendedUntil\r\n ) {\r\n return;\r\n }\r\n const currentSession = this.activeSession();\r\n\r\n if (currentSession?.target === target) {\r\n return;\r\n }\r\n\r\n if (currentSession) {\r\n // Switching fields: the dock stays where it is, otherwise the dialog flickered between\r\n // the side layout and the full width while the finger was still down.\r\n this.close({\r\n restoreAccessoryBar: false,\r\n keepBottomArea: true\r\n });\r\n }\r\n\r\n const originalInputType =\r\n target instanceof HTMLInputElement\r\n ? target.getAttribute('type')\r\n : null;\r\n\r\n const session: CustomKeyboardSession = {\r\n target,\r\n type,\r\n originalReadOnly: target.readOnly,\r\n originalInputMode: target.getAttribute('inputmode'),\r\n originalInputType\r\n };\r\n\r\n /*\r\n * readonly is the most reliable way to prevent the native keyboard on Android. iOS shows no\r\n * cursor in a readonly field, so a date could not be edited at a tapped position there;\r\n * inputmode=\"none\" alone keeps the iOS keyboard away (iOS 12.2+) and leaves the cursor.\r\n */\r\n if (Capacitor.getPlatform() !== 'ios') {\r\n target.readOnly = true;\r\n }\r\n\r\n target.setAttribute('inputmode', 'none');\r\n\r\n /*\r\n * type=\"number\" cannot temporarily contain values such as:\r\n * \"-\", \".\", or \"12.\".\r\n *\r\n * Switch it to text while the custom keyboard is active.\r\n */\r\n if (\r\n target instanceof HTMLInputElement &&\r\n target.type === 'number'\r\n ) {\r\n target.type = 'text';\r\n }\r\n\r\n this.activeSession.set(session);\r\n this.blockInitialInteraction(session);\r\n this.applyDock();\r\n\r\n this.updateKeyboardHeight();\r\n document.addEventListener(\r\n 'pointerdown',\r\n this.documentPointerDownHandler,\r\n true\r\n );\r\n\r\n try {\r\n if (Capacitor.getPlatform() === 'ios') {\r\n await Keyboard.setAccessoryBarVisible({\r\n isVisible: false\r\n });\r\n }\r\n\r\n await Keyboard.hide();\r\n } catch {\r\n // The native keyboard may already be closed.\r\n }\r\n\r\n /*\r\n * The keyboard may have closed while Keyboard.hide()\r\n * was running.\r\n */\r\n if (this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n target.focus({\r\n preventScroll: true\r\n });\r\n\r\n this.scrollTargetIntoDialogView(target);\r\n\r\n this.moveCursorToEnd(target);\r\n\r\n window.setTimeout(() => {\r\n if (this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n target.addEventListener(\r\n 'blur',\r\n this.activeTargetBlurHandler\r\n );\r\n }, 350);\r\n }, 50);\r\n }\r\n\r\n private blockInitialInteraction(\r\n session: CustomKeyboardSession\r\n ): void {\r\n if (this.interactionUnlockTimer !== null) {\r\n window.clearTimeout(\r\n this.interactionUnlockTimer\r\n );\r\n }\r\n\r\n this.interactionBlocked.set(true);\r\n\r\n this.interactionUnlockTimer =\r\n window.setTimeout(() => {\r\n this.interactionUnlockTimer = null;\r\n\r\n if (this.activeSession() === session) {\r\n this.interactionBlocked.set(false);\r\n }\r\n }, 350);\r\n }\r\n\r\n private scrollTargetIntoDialogView(\r\n target: CustomKeyboardTarget\r\n ): void {\r\n window.requestAnimationFrame(() => {\r\n const dialogContent =\r\n target.closest<HTMLElement>(\r\n '.p-dialog-content'\r\n );\r\n\r\n /*\r\n * Fallback for inputs outside a PrimeNG dialog.\r\n */\r\n if (!dialogContent) {\r\n target.scrollIntoView({\r\n behavior: 'auto',\r\n block: 'nearest',\r\n inline: 'nearest'\r\n });\r\n\r\n return;\r\n }\r\n\r\n const targetRect =\r\n target.getBoundingClientRect();\r\n\r\n const containerRect =\r\n dialogContent.getBoundingClientRect();\r\n\r\n const spacing = 16;\r\n\r\n const maximumVisibleBottom =\r\n containerRect.bottom - spacing;\r\n\r\n const minimumVisibleTop =\r\n containerRect.top + spacing;\r\n\r\n if (targetRect.bottom > maximumVisibleBottom) {\r\n dialogContent.scrollTop +=\r\n targetRect.bottom -\r\n maximumVisibleBottom;\r\n } else if (targetRect.top < minimumVisibleTop) {\r\n dialogContent.scrollTop -=\r\n minimumVisibleTop -\r\n targetRect.top;\r\n }\r\n });\r\n }\r\n\r\n private updateKeyboardHeight(): void {\r\n /*\r\n * Wait for Angular to render the keyboard first.\r\n */\r\n window.requestAnimationFrame(() => {\r\n window.requestAnimationFrame(() => {\r\n const keyboardElement =\r\n document.querySelector<HTMLElement>(\r\n '[data-vl-custom-keyboard]'\r\n );\r\n\r\n if (!keyboardElement) {\r\n return;\r\n }\r\n\r\n const keyboardHeight = Math.ceil(\r\n keyboardElement.getBoundingClientRect().height\r\n );\r\n\r\n // Measured at the bottom only; at the side the keyboard covers no dialog height.\r\n if (!document.body.classList.contains(SIDE_DOCK_CLASS)) {\r\n this.lastKeyboardHeight = keyboardHeight;\r\n\r\n document.body.style.setProperty(\r\n '--vl-custom-keyboard-height',\r\n `${keyboardHeight}px`\r\n );\r\n }\r\n\r\n this.afterTap(() => {\r\n this.refocusTarget();\r\n this.scrollTargetAboveKeyboard();\r\n });\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Runs once the tap that opened the keyboard is complete. The keyboard opens on touch-down; a\r\n * scroll before the finger lifts makes the click land beside the field, which then loses its\r\n * focus. Without a tap in progress it runs on the next frame.\r\n */\r\n private afterTap(run: () => void): void {\r\n this.trackTaps();\r\n\r\n const tapInProgress =\r\n this.lastPointerDownAt > this.lastClickAt &&\r\n Date.now() - this.lastPointerDownAt < 1000;\r\n\r\n if (!tapInProgress) {\r\n window.requestAnimationFrame(run);\r\n return;\r\n }\r\n\r\n let done = false;\r\n const finish = (): void => {\r\n if (done) {\r\n return;\r\n }\r\n\r\n done = true;\r\n document.removeEventListener('click', onClick, true);\r\n window.clearTimeout(timer);\r\n window.requestAnimationFrame(run);\r\n };\r\n // After the click has reached its target, not before.\r\n const onClick = (): void => {\r\n window.setTimeout(finish, 0);\r\n };\r\n const timer = window.setTimeout(finish, 600);\r\n\r\n document.addEventListener('click', onClick, true);\r\n }\r\n\r\n /**\r\n * Height of the keyboard docked at the bottom: the last measured one, or the height its\r\n * screen-relative key sizes give (see the stylesheet) before it was ever shown.\r\n */\r\n keyboardHeight(): number {\r\n if (this.lastKeyboardHeight) {\r\n return this.lastKeyboardHeight;\r\n }\r\n\r\n const vh = window.innerHeight / 100;\r\n const clamp = (min: number, value: number, max: number) => Math.min(max, Math.max(min, value));\r\n const key = clamp(28, 5.6 * vh, 46);\r\n const gap = clamp(3, 0.8 * vh, 6);\r\n const action = clamp(28, 5.2 * vh, 42);\r\n // Padding 8 px above and below; the gap to the screen edge lies outside the keyboard.\r\n return Math.round(4 * (key + gap) + action + 16);\r\n }\r\n\r\n /** Hands the picker closer over; see pickerCloser. */\r\n setPickerCloser(closer: () => void): void {\r\n this.pickerCloser = closer;\r\n }\r\n\r\n /**\r\n * The keyboard opens on touch-down; under a field near the bottom it slides in under the\r\n * finger and the click of the same tap lands on it, so the field never got its focus.\r\n */\r\n private refocusTarget(): void {\r\n const target = this.activeSession()?.target as HTMLElement | undefined;\r\n\r\n if (target && document.activeElement !== target) {\r\n target.focus({ preventScroll: true });\r\n }\r\n }\r\n\r\n private trackTaps(): void {\r\n if (this.tapsTracked) {\r\n return;\r\n }\r\n\r\n this.tapsTracked = true;\r\n document.addEventListener('pointerdown', () => (this.lastPointerDownAt = Date.now()), true);\r\n document.addEventListener('click', () => (this.lastClickAt = Date.now()), true);\r\n }\r\n\r\n /**\r\n * Scrolls the dialog just far enough that the active field stands fully above the keyboard,\r\n * or fully below the dialog header when it went up out of sight. A field already in view\r\n * does not move.\r\n */\r\n private scrollTargetAboveKeyboard(): void {\r\n const target = this.activeSession()?.target as HTMLElement | undefined;\r\n const content = target?.closest<HTMLElement>('.p-dialog-content');\r\n\r\n if (!target || !content) {\r\n return;\r\n }\r\n\r\n const spacing = 12;\r\n const field = (target.closest<HTMLElement>('.picker-field') ?? target).getBoundingClientRect();\r\n const area = content.getBoundingClientRect();\r\n\r\n if (field.bottom > area.bottom - spacing) {\r\n content.scrollTop += field.bottom - (area.bottom - spacing);\r\n } else if (field.top < area.top + spacing) {\r\n content.scrollTop -= area.top + spacing - field.top;\r\n }\r\n }\r\n\r\n private canProcessKeyboardAction(): boolean {\r\n return (\r\n !this.interactionBlocked() &&\r\n this.activeSession() !== null\r\n );\r\n }\r\n\r\n insert(character: string): void {\r\n if (!this.canProcessKeyboardAction()) {\r\n return;\r\n }\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n const { target, type } = session;\r\n if (\r\n type === 'date' ||\r\n type === 'time'\r\n ) {\r\n this.insertDateTimeDigit(\r\n target,\r\n type,\r\n character\r\n );\r\n\r\n return;\r\n }\r\n const currentValue = target.value ?? '';\r\n\r\n const start =\r\n target.selectionStart ?? currentValue.length;\r\n\r\n const end =\r\n target.selectionEnd ?? currentValue.length;\r\n\r\n const nextValue =\r\n currentValue.slice(0, start) +\r\n character +\r\n currentValue.slice(end);\r\n\r\n if (!this.isValidValue(nextValue, type)) {\r\n return;\r\n }\r\n\r\n this.updateTarget(\r\n target,\r\n nextValue,\r\n start + character.length\r\n );\r\n }\r\n\r\n backspace(): void {\r\n if (!this.canProcessKeyboardAction()) {\r\n return;\r\n }\r\n\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n if (\r\n session.type === 'date' ||\r\n session.type === 'time'\r\n ) {\r\n this.removeDateTimeDigit(\r\n session.target,\r\n session.type\r\n );\r\n\r\n return;\r\n }\r\n\r\n const target = session.target;\r\n const currentValue = target.value ?? '';\r\n\r\n const start =\r\n target.selectionStart ?? currentValue.length;\r\n\r\n const end =\r\n target.selectionEnd ?? currentValue.length;\r\n\r\n if (start !== end) {\r\n const nextValue =\r\n currentValue.slice(0, start) +\r\n currentValue.slice(end);\r\n\r\n this.updateTarget(\r\n target,\r\n nextValue,\r\n start\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (start <= 0) {\r\n return;\r\n }\r\n\r\n const nextValue =\r\n currentValue.slice(0, start - 1) +\r\n currentValue.slice(start);\r\n\r\n this.updateTarget(\r\n target,\r\n nextValue,\r\n start - 1\r\n );\r\n }\r\n\r\n clear(): void {\r\n if (!this.canProcessKeyboardAction()) {\r\n return;\r\n }\r\n const target =\r\n this.activeSession()?.target;\r\n\r\n if (!target) {\r\n return;\r\n }\r\n\r\n this.updateTarget(target, '', 0);\r\n }\r\n\r\n close(\r\n option: {\r\n blurTarget?: boolean;\r\n restoreAccessoryBar?: boolean;\r\n keepBottomArea?: boolean;\r\n } = {}\r\n ): void {\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n const {\r\n blurTarget = true,\r\n restoreAccessoryBar = true,\r\n keepBottomArea = false\r\n } = option;\r\n\r\n const { target } = session;\r\n\r\n document.removeEventListener(\r\n 'pointerdown',\r\n this.documentPointerDownHandler,\r\n true\r\n );\r\n\r\n target.removeEventListener(\r\n 'blur',\r\n this.activeTargetBlurHandler\r\n );\r\n\r\n this.activeSession.set(null);\r\n if (this.interactionUnlockTimer !== null) {\r\n window.clearTimeout(\r\n this.interactionUnlockTimer\r\n );\r\n\r\n this.interactionUnlockTimer = null;\r\n }\r\n\r\n this.interactionBlocked.set(false);\r\n\r\n /*\r\n * Restore input attributes before dispatching the final\r\n * change event.\r\n */\r\n target.readOnly = session.originalReadOnly;\r\n\r\n // inputmode=\"none\" stays while the field still has the focus: without it iOS puts its own\r\n // keyboard on the field. It goes back once the field has lost the focus.\r\n const restoreInputMode = (): void => {\r\n if (session.originalInputMode === null) {\r\n target.removeAttribute('inputmode');\r\n } else {\r\n target.setAttribute('inputmode', session.originalInputMode);\r\n }\r\n };\r\n\r\n if (target instanceof HTMLInputElement) {\r\n if (session.originalInputType === null) {\r\n target.removeAttribute('type');\r\n } else {\r\n target.setAttribute(\r\n 'type',\r\n session.originalInputType\r\n );\r\n }\r\n }\r\n\r\n target.dispatchEvent(\r\n new Event('change', {\r\n bubbles: true\r\n })\r\n );\r\n\r\n if (blurTarget) {\r\n target.blur();\r\n }\r\n\r\n if (document.activeElement === target) {\r\n target.addEventListener('blur', restoreInputMode, { once: true });\r\n } else {\r\n restoreInputMode();\r\n }\r\n\r\n if (!keepBottomArea) {\r\n this.clearDock();\r\n }\r\n\r\n if (\r\n restoreAccessoryBar &&\r\n this.isNativeMobile() &&\r\n Capacitor.getPlatform() === 'ios'\r\n ) {\r\n void Keyboard.setAccessoryBarVisible({\r\n isVisible: true\r\n }).catch(() => {\r\n // Ignore restoration failures.\r\n });\r\n }\r\n }\r\n\r\n closeIfTargetInside(\r\n container: HTMLElement\r\n ): void {\r\n const target =\r\n this.activeSession()?.target;\r\n\r\n if (target && container.contains(target)) {\r\n this.close();\r\n }\r\n }\r\n\r\n private updateTarget(\r\n target: CustomKeyboardTarget,\r\n value: string,\r\n cursorPosition: number\r\n ): void {\r\n /*\r\n * A real key sends keydown before the value changes. PrimeNG DatePicker drops every input\r\n * event without one (onUserInput checks isKeydown), so a date typed here never reached the\r\n * model and vanished on blur.\r\n */\r\n target.dispatchEvent(\r\n new KeyboardEvent('keydown', {\r\n bubbles: true,\r\n key: 'Unidentified'\r\n })\r\n );\r\n\r\n target.value = value;\r\n\r\n /*\r\n * Angular's DefaultValueAccessor and NumberValueAccessor\r\n * listen to this event, so ngModel is updated normally.\r\n */\r\n target.dispatchEvent(\r\n new Event('input', {\r\n bubbles: true,\r\n composed: true\r\n })\r\n );\r\n\r\n queueMicrotask(() => {\r\n try {\r\n target.setSelectionRange(\r\n cursorPosition,\r\n cursorPosition\r\n );\r\n } catch {\r\n // Some specialized inputs do not support selection ranges.\r\n }\r\n });\r\n }\r\n\r\n private isValidValue(\r\n value: string,\r\n type: CustomKeyboardType\r\n ): boolean {\r\n switch (type) {\r\n case 'email':\r\n return (\r\n /^[A-Za-z0-9@._+\\-]*$/.test(value) &&\r\n (value.match(/@/g)?.length ?? 0) <= 1\r\n );\r\n\r\n case 'numeric':\r\n return /^-?\\d*(\\.\\d*)?$/.test(value);\r\n\r\n case 'date': {\r\n const digits =\r\n value.replace(/\\D/g, '');\r\n\r\n return (\r\n /^[0-9-]*$/.test(value) &&\r\n digits.length <= 8 &&\r\n value.length <= 10\r\n );\r\n }\r\n\r\n case 'time': {\r\n const digits =\r\n value.replace(/\\D/g, '');\r\n\r\n return (\r\n /^[0-9:]*$/.test(value) &&\r\n digits.length <= 4 &&\r\n value.length <= 5\r\n );\r\n }\r\n\r\n case 'alpha':\r\n return /^[\\p{L}\\p{M} ]*$/u.test(value);\r\n\r\n case 'string':\r\n // Anything printable; control characters never come from the keys.\r\n return /^[^\\p{Cc}\\p{Cs}]*$/u.test(value);\r\n\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private moveCursorToEnd(\r\n target: CustomKeyboardTarget\r\n ): void {\r\n try {\r\n const position = target.value.length;\r\n\r\n target.setSelectionRange(\r\n position,\r\n position\r\n );\r\n } catch {\r\n // Ignore inputs without selection support.\r\n }\r\n }\r\n\r\n private readonly documentPointerDownHandler = (\r\n event: PointerEvent\r\n ): void => {\r\n this.handleDocumentPointerDown(event);\r\n };\r\n\r\n private readonly activeTargetBlurHandler = (): void => {\r\n this.handleActiveTargetBlur();\r\n };\r\n\r\n private handleDocumentPointerDown(\r\n event: PointerEvent\r\n ): void {\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n const eventTarget = event.target;\r\n\r\n if (!(eventTarget instanceof Node)) {\r\n return;\r\n }\r\n\r\n /*\r\n * User pressed the currently active input.\r\n */\r\n if (\r\n eventTarget === session.target ||\r\n session.target.contains(eventTarget)\r\n ) {\r\n return;\r\n }\r\n\r\n /*\r\n * Keep the keyboard open when one of its keys\r\n * or action buttons is pressed.\r\n */\r\n if (\r\n eventTarget instanceof Element &&\r\n eventTarget.closest(\r\n '[data-vl-custom-keyboard]'\r\n )\r\n ) {\r\n return;\r\n }\r\n\r\n /*\r\n * Direct switch to another input.\r\n */\r\n const nextInput =\r\n eventTarget instanceof Element\r\n ? eventTarget.closest<\r\n HTMLInputElement | HTMLTextAreaElement\r\n >('input, textarea')\r\n : null;\r\n\r\n if (nextInput) {\r\n const expectedSession = session;\r\n\r\n window.setTimeout(() => {\r\n /*\r\n * Another custom-keyboard session may already have\r\n * replaced the previous session.\r\n */\r\n if (\r\n this.activeSession() !==\r\n expectedSession\r\n ) {\r\n return;\r\n }\r\n\r\n this.close({\r\n blurTarget: false\r\n });\r\n }, 0);\r\n\r\n return;\r\n }\r\n\r\n /*\r\n * The toolkit's own picker icon: the picker is about to take the keyboard's place, so the\r\n * bottom area stays reserved and the dialog does not jump in between.\r\n */\r\n if (\r\n eventTarget instanceof Element &&\r\n eventTarget.closest('.picker-field__icon')\r\n ) {\r\n this.close({\r\n blurTarget: false,\r\n restoreAccessoryBar: false,\r\n keepBottomArea: true\r\n });\r\n\r\n return;\r\n }\r\n\r\n /*\r\n * Detect the PrimeNG DatePicker icon button.\r\n */\r\n const pickerTrigger =\r\n eventTarget instanceof Element\r\n ? eventTarget.closest(\r\n [\r\n '.p-datepicker-dropdown',\r\n '.p-datepicker-input-icon-container',\r\n '[data-pc-section=\"dropdown\"]'\r\n ].join(',')\r\n )\r\n : null;\r\n\r\n if (pickerTrigger) {\r\n /*\r\n * Prevent the blur handler from closing and resizing\r\n * the dialog before PrimeNG processes the icon click.\r\n */\r\n this.pickerTriggerPressedUntil =\r\n Date.now() + 600;\r\n\r\n const expectedSession = session;\r\n\r\n /*\r\n * If the picker fails to open, clean up the custom\r\n * keyboard after the icon-click sequence.\r\n */\r\n window.setTimeout(() => {\r\n if (\r\n this.pickerOverlayOpen ||\r\n this.activeSession() !== expectedSession\r\n ) {\r\n return;\r\n }\r\n\r\n if (\r\n document.activeElement !==\r\n expectedSession.target\r\n ) {\r\n this.close();\r\n }\r\n }, 650);\r\n\r\n return;\r\n }\r\n\r\n /*\r\n * Any other outside press closes the keyboard - but the space it held is given back only\r\n * once the tap is complete. Freed at touch-down, the dialog grew or moved under the finger\r\n * and the click missed what was tapped, the close button of the dialog for one.\r\n */\r\n // Only a tap closes it, not a swipe: scrolling the dialog began with the same press and\r\n // closed the keyboard (then iOS put its own keyboard on the still focused field).\r\n this.closeOnTapNotSwipe(event, session);\r\n }\r\n\r\n /** Closes the keyboard when the outside press ends as a tap; a swipe (scrolling) keeps it. */\r\n private closeOnTapNotSwipe(event: Event, session: unknown): void {\r\n const start = event as PointerEvent;\r\n const x = start.clientX ?? 0;\r\n const y = start.clientY ?? 0;\r\n let moved = false;\r\n\r\n const onMove = (e: PointerEvent): void => {\r\n if (Math.abs(e.clientX - x) > 10 || Math.abs(e.clientY - y) > 10) {\r\n moved = true;\r\n }\r\n };\r\n const cleanup = (): void => {\r\n document.removeEventListener('pointermove', onMove, true);\r\n document.removeEventListener('pointerup', onUp, true);\r\n document.removeEventListener('pointercancel', cleanup, true);\r\n };\r\n const onUp = (): void => {\r\n cleanup();\r\n\r\n if (moved || this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n this.close({ keepBottomArea: true });\r\n this.afterTap(() => {\r\n if (!this.activeSession() && !this.pickerOverlayOpen) {\r\n this.clearDock();\r\n }\r\n });\r\n };\r\n\r\n document.addEventListener('pointermove', onMove, true);\r\n document.addEventListener('pointerup', onUp, true);\r\n // iOS cancels the pointer when the press turns into scrolling.\r\n document.addEventListener('pointercancel', cleanup, true);\r\n }\r\n\r\n private handleActiveTargetBlur(): void {\r\n window.setTimeout(() => {\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n /*\r\n * The blur was caused by pressing a DatePicker icon.\r\n * onShow will handle closing the custom keyboard.\r\n */\r\n if (\r\n Date.now() <\r\n this.pickerTriggerPressedUntil\r\n ) {\r\n return;\r\n }\r\n\r\n const activeElement =\r\n document.activeElement;\r\n\r\n if (activeElement === session.target) {\r\n return;\r\n }\r\n\r\n const keyboardElement =\r\n document.querySelector(\r\n '[data-vl-custom-keyboard]'\r\n );\r\n\r\n if (\r\n keyboardElement &&\r\n activeElement &&\r\n keyboardElement.contains(activeElement)\r\n ) {\r\n return;\r\n }\r\n\r\n this.close();\r\n }, 0);\r\n }\r\n\r\n /*\r\n * Date and time have a fixed shape (yyyy-mm-dd, hh:mm), so they are edited on their digits:\r\n * a digit overwrites the one right of the cursor, Backspace removes the last digit or, inside\r\n * the value, steps one digit back; the separators are skipped. With the cursor at the end this is the old append/delete.\r\n */\r\n private insertDateTimeDigit(\r\n target: CustomKeyboardTarget,\r\n type: 'date' | 'time',\r\n character: string\r\n ): void {\r\n if (!/^\\d$/.test(character)) {\r\n return;\r\n }\r\n\r\n const maximumDigits = type === 'date' ? 8 : 4;\r\n const digits = (target.value ?? '').replace(/\\D/g, '');\r\n const caret = this.digitsBeforeCaret(target);\r\n\r\n let nextDigits: string;\r\n\r\n if (caret < digits.length) {\r\n nextDigits = digits.slice(0, caret) + character + digits.slice(caret + 1);\r\n } else if (digits.length < maximumDigits) {\r\n nextDigits = digits + character;\r\n } else {\r\n return;\r\n }\r\n\r\n this.updateDateTimeTarget(target, type, nextDigits, caret + 1);\r\n }\r\n\r\n private removeDateTimeDigit(\r\n target: CustomKeyboardTarget,\r\n type: 'date' | 'time'\r\n ): void {\r\n const digits = (target.value ?? '').replace(/\\D/g, '');\r\n const caret = this.digitsBeforeCaret(target);\r\n\r\n if (caret <= 0) {\r\n return;\r\n }\r\n\r\n /*\r\n * Inside the value Backspace only steps one digit back, ready to be overwritten; removing\r\n * it would shift the rest and turn 2026-11-21 into 2026-12-1.\r\n */\r\n if (caret < digits.length) {\r\n this.setCaret(\r\n target,\r\n this.positionAfterDigits(target.value ?? '', caret - 1)\r\n );\r\n\r\n return;\r\n }\r\n\r\n this.updateDateTimeTarget(\r\n target,\r\n type,\r\n digits.slice(0, caret - 1),\r\n caret - 1\r\n );\r\n }\r\n\r\n private setCaret(target: CustomKeyboardTarget, position: number): void {\r\n try {\r\n target.setSelectionRange(position, position);\r\n } catch {\r\n // Some inputs do not support selection ranges.\r\n }\r\n }\r\n\r\n /** Number of digits left of the cursor; the end when the field has no usable selection. */\r\n private digitsBeforeCaret(target: CustomKeyboardTarget): number {\r\n const value = target.value ?? '';\r\n let position = value.length;\r\n\r\n try {\r\n position = target.selectionStart ?? value.length;\r\n } catch {\r\n // Some inputs do not expose a selection.\r\n }\r\n\r\n return value.slice(0, position).replace(/\\D/g, '').length;\r\n }\r\n\r\n private updateDateTimeTarget(\r\n target: CustomKeyboardTarget,\r\n type: 'date' | 'time',\r\n digits: string,\r\n digitsBeforeCaret: number\r\n ): void {\r\n const formatted = type === 'date'\r\n ? this.formatDateDigits(digits)\r\n : this.formatTimeDigits(digits);\r\n\r\n this.updateTarget(\r\n target,\r\n formatted,\r\n this.positionAfterDigits(formatted, digitsBeforeCaret)\r\n );\r\n }\r\n\r\n /** String position right after the given number of digits, separators included. */\r\n private positionAfterDigits(value: string, count: number): number {\r\n if (count <= 0) {\r\n return 0;\r\n }\r\n\r\n let seen = 0;\r\n\r\n for (let index = 0; index < value.length; index++) {\r\n if (/\\d/.test(value[index]) && ++seen === count) {\r\n return index + 1;\r\n }\r\n }\r\n\r\n return value.length;\r\n }\r\n\r\n private formatDateDigits(\r\n value: string\r\n ): string {\r\n const digits =\r\n value\r\n .replace(/\\D/g, '')\r\n .slice(0, 8);\r\n\r\n if (digits.length <= 4) {\r\n return digits;\r\n }\r\n\r\n if (digits.length <= 6) {\r\n return (\r\n `${digits.slice(0, 4)}-` +\r\n digits.slice(4)\r\n );\r\n }\r\n\r\n return (\r\n `${digits.slice(0, 4)}-` +\r\n `${digits.slice(4, 6)}-` +\r\n digits.slice(6)\r\n );\r\n }\r\n\r\n private formatTimeDigits(\r\n value: string\r\n ): string {\r\n const digits =\r\n value\r\n .replace(/\\D/g, '')\r\n .slice(0, 4);\r\n\r\n if (digits.length <= 2) {\r\n return digits;\r\n }\r\n\r\n return (\r\n `${digits.slice(0, 2)}:` +\r\n digits.slice(2)\r\n );\r\n }\r\n\r\n beginPickerOverlay(): void {\r\n this.pickerOverlayOpen = true;\r\n\r\n /*\r\n * Do not restore the iOS accessory bar yet because\r\n * the picker is about to open.\r\n *\r\n * Do not force another blur because PrimeNG is already\r\n * handling focus during the icon click.\r\n */\r\n /*\r\n * The picker takes the keyboard's place: keep the reserved bottom area until the picker\r\n * reserves its own, otherwise the dialog grows and shrinks again in between.\r\n */\r\n this.close({\r\n blurTarget: false,\r\n restoreAccessoryBar: false,\r\n keepBottomArea: true\r\n });\r\n\r\n if (this.isNativeMobile()) {\r\n void Keyboard.hide().catch(() => {\r\n // Native keyboard may already be hidden.\r\n });\r\n }\r\n }\r\n\r\n endPickerOverlay(\r\n option: { suspendReopen?: boolean; keepBottomArea?: boolean } = {}\r\n ): void {\r\n this.pickerOverlayOpen = false;\r\n\r\n if (option.keepBottomArea) {\r\n /*\r\n * The keyboard is about to take the picker's place (tap into the field): releasing the\r\n * area now would grow the dialog and pull the field away under the finger. Release it\r\n * only if no keyboard follows.\r\n */\r\n window.setTimeout(() => {\r\n if (!this.activeSession() && !this.pickerOverlayOpen) {\r\n this.releaseBottomArea();\r\n }\r\n }, 600);\r\n } else {\r\n this.releaseBottomArea();\r\n }\r\n\r\n /*\r\n * PrimeNG may focus the input again while closing.\r\n * Suppress that focus bounce briefly - unless the user\r\n * closed the picker by tapping into the field on purpose.\r\n */\r\n if (option.suspendReopen !== false) {\r\n this.openingSuspendedUntil =\r\n Date.now() + 250;\r\n }\r\n\r\n if (\r\n this.isNativeMobile() &&\r\n Capacitor.getPlatform() === 'ios'\r\n ) {\r\n void Keyboard.setAccessoryBarVisible({\r\n isVisible: true\r\n }).catch(() => {\r\n // Ignore accessory-bar restoration failures.\r\n });\r\n }\r\n }\r\n /**\r\n * A panel docked at the bottom (date or time picker) takes the keyboard's place: the same body\r\n * class and height variable let the dialog end above it.\r\n */\r\n reserveBottomArea(panel: HTMLElement | null): void {\r\n // A picker that is not docked (the time picker at its field) needs no area down there.\r\n if (!panel) {\r\n this.releaseBottomArea();\r\n return;\r\n }\r\n\r\n const height = Math.ceil(panel.getBoundingClientRect().height);\r\n\r\n document.body.classList.remove(SIDE_DOCK_CLASS);\r\n document.body.classList.add('vl-custom-keyboard-open');\r\n this.followDialog();\r\n document.body.style.setProperty(\r\n '--vl-custom-keyboard-height',\r\n `${height}px`\r\n );\r\n }\r\n\r\n releaseBottomArea(): void {\r\n if (this.activeSession()) {\r\n return;\r\n }\r\n\r\n this.clearDock();\r\n }\r\n\r\n /** See sideDockWidth; keeps the width for the panels' styles. */\r\n dockAtSide(): boolean {\r\n const width = sideDockWidth();\r\n\r\n if (width) {\r\n document.body.style.setProperty('--vl-side-dock-width', `${width}px`);\r\n }\r\n\r\n return width !== null;\r\n }\r\n\r\n\r\n\r\n /** A panel takes the side: the bottom area goes, the dialog stands beside it. */\r\n useSideDock(): void {\r\n document.body.classList.remove('vl-custom-keyboard-open');\r\n document.body.style.removeProperty('--vl-custom-keyboard-height');\r\n document.body.classList.add(SIDE_DOCK_CLASS);\r\n this.followDialog();\r\n }\r\n\r\n /**\r\n * The panel lines up with the dialog - the dialog keeps its own size and place. At the side the\r\n * panel takes over its upper and lower edge, at the bottom its left and right edge, and follows\r\n * when the dialog changes (an error message, a turn of the device).\r\n */\r\n private followDialog(): void {\r\n const dialog = document.querySelector<HTMLElement>('.p-dialog');\r\n\r\n if (!dialog) {\r\n return;\r\n }\r\n\r\n const align = (): void => {\r\n const r = dialog.getBoundingClientRect();\r\n document.body.style.setProperty('--vl-side-dock-top', `${Math.round(r.top)}px`);\r\n document.body.style.setProperty('--vl-side-dock-bottom', `${Math.round(window.innerHeight - r.bottom)}px`);\r\n // At the bottom: the dialog's left and right edge.\r\n document.body.style.setProperty('--vl-dock-left', `${Math.round(r.left)}px`);\r\n document.body.style.setProperty('--vl-dock-right', `${Math.round(window.innerWidth - r.right)}px`);\r\n };\r\n\r\n align();\r\n\r\n if (this.dialogObserver?.target !== dialog) {\r\n this.dialogObserver?.observer.disconnect();\r\n const observer = new ResizeObserver(() => align());\r\n observer.observe(dialog);\r\n this.dialogObserver = { target: dialog, observer };\r\n }\r\n }\r\n\r\n /**\r\n * Keyboard and calendar look like the page behind them: its background colour - from the\r\n * project's styles, the app or the theme - becomes --vl-page-background. Dialogs, masks and the\r\n * panels themselves are looked through; transparent elements pass on their parent's colour.\r\n */\r\n applyPageBackground(): void {\r\n const skip = '.p-dialog-mask, .p-dialog, .p-component-overlay, .custom-keyboard, .p-datepicker-panel, .p-overlay';\r\n const below = document.elementsFromPoint(window.innerWidth / 2, window.innerHeight / 2)\r\n .find(element => !element.closest(skip));\r\n\r\n for (let element: Element | null = below ?? document.body; element; element = element.parentElement) {\r\n const colour = getComputedStyle(element).backgroundColor;\r\n\r\n if (colour && colour !== 'transparent' && !/rgba\\(.*,\\s*0\\)$/.test(colour)) {\r\n document.body.style.setProperty('--vl-page-background', colour);\r\n return;\r\n }\r\n }\r\n\r\n document.body.style.removeProperty('--vl-page-background');\r\n }\r\n\r\n /** Keyboard: side or bottom, the same decision as the calendar's. */\r\n private applyDock(): void {\r\n this.applyPageBackground();\r\n\r\n if (this.dockAtSide()) {\r\n this.useSideDock();\r\n return;\r\n }\r\n\r\n document.body.classList.remove(SIDE_DOCK_CLASS);\r\n document.body.classList.add('vl-custom-keyboard-open');\r\n this.followDialog();\r\n\r\n // Start with the last measured height, not the CSS fallback, so the dialog does not flicker.\r\n if (this.lastKeyboardHeight) {\r\n document.body.style.setProperty(\r\n '--vl-custom-keyboard-height',\r\n `${this.lastKeyboardHeight}px`\r\n );\r\n }\r\n }\r\n\r\n private clearDock(): void {\r\n document.body.classList.remove('vl-custom-keyboard-open', SIDE_DOCK_CLASS);\r\n document.body.style.removeProperty('--vl-custom-keyboard-height');\r\n document.body.style.removeProperty('--vl-side-dock-top');\r\n document.body.style.removeProperty('--vl-side-dock-bottom');\r\n document.body.style.removeProperty('--vl-dock-left');\r\n document.body.style.removeProperty('--vl-dock-right');\r\n this.dialogObserver?.observer.disconnect();\r\n this.dialogObserver = null;\r\n }\r\n\r\n\r\n getActiveValue(\r\n type: CustomKeyboardType,\r\n targetName?: string\r\n ): string | null {\r\n const session = this.activeSession();\r\n\r\n if (!session || session.type !== type) {\r\n return null;\r\n }\r\n\r\n const actualTargetName =\r\n session.target.name ||\r\n session.target.getAttribute('name');\r\n\r\n if (\r\n targetName &&\r\n actualTargetName !== targetName\r\n ) {\r\n return null;\r\n }\r\n\r\n return session.target.value ?? '';\r\n }\r\n}","import {\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnDestroy\r\n} from '@angular/core';\r\n\r\nimport {\r\n normalizeCustomKeyboardType\r\n} from './custom-keyboard.types';\r\n\r\nimport {\r\n CustomKeyboardService,\r\n CustomKeyboardTarget\r\n} from './custom-keyboard.service';\r\n\r\n@Directive({\r\n selector: '[vlCustomKeyboard]',\r\n standalone: true\r\n})\r\nexport class CustomKeyboardDirective\r\n implements OnDestroy {\r\n\r\n @Input('vlCustomKeyboard')\r\n keyboardType?: string | null;\r\n\r\n constructor(\r\n private readonly elementRef:\r\n ElementRef<HTMLElement>,\r\n private readonly keyboard:\r\n CustomKeyboardService\r\n ) { }\r\n\r\n /*\r\n * pointerdown happens before the browser focuses the input.\r\n * This prevents the native keyboard from appearing first.\r\n */\r\n @HostListener('pointerdown', ['$event'])\r\n onPointerDown(event: PointerEvent): void {\r\n this.openForEvent(event);\r\n }\r\n\r\n /*\r\n * Handles inputs focused using JavaScript, Tab, or accessibility\r\n * navigation.\r\n */\r\n @HostListener('focusin', ['$event'])\r\n onFocusIn(event: FocusEvent): void {\r\n this.openForEvent(event);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.keyboard.closeIfTargetInside(\r\n this.elementRef.nativeElement\r\n );\r\n }\r\n\r\n private openForEvent(\r\n event: Event\r\n ): void {\r\n const type =\r\n normalizeCustomKeyboardType(\r\n this.keyboardType\r\n );\r\n\r\n if (\r\n !type ||\r\n !this.keyboard.isNativeMobile()\r\n ) {\r\n return;\r\n }\r\n\r\n const target =\r\n this.resolveInput(event.target);\r\n\r\n if (!target || target.disabled) {\r\n return;\r\n }\r\n\r\n const activeTarget =\r\n this.keyboard.activeSession()?.target;\r\n\r\n /*\r\n * Do not override a genuinely readonly input.\r\n * The active target is readonly because the service set it.\r\n */\r\n if (\r\n target.readOnly &&\r\n activeTarget !== target\r\n ) {\r\n return;\r\n }\r\n\r\n void this.keyboard.open(\r\n target,\r\n type\r\n );\r\n }\r\n\r\n private resolveInput(\r\n eventTarget: EventTarget | null\r\n ): CustomKeyboardTarget | null {\r\n if (\r\n eventTarget instanceof HTMLInputElement ||\r\n eventTarget instanceof HTMLTextAreaElement\r\n ) {\r\n return eventTarget;\r\n }\r\n\r\n return null;\r\n }\r\n}","// Shuaib 2026-09-24\r\n// - change: getLoginUser requires the selected project's Okta issuer.\r\n// - new: reject a missing or non-HTTPS issuer before sending the request.\r\n// - change: build the user-info URL from that issuer instead of a fixed URL.\r\n\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { throwError } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RequestService {\r\n pageSize: number = 0;\r\n private readonly backendUrl = '/api';\r\n readonly apiUrl = `${this.backendUrl}/project`\r\n constructor(private http: HttpClient) { }\r\n\r\n getAllProject() {\r\n return this.http.get(\"../assets/main/layout_schema.json\");\r\n }\r\n\r\n getEnvironmet(selectedProject: any) {\r\n return this.http.get(`../../assets/projects/${selectedProject}/environments/environment.json`);\r\n }\r\n\r\n getSectionInfo(url: string, envUrl?: any, passToken: boolean = false, selectedProject: string = '', userInfo: any = null) {\r\n if (envUrl) {\r\n if (passToken && selectedProject) {\r\n return this.http.get(envUrl + url, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.get(envUrl + url);\r\n }\r\n } else {\r\n return this.http.get(url);\r\n };\r\n }\r\n\r\n readFile(projectName: any, path: any) {\r\n return this.http.post(`${this.apiUrl}/read`, {\r\n projectName: projectName,\r\n filePath: path\r\n })\r\n }\r\n\r\n getMainLayout(selectedProject: any) {\r\n return this.http.get(`../assets/projects/${selectedProject}/main/layout_schema.json`)\r\n }\r\n\r\n getInfo(url: string) {\r\n return this.http.get(url);\r\n }\r\n\r\n dynamicCall(method: string = \"get\", body: any = null, url: string, passToken: boolean = false, selectedProject: string = '', userInfo: any = null) {\r\n switch (method.toLowerCase()) {\r\n case 'get':\r\n if (passToken && selectedProject) {\r\n return this.http.get(url, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.get(url);\r\n }\r\n\r\n case 'post':\r\n if (passToken && selectedProject) {\r\n return this.http.post(url, body, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.post(url, body);\r\n }\r\n case 'put':\r\n if (passToken && selectedProject) {\r\n return this.http.put(url, body, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.put(url, body);\r\n }\r\n case 'delete':\r\n if (passToken && selectedProject) {\r\n return this.http.delete(url, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.delete(url);\r\n };\r\n case 'patch':\r\n return this.http.patch(url, body);\r\n default:\r\n throw new Error(`Unsupported HTTP method: ${method}`);\r\n }\r\n }\r\n\r\n createAuthorizationHeader(userInfo: any, tokenExist: boolean = false) {\r\n let authHeaders: HttpHeaders = new HttpHeaders();\r\n let token = tokenExist ? userInfo : userInfo && userInfo.jwt ? userInfo.jwt : userInfo?.authToken ? userInfo?.authToken : '';\r\n return authHeaders.set(\r\n 'Authorization',\r\n 'Bearer ' + token\r\n )\r\n }\r\n\r\n getLoginUser(token: any, issuer: string) {\r\n if (!issuer || !/^https:\\/\\//i.test(issuer)) {\r\n return throwError(() => new Error('The project has no valid Okta issuer configured.'));\r\n }\r\n return this.http.get(`${issuer.replace(/\\/+$/, '')}/v1/userinfo`, {\r\n headers: this.createAuthorizationHeader(token, true),\r\n })\r\n }\r\n\r\n saveDb(token: any, userInfo: any, order: any = {}) {\r\n if (token) {\r\n const headers = new HttpHeaders({\r\n 'Authorization': `Bearer ${token}`,\r\n 'Accept': 'application/json'\r\n });\r\n let url2: any = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording?company=${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant ? userInfo.p5_plant : \" \"}&appVersion=1&resourceNo=${userInfo.p5_resource_no}`\r\n console.log('userInfo: ', userInfo);\r\n this.http.post(url2, order, { headers }).subscribe({\r\n next: res => {\r\n console.log('Save-res: ', res);\r\n }\r\n })\r\n }\r\n }\r\n\r\n getSaveOrder(\r\n token: string,\r\n userInfo: any,\r\n fromDate: string,\r\n toDate: string\r\n ) {\r\n if (!token) {\r\n throw new Error('Missing authentication token');\r\n }\r\n if (!userInfo?.p5_backend_url) {\r\n throw new Error('Missing p5_backend_url');\r\n }\r\n const headers = new HttpHeaders({\r\n Authorization: `Bearer ${token}`,\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json'\r\n });\r\n\r\n const company = userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n\r\n let backendPath: string;\r\n\r\n try {\r\n backendPath = new URL(\r\n userInfo.p5_backend_url\r\n ).pathname;\r\n } catch {\r\n backendPath = userInfo.p5_backend_url;\r\n }\r\n\r\n backendPath = `/${backendPath}`\r\n .replace(/\\/{2,}/g, '/')\r\n .replace(/\\/+$/, '');\r\n\r\n const url =\r\n `${backendPath}` +\r\n '/assetsmobileservice/Zeiterfassung/' +\r\n 'requestBookedTimeRecording';\r\n\r\n const params = new HttpParams()\r\n .set(\r\n 'resourceNo',\r\n userInfo.p5_resource_no || ''\r\n )\r\n .set('workDayFrom', fromDate)\r\n .set('workDayTo', toDate)\r\n .set('company', company)\r\n .set('appVersion', '1');\r\n\r\n console.log('[Saved orders][Web] URL:', url);\r\n console.log(\r\n '[Saved orders][Web] Params:',\r\n params.toString()\r\n );\r\n\r\n return this.http.post(\r\n url,\r\n {},\r\n {\r\n headers,\r\n params\r\n }\r\n );\r\n }\r\n}\r\n\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: Okta login on the devices failed with 400 invalid_scope. login.mobile.scope may be an\r\n// array (luv2shop: [\"openid profile email\"]); the OAuth2 plugin expects a string and dropped it,\r\n// so no scope reached Okta. Arrays are joined with spaces, a missing scope falls back to\r\n// \"openid profile email\"\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: showAllProjects (\"Framework Settings > Home\") cleared selectedProject only from session\r\n// storage; the app keeps it in local storage, so after the reload it opened the same project\r\n// instead of the project list\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: on the devices a saved sign-in - KeycloakInfo (keycloak), loginedUser (oktaAuth),\r\n// <project>Logined (jwtToken) - is kept in the iOS keychain / Android keystore through\r\n// @aparajita/capacitor-secure-storage instead of plain WebView storage or Preferences, where any\r\n// code in the page could read it. Values stored the old way move over on first read. The\r\n// browser keeps localStorage / sessionStorage - it has no keychain\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n// - change: the credit card type is tested as creditCard. The rename of 2026-09-15 reached\r\n// model.component.html and the whole Designer but not this file, so one data object rendered\r\n// in a modal and stayed empty in a form\r\n// - new: a @contract comment documenting that the toolkit utility, side menu,\r\n// and ViewDefinition runtime handle keycloak, oktaAuth, and jwtToken.\r\n\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { Injectable } from '@angular/core';\r\nimport { Preferences } from '@capacitor/preferences';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { SecureStorage } from '@aparajita/capacitor-secure-storage';\r\nimport { RequestService } from './request.service';\r\nimport { loadStripe } from '@stripe/stripe-js';\r\nimport { BehaviorSubject, lastValueFrom } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UtilityService {\r\n stripe: any = null;\r\n\r\n constructor(private platform: Platform,\r\n private requestService: RequestService) { }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getProperty(scope: any, itemInfo?: any) {\r\n const property = scope?.reference ? scope?.reference.split('/').pop() : '';\r\n return { key: property, productSchema: itemInfo.propertySchema[property] };\r\n }\r\n\r\n async setStorage(key: string, value: any) {\r\n if (this.isSecureKey(key)) {\r\n await SecureStorage.setItem(key, value);\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.set({ key, value });\r\n } else {\r\n sessionStorage.setItem(key, value);\r\n }\r\n }\r\n\r\n async getStorage(key: string) {\r\n if (this.isSecureKey(key)) {\r\n const secured = await SecureStorage.getItem(key).catch(() => null);\r\n if (secured !== null) {\r\n return secured;\r\n }\r\n // Stored the old way: move it into the keychain.\r\n const legacy = (await Preferences.get({ key })).value ?? sessionStorage.getItem(key);\r\n if (legacy !== null) {\r\n await SecureStorage.setItem(key, legacy);\r\n await Preferences.remove({ key });\r\n sessionStorage.removeItem(key);\r\n }\r\n return legacy;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n const { value } = await Preferences.get({ key });\r\n return value;\r\n } else {\r\n const storage = sessionStorage.getItem(key);\r\n return storage;\r\n }\r\n }\r\n\r\n /**\r\n * Keys that hold a saved sign-in; on the devices they live in the keychain / keystore.\r\n * keycloak: KeycloakInfo, oktaAuth: loginedUser, jwtToken: <project>Logined.\r\n */\r\n private readonly secureKeys = new Set(['KeycloakInfo', 'loginedUser']);\r\n\r\n private isSecureKey(key: string): boolean {\r\n return Capacitor.isNativePlatform() && (this.secureKeys.has(key) || key.endsWith('Logined'));\r\n }\r\n\r\n async setLocalStorage(key: string, value: any) {\r\n const stringValue = JSON.stringify(value);\r\n if (this.isSecureKey(key)) {\r\n await SecureStorage.setItem(key, stringValue);\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.set({ key, value: stringValue });\r\n } else {\r\n localStorage.setItem(key, stringValue);\r\n }\r\n }\r\n\r\n async removeLocalStorage(keyName: string) {\r\n if (this.isSecureKey(keyName)) {\r\n await SecureStorage.removeItem(keyName);\r\n // Also the place it was kept before, so nothing stays behind there.\r\n localStorage.removeItem(keyName);\r\n await Preferences.remove({ key: keyName });\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.remove({ key: keyName });\r\n } else {\r\n localStorage.removeItem(keyName);\r\n }\r\n }\r\n\r\n async removeStorage(key: string) {\r\n if (this.isSecureKey(key)) {\r\n await SecureStorage.removeItem(key);\r\n await Preferences.remove({ key });\r\n sessionStorage.removeItem(key);\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.remove({ key });\r\n } else {\r\n sessionStorage.removeItem(key);\r\n }\r\n }\r\n\r\n /** Reads a credential key from the keychain, moving a value stored the old way on first read. */\r\n private async getSecureItem(key: string): Promise<any> {\r\n const secured = await SecureStorage.getItem(key).catch(() => null);\r\n\r\n if (secured) {\r\n return JSON.parse(secured);\r\n }\r\n\r\n const legacy = localStorage.getItem(key) ?? (await Preferences.get({ key })).value;\r\n\r\n if (!legacy) {\r\n return null;\r\n }\r\n\r\n await SecureStorage.setItem(key, legacy);\r\n localStorage.removeItem(key);\r\n await Preferences.remove({ key });\r\n\r\n return JSON.parse(legacy);\r\n }\r\n\r\n async getLocalStorage<T = unknown>(key: string) {\r\n if (this.isSecureKey(key)) {\r\n return this.getSecureItem(key);\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n const { value } = await Preferences.get({ key });\r\n return value ? JSON.parse(value) : null;\r\n } else {\r\n const value = localStorage.getItem(key);\r\n\r\n if (value === null) {\r\n return null;\r\n }\r\n\r\n try {\r\n return JSON.parse(value) as T;\r\n } catch {\r\n return value;\r\n }\r\n }\r\n }\r\n\r\n async showAllProjects() {\r\n // The app keeps the project in local storage (setLocalStorage), the browser in session\r\n // storage: both go, otherwise the reload opened the same project again.\r\n await this.removeStorage('selectedProject');\r\n await this.removeLocalStorage('selectedProject');\r\n window.location.reload();\r\n }\r\n\r\n parseBodyObject(obj: any): any {\r\n const jsonString = JSON.stringify(obj);\r\n const replacedString = jsonString.replace(/{{(.*?)}}/g, (match, expression) => {\r\n try {\r\n return new Function(`return ${expression.trim()};`).call(this);\r\n } catch (error) {\r\n console.error(`Error evaluating expression: ${expression}`, error);\r\n return match;\r\n }\r\n });\r\n return JSON.parse(replacedString);\r\n }\r\n\r\n getTotalPrice(tableitemInfo: any): number {\r\n const total = tableitemInfo.data.reduce((total: any, item: any) => {\r\n if (item.quantity && !isNaN(item.quantity)) {\r\n return total + (item.unitPrice * item.quantity);\r\n }\r\n return total;\r\n }, 0);\r\n return total.toFixed(2);\r\n }\r\n\r\n getTotalQuantity(tableitemInfo: any) {\r\n let quantity = 0;\r\n tableitemInfo.data.forEach((cartItem: any) => {\r\n if (cartItem.quantity) {\r\n quantity = cartItem.quantity + quantity;\r\n }\r\n });\r\n return quantity;\r\n }\r\n\r\n replacePaginationParams(url: string, currentPage: number, pageSize: number): string {\r\n if (url && url.includes('{{pageNumber}}')) {\r\n url = url.replace(/{{pageNumber}}/g, currentPage.toString());\r\n }\r\n\r\n if (url && url.includes('{{pageSize}}') && pageSize !== undefined) {\r\n url = url.replace(/{{pageSize}}/g, pageSize.toString());\r\n }\r\n return url;\r\n }\r\n\r\n customButton(option: any, propertySchema: any, projectSeleted: any, environment: any) {\r\n if (option.url) {\r\n let body = {}\r\n if (option.propertyKey) {\r\n body = Object.keys(propertySchema[option.propertyKey]).reduce((acc, key) => {\r\n acc[key] = propertySchema[option.propertyKey][key]?.value;\r\n return acc;\r\n }, {} as Record<string, string>);\r\n }\r\n let url = environment?.apiUrl + option.url;\r\n this.requestService.dynamicCall(option.method, body, url, option.passToken, projectSeleted).subscribe((res) => {\r\n window.location.reload();\r\n })\r\n }\r\n }\r\n\r\n setDefaultUser(item: any, userInfo: any, environment: any) {\r\n let schema: any = item;\r\n let role = \"default\";\r\n /* @contract decision: login.type is one of keycloak, oktaAuth, jwtToken.\r\n The toolkit utility and side menu, and the ViewDefinition runtime,\r\n handle all three sign-in types. */\r\n if (environment?.login?.type === \"keycloak\") {\r\n if (userInfo?.name && item.option?.userRoleMapping) {\r\n schema = item.option[item.option?.userRoleMapping[role]];\r\n }\r\n } else if (environment?.login?.type === \"jwtToken\") {\r\n if (item.option?.loginResponse && item.option?.loginResponse.storageType == \"sessionStorage\") {\r\n if (userInfo) {\r\n role = userInfo[item.option?.loginResponse.role]?.toLowerCase();\r\n }\r\n schema = item.option[item.option?.userRoleMapping[role]];\r\n }\r\n } else if (environment?.login?.type === \"oktaAuth\") {\r\n return schema;\r\n }\r\n return schema;\r\n }\r\n\r\n setTableData(data: any, option: any = {}, tableitemInfo: any, projectSeleted: any) {\r\n if (option?.pagination?.pageSize && option?.pagination?.scrollable) {\r\n tableitemInfo.pageSize = option?.pagination?.pageSize;\r\n }\r\n let records: any;\r\n if (option.dataKey) {\r\n records = data[option.dataKey];\r\n } else if (option.key && data?._embedded) {\r\n records = data?._embedded[option.key];\r\n } else {\r\n if (!data?._embedded?.products && !Array.isArray(data)) {\r\n records = [data];\r\n } else {\r\n records = data?._embedded?.products;\r\n }\r\n }\r\n tableitemInfo.totalRecords = data?.totalPages ? data?.totalPages : data?.page?.totalElements;\r\n tableitemInfo.data = records.map((record: any) => ({\r\n ...record,\r\n ...(record.hasOwnProperty('imageUrl') && record.imageUrl\r\n ? { imageUrl: `${projectSeleted}/Media/` + record.imageUrl.split('/').pop() }\r\n : {})\r\n }));\r\n return tableitemInfo;\r\n }\r\n\r\n setOktaWebCredential(environment: any, projectName: any) {\r\n return {\r\n logo: `favicon.ico`,\r\n baseUrl: environment.login.web.issuer.split('/oauth2')[0],\r\n clientId: environment.login.web.clientId,\r\n redirectUri: environment.login.web.redirectUri,\r\n authParams: {\r\n pkce: true,\r\n issuer: environment.login.web.issuer,\r\n scopes: environment.login.web.scopes\r\n }\r\n }\r\n }\r\n\r\n setOktaMobileCredential(environment: any) {\r\n return {\r\n appId: environment.login.mobile.clientId,\r\n authorizationBaseUrl: environment.login.mobile.authorizationBaseUrl,\r\n accessTokenEndpoint: environment.login.mobile.accessTokenEndpoint,\r\n redirectUrl: environment.login.mobile.redirectUrl,\r\n scope: this.oauthScope(environment.login.mobile.scope),\r\n responseType: environment.login.mobile.responseType,\r\n pkceEnabled: environment.login.mobile.pkceEnabled\r\n }\r\n }\r\n\r\n\r\n /** OAuth scope as the space separated string the OAuth2 plugin expects. */\r\n private oauthScope(scope: string | string[] | undefined): string {\r\n const value = Array.isArray(scope) ? scope.join(' ') : scope;\r\n return value?.trim() || 'openid profile email';\r\n }\r\n\r\n async setupStripePaymentForm(\r\n environment: any,\r\n form: any,\r\n onCardChange: (message: string) => void\r\n ): Promise<void> {\r\n let hasCreditCard = false;\r\n\r\n if (form.layoutSchema?.formSections) {\r\n form.layoutSchema.formSections.forEach((formSection: any) => {\r\n if (formSection.formFields?.length > 0) {\r\n const foundCreditCard = formSection.formFields.some((formField: any) => {\r\n const scopeKey = this.getScope(formField.scope?.reference);\r\n return form.propertySchema[scopeKey] &&\r\n form.propertySchema[scopeKey][formField.scope?.reference.split('/').pop()]?.type === 'creditCard';\r\n });\r\n if (foundCreditCard) {\r\n hasCreditCard = true;\r\n return;\r\n }\r\n }\r\n });\r\n }\r\n\r\n if (hasCreditCard) {\r\n this.stripe = await loadStripe(environment.stripePublishableKey);\r\n const elements = this.stripe.elements();\r\n const cardElement = elements.create('card', { hidePostalCode: true });\r\n cardElement.mount('#card-element');\r\n\r\n cardElement.on('change', (event: { complete: boolean, error?: { message: string } }) => {\r\n if (event.complete) {\r\n onCardChange('');\r\n } else if (event.error) {\r\n onCardChange(event.error.message);\r\n }\r\n });\r\n }\r\n }\r\n\r\n async formData(form: any, environment: any, cartInfo: any): Promise<void> {\r\n if (form.layoutSchema?.formSections) {\r\n for (const formSection of form.layoutSchema.formSections) {\r\n if (formSection.formFields?.length > 0) {\r\n for (const formField of formSection.formFields) {\r\n const scope = this.getScope(formField.scope?.reference);\r\n const fieldKey = formField.scope?.reference.split('/').pop();\r\n const field = form.propertySchema?.[scope]?.[fieldKey];\r\n\r\n if (!field) continue;\r\n\r\n // Checkbox logic with copy action\r\n if ((field.type === 'boolean' || field.type === 'checkbox') && formField.option?.innerAction?.action === 'copy') {\r\n const fromSchema = form.propertySchema[formField.option.innerAction.from];\r\n const toSchema = form.propertySchema[formField.option.innerAction.to];\r\n const keys = Object.keys(fromSchema);\r\n\r\n keys.forEach((key: any) => {\r\n if (toSchema[key]) {\r\n const sourceValue = fromSchema?.[key]?.value;\r\n toSchema[key].value = sourceValue || '';\r\n }\r\n });\r\n }\r\n\r\n // Dropdown logic (async data fetching)\r\n if (field.type === 'dropdown' && formField.option?.data_url) {\r\n try {\r\n const res: any = await lastValueFrom(this.requestService.getInfo(environment.apiUrl + formField.option.data_url));\r\n const key = Object.keys(res._embedded || {})[0];\r\n if (key) {\r\n field.data = res._embedded[key];\r\n }\r\n } catch (err) {\r\n console.error('Failed to load dropdown data', err);\r\n }\r\n }\r\n\r\n // Cart info logic for string fields\r\n if (field.type === 'string' && formField?.option?.cartInfo) {\r\n if (field.value?.toString()?.includes('{{quantity}}')) {\r\n field.value = cartInfo.quantity;\r\n } else if (field.value?.toString()?.includes('{{totalPrice}}')) {\r\n field.value = cartInfo.totalPrice;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // set date in localstorage\r\n normalizeDatesForStorage(obj: any): any {\r\n const normalized: any = {};\r\n Object.entries(obj).forEach(([key, value]: any) => {\r\n if (this.isDateLike(value)) {\r\n const date = value instanceof Date ? value : new Date(value);\r\n normalized[key] = this.toLocalISOString(date);\r\n } else {\r\n normalized[key] = value;\r\n }\r\n });\r\n return normalized;\r\n }\r\n\r\n\r\n isDateLike(value: any): boolean {\r\n if (!value) return false;\r\n\r\n // Actual Date object\r\n if (value instanceof Date && !isNaN(value.getTime())) {\r\n return true;\r\n }\r\n\r\n // ISO string (UTC or local)\r\n if (typeof value === 'string') {\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n toLocalISOString(date: Date): string {\r\n const tzOffset = date.getTimezoneOffset() * 60000;\r\n return new Date(date.getTime() - tzOffset)\r\n .toISOString()\r\n .slice(0, 19);\r\n }\r\n\r\n // restore date Field from localstorage\r\n restoreDatesFromStorage(records: any[], propertySchema: any): any[] {\r\n if (!Array.isArray(records)) return records;\r\n if (!propertySchema) return records;\r\n\r\n return records.map(record => {\r\n const restored = { ...record };\r\n\r\n Object.keys(propertySchema).forEach(scopeKey => {\r\n const schemaGroup = propertySchema[scopeKey];\r\n if (!schemaGroup) return;\r\n\r\n Object.keys(schemaGroup).forEach(fieldKey => {\r\n const fieldSchema = schemaGroup[fieldKey];\r\n const value = restored[fieldKey];\r\n if (!value || typeof value !== 'string') return;\r\n\r\n // ✅ DATE or TIME fields only\r\n if (fieldSchema.type === 'date' || fieldSchema.type === 'time') {\r\n restored[fieldKey] = this.parseLocalISODate(value);\r\n }\r\n });\r\n });\r\n\r\n return restored;\r\n });\r\n }\r\n\r\n parseLocalISODate(value: string): Date {\r\n // Remove Z to avoid UTC shift\r\n const clean = value.replace('Z', '');\r\n const [datePart, timePart = '00:00:00.000'] = clean.split('T');\r\n\r\n const [y, m, d] = datePart.split('-').map(Number);\r\n const [hh = 0, mm = 0, ss = 0, ms = 0] =\r\n timePart.split(/[:.]/).map(Number);\r\n\r\n return new Date(y, m - 1, d, hh, mm, ss, ms);\r\n }\r\n\r\n // savecard conversion\r\n convertToDailyLogs(cardOrCards: any | any[]): any[] {\r\n // Normalize input to array\r\n const cards = Array.isArray(cardOrCards) ? cardOrCards : [cardOrCards];\r\n\r\n const results: any[] = [];\r\n\r\n for (const card of cards) {\r\n\r\n const fromDate = new Date(card.fromDate);\r\n const toDate = new Date(card.toDate);\r\n\r\n const fromTime = new Date(card.workDayTimeFrom);\r\n const toTime = new Date(card.workDayTimeTo);\r\n\r\n // Normalize dates to midnight\r\n const startDay = new Date(fromDate);\r\n startDay.setHours(0, 0, 0, 0);\r\n\r\n const endDay = new Date(toDate);\r\n endDay.setHours(0, 0, 0, 0);\r\n\r\n let currentDay = new Date(startDay);\r\n\r\n while (currentDay <= endDay) {\r\n const isFirstDay = this.isSameDay(currentDay, fromDate);\r\n const isLastDay = this.isSameDay(currentDay, toDate);\r\n const isSameDay = isFirstDay && isLastDay;\r\n\r\n let workFrom: Date;\r\n let workTo: Date;\r\n\r\n // SAME DAY\r\n if (isSameDay) {\r\n workFrom = this.applyTimeToDay(currentDay, fromTime);\r\n workTo = this.applyTimeToDay(currentDay, toTime);\r\n }\r\n // FIRST DAY\r\n else if (isFirstDay) {\r\n workFrom = this.applyTimeToDay(currentDay, fromTime);\r\n workTo = this.endOfDay(currentDay);\r\n }\r\n // LAST DAY\r\n else if (isLastDay) {\r\n workFrom = this.startOfDay(currentDay);\r\n workTo = this.applyTimeToDay(currentDay, toTime);\r\n }\r\n // MIDDLE DAY\r\n else {\r\n workFrom = this.startOfDay(currentDay);\r\n workTo = this.endOfDay(currentDay);\r\n }\r\n\r\n results.push({\r\n comment: card.comments || \"\",\r\n onCallDuty: false,\r\n timeCredit: false,\r\n workDay: this.toLocalISO(currentDay, 0, 0),\r\n workDayTimeFrom: this.toLocalISO(workFrom),\r\n workDayTimeTo: this.toLocalISO(workTo),\r\n workOrderNo: card.workOrderNo,\r\n workType: \"A\"\r\n });\r\n\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n private applyTimeToDay(day: Date, time: Date): Date {\r\n const d = new Date(day);\r\n d.setHours(time.getHours(), time.getMinutes(), 0, 0);\r\n return d;\r\n }\r\n\r\n private startOfDay(d: Date): Date {\r\n const x = new Date(d);\r\n x.setHours(0, 0, 0, 0);\r\n return x;\r\n }\r\n\r\n private endOfDay(d: Date): Date {\r\n const x = new Date(d);\r\n x.setHours(23, 59, 0, 0);\r\n return x;\r\n }\r\n\r\n private isSameDay(a: Date, b: Date): boolean {\r\n return (\r\n a.getFullYear() === b.getFullYear() &&\r\n a.getMonth() === b.getMonth() &&\r\n a.getDate() === b.getDate()\r\n );\r\n }\r\n\r\n private toLocalISO(date: Date, hour?: number, minute?: number): string {\r\n const d = new Date(date);\r\n\r\n if (hour !== undefined && minute !== undefined) {\r\n d.setHours(hour, minute, 0, 0);\r\n }\r\n\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n\r\n const year = d.getFullYear();\r\n const month = pad(d.getMonth() + 1);\r\n const day = pad(d.getDate());\r\n const hrs = pad(d.getHours());\r\n const mins = pad(d.getMinutes());\r\n\r\n const offset = -d.getTimezoneOffset();\r\n const sign = offset >= 0 ? '+' : '-';\r\n const offH = pad(Math.floor(Math.abs(offset) / 60));\r\n const offM = pad(Math.abs(offset) % 60);\r\n\r\n return `${year}-${month}-${day}T${hrs}:${mins}:00${sign}${offH}:${offM}`;\r\n }\r\n\r\n getMediaSrc(file: any): string {\r\n if (!file) return '';\r\n if (file.src) {\r\n return file.src;\r\n }\r\n if (file.base64) {\r\n const mimeType = file.mimeType || 'image/png';\r\n return `data:${mimeType};base64,${file.base64}`;\r\n }\r\n if (file.dataUrl) {\r\n return file.dataUrl;\r\n }\r\n return '';\r\n }\r\n\r\n private updateProjectlanguage = new BehaviorSubject<any>(null);\r\n currentProjectlanguage$ = this.updateProjectlanguage.asObservable();\r\n\r\n updateProjectUiLanguage(value: any) {\r\n this.updateProjectlanguage.next(value);\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: calendarLocale(languageCode) builds the date picker's month and day names and the first\r\n// day of the week from Intl - the language data the device brings (iOS, Android, browser alike).\r\n// The calendar stayed English in every language; no list per language has to be maintained\r\n\r\n/** Day 1 = Monday ... 7 = Sunday (Intl.Locale weekInfo), as PrimeNG's 0 = Sunday ... 6. */\r\nfunction firstDayOfWeek(languageCode: string): number {\r\n try {\r\n const locale: any = new (Intl as any).Locale(languageCode);\r\n const info = locale.getWeekInfo?.() ?? locale.weekInfo;\r\n\r\n if (info?.firstDay) {\r\n return info.firstDay % 7;\r\n }\r\n } catch {\r\n // Older WebViews without weekInfo.\r\n }\r\n\r\n // Monday, the rule in most European languages; English without region starts on Sunday.\r\n return languageCode === 'en' ? 0 : 1;\r\n}\r\n\r\n/** PrimeNG translation values for the date picker in `languageCode` (e.g. \"de\", \"es\"). */\r\nexport function calendarLocale(languageCode: string): Record<string, any> {\r\n const lang = languageCode || 'en';\r\n const names = (options: Intl.DateTimeFormatOptions, dates: Date[]) =>\r\n dates.map(date => new Intl.DateTimeFormat(lang, options).format(date));\r\n // 2023-01-01 was a Sunday: Sunday ... Saturday, as PrimeNG expects.\r\n const week = Array.from({ length: 7 }, (_, i) => new Date(2023, 0, 1 + i));\r\n const months = Array.from({ length: 12 }, (_, i) => new Date(2023, i, 1));\r\n const short = names({ weekday: 'short' }, week).map(name => name.replace(/\\.$/, ''));\r\n\r\n return {\r\n firstDayOfWeek: firstDayOfWeek(lang),\r\n dayNames: names({ weekday: 'long' }, week),\r\n dayNamesShort: short,\r\n dayNamesMin: short.map(name => name.slice(0, 2)),\r\n monthNames: names({ month: 'long' }, months),\r\n monthNamesShort: names({ month: 'short' }, months).map(name => name.replace(/\\.$/, ''))\r\n };\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: the docked calendar takes the page's background colour, like the keyboard\r\n// - new: the calendar follows the project language (calendarLocale, from Intl); it was English\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - change: the time picker opens below its field in landscape too, as upright. With too little room\r\n// below (a phone in landscape) PrimeNG put it above the field and it covered the field before;\r\n// now the field scrolls up first so that the picker fits below it\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: DateTimePickerService, the date and time picker behaviour for every container. It lived\r\n// in the dialog only, so the filter dates of a card, the form and the grid still opened the\r\n// calendar and the system keyboard together - the bug this work started from. One picker can be\r\n// open in the whole app, so its state belongs to one root service, not to each component:\r\n// tapping the field opens the toolkit keyboard, the calendar icon the calendar docked at the\r\n// bottom, the clock icon the compact time picker at its field, and the screen stays still.\r\n// - new: the docked calendar keeps the height of six week rows, so paging through months with\r\n// five and six weeks no longer moves it up and down\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-09\r\n// - fix: the calendar opened from its icon closed again at once on the iPhone. PrimeNG closes a\r\n// picker when anything around it scrolls - and lining the field up above the docked calendar is\r\n// a scroll. The docked calendar does not hang at its field, so it no longer closes on scrolling;\r\n// only it is lined up, the time picker at its field is not moved\r\n// - fix: a tap into a date field right after closing its calendar brought up the system keyboard\r\n// instead of the toolkit one. PrimeNG reports the close a second time, late; handling it again\r\n// suspended keyboards for 250 ms, the toolkit keyboard fell into that window. A close of a picker\r\n// that is no longer the active one is ignored now\r\n// - fix: the calendar and clock icons waited half a second for the system keyboard to hide even\r\n// when none was open - always the case with the toolkit keyboard. They wait only for an open one\r\n// - change: hands the keyboard service a way to close the open picker, used when a field outside\r\n// the picker is tapped\r\n// - fix: turning the device with the calendar open kept its old height reserved; it is measured\r\n// and the field lined up again on resize\r\n// - new: where a calendar docked at the bottom would leave only the dialog's title bar - a phone\r\n// in landscape - it docks at the right edge over the full height, like the keyboard\r\n// (CustomKeyboardService.dockAtSide decides for both)\r\n// - change: the docked calendar is exactly as high as the keyboard, its day cells sized to fit six\r\n// week rows; with fixed cells it took up to half of a phone held upright, far more than the\r\n// keyboard it replaces\r\n\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { PrimeNG } from 'primeng/config';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { calendarLocale } from '../../services/calendar-locale';\r\nimport { Capacitor, PluginListenerHandle } from '@capacitor/core';\r\nimport { Keyboard } from '@capacitor/keyboard';\r\nimport { CustomKeyboardService, SIDE_DOCK_CLASS } from './custom-keyboard.service';\r\n\r\ninterface LockedPickerInput {\r\n input: HTMLInputElement;\r\n originalReadOnly: boolean;\r\n originalInputMode: string | null;\r\n}\r\n\r\n\r\n/** Room the compact time picker needs below its field (its height and a gap). */\r\nconst TIME_PANEL_ROOM = 104;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DateTimePickerService {\r\n /** On the devices the date picker docks at the bottom like a keyboard; in a browser it drops down. */\r\n readonly isNativeMobile =\r\n Capacitor.isNativePlatform() &&\r\n (Capacitor.getPlatform() === 'ios' || Capacitor.getPlatform() === 'android');\r\n\r\n /** panelStyleClass of a date picker. */\r\n readonly datePanelClass = this.isNativeMobile\r\n ? 'model-datepicker-panel model-datepicker-panel--docked'\r\n : 'model-datepicker-panel';\r\n\r\n /** panelStyleClass of a time picker: compact and attached to its field everywhere. */\r\n readonly timePanelClass = 'model-datepicker-panel model-timepicker-panel';\r\n\r\n /**\r\n * The docked date picker runs without PrimeNG's open/close animation. The animation scales the\r\n * wrapper around the panel, and a transformed wrapper becomes the reference of the panel's\r\n * position: fixed - the docked calendar flew up next to its field while closing.\r\n */\r\n readonly dockedMotion = this.isNativeMobile ? { disabled: true } : undefined;\r\n\r\n private activePicker: any = null;\r\n private activePickerRequest: symbol | null = null;\r\n private pickerOpening = false;\r\n /** Whether the system keyboard is up; only then does an icon have to wait for it to hide. */\r\n private systemKeyboardVisible = false;\r\n private lockedPickerInput: LockedPickerInput | null = null;\r\n\r\n constructor(private readonly keyboard: CustomKeyboardService) {\r\n // Month and day names in the project language, from the device's language data.\r\n const primeng = inject(PrimeNG);\r\n inject(UtilityService).currentProjectlanguage$.subscribe((uiLang: any) => {\r\n if (uiLang?.languageCode) {\r\n primeng.setTranslation(calendarLocale(uiLang.languageCode));\r\n }\r\n });\r\n\r\n // Turning the device with the docked calendar open: measure and line up again.\r\n if (this.isNativeMobile) {\r\n window.addEventListener('resize', () => {\r\n const docked = document.querySelector<HTMLElement>('.model-datepicker-panel--docked');\r\n\r\n if (!docked) {\r\n return;\r\n }\r\n\r\n // The six-row height of the other orientation would stay otherwise.\r\n docked.style.minHeight = '';\r\n\r\n window.requestAnimationFrame(() => this.placeDockedPanel(docked));\r\n });\r\n }\r\n\r\n this.keyboard.setPickerCloser(() =>\r\n this.closeActivePicker(undefined, { suspendReopen: false, keepBottomArea: true })\r\n );\r\n\r\n if (this.isNativeMobile) {\r\n void Keyboard.addListener('keyboardWillShow', () => (this.systemKeyboardVisible = true));\r\n void Keyboard.addListener('keyboardDidHide', () => (this.systemKeyboardVisible = false));\r\n }\r\n }\r\n\r\n /** (onShow) of a picker. */\r\n onShown(): void {\r\n this.pickerOpening = true;\r\n\r\n if (!this.isNativeMobile) {\r\n return;\r\n }\r\n\r\n /*\r\n * A docked panel stands where the keyboard would; the dialog ends above it. Measured one\r\n * frame later, once PrimeNG has laid the panel out. A picker at its field needs no area.\r\n */\r\n window.requestAnimationFrame(() => {\r\n const docked = document.querySelector<HTMLElement>('.model-datepicker-panel--docked');\r\n\r\n /*\r\n * PrimeNG closes a picker on any scroll around it, so that it never floats away from\r\n * its field. The docked calendar stands at the bottom and has no field to float away\r\n * from - and the next lines scroll: the dialog shrinks above it and the field is lined\r\n * up. Without this it closed again right after opening.\r\n */\r\n if (docked) {\r\n this.activePicker?.unbindScrollListener?.();\r\n }\r\n\r\n this.placeDockedPanel(docked);\r\n });\r\n }\r\n\r\n /**\r\n * Side or bottom - the keyboard service decides from the space at hand, the same for the\r\n * keyboard, so switching between calendar and keyboard never moves the dialog. At the side the\r\n * calendar stands at the right edge over the full height with the dialog beside it; at the\r\n * bottom it docks like a keyboard and the dialog ends above it. Decided again on every resize.\r\n */\r\n private placeDockedPanel(docked: HTMLElement | null): void {\r\n if (docked) {\r\n this.keyboard.applyPageBackground();\r\n }\r\n\r\n if (docked && this.keyboard.dockAtSide()) {\r\n docked.style.minHeight = '';\r\n docked.style.height = '';\r\n this.keyboard.useSideDock();\r\n window.requestAnimationFrame(() => {\r\n // Day cells sized to fill the height it now has beside the dialog.\r\n this.fitDays(docked, docked.getBoundingClientRect().height);\r\n this.scrollFieldIntoDialog();\r\n });\r\n return;\r\n }\r\n\r\n // Out of the side layout before measuring; at the side the panel is screen-high.\r\n document.body.classList.remove(SIDE_DOCK_CLASS);\r\n this.fitToKeyboardHeight(docked);\r\n this.keyboard.reserveBottomArea(docked);\r\n\r\n if (docked) {\r\n window.requestAnimationFrame(() => this.scrollFieldAbovePicker());\r\n }\r\n }\r\n\r\n /** Side dock: the field only has to be inside the dialog's visible part. */\r\n private scrollFieldIntoDialog(): void {\r\n const field = this.lockedPickerInput?.input;\r\n const content = field?.closest<HTMLElement>('.p-dialog-content');\r\n\r\n if (!field || !content) {\r\n return;\r\n }\r\n\r\n const spacing = 12;\r\n const f = field.getBoundingClientRect();\r\n const c = content.getBoundingClientRect();\r\n\r\n if (f.bottom > c.bottom - spacing) {\r\n content.scrollTop += f.bottom - (c.bottom - spacing);\r\n } else if (f.top < c.top + spacing) {\r\n content.scrollTop -= c.top + spacing - f.top;\r\n }\r\n }\r\n\r\n /** (onClose) of a picker; pass the picker so a late close of a replaced one is ignored. */\r\n onClose(picker?: any): void {\r\n /*\r\n * A picker that was closed because another one is opening reports onClose late, after\r\n * its leave animation. It must not cancel the request of the picker opening now. The same\r\n * for a picker the toolkit closed itself (tap into the field): handling its late close\r\n * again suspended the keyboard the tap was opening.\r\n */\r\n if (picker && picker !== this.activePicker) {\r\n return;\r\n }\r\n\r\n /*\r\n * Closed by a selection (not by a tap into the field, which unlocks the field first):\r\n * PrimeNG hands the focus back to the field, which then showed a focus frame without a\r\n * keyboard.\r\n */\r\n const lockedInput = this.lockedPickerInput?.input;\r\n\r\n if (lockedInput && document.activeElement === lockedInput) {\r\n lockedInput.blur();\r\n }\r\n\r\n this.activePicker = null;\r\n this.activePickerRequest = null;\r\n this.pickerOpening = false;\r\n this.unlockPickerInput();\r\n\r\n this.keyboard.endPickerOverlay();\r\n }\r\n\r\n /** (pointerdown) of the calendar or clock icon inside a .picker-field. */\r\n async openFromIcon(event: PointerEvent, picker: any): Promise<void> {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.stopImmediatePropagation();\r\n\r\n if (this.pickerOpening) {\r\n if (this.activePicker === picker) {\r\n return;\r\n }\r\n\r\n // Another picker is still open: close it and open the requested one.\r\n this.closeActivePicker();\r\n }\r\n\r\n const button = event.currentTarget as HTMLElement;\r\n this.swallowShiftedClick(button);\r\n\r\n const pickerInput = button\r\n .closest('.picker-field')\r\n ?.querySelector<HTMLInputElement>('input');\r\n\r\n if (!pickerInput || pickerInput.disabled) {\r\n return;\r\n }\r\n\r\n /*\r\n * preventDefault keeps the focus where it was, so whatever field had it - an autocomplete\r\n * with its list and keyboard, say - would stay open next to the picker. Let go of it.\r\n */\r\n const focused = document.activeElement;\r\n\r\n if (focused instanceof HTMLElement && focused !== pickerInput) {\r\n focused.blur();\r\n }\r\n\r\n const request = Symbol('picker-open');\r\n this.activePicker = picker;\r\n this.activePickerRequest = request;\r\n this.pickerOpening = true;\r\n\r\n this.lockPickerInput(pickerInput);\r\n pickerInput.blur();\r\n this.keyboard.beginPickerOverlay();\r\n\r\n let keyboardDidHideListener: PluginListenerHandle | undefined;\r\n let resolveKeyboardHidden: (() => void) | undefined;\r\n\r\n const keyboardHidden = new Promise<void>(resolve => {\r\n resolveKeyboardHidden = resolve;\r\n });\r\n\r\n try {\r\n if (Capacitor.isNativePlatform() && this.systemKeyboardVisible) {\r\n keyboardDidHideListener = await Keyboard.addListener(\r\n 'keyboardDidHide',\r\n () => resolveKeyboardHidden?.()\r\n );\r\n\r\n await Keyboard.hide().catch(() => {\r\n // The native keyboard may already be hidden.\r\n });\r\n\r\n await Promise.race([\r\n keyboardHidden,\r\n new Promise<void>(resolve => {\r\n window.setTimeout(resolve, 500);\r\n })\r\n ]);\r\n }\r\n\r\n if (Capacitor.isNativePlatform()) {\r\n // Let the layout settle after the keyboard - system or toolkit - has gone.\r\n await new Promise<void>(resolve => {\r\n window.requestAnimationFrame(() => {\r\n window.requestAnimationFrame(() => resolve());\r\n });\r\n });\r\n }\r\n\r\n // The user may have tapped the input while Keyboard.hide() was pending.\r\n if (this.activePickerRequest !== request) {\r\n return;\r\n }\r\n\r\n if (Capacitor.isNativePlatform()) {\r\n window.dispatchEvent(new Event('resize'));\r\n }\r\n\r\n /*\r\n * PrimeNG 21 DatePicker has no show(); showOverlay() is the API. The picker is OnPush,\r\n * so it is rendered explicitly - otherwise the overlay only appeared on the next event\r\n * inside it, a tap on the input, together with a keyboard.\r\n */\r\n if (picker.timeOnly) {\r\n this.makeRoomBelow(pickerInput);\r\n }\r\n\r\n picker.showOverlay();\r\n picker.cd?.markForCheck();\r\n picker.cd?.detectChanges();\r\n } catch (error) {\r\n if (this.activePickerRequest === request) {\r\n this.activePicker = null;\r\n this.activePickerRequest = null;\r\n this.pickerOpening = false;\r\n this.unlockPickerInput();\r\n this.keyboard.endPickerOverlay();\r\n }\r\n\r\n console.warn('Unable to open date/time picker:', error);\r\n } finally {\r\n await keyboardDidHideListener?.remove().catch(() => {\r\n // Listener may already be removed.\r\n });\r\n }\r\n }\r\n\r\n /** (click) of the icon. */\r\n blockIconClick(event: MouseEvent): void {\r\n /*\r\n * No stopPropagation: the click has to reach the document, where PrimeNG closes other open\r\n * lists (autocomplete, dropdown) on an outside click.\r\n */\r\n event.preventDefault();\r\n }\r\n\r\n /** (pointerdown) of the p-datepicker: a tap into its field while a picker is open. */\r\n onFieldPointerDown(event: PointerEvent, picker: any): void {\r\n const target = event.target;\r\n\r\n if (!(target instanceof HTMLInputElement)) {\r\n return;\r\n }\r\n\r\n this.configureDateTimeInput(target);\r\n\r\n if (!this.pickerOpening) {\r\n return;\r\n }\r\n\r\n /*\r\n * Close the picker that is actually open and let this tap bring up the keyboard of the\r\n * field; the bottom area stays until the keyboard takes it, so the field does not move\r\n * away under the finger.\r\n */\r\n this.closeActivePicker(picker, { suspendReopen: false, keepBottomArea: true });\r\n }\r\n\r\n /** (onFocus) of the p-datepicker. */\r\n onFieldFocus(event: any): void {\r\n const input = (event?.target ?? event?.originalEvent?.target) as HTMLInputElement;\r\n\r\n if (input?.tagName === 'INPUT' && this.lockedPickerInput?.input !== input) {\r\n this.configureDateTimeInput(input);\r\n }\r\n }\r\n\r\n /**\r\n * For ngOnDestroy of a container: a picker can still be open when its dialog or page goes away.\r\n * Without this the keyboard service keeps \"picker open\" and the reserved bottom area: no\r\n * toolkit keyboard opens any more and the next dialog is cut short above an empty strip.\r\n */\r\n closeIfWithin(container: HTMLElement): void {\r\n const input = this.lockedPickerInput?.input;\r\n const host = this.activePicker?.el?.nativeElement as HTMLElement | undefined;\r\n\r\n if (\r\n (input && container.contains(input)) ||\r\n (host && container.contains(host))\r\n ) {\r\n this.closeActivePicker();\r\n }\r\n }\r\n\r\n /**\r\n * The docked calendar is exactly as high as the keyboard, so switching between the two moves\r\n * nothing; the day cells are sized to fit the header, the weekdays and always six week rows,\r\n * so paging through months with five and six weeks does not change its height either.\r\n */\r\n private fitToKeyboardHeight(panel: HTMLElement | null): void {\r\n if (!panel) {\r\n return;\r\n }\r\n\r\n const height = this.keyboard.keyboardHeight();\r\n panel.style.minHeight = '';\r\n panel.style.height = `${height}px`;\r\n this.fitDays(panel, height);\r\n }\r\n\r\n /** Day cells as large as the panel's height allows for its header, the weekdays and six weeks. */\r\n private fitDays(panel: HTMLElement, height: number): void {\r\n const style = getComputedStyle(panel);\r\n const padding = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);\r\n const header = panel.querySelector<HTMLElement>('.p-datepicker-header')?.getBoundingClientRect().height ?? 0;\r\n const weekdays = panel.querySelector<HTMLElement>('.p-datepicker-day-view thead')?.getBoundingClientRect().height ?? 0;\r\n const perRow = Math.floor((height - padding - header - weekdays - 8) / 6);\r\n // Seven columns have to fit the width as well.\r\n const paddingX = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\r\n const perColumn = Math.floor((panel.getBoundingClientRect().width - paddingX - 8) / 7);\r\n // Cell padding of 1 px on each side, see the stylesheet.\r\n const day = Math.max(22, Math.min(44, perRow - 2, perColumn - 2));\r\n\r\n panel.style.setProperty('--vl-day-size', `${day}px`);\r\n }\r\n\r\n /**\r\n * The time picker hangs below its field - upright there is room. Where there is not (a phone in\r\n * landscape), the field scrolls up first; PrimeNG would put the picker above it otherwise.\r\n */\r\n private makeRoomBelow(input: HTMLElement): void {\r\n const field = input.closest<HTMLElement>('.picker-field') ?? input;\r\n let scroller = field.parentElement;\r\n\r\n while (scroller && !(/(auto|scroll)/.test(getComputedStyle(scroller).overflowY) && scroller.scrollHeight > scroller.clientHeight)) {\r\n scroller = scroller.parentElement;\r\n }\r\n\r\n if (!scroller) {\r\n return;\r\n }\r\n\r\n const visibleBottom = Math.min(scroller.getBoundingClientRect().bottom, window.innerHeight);\r\n const missing = field.getBoundingClientRect().bottom + TIME_PANEL_ROOM - visibleBottom;\r\n\r\n if (missing > 0) {\r\n scroller.scrollTop += missing;\r\n }\r\n }\r\n\r\n /**\r\n * Scrolls the dialog so the field sits right above the docked picker: the eye and the thumb\r\n * move a short way from the value to the picker instead of across the whole screen.\r\n */\r\n private scrollFieldAbovePicker(): void {\r\n const field = this.lockedPickerInput?.input;\r\n const content = field?.closest<HTMLElement>('.p-dialog-content');\r\n\r\n if (!field || !content) {\r\n return;\r\n }\r\n\r\n const spacing = 12;\r\n const fieldBottom = field.getBoundingClientRect().bottom;\r\n const contentBottom = content.getBoundingClientRect().bottom - spacing;\r\n\r\n content.scrollTop += fieldBottom - contentBottom;\r\n }\r\n\r\n private configureDateTimeInput(input: HTMLInputElement): void {\r\n // On the devices the toolkit keyboard types into these fields; inputmode belongs to it.\r\n if (this.isNativeMobile) {\r\n return;\r\n }\r\n\r\n input.setAttribute('inputmode', 'numeric');\r\n input.setAttribute('pattern', '[0-9:]*');\r\n input.setAttribute('autocomplete', 'off');\r\n }\r\n\r\n private lockPickerInput(input: HTMLInputElement): void {\r\n this.unlockPickerInput();\r\n\r\n this.lockedPickerInput = {\r\n input,\r\n originalReadOnly: input.readOnly,\r\n originalInputMode: input.getAttribute('inputmode')\r\n };\r\n\r\n // Prevent PrimeNG focus changes from reopening the native keyboard.\r\n input.readOnly = true;\r\n input.setAttribute('inputmode', 'none');\r\n\r\n // The field loses its focus to keep keyboards away; mark it so its picker stays traceable.\r\n input.closest('.picker-field')?.classList.add('picker-field--active');\r\n }\r\n\r\n private unlockPickerInput(): void {\r\n const locked = this.lockedPickerInput;\r\n\r\n if (!locked) {\r\n return;\r\n }\r\n\r\n locked.input.closest('.picker-field')?.classList.remove('picker-field--active');\r\n locked.input.readOnly = locked.originalReadOnly;\r\n\r\n if (locked.originalInputMode === null) {\r\n locked.input.removeAttribute('inputmode');\r\n } else {\r\n locked.input.setAttribute('inputmode', locked.originalInputMode);\r\n }\r\n\r\n this.lockedPickerInput = null;\r\n }\r\n\r\n /**\r\n * The pointerdown on the icon closes the toolkit keyboard and the layout below the finger can\r\n * change. The click that follows lands wherever the finger is now - in the emulator it opened\r\n * the autocomplete list of the field that had moved under it. A click that no longer hits the\r\n * icon is dropped; one on the icon passes, so other lists still close on it.\r\n */\r\n private swallowShiftedClick(button: HTMLElement): void {\r\n const handler = (click: MouseEvent): void => {\r\n document.removeEventListener('click', handler, true);\r\n window.clearTimeout(timer);\r\n\r\n if (click.target instanceof Node && button.contains(click.target)) {\r\n return;\r\n }\r\n\r\n click.preventDefault();\r\n click.stopImmediatePropagation();\r\n };\r\n\r\n const timer = window.setTimeout(\r\n () => document.removeEventListener('click', handler, true),\r\n 800\r\n );\r\n\r\n document.addEventListener('click', handler, true);\r\n }\r\n\r\n private closeActivePicker(\r\n fallbackPicker?: any,\r\n option: { suspendReopen?: boolean; keepBottomArea?: boolean } = {}\r\n ): void {\r\n const openPicker = this.activePicker ?? fallbackPicker;\r\n\r\n this.activePicker = null;\r\n this.activePickerRequest = null;\r\n this.unlockPickerInput();\r\n this.pickerOpening = false;\r\n\r\n try {\r\n /*\r\n * Not hideOverlay(): it focuses the picker's own input, which would open a keyboard on\r\n * the field being left.\r\n */\r\n if (openPicker) {\r\n openPicker.overlayVisible = false;\r\n openPicker.clearTimePickerTimer?.();\r\n openPicker.cd?.markForCheck();\r\n }\r\n } catch {\r\n // Picker may already be closing.\r\n }\r\n\r\n this.keyboard.endPickerOverlay(option);\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: resolvePlaceholder / vlPlaceholder, the one place that reads a field's placeholder from the\r\n// project's property schema. Every control asked for it itself; where the project defines none,\r\n// the DOM turned the missing value into the text \"undefined\". Now it is empty\r\n\r\nimport { Pipe, PipeTransform } from '@angular/core';\r\n\r\n/** \"#/workOrder/properties/comments\" -> \"workOrder\" (the object the field belongs to). */\r\nfunction scopeOf(reference: string): string {\r\n const start = reference.indexOf('#/') + 2;\r\n const end = reference.indexOf('/', start);\r\n\r\n return start >= 2 && end > start ? reference.substring(start, end) : '';\r\n}\r\n\r\n/**\r\n * The placeholder of the field `reference` in `propertySchema`, translated when the selected\r\n * language has an entry for it; empty when the project defines none.\r\n */\r\nexport function resolvePlaceholder(\r\n propertySchema: any,\r\n reference: string | null | undefined,\r\n translations?: Record<string, string> | null\r\n): string {\r\n if (!propertySchema || !reference) {\r\n return '';\r\n }\r\n\r\n const placeholder = propertySchema[scopeOf(reference)]?.[reference.split('/').pop() ?? '']?.placeholder;\r\n\r\n if (typeof placeholder !== 'string' || !placeholder) {\r\n return '';\r\n }\r\n\r\n return translations?.[placeholder] || placeholder;\r\n}\r\n\r\n/** Template form of resolvePlaceholder: [placeholder]=\"propertySchema | vlPlaceholder: reference\". */\r\n@Pipe({\r\n name: 'vlPlaceholder',\r\n standalone: true\r\n})\r\nexport class PlaceholderPipe implements PipeTransform {\r\n transform(propertySchema: any, reference: string | null | undefined, translations?: Record<string, string> | null): string {\r\n return resolvePlaceholder(propertySchema, reference, translations);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NotificationService {\r\n\r\n constructor(public toastr: ToastrService) { }\r\n\r\n success(message: string, time: number = 5000) {\r\n this.toastr.success(message, \"\", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n\r\n info(message: string, time: number = 5000) {\r\n this.toastr.info(message, \"\", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n\r\n warning(message: string, time: number = 20000) {\r\n this.toastr.warning(message, \"\", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n\r\n error(error: string, time: number = 20000, message?: string,) {\r\n this.toastr.error(error, message, { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: RequestTimeoutService / stagedRequest, one waiting rule for every request of the runtime\r\n// (HttpClient through the app's interceptor, CapacitorHttp and fetch through stagedRequest):\r\n// after 10 s a hint, after 30 s a second one, after 60 s the request is given up with a message.\r\n// Nothing is sent again - a save whose answer is late may have arrived, a resend would store it\r\n// twice. Before, a request without an answer left its spinner turning for ever. The texts come\r\n// from the app (framework translation, setMessages); English until it sets them\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { NotificationService } from './notification.service';\r\n\r\nexport interface RequestTimeoutMessages {\r\n requestSlow: string;\r\n requestStillSlow: string;\r\n requestTimeout: string;\r\n}\r\n\r\n/** Thrown when a request was given up after the last stage. */\r\nexport class RequestTimeoutError extends Error {\r\n constructor() {\r\n super('Request timed out');\r\n this.name = 'RequestTimeoutError';\r\n }\r\n}\r\n\r\n/** Stages in ms: first hint, second hint, give up. */\r\nexport const REQUEST_STAGES = { slow: 10_000, stillSlow: 30_000, timeout: 60_000 } as const;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RequestTimeoutService {\r\n /** For code outside Angular's injection (stagedRequest). */\r\n static instance: RequestTimeoutService | null = null;\r\n\r\n private messages: RequestTimeoutMessages = {\r\n requestSlow: 'This is taking longer than usual …',\r\n requestStillSlow: 'The server is still not responding. Please wait …',\r\n requestTimeout: 'The server is not responding. Please check your connection and try again.'\r\n };\r\n\r\n /** When each message was shown last; several requests waiting at once show it only once. */\r\n private lastShown: Partial<Record<keyof RequestTimeoutMessages, number>> = {};\r\n\r\n constructor(private readonly notification: NotificationService) {\r\n RequestTimeoutService.instance = this;\r\n }\r\n\r\n /** The texts in the current language (from the app's framework translation). */\r\n setMessages(messages: Partial<RequestTimeoutMessages> | null | undefined): void {\r\n for (const key of Object.keys(this.messages) as (keyof RequestTimeoutMessages)[]) {\r\n const text = messages?.[key];\r\n\r\n if (typeof text === 'string' && text) {\r\n this.messages[key] = text;\r\n }\r\n }\r\n }\r\n\r\n /** Shows a stage's message, at most once per stage interval. */\r\n notify(stage: keyof RequestTimeoutMessages): void {\r\n const now = Date.now();\r\n\r\n if (now - (this.lastShown[stage] ?? 0) < REQUEST_STAGES.slow) {\r\n return;\r\n }\r\n\r\n this.lastShown[stage] = now;\r\n const text = this.messages[stage];\r\n\r\n if (stage === 'requestTimeout') {\r\n this.notification.error(text, 8000);\r\n } else {\r\n this.notification.info(text, 6000);\r\n }\r\n }\r\n\r\n /**\r\n * Runs one request under the waiting rule. `work` gets an AbortSignal (fetch can use it);\r\n * after the last stage the signal aborts and the promise rejects with RequestTimeoutError.\r\n */\r\n async run<T>(work: (signal: AbortSignal) => Promise<T>): Promise<T> {\r\n const controller = new AbortController();\r\n const timers: ReturnType<typeof setTimeout>[] = [];\r\n\r\n const gaveUp = new Promise<never>((_, reject) => {\r\n timers.push(setTimeout(() => this.notify('requestSlow'), REQUEST_STAGES.slow));\r\n timers.push(setTimeout(() => this.notify('requestStillSlow'), REQUEST_STAGES.stillSlow));\r\n timers.push(setTimeout(() => {\r\n controller.abort();\r\n this.notify('requestTimeout');\r\n reject(new RequestTimeoutError());\r\n }, REQUEST_STAGES.timeout));\r\n });\r\n\r\n try {\r\n return await Promise.race([work(controller.signal), gaveUp]);\r\n } finally {\r\n timers.forEach(clearTimeout);\r\n }\r\n }\r\n}\r\n\r\n/** A request under the waiting rule (RequestTimeoutService.run); runs plainly before Angular is up. */\r\nexport function stagedRequest<T>(work: (signal: AbortSignal) => Promise<T>): Promise<T> {\r\n const service = RequestTimeoutService.instance;\r\n\r\n return service ? service.run(work) : work(new AbortController().signal);\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: RemoteListService, the one place that loads a field's list from the backend\r\n// (option.autocomplete: url, method, params with {{userInfo.x}} and company), under the waiting\r\n// rule of every request. Only the dialog loaded such lists; card, grid and form showed their\r\n// autocompletes empty. Moved here from ModelComponent unchanged apart from load()\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { Capacitor, CapacitorHttp } from '@capacitor/core';\r\nimport { stagedRequest } from './request-timeout.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RemoteListService {\r\n /** The signed-in user (claims + token), set by the app; used when a caller has none. */\r\n private currentUser: any = null;\r\n\r\n setUser(userInfo: any): void {\r\n this.currentUser = userInfo ?? null;\r\n }\r\n\r\n /** Lists already loaded, by request (url + params), so a page does not ask twice. */\r\n private readonly cache = new Map<string, Promise<any[]>>();\r\n\r\n /** Like load(), with the current user and one request per source while the app runs. */\r\n loadShared(config: any): Promise<any[]> {\r\n if (!config || !this.currentUser) {\r\n return Promise.resolve([]);\r\n }\r\n\r\n const key = JSON.stringify({ url: config.url, method: config.method, params: config.params, user: this.currentUser?.sub ?? this.currentUser?.email });\r\n\r\n if (!this.cache.has(key)) {\r\n const request = this.load(config, this.currentUser).catch(error => {\r\n this.cache.delete(key);\r\n console.warn('Backend list could not be loaded', config?.url, error);\r\n return [] as any[];\r\n });\r\n this.cache.set(key, request);\r\n }\r\n\r\n return this.cache.get(key)!;\r\n }\r\n /** Loads the list a field's source describes (option.autocomplete: url, method, params). */\r\n async load(config: any, userInfo: any = this.currentUser): Promise<any[]> {\r\n if (!config) return [];\r\n const request: any = this.resolveAutocompleteConfig(config, userInfo);\r\n // Under the waiting rule of every request (hints after 10 and 30 s, given up after 60 s).\r\n const response = await stagedRequest(() => CapacitorHttp.request({\r\n url: request.url,\r\n method: request.method,\r\n params: request.params,\r\n headers: request.headers\r\n }));\r\n\r\n if (response.status >= 400) {\r\n throw new Error(`Autocomplete request failed: ${response.status}`);\r\n }\r\n\r\n return Array.isArray(response.data) ? response.data : [];\r\n }\r\n\r\n resolveAutocompleteConfig(\r\n config: any,\r\n userInfo: any\r\n ) {\r\n const params: any = {};\r\n\r\n Object.entries(\r\n config.params || {}\r\n ).forEach(([key, value]: any) => {\r\n // Dynamic token\r\n if (\r\n typeof value === 'string' &&\r\n value.includes('{{')\r\n ) {\r\n params[key] =\r\n this.resolveToken(\r\n value,\r\n userInfo\r\n );\r\n }\r\n // Computed parameter\r\n else if (value?.type === 'company') {\r\n params[key] =\r\n this.buildCompany(userInfo);\r\n }\r\n // Static parameter\r\n else {\r\n params[key] = value;\r\n }\r\n });\r\n\r\n const requestUrl =\r\n this.getAutocompleteRequestUrl(\r\n userInfo?.p5_backend_url,\r\n config?.url\r\n );\r\n\r\n return {\r\n url: requestUrl,\r\n method: config.method || 'POST',\r\n params,\r\n headers: config.passToken\r\n ? {\r\n Authorization:\r\n `Bearer ${userInfo.token}`,\r\n Accept: 'application/json'\r\n }\r\n : {}\r\n };\r\n }\r\n\r\n private getAutocompleteRequestUrl(\r\n backendUrl: string,\r\n endpoint: string\r\n ): string {\r\n const normalizedBackendUrl = backendUrl?.trim()?.replace(/\\/+$/, '');\r\n const normalizedEndpoint = endpoint?.trim();\r\n\r\n if (!normalizedBackendUrl) {\r\n throw new Error(\r\n 'Missing p5_backend_url for autocomplete request'\r\n );\r\n }\r\n\r\n if (!normalizedEndpoint) {\r\n throw new Error(\r\n 'Missing autocomplete endpoint URL'\r\n );\r\n }\r\n\r\n if (Capacitor.isNativePlatform()) {\r\n if (\r\n /^https?:\\/\\//i.test(\r\n normalizedEndpoint\r\n )\r\n ) {\r\n return normalizedEndpoint;\r\n }\r\n\r\n return (\r\n `${normalizedBackendUrl}/` +\r\n normalizedEndpoint.replace(\r\n /^\\/+/,\r\n ''\r\n )\r\n );\r\n }\r\n\r\n /*\r\n * Web:\r\n * Return a same-origin path beginning with /p5ws.\r\n * Angular's development proxy will forward it.\r\n */\r\n if (\r\n /^https?:\\/\\//i.test(\r\n normalizedEndpoint\r\n )\r\n ) {\r\n const absoluteEndpoint =\r\n new URL(normalizedEndpoint);\r\n\r\n return (\r\n absoluteEndpoint.pathname +\r\n absoluteEndpoint.search\r\n );\r\n }\r\n\r\n let backendPath: string;\r\n\r\n try {\r\n backendPath =\r\n new URL(\r\n normalizedBackendUrl\r\n ).pathname;\r\n } catch {\r\n backendPath =\r\n normalizedBackendUrl;\r\n }\r\n\r\n backendPath = `/${backendPath}`\r\n .replace(/\\/{2,}/g, '/')\r\n .replace(/\\/+$/, '');\r\n\r\n const endpointPath =\r\n normalizedEndpoint.replace(\r\n /^\\/+/,\r\n ''\r\n );\r\n\r\n return (\r\n `${backendPath}/${endpointPath}`\r\n );\r\n }\r\n\r\n buildCompany(userInfo: any): string {\r\n return userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n }\r\n\r\n resolveToken(template: string, context: any) {\r\n // The project writes {{userInfo.p5_resource_no}}; the context is the user info itself, so a\r\n // leading \"userInfo.\" resolves too - inside it the value came out empty.\r\n const scope = { ...context, userInfo: context };\r\n\r\n return template.replace(/{{(.*?)}}/g, (_, path) => {\r\n return path.trim().split('.').reduce((acc: any, key: any) => acc?.[key], scope) ?? '';\r\n });\r\n }\r\n\r\n /** Suggestions of `list` whose `field` starts with the typed `query` (case-insensitive). */\r\n filter(list: any[] | undefined, field: string | undefined, query: string | undefined): any[] {\r\n const q = (query ?? '').toLowerCase();\r\n\r\n return (list ?? []).filter(item => {\r\n const value = field ? item?.[field] : item;\r\n return value !== undefined && value !== null && `${value}`.toLowerCase().startsWith(q);\r\n });\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: the CouchDB reads run under the waiting rule (stagedRequest), so an unreachable CouchDB\r\n// no longer leaves the app loading for ever\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-29\r\n// - change: getMediaUrlFromCouchDb removed. It asked /media-token for a signed URL, built\r\n// before the decision of 2026-09-21: an application has its own sign-in, unrelated to our\r\n// realm, and read access to CouchDB is open to anyone holding a tenant code. The library\r\n// therefore has no token and gets none, so media cannot be secured that way. Media are read\r\n// like any other document - GET with the tenant header - and Traefik routes them to the\r\n// cache. Nothing called this function; leaving it invited someone to wire it in\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-18\r\n// - change: getFileContentFromCouchDb now treats anything not known to be text as binary. The\r\n// rule was the other way round - an allow-list of media extensions, everything else decoded as\r\n// UTF-8 - which fails where nobody looks: an unlisted binary came back as a mangled string\r\n// instead of an error, so a .zip or a .docx was quietly destroyed on read. Since any extension\r\n// can be uploaded into the Media folder, that list could never be complete\r\n// - new: isTextFile, holding the inverted rule. SVG stays binary on purpose although it is text,\r\n// because the menu icons expect the media object with a src\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { UtilityService } from './utility.service';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { isNativeMobile } from './native-platform';\r\nimport { stagedRequest } from './request-timeout.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class Couchdb {\r\n private readonly couchDbBaseUrl = 'https://couchdb.yomotech.de';\r\n\r\n constructor(private utilityService: UtilityService, private platform: Platform) { }\r\n\r\n async getTenantDatabases(tenantKey: any): Promise<any[]> {\r\n if (!tenantKey || !tenantKey.trim()) {\r\n throw new Error('Missing tenantKey');\r\n }\r\n\r\n const response = await stagedRequest(async signal => fetch(`https://couchdb.yomotech.de/tenant-dbs`, { signal,\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n 'X-Tenant-Key': tenantKey.trim(),\r\n },\r\n }));\r\n const data = await this.parseJsonOrText(response);\r\n\r\n // if (!response.ok) {\r\n // throw new Error(\r\n // `GET /tenant-dbs -> ${response.status} ${this.stringifyErrorDetails(data)}`\r\n // );\r\n // }\r\n\r\n return data;\r\n }\r\n\r\n private async parseJsonOrText(response: Response): Promise<any> {\r\n const rawText = await response.text();\r\n\r\n if (!rawText) return null;\r\n\r\n try {\r\n return JSON.parse(rawText);\r\n } catch {\r\n return rawText;\r\n }\r\n }\r\n\r\n private stringifyErrorDetails(data: any): string {\r\n if (typeof data === 'string') return data;\r\n\r\n try {\r\n return JSON.stringify(data);\r\n } catch {\r\n return 'Unknown error';\r\n }\r\n }\r\n\r\n async getFileContentFromCouchDb(\r\n couchDbName: string,\r\n filePath: string\r\n ): Promise<any | null> {\r\n try {\r\n\r\n const dbName = couchDbName?.toLowerCase();\r\n const docId = filePath?.trim();\r\n if (!docId) {\r\n console.error('Missing file path');\r\n return null;\r\n }\r\n\r\n const response = await stagedRequest(async signal => fetch(this.getDocumentUrl(dbName, docId), { signal,\r\n method: 'GET',\r\n headers: await this.getReadHeaders(),\r\n }));\r\n\r\n const doc = await this.parseJsonOrText(response);\r\n\r\n if (!response.ok) {\r\n console.error(\r\n `Failed to fetch file \"${docId}\" from \"${dbName}\": ${response.status}`,\r\n doc\r\n );\r\n return null;\r\n }\r\n\r\n if (!doc?.data) {\r\n console.error(`Document \"${docId}\" does not contain file data`);\r\n return null;\r\n }\r\n\r\n // Anything not known to be text is treated as binary.\r\n //\r\n // This used to be the other way round: an allow-list of media extensions,\r\n // with everything else decoded as UTF-8. That fails in the direction\r\n // nobody notices - an unlisted binary came back as a mangled string\r\n // rather than as an error, so a .zip or a .docx was quietly destroyed on\r\n // read. Since any extension can be uploaded into the Media folder, the\r\n // allow-list could never be complete, which is why the default is\r\n // inverted rather than extended.\r\n if (\r\n doc.type === 'media' ||\r\n doc.type === 'base64file' ||\r\n !this.isTextFile(doc.name || doc.path || docId, doc.contentType)\r\n ) {\r\n return {\r\n type: doc.type || 'base64file',\r\n mimeType: this.getMimeType(doc.name || doc.path || docId, doc.contentType),\r\n base64: doc.data,\r\n src: `data:${this.getMimeType(doc.name || doc.path || docId, doc.contentType)};base64,${doc.data}`,\r\n name: doc.name,\r\n path: doc.path,\r\n metadata: doc.metadata || {},\r\n };\r\n }\r\n\r\n const decodedContent = this.fromBase64(doc.data);\r\n\r\n if (this.isJsonFile(doc.name || doc.path || docId, doc.contentType)) {\r\n try {\r\n return JSON.parse(decodedContent);\r\n } catch (jsonError) {\r\n console.error(`Failed to parse JSON for file \"${docId}\"`, jsonError);\r\n return decodedContent;\r\n }\r\n }\r\n\r\n return decodedContent;\r\n } catch (error) {\r\n console.error(\r\n `Unexpected error while fetching file \"${filePath}\" from \"${couchDbName}\"`,\r\n error\r\n );\r\n return null;\r\n }\r\n }\r\n\r\n private isBinaryMediaFile(fileNameOrPath: string, contentType?: string): boolean {\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n const type = contentType || '';\r\n\r\n return (\r\n type.startsWith('image/') ||\r\n type.startsWith('video/') ||\r\n type.startsWith('audio/') ||\r\n type === 'application/pdf' ||\r\n\r\n lower.endsWith('.png') ||\r\n lower.endsWith('.jpg') ||\r\n lower.endsWith('.jpeg') ||\r\n lower.endsWith('.ico') ||\r\n lower.endsWith('.svg') ||\r\n lower.endsWith('.webp') ||\r\n lower.endsWith('.gif') ||\r\n\r\n lower.endsWith('.mp4') ||\r\n lower.endsWith('.webm') ||\r\n lower.endsWith('.mp3') ||\r\n lower.endsWith('.wav') ||\r\n lower.endsWith('.m4a') ||\r\n\r\n lower.endsWith('.pdf')\r\n );\r\n }\r\n\r\n private getMimeType(fileNameOrPath: string, contentType?: string): string {\r\n if (contentType) return contentType;\r\n\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n\r\n if (lower.endsWith('.png')) return 'image/png';\r\n if (lower.endsWith('.jpg') || lower.endsWith('.jpeg')) return 'image/jpeg';\r\n if (lower.endsWith('.ico')) return 'image/x-icon';\r\n if (lower.endsWith('.svg')) return 'image/svg+xml';\r\n if (lower.endsWith('.webp')) return 'image/webp';\r\n if (lower.endsWith('.gif')) return 'image/gif';\r\n\r\n if (lower.endsWith('.mp4')) return 'video/mp4';\r\n if (lower.endsWith('.webm')) return 'video/webm';\r\n\r\n if (lower.endsWith('.mp3')) return 'audio/mpeg';\r\n if (lower.endsWith('.wav')) return 'audio/wav';\r\n if (lower.endsWith('.m4a')) return 'audio/mp4';\r\n\r\n if (lower.endsWith('.pdf')) return 'application/pdf';\r\n\r\n return 'application/octet-stream';\r\n }\r\n\r\n private getImageMimeType(fileNameOrPath: string): string {\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n\r\n if (lower.endsWith('.png')) return 'image/png';\r\n if (lower.endsWith('.jpg') || lower.endsWith('.jpeg')) return 'image/jpeg';\r\n if (lower.endsWith('.ico')) return 'image/x-icon';\r\n if (lower.endsWith('.svg')) return 'image/svg+xml';\r\n\r\n return 'image/png';\r\n }\r\n\r\n private fromBase64(base64: string): string {\r\n try {\r\n return decodeURIComponent(escape(atob(base64)));\r\n } catch {\r\n return atob(base64);\r\n }\r\n }\r\n\r\n private isJsonFile(fileNameOrPath: string, contentType?: string): boolean {\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n return lower.endsWith('.json') || contentType === 'application/json';\r\n }\r\n\r\n /**\r\n * Decides whether a stored file may be decoded as UTF-8 text.\r\n *\r\n * Only what is recognised here is decoded; everything else is handed back as\r\n * binary. Note that SVG counts as binary on purpose even though it is text:\r\n * callers such as the menu icons expect the media object with a `src`, and\r\n * classifying it as text would change the shape they receive.\r\n */\r\n private isTextFile(fileNameOrPath: string, contentType?: string): boolean {\r\n if (this.isBinaryMediaFile(fileNameOrPath, contentType)) {\r\n return false;\r\n }\r\n\r\n const type = (contentType || '').toLowerCase();\r\n\r\n if (type.startsWith('text/')) return true;\r\n if (/^application\\/(json|javascript|typescript|xml|xhtml\\+xml|x-yaml)$/.test(type)) return true;\r\n if (/\\+(json|xml)$/.test(type)) return true;\r\n\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n\r\n return [\r\n '.json',\r\n '.css', '.scss', '.sass', '.less',\r\n '.html', '.htm', '.xml',\r\n '.js', '.mjs', '.cjs', '.ts',\r\n '.txt', '.md', '.csv', '.log',\r\n '.yml', '.yaml',\r\n '.vtt', '.srt',\r\n ].some((extension) => lower.endsWith(extension));\r\n }\r\n\r\n private getDocumentUrl(dbName: string, docId: string): string {\r\n return `${this.getDbUrl(dbName)}/${encodeURIComponent(docId)}`;\r\n }\r\n\r\n private getDbUrl(dbName: string): string {\r\n return `${this.couchDbBaseUrl}/${dbName}`;\r\n }\r\n\r\n private async getReadHeaders(): Promise<HeadersInit> {\r\n return {\r\n Accept: 'application/json',\r\n ...(await this.buildTenantHeaders()),\r\n };\r\n }\r\n\r\n private async buildTenantHeaders(): Promise<Record<string, string>> {\r\n let tenantKey: any = \"\";\r\n let tenantName: any = \"\";\r\n if (isNativeMobile()) {\r\n tenantKey = await this.utilityService.getLocalStorage('tenantKey');\r\n tenantName = await this.utilityService.getLocalStorage('tenantName');\r\n } else {\r\n tenantKey = await this.utilityService.getStorage('tenantKey');\r\n tenantName = await this.utilityService.getStorage('tenantName');\r\n }\r\n\r\n const selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');\r\n if (typeof tenantKey === 'string' && tenantKey.trim()) {\r\n return { 'X-Tenant-Key': tenantKey.trim() };\r\n }\r\n const normalizedTenantName = typeof tenantName === 'string' ? tenantName.trim() : '';\r\n const normalizedSelectedTenant = typeof selectedTenant === 'string' ? selectedTenant.trim() : '';\r\n const tenant = normalizedTenantName || normalizedSelectedTenant;\r\n if (!tenant) {\r\n throw new Error('Missing tenantKey, tenantName, ' + 'or selectedTenant');\r\n }\r\n return { 'X-Tenant': tenant, };\r\n }\r\n\r\n async getImageSrcFromCouchDb(\r\n couchDbName: string,\r\n filePath: string\r\n ): Promise<string> {\r\n const dbName = couchDbName?.toLowerCase();\r\n const docId = filePath?.trim();\r\n\r\n if (!docId) {\r\n throw new Error('Missing file path');\r\n }\r\n\r\n const response = await stagedRequest(async signal => fetch(this.getDocumentUrl(dbName, docId), { signal,\r\n method: 'GET',\r\n headers: await this.getReadHeaders(),\r\n }));\r\n\r\n const doc = await this.parseJsonOrText(response);\r\n\r\n if (!response.ok) {\r\n throw new Error(\r\n `Failed to fetch image \"${docId}\" from \"${dbName}\": ${response.status} ${this.stringifyErrorDetails(doc)}`\r\n );\r\n }\r\n\r\n if (!doc?.data) {\r\n throw new Error(`Document \"${docId}\" does not contain image data`);\r\n }\r\n\r\n const mimeType = doc.contentType || 'image/png';\r\n\r\n return `data:${mimeType};base64,${doc.data}`;\r\n }\r\n\r\n}","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: getKeycloakMobileConfig passes login.mobile.offlineAccess on\r\nimport { Injectable } from '@angular/core';\r\nimport { UtilityService } from './utility.service';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { Couchdb } from './couchdb';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { isNativeMobile } from './native-platform';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConfigService {\r\n private config: any;\r\n private skipOkta = false;\r\n private keycloakConfig: any;\r\n\r\n constructor(private couchdbService: Couchdb, private utilityService: UtilityService, private platform: Platform) { }\r\n\r\n async loadOktaConfig(projectName: string): Promise<void> {\r\n try {\r\n let tenantKey: any = \"\";\r\n let tenantName: any = \"\";\r\n if (isNativeMobile()) {\r\n tenantKey = await this.utilityService.getLocalStorage('tenantKey');\r\n tenantName = await this.utilityService.getLocalStorage('tenantName');\r\n } else {\r\n tenantKey = await this.utilityService.getStorage('tenantKey');\r\n tenantName = await this.utilityService.getStorage('tenantName');\r\n }\r\n if (tenantName) {\r\n this.config = await this.couchdbService.getFileContentFromCouchDb(\r\n `${tenantName}_${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n } else {\r\n this.config = await this.couchdbService.getFileContentFromCouchDb(\r\n `${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n }\r\n\r\n if (isNativeMobile()) {\r\n if (this.config.environment.login.mobile) {\r\n this.setConfiguration(this.config.environment.login.mobile);\r\n } else {\r\n this.setConfiguration(null);\r\n }\r\n } else {\r\n if (this.config.environment.login.web) {\r\n this.setConfiguration(this.config.environment.login.web);\r\n } else {\r\n this.setConfiguration(null);\r\n }\r\n }\r\n\r\n } catch (err) {\r\n console.error('Error loading config:', err);\r\n }\r\n }\r\n\r\n setConfiguration(config: any) {\r\n if (config) {\r\n this.config = config;\r\n } else {\r\n this.config = {\r\n issuer: 'http://dummy',\r\n clientId: 'dummy',\r\n redirectUri: window.location.origin,\r\n responseType: 'code',\r\n scope: 'openid profile email',\r\n showDebugInformation: true,\r\n pkce: true,\r\n };\r\n }\r\n }\r\n\r\n skipOktaConfig() {\r\n this.skipOkta = true;\r\n }\r\n\r\n get oktaConfig() {\r\n if (this.skipOkta) {\r\n return null;\r\n }\r\n return this.config;\r\n }\r\n\r\n async loadKeycloakConfig(projectName: string): Promise<void> {\r\n let tenantKey: any = \"\";\r\n let tenantName: any = \"\";\r\n if (isNativeMobile()) {\r\n tenantKey = await this.utilityService.getLocalStorage('tenantKey');\r\n tenantName = await this.utilityService.getLocalStorage('tenantName');\r\n } else {\r\n tenantKey = await this.utilityService.getStorage('tenantKey');\r\n tenantName = await this.utilityService.getStorage('tenantName');\r\n }\r\n let env: any = {};\r\n if (tenantName) {\r\n env = await this.couchdbService.getFileContentFromCouchDb(\r\n `${tenantName}_${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n } else {\r\n env = await this.couchdbService.getFileContentFromCouchDb(\r\n `${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n }\r\n if (env?.environment?.login.type === \"keycloak\") {\r\n if (isNativeMobile()) {\r\n this.keycloakConfig = {\r\n issuer: \"https://keycloak-poc.wilken.de/realms/p5\",\r\n clientId: \"mobile\",\r\n redirectUri: \"de.yomotech:/login/callback\",\r\n logoutRedirectUri: \"de.yomotech:/login/callback\",\r\n scope: \"openid profile email\",\r\n responseType: \"code\"\r\n }\r\n } else {\r\n this.keycloakConfig = {\r\n issuer: env?.environment?.login?.web?.issuer ?? 'http://dummy',\r\n clientId: env?.environment?.login?.web?.clientId ?? 'dummy',\r\n redirectUri: window.location.origin,\r\n responseType: 'code',\r\n scope: 'openid profile email',\r\n showDebugInformation: true\r\n };\r\n }\r\n } else {\r\n this.keycloakConfig = {};\r\n }\r\n }\r\n\r\n getKeycloakConfig() {\r\n return this.keycloakConfig;\r\n }\r\n\r\n getKeycloakMobileConfig() {\r\n if (!this.keycloakConfig) return null;\r\n return {\r\n issuer: this.keycloakConfig?.issuer ?? 'http://dummy',\r\n clientId: this.keycloakConfig?.clientId,\r\n redirectUri: this.keycloakConfig.redirectUri,\r\n logoutRedirectUri: this.keycloakConfig.logoutRedirectUri,\r\n scope: this.keycloakConfig.scope,\r\n responseType: this.keycloakConfig.responseType,\r\n // login.mobile.offlineAccess: request an offline token (see MobileKeycloakService.login)\r\n offlineAccess: this.keycloakConfig.offlineAccess === true\r\n };\r\n }\r\n\r\n private updateLoaderValue = new BehaviorSubject<any>(null);\r\n currentLoader$ = this.updateLoaderValue.asObservable();\r\n\r\n updateLoader(value: any) {\r\n this.updateLoaderValue.next(value);\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - fix: white cards on the luv2shop start page (signed out / after logout): the untranslated\r\n// layout copy was taken while the layout was still empty, and the language pass then wrote the\r\n// empty copy over the real layout. The copy is renewed once the layout has content\r\n// - fix: a failed save of a time recording in the web (webSaveDb) left the loader turning without\r\n// any message; it now stops the loader and shows one. (The CORS cause - P5 sends no CORS\r\n// headers - is solved by the backend proxy, shuaib#162/#154)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: getHorizontalLayoutCaption read layout.label.caption; a horizontal layout without label\r\n// threw in the template and the cards stayed half drawn (luv2shop start page: no texts)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: fields with a backend source (option.autocomplete) load their list through\r\n// RemoteListService - autocomplete suggestions, dropdown/combobox items; the autocompletes of this\r\n// container stayed empty before\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: the booked-time and register requests run under the waiting rule (stagedRequest)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// - fix: a phone (native app, shorter side below 600pt) counts as mobile in both orientations;\r\n// tablets keep the tablet/desktop style by width. platform.isBrowser is true in the\r\n// app's web view as well, so a phone in landscape (874px) got the tablet style of the project's\r\n// header: the separator line stood 12px beyond the purple heading on both sides\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: the date filter uses DateTimePickerService like the dialog. Tapping it opened the\r\n// calendar and the system number keyboard at the same time (seen on \"Gebuchte Zeiterfassung\")\r\n// Shuaib 2026-09-24\r\n// - new: renderFieldType maps legacy checkbox fields to boolean so existing cards continue to render.\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Input, NgZone, Output, ViewChild, inject } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { RequestService } from '../../services/request.service';\r\n\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { SimpleChanges } from '@angular/core';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport { CapacitorHttp } from '@capacitor/core';\r\n\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { NzModalModule, NzModalService } from 'ng-zorro-antd/modal';\r\n\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { PaginationComponent } from '../pagination/pagination.component';\r\nimport { String as StringComponent } from '../../components/string/string';\r\nimport { ConfigService } from '../../services/config.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { isNativeMobile, isNativePhone } from '../../services/native-platform';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { stagedRequest } from '../../services/request-timeout.service';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\n\r\n@Component({\r\n selector: 'vl-card',\r\n imports: [PlaceholderPipe, \r\n CommonModule,\r\n FormsModule,\r\n NzIconModule,\r\n DatePickerModule,\r\n NzButtonModule,\r\n NzDatePickerModule,\r\n NzModalModule,\r\n PaginationComponent,\r\n MatTooltipModule,\r\n StringComponent,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n CustomKeyboardDirective,\r\n ],\r\n standalone: true,\r\n templateUrl: './card.component.html',\r\n styleUrl: './card.component.css',\r\n})\r\nexport class CardComponent {\r\n // ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Loaded lists by field reference. */\r\n remoteData: Record<string, any[]> = {};\r\n /** Current suggestions of an autocomplete by field reference. */\r\n remoteSuggestions: Record<string, any[]> = {};\r\n\r\n /** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */\r\n async loadRemoteLists(nodes: any[], propertySchema: any): Promise<void> {\r\n const sources = new Map<string, any>();\r\n const visit = (node: any): void => {\r\n if (!node || typeof node !== 'object') {\r\n return;\r\n }\r\n\r\n if (node.option?.autocomplete && node.scope?.reference) {\r\n sources.set(node.scope.reference, node);\r\n }\r\n\r\n for (const value of Object.values(node)) {\r\n if (value && typeof value === 'object') {\r\n visit(value);\r\n }\r\n }\r\n };\r\n\r\n nodes.forEach(visit);\r\n\r\n await Promise.all([...sources.entries()].map(async ([reference, node]) => {\r\n const list = await this.remoteLists.loadShared(node.option.autocomplete);\r\n this.remoteData[reference] = list;\r\n\r\n const scope = reference.substring(reference.indexOf('#/') + 2, reference.indexOf('/', reference.indexOf('#/') + 2));\r\n const property = propertySchema?.[scope]?.[reference.split('/').pop() ?? ''];\r\n\r\n if (property && node.option?.control && node.option.control !== 'autocomplete' && list.length) {\r\n property.data = list;\r\n }\r\n }));\r\n }\r\n\r\n /** (completeMethod) of an autocomplete with a backend list. */\r\n completeRemote(event: any, node: any): void {\r\n const reference = node?.scope?.reference ?? '';\r\n this.remoteSuggestions[reference] = this.remoteLists.filter(this.remoteData[reference], reference.split('/').pop(), event?.query);\r\n }\r\n\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly pickerHost = inject(ElementRef<HTMLElement>);\r\n\r\n /** Keep existing checkbox data objects usable; new objects use boolean. */\r\n renderFieldType(type: string | undefined): string | undefined {\r\n return type === 'checkbox' ? 'boolean' : type;\r\n }\r\n\r\n @Input() itemInfo: any = {};\r\n @Input() currentPage: number = 0;\r\n @Input() pageSize: number = 5;\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() mobileDisplay: boolean = false;\r\n @Input() scrollPagination: boolean = false;\r\n @Input() pages: number[] = [];\r\n @Output() cardButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() cardHeaderButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() linkDetails: EventEmitter<any> = new EventEmitter();\r\n @Output() imageDetails: EventEmitter<any> = new EventEmitter();\r\n @Output() onPageSizeChange: EventEmitter<any> = new EventEmitter();\r\n @Output() onPageChange: EventEmitter<any> = new EventEmitter();\r\n @Input() paginationMode: 'client' | 'server' = 'server';\r\n @Input() paginationLoading: boolean = false;\r\n @Output() cardDataChange = new EventEmitter<{\r\n records: any[];\r\n resetPage?: boolean;\r\n }>();\r\n @ViewChild('scrollPaginationSentinel')\r\n scrollPaginationSentinel?: ElementRef<HTMLElement>;\r\n\r\n private scrollObserver?: IntersectionObserver;\r\n private requestedScrollPage: number | null = null;\r\n cardPerRow: string = 'md:col-6 lg:col-';\r\n deviceMode: 'desktop' | 'tablet' | 'mobile' = 'desktop';\r\n isLoading: boolean = false;\r\n layoutSchemaCopy: any = {};\r\n headerSchemaCopy: any = {};\r\n footerSchemaCopy: any = {};\r\n\r\n constructor(\r\n private utilityService: UtilityService,\r\n private platform: Platform,\r\n private http: HttpClient,\r\n private configService: ConfigService,\r\n private cdr: ChangeDetectorRef,\r\n private zone: NgZone,\r\n private modalService: NzModalService,\r\n private notificationService: NotificationService,\r\n private oauthService: OAuthService,\r\n private requestService: RequestService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (isNativePhone()) {\r\n this.mobileDisplay = true;\r\n }\r\n\r\n this.updateDeviceMode();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Backend lists of fields with option.autocomplete (any data type, any control).\r\n if (changes['itemInfo'] && this.itemInfo) {\r\n void this.loadRemoteLists([this.itemInfo.layoutSchema, this.itemInfo.header], this.itemInfo.propertySchema);\r\n }\r\n this.updateDeviceMode();\r\n if (\r\n changes['scrollPagination'] ||\r\n changes['currentPage'] ||\r\n changes['paginationLoading'] ||\r\n changes['pages']\r\n ) {\r\n if (!this.paginationLoading) {\r\n this.requestedScrollPage = null;\r\n }\r\n this.refreshScrollObserver();\r\n }\r\n if (isNativePhone()) {\r\n this.mobileDisplay = true;\r\n }\r\n /*\r\n * The untranslated copies the language is applied to. The app fills layoutSchema, header and\r\n * footer into the same itemInfo after it arrived (empty) - so a copy taken then stayed empty,\r\n * and the next language pass wrote that empty copy over the real layout: white cards (luv2shop\r\n * start page). A copy is therefore also taken while it is still empty and the source is not.\r\n */\r\n const hasContent = (value: any) => !!value && Object.keys(value).length > 0;\r\n if (changes['itemInfo'] || (!hasContent(this.layoutSchemaCopy) && hasContent(this.itemInfo?.layoutSchema))) {\r\n if (this.itemInfo.layoutSchema) {\r\n this.layoutSchemaCopy = JSON.parse(JSON.stringify(this.itemInfo.layoutSchema));\r\n }\r\n }\r\n if (changes['itemInfo'] || (!hasContent(this.headerSchemaCopy) && hasContent(this.itemInfo?.header))) {\r\n if (this.itemInfo.header) {\r\n this.headerSchemaCopy = JSON.parse(JSON.stringify(this.itemInfo.header));\r\n }\r\n }\r\n if (changes['itemInfo'] || (!hasContent(this.footerSchemaCopy) && hasContent(this.itemInfo?.footer))) {\r\n if (this.itemInfo.footer) {\r\n this.footerSchemaCopy = JSON.parse(JSON.stringify(this.itemInfo.footer));\r\n }\r\n }\r\n if ((changes['selectedLanguageInfo'] || this.selectedLanguageInfo) && this.selectedLanguageInfo.selectedLanguage) {\r\n this.itemInfo.footer = this.updatebuttonLanguage(this.footerSchemaCopy, this.selectedLanguageInfo.selectedLanguage)\r\n this.itemInfo.header = this.updatebuttonLanguage(this.headerSchemaCopy, this.selectedLanguageInfo.selectedLanguage)\r\n this.itemInfo.layoutSchema = this.updateLayoutLanguage(this.layoutSchemaCopy, this.selectedLanguageInfo.selectedLanguage)\r\n }\r\n }\r\n\r\n @HostListener('window:resize')\r\n onWindowResize(): void {\r\n this.updateDeviceMode();\r\n }\r\n\r\n get displayedRecords(): any[] {\r\n const records = Array.isArray(this.itemInfo?.data)\r\n ? this.itemInfo.data\r\n : [];\r\n\r\n /*\r\n * For server pagination, itemInfo.data contains either:\r\n * - the current numbered page, or\r\n * - all pages loaded through infinite scroll.\r\n */\r\n if (\r\n this.paginationMode === 'server' ||\r\n this.scrollPagination\r\n ) {\r\n return records;\r\n }\r\n\r\n const normalizedPageSize =\r\n Number(this.pageSize) ||\r\n Number(\r\n this.itemInfo?.layoutSchema?.pagination?.defaultPageSize\r\n ) ||\r\n 5;\r\n\r\n const normalizedCurrentPage =\r\n Number(this.currentPage) || 0;\r\n\r\n const startIndex =\r\n normalizedCurrentPage * normalizedPageSize;\r\n\r\n return records.slice(\r\n startIndex,\r\n startIndex + normalizedPageSize\r\n );\r\n }\r\n\r\n private setupScrollObserver(): void {\r\n this.destroyScrollObserver();\r\n\r\n if (\r\n !this.scrollPagination ||\r\n !this.scrollPaginationSentinel ||\r\n typeof IntersectionObserver === 'undefined'\r\n ) {\r\n return;\r\n }\r\n\r\n this.scrollObserver = new IntersectionObserver(\r\n entries => {\r\n const sentinelEntry = entries[0];\r\n\r\n if (sentinelEntry?.isIntersecting) {\r\n this.loadNextScrollPage();\r\n }\r\n },\r\n {\r\n root: null,\r\n rootMargin: '0px 0px 250px 0px',\r\n threshold: 0\r\n }\r\n );\r\n\r\n this.scrollObserver.observe(\r\n this.scrollPaginationSentinel.nativeElement\r\n );\r\n }\r\n\r\n private loadNextScrollPage(): void {\r\n if (\r\n !this.scrollPagination ||\r\n this.paginationLoading ||\r\n !this.hasNextScrollPage()\r\n ) {\r\n return;\r\n }\r\n\r\n const nextPage = this.currentPage + 1;\r\n\r\n if (this.requestedScrollPage === nextPage) {\r\n return;\r\n }\r\n\r\n this.requestedScrollPage = nextPage;\r\n this.onPageChange.emit(nextPage);\r\n }\r\n\r\n private hasNextScrollPage(): boolean {\r\n return (\r\n Array.isArray(this.pages) &&\r\n this.pages.length > 0 &&\r\n this.currentPage < this.pages.length - 1\r\n );\r\n }\r\n\r\n private refreshScrollObserver(): void {\r\n setTimeout(() => {\r\n this.setupScrollObserver();\r\n });\r\n }\r\n\r\n private destroyScrollObserver(): void {\r\n this.scrollObserver?.disconnect();\r\n this.scrollObserver = undefined;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyScrollObserver();\r\n this.picker.closeIfWithin(this.pickerHost.nativeElement);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.setupScrollObserver();\r\n }\r\n\r\n getRecordIndex(record: any): number {\r\n if (!Array.isArray(this.itemInfo?.data)) {\r\n return -1;\r\n }\r\n\r\n return this.itemInfo.data.indexOf(record);\r\n }\r\n\r\n private publishCardDataChange(\r\n resetPage: boolean = false\r\n ): void {\r\n const records = Array.isArray(this.itemInfo?.data)\r\n ? [...this.itemInfo.data]\r\n : [];\r\n\r\n this.cardDataChange.emit({\r\n records,\r\n resetPage\r\n });\r\n }\r\n\r\n private setFilteredCardData(\r\n records: any\r\n ): void {\r\n const normalizedRecords =\r\n this.utilityService.restoreDatesFromStorage(\r\n Array.isArray(records) ? records : [],\r\n this.itemInfo.propertySchema\r\n );\r\n\r\n this.itemInfo.data = normalizedRecords;\r\n\r\n /*\r\n * Filtering creates a new complete client-side dataset.\r\n * Move pagination back to the first page.\r\n */\r\n this.publishCardDataChange(true);\r\n }\r\n\r\n private updateDeviceMode(): void {\r\n if (typeof window === 'undefined') {\r\n this.deviceMode = this.mobileDisplay ? 'mobile' : 'desktop';\r\n return;\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (this.mobileDisplay || width <= 768) {\r\n this.deviceMode = 'mobile';\r\n } else if (width <= 1024) {\r\n this.deviceMode = 'tablet';\r\n } else {\r\n this.deviceMode = 'desktop';\r\n }\r\n }\r\n\r\n private safeUpdate(fn: () => void) {\r\n if (NgZone.isInAngularZone()) {\r\n fn();\r\n this.cdr.markForCheck();\r\n } else {\r\n this.zone.run(() => {\r\n fn();\r\n this.cdr.markForCheck();\r\n });\r\n }\r\n }\r\n\r\n getHorizontalLayoutCaption(layout: any) {\r\n let lang = this.selectedLanguageInfo?.selectedLanguage;\r\n let caption = layout?.label?.caption\r\n ? layout.label.caption\r\n : this.itemInfo.propertySchema[this.getScope(layout.scope?.reference)]?.[\r\n layout.scope?.reference.split('/').pop()\r\n ]?.caption;\r\n return lang && lang[caption] ? lang[caption] : caption;\r\n }\r\n\r\n getHorizontalLayoutTooltip(layout: any) {\r\n let lang = this.selectedLanguageInfo?.selectedLanguage;\r\n let tooltip = layout.option && layout.option.tooltip || '';\r\n return lang && lang[tooltip] ? lang[tooltip] : tooltip;\r\n }\r\n\r\n forceNumericKeyboard(event: any) {\r\n const input = event?.target as HTMLInputElement;\r\n if (input && input.tagName === 'INPUT') {\r\n input.setAttribute('inputmode', 'numeric'); // Android\r\n input.setAttribute('pattern', '[0-9:]*'); // iOS\r\n input.setAttribute('type', 'tel'); // strongest signal\r\n }\r\n }\r\n\r\n onDateTyping(event: any) {\r\n const input = event.target as HTMLInputElement;\r\n if (!input) return;\r\n let digits = input.value.replace(/\\D/g, '');\r\n digits = digits.substring(0, 8);\r\n let formatted = '';\r\n if (digits.length <= 4) {\r\n formatted = digits;\r\n } else if (digits.length <= 6) {\r\n formatted = `${digits.slice(0, 4)}-${digits.slice(4)}`;\r\n } else {\r\n formatted = `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;\r\n }\r\n input.value = formatted;\r\n }\r\n\r\n updatebuttonLanguage<T>(schema: T, translations: Record<string, string>): T {\r\n const cloned = JSON.parse(JSON.stringify(schema));\r\n\r\n const walk = (obj: any) => {\r\n if (!obj || typeof obj !== 'object') return;\r\n\r\n // ✅ Replace direct caption (e.g. button.caption)\r\n if (typeof obj.caption === 'string') {\r\n const original = obj.caption;\r\n obj.caption = translations[original] ?? original;\r\n }\r\n\r\n if (obj.option && obj.option.tooltip && (typeof obj?.option?.tooltip === 'string')) {\r\n const original = obj?.option?.tooltip;\r\n obj.option.tooltip = translations[original] ?? original;\r\n }\r\n\r\n // ✅ Replace modalTitle if present\r\n if (typeof obj.modalTitle === 'string') {\r\n const original = obj.modalTitle;\r\n obj.modalTitle = translations[original] ?? original;\r\n }\r\n\r\n // 🔁 Recurse\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key];\r\n if (typeof value === 'object') {\r\n walk(value);\r\n }\r\n });\r\n };\r\n\r\n walk(cloned);\r\n return cloned;\r\n }\r\n\r\n updateLayoutLanguage<T>(schema: T, translations: Record<string, string>): T {\r\n // Deep clone to avoid mutating original schema\r\n const cloned = JSON.parse(JSON.stringify(schema));\r\n\r\n const walk = (obj: any) => {\r\n if (!obj || typeof obj !== 'object') return;\r\n\r\n // ✅ If label.caption exists → translate it\r\n if (obj.label && typeof obj.label.caption === 'string') {\r\n const originalCaption = obj.label.caption;\r\n obj.label.caption = translations[originalCaption] ?? originalCaption;\r\n }\r\n if (obj.elements && obj.elements.length > 0) {\r\n obj.elements.forEach((element: any) => {\r\n if (element.label && element.label.caption) {\r\n const originalElementCaption = element.label.caption;\r\n element.label.caption = translations[originalElementCaption] ?? originalElementCaption;\r\n }\r\n });\r\n }\r\n\r\n // 🔁 Recurse into object properties\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key];\r\n if (typeof value === 'object') {\r\n walk(value);\r\n }\r\n });\r\n };\r\n\r\n walk(cloned);\r\n return cloned;\r\n }\r\n\r\n dateChangeEvent(filter: any, value: any) {\r\n const scope = this.getScope(filter.scope.reference);\r\n const field = filter.scope?.reference.split('/').pop();\r\n this.itemInfo.propertySchema[scope][field].value = value\r\n this.applyDateFilter(this.extractFilterValues(this.itemInfo.propertySchema[scope]))\r\n }\r\n\r\n async applyDateFilter(filters: any) {\r\n const from = filters.fromDateFilter ? new Date(filters.fromDateFilter) : null;\r\n const to = filters.toDateFilter ? new Date(filters.toDateFilter) : null;\r\n if (to && from) {\r\n const formattedFrom = this.formatToOffsetISO(from);\r\n const formattedTo = this.formatToOffsetISO(to);\r\n const keycloakInfo: any = await this.utilityService.getLocalStorage('KeycloakInfo');\r\n const logined: any = await this.utilityService.getLocalStorage('loginedUser');\r\n this.safeUpdate(() => this.isLoading = true);\r\n if (isNativeMobile()) {\r\n try {\r\n const saveOrders = await this.getSaveOrder(\r\n keycloakInfo?.token,\r\n keycloakInfo,\r\n formattedFrom,\r\n formattedTo\r\n );\r\n\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData(saveOrders);\r\n this.isLoading = false;\r\n });\r\n } catch (error) {\r\n console.error(\r\n 'Failed to fetch saved work orders',\r\n error\r\n );\r\n\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData([]);\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n return;\r\n } else {\r\n this.requestService\r\n .getSaveOrder(\r\n logined?.token,\r\n logined,\r\n formattedFrom,\r\n formattedTo\r\n )\r\n .subscribe({\r\n next: (saveOrders: any) => {\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData(saveOrders);\r\n this.isLoading = false;\r\n });\r\n },\r\n error: (error: any) => {\r\n console.error(\r\n 'Failed to fetch saved work orders',\r\n error\r\n );\r\n\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData([]);\r\n this.isLoading = false;\r\n });\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n async getSaveOrder(\r\n token: string,\r\n userInfo: any,\r\n fromDate: any,\r\n toDate: any\r\n ) {\r\n if (!token) {\r\n return;\r\n }\r\n\r\n const company = userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n\r\n const url = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/requestBookedTimeRecording`;\r\n\r\n try {\r\n const response = await stagedRequest(() => CapacitorHttp.post({\r\n url,\r\n params: {\r\n resourceNo: userInfo.p5_resource_no,\r\n workDayFrom: fromDate,\r\n workDayTo: toDate,\r\n company,\r\n appVersion: '1',\r\n },\r\n headers: {\r\n Authorization: `Bearer ${token}`, // ✅ REQUIRED\r\n Accept: 'application/json',\r\n },\r\n // ❗ NO BODY needed for this endpoint\r\n }));\r\n\r\n console.log('getSaveOrder response:', response.data);\r\n return response.data;\r\n } catch (error) {\r\n console.error('Failed to fetch saved orders', error);\r\n throw error;\r\n }\r\n }\r\n\r\n formatToOffsetISO(date: Date): string {\r\n if (!date) return '';\r\n\r\n const pad = (n: number, len = 2) => String(n).padStart(len, '0');\r\n const year = date.getFullYear();\r\n const month = pad(date.getMonth() + 1);\r\n const day = pad(date.getDate());\r\n const hours = pad(date.getHours());\r\n const minutes = pad(date.getMinutes());\r\n const seconds = pad(date.getSeconds());\r\n const ms = pad(date.getMilliseconds(), 4); // 4-digit milliseconds\r\n\r\n // timezone offset\r\n const offset = -date.getTimezoneOffset(); // in minutes\r\n const offSign = offset >= 0 ? '+' : '-';\r\n const offHours = pad(Math.floor(Math.abs(offset) / 60));\r\n const offMinutes = pad(Math.abs(offset) % 60);\r\n\r\n return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}:${ms}${offSign}${offHours}:${offMinutes}`;\r\n }\r\n\r\n extractFilterValues(schema: Record<string, any>): Record<string, any> {\r\n return Object.keys(schema).reduce(\r\n (acc, key) => {\r\n if (key.includes('Filter') && schema[key]?.value !== undefined) {\r\n acc[key] = schema[key].value;\r\n }\r\n return acc;\r\n },\r\n {} as Record<string, any>,\r\n );\r\n }\r\n\r\n invokeOnPageSizeChange(pageSize: any): void {\r\n const normalizedPageSize = Number(pageSize);\r\n\r\n if (\r\n !Number.isFinite(normalizedPageSize) ||\r\n normalizedPageSize <= 0\r\n ) {\r\n return;\r\n }\r\n\r\n this.onPageSizeChange.emit(normalizedPageSize);\r\n }\r\n\r\n invokeGoToPage(page: number): void {\r\n if (\r\n page < 0 ||\r\n page >= this.pages.length ||\r\n page === this.currentPage\r\n ) {\r\n return;\r\n }\r\n\r\n this.onPageChange.emit(page);\r\n }\r\n\r\n invokeOnCardHeader(element: any) {\r\n if (element.option && element.option.innerAction === \"saveAll\") {\r\n this.d4_SaveAll();\r\n } else {\r\n this.cardHeaderButtonClick.emit(element);\r\n }\r\n }\r\n\r\n invokeOnCardFooter(element: any) {\r\n // this.cardHeaderButtonClick.emit(element);\r\n }\r\n\r\n async invokeButtonClick(layout: any, record: any, recordIndex: any) {\r\n if (layout?.option?.action === 'delete' && layout?.option?.storageType == 'localstorage') {\r\n if (layout?.option?.deleteMessage) {\r\n this.showConfirm(layout?.option, recordIndex);\r\n }\r\n } else if (layout?.option?.action === 'save' && layout?.option?.storageType === 'database') {\r\n this.configService.updateLoader(true);\r\n const final_array = this.utilityService.convertToDailyLogs(record);\r\n await this.saveToDb(final_array, recordIndex, layout.option.data_url)\r\n } else {\r\n this.cardButtonClick.emit({ layout: layout, record: record, recordIndex: recordIndex });\r\n }\r\n }\r\n\r\n showConfirm(option: any, recordIndex: any) {\r\n this.modalService.confirm({\r\n nzTitle:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Confirm']\r\n ? this.selectedLanguageInfo.selectedLanguage['Confirm']\r\n : 'Confirm',\r\n nzContent:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage &&\r\n this.selectedLanguageInfo?.selectedLanguage[option.deleteMessage]\r\n ? this.selectedLanguageInfo.selectedLanguage[option.deleteMessage]\r\n : option.deleteMessage,\r\n nzOkText:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Delete']\r\n ? this.selectedLanguageInfo.selectedLanguage['Delete']\r\n : 'Delete',\r\n nzCancelText:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Cancel']\r\n ? this.selectedLanguageInfo.selectedLanguage['Cancel']\r\n : 'Cancel',\r\n nzOnOk: () => this.deleteRecord(recordIndex),\r\n });\r\n }\r\n\r\n async d4_SaveAll() {\r\n if (this.itemInfo?.data?.length) {\r\n let allOrders: any[] = [];\r\n for (let i = 0; i < this.itemInfo.data.length; i++) {\r\n const element = this.itemInfo.data[i];\r\n const dailyLogs = this.utilityService.convertToDailyLogs(element);\r\n if (Array.isArray(dailyLogs)) {\r\n allOrders.push(...dailyLogs);\r\n }\r\n }\r\n await this.saveToDb(allOrders, null, true);\r\n } else {\r\n this.notificationService.warning(this.selectedLanguageInfo?.selectedLanguage['noRecordFound'] ? this.selectedLanguageInfo?.selectedLanguage['noRecordFound'] : 'No Record Found')\r\n }\r\n }\r\n\r\n async deleteRecord(recordIndex: number): Promise<void> {\r\n if (\r\n !Array.isArray(this.itemInfo?.data) ||\r\n recordIndex < 0 ||\r\n recordIndex >= this.itemInfo.data.length\r\n ) {\r\n this.configService.updateLoader(false);\r\n return;\r\n }\r\n\r\n this.itemInfo.data.splice(recordIndex, 1);\r\n\r\n await this.utilityService.setLocalStorage(\r\n 'timeRecords',\r\n JSON.stringify(this.itemInfo.data)\r\n );\r\n\r\n /*\r\n * Notify AppComponent so page count is recalculated.\r\n */\r\n this.publishCardDataChange(false);\r\n\r\n this.configService.updateLoader(false);\r\n }\r\n\r\n async deleteAllRecord(): Promise<void> {\r\n this.itemInfo.data = [];\r\n\r\n await this.utilityService.setLocalStorage(\r\n 'timeRecords',\r\n JSON.stringify([])\r\n );\r\n\r\n this.publishCardDataChange(true);\r\n\r\n this.configService.updateLoader(false);\r\n }\r\n\r\n async saveToDb(orders: any, orderIndex?: any, data_url?: any, deleteAll: boolean = false) {\r\n this.safeUpdate(() => (this.isLoading = true));\r\n const token = this.oauthService.getAccessToken();\r\n const logined: any = await this.utilityService.getLocalStorage('loginedUser');\r\n const keycloakInfo: any = await this.utilityService.getLocalStorage('KeycloakInfo');\r\n let saveobject = {\r\n ressourceNo: logined?.p5_resource_no ? logined.p5_resource_no : keycloakInfo?.p5_resource_no,\r\n returnTimeRecordingLine: orders\r\n }\r\n if (isNativeMobile()) {\r\n const res = await this.mobileSaveDb(keycloakInfo.token, keycloakInfo, saveobject, orderIndex, data_url, deleteAll);\r\n } else {\r\n this.webSaveDb(token, logined, saveobject, orderIndex, data_url, deleteAll);\r\n }\r\n }\r\n\r\n webSaveDb(token: any, userInfo: any, order: any = {}, orderIndex?: any, dataUrl?: any, deleteAll: boolean = false) {\r\n if (token) {\r\n const headers = new HttpHeaders({\r\n 'Authorization': `Bearer ${token}`,\r\n 'Accept': 'application/json'\r\n });\r\n let url2: any = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording?company=${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant ? userInfo.p5_plant : \" \"}&appVersion=1&resourceNo=${userInfo.p5_resource_no}`\r\n this.http.post(url2, order, { headers }).subscribe({\r\n next: res => {\r\n this.safeUpdate(() => this.isLoading = false);\r\n if (orderIndex > -1) {\r\n this.deleteRecord(orderIndex)\r\n } else {\r\n this.deleteAllRecord();\r\n }\r\n },\r\n error: (error: any) => {\r\n // The loader kept turning and the record stayed without any message.\r\n this.safeUpdate(() => this.isLoading = false);\r\n console.error('Failed to save time recording', error);\r\n this.notificationService.error(this.selectedLanguageInfo?.selectedLanguage?.['saveFailed'] ?? 'The record could not be saved.');\r\n }\r\n })\r\n }\r\n }\r\n\r\n async mobileSaveDb(token: string, userInfo: any, order: any = {}, orderIndex: number, dataUrl: any, deleteAll: boolean = false) {\r\n if (!token) {\r\n console.log('NO-token', token);\r\n return;\r\n }\r\n\r\n const company = userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n\r\n const url = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording`;\r\n\r\n try {\r\n const response = await stagedRequest(() => CapacitorHttp.post({\r\n url,\r\n params: {\r\n company,\r\n appVersion: '1',\r\n resourceNo: userInfo.p5_resource_no,\r\n },\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json',\r\n },\r\n data: order,\r\n }));\r\n if (orderIndex != null && orderIndex > -1) {\r\n this.deleteRecord(orderIndex);\r\n } else {\r\n this.deleteAllRecord();\r\n }\r\n this.safeUpdate(() => (this.isLoading = false));\r\n\r\n return response.data;\r\n } catch (error) {\r\n this.safeUpdate(() => (this.isLoading = false));\r\n console.error('Failed to save time recording', error);\r\n throw error;\r\n }\r\n }\r\n\r\n showLinkDetails(option: any, record: any) {\r\n this.linkDetails.emit({ option: option, record: record });\r\n }\r\n\r\n showImageDetails(option: any, record: any) {\r\n this.imageDetails.emit({ option: option, record: record });\r\n }\r\n\r\n getProperty(scope: any) {\r\n const property = scope ? scope.split('/').pop() : '';\r\n return {\r\n key: property,\r\n productSchema: this.itemInfo.propertySchema[this.getScope(scope)][property],\r\n };\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any): {\r\n classes: string;\r\n style: Record<string, any>;\r\n } {\r\n if (!styleObject) {\r\n return {\r\n classes: '',\r\n style: {},\r\n };\r\n }\r\n\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n\r\n return {\r\n classes: Array.isArray(classes) ? classes.filter(Boolean).join(' ') : classes || '',\r\n style: styleWithoutClasses || {},\r\n };\r\n }\r\n\r\n getCardContainerStyle(): Record<string, any> {\r\n const schema = this.itemInfo?.layoutSchema || {};\r\n const layout = schema?.layout || {};\r\n\r\n let cardsPerRow = Number(layout.desktopCardsPerRow) || 3;\r\n\r\n if (this.deviceMode === 'tablet') {\r\n cardsPerRow = Number(layout.tabletCardsPerRow) || 2;\r\n }\r\n\r\n if (this.deviceMode === 'mobile') {\r\n cardsPerRow = Number(layout.mobileCardsPerRow) || 1;\r\n }\r\n\r\n const baseStyle: any = this.getStyleWithoutClasses(schema.style).style;\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n schema?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n display: 'grid',\r\n gridTemplateColumns: `repeat(${Math.max(1, cardsPerRow)}, minmax(0, 1fr))`,\r\n gap: layout.gap || baseStyle.gap || '16px',\r\n padding: '0px 10px 0px 10px',\r\n width: '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getSingleCardStyle(): Record<string, any> {\r\n const schema = this.itemInfo?.layoutSchema || {};\r\n\r\n const baseStyle = this.getStyleWithoutClasses(schema.stylePerCard).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n schema?.stylePerCard?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n width: '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getHeaderStyle(): Record<string, any> {\r\n const header = this.itemInfo?.header || {};\r\n\r\n const baseStyle: any = this.getStyleWithoutClasses(header.style).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n header?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n width: baseStyle.width || '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getHeaderElementWrapperStyle(element: any): Record<string, any> {\r\n const baseStyle = this.getStyleWithoutClasses(element?.wrapperStyle).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n element?.responsiveWrapperStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getHorizontalLayoutStyle(layout: any): Record<string, any> {\r\n const baseStyle: any = this.getStyleWithoutClasses(layout?.style).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n layout?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n display: baseStyle.display || 'grid',\r\n width: baseStyle.width || '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n showButtonIcon(button: any): boolean {\r\n const mode = button?.option?.buttonContent;\r\n\r\n if (mode === 'icon' || mode === 'iconCaption') {\r\n return !!button?.icon;\r\n }\r\n\r\n return !mode && !button?.caption && !!button?.icon;\r\n }\r\n\r\n showButtonCaption(button: any): boolean {\r\n const mode = button?.option?.buttonContent;\r\n\r\n if (mode === 'caption' || mode === 'iconCaption') {\r\n return !!button?.caption;\r\n }\r\n\r\n return !mode && !!button?.caption;\r\n }\r\n\r\n getScope(scope: any): string {\r\n if (!scope || typeof scope !== 'string') {\r\n return '';\r\n }\r\n\r\n const start = scope.indexOf('#/') + 2;\r\n const end = scope.indexOf('/', start);\r\n\r\n if (start < 2 || end <= start) {\r\n return '';\r\n }\r\n\r\n return scope.substring(start, end);\r\n }\r\n\r\n getMediaSource(layout: any, record: any): string {\r\n const field = layout?.scope?.reference?.split('/').pop();\r\n const value = layout?.option?.src || (field ? record?.[field] : '');\r\n \r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n \r\n getMediaLabel(layout: any): string {\r\n const label = layout?.label;\r\n \r\n if (typeof label === 'string' && label.trim()) {\r\n return label;\r\n }\r\n \r\n const reference = layout?.scope?.reference;\r\n const field = reference?.split('/').pop();\r\n const scope = reference ? this.getScope(reference) : '';\r\n \r\n return label?.caption\r\n || this.itemInfo?.propertySchema?.[scope]?.[field]?.caption\r\n || 'Media';\r\n }\r\n \r\n getMediaKind(\r\n layout: any,\r\n record: any\r\n ): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(layout, record);\r\n \r\n // Base64 sources can identify their type without a filename.\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n \r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n \r\n // Blob and Base64 URLs may have no extension.\r\n // Try the original filename/reference as well.\r\n const field = layout?.scope?.reference?.split('/').pop();\r\n const originalValue = field ? record?.[field] : undefined;\r\n \r\n const candidates = [\r\n source,\r\n layout?.option?.fileName,\r\n originalValue\r\n ];\r\n \r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = [\r\n 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\r\n 'txt', 'csv', 'zip', 'rar', '7z'\r\n ];\r\n \r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string') continue;\r\n if (/^(data|blob):/i.test(candidate)) continue;\r\n \r\n // Ignore URL query parameters and fragments.\r\n let path = candidate.split(/[?#]/)[0];\r\n \r\n try {\r\n path = decodeURIComponent(path);\r\n } catch {\r\n // Keep the original path when URL encoding is invalid.\r\n }\r\n \r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n \r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n \r\n return 'image';\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract gap: dateRange, quantity, credit card\r\n reality: a card renders string, number, image, date, time, dropdown, boolean and\r\n autocomplete. Legacy checkbox fields normalize to boolean. dropdown and boolean arrived on 2026-09-18; before that a card\r\n dropped them silently.\r\n failure: a field of a missing type renders empty, with no error.\r\n instead: quantity is grid-only by design; for a dateRange or a credit card use a modal.\r\n seen: this file carries four switch blocks (lines 23, 94, 267, 488) and none of them has\r\n a case for those three - the gap belongs to the container, not to one block -->\r\n\r\n<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <div class=\"picker-field\">\r\n <p-datepicker #cardDatePicker\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [dateFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n (onInput)=\"onDateTyping($event)\"\r\n [class]=\"element?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [panelStyleClass]=\"picker.datePanelClass\"\r\n [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"element?.option?.keyboardType ?? 'date'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, cardDatePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(cardDatePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\"\r\n aria-label=\"Open calendar\"\r\n (pointerdown)=\"picker.openFromIcon($event, cardDatePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(layout?.scope?.reference && itemInfo.propertySchema[getScope(layout.scope?.reference)] ? itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.type : layout?.type == 'HorizontalLayout' ? 'HorizontalLayout' : 'default')\">\r\n <!-- Media Control -->\r\n <div\r\n *ngSwitchCase=\"'media'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"mediaContent; context: { layout: layout, record: record }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(layout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(layout.label?.style).classes\">\r\n {{ getHorizontalLayoutCaption(layout) }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n @if(layout.option && layout.option.control &&\r\n !layout.option.protected){\r\n @switch (layout.option.control) {\r\n @case ('textInput') {\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ??\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ??\r\n '--'\r\n }}\r\n </p>\r\n }\r\n @case ('password') {\r\n <span>Switch not supported yet</span>\r\n\r\n }\r\n @case ('combobox') {\r\n <span>Combobox not supported yet</span>\r\n }\r\n @case('textArea'){\r\n <span>TextArea not supported yet</span>\r\n }\r\n @case ('switch') {\r\n <span>Switch not supported yet</span>\r\n }\r\n\r\n @case('radiobutton') {\r\n <span>Radiobutton not supported yet</span>\r\n }\r\n\r\n @case ('dropdown') {\r\n <select id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(layout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style)?.style\"\r\n [name]=\"layout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)][\r\n layout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[\r\n layout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[layout?.option?.optionValue]\">\r\n {{ item[layout?.option?.optionLabel] }}\r\n </option>\r\n </select>\r\n }\r\n\r\n @case ('autocomplete') {\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[layout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, layout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"layout.option.required\"\r\n [name]=\"layout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"layout?.scope?.style?.classes ? layout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"layout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: layout.scope?.reference\"\r\n [vlCustomKeyboard]=\"layout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n }\r\n }\r\n }@else {\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ??\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ??\r\n '--'\r\n }}\r\n </p>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\"\r\n [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\"\r\n [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- VALUE -->\r\n @if(layout.option && layout.option.control &&\r\n !layout.option.protected){\r\n @switch (layout.option.control) {\r\n @case ('textInput') {\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{\r\n record[layout.scope?.reference.split('/').pop()]\r\n | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n }\r\n @case ('slider') {\r\n <p>Slider not Implemented yet</p>\r\n\r\n }\r\n @case ('spinner') {\r\n <p>Spinner not Implemented yet</p>\r\n }\r\n }\r\n } @else{\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{\r\n record[layout.scope?.reference.split('/').pop()]\r\n | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n }\r\n\r\n </div>\r\n\r\n <!-- dropdown Control -->\r\n <div *ngSwitchCase=\"'dropdown'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <select id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(layout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style)?.style\"\r\n [name]=\"layout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)][\r\n layout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[\r\n layout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[layout?.option?.optionValue]\">\r\n {{ item[layout?.option?.optionLabel]\r\n }}\r\n </option>\r\n </select>\r\n </h3>\r\n </div>\r\n\r\n <!-- autocomplete Control -->\r\n <div *ngSwitchCase=\"'autocomplete'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[layout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, layout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"layout.option.required\"\r\n [name]=\"layout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"layout?.scope?.style?.classes ? layout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"layout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: layout.scope?.reference\"\r\n [vlCustomKeyboard]=\"layout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n </h3>\r\n </div>\r\n\r\n <!-- checkbox Control -->\r\n <div *ngSwitchCase=\"'boolean'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <input type=\"checkbox\"\r\n class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)][\r\n layout.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [name]=\"layout.scope?.reference\" />\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <button\r\n [style]=\"getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"layout.option.protected ? 'disabled-button' : getStyleWithoutClasses(layout?.style).classes\"\r\n (click)=\"\r\n invokeButtonClick(\r\n layout,\r\n record,\r\n getRecordIndex(record)\r\n )\r\n\">\r\n <ng-container\r\n *ngIf=\"!layout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"layout.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ layout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <!-- HorizontalLayout Control -->\r\n <div *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(\r\n layout?.style\r\n ).classes\" [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container\r\n *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(innerLayout.scope?.reference && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] ? itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n <!-- Media Control -->\r\n <div\r\n *ngSwitchCase=\"'media'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"mediaContent; context: {\r\n layout: innerLayout,\r\n record: record\r\n }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(innerLayout.label?.style).classes\">\r\n {{\r\n getHorizontalLayoutCaption(innerLayout)\r\n }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n @if(innerLayout.option &&\r\n innerLayout.option.control &&\r\n !innerLayout.option.protected){\r\n @switch\r\n (innerLayout.option.control)\r\n {\r\n @case ('textInput') {\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.dateFormat; else checkInnerTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option.dateFormat)\r\n : '--' }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template\r\n #checkInnerTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalInnerValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n |\r\n date:\r\n innerLayout.option.timeFormat)\r\n : '--' }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template\r\n #normalInnerValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ??\r\n '--' }}\r\n </ng-template>\r\n </h3>\r\n }\r\n @case ('password') {\r\n <span>Switch not supported\r\n yet</span>\r\n\r\n }\r\n @case ('combobox') {\r\n <span>Combobox not supported\r\n yet</span>\r\n }\r\n @case('textArea'){\r\n <span>TextArea not supported\r\n yet</span>\r\n }\r\n @case ('switch') {\r\n <span>Switch not supported\r\n yet</span>\r\n }\r\n\r\n @case('radiobutton') {\r\n <span>Radiobutton not supported\r\n yet</span>\r\n }\r\n\r\n @case ('dropdown') {\r\n <select id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.style\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][\r\n innerLayout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[\r\n innerLayout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[innerLayout?.option?.optionValue]\">\r\n {{\r\n item[innerLayout?.option?.optionLabel]\r\n }}\r\n </option>\r\n </select>\r\n }\r\n\r\n @case ('autocomplete') {\r\n\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[innerLayout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, innerLayout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"innerLayout.option.required\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [class]=\"innerLayout?.scope?.style?.classes ? innerLayout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"innerLayout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: innerLayout.scope?.reference\"\r\n [vlCustomKeyboard]=\"innerLayout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n }\r\n }\r\n }@else{\r\n\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.dateFormat; else checkInnerTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option.dateFormat)\r\n : '--' }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template\r\n #checkInnerTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalInnerValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n |\r\n date:\r\n innerLayout.option.timeFormat)\r\n : '--' }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template\r\n #normalInnerValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ??\r\n '--' }}\r\n </ng-template>\r\n </h3>\r\n }\r\n\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n {{\r\n record[innerLayout.scope?.reference.split('/').pop()]\r\n | currency:\r\n innerLayout.option?.currency\r\n ?\r\n innerLayout.option.currency\r\n :\r\n 'USD'\r\n }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(innerLayout.label?.style).classes\">\r\n {{\r\n getHorizontalLayoutCaption(innerLayout)\r\n }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option?.dateFormat\r\n ?\r\n innerLayout.option?.dateFormat\r\n :\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[innerLayout.scope?.reference.split('/').pop()]?.format\r\n || 'yyyy-MM-dd') : '--' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(innerLayout.label?.style).classes\">\r\n {{\r\n getHorizontalLayoutCaption(innerLayout)\r\n }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option?.timeFormat\r\n ?\r\n innerLayout.option?.timeFormat\r\n :itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[innerLayout.scope?.reference.split('/').pop()]?.format\r\n || 'HH:mm') : '--' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- dropdown Control -->\r\n <div *ngSwitchCase=\"'dropdown'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n <select\r\n id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.style\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][\r\n innerLayout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[\r\n innerLayout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[innerLayout?.option?.optionValue]\">\r\n {{\r\n item[innerLayout?.option?.optionLabel]\r\n }}\r\n </option>\r\n </select>\r\n </h3>\r\n </div>\r\n\r\n <!-- autocomplete Control -->\r\n <div *ngSwitchCase=\"'autocomplete'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[innerLayout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, innerLayout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"innerLayout.option.required\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [class]=\"innerLayout?.scope?.style?.classes ? innerLayout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"innerLayout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: innerLayout.scope?.reference\"\r\n [vlCustomKeyboard]=\"innerLayout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n </h3>\r\n </div>\r\n\r\n <!-- checkbox Control -->\r\n <div *ngSwitchCase=\"'boolean'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n <input type=\"checkbox\"\r\n class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][\r\n innerLayout.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [name]=\"innerLayout.scope?.reference\" />\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button nz-button\r\n [matTooltip]=\"getHorizontalLayoutTooltip(innerLayout)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.style).style\"\r\n [class]=\"innerLayout.option?.visible ? innerLayout.option.protected ? 'disabled-button' : getStyleWithoutClasses(innerLayout?.style).classes : 'hidden'\"\r\n (click)=\"\r\n invokeButtonClick(\r\n innerLayout,\r\n record,\r\n getRecordIndex(record)\r\n )\r\n\">\r\n <span\r\n class=\"schema-btn-content\">\r\n <i\r\n *ngIf=\"showButtonIcon(innerLayout)\"\r\n nz-icon\r\n [nzType]=\"innerLayout.icon\"\r\n nzTheme=\"outline\">\r\n </i>\r\n\r\n <span\r\n *ngIf=\"showButtonCaption(innerLayout)\">\r\n {{\r\n innerLayout.caption\r\n }}\r\n </span>\r\n\r\n <span *ngIf=\"\r\n !showButtonIcon(innerLayout) &&\r\n !showButtonCaption(innerLayout)\r\n \">\r\n Button\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-date-picker\r\n [required]=\"element.option.required\"\r\n [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format : 'yyyy-MM-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- bottom pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<ng-template #mediaContent let-layout=\"layout\" let-record=\"record\">\r\n <ng-container *ngIf=\"getMediaSource(layout, record) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(layout, record)\">\r\n\r\n <!-- Default: image. Keep your existing image-click behaviour. -->\r\n <img\r\n *ngSwitchDefault\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"source\"\r\n [alt]=\"getMediaLabel(layout)\"\r\n loading=\"lazy\"\r\n (click)=\"showImageDetails(layout.option, record)\" />\r\n\r\n <video\r\n *ngSwitchCase=\"'video'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(layout)\"\r\n controls\r\n playsinline\r\n preload=\"metadata\">\r\n Your browser does not support video playback.\r\n </video>\r\n\r\n <audio\r\n *ngSwitchCase=\"'audio'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(layout)\"\r\n controls\r\n preload=\"metadata\">\r\n Your browser does not support audio playback.\r\n </audio>\r\n\r\n <a\r\n *ngSwitchCase=\"'pdf'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [href]=\"source\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(layout) }}\r\n </a>\r\n\r\n <a\r\n *ngSwitchCase=\"'file'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [href]=\"source\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(layout) }}\r\n </a>\r\n\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>","import { Component, ChangeDetectorRef, Input } from '@angular/core';\r\nimport { UtilityService } from '../../services/utility.service';\r\n\r\n@Component({\r\n selector: 'vl-label',\r\n standalone: true,\r\n templateUrl: './label.html',\r\n styleUrl: './label.css',\r\n})\r\nexport class Label {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n selectedLanguageInfo: any = {};\r\n\r\n constructor(\r\n private cdr: ChangeDetectorRef,\r\n private utilityService: UtilityService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.utilityService.currentProjectlanguage$.subscribe((uiLang: any) => {\r\n queueMicrotask(() => {\r\n if (uiLang) {\r\n this.selectedLanguageInfo = uiLang\r\n this.cdr.markForCheck();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n getlabel(formField: any) {\r\n let caption = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n const translation = this.selectedLanguageInfo?.selectedLanguage;\r\n return translation && translation[caption] ? translation[caption] : caption;\r\n }\r\n\r\n}\r\n","<label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes ? formField?.label?.style?.classes[0] : ''\">{{\r\n this.getlabel(formField) }}</label>","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: fields with a backend source (option.autocomplete) load their list through\r\n// RemoteListService - autocomplete suggestions, dropdown/combobox items; the autocompletes of this\r\n// container stayed empty before\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: date and time fields use DateTimePickerService like the dialog - toolkit keyboard in\r\n// the field, calendar docked at the bottom from the icon, time picker at its field. The empty\r\n// picker handlers they called before are gone\r\n// Shuaib 2026-09-24\r\n// - new: renderFieldType maps legacy checkbox fields to boolean so existing forms continue to render.\r\nimport {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n SimpleChanges,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n inject,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { NzSelectModule } from 'ng-zorro-antd/select';\r\n\r\nimport { Label } from '../../components/label/label';\r\nimport { String } from '../../components/string/string';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [PlaceholderPipe, CommonModule, FormsModule, NzSelectModule, String, Label,\r\n NzDatePickerModule,\r\n DatePickerModule,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n CustomKeyboardDirective,\r\n ],\r\n selector: 'vl-form',\r\n templateUrl: './form.component.html',\r\n styleUrl: './form.component.css',\r\n})\r\nexport class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\r\n // ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Loaded lists by field reference. */\r\n remoteData: Record<string, any[]> = {};\r\n /** Current suggestions of an autocomplete by field reference. */\r\n remoteSuggestions: Record<string, any[]> = {};\r\n\r\n /** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */\r\n async loadRemoteLists(nodes: any[], propertySchema: any): Promise<void> {\r\n const sources = new Map<string, any>();\r\n const visit = (node: any): void => {\r\n if (!node || typeof node !== 'object') {\r\n return;\r\n }\r\n\r\n if (node.option?.autocomplete && node.scope?.reference) {\r\n sources.set(node.scope.reference, node);\r\n }\r\n\r\n for (const value of Object.values(node)) {\r\n if (value && typeof value === 'object') {\r\n visit(value);\r\n }\r\n }\r\n };\r\n\r\n nodes.forEach(visit);\r\n\r\n await Promise.all([...sources.entries()].map(async ([reference, node]) => {\r\n const list = await this.remoteLists.loadShared(node.option.autocomplete);\r\n this.remoteData[reference] = list;\r\n\r\n const scope = reference.substring(reference.indexOf('#/') + 2, reference.indexOf('/', reference.indexOf('#/') + 2));\r\n const property = propertySchema?.[scope]?.[reference.split('/').pop() ?? ''];\r\n\r\n if (property && node.option?.control && node.option.control !== 'autocomplete' && list.length) {\r\n property.data = list;\r\n }\r\n }));\r\n }\r\n\r\n /** (completeMethod) of an autocomplete with a backend list. */\r\n completeRemote(event: any, node: any): void {\r\n const reference = node?.scope?.reference ?? '';\r\n this.remoteSuggestions[reference] = this.remoteLists.filter(this.remoteData[reference], reference.split('/').pop(), event?.query);\r\n }\r\n\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n ngOnDestroy(): void {\r\n this.picker.closeIfWithin(this.host.nativeElement);\r\n }\r\n\r\n /** Keep existing checkbox data objects usable; new objects use boolean. */\r\n renderFieldType(type: string | undefined): string | undefined {\r\n return type === 'checkbox' ? 'boolean' : type;\r\n }\r\n\r\n customEmailPattern = '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$';\r\n\r\n showPassword = false;\r\n formCopy: any = {};\r\n\r\n @Input() errorMessages: any = {};\r\n @Input() creditCardError: any = {};\r\n @Input() form: any = {};\r\n @Input() selectedLanguageInfo: any = {};\r\n\r\n @Output() formButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() checkBoxChangeEvent: EventEmitter<any> = new EventEmitter();\r\n\r\n ngOnInit(): void { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Backend lists of fields with option.autocomplete (any data type, any control).\r\n if (changes['form'] && this.form) {\r\n void this.loadRemoteLists([this.form.layoutSchema], this.form.propertySchema);\r\n }\r\n if (changes['form'] && this.form) {\r\n this.formCopy = this.safeClone(this.form);\r\n this.setValidations();\r\n }\r\n\r\n if (\r\n (changes['selectedLanguageInfo'] || this.selectedLanguageInfo) &&\r\n this.selectedLanguageInfo?.selectedLanguage\r\n ) {\r\n this.applySelectedLanguage();\r\n this.setValidations();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.setValidations();\r\n });\r\n }\r\n\r\n private safeClone(value: any): any {\r\n try {\r\n return JSON.parse(JSON.stringify(value || {}));\r\n } catch {\r\n return {};\r\n }\r\n }\r\n\r\n private applySelectedLanguage(): void {\r\n if (this.selectedLanguageInfo?.errorMessages) {\r\n this.errorMessages = this.selectedLanguageInfo.errorMessages;\r\n }\r\n\r\n if (!this.formCopy || !this.form) {\r\n return;\r\n }\r\n\r\n const selectedLanguage = this.selectedLanguageInfo.selectedLanguage;\r\n\r\n this.form.propertySchema = this.formCopy.propertySchema\r\n ? this.safeClone(this.formCopy.propertySchema)\r\n : {};\r\n\r\n this.form.propertySchema = this.translateSchema(\r\n this.form.propertySchema,\r\n selectedLanguage\r\n );\r\n\r\n if (this.formCopy?.layoutSchema?.formSections?.length) {\r\n this.formCopy.layoutSchema.formSections.forEach(\r\n (formSection: any, sectionIndex: number) => {\r\n if (\r\n formSection?.label?.caption &&\r\n selectedLanguage[formSection.label.caption]\r\n ) {\r\n this.form.layoutSchema.formSections[sectionIndex].label.caption =\r\n selectedLanguage[formSection.label.caption];\r\n }\r\n\r\n if (formSection?.formFields?.length) {\r\n formSection.formFields.forEach(\r\n (formField: any, fieldIndex: number) => {\r\n if (\r\n formField?.label?.caption &&\r\n selectedLanguage[formField.label.caption]\r\n ) {\r\n this.form.layoutSchema.formSections[sectionIndex].formFields[\r\n fieldIndex\r\n ].label.caption = selectedLanguage[formField.label.caption];\r\n }\r\n }\r\n );\r\n }\r\n }\r\n );\r\n }\r\n }\r\n\r\n translateSchema(schema: any, selectedLanguage: any): any {\r\n if (!schema || typeof schema !== 'object' || !selectedLanguage) {\r\n return schema;\r\n }\r\n\r\n Object.keys(schema).forEach((key) => {\r\n const value = schema[key];\r\n\r\n if (value && typeof value === 'object' && !Array.isArray(value)) {\r\n this.translateSchema(value, selectedLanguage);\r\n }\r\n\r\n if (Array.isArray(value)) {\r\n value.forEach((item) => {\r\n if (item && typeof item === 'object') {\r\n this.translateSchema(item, selectedLanguage);\r\n }\r\n });\r\n }\r\n\r\n if (\r\n value &&\r\n typeof value === 'object' &&\r\n typeof value.caption === 'string' &&\r\n value.caption.trim()\r\n ) {\r\n const original = value.caption.trim();\r\n\r\n if (selectedLanguage[original]) {\r\n value.caption = selectedLanguage[original];\r\n }\r\n }\r\n\r\n if (\r\n value &&\r\n typeof value === 'object' &&\r\n typeof value.placeholder === 'string' &&\r\n value.placeholder.trim()\r\n ) {\r\n const original = value.placeholder.trim();\r\n\r\n if (selectedLanguage[original]) {\r\n value.placeholder = selectedLanguage[original];\r\n }\r\n }\r\n });\r\n\r\n return schema;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any): { classes: string; style: any } {\r\n if (!styleObject || typeof styleObject !== 'object') {\r\n return { classes: '', style: {} };\r\n }\r\n\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n\r\n return {\r\n classes: Array.isArray(classes) ? classes.join(' ') : classes || '',\r\n style: styleWithoutClasses || {},\r\n };\r\n }\r\n\r\n getSectionBodyStyle(formSection: any): any {\r\n const layout = formSection?.layout || {};\r\n const schemaStyle = this.getStyleWithoutClasses(formSection?.style).style;\r\n\r\n return {\r\n display: schemaStyle?.display || 'grid',\r\n gridTemplateColumns:\r\n schemaStyle?.gridTemplateColumns ||\r\n `repeat(${layout?.desktopColumns || 12}, minmax(0, 1fr))`,\r\n gap: schemaStyle?.gap || layout?.gap || '10px',\r\n alignItems: schemaStyle?.alignItems || 'start',\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n ...schemaStyle,\r\n };\r\n }\r\n\r\n getFieldWrapperStyle(formField: any): any {\r\n const schemaStyle = this.getStyleWithoutClasses(formField?.style).style;\r\n\r\n return {\r\n minWidth: 0,\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n ...schemaStyle,\r\n };\r\n }\r\n\r\n getFieldInnerLayoutStyle(formField: any): any {\r\n if (formField?.layout === 'horizontal') {\r\n return {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(110px, 30%) 1fr',\r\n alignItems: 'center',\r\n gap: '10px',\r\n };\r\n }\r\n\r\n return {\r\n display: 'block',\r\n };\r\n }\r\n\r\n getScope(scope: any): string {\r\n if (!scope || typeof scope !== 'string') {\r\n return '';\r\n }\r\n\r\n const start = scope.indexOf('#/') + 2;\r\n const end = scope.indexOf('/', start);\r\n\r\n if (start >= 2 && end > start) {\r\n return scope.substring(start, end);\r\n }\r\n\r\n return '';\r\n }\r\n\r\n togglePasswordVisibility(): void {\r\n this.showPassword = !this.showPassword;\r\n }\r\n\r\n invokeFormBtnClick(option: any, propertySchema: any): void {\r\n this.formButtonClick.emit({\r\n option,\r\n propertySchema,\r\n });\r\n }\r\n\r\n setformData(): void {\r\n this.checkBoxChangeEvent.emit(this.form?.propertySchema);\r\n }\r\n\r\n setErroMessage(formField: any, errorMessages: any, field: any): string {\r\n let error = '';\r\n let fieldName = '';\r\n\r\n if (field?.errors?.required) {\r\n error = errorMessages?.required || '';\r\n } else if (field?.errors?.email || field?.errors?.pattern) {\r\n error = errorMessages?.pattern || '';\r\n } else if (field?.errors?.minlength) {\r\n error = errorMessages?.minlength || '';\r\n } else if (field?.errors?.maxlength) {\r\n error = errorMessages?.maxlength || '';\r\n }\r\n\r\n if (formField?.label?.value) {\r\n fieldName = formField.label.value;\r\n } else {\r\n const scope = this.getScope(formField?.scope?.reference);\r\n const key = formField?.scope?.reference?.split('/').pop();\r\n const propertySchema = this.form?.propertySchema?.[scope]?.[key];\r\n\r\n fieldName = propertySchema?.caption || propertySchema?.placeholder || '';\r\n }\r\n\r\n if (error && error.toString().includes('{{requiredLength}}')) {\r\n error = error.replace(\r\n /{{\\s*requiredLength\\s*}}/g,\r\n formField?.minlength?.toString() || ''\r\n );\r\n }\r\n\r\n return error.replace(/{{\\s*field\\s*}}/g, fieldName);\r\n }\r\n\r\n setValidations(): void {\r\n if (!this.form?.layoutSchema?.formSections?.length) {\r\n return;\r\n }\r\n\r\n this.form.layoutSchema.formSections.forEach((formSection: any) => {\r\n if (!formSection?.formFields?.length) {\r\n return;\r\n }\r\n\r\n formSection.formFields.forEach((formField: any) => {\r\n const reference = formField?.scope?.reference;\r\n\r\n if (!reference || !this.form?.propertySchema) {\r\n return;\r\n }\r\n\r\n const scope = this.getScope(reference);\r\n const key = reference.split('/').pop();\r\n\r\n const property = this.form.propertySchema?.[scope]?.[key];\r\n\r\n if (!property?.validation?.length) {\r\n return;\r\n }\r\n\r\n property.validation.forEach((validation: any) => {\r\n if (validation.required) {\r\n formField.required = true;\r\n }\r\n\r\n if (validation.email) {\r\n formField.email = true;\r\n }\r\n\r\n if (validation.minlength) {\r\n formField.minlength = validation.minlength;\r\n }\r\n\r\n if (validation.maxlength) {\r\n formField.maxlength = validation.maxlength;\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n matchData: any = [];\r\n\r\n getLabel(formField: any) {\r\n let caption = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.form.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n const translation = this.selectedLanguageInfo?.selectedLanguage;\r\n return translation && translation[caption] ? translation[caption] : caption;\r\n }\r\n\r\n dateChangeEvent(formField: any, event: any) { }\r\n\r\n onDateTyping(event: any) { }\r\n\r\n onTimeTyping(event: any) { }\r\n\r\n timeChangeEvent(formField: any, event: any) { }\r\n\r\n autocompChangeEvent(event: any, formfield: any) { }\r\n\r\n autocompFocusOutEvent(event: any, formfield: any) { }\r\n\r\n // Media rendering only; does not modify the schema or field values.\r\n private getMediaProperty(field: any): any {\r\n const reference = field?.scope?.reference;\r\n const key = reference?.split('/').pop();\r\n return key ? this.form?.propertySchema?.[this.getScope(reference)]?.[key] : undefined;\r\n }\r\n\r\n getMediaSource(field: any): string {\r\n const property = this.getMediaProperty(field);\r\n const value = field?.option?.src || property?.value || property?.default || '';\r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n\r\n getMediaLabel(field: any): string {\r\n if (typeof field?.label === 'string' && field.label.trim()) return field.label;\r\n return field?.label?.value || field?.label?.caption\r\n || this.getMediaProperty(field)?.caption || 'Media';\r\n }\r\n\r\n getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(field);\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n\r\n const property = this.getMediaProperty(field);\r\n const candidates = [source, field?.option?.fileName, property?.value, property?.default];\r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'csv', 'zip', 'rar', '7z'];\r\n\r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string' || /^(data|blob):/i.test(candidate)) continue;\r\n let path = candidate.split(/[?#]/)[0];\r\n try { path = decodeURIComponent(path); } catch { /* Keep the original path. */ }\r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n return 'image';\r\n }\r\n}","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\r\n instead of PrimeNG's own icon with empty handlers -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\r\n model.component.html and the whole Designer but not this file, so one data object rendered\r\n in a modal and stayed empty here\r\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\r\n next to the code that implements it -->\r\n<div class=\"form-renderer\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <div\r\n *ngFor=\"let formSection of form?.layoutSchema?.formSections; let i = index\"\r\n class=\"section-card\">\r\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <div *ngFor=\"let formField of formSection.formFields\" class=\"field-row\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\">\r\n <!-- @contract decision: this switch decides whether a field appears at all\r\n reality: renders string, number, image, date, time, dropdown, boolean,\r\n autocomplete, dateRange and the credit card type. Everything else\r\n falls into the default branch and the field renders empty - no error,\r\n nothing in the console either. Existing checkbox fields are normalized\r\n to boolean before this switch; new fields should use boolean.\r\n seen: measured 2026-09-19 with viewdefinition-contract/derive-capabilities.sh\r\n against this file; date, time, dropdown, boolean, autocomplete and\r\n dateRange arrived on 2026-09-18 -->\r\n <div [ngSwitch]=\"renderFieldType(\r\n formField?.scope?.reference &&\r\n form?.propertySchema?.[getScope(formField.scope?.reference)]\r\n ? form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.type\r\n : 'default'\r\n )\">\r\n <!-- Media control -->\r\n\r\n <div *ngSwitchCase=\"'media'\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <ng-container *ngTemplateOutlet=\"formMediaContent; context: { field: formField }\"></ng-container>\r\n </div>\r\n\r\n\r\n <!-- credit card control -->\r\n <!-- @contract decision: the credit card type is spelled creditCard\r\n reality: it was carditCard here until 2026-09-19. The rename of 2026-09-15\r\n reached model.component.html and the whole Designer, but not this\r\n file and not utility.service.ts, so the same data object rendered in\r\n one container and stayed empty in the other. All four places agree now.\r\n failure: a data object still declaring carditCard renders empty everywhere -\r\n that spelling is read nowhere any more.\r\n instead: declare the type as creditCard. -->\r\n <div *ngSwitchCase=\"'creditCard'\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <div id=\"card-element\"></div>\r\n <div id=\"card-errors\"\r\n [class]=\"creditCardError?.textContent !== '' ? 'text-red-400 m-0' : ''\"></div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <span *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"formField?.option?.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between\">\r\n <span\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </span>\r\n\r\n <span>\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n\r\n <span *ngIf=\"!formField?.option?.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n formField?.label?.value\r\n ? formField.label.value\r\n : formField?.label?.caption\r\n ? formField.label.caption\r\n :\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n\r\n <div [ngStyle]=\"\r\n formField?.option?.password\r\n ? {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center'\r\n }\r\n : {}\r\n \">\r\n <input [type]=\"\r\n formField?.option?.password\r\n ? !showPassword\r\n ? 'password'\r\n : 'text'\r\n : 'text'\r\n \" #inputField=\"ngModel\" [required]=\"formField?.required\"\r\n [attr.inputmode]=\"\r\n formField?.option?.email\r\n ? 'email'\r\n : formField?.option?.password\r\n ? 'numeric'\r\n : 'text'\r\n \" [pattern]=\"formField?.email ? customEmailPattern : ''\"\r\n [email]=\"formField?.email\"\r\n [minlength]=\"formField?.minlength\"\r\n [maxlength]=\"formField?.maxlength\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\" [placeholder]=\"form.propertySchema | vlPlaceholder: formField.scope?.reference\" />\r\n\r\n <i *ngIf=\"formField?.option?.password\" class=\"fa\"\r\n [ngClass]=\"showPassword ? 'fa-eye' : 'fa-eye-slash'\"\r\n (click)=\"togglePasswordVisibility()\"\r\n style=\"position: absolute; right: 10px; cursor: pointer\"></i>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.validation?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.validation?.style)?.style\">\r\n <p [class]=\"\r\n formField?.layout === 'horizontal'\r\n ? 'text-red-400 m-0 horizontal-error'\r\n : 'text-red-400 m-0'\r\n \" *ngIf=\"inputField?.errors\">\r\n {{ setErroMessage(formField, errorMessages, inputField) }}\r\n </p>\r\n </div>\r\n </span>\r\n </span>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"formField?.option?.protected\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n <h5>\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.value\r\n | currency\r\n : formField?.option?.currency\r\n : true\r\n : formField?.option?.decimalPoint\r\n }}\r\n </h5>\r\n </span>\r\n\r\n <span *ngIf=\"!formField?.option?.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n formField?.label?.value\r\n ? formField.label.value\r\n :\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n\r\n <input type=\"number\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\" [placeholder]=\"form.propertySchema | vlPlaceholder: formField.scope?.reference\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- checkbox control -->\r\n <div *ngSwitchCase=\"'boolean'\" class=\"form-group\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <span *ngIf=\"formField?.option?.postfixCaption\">\r\n <label class=\"form-check-label\">\r\n <input type=\"checkbox\" class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"setformData()\" />\r\n\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n </span>\r\n\r\n <div *ngIf=\"!formField?.option?.postfixCaption\"\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label class=\"form-check-label\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n\r\n <input type=\"checkbox\" class=\"form-check-input\" [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"setformData()\" />\r\n </label>\r\n </div>\r\n </div>\r\n\r\n <!-- DateRange control -->\r\n <div *ngSwitchCase=\"'dateRange'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{\r\n formField.label?.value\r\n ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateRangeField?.touched && dateRangeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateRangeField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateRangeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{getLabel(formField)}}</label>\r\n\r\n <span>\r\n <div class=\"picker-field\">\r\n <p-datepicker #datePicker #dateField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\r\n (ngModelChange)=\"dateChangeEvent(formField, $event)\"\r\n (onInput)=\"onDateTyping($event)\" [dateFormat]=\"\r\n form.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ]?.format || 'yy-mm-dd'\r\n \" [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [class]=\"formField?.scope?.style?.classes?.[0] || ''\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\" appendTo=\"body\"\r\n [panelStyleClass]=\"picker.datePanelClass\" [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"formField?.option?.keyboardType ?? 'date'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, datePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(datePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\" aria-label=\"Open calendar\"\r\n (pointerdown)=\"picker.openFromIcon($event, datePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateField?.touched && dateField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages,\r\n \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Time control -->\r\n <div *ngSwitchCase=\"'time'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{getLabel(formField)}}</label>\r\n <span>\r\n <div class=\"picker-field\">\r\n <p-datepicker #timePicker #timeField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\" [timeOnly]=\"true\"\r\n hourFormat=\"24\" [disabled]=\"formField?.option?.disabled\" [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\r\n (onInput)=\"onTimeTyping($event)\"\r\n (ngModelChange)=\"timeChangeEvent(formField, $event)\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [class]=\"formField?.scope?.style?.classes?.[0] || ''\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\" appendTo=\"body\"\r\n [panelStyleClass]=\"picker.timePanelClass\"\r\n [vlCustomKeyboard]=\"formField?.option?.keyboardType ?? 'time'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, timePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(timePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\" aria-label=\"Open time picker\"\r\n (pointerdown)=\"picker.openFromIcon($event, timePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-clock\"></i>\r\n </button>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n <div *ngIf=\"timeField?.touched && timeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"timeField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages,\r\n \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"timeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Autocomplete control -->\r\n <div *ngSwitchCase=\"'autocomplete'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <vl-label [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-label>\r\n\r\n <span>\r\n <p-autocomplete [suggestions]=\"remoteSuggestions[formField.scope?.reference] ?? []\" (completeMethod)=\"completeRemote($event, formField)\" #autocompleteField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\" [dropdown]=\"true\"\r\n [optionLabel]=\"formField.option.autocomplete.response.label\"\r\n [placeholder]=\"form.propertySchema | vlPlaceholder: formField.scope?.reference\"\r\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\r\n [vlCustomKeyboard]=\"formField?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages,\r\n \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <span *ngIf=\"formField?.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\" #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.data\r\n \" [value]=\"item[formField?.option?.optionValue]\">\r\n {{ item[formField?.option?.optionLabel] }}\r\n </option>\r\n </select>\r\n\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n </span>\r\n\r\n <div *ngIf=\"!formField?.option?.postfixCaption\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n\r\n <nz-select nzShowSearch nzAllowClear nzPlaceHolder=\"Select\"\r\n #dropdownField=\"ngModel\"\r\n [required]=\"formField?.required\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [name]=\"formField.scope?.reference\" [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <nz-option *ngFor=\"\r\n let item of form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.data\r\n \" [nzLabel]=\"item[formField?.option?.optionLabel]\"\r\n [nzValue]=\"item[formField?.option?.optionValue]\"></nz-option>\r\n </nz-select>\r\n </div>\r\n\r\n <div *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.validation?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.validation?.style)?.style\">\r\n <p [class]=\"\r\n formField?.layout === 'horizontal'\r\n ? 'text-red-400 m-0 horizontal-error'\r\n : 'text-red-400 m-0'\r\n \" *ngIf=\"dropdownField?.errors\">\r\n {{ setErroMessage(formField, errorMessages, dropdownField)\r\n }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button/default control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.style)?.style\"\r\n (click)=\"invokeFormBtnClick(formField?.option, form.propertySchema)\">\r\n {{ formField?.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n<ng-template #formMediaContent let-field=\"field\">\r\n <ng-container *ngIf=\"getMediaSource(field) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(field)\">\r\n <img *ngSwitchDefault [src]=\"source\" [alt]=\"getMediaLabel(field)\" loading=\"lazy\" />\r\n <video *ngSwitchCase=\"'video'\" [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(field)\" controls playsinline preload=\"metadata\">\r\n Your browser does not support video playback.\r\n </video>\r\n <audio *ngSwitchCase=\"'audio'\" [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(field)\" controls preload=\"metadata\">\r\n Your browser does not support audio playback.\r\n </audio>\r\n <a *ngSwitchCase=\"'pdf'\" [href]=\"source\" target=\"_blank\" rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(field) }}\r\n </a>\r\n <a *ngSwitchCase=\"'file'\" [href]=\"source\" target=\"_blank\" rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(field) }}\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: fields with a backend source (option.autocomplete) load their list through\r\n// RemoteListService - autocomplete suggestions, dropdown/combobox items; the autocompletes of this\r\n// container stayed empty before\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - new: a table wider than its place fades out at the side where more columns lie (has-more-right,\r\n// has-more-left on .ant-table-content), a hint to swipe sideways - like the dialog's lower edge.\r\n// Nothing changes when all columns fit\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: date and time cells use DateTimePickerService like the dialog\r\n// Shuaib 2026-09-24\r\n// - new: isLegacyCheckboxFieldType recognises existing checkbox fields so the grid can render them as boolean.\r\nimport { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, SimpleChanges, inject } from '@angular/core';\r\nimport { OktaAuthStateService } from '@okta/okta-angular';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { NzTableModule } from 'ng-zorro-antd/table';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { NzDropDownModule } from 'ng-zorro-antd/dropdown';\r\nimport { NzMenuModule } from 'ng-zorro-antd/menu';\r\nimport { PaginationComponent } from '../pagination/pagination.component';\r\nimport { RequestService } from '../../services/request.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\ninterface GridColumnFilterState {\r\n operator: string;\r\n value: string;\r\n}\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [PlaceholderPipe, \r\n CommonModule,\r\n FormsModule,\r\n NzTableModule,\r\n NzIconModule,\r\n ButtonModule,\r\n NzDropDownModule,\r\n NzMenuModule,\r\n PaginationComponent,\r\n NzDatePickerModule,\r\n DatePickerModule,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n CustomKeyboardDirective,\r\n ],\r\n selector: 'vl-grid',\r\n templateUrl: './grid.component.html',\r\n styleUrl: './grid.component.css'\r\n})\r\nexport class GridComponent implements AfterViewInit, OnDestroy {\r\n // ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Loaded lists by field reference. */\r\n remoteData: Record<string, any[]> = {};\r\n /** Current suggestions of an autocomplete by field reference. */\r\n remoteSuggestions: Record<string, any[]> = {};\r\n\r\n /** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */\r\n async loadRemoteLists(nodes: any[], propertySchema: any): Promise<void> {\r\n const sources = new Map<string, any>();\r\n const visit = (node: any): void => {\r\n if (!node || typeof node !== 'object') {\r\n return;\r\n }\r\n\r\n if (node.option?.autocomplete && node.scope?.reference) {\r\n sources.set(node.scope.reference, node);\r\n }\r\n\r\n for (const value of Object.values(node)) {\r\n if (value && typeof value === 'object') {\r\n visit(value);\r\n }\r\n }\r\n };\r\n\r\n nodes.forEach(visit);\r\n\r\n await Promise.all([...sources.entries()].map(async ([reference, node]) => {\r\n const list = await this.remoteLists.loadShared(node.option.autocomplete);\r\n this.remoteData[reference] = list;\r\n\r\n const scope = reference.substring(reference.indexOf('#/') + 2, reference.indexOf('/', reference.indexOf('#/') + 2));\r\n const property = propertySchema?.[scope]?.[reference.split('/').pop() ?? ''];\r\n\r\n if (property && node.option?.control && node.option.control !== 'autocomplete' && list.length) {\r\n property.data = list;\r\n }\r\n }));\r\n }\r\n\r\n /** (completeMethod) of an autocomplete with a backend list. */\r\n completeRemote(event: any, node: any): void {\r\n const reference = node?.scope?.reference ?? '';\r\n this.remoteSuggestions[reference] = this.remoteLists.filter(this.remoteData[reference], reference.split('/').pop(), event?.query);\r\n }\r\n\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n ngOnDestroy(): void {\r\n this.picker.closeIfWithin(this.host.nativeElement);\r\n this.sideHintObserver?.disconnect();\r\n this.host.nativeElement.removeEventListener('scroll', this.onSideScroll, true);\r\n }\r\n\r\n private sideHintObserver?: ResizeObserver;\r\n\r\n /** Marks the table's scroll area while columns lie beyond its left or right edge. */\r\n private updateSideHints = (): void => {\r\n for (const area of this.host.nativeElement.querySelectorAll('.ant-table-content') as NodeListOf<HTMLElement>) {\r\n const hidden = area.scrollWidth - area.clientWidth;\r\n area.classList.toggle('has-more-left', hidden > 2 && area.scrollLeft > 2);\r\n area.classList.toggle('has-more-right', hidden > 2 && area.scrollLeft < hidden - 2);\r\n }\r\n };\r\n\r\n private onSideScroll = (event: Event): void => {\r\n if ((event.target as HTMLElement)?.classList?.contains('ant-table-content')) {\r\n this.updateSideHints();\r\n }\r\n };\r\n\r\n /** Watches size and content of the table, so the hints follow new data and a turn of the device. */\r\n private startSideHints(): void {\r\n const el = this.host.nativeElement as HTMLElement;\r\n el.addEventListener('scroll', this.onSideScroll, true);\r\n this.sideHintObserver = new ResizeObserver(() => this.updateSideHints());\r\n this.sideHintObserver.observe(el);\r\n const mutations = new MutationObserver(() => {\r\n el.querySelectorAll('.ant-table-content, .ant-table-content table').forEach(t => this.sideHintObserver?.observe(t));\r\n this.updateSideHints();\r\n });\r\n mutations.observe(el, { childList: true, subtree: true });\r\n const disconnect = this.sideHintObserver.disconnect.bind(this.sideHintObserver);\r\n this.sideHintObserver.disconnect = () => { mutations.disconnect(); disconnect(); };\r\n }\r\n\r\n /** New data objects use boolean; older projects may still use checkbox. */\r\n isLegacyCheckboxFieldType(type: string | undefined): boolean {\r\n return type === 'checkbox';\r\n }\r\n\r\n isLogined: boolean = false;\r\n tableitemInfoCopy: any = {};\r\n @Input() errorMessages: any = {};\r\n @Input() environment: any;\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() tableitemInfo: any = {};\r\n @Input() form: any = {};\r\n @Input() isTableDataLoad: boolean = false;\r\n @Input() currenTableOptions: any = {};\r\n @Input() projectSeleted: any = '';\r\n @Input() pageSize: number = 5;\r\n @Input() currentPage: number = 0;\r\n @Input() pages: number[] = [];\r\n @Input() userInfo: any;\r\n @Output() onPageChange: EventEmitter<any> = new EventEmitter();\r\n @Output() onPageSizeChange: EventEmitter<any> = new EventEmitter();\r\n @Output() onGridScroll: EventEmitter<any> = new EventEmitter();\r\n @Output() showGridLink: EventEmitter<any> = new EventEmitter();\r\n @Output() gridButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() gridIncreamentClick: EventEmitter<any> = new EventEmitter();\r\n @Output() gridDecreamentClick: EventEmitter<any> = new EventEmitter();\r\n @Output() gridImgClick: EventEmitter<any> = new EventEmitter();\r\n\r\n filteredTableData: any[] = [];\r\n filtersApplied = false;\r\n private readonly columnFilterStates = new Map<\r\n string,\r\n GridColumnFilterState\r\n >();\r\n\r\n readonly filterOperators = [\r\n {\r\n label: 'Contains',\r\n value: 'contains'\r\n },\r\n {\r\n label: 'Equals',\r\n value: 'equals'\r\n },\r\n {\r\n label: 'Does not equal',\r\n value: 'notEquals'\r\n },\r\n {\r\n label: 'Starts with',\r\n value: 'startsWith'\r\n },\r\n {\r\n label: 'Ends with',\r\n value: 'endsWith'\r\n }\r\n ];\r\n\r\n constructor(private requestService: RequestService,\r\n private utilityService: UtilityService,\r\n private notificationService: NotificationService,\r\n private oktaAuthService: OktaAuthStateService,) {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.startSideHints();\r\n this.authenticating();\r\n setTimeout(() => {\r\n if (this.environment && this.environment?.login && this.environment?.login?.type == \"oktaAuth\") {\r\n this.oktaAuthService.authState$.subscribe(\r\n (result) => {\r\n if (result.isAuthenticated) {\r\n this.isLogined = true;\r\n }\r\n }\r\n );\r\n }\r\n }, 500);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Backend lists of fields with option.autocomplete (any data type, any control).\r\n if ((changes['tableitemInfo'] || changes['form']) && this.tableitemInfo) {\r\n void this.loadRemoteLists([this.tableitemInfo.layoutSchema, this.form?.layoutSchema], this.form?.propertySchema ?? this.tableitemInfo.propertySchema);\r\n }\r\n if (changes['tableitemInfo'] && this.tableitemInfo) {\r\n this.tableitemInfoCopy = JSON.parse(\r\n JSON.stringify(this.tableitemInfo)\r\n );\r\n\r\n if (this.filtersApplied) {\r\n this.applyColumnFilters();\r\n } else {\r\n this.filteredTableData = [\r\n ...(this.tableitemInfo?.data ?? [])\r\n ];\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n if (\r\n changes['selectedLanguageInfo'] ||\r\n this.selectedLanguageInfo?.selectedLanguage\r\n ) {\r\n if (\r\n this.tableitemInfoCopy?.layoutSchema &&\r\n this.tableitemInfoCopy.layoutSchema?.elements?.length\r\n ) {\r\n this.tableitemInfo.propertySchema =\r\n JSON.parse(\r\n JSON.stringify(\r\n this.tableitemInfoCopy.propertySchema\r\n )\r\n );\r\n\r\n this.tableitemInfo.propertySchema =\r\n this.translateSchema(\r\n this.tableitemInfo.propertySchema,\r\n this.selectedLanguageInfo.selectedLanguage\r\n );\r\n\r\n if (this.tableitemInfoCopy?.footer) {\r\n this.tableitemInfo.footer =\r\n JSON.parse(\r\n JSON.stringify(\r\n this.tableitemInfoCopy.footer\r\n )\r\n );\r\n\r\n this.tableitemInfo.footer =\r\n this.translateSchema(\r\n this.tableitemInfo.footer,\r\n this.selectedLanguageInfo.selectedLanguage\r\n );\r\n }\r\n\r\n this.tableitemInfoCopy.layoutSchema.elements.forEach(\r\n (column: any, index: number) => {\r\n const caption = column?.label?.caption;\r\n const translation =\r\n this.selectedLanguageInfo\r\n .selectedLanguage?.[caption];\r\n\r\n if (caption && translation) {\r\n this.tableitemInfo.layoutSchema\r\n .elements[index]\r\n .label.caption = translation;\r\n }\r\n }\r\n );\r\n }\r\n }\r\n }, 500);\r\n }\r\n\r\n get gridDisplayData(): any[] {\r\n return this.filtersApplied\r\n ? this.filteredTableData\r\n : this.tableitemInfo?.data ?? [];\r\n }\r\n\r\n translateSchema(schema: any, SelectedLanguage: any): any {\r\n if (schema && typeof schema === 'object') {\r\n for (const key of Object.keys(schema)) {\r\n const val = schema[key];\r\n if (val && typeof val === 'object') {\r\n this.translateSchema(val, SelectedLanguage);\r\n }\r\n if (val && val.caption !== undefined && typeof val.caption === 'string') {\r\n const original = val.caption.trim();\r\n if (original && SelectedLanguage[original]) {\r\n val.caption = SelectedLanguage[original];\r\n }\r\n }\r\n if (val && val.value !== undefined && typeof val.value === 'string' && !val.value.includes(\"{{\")) {\r\n const originalVal = val.value.trim();\r\n if (originalVal && SelectedLanguage[originalVal]) {\r\n val.value = SelectedLanguage[originalVal];\r\n }\r\n }\r\n }\r\n }\r\n return schema;\r\n }\r\n\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n onScrollEvent(event: any) {\r\n this.onGridScroll.emit(event);\r\n }\r\n\r\n showLinkDetails(option: any, data: any) {\r\n this.showGridLink.emit({ option: option, data: data });\r\n }\r\n\r\n invokeGridBtnClick(option: any, propertySchema: any) {\r\n this.gridButtonClick.emit({ option: option, propertySchema: propertySchema });\r\n }\r\n\r\n upsertAction(option: any, data: any) {\r\n let url = option?.data_url;\r\n if (url && url?.includes(\"{{\")) {\r\n const regex = /{{(.*?)}}/g;\r\n const matches = [...url.matchAll(regex)].map(m => m[1]);\r\n if (matches && data && data[matches[0]]) {\r\n option.data_url = url.replace(`{{${matches[0]}}}`, data[matches[0]])\r\n }\r\n }\r\n let baseUrl = this.environment?.apiUrl + option.data_url;\r\n this.requestService.dynamicCall(option.method, {}, baseUrl, option?.passToken, this.projectSeleted, this.userInfo).subscribe((res: any) => {\r\n console.log('res: ', res);\r\n if (option?.reload) {\r\n window.location.reload();\r\n } else if (option.notifcation) {\r\n if (option.notifcation.success) {\r\n this.notificationService.success(option.notifcation.success);\r\n let findObj: any = this.findDynamicKeyAndValue(option);\r\n if (findObj.keyName) {\r\n data[findObj.keyName] = \"APPROVED\";\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n setActionColumn(option: any, data: any) {\r\n let showAction: boolean = true;\r\n let findCondiontionalKey: any = this.findDynamicKeyAndValue(option);\r\n if (findCondiontionalKey.keyName) {\r\n showAction = data[findCondiontionalKey.keyName] === findCondiontionalKey.value ? true : false;\r\n }\r\n return showAction;\r\n }\r\n\r\n findDynamicKeyAndValue(object: Record<string, any>) {\r\n const regex = /^\\{\\{(.*?)\\}\\}$/;\r\n for (const key of Object.keys(object)) {\r\n const match = key.match(regex);\r\n if (match) {\r\n return {\r\n keyName: match[1].trim(),\r\n value: object[key]\r\n };\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n incrementQuantity(index: any, field: any, option: any) {\r\n this.gridIncreamentClick.emit({ index: index, field: field, option: option });\r\n }\r\n\r\n invokeTableImageClick(column: any, data: any) {\r\n this.gridImgClick.emit({ col: column, data: data });\r\n }\r\n\r\n decrementQuantity(index: any, field: any, option: any) {\r\n this.gridDecreamentClick.emit({ index: index, field: field, option: option });\r\n }\r\n\r\n invokeOnPageSizeChange(pageSize: any) {\r\n this.onPageSizeChange.emit(pageSize);\r\n }\r\n\r\n invokeGoToPage(page: any) {\r\n this.onPageChange.emit(page);\r\n }\r\n\r\n authenticating() {\r\n this.utilityService.getStorage(`${this.projectSeleted}Logined`).then((logined: any) => {\r\n if (logined == \"true\") {\r\n this.isLogined = true;\r\n }\r\n })\r\n }\r\n\r\n private readonly sortFunctionCache = new Map<\r\n string,\r\n (firstRow: any, secondRow: any) => number\r\n >();\r\n\r\n getColumnSortFn(\r\n column: any\r\n ): ((firstRow: any, secondRow: any) => number) | boolean {\r\n if (!column?.option?.sortable || !column?.scope?.reference) {\r\n return false;\r\n }\r\n\r\n const fieldName = this.getColumnFieldName(column);\r\n\r\n if (!fieldName) {\r\n return false;\r\n }\r\n\r\n const propertyDefinition = this.getColumnPropertyDefinition(column);\r\n const propertyType = propertyDefinition?.type ?? 'string';\r\n const propertyFormat = propertyDefinition?.format ?? '';\r\n const dateFormat = column?.option?.dateFormat ?? '';\r\n\r\n const cacheKey = [\r\n column.scope.reference,\r\n propertyType,\r\n propertyFormat,\r\n dateFormat\r\n ].join(':');\r\n\r\n const existingSortFunction = this.sortFunctionCache.get(cacheKey);\r\n\r\n if (existingSortFunction) {\r\n return existingSortFunction;\r\n }\r\n\r\n const sortFunction = (firstRow: any, secondRow: any): number => {\r\n const firstValue = firstRow?.[fieldName];\r\n const secondValue = secondRow?.[fieldName];\r\n\r\n return this.compareGridValues(\r\n firstValue,\r\n secondValue,\r\n propertyType,\r\n propertyFormat,\r\n dateFormat\r\n );\r\n };\r\n\r\n this.sortFunctionCache.set(cacheKey, sortFunction);\r\n\r\n return sortFunction;\r\n }\r\n\r\n private getColumnFieldName(column: any): string {\r\n return column?.scope?.reference?.split('/').pop() ?? '';\r\n }\r\n\r\n private getColumnPropertyDefinition(column: any): any {\r\n const reference = column?.scope?.reference;\r\n const fieldName = this.getColumnFieldName(column);\r\n const propertyScope = this.getScope(reference);\r\n\r\n return this.tableitemInfo?.propertySchema?.[propertyScope]?.[fieldName];\r\n }\r\n\r\n private compareGridValues(\r\n firstValue: any,\r\n secondValue: any,\r\n propertyType: string,\r\n propertyFormat: string,\r\n dateFormat: string\r\n ): number {\r\n if (firstValue == null && secondValue == null) {\r\n return 0;\r\n }\r\n\r\n if (firstValue == null) {\r\n return 1;\r\n }\r\n\r\n if (secondValue == null) {\r\n return -1;\r\n }\r\n\r\n if (propertyType === 'number' || propertyType === 'quantity') {\r\n const firstNumber = Number(firstValue);\r\n const secondNumber = Number(secondValue);\r\n\r\n if (!Number.isNaN(firstNumber) && !Number.isNaN(secondNumber)) {\r\n return firstNumber - secondNumber;\r\n }\r\n }\r\n\r\n const isDateColumn =\r\n Boolean(dateFormat) ||\r\n propertyFormat === 'date' ||\r\n propertyFormat === 'date-time';\r\n\r\n if (isDateColumn) {\r\n const firstDate = new Date(firstValue).getTime();\r\n const secondDate = new Date(secondValue).getTime();\r\n\r\n if (!Number.isNaN(firstDate) && !Number.isNaN(secondDate)) {\r\n return firstDate - secondDate;\r\n }\r\n }\r\n\r\n return String(firstValue).localeCompare(String(secondValue), undefined, {\r\n numeric: true,\r\n sensitivity: 'base'\r\n });\r\n }\r\n\r\n hasAnyColumnFilter(): boolean {\r\n const columns =\r\n this.tableitemInfo?.layoutSchema?.elements ?? [];\r\n console.log('columns: ', columns);\r\n let filter = columns.some(\r\n (column: any) =>\r\n column?.option?.filter?.filtering === true &&\r\n Boolean(column?.scope?.reference)\r\n );\r\n console.log('filter: ', filter);\r\n return filter;\r\n }\r\n\r\n getColumnFilterState(column: any): GridColumnFilterState {\r\n const columnKey = this.getColumnFilterKey(column);\r\n\r\n let filterState = this.columnFilterStates.get(columnKey);\r\n\r\n if (!filterState) {\r\n filterState = {\r\n operator:\r\n column?.option?.filter?.defaultOperator ??\r\n 'contains',\r\n value: ''\r\n };\r\n\r\n this.columnFilterStates.set(columnKey, filterState);\r\n }\r\n\r\n return filterState;\r\n }\r\n\r\n private getColumnFilterKey(column: any): string {\r\n return column?.scope?.reference ?? '';\r\n }\r\n\r\n getColumnFilterPlaceholder(column: any): string {\r\n return column?.option?.filter?.placeholder ?? '';\r\n }\r\n\r\n setColumnFilterOperator(\r\n column: any,\r\n operator: string\r\n ): void {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n filterState.operator = operator;\r\n\r\n if (this.hasActiveColumnFilter(column)) {\r\n this.applyColumnFilters();\r\n }\r\n }\r\n\r\n getFilterOperatorLabel(operatorValue: string): string {\r\n const operator = this.filterOperators.find(\r\n item => item.value === operatorValue\r\n );\r\n\r\n return operator?.label ?? 'Contains';\r\n }\r\n\r\n setColumnFilterValue(\r\n column: any,\r\n value: string\r\n ): void {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n filterState.value = value ?? '';\r\n\r\n this.applyColumnFilters();\r\n }\r\n\r\n hasActiveColumnFilter(column: any): boolean {\r\n const value =\r\n this.getColumnFilterState(column).value;\r\n\r\n return String(value ?? '').trim().length > 0;\r\n }\r\n\r\n applyColumnFilters(): void {\r\n const originalData = this.tableitemInfo?.data ?? [];\r\n const columns =\r\n this.tableitemInfo?.layoutSchema?.elements ?? [];\r\n\r\n const activeFilterColumns = columns.filter((column: any) => {\r\n if (\r\n column?.option?.filter?.filtering !== true ||\r\n !column?.scope?.reference\r\n ) {\r\n return false;\r\n }\r\n\r\n return this.hasActiveColumnFilter(column);\r\n });\r\n\r\n if (!activeFilterColumns.length) {\r\n this.filtersApplied = false;\r\n this.filteredTableData = [...originalData];\r\n return;\r\n }\r\n\r\n this.filtersApplied = true;\r\n\r\n this.filteredTableData = originalData.filter((row: any) => {\r\n return activeFilterColumns.every((column: any) => {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n const fieldName =\r\n this.getColumnFieldName(column);\r\n\r\n return this.matchesColumnFilter(\r\n row?.[fieldName],\r\n filterState.value,\r\n filterState.operator\r\n );\r\n });\r\n });\r\n }\r\n\r\n clearColumnFilter(column: any): void {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n filterState.value = '';\r\n filterState.operator =\r\n column?.option?.filter?.defaultOperator ??\r\n 'contains';\r\n\r\n this.applyColumnFilters();\r\n }\r\n\r\n private hasFilterValue(value: any): boolean {\r\n return (\r\n value !== null &&\r\n value !== undefined &&\r\n String(value).trim() !== ''\r\n );\r\n }\r\n\r\n private matchesColumnFilter(\r\n rowValue: any,\r\n filterValue: any,\r\n operator: string\r\n ): boolean {\r\n if (rowValue === null || rowValue === undefined) {\r\n return false;\r\n }\r\n\r\n const source = String(rowValue)\r\n .trim()\r\n .toLocaleLowerCase();\r\n\r\n const search = String(filterValue)\r\n .trim()\r\n .toLocaleLowerCase();\r\n\r\n switch (operator) {\r\n case 'equals':\r\n return source === search;\r\n\r\n case 'notEquals':\r\n return source !== search;\r\n\r\n case 'startsWith':\r\n return source.startsWith(search);\r\n\r\n case 'endsWith':\r\n return source.endsWith(search);\r\n\r\n case 'contains':\r\n default:\r\n return source.includes(search);\r\n }\r\n }\r\n\r\n isMediaColumn(col: any): boolean {\r\n const reference = col?.scope?.reference;\r\n if (typeof reference !== 'string') return false;\r\n \r\n const key = reference.split('/').pop();\r\n const type =\r\n this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[key!]?.type;\r\n \r\n // Preserve existing image properties.\r\n return type === 'media' || type === 'image';\r\n }\r\n \r\n getMediaSource(col: any, data: any): string {\r\n const key = col?.scope?.reference?.split('/').pop();\r\n const value = col?.option?.src || (key ? data?.[key] : '');\r\n \r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n \r\n getMediaLabel(col: any): string {\r\n if (typeof col?.label === 'string' && col.label.trim()) {\r\n return col.label;\r\n }\r\n \r\n const reference = col?.scope?.reference;\r\n const key = reference?.split('/').pop();\r\n const property = reference && key\r\n ? this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[key]\r\n : undefined;\r\n \r\n return col?.label?.caption || property?.caption || 'Media';\r\n }\r\n \r\n getMediaKind(\r\n col: any,\r\n data: any\r\n ): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(col, data);\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n \r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n \r\n const key = col?.scope?.reference?.split('/').pop();\r\n const candidates = [\r\n source,\r\n col?.option?.fileName,\r\n key ? data?.[key] : undefined\r\n ];\r\n \r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = [\r\n 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\r\n 'txt', 'csv', 'zip', 'rar', '7z'\r\n ];\r\n \r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string') continue;\r\n if (/^(data|blob):/i.test(candidate)) continue;\r\n \r\n let path = candidate.split(/[?#]/)[0];\r\n \r\n try {\r\n path = decodeURIComponent(path);\r\n } catch {\r\n // Keep the original path.\r\n }\r\n \r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n \r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n \r\n return 'image';\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\r\n their PrimeNG icon opened the calendar together with the system keyboard -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: grid cells render legacy checkbox fields through the boolean control. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\r\n reads option.filter and never option.columnFilter, which is the mistake a layout author\r\n makes without being told -->\r\n<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\"\r\n (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <!-- @contract decision: option.sortable is read here\r\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\r\n the key was decoration. The column also needs a scope.reference -\r\n without one getColumnSortFn has nothing to sort by.\r\n seen: grid.component.ts:338 -->\r\n <!-- Column headings and sorting -->\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements\"\r\n [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \">\r\n\r\n {{ column?.label?.caption }}\r\n </th>\r\n </tr>\r\n\r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements\"\r\n class=\"grid-filter-cell\">\r\n\r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: the column chain below, and what it does not carry\r\n reality: string, number, image, quantity, date, time, dropdown, boolean,\r\n autocomplete and dateRange each have their own condition. There is no\r\n branch for the credit card type.\r\n failure: a column whose type has no branch stays empty, with no error.\r\n instead: format the value in the endpoint and send a string.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'string'\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span *ngIf=\"col.option?.link\"\r\n (click)=\"showLinkDetails(col.option, data)\">\r\n {{data[col.scope?.reference.split('/').pop()]}}\r\n </span>\r\n <span *ngIf=\"!col.option?.link\">\r\n <ng-container\r\n *ngIf=\"col?.option?.dateFormat; else string\">\r\n {{\r\n data[col.scope?.reference.split('/').pop()]\r\n | date:'yyyy-MM-dd' }}\r\n </ng-container>\r\n <ng-template #string>\r\n {{\r\n data[col.scope?.reference.split('/').pop()]\r\n }}\r\n </ng-template>\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input\r\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'number'\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span\r\n *ngIf=\"col.option?.innerAction?.action == 'multiply'\">\r\n {{\r\n (data[col.option?.innerAction?.from] *\r\n data[col.option?.innerAction?.to])\r\n | number:'1.2-2'\r\n }}\r\n </span>\r\n <span *ngIf=\"!col.option?.innerAction\">\r\n {{data[col.scope?.reference.split('/').pop()] |\r\n currency:\r\n tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.currency\r\n :true }}\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input\r\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n type=\"number\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <!-- Media control: also supports existing image properties -->\r\n <ng-container *ngIf=\"isMediaColumn(col)\">\r\n <ng-container\r\n *ngIf=\"getMediaSource(col, data) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(col, data)\">\r\n\r\n <img\r\n *ngSwitchDefault\r\n [src]=\"source\"\r\n [alt]=\"getMediaLabel(col)\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n loading=\"lazy\"\r\n (click)=\"invokeTableImageClick(col, data)\" />\r\n\r\n <video\r\n *ngSwitchCase=\"'video'\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(col)\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n controls\r\n playsinline\r\n preload=\"metadata\">\r\n Your browser does not support video\r\n playback.\r\n </video>\r\n\r\n <audio\r\n *ngSwitchCase=\"'audio'\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(col)\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n controls\r\n preload=\"metadata\">\r\n Your browser does not support audio\r\n playback.\r\n </audio>\r\n\r\n <a\r\n *ngSwitchCase=\"'pdf'\"\r\n [href]=\"source\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(col) }}\r\n </a>\r\n\r\n <a\r\n *ngSwitchCase=\"'file'\"\r\n [href]=\"source\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(col) }}\r\n </a>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- @contract compatibility: existing checkbox fields render as boolean. -->\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && (tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'boolean' || isLegacyCheckboxFieldType(tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type))\">\r\n <input type=\"checkbox\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n [name]=\"col.scope?.reference\" />\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'dateRange'\">\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(col?.style).style\"\r\n [(ngModel)]=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)][col.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'date'\">\r\n <div class=\"picker-field\">\r\n <p-datepicker #datePicker #dateField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\"\r\n [disabled]=\"col?.option?.disabled\"\r\n [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\r\n [dateFormat]=\"\r\n tableitemInfo.propertySchema[\r\n getScope(col.scope?.reference)\r\n ][\r\n col.scope?.reference.split('/').pop()\r\n ]?.format || 'yy-mm-dd'\r\n \" [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(col.scope?.reference)\r\n ][\r\n col.scope?.reference.split('/').pop()\r\n ].value\r\n \" [class]=\"col?.scope?.style?.classes?.[0] || ''\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [panelStyleClass]=\"picker.datePanelClass\"\r\n [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"col?.option?.keyboardType ?? 'date'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, datePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(datePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\"\r\n aria-label=\"Open calendar\"\r\n (pointerdown)=\"picker.openFromIcon($event, datePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'time'\">\r\n <div class=\"picker-field\">\r\n <p-datepicker #timePicker #timeField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\" [timeOnly]=\"true\"\r\n hourFormat=\"24\"\r\n [disabled]=\"col?.option?.disabled\"\r\n [autoZIndex]=\"true\"\r\n [baseZIndex]=\"10000\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(col.scope?.reference)\r\n ][\r\n col.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [class]=\"col?.scope?.style?.classes?.[0] || ''\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [panelStyleClass]=\"picker.timePanelClass\"\r\n [vlCustomKeyboard]=\"col?.option?.keyboardType ?? 'time'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, timePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(timePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\"\r\n aria-label=\"Open time picker\"\r\n (pointerdown)=\"picker.openFromIcon($event, timePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-clock\"></i>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'autocomplete'\">\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[col.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, col)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"form.propertySchema[getScope(col.scope?.reference)][col.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [class]=\"col?.scope?.style?.classes ? col?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"col.option.autocomplete.response.label\"\r\n [placeholder]=\"form.propertySchema | vlPlaceholder: col.scope?.reference\"\r\n [vlCustomKeyboard]=\"col?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'dropdown'\">\r\n <select id=\"dynamic-dropdown\" #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(col?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style)?.style\"\r\n [name]=\"col.scope?.reference\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(col.scope?.reference)][\r\n col.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of form.propertySchema[getScope(col.scope?.reference)]?.[\r\n col.scope?.reference.split('/').pop()\r\n ]?.data\r\n \" [value]=\"item[col?.option?.optionValue]\">\r\n {{ item[col?.option?.optionLabel] }}\r\n </option>\r\n </select>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!col?.scope?.reference\">\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes[0]\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes[0]\"\r\n (click)=\"upsertAction(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"col?.label?.style?.classes[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n </ng-container>\r\n\r\n <!-- For quantity column, display increment/decrement buttons -->\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'quantity'\">\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields\">\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"text\" #inputField=\"ngModel\"\r\n [required]=\"tableField.option.required\"\r\n [email]=\"tableField.option.email\"\r\n [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"tableitemInfo.propertySchema | vlPlaceholder: tableField.scope?.reference\" />\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(tableField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"inputField?.errors?.['required']\">{{tableField.label?.value\r\n ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"inputField?.errors?.['email']\">{{(tableField.label?.value\r\n ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:tableField.option.currency :true:\r\n tableField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\"\r\n [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema | vlPlaceholder: tableField.scope?.reference\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// Shuaib 2026-09-24\r\n// - change: pass the selected project's Okta issuer to getLoginUser.\r\n// - new: check the mobile login state for jwtToken and keycloak projects.\r\nimport { AfterViewInit, Component, EventEmitter, Input, Output, SimpleChanges } from '@angular/core';\r\nimport { OktaAuthStateService } from '@okta/okta-angular';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { RequestService } from '../../services/request.service';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { Couchdb } from '../../services/couchdb';\r\nimport { isNativeMobile } from '../../services/native-platform';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n NzIconModule\r\n ],\r\n selector: 'vl-header-menu',\r\n templateUrl: './header-menu.component.html',\r\n styleUrl: './header-menu.component.css'\r\n})\r\nexport class HeaderMenuComponent implements AfterViewInit {\r\n isLogined: boolean = false;\r\n propertyschema: any = {};\r\n @Input() headerItems: any[] = [];\r\n @Input() headerLayout: any = {};\r\n @Input() environment: any;\r\n @Input() tenantName: any;\r\n @Input() projectSeleted: any;\r\n @Input() cartInfo: any = {\r\n items: [],\r\n totalPrice: 0,\r\n quantity: 0\r\n };\r\n\r\n @Output() buttonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() showTableContent: EventEmitter<any> = new EventEmitter();\r\n @Output() searchItems: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(\r\n private oktaAuthService: OktaAuthStateService,\r\n private requestService: RequestService,\r\n private utilityService: UtilityService,\r\n private couchdbService: Couchdb,\r\n private platform: Platform\r\n ) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['headerItems'] && this.headerItems) {\r\n this.setHeaderItems(this.headerItems).then((updatedHeaderItems: any) => {\r\n this.headerItems = updatedHeaderItems;\r\n console.log('this.headerItems : ', this.headerItems);\r\n });\r\n }\r\n\r\n if (changes['environment'] && this.environment && this.environment?.login && this.environment?.login?.type == \"oktaAuth\") {\r\n if (isNativeMobile()) {\r\n this.utilityService.getLocalStorage(`loginedUser`).then((logined: any) => {\r\n if (logined && logined.token) {\r\n this.requestService.getLoginUser(\r\n logined.token,\r\n this.environment.login.mobile?.issuer || this.environment.login.web?.issuer\r\n ).subscribe(() => {\r\n this.isLogined = true;\r\n });\r\n }\r\n });\r\n }\r\n\r\n this.oktaAuthService.authState$.subscribe((result) => {\r\n if (result.isAuthenticated) {\r\n this.isLogined = true;\r\n }\r\n });\r\n }\r\n if (changes['environment'] && this.environment && this.environment?.login && this.environment?.login?.type == \"jwtToken\") {\r\n if (isNativeMobile()) {\r\n this.utilityService.getLocalStorage(`loginedUser`).then((logined: any) => {\r\n if (logined && logined.name) {\r\n this.isLogined = true;\r\n }\r\n });\r\n }\r\n }\r\n if (changes['environment'] && this.environment && this.environment?.login && this.environment?.login?.type == \"keycloak\") {\r\n if (isNativeMobile()) {\r\n this.utilityService.getLocalStorage(`loginedUser`).then((logined: any) => {\r\n this.isLogined = !!(logined?.token && logined?.name);\r\n });\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n }\r\n\r\n getStyle(styleObject: any): Record<string, any> {\r\n if (!styleObject || typeof styleObject !== 'object') {\r\n return {};\r\n }\r\n\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return styleWithoutClasses;\r\n }\r\n\r\n isVisible(header: any): boolean {\r\n return header?.option?.visible !== false;\r\n }\r\n\r\n shouldShowDefaultButton(header: any): boolean {\r\n if (!this.isVisible(header)) {\r\n return false;\r\n }\r\n\r\n if (header?.option?.islogin === true) {\r\n return this.isLogined;\r\n }\r\n\r\n if (header?.option?.islogin === false) {\r\n return !this.isLogined;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n invokeSearchedItems(option: any, search: any) {\r\n this.searchItems.emit({ option: option, search: search });\r\n }\r\n\r\n invokeHeaderButtonClick(option: any) {\r\n this.buttonClick.emit(option);\r\n }\r\n\r\n invokeShowtableContent(option: any) {\r\n this.showTableContent.emit(option);\r\n }\r\n\r\n async setHeaderItems(items: any[]): Promise<any[]> {\r\n let getfile = false;\r\n for (const item of items) {\r\n if (item?.scope?.reference) {\r\n let objectFile = item?.scope?.reference.split('/')[1];\r\n if (objectFile && !getfile && this.projectSeleted) {\r\n let projectName = `${this.tenantName}_${this.projectSeleted}`\r\n getfile = true;\r\n this.propertyschema = await this.couchdbService.getFileContentFromCouchDb(\r\n projectName,\r\n `objects/${objectFile}.json`\r\n );\r\n\r\n }\r\n }\r\n if (item?.scope?.reference?.includes('logo')) {\r\n const logoUrl = item?.option?.src;\r\n if (logoUrl && this.projectSeleted) {\r\n let projectName = `${this.tenantName}_${this.projectSeleted}`\r\n const image = await this.couchdbService.getImageSrcFromCouchDb(\r\n projectName,\r\n `${logoUrl}`\r\n );\r\n item.option.src = this.utilityService.getMediaSrc(image);\r\n }\r\n }\r\n }\r\n return items;\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment stating that this container resolves by field NAME, not by field\r\n type. A correctly typed field with another name renders nothing, silently -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\">\r\n\r\n <!-- @contract decision: resolves by field NAME, not by field type\r\n reality: the switch reads the LAST segment of scope.reference. Only logo, cart and\r\n searchInput render; any other name produces an empty element.\r\n failure: a correctly typed field with a different name renders nothing, silently.\r\n instead: name the field logo, cart or searchInput, or put it in another container -->\r\n <ng-container *ngFor=\"let header of headerItems\"\r\n [ngSwitch]=\"header.scope?.reference ? header.scope?.reference.split('/').pop() : 'default'\">\r\n\r\n <!-- Logo -->\r\n <ng-container *ngSwitchCase=\"'logo'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <img [src]=\"header.option.src\" [alt]=\"header.alt || 'Logo'\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" />\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Search -->\r\n <ng-container *ngSwitchCase=\"'searchInput'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <input #search type=\"text\" [placeholder]=\"header.option.placeholder ?? ''\"\r\n (keyup.enter)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" />\r\n\r\n <button *ngIf=\"header.option.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\" [ngStyle]=\"getStyle(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!header.caption; else searchTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #searchTextContent>\r\n {{ header.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Cart -->\r\n <ng-container *ngSwitchCase=\"'cart'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Default Button -->\r\n <ng-container *ngSwitchCase=\"'default'\">\r\n @if (header.option && header.option?.action && (header.option?.action == \"cart\")) {\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n }@else {\r\n <div *ngIf=\"shouldShowDefaultButton(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick(header.option)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!header.label; else buttonTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #buttonTextContent>\r\n {{ header.label }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n </ng-container>\r\n</header>","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NetworkLogService {\r\n\r\n private logs: any[] = [];\r\n\r\n addLog(log: any) {\r\n this.logs.unshift(log); // latest first\r\n localStorage.setItem('networkLogs', JSON.stringify(this.logs));\r\n }\r\n\r\n getLogsByDate(date: string): any[] {\r\n return this.logs.filter(l => l.date === date);\r\n }\r\n\r\n getAll(): any[] {\r\n return [...this.logs];\r\n }\r\n\r\n clear() {\r\n this.logs = [];\r\n localStorage.removeItem('networkLogs');\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { NetworkLogService } from '../../services/network-log.service';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [\r\n CommonModule\r\n ],\r\n selector: 'vl-logs',\r\n templateUrl: './logs.component.html',\r\n styleUrl: './logs.component.css'\r\n})\r\nexport class LogsComponent {\r\n logs: any[] = [];\r\n expandedRow: number | null = null;\r\n\r\n constructor(private logService: NetworkLogService) {}\r\n\r\n ngOnInit() {\r\n const today = new Date().toISOString().split('T')[0];\r\n this.logs = this.logService.getLogsByDate(today);\r\n console.log('this.logs: ', this.logs);\r\n }\r\n\r\n toggleRow(index: number) {\r\n this.expandedRow = this.expandedRow === index ? null : index;\r\n }\r\n}\r\n","<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>","/** Shared option resolution. Reading a field never writes defaults into its layout. */\nexport type BasicType = 'string' | 'number' | 'integer' | 'bigdecimal' | 'boolean' | 'date' | 'time' | 'datetime' | 'media';\nexport const CONTROL_MAP: Record<BasicType, readonly string[]> = {\n string: ['textInput', 'textArea', 'password', 'combobox', 'autocomplete', 'checkbox', 'switch', 'radiobutton', 'dropdown', 'email'],\n number: ['textInput', 'spinner', 'slider'], integer: ['textInput', 'spinner', 'slider'],\n bigdecimal: ['textInput', 'spinner'], boolean: ['checkbox', 'switch', 'radiobutton'],\n date: ['date'], time: ['time'], datetime: ['datetime'], media: ['media']\n};\nexport function basicType(property: any): string {\n const value = `${property?.type || 'string'}`.toLowerCase();\n return ({ image: 'media', checkbox: 'boolean', datetime: 'datetime', 'date-time': 'datetime', 'date&time': 'datetime', decimal: 'bigdecimal' } as any)[value] || value;\n}\nexport function controlFor(property: any, option: any): string {\n const type = basicType(property);\n if (['date', 'time', 'datetime', 'media'].includes(type)) return type;\n const explicit = option?.control;\n const control = ({ textfield: 'textInput', textarea: 'textArea', radioButton: 'radiobutton' } as any)[explicit] || explicit;\n return control || (type === 'boolean' ? 'checkbox' : 'textInput');\n}\nexport function supported(property: any, option: any): boolean {\n const choices = (CONTROL_MAP as any)[basicType(property)];\n return !!choices?.includes(controlFor(property, option));\n}\nexport function rulesFor(property: any, option: any): any {\n const result = { ...(option?.fieldData?.validation || {}), ...(option?.validation || {}), ...(property?.validation || {}) };\n for (const key of ['minLength', 'maxLength', 'pattern', 'minimum', 'maximum', 'multipleOf', 'enum']) {\n if (property?.[key] !== undefined) result[key] = property[key];\n }\n if (result.minLength === undefined) result.minLength = property?.minlength;\n if (result.maxLength === undefined) result.maxLength = property?.maxlength;\n if (result.minimum === undefined) result.minimum = property?.min;\n if (result.maximum === undefined) result.maximum = property?.max;\n return result;\n}\nexport function keyboardFor(property: any, option: any): string | null {\n if (['native', 'none'].includes(option?.keyboardType)) return null;\n if (['email', 'numeric', 'alpha', 'string', 'date', 'time'].includes(option?.keyboardType)) return option.keyboardType;\n // Layout-selected keyboard wins. Omitted/unknown keyboards use the project's string default.\n return 'string';\n}\nexport function classes(style: any): string {\n return Array.isArray(style?.classes) ? style.classes.filter(Boolean).join(' ') : style?.classes || '';\n}\nexport function styles(style: any): any {\n const { classes: ignored, ...rest } = style || {};\n return rest;\n}\nexport function flagValues(property: any, option: any): { on: any; off: any } {\n if (basicType(property) === 'boolean') {\n const on = option?.checkedBooleanValue !== false;\n return { on, off: !on };\n }\n const values = rulesFor(property, option).enum;\n return { on: option?.checkedValue ?? values?.[0] ?? '1', off: option?.uncheckedValue ?? values?.[1] ?? '0' };\n}\nexport function choicesFor(property: any, option: any, data?: any[]): { value: any; label: string; original: any }[] {\n const rules = rulesFor(property, option);\n const source = Array.isArray(data) ? data : option?.values ?? rules.enum ?? property?.data ?? [];\n if (!Array.isArray(source)) return [];\n const valueKey = option?.optionValue || option?.optionvalue || option?.autocomplete?.response?.value;\n const labelKey = option?.optionLabel || option?.optionlabel || option?.autocomplete?.response?.label;\n return source.map((entry: any, index: number) => {\n const object = entry !== null && typeof entry === 'object';\n const value = object && valueKey ? entry[valueKey] : entry;\n const override = Array.isArray(option?.labels) ? option.labels[index] : option?.labels?.[value];\n const label = override ?? (object && labelKey ? entry[labelKey] : object ? entry.label ?? entry.caption ?? entry.value ?? '' : entry);\n return { value, label: `${label ?? ''}`, original: entry };\n });\n}\n/** Decimal arithmetic uses integer coefficients; no conversion through Number. */\nexport function decimalParts(value: any): { coefficient: bigint; scale: number } | null {\n if (typeof value !== 'string' && typeof value !== 'number') return null;\n const match = /^([+-]?)(\\d*)(?:\\.(\\d*))?(?:e([+-]?\\d+))?$/i.exec(`${value}`.trim());\n if (!match || !(match[2] || match[3])) return null;\n const exponent = Number(match[4] || 0);\n if (!Number.isInteger(exponent) || Math.abs(exponent) > 10000) return null;\n let scale = (match[3]?.length || 0) - exponent;\n let coefficient = BigInt((match[1] === '-' ? '-' : '') + ((match[2] || '') + (match[3] || '') || '0'));\n if (scale < 0) { coefficient *= 10n ** BigInt(-scale); scale = 0; }\n return { coefficient, scale };\n}\nexport function decimalString(coefficient: bigint, scale: number): string {\n const negative = coefficient < 0n, digits = (negative ? -coefficient : coefficient).toString().padStart(scale + 1, '0');\n const number = scale ? digits.slice(0, -scale) + '.' + digits.slice(-scale) : digits;\n return (negative ? '-' : '') + number;\n}\nexport function decimalCompare(a: any, b: any): number | null {\n const left = decimalParts(a), right = decimalParts(b); if (!left || !right) return null;\n const scale = Math.max(left.scale, right.scale);\n const diff = left.coefficient * 10n ** BigInt(scale - left.scale) - right.coefficient * 10n ** BigInt(scale - right.scale);\n return diff < 0n ? -1 : diff > 0n ? 1 : 0;\n}\nexport function decimalStep(value: any, step: any, direction: number): string | null {\n const a = decimalParts(value === '' || value == null ? '0' : value), b = decimalParts(step ?? '1');\n if (!a || !b || b.coefficient <= 0n) return null;\n const scale = Math.max(a.scale, b.scale);\n return decimalString(a.coefficient * 10n ** BigInt(scale - a.scale) + BigInt(direction) * b.coefficient * 10n ** BigInt(scale - b.scale), scale);\n}\nexport function validateValue(value: any, property: any, option: any): any {\n if (!supported(property, option)) return { unsupportedControl: true };\n const type = basicType(property), control = controlFor(property, option), rules = rulesFor(property, option);\n const empty = value === null || value === undefined || value === '';\n const required = option?.required ?? property?.required ?? false;\n if (required && (empty || (['checkbox', 'switch'].includes(control) && value !== flagValues(property, option).on))) return { required: true };\n if (empty) return null;\n const errors: any = {};\n if (type === 'boolean' && typeof value !== 'boolean') errors.boolean = true;\n if (['number', 'integer', 'bigdecimal'].includes(type)) {\n const parts = decimalParts(value);\n if (!parts || (type !== 'bigdecimal' && !Number.isFinite(Number(value)))) errors.number = true;\n else {\n if (type === 'integer' && (parts.coefficient % 10n ** BigInt(parts.scale) !== 0n || !Number.isSafeInteger(Number(value)))) errors.integer = true;\n if (rules.minimum !== undefined && decimalCompare(value, rules.minimum) === -1) errors.minimum = { min: rules.minimum };\n if (rules.maximum !== undefined && decimalCompare(value, rules.maximum) === 1) errors.maximum = { max: rules.maximum };\n if (rules.multipleOf !== undefined) {\n const multiple = decimalParts(rules.multipleOf);\n if (multiple && multiple.coefficient > 0n) {\n const scale = Math.max(parts.scale, multiple.scale);\n if ((parts.coefficient * 10n ** BigInt(scale - parts.scale)) % (multiple.coefficient * 10n ** BigInt(scale - multiple.scale)) !== 0n) errors.multipleOf = true;\n } else errors.configuration = 'multipleOf must be positive';\n }\n if (option?.decimals !== undefined && parts.scale > Number(option.decimals)) errors.decimals = true;\n }\n }\n if (type === 'string' && typeof value === 'string') {\n if (rules.minLength !== undefined && value.length < rules.minLength) errors.minlength = { requiredLength: rules.minLength, actualLength: value.length };\n if (rules.maxLength !== undefined && value.length > rules.maxLength) errors.maxlength = { requiredLength: rules.maxLength, actualLength: value.length };\n if (rules.pattern) {\n try { if (!new RegExp(`^(?:${rules.pattern})$`).test(value)) errors.pattern = true; } catch { errors.configuration = 'Invalid validation pattern'; }\n }\n if ((control === 'email' || option?.email || property?.format === 'email') && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) errors.email = true;\n }\n if (rules.enum && !(control === 'combobox' && option?.allowCustom === true) && !rules.enum.some((v: any) => Object.is(v, value))) errors.enum = true;\n if (['date', 'time', 'datetime'].includes(type)) {\n const date = value instanceof Date ? value : new Date(type === 'time' && /^\\d\\d:\\d\\d/.test(`${value}`) ? `2000-01-01T${value}` : value);\n if (Number.isNaN(date.getTime())) errors.date = true;\n for (const [key, compare] of [['minDate', -1], ['maxDate', 1]] as const) {\n if (option?.[key]) {\n const boundary = new Date(option[key]);\n if ((compare === -1 && date < boundary) || (compare === 1 && date > boundary)) errors[key] = true;\n }\n }\n }\n return Object.keys(errors).length ? errors : null;\n}\n","import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { classes, styles } from '../components/field-renderer/field-policy';\n@Directive()\nexport abstract class ControlBase {\n @Input() value:any;\n @Input() option:any = {};\n @Input() property:any = {};\n @Input() control = '';\n @Input() inputId = '';\n @Input() inputStyle:any = {};\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() keyboard:string|null = null;\n @Output() changed = new EventEmitter<any>();\n @Output() blurred = new EventEmitter<void>();\n @Output() itemSelected = new EventEmitter<any>();\n readonly classes = classes;\n readonly styles = styles;\n get placeholder():string { return this.option.placeholder ?? this.property.placeholder ?? ''; }\n get inputMode():string { return this.keyboard === 'numeric' ? 'decimal' : this.keyboard === 'email' ? 'email' : 'text'; }\n}\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { CustomKeyboardDirective } from '../components/custom-keyboard/custom-keyboard.directive';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\nimport { ControlBase } from './control-base';\n@Component({ selector:'vl-text-control', standalone:true, imports:[CommonModule,FormsModule,CustomKeyboardDirective,InputTextModule,TextareaModule],\n template:`\n <textarea pTextarea *ngIf=\"control === 'textArea'; else single\" [id]=\"inputId\" [ngModel]=\"value\"\n (ngModelChange)=\"changed.emit($event)\" [ngModelOptions]=\"{standalone:true}\" (blur)=\"blurred.emit()\"\n [disabled]=\"disabled\" [readOnly]=\"readonly\" [placeholder]=\"placeholder\" [rows]=\"option.rows ?? 3\"\n [attr.inputmode]=\"inputMode\" [attr.autocomplete]=\"option.autocompleteHint || 'off'\"\n [vlCustomKeyboard]=\"keyboard\" [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\"></textarea>\n <ng-template #single><div class=\"text-wrap\" [class.text-wrap--password]=\"control === 'password' && option.showPasswordToggle !== false\">\n <input pInputText [id]=\"inputId\" [type]=\"control === 'password' && !reveal ? 'password' : control === 'email' ? 'email' : 'text'\"\n [ngModel]=\"value\" (ngModelChange)=\"changed.emit($event)\" [ngModelOptions]=\"{standalone:true}\" (blur)=\"blurred.emit()\"\n [disabled]=\"disabled\" [readOnly]=\"readonly\" [placeholder]=\"placeholder\" [attr.inputmode]=\"inputMode\"\n [attr.autocomplete]=\"option.autocompleteHint || (control === 'password' ? 'current-password' : 'off')\"\n [vlCustomKeyboard]=\"keyboard\" [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\" />\n <button *ngIf=\"control === 'password' && option.showPasswordToggle !== false\" type=\"button\"\n [disabled]=\"disabled\" (click)=\"reveal=!reveal\" [attr.aria-label]=\"reveal?'Hide password':'Show password'\"\n [attr.aria-pressed]=\"reveal\">{{reveal?'Hide':'Show'}}</button>\n </div></ng-template>`,\n styles:[`:host{display:block;min-width:0}.text-wrap{display:contents}.text-wrap--password{display:flex;align-items:center;gap:6px}.text-wrap--password input{min-width:0;flex:1}button{font:inherit;cursor:pointer}`]\n})\nexport class TextControlComponent extends ControlBase { reveal=false; }\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ControlBase } from './control-base';\nimport { basicType, decimalCompare, decimalParts, decimalStep, rulesFor } from '../components/field-renderer/field-policy';\nimport { CustomKeyboardDirective } from '../components/custom-keyboard/custom-keyboard.directive';\n@Component({selector:'vl-numeric-control',standalone:true,imports:[CommonModule,CustomKeyboardDirective,InputTextModule],template:`\n <div class=\"numeric-wrap\" [class.numeric-wrap--group]=\"control === 'spinner' || (control === 'slider' && option.showValue) || option.unitLabel || option.unit\">\n <button *ngIf=\"control==='spinner'\" type=\"button\" aria-label=\"Decrease value\" [disabled]=\"disabled||readonly\" (click)=\"step(-1)\">−</button>\n <input pInputText [id]=\"inputId\" [type]=\"control==='slider'?'range':'text'\" [value]=\"displayValue\" [disabled]=\"disabled || (readonly && control==='slider')\"\n [readOnly]=\"readonly\" [attr.inputmode]=\"keyboard==='numeric'?'decimal':inputMode\" [placeholder]=\"placeholder\"\n [attr.min]=\"rules.minimum ?? (control==='slider'?0:null)\" [attr.max]=\"rules.maximum ?? (control==='slider'?100:null)\"\n [attr.step]=\"option.step ?? (integer?1:'any')\" [vlCustomKeyboard]=\"control==='slider'?null:keyboard\"\n (input)=\"edit($any($event.target).value)\" (focus)=\"focusInput()\" (blur)=\"focused=false; editingValue=null; blurred.emit()\"\n [attr.aria-readonly]=\"readonly\" [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\" />\n <button *ngIf=\"control==='spinner'\" type=\"button\" aria-label=\"Increase value\" [disabled]=\"disabled||readonly\" (click)=\"step(1)\">+</button>\n <span *ngIf=\"control==='slider'&&option.showValue\">{{value}}</span>\n <span *ngIf=\"option.unitLabel || option.unit\">{{option.unitLabel || option.unit}}</span>\n </div>`,styles:[`:host{display:block;min-width:0}.numeric-wrap{display:contents}.numeric-wrap--group{display:flex;align-items:center;gap:6px}.numeric-wrap--group input{min-width:0;flex:1}button{font:inherit;padding:7px 12px;cursor:pointer}`]})\nexport class NumericControlComponent extends ControlBase {\n focused=false;\n editingValue:string|null=null;\n focusInput():void {this.editingValue=this.value==null?'':`${this.value}`;this.focused=true;}\n get integer():boolean{return basicType(this.property)==='integer';}\n get exact():boolean{return basicType(this.property)==='bigdecimal';}\n get rules():any{return rulesFor(this.property,this.option);}\n get displayValue():any {\n if(this.focused)return this.editingValue??this.value??'';\n if(this.control==='slider'||this.value==null||this.value==='')return this.value??'';\n if(!this.option.numberStyle && this.option.grouping===undefined)return this.value;\n if(!this.exact && typeof this.value==='number') {\n try{return new Intl.NumberFormat(this.option.locale,{\n useGrouping:this.option.grouping??true,\n maximumFractionDigits:this.option.decimals??20,\n ...(this.option.numberStyle==='currency'&&this.option.currency?{style:'currency',currency:this.option.currency}:{})\n }).format(this.value);}catch{return this.value;}\n }\n // BigDecimal is never converted to a JS number for display.\n const parts=`${this.value}`.split('.');\n return (this.option.grouping?parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g,','):parts[0])+(parts.length>1?'.'+parts[1]:'');\n }\n edit(raw:string):void {\n if(this.readonly||this.disabled)return;\n this.editingValue=raw;\n if(raw===''){this.changed.emit(null);return;}\n this.changed.emit(this.exact||!decimalParts(raw)||(this.integer&&!Number.isSafeInteger(Number(raw)))?raw:Number(raw));\n }\n step(direction:number):void {\n if(this.readonly||this.disabled)return;\n let next=decimalStep(this.value,this.option.step??'1',direction);if(next===null)return;\n if(this.rules.minimum!==undefined&&decimalCompare(next,this.rules.minimum)===-1)next=`${this.rules.minimum}`;\n if(this.rules.maximum!==undefined&&decimalCompare(next,this.rules.maximum)===1)next=`${this.rules.maximum}`;\n this.changed.emit(this.exact?next:Number(next));this.blurred.emit();\n }\n}\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ControlBase } from './control-base';\nimport { flagValues } from '../components/field-renderer/field-policy';\n@Component({selector:'vl-toggle-control',standalone:true,imports:[CommonModule],template:`\n <span class=\"toggle-wrap\"><input [id]=\"inputId\" type=\"checkbox\" [class.toggle]=\"control==='switch'\"\n [attr.role]=\"control==='switch'?'switch':null\" [checked]=\"checked\" [disabled]=\"disabled||readonly\"\n (change)=\"toggle($any($event.target).checked)\" (blur)=\"blurred.emit()\" [ngStyle]=\"styles(inputStyle)\" />\n <span *ngIf=\"control==='switch'\">{{checked?option.labelOn:option.labelOff}}</span></span>`,\n styles:[`.toggle-wrap{display:inline-flex;gap:8px;align-items:center}.toggle{appearance:none;position:relative;width:36px;height:22px;border-radius:16px;background:#94a3b8;cursor:pointer}.toggle:before{content:'';position:absolute;width:16px;height:16px;top:3px;left:3px;border-radius:50%;background:white}.toggle:checked{background:#2563eb}.toggle:checked:before{transform:translateX(14px)}input:focus-visible{outline:2px solid #2563eb;outline-offset:3px}input:disabled{opacity:.55;cursor:default}`]})\nexport class ToggleControlComponent extends ControlBase {\n get checked():boolean{return Object.is(this.value,flagValues(this.property,this.option).on);}\n toggle(checked:boolean):void {if(!this.disabled&&!this.readonly)this.changed.emit(checked?flagValues(this.property,this.option).on:flagValues(this.property,this.option).off);}\n}\n","import { Component, Input, OnChanges } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { CustomKeyboardDirective } from '../components/custom-keyboard/custom-keyboard.directive';\nimport { ControlBase } from './control-base';\nimport { basicType, choicesFor } from '../components/field-renderer/field-policy';\n@Component({selector:'vl-selection-control',standalone:true,imports:[CommonModule,FormsModule,AutoCompleteModule,CustomKeyboardDirective],template:`\n <select *ngIf=\"control==='dropdown'\" [id]=\"inputId\" [ngModel]=\"value\" (ngModelChange)=\"chooseValue($event)\"\n [ngModelOptions]=\"{standalone:true}\" [disabled]=\"disabled||readonly\" (blur)=\"blurred.emit()\"\n [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\">\n <option [ngValue]=\"null\" [disabled]=\"option.required\">{{placeholder || 'Select a value'}}</option>\n <option *ngFor=\"let item of choices\" [ngValue]=\"item.value\">{{item.label}}</option>\n </select>\n <div *ngIf=\"control==='radiobutton'\" class=\"radio-list\" role=\"radiogroup\" [attr.aria-label]=\"option.ariaLabel || 'Options'\"\n [style.flex-direction]=\"option.orientation==='horizontal'?'row':'column'\">\n <label *ngFor=\"let item of choices;let index=index\"><input type=\"radio\" [name]=\"inputId\" [id]=\"inputId+'-'+index\"\n [checked]=\"equal(value,item.value)\" [disabled]=\"disabled||readonly\" (change)=\"select(item)\" (blur)=\"blurred.emit()\" />{{item.label}}</label>\n </div>\n <p-autocomplete *ngIf=\"control==='combobox'||control==='autocomplete'\" [inputId]=\"inputId\" styleClass=\"custom-autocomplete\" [class]=\"classes(inputStyle)\" [ngModel]=\"display\"\n (ngModelChange)=\"typed($event)\" [ngModelOptions]=\"{standalone:true}\" [suggestions]=\"suggestions\" optionLabel=\"label\"\n (completeMethod)=\"complete($event)\" (onSelect)=\"select($event.value)\" (onBlur)=\"blurred.emit()\"\n [dropdown]=\"option.showDropdown !== false\" [forceSelection]=\"option.forceSelection ?? (control==='combobox'&&option.allowCustom!==true)\"\n [minLength]=\"option.minChars ?? 1\" [delay]=\"option.delay ?? 300\"\n [showClear]=\"option.showClear ?? false\" [completeOnFocus]=\"option.completeOnFocus ?? false\"\n [dropdownMode]=\"option.dropdownMode || 'blank'\" [placeholder]=\"placeholder\" [disabled]=\"disabled||readonly\"\n [vlCustomKeyboard]=\"keyboard\" appendTo=\"body\" [ngStyle]=\"styles(inputStyle)\"></p-autocomplete>`,\n styles:[`:host{display:block;min-width:0}.radio-list{display:flex;gap:10px}.radio-list label{display:flex;gap:6px;align-items:center}`]})\nexport class SelectionControlComponent extends ControlBase implements OnChanges {\n @Input() items:any[]|undefined;\n suggestions:any[]=[];\n readonly equal=Object.is;\n choices:any[]=[];\n get display():any{return this.choices.find(item=>Object.is(item.value,this.value))??this.value??'';}\n ngOnChanges():void {\n const next=basicType(this.property)==='boolean'&&this.items===undefined&&!this.option.values\n ? choicesFor(this.property,{...this.option,values:[true,false],labels:this.option.labels??['Yes','No']})\n : choicesFor(this.property,this.option,this.items);\n // Keep PrimeNG's selected object stable across value/option change detection.\n // Each component owns its suggestions; typing in one cannot replace another's list.\n if(next.length!==this.choices.length || next.some((item,index)=>\n !Object.is(item.value,this.choices[index]?.value) || item.label!==this.choices[index]?.label || item.original!==this.choices[index]?.original)) {\n this.choices=next;\n this.suggestions=next;\n }\n }\n complete(event:any):void {const query=`${event.query??''}`.toLowerCase();this.suggestions=this.choices.filter(item=>this.option.filterMode==='contains'?item.label.toLowerCase().includes(query):item.label.toLowerCase().startsWith(query));}\n typed(value:any):void {\n if(typeof value==='string'&&(this.control==='autocomplete'||this.option.allowCustom===true)&&!this.disabled&&!this.readonly)this.changed.emit(value);\n if(value===null&&!this.disabled&&!this.readonly)this.changed.emit(null);\n }\n chooseValue(value:any):void {const choice=this.choices.find(item=>Object.is(item.value,value));if(choice)this.select(choice);else this.changed.emit(value);}\n select(item:any):void {if(this.disabled||this.readonly||!item)return;this.changed.emit(item.value);this.itemSelected.emit(item.original);}\n}\n","/** Calendar values are wall-clock Dates. Date-only values never undergo timezone conversion. */\nexport function wallParts(date: Date, zone: string): number[] {\n const parts = new Intl.DateTimeFormat('en-CA', { timeZone: zone, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h23' }).formatToParts(date);\n const read = (key: string) => Number(parts.find(p => p.type === key)?.value);\n return ['year', 'month', 'day', 'hour', 'minute', 'second'].map(read);\n}\nexport function pickerDate(value: any, type: string, zone?: string): Date | null {\n if (value === null || value === undefined || value === '') return null;\n const local = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2}))?)?$/.exec(`${value}`);\n if (type === 'date' && local) return new Date(+local[1], +local[2] - 1, +local[3]);\n const clock = /^(\\d{2}):(\\d{2})(?::(\\d{2}))?$/.exec(`${value}`);\n if (type === 'time' && clock) return new Date(2000, 0, 1, +clock[1], +clock[2], +(clock[3] || 0));\n const date = value instanceof Date ? value : new Date(value); if (Number.isNaN(date.getTime())) return null;\n if (type === 'date' || !zone || zone === 'local') return date;\n const p = wallParts(date, zone); return new Date(p[0], p[1] - 1, p[2], p[3], p[4], p[5]);\n}\nexport function instantFromWall(value: Date, zone: string): Date | null {\n const target = Date.UTC(value.getFullYear(), value.getMonth(), value.getDate(), value.getHours(), value.getMinutes(), value.getSeconds());\n let instant = target;\n for (let i = 0; i < 4; i++) {\n const p = wallParts(new Date(instant), zone);\n const represented = Date.UTC(p[0], p[1] - 1, p[2], p[3], p[4], p[5]);\n const delta = target - represented; if (!delta) return new Date(instant); instant += delta;\n }\n return null; // nonexistent local time during a daylight-saving jump\n}\nexport function storedTemporal(value: Date | null, previous: any, type: string, option: any): any {\n if (!value) return null;\n const pad = (n: number) => `${n}`.padStart(2, '0');\n const date = `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}`;\n const time = `${pad(value.getHours())}:${pad(value.getMinutes())}` + (option.showSeconds ? `:${pad(value.getSeconds())}` : '');\n const format = option.valueFormat ?? (typeof previous === 'string' ? (type === 'date' ? 'date' : type === 'time' && /^\\d\\d:\\d\\d/.test(previous) ? 'time' : 'iso') : 'dateObject');\n if (type === 'date') return format === 'dateObject' ? new Date(value.getFullYear(), value.getMonth(), value.getDate()) : date;\n if (type === 'time' && format === 'time') return time;\n if (format === 'local') return `${date}T${time}`;\n const instant = option.displayTimezone && option.displayTimezone !== 'local' ? instantFromWall(value, option.displayTimezone) : value;\n if (!instant) throw new Error('This time does not exist in the selected timezone.');\n return format === 'iso' ? instant.toISOString() : instant;\n}\nexport function primeDateFormat(format?: string): string {\n if (typeof format !== 'string' || !format || ['date', 'date-time', 'iso-date', 'iso-time', 'iso-datetime'].includes(format)) return 'yy-mm-dd';\n // Accept the project's common display tokens; PrimeNG uses yy for a four-digit year.\n return format.replace(/\\s+[Hh].*$/, '').replace(/yyyy/g, 'yy').replace(/MMMM/g, 'MM').replace(/MMM/g, 'M').replace(/MM(?=[/.-])/g, 'mm').replace(/([/.-])MM/g, '$1mm');\n}\n","import { Component, ElementRef, inject, OnDestroy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { CustomKeyboardDirective } from '../components/custom-keyboard/custom-keyboard.directive';\nimport { DateTimePickerService } from '../components/custom-keyboard/date-time-picker.service';\nimport { ControlBase } from './control-base';\nimport { pickerDate, primeDateFormat, storedTemporal } from '../components/field-renderer/temporal-policy';\n@Component({selector:'vl-temporal-control',standalone:true,imports:[CommonModule,FormsModule,DatePickerModule,CustomKeyboardDirective],template:`\n <div class=\"picker-field\">\n <p-datepicker #calendar styleClass=\"custom-datepicker\" [inputId]=\"inputId\" [ngModel]=\"dateValue\" (ngModelChange)=\"choose($event)\"\n [ngModelOptions]=\"{standalone:true}\" [disabled]=\"disabled||readonly\" [readonlyInput]=\"option.allowManualInput === false\"\n [timeOnly]=\"control==='time'\" [showTime]=\"control==='datetime'\" [showSeconds]=\"option.showSeconds ?? false\"\n [hourFormat]=\"option.hourFormat || '24'\" [dateFormat]=\"displayFormat\" [placeholder]=\"placeholder\"\n [minDate]=\"minDate\" [maxDate]=\"maxDate\" [showClear]=\"option.showClear ?? true\"\n [stepHour]=\"option.stepHour ?? 1\" [stepMinute]=\"option.stepMinute ?? 1\" [stepSecond]=\"option.stepSecond ?? 1\"\n [showIcon]=\"false\" [showOnFocus]=\"false\" appendTo=\"body\" [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\n [panelStyleClass]=\"control==='time'?picker.timePanelClass:picker.datePanelClass\" [motionOptions]=\"picker.dockedMotion\"\n [vlCustomKeyboard]=\"option.allowManualInput===false?null:keyboard\"\n (pointerdown)=\"picker.onFieldPointerDown($event,calendar)\" (onFocus)=\"picker.onFieldFocus($event)\"\n (onShow)=\"picker.onShown()\" (onClose)=\"picker.onClose(calendar)\" (onBlur)=\"blurred.emit()\"\n [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\"></p-datepicker>\n <button type=\"button\" class=\"picker-field__icon\" [disabled]=\"disabled||readonly\" [attr.aria-label]=\"control==='time'?'Open time picker':'Open calendar'\"\n (pointerdown)=\"picker.openFromIcon($event,calendar)\" (click)=\"picker.blockIconClick($event)\"><i [class]=\"control==='time'?'pi pi-clock':'pi pi-calendar'\"></i></button>\n </div>\n <small *ngIf=\"error\" role=\"alert\">{{error}}</small>`,\n styles:[`:host{display:block;min-width:0}.picker-field{position:relative}`]})\nexport class TemporalControlComponent extends ControlBase implements OnDestroy {\n readonly picker=inject(DateTimePickerService);\n private readonly host=inject(ElementRef<HTMLElement>);\n error='';\n get dateValue():Date|null {try{return pickerDate(this.value,this.control,this.option.displayTimezone);}catch{return null;}}\n get minDate():Date|undefined {return this.option.minDate?pickerDate(this.option.minDate,this.control,this.option.displayTimezone)??undefined:undefined;}\n get maxDate():Date|undefined {return this.option.maxDate?pickerDate(this.option.maxDate,this.control,this.option.displayTimezone)??undefined:undefined;}\n get displayFormat():string {return primeDateFormat(this.option.displayFormat??this.property.format);}\n choose(value:Date|null):void {\n if(this.disabled||this.readonly)return;\n try {const stored=storedTemporal(value,this.value,this.control,this.option);this.error='';this.changed.emit(stored);}\n catch(error){this.error=error instanceof Error?error.message:'Invalid date or timezone';this.changed.emit('invalid');}\n }\n ngOnDestroy():void {this.picker.closeIfWithin(this.host.nativeElement);}\n}\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ControlBase } from './control-base';\n@Component({selector:'vl-media-control',standalone:true,imports:[CommonModule],template:`\n <ng-container *ngIf=\"source\" [ngSwitch]=\"kind\">\n <img *ngSwitchDefault [src]=\"source\" [alt]=\"option.alt || property.caption || ''\" [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\" loading=\"lazy\" (error)=\"failed=true\" />\n <video *ngSwitchCase=\"'video'\" [src]=\"source\" [poster]=\"option.poster || ''\" [controls]=\"option.controls !== false\" [muted]=\"option.muted ?? false\"\n [loop]=\"option.loop ?? false\" [autoplay]=\"option.autoplay ?? false\" [preload]=\"option.preload || 'metadata'\" playsinline (error)=\"failed=true\"\n [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\"></video>\n <audio *ngSwitchCase=\"'audio'\" [src]=\"source\" [controls]=\"option.controls !== false\" [muted]=\"option.muted ?? false\"\n [loop]=\"option.loop ?? false\" [autoplay]=\"option.autoplay ?? false\" [preload]=\"option.preload || 'metadata'\" (error)=\"failed=true\"\n [ngStyle]=\"styles(inputStyle)\" [class]=\"classes(inputStyle)\"></audio>\n <a *ngSwitchCase=\"'pdf'\" [href]=\"source\" target=\"_blank\" rel=\"noopener noreferrer\">{{option.linkLabel || 'Open PDF'}}</a>\n <a *ngSwitchCase=\"'file'\" [href]=\"source\" target=\"_blank\" rel=\"noopener noreferrer\">{{option.linkLabel || 'Open file'}}</a>\n </ng-container>\n <small *ngIf=\"failed\" role=\"alert\">{{option.errorMessage || 'This media could not be loaded.'}}</small>`,styles:[`:host{display:block;min-width:0}img,video,audio{max-width:100%}small{color:#b91c1c}`]})\nexport class MediaControlComponent extends ControlBase {\n failed=false;\n get source():string {\n const source=this.option.src??this.value;\n if(typeof source==='string')return source;\n return source?.src??source?.dataUrl??(source?.base64?`data:${source.mimeType||'application/octet-stream'};base64,${source.base64}`:'');\n }\n get kind():string {\n const mime=this.option.mimeType??/^data:([^;,]+)/i.exec(this.source)?.[1]??this.value?.mimeType??'';\n if(mime.startsWith('image/'))return 'image';if(mime.startsWith('video/'))return 'video';if(mime.startsWith('audio/'))return 'audio';if(mime==='application/pdf')return 'pdf';\n const path=(this.option.fileName||this.source).split(/[?#]/)[0];const ext=/\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\n if(['mp4','webm','mov','m4v','ogv','mkv','avi'].includes(ext||''))return 'video';\n if(['mp3','wav','ogg','oga','m4a','aac','flac','opus'].includes(ext||''))return 'audio';\n if(ext==='pdf')return 'pdf';if(['doc','docx','xls','xlsx','ppt','pptx','zip','rar','7z','txt','csv'].includes(ext||''))return 'file';return 'image';\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, forwardRef, Input, OnChanges, Output } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TextControlComponent } from '../../controls/text-control.component';\nimport { NumericControlComponent } from '../../controls/numeric-control.component';\nimport { ToggleControlComponent } from '../../controls/toggle-control.component';\nimport { SelectionControlComponent } from '../../controls/selection-control.component';\nimport { TemporalControlComponent } from '../../controls/temporal-control.component';\nimport { MediaControlComponent } from '../../controls/media-control.component';\nimport { basicType, classes, controlFor, keyboardFor, styles, supported, validateValue, choicesFor } from './field-policy';\nlet nextFieldId = 0;\n@Component({\n selector: 'vl-field-renderer', standalone: true,\n imports: [CommonModule, MatTooltipModule, TextControlComponent, NumericControlComponent, ToggleControlComponent, SelectionControlComponent, TemporalControlComponent, MediaControlComponent],\n host: { '[class.form-group]': \"type !== 'media'\", '[class.mb-3]': \"type !== 'media'\" },\n templateUrl: './field-renderer.component.html', styleUrl: './field-renderer.component.css',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FieldRendererComponent), multi: true }, { provide: NG_VALIDATORS, useExisting: forwardRef(() => FieldRendererComponent), multi: true }]\n})\nexport class FieldRendererComponent implements ControlValueAccessor, Validator, OnChanges {\n @Input() field: any = {};\n @Input() property: any = {};\n @Input() items: any[] | undefined;\n @Input() translations: any = {};\n @Input() errorMessages: any = {};\n @Input() showErrors = false;\n @Output() itemSelected = new EventEmitter<any>();\n @Output() fieldBlur = new EventEmitter<void>();\n value: any = null;\n touched = false;\n private formDisabled = false;\n readonly inputId = `vl-shared-field-${++nextFieldId}`;\n readonly classes = classes;\n readonly styles = styles;\n private onChange: (value: any) => void = () => { };\n private onTouched: () => void = () => { };\n private validatorChanged: () => void = () => { };\n get option(): any { return this.field?.option || {}; }\n get type(): string { return basicType(this.property); }\n get control(): string { return controlFor(this.property, this.option); }\n get allowed(): boolean { return supported(this.property, this.option); }\n get keyboard(): string | null { return keyboardFor(this.property, this.option); }\n get disabled(): boolean { return this.formDisabled || this.option.disabled === true; }\n get readonly(): boolean { return this.option.readonly ?? this.property?.readonly ?? false; }\n get protectedValue(): boolean { return this.option.protected === true; }\n get label(): string {\n const label = this.field?.label;\n const caption = typeof label === 'string' ? label : label?.value ?? label?.caption ?? this.property?.caption ?? '';\n return this.translations?.[caption] ?? caption;\n }\n get afterLabel(): boolean { return ['checkbox', 'switch'].includes(this.control) && (this.option.labelPosition === 'right' || this.option.postfixCaption === true); }\n get innerStyle(): any {\n // Same layout defaults as ModelComponent.getFieldInnerLayoutStyle().\n const layoutStyle = this.field?.layoutStyle || {};\n if (this.field?.layout === 'horizontal') {\n return {\n display: 'grid',\n gridTemplateColumns: layoutStyle.gridTemplateColumns || layoutStyle['grid-template-columns'] || '80px minmax(0, 1fr)',\n alignItems: layoutStyle.alignItems || 'center',\n gap: layoutStyle.gap || '10px',\n width: '100%', minWidth: '0', boxSizing: 'border-box',\n ...layoutStyle\n };\n }\n return { display: 'grid', gridTemplateColumns: 'minmax(0, 1fr)',\n gap: layoutStyle.gap || '6px', width: '100%', minWidth: '0',\n boxSizing: 'border-box', ...layoutStyle };\n }\n get resolvedOption(): any {\n const p = this.property;\n return {\n ...this.option, placeholder: this.translations?.[this.option.placeholder ?? p.placeholder] ?? this.option.placeholder ?? p.placeholder,\n currency: this.option.currency ?? this.option.fieldData?.currency ?? p.currency,\n required: this.option.required ?? p.required\n };\n }\n get errors(): any { return this.disabled ? null : validateValue(this.value, this.property, this.option); }\n get errorText(): string {\n const key = Object.keys(this.errors || {})[0]; if (!key) return '';\n const custom = this.option.messages?.[key];\n const defaults: any = { required: 'This field is required.', boolean: 'Choose a boolean value.', email: 'Enter a valid email address.', number: 'Enter a valid number.', integer: 'Enter a whole number.', minimum: 'The value is below the minimum.', maximum: 'The value exceeds the maximum.', minlength: 'The value is too short.', maxlength: 'The value is too long.', pattern: 'The value does not match the required format.', enum: 'Choose an allowed value.', decimals: 'Too many decimal places.', multipleOf: 'Enter a permitted increment.', date: 'Enter a valid date or time.', minDate: 'Choose a later date or time.', maxDate: 'Choose an earlier date or time.', unsupportedControl: 'This control is not supported for this property type.', configuration: 'The field configuration is invalid.' };\n const text = custom ?? this.errorMessages?.[key] ?? defaults[key] ?? 'Invalid value';\n const translated = this.translations?.[text] ?? text;\n const details = this.errors?.[key] || {};\n return `${translated}`.replace(/{{\\s*field\\s*}}/g, this.label).replace(/{{\\s*requiredLength\\s*}}/g, `${details.requiredLength ?? ''}`);\n }\n get formattedValue(): string {\n if (this.control === 'password') return this.value ? '••••••••' : '';\n const found = choicesFor(this.property, this.option, this.items).find(c => Object.is(c.value, this.value));\n if (found) return found.label;\n if (this.value instanceof Date) return this.value.toLocaleString();\n return this.value == null ? '' : typeof this.value === 'object' ? JSON.stringify(this.value) : `${this.value}`;\n }\n ngOnChanges(): void { this.validatorChanged(); }\n writeValue(value: any): void { this.value = value; }\n registerOnChange(fn: (value: any) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(disabled: boolean): void { this.formDisabled = disabled; }\n registerOnValidatorChange(fn: () => void): void { this.validatorChanged = fn; }\n validate(_control: AbstractControl): ValidationErrors | null { return this.errors; }\n change(value: any): void {\n if (this.disabled || this.readonly || this.protectedValue) return;\n this.value = value; this.onChange(value); this.validatorChanged();\n }\n blur(): void { this.touched = true; this.onTouched(); this.fieldBlur.emit(); }\n}\n","<div *ngIf=\"option.visible !== false\" [ngStyle]=\"innerStyle\"\n [attr.aria-disabled]=\"disabled\">\n <label *ngIf=\"label && !afterLabel\"\n [attr.for]=\"control==='radiobutton'?null:inputId\"\n [ngStyle]=\"styles(field.label?.style)\"\n [class]=\"classes(field.label?.style)\">\n {{label}}<span *ngIf=\"resolvedOption.required && option.showRequiredIndicator === true\" aria-hidden=\"true\"> *</span>\n <span *ngIf=\"option.tooltip\" class=\"help\"\n [matTooltip]=\"translations[option.tooltip] || option.tooltip\" tabindex=\"0\"\n [attr.aria-label]=\"translations[option.tooltip] || option.tooltip\">ⓘ</span>\n </label>\n <div class=\"control-area\"\n [attr.aria-invalid]=\"errors && (touched||showErrors)?'true':null\"\n [attr.aria-describedby]=\"errors && (touched||showErrors)?inputId+'-error':null\">\n <div *ngIf=\"!allowed\" role=\"alert\">{{errorText}}</div>\n <span *ngIf=\"allowed && protectedValue && type!=='media'\"\n [ngStyle]=\"styles(field.scope?.style)\">{{formattedValue}}</span>\n <ng-container *ngIf=\"allowed && (!protectedValue || type==='media')\">\n <vl-text-control\n *ngIf=\"type==='string' && ['textInput','textArea','password','email'].includes(control)\"\n [value]=\"value\" [property]=\"property\" [option]=\"resolvedOption\"\n [control]=\"control\" [inputId]=\"inputId\"\n [inputStyle]=\"field.scope?.style\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [keyboard]=\"keyboard\"\n (changed)=\"change($event)\" (blurred)=\"blur()\"></vl-text-control>\n <vl-numeric-control\n *ngIf=\"['number','integer','bigdecimal'].includes(type)\" [value]=\"value\"\n [property]=\"property\" [option]=\"resolvedOption\" [control]=\"control\"\n [inputId]=\"inputId\"\n [inputStyle]=\"field.scope?.style\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [keyboard]=\"keyboard\"\n (changed)=\"change($event)\" (blurred)=\"blur()\"></vl-numeric-control>\n <vl-toggle-control *ngIf=\"['checkbox','switch'].includes(control)\"\n [value]=\"value\" [property]=\"property\" [option]=\"resolvedOption\"\n [control]=\"control\" [inputId]=\"inputId\"\n [inputStyle]=\"field.scope?.style\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [keyboard]=\"keyboard\"\n (changed)=\"change($event)\" (blurred)=\"blur()\"></vl-toggle-control>\n <vl-selection-control\n *ngIf=\"['dropdown','combobox','autocomplete','radiobutton'].includes(control)\"\n [value]=\"value\" [property]=\"property\" [option]=\"resolvedOption\"\n [control]=\"control\" [inputId]=\"inputId\"\n [inputStyle]=\"field.scope?.style\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [keyboard]=\"keyboard\"\n (changed)=\"change($event)\" (blurred)=\"blur()\" [items]=\"items\"\n (itemSelected)=\"itemSelected.emit($event)\"></vl-selection-control>\n <vl-temporal-control *ngIf=\"['date','time','datetime'].includes(type)\"\n [value]=\"value\" [property]=\"property\" [option]=\"resolvedOption\"\n [control]=\"control\" [inputId]=\"inputId\"\n [inputStyle]=\"field.scope?.style\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [keyboard]=\"keyboard\"\n (changed)=\"change($event)\" (blurred)=\"blur()\"></vl-temporal-control>\n <vl-media-control *ngIf=\"type==='media'\" [value]=\"value\"\n [property]=\"property\" [option]=\"resolvedOption\" [control]=\"control\"\n [inputId]=\"inputId\"\n [inputStyle]=\"field.scope?.style\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [keyboard]=\"keyboard\"\n (changed)=\"change($event)\" (blurred)=\"blur()\"></vl-media-control>\n </ng-container>\n <label *ngIf=\"label && afterLabel\" [attr.for]=\"inputId\"\n [ngStyle]=\"styles(field.label?.style)\"\n [class]=\"classes(field.label?.style)\">{{label}}</label>\n <small *ngIf=\"errors && (touched||showErrors)\" [id]=\"inputId+'-error'\"\n class=\"error text-danger\" role=\"alert\"\n [ngStyle]=\"styles(field.validation?.style)\">{{errorText}}</small>\n </div>\n</div>\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: a field without a placeholder stays empty; it showed the text \"undefined\" (resolvePlaceholder)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: keyboardTypeFor. A text field took the toolkit keyboard only with option.keyboardType,\r\n// which no layout sets; the attribute type now decides\r\nimport { ChangeDetectorRef, Component, Input } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { CustomKeyboardDirective } from '../custom-keyboard/custom-keyboard.directive';\r\nimport { CustomKeyboardType, resolveCustomKeyboardType } from '../custom-keyboard/custom-keyboard.types';\r\nimport { resolvePlaceholder } from '../../pipes/placeholder.pipe';\r\n\r\n@Component({\r\n selector: 'vl-textbox',\r\n standalone: true,\r\n templateUrl: './textbox.html',\r\n styleUrl: './textbox.css',\r\n imports: [FormsModule, InputTextModule, CustomKeyboardDirective]\r\n})\r\nexport class Textbox {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n selectedLanguageInfo: any = {};\r\n\r\n constructor(\r\n private cdr: ChangeDetectorRef,\r\n private utilityService: UtilityService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.utilityService.currentProjectlanguage$.subscribe((uiLang: any) => {\r\n queueMicrotask(() => {\r\n if (uiLang) {\r\n this.selectedLanguageInfo = uiLang\r\n this.cdr.markForCheck();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n /** The toolkit keyboard for this field, from option.keyboardType or the attribute type. */\r\n keyboardTypeFor(formField: any): CustomKeyboardType | null {\r\n const reference = formField?.scope?.reference;\r\n const property = reference\r\n ? this.modalItemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop()]\r\n : null;\r\n\r\n return resolveCustomKeyboardType(formField?.option, property);\r\n }\r\n\r\n getPlaceholder(formField: any) {\r\n return resolvePlaceholder(this.modalItemInfo.propertySchema, formField.scope?.reference, this.selectedLanguageInfo?.selectedLanguage);\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: the toolkit keyboard follows the attribute type (keyboardTypeFor) -->\r\n<input pInputText type=\"text\" #inputField=\"ngModel\" [vlCustomKeyboard]=\"keyboardTypeFor(formField)\"\r\n [required]=\"formField?.option?.required\" [email]=\"formField?.option?.email\" [disabled]=\"formField?.option?.disabled\"\r\n [readonly]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope.reference.split('/').pop()\r\n ]?.readonly\r\n \" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"\r\n formField?.scope?.style?.classes\r\n ? formField.scope.style.classes[0]\r\n : ''\r\n \" [(ngModel)]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\" [placeholder]=\"getPlaceholder(formField)\" />","import { FieldRendererComponent } from '../../components/field-renderer/field-renderer.component';\nimport { basicType, CONTROL_MAP } from '../../components/field-renderer/field-policy';\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n// - fix: a field's backend list (option.autocomplete: url, method, params) is requested whenever the\n// field has that source, whatever its data type and control - autocomplete reads it as its\n// suggestions, dropdown and combobox as their items (agreed with the developer). The work order\n// fields are type string and were never requested. {{userInfo.x}} in the parameters resolves -\n// resourceNo was sent empty\n// - fix: the autocomplete request runs under the waiting rule of every request (stagedRequest:\n// hints after 10 and 30 s, given up after 60 s); on failure the list is empty, so the spinner no\n// longer turns for ever\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\n// - change: the date and time icons open the picker with showOverlay() and markForCheck(). PrimeNG 21\n// DatePicker has no show(); the call threw, the catch swallowed it, and the overlay set in finally\n// stayed invisible (the picker is OnPush) until the user tapped the field - which then showed the\n// calendar together with a keyboard: the \"two keyboards\" seen on iOS\n// - change: a second picker icon is no longer ignored while another picker is open. The open picker\n// is closed without focusing its field, and its late onClose no longer cancels the new one\n// - change: after an icon tap a click that no longer hits the icon is dropped. Closing the keyboard\n// resizes the dialog under the finger, and the click opened the autocomplete moved there\n// - change: an icon tap releases the field that has the focus. Its preventDefault kept an\n// autocomplete focused, so its list and the system keyboard stayed open beside the calendar\n// - new: keyboardTypeFor, so every field gets the toolkit keyboard of its attribute type\n// - new: on the devices the date picker docks at the bottom, where the keyboard would be, and the\n// dialog ends above it; the small time picker stays at its field. Tapping into a field with an\n// open picker opens the keyboard at once\n// - change: after a selection in a picker the field gives up the focus PrimeNG returns to it; it\n// showed a focus frame without any keyboard\n// - change: the docked date picker has no open/close animation; it made the panel jump up to its\n// field while closing\n// - new: the field of an open picker keeps a focus frame (picker-field--active), since the field\n// itself gives the focus away\n// - change: the picker logic moved to DateTimePickerService, shared with form, card and grid\n// - new: ngOnDestroy closes a picker that is still open, so closing the dialog cannot leave the\n// keyboard service blocked and the next dialog cut short\n// Shuaib 2026-09-24\n// - new: renderFieldType maps legacy checkbox fields to boolean.\n\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectorRef, Component, ElementRef, Input, OnChanges, OnDestroy, SimpleChanges, inject } from '@angular/core';\nimport { FormsModule, NgForm } from '@angular/forms';\nimport { Capacitor, CapacitorHttp } from '@capacitor/core';\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\nimport { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { NzSelectModule } from 'ng-zorro-antd/select';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { Label } from '../../components/label/label';\nimport { String } from '../../components/string/string';\nimport { Textbox } from '../../components/textbox/textbox';\nimport { UtilityService } from '../../services/utility.service';\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\nimport { CustomKeyboardType, resolveCustomKeyboardType } from '../../components/custom-keyboard/custom-keyboard.types';\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\nimport { stagedRequest } from '../../services/request-timeout.service';\nimport { RemoteListService } from '../../services/remote-list.service';\n\n\n@Component({\n standalone: true,\n selector: 'vl-model',\n templateUrl: './model.component.html',\n styleUrl: './model.component.css',\n imports: [FieldRendererComponent, PlaceholderPipe, \n CommonModule,\n FormsModule,\n NzSelectModule,\n NzDatePickerModule,\n DatePickerModule,\n AutoCompleteModule,\n InputTextModule,\n Label,\n String,\n Textbox,\n CustomKeyboardDirective,\n ]\n})\nexport class ModelComponent implements OnChanges, OnDestroy {\n private readonly remoteLists = inject(RemoteListService);\n /** Keep existing checkbox data objects usable; new objects use boolean. */\n renderFieldType(type: string | undefined): string | undefined {\n return type === 'checkbox' ? 'boolean' : type;\n }\n /** Date and time picker behaviour shared by all containers. */\n readonly picker = inject(DateTimePickerService);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** The toolkit keyboard for a field, from option.keyboardType or the attribute type. */\n keyboardTypeFor(formField: any): CustomKeyboardType | null {\n const reference = formField?.scope?.reference;\n const property = reference\n ? this.modalItemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop()]\n : null;\n\n return resolveCustomKeyboardType(formField?.option, property);\n }\n matchData: any[] = [];\n date2: Date | undefined;\n\n @Input() errorMessages: any = {};\n @Input() modalItemInfo: any = {};\n @Input() selectedLanguageInfo: any = {};\n @Input() userInfo: any = {};\n @Input() setFormDataHandler?: () => void | Promise<void>;\n\n copyLayoutSchema: any = {};\n isLoading = false;\n projectLanguage: any = {};\n\n constructor(\n private cdr: ChangeDetectorRef,\n private readonly dialogRef: DynamicDialogRef,\n private readonly dialogConfig: DynamicDialogConfig,\n private utilityService: UtilityService\n ) { }\n\n ngAfterViewInit(): void {\n this.projectLanguage = this.utilityService.currentProjectlanguage$.subscribe((uiLang: any) => {\n console.log('uiLang: ', uiLang);\n queueMicrotask(() => {\n if (uiLang) {\n this.selectedLanguageInfo = uiLang;\n this.updateDialogHeader();\n this.cdr.markForCheck();\n }\n });\n });\n }\n\n ngOnDestroy(): void {\n this.projectLanguage?.unsubscribe?.();\n /*\n * The dialog can be closed with a picker still open. Without this the keyboard service keeps\n * \"picker open\" and the reserved bottom area: no toolkit keyboard opens any more and the next\n * dialog is cut short above an empty strip.\n */\n this.picker.closeIfWithin(this.host.nativeElement);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n !changes['modalItemInfo'] &&\n !changes['selectedLanguageInfo'] &&\n !changes['userInfo']\n ) {\n return;\n }\n this.initializeDialogContent();\n }\n\n private async initializeDialogContent(loadData: boolean = true): Promise<void> {\n if (!this.modalItemInfo?.layoutSchema) {\n return;\n }\n\n this.copyLayoutSchema = JSON.parse(\n JSON.stringify(this.modalItemInfo.layoutSchema)\n );\n\n const translations =\n this.selectedLanguageInfo?.selectedLanguage;\n\n if (translations) {\n this.modalItemInfo.layoutSchema =\n this.updateLayoutLanguage(\n this.copyLayoutSchema,\n translations\n );\n }\n\n if (this.modalItemInfo?.currentRecord) {\n this.mapDataToPropertySchema(\n this.modalItemInfo.currentRecord,\n this.modalItemInfo\n );\n }\n\n this.initializeSharedDefaults();\n await this.setAutoCompleteData();\n }\n\n private updateDialogHeader(): void {\n const titleKey =\n this.modalItemInfo?.modalTitleKey ??\n this.modalItemInfo?.modalTitle;\n\n if (!titleKey) {\n return;\n }\n\n const translations = this.selectedLanguageInfo?.selectedLanguage;\n this.dialogConfig.header = translations?.[titleKey] ?? titleKey;\n }\n\n updateLayoutLanguage<T>(\n schema: T,\n translations: Record<string, string>\n ): T {\n const cloned = JSON.parse(JSON.stringify(schema));\n\n const walk = (obj: any) => {\n if (!obj || typeof obj !== 'object') return;\n\n // 🔹 label.caption (most common in form schemas)\n if (obj.label && typeof obj.label.caption === 'string') {\n const original = obj.label.caption;\n obj.label.caption = translations[original] ?? original;\n }\n\n // 🔹 direct caption (fallback / buttons / future-proof)\n if (typeof obj.caption === 'string') {\n const original = obj.caption;\n obj.caption = translations[original] ?? original;\n }\n\n // 🚫 Skip huge data arrays (autocomplete datasets, etc.)\n if (Array.isArray(obj.data)) return;\n\n // 🔁 Recurse\n Object.keys(obj).forEach((key) => {\n const value = obj[key];\n if (typeof value === 'object') {\n walk(value);\n }\n });\n };\n\n walk(cloned);\n return cloned;\n }\n\n getLabel(formField: any) {\n let caption = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\n const translation = this.selectedLanguageInfo?.selectedLanguage;\n return translation && translation[caption] ? translation[caption] : caption;\n }\n\n getButtonCaption(formField: any) {\n let caption = formField.label?.caption;\n const translation = this.selectedLanguageInfo?.selectedLanguage;\n return translation && translation[caption] ? translation[caption] : caption;\n }\n\n mapDataToPropertySchema(data: any, modalItemInfo: any): void {\n if (!data || !modalItemInfo?.propertySchema) return;\n const [rootScope] = Object.keys(modalItemInfo.propertySchema);\n if (!rootScope) return;\n\n const schemaFields = modalItemInfo.propertySchema[rootScope];\n Object.keys(schemaFields).forEach((fieldKey) => {\n if (data.hasOwnProperty(fieldKey)) {\n if (!schemaFields[fieldKey]) {\n schemaFields[fieldKey] = {};\n }\n schemaFields[fieldKey].value = data[fieldKey];\n }\n });\n }\n\n\n async setAutoCompleteData(): Promise<void> {\n const sections =\n this.modalItemInfo?.layoutSchema?.formSections || [];\n\n for (const section of sections) {\n for (const field of section?.formFields || []) {\n const reference = field?.scope?.reference;\n\n if (!reference) {\n continue;\n }\n\n const scope = this.getScope(reference);\n const fieldName = reference.split('/').pop();\n\n // Loaded whenever the field has an autocomplete source, whatever its data type: the\n // project's work order fields are type string - checked against 'autocomplete' only, the\n // list was shown but never requested (decision with the developer, 2026-10-13).\n if (field?.option?.autocomplete) {\n this.isLoading = true;\n this.cdr.detectChanges();\n\n try {\n field.data = await this.fetchAutocompleteData(field);\n\n // Any control reads the loaded list: dropdown and combobox take their items from the\n // property schema - filled from the backend now as well (agreed with the developer).\n const property = this.modalItemInfo?.propertySchema?.[scope]?.[fieldName ?? ''];\n\n if (property && field.option?.control && field.option.control !== 'autocomplete' && field.data.length) {\n property.data = field.data;\n }\n } catch (error) {\n // Empty list: the spinner stops; the waiting rule has already told the user.\n field.data = [];\n console.warn('Autocomplete list could not be loaded', fieldName, error);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n }\n }\n }\n\n /** The field's backend list (RemoteListService - shared by every container). */\n async fetchAutocompleteData(formField: any) {\n return this.remoteLists.load(formField?.option?.autocomplete, this.userInfo);\n }\n\n /** Resolves {{...}} against the user info (RemoteListService). */\n resolveToken(template: string, context: any) {\n return this.remoteLists.resolveToken(template, context);\n }\n\n buildCompany(userInfo: any): string {\n return this.remoteLists.buildCompany(userInfo);\n }\n\n getScope(scope: any) {\n let propertyScope = \"\";\n let start = scope?.indexOf(\"#/\") + 2;\n let end = scope?.indexOf(\"/\", start);\n if (start && end) {\n propertyScope = scope.substring(start, end);\n }\n return propertyScope;\n }\n\n autocompChangeEvent(event: any, formField: any) {\n const q = (event.query || '').toLowerCase();\n let fieldName = formField.scope?.reference?.split('/')?.pop()\n if (fieldName) {\n // Always an array: undefined kept PrimeNG's loading spinner turning.\n this.matchData = (formField.data ?? []).filter((x: any) => x[fieldName] && `${x[fieldName]}`.toLowerCase().startsWith(q));\n }\n }\n\n autocompFocusOutEvent(event: any, formField: any) {\n let actualObj = Object.keys(event)\n if (actualObj.length && formField) {\n this.autocompSelectEvent(event, formField)\n }\n }\n\n autocompSelectEvent(obj: any, formField?: any) {\n const mapping = formField?.option?.onSelect?.mapFields;\n if (!mapping || obj == null) return;\n Object.entries(mapping).forEach(([targetProp, sourceKey]) => {\n const scope = this.getScope(formField.scope.reference);\n if (this.modalItemInfo.propertySchema?.[scope]?.[targetProp]) {\n this.modalItemInfo.propertySchema[scope][targetProp].value = obj[sourceKey as string] ?? null;\n }\n });\n }\n\n setErroMessage(formField: any, errorMessages: any, errorType: any) {\n let error: any = \"\";\n let fieldName: any = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;\n if (errorType == \"required\") {\n error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required\n }\n if (error && error.toString().includes(\"{{requiredLength}}\")) {\n error = error.replace(/{{\\s*requiredLength\\s*}}/g, formField?.minlength.toString());\n }\n return error.replace(/{{\\s*field\\s*}}/g, fieldName);\n }\n\n getStyleWithoutClasses(styleObject: any) {\n if (!styleObject) {\n return { classes: '', style: {} };\n }\n const { classes, ...styleWithoutClasses } = styleObject;\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\n }\n\n getSectionBodyStyle(formSection: any): Record<string, any> {\n const sectionStyle = {\n ...(formSection?.style || {})\n };\n\n return this.getStyleWithoutClasses({\n display: sectionStyle.display || 'grid',\n gridTemplateColumns:\n sectionStyle.gridTemplateColumns ||\n sectionStyle['grid-template-columns'] ||\n 'repeat(12, minmax(0, 1fr))',\n gap: sectionStyle.gap || '12px',\n width: sectionStyle.width || '100%',\n boxSizing: sectionStyle.boxSizing || 'border-box',\n ...sectionStyle\n }).style;\n }\n\n getFieldWrapperStyle(formField: any): Record<string, any> {\n const style = formField?.style || {};\n\n return {\n gridColumn:\n style.gridColumn ||\n style['grid-column'] ||\n `span ${formField?.gridSpan || 12}`,\n gridRow: style.gridRow || style['grid-row'] || undefined,\n justifySelf: style.justifySelf || style['justify-self'] || undefined,\n alignSelf: style.alignSelf || style['align-self'] || undefined,\n width: style.width || '100%',\n maxWidth: style.maxWidth || style['max-width'] || undefined,\n minWidth: style.minWidth || style['min-width'] || '0',\n margin: style.margin || undefined,\n marginTop: style.marginTop || style['margin-top'] || undefined,\n marginRight: style.marginRight || style['margin-right'] || undefined,\n marginBottom: style.marginBottom || style['margin-bottom'] || undefined,\n marginLeft: style.marginLeft || style['margin-left'] || undefined,\n boxSizing: style.boxSizing || style['box-sizing'] || 'border-box'\n };\n }\n\n onTimePanelShow(formField: any): void {\n this.picker.onShown();\n\n const reference =\n formField?.scope?.reference;\n\n const scope =\n this.getScope(reference);\n\n const fieldName =\n reference?.split('/')?.pop();\n\n const field =\n this.modalItemInfo\n ?.propertySchema\n ?.[scope]\n ?.[fieldName];\n\n if (!field || field.value) {\n return;\n }\n\n const currentTime = new Date();\n currentTime.setSeconds(0, 0);\n\n this.handleRules(\n formField,\n currentTime\n );\n }\n\n\n getControlStyle(formField: any): Record<string, any> {\n const style = {\n ...(formField?.style || {})\n };\n\n /*\n * These properties belong to the field wrapper because the wrapper\n * is the direct child of the section grid.\n */\n delete style.gridColumn;\n delete style['grid-column'];\n delete style.gridRow;\n delete style['grid-row'];\n delete style.justifySelf;\n delete style['justify-self'];\n delete style.alignSelf;\n delete style['align-self'];\n delete style.margin;\n delete style.marginTop;\n delete style['margin-top'];\n delete style.marginRight;\n delete style['margin-right'];\n delete style.marginBottom;\n delete style['margin-bottom'];\n delete style.marginLeft;\n delete style['margin-left'];\n delete style.classes;\n\n return {\n width: style.width || '100%',\n maxWidth: style.maxWidth || style['max-width'] || undefined,\n minWidth: style.minWidth || style['min-width'] || '0',\n boxSizing: style.boxSizing || style['box-sizing'] || 'border-box',\n ...style\n };\n }\n\n getFieldInnerLayoutStyle(formField: any): Record<string, any> {\n const layoutStyle = formField?.layoutStyle || {};\n\n if (formField?.layout === 'horizontal') {\n return {\n display: 'grid',\n gridTemplateColumns:\n layoutStyle.gridTemplateColumns ||\n layoutStyle['grid-template-columns'] ||\n '80px minmax(0, 1fr)',\n alignItems: layoutStyle.alignItems || 'center',\n gap: layoutStyle.gap || '10px',\n width: '100%',\n minWidth: '0',\n boxSizing: 'border-box',\n ...layoutStyle\n };\n }\n\n return {\n display: 'grid',\n gridTemplateColumns: 'minmax(0, 1fr)',\n gap: layoutStyle.gap || '6px',\n width: '100%',\n minWidth: '0',\n boxSizing: 'border-box',\n ...layoutStyle\n };\n }\n\n dateChangeEvent(formField: any, value: any) {\n this.handleRules(formField, value);\n }\n\n onDateTyping(event: any) {\n const input = event.target as HTMLInputElement;\n if (!input) return;\n let digits = input.value.replace(/\\D/g, '');\n digits = digits.substring(0, 8);\n let formatted = '';\n if (digits.length <= 4) {\n formatted = digits;\n } else if (digits.length <= 6) {\n formatted = `${digits.slice(0, 4)}-${digits.slice(4)}`;\n } else {\n formatted = `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;\n }\n input.value = formatted;\n }\n\n onTimeTyping(event: any) {\n const input: HTMLInputElement =\n event?.target || event?.originalEvent?.target;\n if (!input) return;\n let digits = input.value.replace(/\\D/g, '');\n digits = digits.substring(0, 4);\n let formatted = '';\n if (digits.length <= 2) {\n formatted = digits;\n } else {\n formatted = `${digits.slice(0, 2)}:${digits.slice(2)}`;\n }\n\n input.value = formatted;\n }\n\n timeChangeEvent(formField: any, value: any) {\n this.handleRules(formField, value);\n }\n\n handleRules(formField: any, value: any) {\n const scope = this.getScope(formField.scope.reference);\n const field = formField.scope?.reference.split('/').pop()\n const rules = formField.option?.rules;\n this.modalItemInfo.propertySchema[scope][field].value = value;\n if (!rules) return;\n rules.forEach((rule: any) => {\n let exist = this.isRuleTriggered(rule, formField)\n if (!exist) return;\n switch (rule.action) {\n case 'calculateDuration':\n this.applyDurationRule(rule, formField);\n break;\n case 'resetValue':\n this.resetRule(rule, formField);\n break;\n }\n });\n }\n\n resetRule(rule: any, formField: any) {\n const scope = this.getScope(formField.scope.reference);\n if (rule?.resetValue?.length > 0) {\n rule.resetValue.forEach((prop: any) => {\n if (this.modalItemInfo.propertySchema[scope]?.[prop]) {\n this.modalItemInfo.propertySchema[scope][prop].value = null;\n }\n });\n }\n }\n\n isRuleTriggered(rule: any, formField: any): boolean {\n if (rule.when === 'timeRangeComplete') {\n const scope = this.getScope(formField.scope.reference);\n return (\n this.modalItemInfo.propertySchema[scope]?.[formField.scope.reference.split('/').pop()]?.value &&\n this.modalItemInfo.propertySchema[scope]?.[rule.with || 'workDayTimeTo']?.value\n );\n } else if (rule.when === 'change') {\n return true;\n }\n return false;\n }\n\n applyDurationRule(rule: any, formField: any) {\n const scope = this.getScope(formField.scope.reference);\n const schema = this.modalItemInfo.propertySchema[scope];\n const currentKey = formField.scope.reference.split('/').pop();\n // Explicit keys support other time pairs; existing work-order schemas keep their meaning.\n const fromKey = rule.params?.fromTime || (schema.workDayTimeFrom ? 'workDayTimeFrom' : currentKey);\n const toKey = rule.params?.toTime || (schema.workDayTimeTo ? 'workDayTimeTo' : rule.with);\n const fromDateKey = rule.params?.fromDate || 'fromDate';\n const toDateKey = rule.params?.toDate || 'toDate';\n const durationKey = rule.params?.durationField;\n if (!durationKey || !schema?.[durationKey]) return;\n const fromTime = this.ruleClock(schema?.[fromKey]?.value);\n const toTime = this.ruleClock(schema?.[toKey]?.value);\n const baseValue = schema?.[fromDateKey]?.value;\n const dateOnly = typeof baseValue === 'string' && /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(baseValue);\n const baseDate = dateOnly ? new Date(+dateOnly[1], +dateOnly[2]-1, +dateOnly[3])\n : baseValue == null || baseValue === '' ? null : new Date(baseValue);\n if (!fromTime || !toTime || !baseDate || Number.isNaN(baseDate.getTime())) {\n schema[durationKey].value = '';\n return;\n }\n const fromDateTime = new Date(baseDate);\n fromDateTime.setHours(fromTime[0], fromTime[1], 0, 0);\n const toDateTime = new Date(baseDate);\n toDateTime.setHours(toTime[0], toTime[1], 0, 0);\n // Preserve the existing overnight rule, including equal times meaning next day.\n if (toDateTime <= fromDateTime) toDateTime.setDate(toDateTime.getDate()+1);\n const totalMinutes = Math.floor((toDateTime.getTime()-fromDateTime.getTime())/60000);\n schema[durationKey].value = `${Math.floor(totalMinutes/60)}:${`${totalMinutes%60}`.padStart(2,'0')}`;\n if (schema[toDateKey]) schema[toDateKey].value = new Date(toDateTime);\n }\n\n private ruleClock(value: any): [number, number] | null {\n if (value == null || value === '') return null;\n if (typeof value === 'string') {\n const time = /^(\\d{2}):(\\d{2})(?::\\d{2})?$/.exec(value);\n if (time) return +time[1]<24 && +time[2]<60 ? [+time[1],+time[2]] : null;\n }\n const date = value instanceof Date ? value : new Date(value);\n return Number.isNaN(date.getTime()) ? null : [date.getHours(),date.getMinutes()];\n }\n\n invokeSetformData(): void {\n void this.setFormDataHandler?.();\n }\n\n invokeFormBtnClick(\n option: any,\n propertySchema: any,\n form: NgForm\n ): void {\n if (option?.innerAction === 'cancel') {\n this.onCancel();\n return;\n }\n\n if (option?.innerAction === 'submit') {\n const valid = this.checkValidty(form);\n\n if (!valid) {\n return;\n }\n\n this.dialogRef.close({\n option,\n action: 'buttonClick',\n propertySchema,\n recordIndex: this.modalItemInfo?.recordIndex\n });\n\n return;\n }\n }\n\n checkValidty(form: NgForm): boolean {\n this.sharedErrorsVisible = true;\n if (!form) {\n return false;\n }\n\n Object.values(form.controls).forEach(control => {\n control.markAsTouched();\n control.updateValueAndValidity();\n });\n\n return !!form.valid;\n }\n\n onCancel(): void {\n this.dialogRef.close({\n action: 'cancel'\n });\n }\n\n private getMediaProperty(field: any): any {\n const reference = field?.scope?.reference;\n const key = reference?.split('/').pop();\n \n return key\n ? this.modalItemInfo?.propertySchema?.[this.getScope(reference)]?.[key]\n : undefined;\n }\n \n getMediaSource(field: any): string {\n const property = this.getMediaProperty(field);\n const value =\n field?.option?.src || property?.value || property?.default || '';\n \n return typeof value === 'string' ? value.trim() : '';\n }\n \n getMediaLabel(field: any): string {\n if (typeof field?.label === 'string' && field.label.trim()) {\n return field.label;\n }\n \n return field?.label?.value\n || field?.label?.caption\n || this.getMediaProperty(field)?.caption\n || 'Media';\n }\n \n getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\n const source = this.getMediaSource(field);\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\n \n if (mime?.startsWith('image/')) return 'image';\n if (mime?.startsWith('video/')) return 'video';\n if (mime?.startsWith('audio/')) return 'audio';\n if (mime === 'application/pdf') return 'pdf';\n \n const property = this.getMediaProperty(field);\n const candidates = [\n source,\n field?.option?.fileName,\n property?.value,\n property?.default\n ];\n \n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\n const files = [\n 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\n 'txt', 'csv', 'zip', 'rar', '7z'\n ];\n \n for (const candidate of candidates) {\n if (typeof candidate !== 'string') continue;\n if (/^(data|blob):/i.test(candidate)) continue;\n \n let path = candidate.split(/[?#]/)[0];\n \n try {\n path = decodeURIComponent(path);\n } catch {\n // Keep the original path.\n }\n \n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\n \n if (!extension) continue;\n if (videos.includes(extension)) return 'video';\n if (audios.includes(extension)) return 'audio';\n if (extension === 'pdf') return 'pdf';\n if (files.includes(extension)) return 'file';\n }\n \n return 'image';\n }\n\n sharedErrorsVisible = false;\n sharedProperty(field:any):any {\n const reference=field?.scope?.reference;\n if(typeof reference!=='string')return undefined;\n const parts=reference.replace(/^#\\//,'').split('/');\n const root=this.modalItemInfo?.propertySchema?.[parts[0]];\n const key=parts[parts.length-1];\n return root?.[key]??root?.properties?.[key];\n }\n usesSharedField(field:any):boolean {\n const property=this.sharedProperty(field);\n return !!property && Object.prototype.hasOwnProperty.call(CONTROL_MAP,basicType(property));\n }\n private initializeSharedDefaults():void {\n for(const section of this.modalItemInfo?.layoutSchema?.formSections||[]) {\n for(const field of section.formFields||[]) {\n const property=this.sharedProperty(field);\n if(!property||property.value!==undefined)continue;\n const value=field.option?.default ?? field.option?.fieldData?.default ?? property.default;\n if(value!==undefined)property.value=structuredClone(value);\n }\n }\n }\n onSharedFieldChange(field:any,value:any):void {\n const property=this.sharedProperty(field);if(!property)return;\n property.value=value;\n // Existing date/time rules and boolean copy actions continue through their original methods.\n if(field.option?.rules)this.handleRules(field,value);\n if(basicType(property)==='boolean')this.invokeSetformData();\n }\n}\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\n project defines none; it showed the text \"undefined\" -->\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\n both report which picker closed (onPickerClose(picker)) -->\n\n<!-- Shuaib 2026-09-24\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\n\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\n card case recording that the rename reached this file first -->\n<!-- Loader Spinner -->\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\n <div class=\"spinner\"></div>\n</div>\n<div [style]=\"getStyleWithoutClasses(modalItemInfo?.layoutSchema?.style).style\"\n [class]=\"modalItemInfo?.layoutSchema?.style?.classes[0]\">\n <form #dynamicForm=\"ngForm\"\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\n (submit)=\"$event.preventDefault()\">\n <div\n *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections; let sectionIndex = index\">\n <div *ngIf=\"formSection?.label?.caption\"\n [class]=\"formSection?.label?.style?.classes[0]\"\n [style]=\"getStyleWithoutClasses(formSection?.label?.style).style\">\n {{formSection.label.caption}}\n </div>\n <div *ngIf=\"formSection?.formFields?.length > 0\"\n [class]=\"formSection?.style?.classes?.[0] || ''\"\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\n <div *ngFor=\"let formField of formSection.formFields; let fieldIndex = index\"\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\n [style.display]=\"usesSharedField(formField) && formField.option?.visible === false ? 'none' : null\"\n [class]=\"formField?.style?.classes || ''\">\n\n <!-- @contract decision: the widest type coverage in the toolkit\n reality: every field type except the grid-only quantity renders here.\n When another container drops a type, this is the way out.\n seen: measured 2026-09-19. Note the file is model.component.html while\n the container is called modal in layout files - that costs a\n search every time -->\n <!-- @contract compatibility: checkbox is rendered as boolean for existing projects. -->\n @if (usesSharedField(formField)) {\n @if (sharedProperty(formField); as property) {\n @if (formField.option?.visible !== false) {\n <vl-field-renderer [field]=\"formField\" [property]=\"property\"\n [ngModel]=\"property.value\" (ngModelChange)=\"onSharedFieldChange(formField,$event)\"\n [name]=\"'shared-' + sectionIndex + '-' + fieldIndex + '-' + formField.scope.reference\" [disabled]=\"formField.option?.disabled === true\"\n [items]=\"formField.data ?? property.data\" [translations]=\"selectedLanguageInfo?.selectedLanguage || {}\"\n [errorMessages]=\"errorMessages\" [showErrors]=\"sharedErrorsVisible\"\n (itemSelected)=\"autocompSelectEvent($event,formField)\">\n </vl-field-renderer>\n }\n }\n } @else {\n <div [ngSwitch]=\"renderFieldType(\n formField?.scope?.reference &&\n modalItemInfo?.propertySchema?.[\n getScope(formField.scope.reference)\n ]\n ? modalItemInfo.propertySchema[\n getScope(formField.scope.reference)\n ]?.[\n formField.scope.reference.split('/').pop()\n ]?.type\n : 'default'\n )\">\n <!-- Media control -->\n \n\n <!-- credit card control -->\n <!-- @contract decision: the credit card type is spelled creditCard\n reality: this file was renamed on 2026-09-15, form.component.html and\n utility.service.ts followed on 2026-09-19. carditCard is read\n nowhere any more.\n failure: a data object still declaring carditCard renders empty. -->\n <div *ngSwitchCase=\"'creditCard'\"\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\n [class]=\"formField.style?.classes[0]\">\n <div id=\"card-element\">\n <!-- a Stripe element will be inserted here -->\n </div>\n <!-- Used to display form errors -->\n <div id=\"card-errors\"\n class=\"displayError.textContent!=='': 'alert alert-danger mt-1'\">\n </div>\n </div>\n\n <!-- string control -->\n \n\n <!-- number control -->\n \n\n <!-- DateRange control -->\n <div *ngSwitchCase=\"'dateRange'\"\n class=\"form-group mb-3\">\n <span *ngIf=\"formField.option.protected\"\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\n <vl-string [formField]=\"formField\"\n [modalItemInfo]=\"modalItemInfo\">\n </vl-string>\n </span>\n <div *ngIf=\"!formField.option.protected\">\n <div\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\n <label\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{\n formField.label?.value\n ?\n formField.label?.value :\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n <nz-range-picker #dateRangeField=\"ngModel\"\n [required]=\"formField.option.required\"\n [name]=\"formField.scope?.reference\"\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"></nz-range-picker>\n </div>\n <!-- Error Message -->\n <div\n *ngIf=\"dateRangeField?.touched && dateRangeField?.invalid\"\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\n <p class=\"text-danger\"\n *ngIf=\"dateRangeField?.errors?.['required']\">\n {{formField.label?.value ?\n formField.label?.value :\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\n +\n ' ' + errorMessages.required}}</p>\n <p class=\"text-danger\"\n *ngIf=\"dateRangeField?.errors?.['email']\">\n {{(formField.label?.value ?\n formField.label?.value :\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\n +\n ' ' + errorMessages.pattern}}</p>\n </div>\n </div>\n </div>\n\n <!-- Date control -->\n \n\n <!-- Time control -->\n \n\n <!-- Autocomplete control -->\n <div *ngSwitchCase=\"'autocomplete'\"\n class=\"form-group mb-3\">\n <span *ngIf=\"formField.option.protected\"\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\n <vl-string [formField]=\"formField\"\n [modalItemInfo]=\"modalItemInfo\">\n </vl-string>\n </span>\n <div *ngIf=\"!formField.option.protected\">\n <div\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\n <vl-label [formField]=\"formField\"\n [modalItemInfo]=\"modalItemInfo\">\n </vl-label>\n\n <span>\n <p-autocomplete\n #autocompleteField=\"ngModel\"\n [required]=\"formField.option.required\"\n [name]=\"formField.scope?.reference\"\n styleClass=\"custom-autocomplete\"\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\n [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\"\n [suggestions]=\"matchData\"\n [dropdown]=\"true\"\n [optionLabel]=\"formField?.option?.autocomplete?.response?.label ? formField.option.autocomplete.response.label : 'label'\"\n [placeholder]=\"modalItemInfo.propertySchema | vlPlaceholder: formField.scope?.reference\"\n (completeMethod)=\"autocompChangeEvent($event, formField)\"\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\n [vlCustomKeyboard]=\"keyboardTypeFor(formField)\">\n </p-autocomplete>\n <!-- Error Message -->\n <div\n *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\n <p class=\"text-danger\"\n *ngIf=\"autocompleteField?.errors?.['required']\">\n {{setErroMessage(formField,\n errorMessages, \"required\")}}</p>\n <p class=\"text-danger\"\n *ngIf=\"autocompleteField?.errors?.['email']\">\n {{(formField.label?.value ?\n formField.label?.value :\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\n +\n ' ' +\n errorMessages.pattern}}</p>\n </div>\n </span>\n </div>\n </div>\n </div>\n\n <!-- checkBox control -->\n \n\n <!-- dropdown control -->\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group mb-3\"\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\n [class]=\"formField.style?.classes ? formField.style?.classes[0] : ''\">\n <span *ngIf=\"formField.option?.postfixCaption\">\n <select id=\"dynamic-dropdown\"\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\n #dropdownField=\"ngModel\"\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\n [name]=\"formField.scope?.reference\"\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\n <option\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\n [value]=\"formField?.option?.optionValue ? formField.option.optionValue : 'value'\">\n {{ formField?.option?.optionLabel ?\n formField.option.optionLabel :\n 'label'}}</option>\n </select>\n <label\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope)][formField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n </span>\n <div *ngIf=\"!formField.option?.postfixCaption\">\n <div\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\n <label\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\n }}</label>\n\n <nz-select nzShowSearch nzAllowClear\n nzPlaceHolder=\"Select\"\n #dropdownField=\"ngModel\"\n [required]=\"formField.option.required\"\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\n [name]=\"formField.scope?.reference\"\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\n <nz-option\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\n [nzLabel]=\"item[formField?.option?.optionLabel ? formField.option.optionLabel : 'label']\"\n [nzValue]=\"item[formField?.option?.optionValue ? formField.option.optionValue : 'value']\"></nz-option>\n </nz-select>\n </div>\n <!-- Error Message -->\n <div\n *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\n <p class=\"text-danger\"\n *ngIf=\"dropdownField?.errors?.['required']\">\n {{formField.label?.value ?\n formField.label?.value :\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\n +\n ' ' + errorMessages.required}}</p>\n <p class=\"text-danger\"\n *ngIf=\"dropdownField?.errors?.['email']\">\n {{(formField.label?.value ?\n formField.label?.value :\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\n +\n ' ' + errorMessages.pattern}}</p>\n </div>\n </div>\n </div>\n\n <!-- button control -->\n <div *ngSwitchCase=\"'default'\">\n <button type=\"button\"\n [ngStyle]=\"getStyleWithoutClasses(formField.style).style\"\n (click)=\"invokeFormBtnClick(formField.option, modalItemInfo.propertySchema, dynamicForm)\"\n class=\"btn btn-primary btn-block\">\n {{ getButtonCaption(formField) }}\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </form>\n</div>\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: the placeholder comes through PlaceholderPipe (vlPlaceholder): empty when the project has\r\n// none, it showed \"undefined\"\r\nimport { NgIf } from '@angular/common';\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { SelectModule } from 'primeng/select';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\n\r\n@Component({\r\n selector: 'vl-autocomplete',\r\n standalone: true,\r\n imports: [\r\n PlaceholderPipe,\r\n FormsModule,\r\n AutoCompleteModule,\r\n SelectModule,\r\n NgIf\r\n ],\r\n templateUrl: './autocomplete.html',\r\n styleUrl: './autocomplete.css',\r\n})\r\nexport class Autocomplete {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n @Input() matchData: any;\r\n @Input() selectedLanguageInfo: any;\r\n @Input() errorMessages: any;\r\n @Output() autocompChange: EventEmitter<any> = new EventEmitter();\r\n @Output() autocompFocusOut: EventEmitter<any> = new EventEmitter();\r\n\r\n autocompChangeEvent(event: any, formField: any) {\r\n this.autocompChange.emit({ event: event, formField: formField });\r\n }\r\n\r\n autocompFocusOutEvent(event: any, formField: any) {\r\n this.autocompFocusOut.emit({ event: event, formField: formField });\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n setErroMessage(formField: any, errorMessages: any, errorType: any) {\r\n let error: any = \"\";\r\n let fieldName: any = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;\r\n if (errorType == \"required\") {\r\n error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required\r\n }\r\n if (error && error.toString().includes(\"{{requiredLength}}\")) {\r\n error = error.replace(/{{\\s*requiredLength\\s*}}/g, formField?.minlength.toString());\r\n }\r\n return error.replace(/{{\\s*field\\s*}}/g, fieldName);\r\n }\r\n\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<p-autoComplete #autocompleteField=\"ngModel\" [required]=\"formField.option.required\" [name]=\"formField.scope?.reference\"\r\n inputmode\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\"\r\n [suggestions]=\"matchData\" [dropdown]=\"true\" [optionLabel]=\"formField.option.autocomplete.response.label\"\r\n [placeholder]=\"modalItemInfo.propertySchema | vlPlaceholder: formField.scope?.reference\"\r\n (completeMethod)=\"autocompChangeEvent($event, formField)\" \r\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\r\n [attr.inputmode]=\"formField.option.keyboard === 'numeric' ? 'numeric' : null\">\r\n</p-autoComplete>\r\n\r\n<!-- Error Message -->\r\n<div *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n</div>","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-button',\r\n standalone: true,\r\n templateUrl: './button.html',\r\n styleUrl: './button.css',\r\n})\r\nexport class Button {\r\n\r\n}\r\n","<p>button works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-date',\r\n standalone: true,\r\n templateUrl: './date.html',\r\n styleUrl: './date.css',\r\n})\r\nexport class Date {\r\n\r\n}\r\n","<p>date works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-dropdown',\r\n standalone: true,\r\n templateUrl: './dropdown.html',\r\n styleUrl: './dropdown.css',\r\n})\r\nexport class Dropdown {\r\n\r\n}\r\n","<p>dropdown works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-error-message',\r\n standalone: true,\r\n templateUrl: './error-message.html',\r\n styleUrl: './error-message.css',\r\n})\r\nexport class ErrorMessage {\r\n\r\n}\r\n","<p>error-message works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-time',\r\n standalone: true,\r\n templateUrl: './time.html',\r\n styleUrl: './time.css',\r\n})\r\nexport class Time {\r\n\r\n}\r\n","<p>time works!</p>\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - new: one OpenID Connect flow for the devices, used by Keycloak and Okta alike. Both are OIDC with\r\n// PKCE; only issuer, client id and redirect differ, and the endpoints come from the issuer's\r\n// discovery document. Before, MobileKeycloakService and MobileOktaService each had their own\r\n// login, refresh and logout, and the logout behaved differently (Okta: white page, browser window)\r\nimport { Injectable } from '@angular/core';\r\nimport { OAuth2Client } from '@byteowls/capacitor-oauth2';\r\nimport { stagedRequest } from './request-timeout.service';\r\n\r\n/** What a project's login configuration has to say about its identity provider. */\r\nexport interface OidcProvider {\r\n /** e.g. https://keycloak-poc.wilken.de/realms/p5, https://integrator-1772139.okta.com/oauth2/default */\r\n issuer: string;\r\n clientId: string;\r\n redirectUri: string;\r\n /** Space separated string or array; default \"openid profile email\". */\r\n scope?: string | string[];\r\n /** Ask for offline_access (refresh token that outlives the browser session). */\r\n offlineAccess?: boolean;\r\n}\r\n\r\nexport interface OidcTokens {\r\n access_token: string;\r\n refresh_token?: string;\r\n id_token?: string;\r\n expires_in?: number;\r\n token_type?: string;\r\n issuer?: string;\r\n}\r\n\r\n/** Result of a refresh: new tokens, 'refused' (sign in again) or null (no answer - keep the sign-in). */\r\nexport type OidcRefresh = OidcTokens | 'refused' | null;\r\n\r\n/** Set by signOut: the next login asks for the password instead of reusing the provider session. */\r\nconst PROMPT_LOGIN_KEY = 'vl-oidc-prompt-login';\r\n/** Set by signOut when the project requires a login: the restarted app shows its loader (app.ts). */\r\nconst RELOGIN_KEY = 'vl-relogin';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MobileOidcService {\r\n private discoveries = new Map<string, Promise<any>>();\r\n\r\n /** The issuer's discovery document, fetched once per issuer. */\r\n discover(issuer: string): Promise<any> {\r\n const key = issuer.replace(/\\/+$/, '');\r\n\r\n if (!this.discoveries.has(key)) {\r\n const request = stagedRequest(signal => fetch(`${key}/.well-known/openid-configuration`, { signal }))\r\n .then(response => {\r\n if (!response.ok) {\r\n throw new Error(`OIDC discovery failed (${response.status})`);\r\n }\r\n return response.json();\r\n });\r\n // A failed discovery must not stay cached.\r\n request.catch(() => this.discoveries.delete(key));\r\n this.discoveries.set(key, request);\r\n }\r\n\r\n return this.discoveries.get(key)!;\r\n }\r\n\r\n /**\r\n * Signs in through the system browser (authorization code + PKCE). With offlineAccess the scope\r\n * gets offline_access; if the provider refuses it the login is repeated without it. After a\r\n * logout the provider is asked for the password again (prompt=login).\r\n */\r\n async login(provider: OidcProvider): Promise<OidcTokens | null> {\r\n const discovery = await this.discover(provider.issuer);\r\n const scope = this.scopeOf(provider.scope);\r\n const promptLogin = this.flag(PROMPT_LOGIN_KEY);\r\n\r\n const authenticate = (withScope: string) => OAuth2Client.authenticate({\r\n appId: provider.clientId,\r\n authorizationBaseUrl: discovery.authorization_endpoint,\r\n accessTokenEndpoint: discovery.token_endpoint,\r\n redirectUrl: provider.redirectUri,\r\n responseType: 'code',\r\n scope: withScope,\r\n pkceEnabled: true,\r\n logsEnabled: false,\r\n ...(promptLogin ? { additionalParameters: { prompt: 'login' } } : {})\r\n });\r\n\r\n let result: any;\r\n\r\n try {\r\n result = await authenticate(provider.offlineAccess ? this.withOfflineAccess(scope) : scope);\r\n } catch (error: any) {\r\n const cancelled = /USER_CANCELLED/i.test(String(error?.message ?? error));\r\n\r\n if (!provider.offlineAccess || cancelled) {\r\n throw error;\r\n }\r\n\r\n console.warn('Identity provider refused offline_access, signing in without it');\r\n result = await authenticate(scope);\r\n }\r\n\r\n this.setFlag(PROMPT_LOGIN_KEY, false);\r\n\r\n const response = result?.access_token_response ?? result;\r\n const accessToken = response?.access_token ?? result?.access_token;\r\n\r\n if (!accessToken) {\r\n return null;\r\n }\r\n\r\n return {\r\n access_token: accessToken,\r\n refresh_token: response?.refresh_token,\r\n id_token: response?.id_token,\r\n expires_in: response?.expires_in,\r\n token_type: response?.token_type,\r\n issuer: provider.issuer\r\n };\r\n }\r\n\r\n /** New tokens from the refresh token (grant_type=refresh_token, public client - no secret). */\r\n async refresh(provider: OidcProvider, stored: OidcTokens | any): Promise<OidcRefresh> {\r\n if (!stored?.refresh_token || !provider?.clientId) {\r\n return 'refused';\r\n }\r\n\r\n try {\r\n const discovery = await this.discover(stored.issuer || provider.issuer);\r\n const response = await stagedRequest(signal => fetch(discovery.token_endpoint, {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded', Accept: 'application/json' },\r\n body: new URLSearchParams({\r\n grant_type: 'refresh_token',\r\n refresh_token: stored.refresh_token,\r\n client_id: provider.clientId\r\n }).toString(),\r\n signal\r\n }));\r\n\r\n if (!response.ok) {\r\n // 400 invalid_grant: expired, rotated away or revoked.\r\n return 'refused';\r\n }\r\n\r\n const result: any = await response.json();\r\n\r\n if (!result?.access_token) {\r\n return 'refused';\r\n }\r\n\r\n return {\r\n access_token: result.access_token,\r\n // With token rotation the provider sends a new refresh token each time.\r\n refresh_token: result.refresh_token ?? stored.refresh_token,\r\n id_token: result.id_token ?? stored.id_token,\r\n expires_in: result.expires_in,\r\n token_type: result.token_type,\r\n issuer: stored.issuer || provider.issuer\r\n };\r\n } catch {\r\n console.warn('Token refresh not reachable');\r\n return null;\r\n }\r\n }\r\n\r\n /** The user's claims from the provider's userinfo endpoint; null when the token is refused. */\r\n async userInfo(provider: OidcProvider, accessToken: string): Promise<any | null> {\r\n const discovery = await this.discover(provider.issuer);\r\n const response = await stagedRequest(signal => fetch(discovery.userinfo_endpoint, {\r\n headers: { Authorization: `Bearer ${accessToken}`, Accept: 'application/json' },\r\n signal\r\n }));\r\n\r\n return response.ok ? response.json() : null;\r\n }\r\n\r\n /**\r\n * The same logout for every provider, without a browser window: the provider session is ended\r\n * where the provider allows it from the app (Keycloak: logout endpoint with the refresh token),\r\n * refresh and access token are revoked, the saved sign-in is removed and the app restarts. The\r\n * next login asks for the password. When the project requires a login, the restarted app shows\r\n * its loader until the sign-in window opens.\r\n */\r\n async signOut(\r\n provider: OidcProvider | null,\r\n stored: OidcTokens | any,\r\n storageKey: string,\r\n removeStored: (key: string) => Promise<void>,\r\n options: { loginRequired: boolean }\r\n ): Promise<void> {\r\n this.setFlag(PROMPT_LOGIN_KEY, true);\r\n\r\n if (provider?.clientId && (stored?.refresh_token || stored?.access_token)) {\r\n try {\r\n const discovery = await this.discover(stored?.issuer || provider.issuer);\r\n\r\n // Back-channel end of the session; providers without it (Okta) simply refuse - ignored.\r\n if (discovery.end_session_endpoint && stored?.refresh_token) {\r\n await this.post(discovery.end_session_endpoint, {\r\n client_id: provider.clientId,\r\n refresh_token: stored.refresh_token\r\n });\r\n }\r\n\r\n if (discovery.revocation_endpoint) {\r\n if (stored?.refresh_token) {\r\n await this.post(discovery.revocation_endpoint, {\r\n client_id: provider.clientId, token: stored.refresh_token, token_type_hint: 'refresh_token'\r\n });\r\n }\r\n if (stored?.access_token) {\r\n await this.post(discovery.revocation_endpoint, {\r\n client_id: provider.clientId, token: stored.access_token, token_type_hint: 'access_token'\r\n });\r\n }\r\n }\r\n } catch {\r\n console.warn('Identity provider not reachable, signing out locally');\r\n }\r\n }\r\n\r\n await removeStored(storageKey);\r\n this.setFlag(RELOGIN_KEY, options.loginRequired);\r\n window.location.reload();\r\n }\r\n\r\n /** Scope as the space separated string the OAuth2 plugin expects. */\r\n scopeOf(scope: string | string[] | undefined): string {\r\n const value = Array.isArray(scope) ? scope.join(' ') : scope;\r\n return value?.trim() || 'openid profile email';\r\n }\r\n\r\n private withOfflineAccess(scope: string): string {\r\n const parts = scope.split(/\\s+/).filter(Boolean);\r\n if (!parts.includes('offline_access')) {\r\n parts.push('offline_access');\r\n }\r\n return parts.join(' ');\r\n }\r\n\r\n private async post(url: string, fields: Record<string, string>): Promise<void> {\r\n try {\r\n const response = await stagedRequest(signal => fetch(url, {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n body: new URLSearchParams(fields).toString(),\r\n signal\r\n }));\r\n if (!response.ok) {\r\n console.warn('Logout request refused', response.status);\r\n }\r\n } catch {\r\n console.warn('Logout request not reachable');\r\n }\r\n }\r\n\r\n private flag(key: string): boolean {\r\n try {\r\n return localStorage.getItem(key) === '1';\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n private setFlag(key: string, on: boolean): void {\r\n try {\r\n on ? localStorage.setItem(key, '1') : localStorage.removeItem(key);\r\n } catch {\r\n // Storage not available - the flag is a convenience only.\r\n }\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - change: login, refresh and logout run through MobileOidcService - the same OpenID Connect flow\r\n// as Okta. The logout additionally revokes the tokens and makes the next login ask for the\r\n// password; the Keycloak session is still ended through the logout endpoint\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: the Keycloak requests (discovery, token refresh, logout) run under the waiting rule\r\n// - new: logout marks the restart (localStorage vl-relogin); the app shows its loader until the\r\n// sign-in window opens\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// - fix: logout ends the Keycloak session with a direct request instead of the end-session page in\r\n// an in-app browser. That window stayed empty after the redirect and did not close, and closing it\r\n// cancelled the sign-in the reloaded app had started (\"The sign-in was cancelled\")\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: refreshTokens. The refresh token was stored after the login but never used, so an expired\r\n// access token always meant a new login. It now asks Keycloak for new tokens first; only when the\r\n// refresh token has expired too the user has to sign in again\r\n// - new: login asks for offline_access when login.mobile.offlineAccess is set, and signs in without\r\n// it if Keycloak refuses the scope\r\n// - change: the login no longer writes the token response and the user claims (which include\r\n// password fields) to the console, and it awaits storing the tokens before reloading; the logout\r\n// URL (it carries the id token) is not logged either\r\nimport { Injectable } from '@angular/core';\r\nimport { ConfigService } from './config.service';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { App } from '@capacitor/app';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { UtilityService } from './utility.service';\r\nimport { isNativeMobile } from './native-platform';\r\nimport { stagedRequest } from './request-timeout.service';\r\nimport { MobileOidcService, OidcProvider } from './mobile-oidc.service';\r\n\r\n\r\nexport interface MobileAuthTokens {\r\n access_token: string;\r\n refresh_token?: string;\r\n id_token?: string;\r\n expires_in?: number;\r\n token_type?: string;\r\n}\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MobileKeycloakService {\r\n\r\n private tokens: MobileAuthTokens | any = null;\r\n constructor(private config: ConfigService, private http: HttpClient, private utilityService: UtilityService, private platform: Platform, private oidc: MobileOidcService) {\r\n if (Capacitor.isNativePlatform()) {\r\n App.addListener('appUrlOpen', async (url: any) => {\r\n // Nothing to do here; capacitor-oauth2 resolves internally.\r\n // Keep listener to satisfy deep link expectations.\r\n });\r\n }\r\n }\r\n\r\n /** The Keycloak realm as an OIDC provider, from login.mobile of the project. */\r\n private provider(): OidcProvider {\r\n const cfg: any = this.config.getKeycloakMobileConfig();\r\n return {\r\n issuer: cfg?.issuer,\r\n clientId: cfg?.clientId,\r\n redirectUri: cfg?.redirectUri,\r\n scope: cfg?.scope,\r\n // login.mobile.offlineAccess: the sign-in lasts as long as the app is used at least once per\r\n // \"Offline Session Idle\" (30 days in realm p5) instead of the 5 days of a normal refresh token\r\n offlineAccess: cfg?.offlineAccess === true\r\n };\r\n }\r\n\r\n async login(): Promise<any> {\r\n if (!Capacitor.isNativePlatform()) return null;\r\n const cfg: any = this.config.getKeycloakMobileConfig();\r\n const tokens = await this.oidc.login(this.provider());\r\n if (!tokens) return '';\r\n this.tokens = { ...tokens };\r\n let keycloakLoginUser = \"\";\r\n if (this.tokens.access_token) {\r\n keycloakLoginUser = await this.getUserInfo(this.tokens.access_token, cfg.issuer);\r\n if (keycloakLoginUser) {\r\n this.tokens['issuer'] = cfg.issuer;\r\n // Awaited: the reload below must not cut off the (asynchronous) keychain write.\r\n await this.utilityService.setLocalStorage(\"KeycloakInfo\", this.tokens);\r\n if (isNativeMobile()) {\r\n window.location.reload();\r\n }\r\n }\r\n }\r\n return keycloakLoginUser;\r\n }\r\n\r\n async refreshTokens(stored: MobileAuthTokens | any): Promise<any | null> {\r\n const result = await this.oidc.refresh(this.provider(), stored);\r\n if (!result || result === 'refused') {\r\n return null;\r\n }\r\n this.tokens = { ...result, issuer: stored?.issuer || result.issuer };\r\n return this.tokens;\r\n }\r\n\r\n async getUserInfo(accessToken: any, issuer: any): Promise<any> {\r\n try {\r\n const headers = new HttpHeaders({\r\n Authorization: `Bearer ${accessToken}`,\r\n });\r\n const url = `${issuer}/protocol/openid-connect/userinfo`;\r\n return await this.http.get(url, { headers }).toPromise();\r\n } catch (err) {\r\n console.error('Error fetching user info:', err);\r\n throw err;\r\n }\r\n }\r\n\r\n getAccessToken(): string | null {\r\n return this.tokens?.access_token ?? null;\r\n }\r\n\r\n getRefreshToken(): string | null {\r\n return this.tokens?.refresh_token ?? null;\r\n }\r\n\r\n /**\r\n * Ends the Keycloak session without a browser window: the refresh token goes to the logout\r\n * endpoint directly (allowed for public clients). The browser variant left an empty in-app window\r\n * that did not close, and its close button cancelled the new sign-in started behind it. The local\r\n * sign-in is removed in any case - without network the session simply runs out at Keycloak.\r\n */\r\n async logout(): Promise<void> {\r\n const keycloakInfo: any = await this.utilityService.getLocalStorage('KeycloakInfo');\r\n const tokens = keycloakInfo?.keycloakInfo ?? keycloakInfo;\r\n this.tokens = null;\r\n\r\n // Keycloak projects require a login: the restarted app shows its loader until the sign-in opens.\r\n await this.oidc.signOut(this.provider(), tokens, 'KeycloakInfo',\r\n key => this.utilityService.removeLocalStorage(key), { loginRequired: true });\r\n }\r\n\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: activeLanguage, the language file in use (\"de.json\"); its menu entry gets a check mark\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - change: choosing a language closes the menu on phone and tablet (mobile mode)\r\n// - fix: the language flags load whatever language the menu is in (found by option.changeLang,\r\n// not by the captions \"Setting\" / \"Languages\" - in German they were missing)\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// - fix: the logout button in the profile came and went: it was taken from the menu items when the\r\n// sign-in was set, and was missing for good when the items arrived later (after a project\r\n// change). It is looked up again when the items arrive, and in submenus too\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: menu items that arrive after the language was loaded are translated too; with the\r\n// Face ID lock the items came later and the menu stayed English\r\n// - new: languageChange carries languageCode next to the translations. The custom keyboards\r\n// need the language to show its letters (ä ö ü ß for German); the translation file alone\r\n// does not say which language it is\r\n// Shuaib 2026-09-24\r\n// - new: derive the signed-in user from a JWT for jwtToken projects.\r\n// - change: pass the selected project's Okta issuer to getLoginUser.\r\n// - change: clear the displayed login state when the token or authentication state is invalid.\r\nimport { Platform, PlatformModule } from '@angular/cdk/platform';\r\nimport { CommonModule } from '@angular/common';\r\nimport {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Injector,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\n\r\nimport { Device } from '@capacitor/device';\r\nimport {\r\n OKTA_AUTH,\r\n OktaAuthStateService\r\n} from '@okta/okta-angular';\r\nimport { jwtDecode } from 'jwt-decode';\r\nimport {\r\n de_DE,\r\n en_US,\r\n NzI18nService\r\n} from 'ng-zorro-antd/i18n';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzMenuModule } from 'ng-zorro-antd/menu';\r\nimport { NzTooltipModule } from 'ng-zorro-antd/tooltip';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport {\r\n DialogService,\r\n DynamicDialogModule\r\n} from 'primeng/dynamicdialog';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { LogsComponent } from '../logs/logs.component';\r\nimport { Couchdb } from '../../services/couchdb';\r\nimport { MobileKeycloakService } from '../../services/mobile-keycloak.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { RequestService } from '../../services/request.service';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { isNativeMobile } from '../../services/native-platform';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'vl-side-menu',\r\n templateUrl: './side-menu.component.html',\r\n styleUrl: './side-menu.component.css',\r\n imports: [\r\n CommonModule,\r\n PlatformModule,\r\n\r\n // NG-ZORRO\r\n NzMenuModule,\r\n NzIconModule,\r\n NzTooltipModule,\r\n NzButtonModule,\r\n\r\n // PrimeNG\r\n DynamicDialogModule\r\n ]\r\n})\r\nexport class SideMenuComponent\r\n implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n isCollapsed = false;\r\n isMobile = false;\r\n projectsLayoutSchema: any;\r\n loginUser: any = {};\r\n isLogined = false;\r\n loginedUserInfo: any = {};\r\n menuItemsCopy: any[] = [];\r\n settingMenu: any = {};\r\n setLanguage = false;\r\n /** Translations of the last language change, for menu items that arrive after it. */\r\n private lastMenuTranslations: Record<string, string> | null = null;\r\n tenantKey = '';\r\n scrollPagination: any = false\r\n\r\n private oktaAuthStateSubscription?: Subscription;\r\n private mobileLoginSubscription?: Subscription;\r\n private mobileLoginRequestInProgress = false;\r\n private currentMobileLoginToken?: string;\r\n\r\n @Input() menuItems: any[] = [];\r\n @Input() userInfo: any = {};\r\n @Input() settings: any = {};\r\n @Input() projects: any;\r\n @Input() tenantName: any;\r\n @Input() environment: any;\r\n @Input() projectSeleted: any;\r\n @Input() appVersionInfo: any;\r\n\r\n @Output() languageChange = new EventEmitter<any>();\r\n @Output() invokeMenu = new EventEmitter<any>();\r\n @Output() menuToggle = new EventEmitter<any>();\r\n @Output() invokeProject = new EventEmitter<any>();\r\n @Output() errorMessage = new EventEmitter<any>();\r\n @Output() deleteProject = new EventEmitter<any>();\r\n @Output() paginationType = new EventEmitter<any>();\r\n\r\n /** The language file in use (\"de.json\"); its menu entry has a check mark. */\r\n activeLanguage: string | null = null;\r\n\r\n @ViewChild('sideMenu', { static: true })\r\n sideMenu!: ElementRef<HTMLElement>;\r\n\r\n readonly PRIME_DE = {\r\n firstDayOfWeek: 1,\r\n dayNames: [\r\n 'Sonntag',\r\n 'Montag',\r\n 'Dienstag',\r\n 'Mittwoch',\r\n 'Donnerstag',\r\n 'Freitag',\r\n 'Samstag'\r\n ],\r\n dayNamesShort: [\r\n 'So',\r\n 'Mo',\r\n 'Di',\r\n 'Mi',\r\n 'Do',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n dayNamesMin: [\r\n 'So',\r\n 'Mo',\r\n 'Di',\r\n 'Mi',\r\n 'Do',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n monthNames: [\r\n 'Januar',\r\n 'Februar',\r\n 'März',\r\n 'April',\r\n 'Mai',\r\n 'Juni',\r\n 'Juli',\r\n 'August',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Dezember'\r\n ],\r\n monthNamesShort: [\r\n 'Jan',\r\n 'Feb',\r\n 'Mär',\r\n 'Apr',\r\n 'Mai',\r\n 'Jun',\r\n 'Jul',\r\n 'Aug',\r\n 'Sep',\r\n 'Okt',\r\n 'Nov',\r\n 'Dez'\r\n ],\r\n today: 'Heute',\r\n clear: 'Löschen',\r\n dateFormat: 'yy-mm-dd',\r\n weekHeader: 'KW'\r\n };\r\n\r\n readonly PRIME_EN = {\r\n firstDayOfWeek: 0,\r\n dayNames: [\r\n 'Sunday',\r\n 'Monday',\r\n 'Tuesday',\r\n 'Wednesday',\r\n 'Thursday',\r\n 'Friday',\r\n 'Saturday'\r\n ],\r\n dayNamesShort: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n dayNamesMin: [\r\n 'Su',\r\n 'Mo',\r\n 'Tu',\r\n 'We',\r\n 'Th',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n monthNames: [\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December'\r\n ],\r\n monthNamesShort: [\r\n 'Jan',\r\n 'Feb',\r\n 'Mar',\r\n 'Apr',\r\n 'May',\r\n 'Jun',\r\n 'Jul',\r\n 'Aug',\r\n 'Sep',\r\n 'Oct',\r\n 'Nov',\r\n 'Dec'\r\n ],\r\n today: 'Today',\r\n clear: 'Clear',\r\n dateFormat: 'yy-mm-dd',\r\n weekHeader: 'Wk'\r\n };\r\n\r\n constructor(\r\n private i18n: NzI18nService,\r\n private mobileKeycloakService: MobileKeycloakService,\r\n private couchdbService: Couchdb,\r\n private oauthService: OAuthService,\r\n private platform: Platform,\r\n private requestService: RequestService,\r\n private utilityService: UtilityService,\r\n private dialogService: DialogService,\r\n private notificationService: NotificationService,\r\n private injector: Injector\r\n ) { }\r\n\r\n async ngOnInit(): Promise<void> {\r\n this.getPaginationType();\r\n if (this.isNativeMobile()) {\r\n this.isCollapsed = true;\r\n this.isMobile = true;\r\n\r\n this.tenantKey =\r\n await this.utilityService.getLocalStorage('tenantKey') ?? '';\r\n } else {\r\n this.tenantKey =\r\n await this.utilityService.getStorage('tenantKey') ?? '';\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (\r\n changes['environment'] ||\r\n changes['userInfo'] ||\r\n changes['projectSeleted']\r\n ) {\r\n void this.setLoginUser();\r\n }\r\n\r\n if (\r\n changes['projects'] ||\r\n changes['projectSeleted']\r\n ) {\r\n this.initializeProjects();\r\n }\r\n\r\n if (\r\n changes['menuItems'] &&\r\n this.menuItems?.length\r\n ) {\r\n this.menuItemsCopy =\r\n JSON.parse(JSON.stringify(this.menuItems));\r\n\r\n /*\r\n * The language can be loaded before the menu items arrive - e.g. while the app waits for\r\n * Face ID - and then had nothing to translate: the menu stayed English while the forms\r\n * were German. Apply the last loaded language to items that come later.\r\n */\r\n if (this.lastMenuTranslations) {\r\n this.applyMenuTranslations(this.lastMenuTranslations);\r\n }\r\n\r\n // The sign-in can be known before the menu items arrive; the logout button in the profile\r\n // is taken from them, so it is looked up again now.\r\n if (this.loginUser?.name) {\r\n this.setLoginedUser(this.loginUser);\r\n }\r\n\r\n void this.setProjectSetting();\r\n }\r\n\r\n if (\r\n changes['settings'] ||\r\n changes['tenantName'] ||\r\n changes['projectSeleted']\r\n ) {\r\n void this.setSettingImages();\r\n }\r\n }\r\n\r\n async getPaginationType() {\r\n if (isNativeMobile()) {\r\n this.scrollPagination = await this.utilityService.getLocalStorage('scrollPagination')\r\n } else {\r\n this.scrollPagination = await this.utilityService.getStorage('scrollPagination');\r\n }\r\n }\r\n\r\n async ngAfterViewInit(): Promise<void> {\r\n this.initializeProjects();\r\n\r\n if (!this.isNativeMobile()) {\r\n return;\r\n }\r\n\r\n try {\r\n const deviceLanguage = await this.getDeviceLanguage();\r\n\r\n const supportedLanguage =\r\n deviceLanguage === 'de' ? 'de' : 'en';\r\n\r\n await this.changeLanguage(\r\n `${supportedLanguage}.json`\r\n );\r\n } catch (error) {\r\n console.error(\r\n 'Failed to load device language:',\r\n error\r\n );\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyOktaSubscription();\r\n this.destroyMobileLoginSubscription();\r\n }\r\n\r\n /**\r\n * Mobile menu (overlay when open, no width when closed, styles under :host(.sidemenu-mobile)):\r\n * the app on iOS and Android - phones and tablets - and small browser windows.\r\n */\r\n @HostBinding('class.sidemenu-mobile')\r\n mobileMode = this.computeMobileMode();\r\n\r\n @HostListener('window:resize')\r\n onResizeMobileMode(): void {\r\n this.mobileMode = this.computeMobileMode();\r\n }\r\n\r\n private computeMobileMode(): boolean {\r\n return (\r\n isNativeMobile() ||\r\n (typeof window !== 'undefined' &&\r\n window.matchMedia('(max-width: 768px), (max-height: 500px)').matches)\r\n );\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onDocumentClick(event: MouseEvent): void {\r\n const path =\r\n event.composedPath() as HTMLElement[];\r\n\r\n const clickedInsideMenu =\r\n path.some(\r\n element =>\r\n element === this.sideMenu?.nativeElement\r\n );\r\n\r\n const clickedToggle =\r\n path.some(\r\n element =>\r\n element instanceof HTMLElement &&\r\n element.classList?.contains(\r\n 'side-toggle-handle'\r\n )\r\n );\r\n\r\n if (\r\n !clickedInsideMenu &&\r\n !clickedToggle &&\r\n this.isMobile\r\n ) {\r\n const button =\r\n document.getElementById('toggle-id');\r\n\r\n if (\r\n button &&\r\n !this.isCollapsed\r\n ) {\r\n button.click();\r\n }\r\n }\r\n }\r\n\r\n toggleCollapsed(): void {\r\n this.isCollapsed = !this.isCollapsed;\r\n\r\n if (!this.isMobile) {\r\n return;\r\n }\r\n\r\n const sideMenu =\r\n document.querySelector('.side-menu');\r\n\r\n sideMenu?.classList.toggle(\r\n 'open',\r\n !this.isCollapsed\r\n );\r\n }\r\n\r\n private isNativeMobile(): boolean {\r\n return isNativeMobile();\r\n }\r\n\r\n async getDeviceLanguage(): Promise<string> {\r\n const info =\r\n await Device.getLanguageCode();\r\n\r\n return info.value;\r\n }\r\n\r\n async setLoginUser(): Promise<void> {\r\n try {\r\n const loginType =\r\n this.environment?.login?.type;\r\n\r\n if (!loginType) {\r\n return;\r\n }\r\n\r\n if (loginType === 'oktaAuth') {\r\n if (this.isNativeMobile()) {\r\n await this.initializeMobileOktaUser();\r\n } else {\r\n this.initializeWebOktaUser();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // The current project is not an Okta project.\r\n this.destroyOktaSubscription();\r\n this.destroyMobileLoginSubscription();\r\n\r\n if (\r\n loginType === 'jwtToken' &&\r\n this.userInfo?.jwt\r\n ) {\r\n const decodedUser =\r\n this.getUserInfoFromToken(\r\n this.userInfo.jwt\r\n );\r\n\r\n if (decodedUser) {\r\n this.setLoginedUser(decodedUser);\r\n } else {\r\n this.clearLoginUser();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if (\r\n loginType === 'keycloak' &&\r\n this.userInfo?.name\r\n ) {\r\n this.setLoginedUser(this.userInfo);\r\n return;\r\n }\r\n\r\n this.clearLoginUser();\r\n } catch (error) {\r\n console.error(\r\n 'Error while setting logged-in user:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n }\r\n\r\n private async initializeMobileOktaUser(): Promise<void> {\r\n const logined: any =\r\n await this.utilityService.getLocalStorage(\r\n 'loginedUser'\r\n );\r\n\r\n if (!logined?.token) {\r\n this.destroyMobileLoginSubscription();\r\n this.clearLoginUser();\r\n return;\r\n }\r\n\r\n if (\r\n this.mobileLoginRequestInProgress &&\r\n this.currentMobileLoginToken ===\r\n logined.token\r\n ) {\r\n return;\r\n }\r\n\r\n if (\r\n this.currentMobileLoginToken ===\r\n logined.token &&\r\n this.loginUser?.name\r\n ) {\r\n return;\r\n }\r\n\r\n this.destroyMobileLoginSubscription();\r\n\r\n this.currentMobileLoginToken =\r\n logined.token;\r\n\r\n this.mobileLoginRequestInProgress = true;\r\n\r\n this.mobileLoginSubscription =\r\n this.requestService\r\n .getLoginUser(\r\n logined.token,\r\n this.environment?.login?.mobile?.issuer || this.environment?.login?.web?.issuer\r\n )\r\n .subscribe({\r\n next: (userInfo: any) => {\r\n this.mobileLoginRequestInProgress =\r\n false;\r\n\r\n this.setLoginedUser({\r\n ...this.userInfo,\r\n ...userInfo,\r\n ...logined\r\n });\r\n },\r\n error: (error) => {\r\n this.mobileLoginRequestInProgress =\r\n false;\r\n\r\n console.error(\r\n 'Failed to fetch the mobile Okta user:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n });\r\n }\r\n\r\n private initializeWebOktaUser(): void {\r\n if (this.oktaAuthStateSubscription) {\r\n return;\r\n }\r\n\r\n try {\r\n /*\r\n * Okta dependencies are resolved only when this is\r\n * an Okta project running in the web application.\r\n *\r\n * Keycloak projects will never request OKTA_AUTH.\r\n */\r\n const oktaAuthStateService =\r\n this.injector.get(\r\n OktaAuthStateService\r\n );\r\n\r\n const oktaAuth: any =\r\n this.injector.get(OKTA_AUTH);\r\n\r\n this.oktaAuthStateSubscription =\r\n oktaAuthStateService.authState$\r\n .subscribe({\r\n next: async authState => {\r\n if (!authState.isAuthenticated) {\r\n this.clearLoginUser();\r\n return;\r\n }\r\n\r\n try {\r\n const oktaWebUser =\r\n await oktaAuth.getUser();\r\n\r\n this.setLoginedUser({\r\n ...this.userInfo,\r\n ...oktaWebUser\r\n });\r\n } catch (error) {\r\n console.error(\r\n 'Failed to fetch the web Okta user:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n },\r\n error: error => {\r\n console.error(\r\n 'Okta authentication state error:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n });\r\n } catch (error) {\r\n console.error(\r\n 'Failed to initialize web Okta authentication:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n }\r\n\r\n private destroyOktaSubscription(): void {\r\n this.oktaAuthStateSubscription?.unsubscribe();\r\n this.oktaAuthStateSubscription = undefined;\r\n }\r\n\r\n private destroyMobileLoginSubscription(): void {\r\n this.mobileLoginSubscription?.unsubscribe();\r\n this.mobileLoginSubscription = undefined;\r\n this.mobileLoginRequestInProgress = false;\r\n this.currentMobileLoginToken = undefined;\r\n }\r\n\r\n private clearLoginUser(): void {\r\n this.loginUser = {};\r\n this.loginedUserInfo = {};\r\n this.isLogined = false;\r\n }\r\n\r\n getUserInfoFromToken(token: string): any | null {\r\n try {\r\n const decoded: any =\r\n jwtDecode(token);\r\n\r\n return {\r\n sub: decoded.sub,\r\n name:\r\n decoded.name ??\r\n 'User is undefined',\r\n role:\r\n decoded.role ??\r\n 'Role is undefined',\r\n email:\r\n decoded.email ??\r\n decoded.sub,\r\n iat: decoded.iat,\r\n exp: decoded.exp\r\n };\r\n } catch (error) {\r\n console.error(\r\n 'Failed to decode JWT:',\r\n error\r\n );\r\n\r\n return null;\r\n }\r\n }\r\n\r\n setLoginedUser(user: any): void {\r\n if (!user?.name) {\r\n this.clearLoginUser();\r\n return;\r\n }\r\n\r\n const logoutMenu = this.findLogoutMenu(this.menuItems);\r\n\r\n this.loginUser = {\r\n ...user\r\n };\r\n\r\n this.loginedUserInfo = {\r\n ...user,\r\n image: 'user.png',\r\n ...(logoutMenu\r\n ? { actions: [logoutMenu] }\r\n : {})\r\n };\r\n\r\n this.isLogined = true;\r\n }\r\n\r\n /** The menu entry with action 'logout', at any depth of the menu. */\r\n private findLogoutMenu(items: any[] | undefined): any {\r\n for (const item of items ?? []) {\r\n if (item?.option?.action === 'logout') {\r\n return item;\r\n }\r\n\r\n const inSubmenu = this.findLogoutMenu(item?.submenu);\r\n\r\n if (inSubmenu) {\r\n return inSubmenu;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n initializeProjects(): void {\r\n this.projectsLayoutSchema =\r\n this.projects;\r\n }\r\n\r\n async setProjectSetting(): Promise<void> {\r\n if (!this.menuItems?.length) {\r\n return;\r\n }\r\n\r\n // Language entries are found by what they do (option.changeLang), at any depth: looked up by\r\n // the captions \"Setting\" / \"Languages\" they were missed once the menu was translated, and the\r\n // flags never loaded.\r\n const tasks: Promise<void>[] = [];\r\n const visit = (items: any[] | undefined): void => {\r\n for (const item of items ?? []) {\r\n if (item?.option?.changeLang && item.icon && !this.isUrl(item.icon)) {\r\n tasks.push(this.setLanguageMenuImage(item));\r\n }\r\n\r\n visit(item?.submenu);\r\n }\r\n };\r\n\r\n visit(this.menuItems);\r\n await Promise.all(tasks);\r\n }\r\n\r\n private async setLanguageMenuImage(\r\n childMenu: any\r\n ): Promise<void> {\r\n try {\r\n if (\r\n !this.tenantName ||\r\n !this.projectSeleted ||\r\n !childMenu?.icon\r\n ) {\r\n return;\r\n }\r\n\r\n const projectName =\r\n `${this.tenantName}_${this.projectSeleted}`;\r\n\r\n const imagePath =\r\n `Media/${childMenu.icon}`;\r\n\r\n const image =\r\n await this.couchdbService\r\n .getFileContentFromCouchDb(\r\n projectName,\r\n imagePath\r\n );\r\n\r\n const imageSource =\r\n this.getMediaSrc(image);\r\n\r\n if (imageSource) {\r\n childMenu.icon = imageSource;\r\n }\r\n } catch (error) {\r\n console.error(\r\n 'Failed to load language icon:',\r\n error\r\n );\r\n }\r\n }\r\n\r\n async setSettingImages(): Promise<void> {\r\n if (!this.settings) {\r\n this.settingMenu = {};\r\n return;\r\n }\r\n\r\n this.settingMenu =\r\n JSON.parse(JSON.stringify(this.settings));\r\n\r\n if (!this.settings?.submenu?.length) {\r\n return;\r\n }\r\n\r\n const tasks: Promise<void>[] = [];\r\n\r\n for (const menu of this.settings.submenu) {\r\n if (!menu?.submenu?.length) {\r\n continue;\r\n }\r\n\r\n for (const childMenu of menu.submenu) {\r\n if (\r\n childMenu?.option?.changeProject\r\n ) {\r\n tasks.push(\r\n this.setProjectMenuImage(childMenu)\r\n );\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(tasks);\r\n\r\n this.settingMenu =\r\n JSON.parse(JSON.stringify(this.settings));\r\n }\r\n\r\n private async setProjectMenuImage(\r\n childMenu: any\r\n ): Promise<void> {\r\n try {\r\n if (\r\n !this.tenantName ||\r\n !childMenu?.id ||\r\n !childMenu?.icon\r\n ) {\r\n return;\r\n }\r\n\r\n const projectName =\r\n `${this.tenantName}_${childMenu.id}`;\r\n\r\n const imagePath =\r\n `Media/${childMenu.icon}`;\r\n\r\n const image =\r\n await this.couchdbService\r\n .getFileContentFromCouchDb(\r\n projectName,\r\n imagePath\r\n );\r\n\r\n const imageSource =\r\n this.getMediaSrc(image);\r\n\r\n if (imageSource) {\r\n childMenu.icon = imageSource;\r\n }\r\n } catch (error) {\r\n console.error(\r\n 'Failed to load project icon:',\r\n error\r\n );\r\n }\r\n }\r\n\r\n getMediaSrc(file: any): string {\r\n if (!file) {\r\n return '';\r\n }\r\n\r\n if (file.src) {\r\n return file.src;\r\n }\r\n\r\n if (file.base64) {\r\n const mimeType =\r\n file.mimeType || 'image/png';\r\n\r\n return (\r\n `data:${mimeType};base64,` +\r\n file.base64\r\n );\r\n }\r\n\r\n if (file.dataUrl) {\r\n return file.dataUrl;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n isUrl(value: string): boolean {\r\n if (!value) {\r\n return false;\r\n }\r\n\r\n return (\r\n /^https?:\\/\\//.test(value) ||\r\n value.startsWith('blob:') ||\r\n value.startsWith('data:')\r\n );\r\n }\r\n\r\n async invokeNavigate(\r\n menu: any,\r\n parentMenu?: any\r\n ): Promise<void> {\r\n const option = menu?.option;\r\n\r\n if (!option) {\r\n return;\r\n }\r\n\r\n if (option.scrollPagination) {\r\n this.scrollPagination = true;\r\n this.paginationType.emit({ scroll: true });\r\n return;\r\n }\r\n\r\n if (option.numberedPagination) {\r\n this.scrollPagination = false;\r\n this.paginationType.emit({ scroll: false });\r\n return;\r\n }\r\n\r\n if (option?.switchTenant) {\r\n if (isNativeMobile()) {\r\n await this.utilityService.removeLocalStorage('tenantKey')\r\n await this.utilityService.removeLocalStorage('selectedProject')\r\n } else {\r\n await this.utilityService.removeStorage('tenantKey');\r\n await this.utilityService.removeStorage('selectedProject');\r\n }\r\n window.location.reload();\r\n return;\r\n }\r\n\r\n if (option.showAllProjects) {\r\n await this.utilityService.showAllProjects();\r\n return;\r\n }\r\n\r\n if (option.changeLang) {\r\n // On the phone and tablet the menu closes once a language is chosen, like after any other\r\n // entry; left open it had to be closed with the tab, and that tap closed the keyboard of the\r\n // dialog field the language change had just reopened.\r\n if (this.mobileMode && !this.isCollapsed) {\r\n this.toggleCollapsed();\r\n }\r\n\r\n await this.changeLanguage(\r\n option.data_url\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (option.changeProject) {\r\n this.navigateToProject(menu);\r\n return;\r\n }\r\n\r\n if (option.logs) {\r\n this.openLogsTable();\r\n return;\r\n }\r\n\r\n if (option.terms) {\r\n this.notificationService.info(\r\n 'Term Not Apply'\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (option.projectPrivacy) {\r\n this.notificationService.warning(\r\n 'Project Privacy Not Apply'\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (option.projectVersion) {\r\n this.notificationService.warning(\r\n 'Project Version Not Apply'\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (\r\n option.action === 'login' &&\r\n this.environment?.login?.type ===\r\n 'keycloak'\r\n ) {\r\n if (this.isNativeMobile()) {\r\n await this.mobileKeycloakService.login();\r\n } else {\r\n this.oauthService.initLoginFlow();\r\n }\r\n\r\n return;\r\n }\r\n\r\n this.toggleCollapsed();\r\n this.invokeMenu.emit(menu);\r\n }\r\n\r\n openLogsTable(): void {\r\n // this.dialogService.open(\r\n // LogsComponent,\r\n // {\r\n // width: '700px',\r\n // data: {}\r\n // }\r\n // );\r\n }\r\n\r\n deleteMenuItem(\r\n subChild: any,\r\n index: number,\r\n event: Event\r\n ): void {\r\n event.stopPropagation();\r\n\r\n const projectMenu =\r\n this.settings?.submenu?.[2]?.submenu;\r\n\r\n if (\r\n Array.isArray(projectMenu) &&\r\n index >= 0 &&\r\n index < projectMenu.length\r\n ) {\r\n projectMenu.splice(index, 1);\r\n }\r\n\r\n this.deleteProject.emit(subChild);\r\n }\r\n\r\n navigateToProject(project: any): void {\r\n this.invokeProject.emit(project);\r\n }\r\n\r\n async changeLanguage(lang: string): Promise<void> {\r\n if (\r\n !lang ||\r\n !this.tenantName ||\r\n !this.projectSeleted\r\n ) {\r\n return;\r\n }\r\n\r\n try {\r\n if (lang === 'de.json') {\r\n this.i18n.setLocale(de_DE);\r\n } else {\r\n this.i18n.setLocale(en_US);\r\n }\r\n\r\n const databaseName =\r\n `${this.tenantName}_${this.projectSeleted}`;\r\n\r\n const [\r\n selectedLanguage,\r\n errorMessages\r\n ] = await Promise.all([\r\n this.couchdbService\r\n .getFileContentFromCouchDb(\r\n databaseName,\r\n `languages/${lang}`\r\n ),\r\n\r\n this.couchdbService\r\n .getFileContentFromCouchDb(\r\n databaseName,\r\n `languages/errorMessage_${lang}`\r\n )\r\n ]);\r\n\r\n if (\r\n !selectedLanguage ||\r\n typeof selectedLanguage !== 'object'\r\n ) {\r\n console.warn(\r\n `Language file \"${lang}\" was not found.`\r\n );\r\n\r\n return;\r\n }\r\n\r\n this.languageChange.emit({\r\n selectedLanguage,\r\n errorMessages,\r\n // The custom keyboards pick their letter layout from it (\"de.json\" -> \"de\").\r\n languageCode: lang.replace(/\\.json$/i, '').split(/[-_]/)[0].toLowerCase()\r\n });\r\n\r\n this.setLanguage = true;\r\n this.activeLanguage = lang;\r\n this.lastMenuTranslations = selectedLanguage;\r\n\r\n this.applyMenuTranslations(\r\n selectedLanguage\r\n );\r\n\r\n this.applySettingTranslations(\r\n selectedLanguage\r\n );\r\n } catch (error) {\r\n console.error(\r\n `Failed to change language to \"${lang}\":`,\r\n error\r\n );\r\n }\r\n }\r\n\r\n private applyMenuTranslations(\r\n selectedLanguage: Record<string, string>\r\n ): void {\r\n if (!this.menuItemsCopy?.length) {\r\n return;\r\n }\r\n\r\n this.menuItemsCopy.forEach(\r\n (menu: any, menuIndex: number) => {\r\n const translatedCaption =\r\n selectedLanguage[\r\n menu?.label?.caption\r\n ];\r\n\r\n if (\r\n translatedCaption &&\r\n this.menuItems?.[menuIndex]?.label\r\n ) {\r\n this.menuItems[\r\n menuIndex\r\n ].label.caption = translatedCaption;\r\n }\r\n\r\n menu?.submenu?.forEach(\r\n (\r\n subMenu: any,\r\n subMenuIndex: number\r\n ) => {\r\n const translatedSubCaption =\r\n selectedLanguage[\r\n subMenu?.label?.caption\r\n ];\r\n\r\n if (\r\n translatedSubCaption &&\r\n this.menuItems?.[menuIndex]\r\n ?.submenu?.[subMenuIndex]\r\n ?.label\r\n ) {\r\n this.menuItems[\r\n menuIndex\r\n ].submenu[\r\n subMenuIndex\r\n ].label.caption =\r\n translatedSubCaption;\r\n }\r\n\r\n subMenu?.submenu?.forEach(\r\n (\r\n childMenu: any,\r\n childIndex: number\r\n ) => {\r\n const translatedChildCaption =\r\n selectedLanguage[\r\n childMenu?.label?.caption\r\n ];\r\n\r\n if (\r\n translatedChildCaption &&\r\n this.menuItems?.[menuIndex]\r\n ?.submenu?.[subMenuIndex]\r\n ?.submenu?.[childIndex]\r\n ?.label\r\n ) {\r\n this.menuItems[\r\n menuIndex\r\n ].submenu[\r\n subMenuIndex\r\n ].submenu[\r\n childIndex\r\n ].label.caption =\r\n translatedChildCaption;\r\n }\r\n }\r\n );\r\n }\r\n );\r\n }\r\n );\r\n }\r\n\r\n private applySettingTranslations(\r\n selectedLanguage: Record<string, string>\r\n ): void {\r\n const settingCaption =\r\n this.settings?.label?.caption;\r\n\r\n if (\r\n settingCaption &&\r\n this.settingMenu?.label\r\n ) {\r\n this.settingMenu.label.caption =\r\n selectedLanguage[settingCaption] ??\r\n settingCaption;\r\n }\r\n\r\n this.settings?.submenu?.forEach(\r\n (menu: any, index: number) => {\r\n const originalCaption =\r\n menu?.label?.caption;\r\n\r\n if (\r\n !originalCaption ||\r\n !this.settingMenu?.submenu?.[index]\r\n ?.label\r\n ) {\r\n return;\r\n }\r\n\r\n this.settingMenu.submenu[\r\n index\r\n ].label.caption =\r\n selectedLanguage[originalCaption] ??\r\n originalCaption;\r\n }\r\n );\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken' ? item.option?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.option?.login ? item.option.role ? item.option.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.option?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.option?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken') ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","// lib/view-toolkit.module.ts\r\n\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { NgModule } from '@angular/core';\r\nimport { CardComponent } from \"./containers/card/card.component\";\r\nimport { FormComponent } from \"./containers/form/form.component\";\r\nimport { PaginationComponent } from \"./containers/pagination/pagination.component\";\r\nimport { GridComponent } from \"./containers/grid/grid.component\";\r\nimport { HeaderMenuComponent } from \"./containers/header-menu/header-menu.component\";\r\nimport { LogsComponent } from \"./containers/logs/logs.component\";\r\nimport { ModelComponent } from \"./containers/model/model.component\";\r\nimport { Autocomplete } from \"./components/autocomplete/autocomplete\";\r\nimport { Button } from \"./components/button/button\";\r\nimport { Date } from \"./components/date/date\";\r\nimport { Dropdown } from \"./components/dropdown/dropdown\";\r\nimport { ErrorMessage } from \"./components/error-message/error-message\";\r\nimport { Label } from \"./components/label/label\";\r\nimport { String } from \"./components/string/string\";\r\nimport { Textbox } from \"./components/textbox/textbox\";\r\nimport { Time } from \"./components/time/time\";\r\nimport { SideMenuComponent } from \"./containers/side-menu/side-menu.component\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CardComponent,\r\n FormComponent,\r\n GridComponent,\r\n HeaderMenuComponent,\r\n LogsComponent,\r\n ModelComponent,\r\n PaginationComponent,\r\n SideMenuComponent,\r\n\r\n Autocomplete,\r\n Button,\r\n Date,\r\n Dropdown,\r\n ErrorMessage,\r\n Label,\r\n String,\r\n Textbox,\r\n Time\r\n ],\r\n exports: [\r\n CardComponent,\r\n FormComponent,\r\n GridComponent,\r\n HeaderMenuComponent,\r\n LogsComponent,\r\n ModelComponent,\r\n PaginationComponent,\r\n SideMenuComponent\r\n\r\n ]\r\n})\r\nexport class ViewToolkitModule { }","// AUTO-GENERATED. Do not edit.\nexport const APP_VERSION = '1.0.204';\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\nimport { Injectable } from '@angular/core';\r\nimport { Preferences } from '@capacitor/preferences';\r\nimport { APP_VERSION } from '../app-version';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { isNativeMobile } from './native-platform';\r\n\r\nconst VERSION_KEY = 'APP_VERSION';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppVersionResetService {\r\n\r\n constructor(\r\n private platform: Platform) {\r\n }\r\n\r\n\r\n async run(): Promise<void> {\r\n if (isNativeMobile()) {\r\n await this.clearNativeIfChanged();\r\n // this.clearWebIfChanged();\r\n // return;\r\n }\r\n }\r\n\r\n private async clearNativeIfChanged(): Promise<void> {\r\n const { value: savedVersion } = await Preferences.get({ key: VERSION_KEY });\r\n if (savedVersion === APP_VERSION) return;\r\n console.log(`🧹 Clearing Capacitor Preferences (new build ${APP_VERSION})`);\r\n await Preferences.clear();\r\n this.clearWebStores();\r\n await Preferences.set({ key: VERSION_KEY, value: APP_VERSION });\r\n }\r\n\r\n // private clearWebIfChanged(): void {\r\n // const savedVersion = sessionStorage.getItem(VERSION_KEY) || localStorage.getItem(VERSION_KEY);\r\n // if (savedVersion === APP_VERSION) return;\r\n // this.clearWebStores();\r\n // localStorage.setItem(VERSION_KEY, APP_VERSION);\r\n // sessionStorage.setItem(VERSION_KEY, APP_VERSION);\r\n // }\r\n\r\n private clearWebStores(): void {\r\n try { localStorage.clear(); } catch { }\r\n try { sessionStorage.clear(); } catch { }\r\n try {\r\n if (typeof document !== 'undefined' && document.cookie) {\r\n document.cookie.split(';').forEach((c) => {\r\n const eqPos = c.indexOf('=');\r\n const name = eqPos > -1 ? c.substring(0, eqPos).trim() : c.trim();\r\n if (name) {\r\n document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;\r\n }\r\n });\r\n }\r\n } catch { }\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - change: login, refresh and logout run through MobileOidcService - the same OpenID Connect flow\r\n// as Keycloak; the endpoints come from the issuer's discovery document instead of login.mobile.\r\n// The logout follows login.required: a project with an optional login (luv2shop) restarts on its\r\n// start page, signed out\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: Okta sign-in on the devices with a refresh token. The login asks for offline_access, the\r\n// tokens (access, refresh, id) are kept with the user, an expired access token is renewed with\r\n// the refresh token (grant_type=refresh_token, public client with PKCE - no secret) and the\r\n// logout revokes the refresh token. Before, only the access token was kept: after its lifetime\r\n// (1 hour in luv2shop) the backend calls failed until the user signed in again\r\n// - new: signOut ends the sign-in without a browser window: refresh and access token are revoked\r\n// and the next login asks Okta for the password again (prompt=login). The logout page in the\r\n// in-app browser stayed white after its redirect to the app scheme and did not close\r\nimport { Injectable } from '@angular/core';\r\nimport { UtilityService } from './utility.service';\r\nimport { MobileOidcService, OidcProvider, OidcRefresh, OidcTokens } from './mobile-oidc.service';\r\n\r\nexport type MobileOktaTokens = OidcTokens;\r\nexport type MobileOktaRefresh = OidcRefresh;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MobileOktaService {\r\n\r\n constructor(private utilityService: UtilityService, private oidc: MobileOidcService) { }\r\n\r\n /**\r\n * The Okta authorization server as an OIDC provider, from login.mobile of the project. The issuer\r\n * is login.mobile.issuer, else login.web.issuer, else derived from the authorize URL\r\n * (https://…/oauth2/default/v1/authorize → https://…/oauth2/default).\r\n */\r\n provider(environment: any): OidcProvider {\r\n const mobile = environment?.login?.mobile ?? {};\r\n const issuer = mobile.issuer\r\n || environment?.login?.web?.issuer\r\n || String(mobile.authorizationBaseUrl ?? '').replace(/\\/v1\\/authorize.*$/, '');\r\n\r\n return {\r\n issuer,\r\n clientId: mobile.clientId,\r\n redirectUri: mobile.redirectUrl,\r\n scope: mobile.scope,\r\n // Always: the refresh token keeps the sign-in beyond the access token's lifetime.\r\n offlineAccess: true\r\n };\r\n }\r\n\r\n login(environment: any): Promise<MobileOktaTokens | null> {\r\n return this.oidc.login(this.provider(environment));\r\n }\r\n\r\n refreshTokens(environment: any, stored: MobileOktaTokens | any): Promise<MobileOktaRefresh> {\r\n return this.oidc.refresh(this.provider(environment), stored);\r\n }\r\n\r\n /**\r\n * Logout with the shared flow. login.required decides where the restarted app goes: true → the\r\n * loader until the sign-in opens, otherwise (default for Okta) the start page, signed out.\r\n */\r\n signOut(environment: any, stored: MobileOktaTokens | any): Promise<void> {\r\n return this.oidc.signOut(this.provider(environment), stored, 'loginedUser',\r\n key => this.utilityService.removeLocalStorage(key),\r\n { loginRequired: environment?.login?.required === true });\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: letter layouts per language and a symbol page for the custom keyboards. The keyboard had\r\n// one hard-wired QWERTY without umlauts or punctuation, so German text such as a comment could\r\n// not be typed. A project can bring its own layout in its language file (keyboardLayout)\r\n\r\n/** Rows of letter keys, lowercase; the keyboard derives the uppercase form itself. */\r\nexport type KeyboardLetterRows = string[][];\r\n\r\nconst LETTER_LAYOUTS: Record<string, KeyboardLetterRows> = {\r\n en: [\r\n ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'],\r\n ['z', 'x', 'c', 'v', 'b', 'n', 'm']\r\n ],\r\n de: [\r\n ['q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p', 'ü'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'ö', 'ä'],\r\n ['y', 'x', 'c', 'v', 'b', 'n', 'm', 'ß']\r\n ],\r\n fr: [\r\n ['a', 'z', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['q', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm'],\r\n ['w', 'x', 'c', 'v', 'b', 'n', 'é', 'è', 'à', 'ç']\r\n ],\r\n es: [\r\n ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'ñ'],\r\n ['z', 'x', 'c', 'v', 'b', 'n', 'm', 'á', 'é', 'ó']\r\n ],\r\n it: [\r\n ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'à'],\r\n ['z', 'x', 'c', 'v', 'b', 'n', 'm', 'è', 'ò', 'ù']\r\n ]\r\n};\r\n\r\nexport const DIGIT_ROW = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];\r\n\r\n/** Second page behind the ?123 key: everything a free text needs besides letters. */\r\nexport const SYMBOL_ROWS: string[][] = [\r\n DIGIT_ROW,\r\n ['-', '/', ':', ';', '(', ')', '€', '&', '@', '\"'],\r\n ['.', ',', '?', '!', \"'\", '#', '%', '+', '=', '_'],\r\n ['*', '$', '§', '°', '<', '>', '[', ']', '\\\\', '~']\r\n];\r\n\r\n/**\r\n * Letter rows for a language. A layout the project defines wins: its language file may carry\r\n * keyboardLayout as rows of keys, either arrays or strings (\"qwertzuiopü\").\r\n */\r\nexport function getLetterRows(\r\n languageCode: string | null | undefined,\r\n projectLayout?: unknown\r\n): KeyboardLetterRows {\r\n const fromProject = normalizeProjectLayout(projectLayout);\r\n\r\n if (fromProject) {\r\n return fromProject;\r\n }\r\n\r\n const code = (languageCode ?? '').toLowerCase().split(/[-_]/)[0];\r\n\r\n return LETTER_LAYOUTS[code] ?? LETTER_LAYOUTS['en'];\r\n}\r\n\r\nfunction normalizeProjectLayout(\r\n layout: unknown\r\n): KeyboardLetterRows | null {\r\n if (!Array.isArray(layout) || layout.length === 0) {\r\n return null;\r\n }\r\n\r\n const rows = layout\r\n .map(row =>\r\n typeof row === 'string'\r\n ? Array.from(row)\r\n : Array.isArray(row)\r\n ? row.filter(key => typeof key === 'string' && key.length > 0)\r\n : []\r\n )\r\n .map(row => row.map(key => key.toLowerCase()))\r\n .filter(row => row.length > 0);\r\n\r\n return rows.length > 0 ? rows : null;\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: capitals as on the iOS keyboard - on for the first letter of an empty field, off after\r\n// one letter; shift capitalises the next letter only. The keyboard stayed in capitals\r\n// - change: the space key has no label (see the template)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: the letter rows follow the project language (QWERTZ with ä ö ü ß for German) instead\r\n// of one fixed QWERTY; the language comes from the project's language selection\r\n// - new: a ?123 page with digits and punctuation for string fields, so a comment can hold\r\n// \"Termin 14:30, Raum 2-B.\" - before only A-Z, 0-9 and space could be entered\r\n\r\nimport {\r\n Component,\r\n DestroyRef,\r\n effect,\r\n inject,\r\n signal\r\n} from '@angular/core';\r\n\r\nimport {\r\n takeUntilDestroyed\r\n} from '@angular/core/rxjs-interop';\r\n\r\nimport {\r\n CustomKeyboardService\r\n} from './custom-keyboard.service';\r\n\r\nimport {\r\n CustomKeyboardType\r\n} from './custom-keyboard.types';\r\n\r\nimport {\r\n DIGIT_ROW,\r\n SYMBOL_ROWS,\r\n getLetterRows\r\n} from './custom-keyboard.layouts';\r\n\r\nimport {\r\n UtilityService\r\n} from '../../services/utility.service';\r\n\r\n@Component({\r\n selector: 'vl-custom-keyboard',\r\n standalone: true,\r\n templateUrl: './custom-keyboard.component.html',\r\n styleUrl: './custom-keyboard.component.css'\r\n})\r\nexport class CustomKeyboardComponent {\r\n readonly keyboard =\r\n inject(CustomKeyboardService);\r\n\r\n /** Capital letters: on for the first letter of an empty field, then off - as on iOS. */\r\n readonly uppercase = signal(true);\r\n\r\n /** true while the ?123 page is shown instead of the letters. */\r\n readonly symbols = signal(false);\r\n\r\n private readonly languageCode = signal<string | null>(null);\r\n private readonly projectLayout = signal<unknown>(null);\r\n\r\n constructor() {\r\n // A field opens with capitals only when it is still empty (start of the text).\r\n effect(() => {\r\n const target = this.keyboard.activeSession()?.target as HTMLInputElement | undefined;\r\n\r\n this.uppercase.set(!target?.value);\r\n });\r\n\r\n inject(UtilityService)\r\n .currentProjectlanguage$\r\n .pipe(takeUntilDestroyed(inject(DestroyRef)))\r\n .subscribe((uiLang: any) => {\r\n if (!uiLang) {\r\n return;\r\n }\r\n\r\n this.languageCode.set(uiLang.languageCode ?? null);\r\n this.projectLayout.set(uiLang.selectedLanguage?.keyboardLayout ?? null);\r\n });\r\n }\r\n\r\n get keyboardType():\r\n CustomKeyboardType | null {\r\n return (\r\n this.keyboard.activeSession()?.type ??\r\n null\r\n );\r\n }\r\n\r\n /** The symbol page exists where free text is typed. */\r\n get hasSymbolPage(): boolean {\r\n return this.keyboardType === 'string';\r\n }\r\n\r\n get rows(): string[][] {\r\n const type = this.keyboardType;\r\n\r\n if (!type) {\r\n return [];\r\n }\r\n\r\n if (type === 'numeric') {\r\n return [\r\n ['1', '2', '3'],\r\n ['4', '5', '6'],\r\n ['7', '8', '9'],\r\n ['-', '0', '.']\r\n ];\r\n }\r\n\r\n if (\r\n type === 'date' ||\r\n type === 'time'\r\n ) {\r\n return [\r\n ['1', '2', '3'],\r\n ['4', '5', '6'],\r\n ['7', '8', '9'],\r\n ['0']\r\n ];\r\n }\r\n\r\n if (type === 'email') {\r\n return [\r\n DIGIT_ROW,\r\n ...getLetterRows('en'),\r\n ['@', '.', '_', '-', '+']\r\n ];\r\n }\r\n\r\n if (this.hasSymbolPage && this.symbols()) {\r\n return SYMBOL_ROWS;\r\n }\r\n\r\n const letterRows =\r\n getLetterRows(this.languageCode(), this.projectLayout())\r\n .map(row =>\r\n row.map(character =>\r\n this.uppercase()\r\n ? this.toUpper(character)\r\n : character\r\n )\r\n );\r\n\r\n if (type === 'string') {\r\n return [\r\n DIGIT_ROW,\r\n ...letterRows\r\n ];\r\n }\r\n\r\n return letterRows;\r\n }\r\n\r\n /** ß has no single-letter capital in common use (\"SS\"), so it keeps its form. */\r\n private toUpper(character: string): string {\r\n const upper = character.toLocaleUpperCase(this.languageCode() ?? undefined);\r\n\r\n return upper.length === 1 ? upper : character;\r\n }\r\n\r\n enterKey(key: string): void {\r\n this.keyboard.insert(key);\r\n\r\n // Shift applies to one letter, like the iOS keyboard.\r\n if (this.uppercase() && /\\p{L}/u.test(key)) {\r\n this.uppercase.set(false);\r\n }\r\n }\r\n\r\n enterSpace(): void {\r\n this.keyboard.insert(' ');\r\n }\r\n\r\n toggleCase(): void {\r\n this.uppercase.update(\r\n value => !value\r\n );\r\n }\r\n\r\n toggleSymbols(): void {\r\n this.symbols.update(\r\n value => !value\r\n );\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n </div>\r\n</section>\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - new: exports MobileOidcService (one OpenID Connect flow for Keycloak and Okta on the devices)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: exports native-platform (isNativeMobile/isNativePhone), PlaceholderPipe,\r\n// RequestTimeoutService and RemoteListService\r\n// - new: exports MobileOktaService (Okta sign-in on the devices with refresh token)\r\n/*\r\n * Public API Surface of view-toolkit\r\n */\r\n\r\nexport * from './lib/view-toolkit.module';\r\n\r\n// container\r\nexport * from './lib/containers/card/card.component';\r\nexport * from './lib/containers/form/form.component';\r\nexport * from './lib/containers/grid/grid.component';\r\nexport * from './lib/containers/header-menu/header-menu.component';\r\nexport * from './lib/containers/logs/logs.component';\r\nexport * from './lib/containers/model/model.component';\r\nexport * from './lib/containers/pagination/pagination.component';\r\nexport * from './lib/containers/side-menu/side-menu.component';\r\n\r\n// services\r\nexport * from './lib/services/app-version-reset.service';\r\nexport * from './lib/services/config.service';\r\nexport * from './lib/services/couchdb';\r\nexport * from './lib/services/mobile-keycloak.service';\r\nexport * from './lib/services/mobile-okta.service';\r\nexport * from './lib/services/mobile-oidc.service';\r\nexport * from './lib/services/native-platform';\r\nexport * from './lib/services/network-log.service';\r\nexport * from './lib/services/notification.service';\r\nexport * from './lib/services/request.service';\r\nexport * from './lib/services/utility.service';\r\n\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.component';\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.directive';\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.service';\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.types';\r\nexport * from './lib/pipes/placeholder.pipe';\r\nexport * from './lib/services/request-timeout.service';\r\nexport * from './lib/services/remote-list.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","String","i1.CustomKeyboardService","i1","i2.RequestService","i1.NotificationService","i1.UtilityService","i1.Couchdb","i2.UtilityService","i3","i4.ConfigService","i6.NotificationService","i8.RequestService","i9","i10","i16","StringComponent","i5","i1.RequestService","i3.NotificationService","i4","i6","i7","i8","i11","i12","i13","i14","i3.UtilityService","i4.Couchdb","i1.NetworkLogService","Date","i1.ConfigService","i5.MobileOidcService","i2.MobileKeycloakService","i3.Couchdb","i6.RequestService","i7.UtilityService","i9.NotificationService","i15","i2.MobileOidcService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAIA;SACgB,cAAc,GAAA;AAC1B,IAAA,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAE;AAExC,IAAA,OAAO,SAAS,CAAC,gBAAgB,EAAE,KAAK,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,SAAS,CAAC;AACzF;AAEA;;;AAGG;SACa,aAAa,GAAA;IACzB,OAAO,cAAc,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG;AACxF;;ACtBA;AACA;AACA;AACA;MA+Ba,mBAAmB,CAAA;AAqBpB,IAAA,QAAA;AApBD,IAAA,QAAQ,GAAQ;AACvB,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,IAAI,EAAE;KACP;AAEQ,IAAA,QAAQ;IACR,WAAW,GAAW,CAAC;IACvB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AA,EAAA,07FAAA,EAAA,MAAA,EAAA,CAAA,mxQAAA,CAAA,EAAA;;;AE1CpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEG;;ACRH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yomotech-view-toolkit.mjs","sources":["../../../projects/view-toolkit/src/lib/services/native-platform.ts","../../../projects/view-toolkit/src/lib/containers/pagination/pagination.component.ts","../../../projects/view-toolkit/src/lib/containers/pagination/pagination.component.html","../../../projects/view-toolkit/src/lib/components/string/string.ts","../../../projects/view-toolkit/src/lib/components/string/string.html","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.types.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/toolkit-keyboard-mode.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.service.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.directive.ts","../../../projects/view-toolkit/src/lib/services/backend-url.ts","../../../projects/view-toolkit/src/lib/services/request.service.ts","../../../projects/view-toolkit/src/lib/services/utility.service.ts","../../../projects/view-toolkit/src/lib/services/calendar-locale.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/date-time-picker.service.ts","../../../projects/view-toolkit/src/lib/pipes/placeholder.pipe.ts","../../../projects/view-toolkit/src/lib/services/notification.service.ts","../../../projects/view-toolkit/src/lib/services/request-timeout.service.ts","../../../projects/view-toolkit/src/lib/services/remote-list.service.ts","../../../projects/view-toolkit/src/lib/services/couchdb.ts","../../../projects/view-toolkit/src/lib/services/config.service.ts","../../../projects/view-toolkit/src/lib/containers/card/card.component.ts","../../../projects/view-toolkit/src/lib/containers/card/card.component.html","../../../projects/view-toolkit/src/lib/components/label/label.ts","../../../projects/view-toolkit/src/lib/components/label/label.html","../../../projects/view-toolkit/src/lib/pipes/media-source.pipe.ts","../../../projects/view-toolkit/src/lib/containers/form/form.component.ts","../../../projects/view-toolkit/src/lib/containers/form/form.component.html","../../../projects/view-toolkit/src/lib/containers/grid/grid.component.ts","../../../projects/view-toolkit/src/lib/containers/grid/grid.component.html","../../../projects/view-toolkit/src/lib/containers/header-menu/header-menu.component.ts","../../../projects/view-toolkit/src/lib/containers/header-menu/header-menu.component.html","../../../projects/view-toolkit/src/lib/services/network-log.service.ts","../../../projects/view-toolkit/src/lib/containers/logs/logs.component.ts","../../../projects/view-toolkit/src/lib/containers/logs/logs.component.html","../../../projects/view-toolkit/src/lib/components/textbox/textbox.ts","../../../projects/view-toolkit/src/lib/components/textbox/textbox.html","../../../projects/view-toolkit/src/lib/containers/model/model.component.ts","../../../projects/view-toolkit/src/lib/containers/model/model.component.html","../../../projects/view-toolkit/src/lib/components/autocomplete/autocomplete.ts","../../../projects/view-toolkit/src/lib/components/autocomplete/autocomplete.html","../../../projects/view-toolkit/src/lib/components/button/button.ts","../../../projects/view-toolkit/src/lib/components/button/button.html","../../../projects/view-toolkit/src/lib/components/date/date.ts","../../../projects/view-toolkit/src/lib/components/date/date.html","../../../projects/view-toolkit/src/lib/components/dropdown/dropdown.ts","../../../projects/view-toolkit/src/lib/components/dropdown/dropdown.html","../../../projects/view-toolkit/src/lib/components/error-message/error-message.ts","../../../projects/view-toolkit/src/lib/components/error-message/error-message.html","../../../projects/view-toolkit/src/lib/components/time/time.ts","../../../projects/view-toolkit/src/lib/components/time/time.html","../../../projects/view-toolkit/src/lib/services/mobile-oidc.service.ts","../../../projects/view-toolkit/src/lib/services/mobile-keycloak.service.ts","../../../projects/view-toolkit/src/lib/containers/side-menu/side-menu.component.ts","../../../projects/view-toolkit/src/lib/containers/side-menu/side-menu.component.html","../../../projects/view-toolkit/src/lib/view-toolkit.module.ts","../../../projects/view-toolkit/src/lib/app-version.ts","../../../projects/view-toolkit/src/lib/services/app-version-reset.service.ts","../../../projects/view-toolkit/src/lib/services/mobile-okta.service.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.layouts.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.component.ts","../../../projects/view-toolkit/src/lib/components/custom-keyboard/custom-keyboard.component.html","../../../projects/view-toolkit/src/public-api.ts","../../../projects/view-toolkit/src/yomotech-view-toolkit.ts"],"sourcesContent":["// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - new: isNativeMobile(), the one answer to \"is this the app on iOS or Android\". The runtime asked\r\n// Angular CDK's Platform (platform.IOS / platform.ANDROID), which reads the browser's user agent;\r\n// an iPad has reported itself as a Mac there since iPadOS 13, so on the iPad the app behaved like\r\n// the web version - it signed in through the web flow (Keycloak: \"Invalid parameter:\r\n// redirect_uri\"). Capacitor knows the platform the app runs on.\r\n\r\nimport { Capacitor } from '@capacitor/core';\r\n\r\n/** True in the native app on iOS (iPhone and iPad) and Android; false in a browser. */\r\nexport function isNativeMobile(): boolean {\r\n const platform = Capacitor.getPlatform();\r\n\r\n return Capacitor.isNativePlatform() && (platform === 'ios' || platform === 'android');\r\n}\r\n\r\n/**\r\n * True in the native app on a phone - upright and in landscape alike (its shorter screen side is\r\n * below 600pt). Tablets get the tablet and desktop styles by width.\r\n */\r\nexport function isNativePhone(): boolean {\r\n return isNativeMobile() && Math.min(window.screen.width, window.screen.height) < 600;\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\nimport {\r\n Platform,\r\n PlatformModule\r\n} from '@angular/cdk/platform';\r\n\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport {\r\n Component,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n Output\r\n} from '@angular/core';\r\n\r\nimport { FormsModule } from '@angular/forms';\r\nimport { isNativeMobile } from '../../services/native-platform';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'vl-pagination',\r\n templateUrl: './pagination.component.html',\r\n styleUrl: './pagination.component.css',\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n PlatformModule\r\n ]\r\n})\r\nexport class PaginationComponent implements OnInit {\r\n @Input() itemInfo: any = {\r\n layoutSchema: {},\r\n propertySchema: {},\r\n data: []\r\n };\r\n\r\n @Input() pageSize: any;\r\n @Input() currentPage: number = 0;\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() pages: number[] = [];\r\n\r\n @Output() pageSizeChange =\r\n new EventEmitter<any>();\r\n\r\n @Output() onGoToPage =\r\n new EventEmitter<any>();\r\n\r\n isMobile: boolean = false;\r\n\r\n constructor(\r\n private platform: Platform\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.updateDeviceMode();\r\n }\r\n\r\n @HostListener('window:resize')\r\n onWindowResize(): void {\r\n this.updateDeviceMode();\r\n }\r\n\r\n private updateDeviceMode(): void {\r\n const isNativeApp =\r\n isNativeMobile();\r\n\r\n const isSmallScreen =\r\n typeof window !== 'undefined' &&\r\n window.innerWidth <= 768;\r\n\r\n this.isMobile =\r\n isNativeApp || isSmallScreen;\r\n }\r\n\r\n get isFirstPage(): boolean {\r\n return (\r\n !this.pages?.length ||\r\n this.currentPage <= 0\r\n );\r\n }\r\n\r\n get isLastPage(): boolean {\r\n return (\r\n !this.pages?.length ||\r\n this.currentPage >=\r\n this.pages.length - 1\r\n );\r\n }\r\n\r\n /*\r\n * Desktop returns the original schema style unchanged.\r\n * Mobile overrides only the layout direction.\r\n */\r\n get paginationStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.style\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n display: 'flex',\r\n 'flex-direction': 'column',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n gap: '8px',\r\n width: '100%',\r\n padding: '8px',\r\n overflow: 'hidden',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n get listStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.listStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n display: 'flex',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n 'flex-wrap': 'nowrap',\r\n gap: '4px',\r\n width: '100%',\r\n margin: '0',\r\n padding: '0',\r\n overflow: 'hidden',\r\n 'list-style': 'none',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n get sizeControlStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.sizeControlStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n display: 'flex',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n gap: '8px',\r\n width: '100%',\r\n 'min-width': '0',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n getPaginationCaption(){\r\n let caption = this.itemInfo?.layoutSchema?.pagination?.caption;\r\n if(caption && this.selectedLanguageInfo && this.selectedLanguageInfo.selectedLanguage && this.selectedLanguageInfo.selectedLanguage[caption]){\r\n caption = this.selectedLanguageInfo.selectedLanguage[caption];\r\n }\r\n return caption;\r\n }\r\n\r\n get labelStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.labelStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n 'white-space': 'nowrap',\r\n 'font-size': baseStyle['font-size'] || '13px'\r\n };\r\n }\r\n\r\n get selectStyle(): Record<string, any> {\r\n const baseStyle = this.getStyle(\r\n this.itemInfo?.layoutSchema\r\n ?.pagination?.selectStyle\r\n );\r\n\r\n if (!this.isMobile) {\r\n return baseStyle;\r\n }\r\n\r\n return {\r\n ...baseStyle,\r\n width: '68px',\r\n 'min-width': '68px',\r\n 'max-width': '68px'\r\n };\r\n }\r\n\r\n get pageSummaryStyle(): Record<string, any> {\r\n const pagination =\r\n this.itemInfo?.layoutSchema\r\n ?.pagination || {};\r\n\r\n const baseStyle = this.getStyle(\r\n pagination.itemStyle\r\n );\r\n\r\n const activeStyle = this.getStyle(\r\n pagination.activeItemStyle\r\n );\r\n\r\n return {\r\n ...baseStyle,\r\n ...activeStyle,\r\n width: '64px',\r\n 'min-width': '64px',\r\n height: '32px',\r\n padding: '0 6px',\r\n cursor: 'default',\r\n 'pointer-events': 'none',\r\n 'white-space': 'nowrap',\r\n 'box-sizing': 'border-box'\r\n };\r\n }\r\n\r\n getStyle(\r\n styleObject: any\r\n ): Record<string, any> {\r\n if (\r\n !styleObject ||\r\n typeof styleObject !== 'object'\r\n ) {\r\n return {};\r\n }\r\n\r\n const {\r\n classes,\r\n ...styleWithoutClasses\r\n } = styleObject;\r\n\r\n return styleWithoutClasses;\r\n }\r\n\r\n getPageItemStyle(\r\n page?: number,\r\n disabled: boolean = false\r\n ): Record<string, any> {\r\n const pagination =\r\n this.itemInfo?.layoutSchema\r\n ?.pagination || {};\r\n\r\n const baseStyle = this.getStyle(\r\n pagination.itemStyle\r\n );\r\n\r\n const activeStyle =\r\n page !== undefined &&\r\n this.currentPage === page\r\n ? this.getStyle(\r\n pagination.activeItemStyle\r\n )\r\n : {};\r\n\r\n const disabledStyle = disabled\r\n ? this.getStyle(\r\n pagination.disabledItemStyle\r\n )\r\n : {};\r\n\r\n /*\r\n * Desktop gets no additional styling.\r\n */\r\n const mobileStyle = this.isMobile\r\n ? {\r\n width: '32px',\r\n 'min-width': '32px',\r\n height: '32px',\r\n padding: '0'\r\n }\r\n : {};\r\n\r\n return {\r\n ...baseStyle,\r\n ...activeStyle,\r\n ...disabledStyle,\r\n ...mobileStyle,\r\n 'pointer-events': disabled\r\n ? 'none'\r\n : 'auto'\r\n };\r\n }\r\n\r\n invokeOnPageSizeChange(\r\n pageSize: any\r\n ): void {\r\n const normalizedPageSize =\r\n Number(pageSize);\r\n\r\n if (\r\n !Number.isFinite(\r\n normalizedPageSize\r\n ) ||\r\n normalizedPageSize <= 0\r\n ) {\r\n return;\r\n }\r\n\r\n this.pageSizeChange.emit(\r\n normalizedPageSize\r\n );\r\n }\r\n\r\n invokeGoToPage(page: number): void {\r\n if (\r\n page < 0 ||\r\n page > this.pages.length - 1 ||\r\n page === this.currentPage\r\n ) {\r\n return;\r\n }\r\n\r\n this.onGoToPage.emit(page);\r\n }\r\n}","<div [ngStyle]=\"paginationStyle\">\r\n\r\n <ul [ngStyle]=\"listStyle\" [style.z-index]=\"'auto'\">\r\n\r\n <!-- Existing desktop pagination: unchanged -->\r\n <ng-container *ngIf=\"!isMobile\">\r\n\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n ««\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, currentPage === 0)\">\r\n «\r\n </li>\r\n\r\n <li *ngFor=\"let page of pages\" (click)=\"invokeGoToPage(page)\" [ngStyle]=\"getPageItemStyle(page)\">\r\n {{ page + 1 }}\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\r\n »\r\n </li>\r\n\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"\r\n getPageItemStyle(\r\n undefined,\r\n currentPage === pages.length - 1\r\n )\r\n \">\r\n »»\r\n </li>\r\n\r\n </ng-container>\r\n\r\n <!-- Compact mobile pagination -->\r\n <ng-container *ngIf=\"isMobile\">\r\n\r\n <!-- First -->\r\n <li (click)=\"invokeGoToPage(0)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\">\r\n ««\r\n </li>\r\n\r\n <!-- Previous -->\r\n <li (click)=\"invokeGoToPage(currentPage - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isFirstPage)\">\r\n «\r\n </li>\r\n\r\n <!-- Current page / total pages -->\r\n <li [ngStyle]=\"pageSummaryStyle\">\r\n {{ currentPage + 1 }} / {{ pages.length }}\r\n </li>\r\n\r\n <!-- Next -->\r\n <li (click)=\"invokeGoToPage(currentPage + 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\">\r\n »\r\n </li>\r\n\r\n <!-- Last -->\r\n <li (click)=\"invokeGoToPage(pages.length - 1)\" [ngStyle]=\"getPageItemStyle(undefined, isLastPage)\">\r\n »»\r\n </li>\r\n\r\n </ng-container>\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"itemInfo?.layoutSchema?.pagination?.pageSize\" [ngStyle]=\"sizeControlStyle\">\r\n <label for=\"pageSize\" [ngStyle]=\"labelStyle\">\r\n {{ getPaginationCaption() }}\r\n </label>\r\n\r\n <select id=\"pageSize\" [(ngModel)]=\"pageSize\" (change)=\"invokeOnPageSizeChange(pageSize)\"\r\n [ngStyle]=\"selectStyle\">\r\n <option *ngFor=\"\r\n let size of\r\n itemInfo?.layoutSchema\r\n ?.pagination?.pageSizeOptions ||\r\n [5, 10, 15, 20]\r\n \" [value]=\"size\">\r\n {{ size }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n</div>","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-string',\r\n standalone: true,\r\n templateUrl: './string.html',\r\n styleUrl: './string.css',\r\n})\r\nexport class String {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n}\r\n","<h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n</h5>","// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: resolveCustomKeyboardType. The keyboards were only switched on by option.keyboardType,\r\n// which no layout schema sets, so on the devices every field got the system keyboard and the\r\n// toolkit keyboards never appeared. The type of the attribute now selects the keyboard;\r\n// option.keyboardType still wins, and 'native' or 'none' keeps the system keyboard for a field\r\n\r\nexport type CustomKeyboardType =\r\n | 'email'\r\n | 'numeric'\r\n | 'alpha'\r\n | 'string'\r\n | 'date'\r\n | 'time';\r\n\r\nexport function normalizeCustomKeyboardType(\r\n value: unknown\r\n): CustomKeyboardType | null {\r\n if (\r\n value === 'email' ||\r\n value === 'numeric' ||\r\n value === 'alpha' ||\r\n value === 'string' ||\r\n value === 'date' ||\r\n value === 'time'\r\n ) {\r\n return value;\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Keyboard for a field: option.keyboardType when the layout sets one, otherwise derived from the\r\n * attribute (property schema) type. Returns null where the system keyboard stays in charge.\r\n */\r\nexport function resolveCustomKeyboardType(\r\n option: any,\r\n property: any\r\n): CustomKeyboardType | null {\r\n const explicit = option?.keyboardType;\r\n\r\n if (explicit === 'native' || explicit === 'none') {\r\n return null;\r\n }\r\n\r\n const normalized = normalizeCustomKeyboardType(explicit);\r\n\r\n if (normalized) {\r\n return normalized;\r\n }\r\n\r\n if (option?.password) {\r\n return null;\r\n }\r\n\r\n if (option?.email || property?.format === 'email') {\r\n return 'email';\r\n }\r\n\r\n switch (property?.type) {\r\n case 'date':\r\n return 'date';\r\n case 'time':\r\n return 'time';\r\n case 'number':\r\n case 'integer':\r\n return 'numeric';\r\n case 'string':\r\n case 'autocomplete':\r\n return 'string';\r\n default:\r\n return null;\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-16\r\n// - new: the toolkit keyboards (and the docked date picker) can be switched on in a browser. They\r\n// belong to the app on iOS/Android; the Designer's preview shows the web build and, with \"Mobile\"\r\n// or \"Tablet\" chosen, asks for them so the preview behaves like the app. Native-only calls\r\n// (Capacitor Keyboard plugin) stay tied to the real device. A mouse there acts like a finger\r\n// (treatMouseAsTouch), otherwise the first click lost the keyboard\r\n\r\nimport { Capacitor } from '@capacitor/core';\r\n\r\nlet onWeb = false;\r\n\r\n/** The app on an iOS/Android device. */\r\nfunction nativeDevice(): boolean {\r\n return Capacitor.isNativePlatform() && (Capacitor.getPlatform() === 'ios' || Capacitor.getPlatform() === 'android');\r\n}\r\n\r\n/** Turns the toolkit keyboards on or off in a browser (the Designer's preview, Mobile/Tablet). */\r\nexport function setToolkitKeyboardOnWeb(on: boolean): void {\r\n onWeb = on;\r\n if (on && !nativeDevice()) {\r\n treatMouseAsTouch();\r\n }\r\n}\r\n\r\nlet mouseHooked = false;\r\n\r\n/**\r\n * In the browser a mouse click sends mousedown after the pointerdown, and its default action moves\r\n * the focus: the toolkit keyboard of a field closed again, only a second click kept it. With the\r\n * toolkit keyboards on in a browser, a mousedown on a field, a picker icon or the keyboard keeps the\r\n * focus where the keyboard put it - as a finger on the device does.\r\n */\r\nfunction treatMouseAsTouch(): void {\r\n if (mouseHooked || typeof document === 'undefined') return;\r\n mouseHooked = true;\r\n document.addEventListener('mousedown', event => {\r\n if (!onWeb) return;\r\n const target = event.target as HTMLElement | null;\r\n if (target?.closest?.('input, textarea, .picker-field__icon, .custom-keyboard')) {\r\n event.preventDefault();\r\n // A finger focuses the field it touches, and only that focus brings the keyboard when a\r\n // calendar was open; preventDefault took it from the mouse - so focus the field here.\r\n if ((target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) && document.activeElement !== target) {\r\n window.setTimeout(() => target.focus({ preventScroll: true }));\r\n }\r\n }\r\n }, true);\r\n}\r\n\r\n/** Whether fields get the toolkit keyboards: on the devices always, in a browser when switched on. */\r\nexport function toolkitKeyboardActive(): boolean {\r\n return nativeDevice() || onWeb;\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-16\r\n// - change: the keyboard opens - and docks at the side in landscape - where toolkitKeyboardActive()\r\n// says so (also in the Designer preview)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: keyboard and calendar take the background colour of the page behind them\r\n// (--vl-page-background; a project may set --vl-keyboard-background instead)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: scrolling the dialog with the toolkit keyboard open brought up the iOS keyboard. The press\r\n// that starts a swipe closed the toolkit keyboard and gave the field its inputmode back while it\r\n// still had the focus. Now only a tap closes it, and inputmode=\"none\" stays until the field has\r\n// lost the focus\r\n// - change: in landscape keyboard and calendar dock at the right edge on every device - phone and\r\n// tablet, in a dialog and on a page without one (e.g. \"Booked Time Recording\"); on the iPad and on\r\n// pages they came at the bottom over the full width. Dialog or page stand left of the panel\r\n// (app styles, vl-side-dock / vl-side-layout)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: string accepts every printable character and alpha every letter of any language. The\r\n// old A-Z rules rejected ä, ö, ü, ß and all punctuation the new layouts offer\r\n// - new: reserveBottomArea / releaseBottomArea. A date or time picker docked at the bottom takes\r\n// the place of the keyboard, and the dialog has to end above it exactly as it does above the\r\n// keyboard, otherwise the lower fields and the save button lie underneath\r\n// - change: the keyboard starts with its last measured height instead of the 360 px CSS fallback\r\n// - change: switching between keyboard and picker - either way - keeps the bottom area reserved, so the dialog\r\n// no longer jumps up and down in between\r\n// - change: on iOS the active field is no longer set readonly, only inputmode=\"none\"; iOS draws no\r\n// cursor in a readonly field, so tapping into a date to change the month did nothing\r\n// - change: date and time are edited at the cursor - a digit overwrites the one right of it,\r\n// Backspace at the end removes a digit and inside the value steps one digit back; before,\r\n// both only worked at the end\r\n// - change: every typed key sends keydown before input, as a real keyboard does. PrimeNG DatePicker\r\n// ignores input without it, so dates typed on the toolkit keyboard were lost\r\n// - change: open() clears a stale \"picker open\" flag when no picker panel is left in the page\r\n// - change: endPickerOverlay can skip the 250 ms reopen pause. When the user closes a picker by\r\n// tapping into its field, that tap must open the keyboard, not be swallowed as a focus bounce\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-09\r\n// - fix: the tapped field now always stands fully above the keyboard. In a dialog scrolled while\r\n// the calendar was open, a time field tapped near its lower edge stayed three quarters hidden\r\n// under the keyboard that replaced the calendar. It moves only once the tap is complete: the\r\n// keyboard opens on touch-down, and scrolling before the finger lifted sent the click past the\r\n// field, which lost its focus and its green frame\r\n// - fix: a field near the bottom lost its focus and green frame: the keyboard opens on touch-down\r\n// right under the finger, and the click of the same tap landed on the keyboard. Once the tap is\r\n// complete the field gets its focus back\r\n// - fix: tapping a text field while the time or date picker was open brought up the system\r\n// keyboard. The toolkit keyboard refused to open while a picker was open, the picker closed only\r\n// afterwards. A tap into a field outside the picker now closes the picker first\r\n// - fix: turning the device with the keyboard open kept the portrait keyboard height reserved; in\r\n// landscape only a 20 px strip of the dialog was left. The height is measured again on resize\r\n// - new: side dock. Where a panel docked at the bottom would leave less than about two fields of\r\n// the dialog visible and there is room beside it - a phone in landscape - the keyboard and the\r\n// calendar both dock at the right edge over the full height, the dialog stands beside them.\r\n// Decided from the space at hand (dockAtSide), the same for keyboard and calendar, so switching\r\n// between them never moves the dialog. Switching from one field to the next keeps the dock\r\n// - fix: a tap outside closes the keyboard at once but frees its space only once the tap is\r\n// complete; freed at touch-down the dialog moved under the finger and the tap missed - the close\r\n// button of the dialog needed a second tap\r\n// - change: the panel lines up with the dialog - at the side with its upper and lower edge, at the\r\n// bottom with its left and right edge; the dialog keeps its own size. At the side the panel is\r\n// 320 px wide, the calendar's natural width, the dialog gets the rest - at half the screen the\r\n// calendar was wider than the dialog\r\n// - new: sideDockWidth() exported - the app keeps the dialog left of the side panels for as long\r\n// as it is open, so it no longer moves and flickers when a keyboard or the calendar comes or goes\r\n\r\nimport { Injectable, signal } from '@angular/core';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { Keyboard } from '@capacitor/keyboard';\r\nimport { CustomKeyboardType } from './custom-keyboard.types';\r\nimport { toolkitKeyboardActive } from './toolkit-keyboard-mode';\r\n\r\nexport type CustomKeyboardTarget =\r\n | HTMLInputElement\r\n | HTMLTextAreaElement;\r\n\r\ninterface CustomKeyboardSession {\r\n target: CustomKeyboardTarget;\r\n type: CustomKeyboardType;\r\n originalReadOnly: boolean;\r\n originalInputMode: string | null;\r\n originalInputType: string | null;\r\n}\r\n\r\n/** Set on body while keyboard or calendar stand at the right edge instead of the bottom. */\r\nexport const SIDE_DOCK_CLASS = 'vl-side-dock';\r\n/** Dialog content (about two fields) that has to stay visible above a panel docked at the bottom. */\r\nconst MIN_VISIBLE_CONTENT = 150;\r\n/** Width the dialog needs at least to stand beside a panel docked at the side. */\r\nconst MIN_DIALOG_WIDTH = 360;\r\n/** Width of keyboard and calendar at the side - the calendar's natural width. */\r\nconst SIDE_PANEL_WIDTH = 320;\r\n\r\n/**\r\n * Side or bottom, decided from the space at hand rather than a device or an orientation: docked at\r\n * the bottom, a panel (keyboard or calendar, up to about half the height) must leave about two of\r\n * the dialog's fields visible below its header. If it would not and the dialog still has room\r\n * beside a panel, the panels dock at the right edge - and the dialog stands left of them for as\r\n * long as it is open, so it never moves. Returns the width kept free at the right (panel plus its\r\n * distance to the screen edge), or null for the bottom. Also used by the app to place the dialog.\r\n */\r\nexport function sideDockWidth(): number | null {\r\n // on the devices and in the Designer preview with Mobile/Tablet (toolkitKeyboardActive)\r\n if (!toolkitKeyboardActive()) {\r\n return null;\r\n }\r\n\r\n const width = window.innerWidth;\r\n const height = window.innerHeight;\r\n const sideWidth = SIDE_PANEL_WIDTH + Math.max(8, safeAreaRight());\r\n const bottomPanel = Math.min(height * 0.52, 420);\r\n const dialog = document.querySelector<HTMLElement>('.p-dialog');\r\n const header = dialog?.querySelector<HTMLElement>('.p-dialog-header');\r\n const contentTop = dialog\r\n ? Math.max(dialog.getBoundingClientRect().top, 0) + (header?.getBoundingClientRect().height ?? 0)\r\n : 0;\r\n // In landscape the panels stand at the right edge - phone and tablet, dialog or page alike -\r\n // and dialog or page stand left of them. Upright they dock at the bottom, unless a dialog would\r\n // keep too little visible above them.\r\n const landscape = width > height;\r\n const tooLittleHeight = !!dialog && height - bottomPanel - contentTop < MIN_VISIBLE_CONTENT;\r\n const roomBeside = width - sideWidth >= MIN_DIALOG_WIDTH;\r\n\r\n return (landscape || tooLittleHeight) && roomBeside ? sideWidth : null;\r\n}\r\n\r\n/** The right safe-area inset in px; a custom property holds env() only as text. */\r\nfunction safeAreaRight(): number {\r\n const probe = document.createElement('div');\r\n probe.style.cssText = 'position:fixed;visibility:hidden;padding-right:env(safe-area-inset-right, 0px)';\r\n document.body.appendChild(probe);\r\n const inset = parseFloat(getComputedStyle(probe).paddingRight) || 0;\r\n probe.remove();\r\n return inset;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CustomKeyboardService {\r\n private openingSuspendedUntil = 0;\r\n private tapsTracked = false;\r\n private lastPointerDownAt = 0;\r\n private lastClickAt = 0;\r\n /** Set by DateTimePickerService: closes the open picker when another field is tapped. */\r\n private pickerCloser: (() => void) | null = null;\r\n /** Watches the dialog a side-docked panel lines up with. */\r\n private dialogObserver: { target: HTMLElement; observer: ResizeObserver } | null = null;\r\n\r\n constructor() {\r\n // From the start: the very first tap into a field has to be seen as well.\r\n this.trackTaps();\r\n\r\n // Turning the device changes the keyboard's height; the reserved area has to follow.\r\n window.addEventListener('resize', () => {\r\n if (this.activeSession()) {\r\n this.applyDock();\r\n this.updateKeyboardHeight();\r\n }\r\n });\r\n }\r\n private lastKeyboardHeight = 0;\r\n private pickerOverlayOpen = false;\r\n private pickerTriggerPressedUntil = 0;\r\n readonly interactionBlocked = signal(false);\r\n private interactionUnlockTimer: number | null = null;\r\n readonly activeSession =\r\n signal<CustomKeyboardSession | null>(null);\r\n\r\n isNativeMobile(): boolean {\r\n return (\r\n Capacitor.isNativePlatform() &&\r\n (\r\n Capacitor.getPlatform() === 'android' ||\r\n Capacitor.getPlatform() === 'ios'\r\n )\r\n );\r\n }\r\n\r\n async open(\r\n target: CustomKeyboardTarget,\r\n type: CustomKeyboardType\r\n ): Promise<void> {\r\n /*\r\n * A picker whose dialog was destroyed never reports its end. With no picker panel left in\r\n * the page the flag is stale; keeping it would block every keyboard from now on.\r\n */\r\n if (\r\n this.pickerOverlayOpen &&\r\n !document.querySelector('.model-datepicker-panel')\r\n ) {\r\n this.endPickerOverlay({ suspendReopen: false });\r\n }\r\n\r\n /*\r\n * A field outside the open picker was tapped: the picker gives way, otherwise this field\r\n * would get its focus without a toolkit keyboard - and with the system keyboard.\r\n */\r\n if (\r\n this.pickerOverlayOpen &&\r\n this.pickerCloser &&\r\n !target.closest('.model-datepicker-panel')\r\n ) {\r\n this.pickerCloser();\r\n }\r\n\r\n if (\r\n !toolkitKeyboardActive() ||\r\n target.disabled ||\r\n this.pickerOverlayOpen ||\r\n Date.now() < this.openingSuspendedUntil\r\n ) {\r\n return;\r\n }\r\n const currentSession = this.activeSession();\r\n\r\n if (currentSession?.target === target) {\r\n return;\r\n }\r\n\r\n if (currentSession) {\r\n // Switching fields: the dock stays where it is, otherwise the dialog flickered between\r\n // the side layout and the full width while the finger was still down.\r\n this.close({\r\n restoreAccessoryBar: false,\r\n keepBottomArea: true\r\n });\r\n }\r\n\r\n const originalInputType =\r\n target instanceof HTMLInputElement\r\n ? target.getAttribute('type')\r\n : null;\r\n\r\n const session: CustomKeyboardSession = {\r\n target,\r\n type,\r\n originalReadOnly: target.readOnly,\r\n originalInputMode: target.getAttribute('inputmode'),\r\n originalInputType\r\n };\r\n\r\n /*\r\n * readonly is the most reliable way to prevent the native keyboard on Android. iOS shows no\r\n * cursor in a readonly field, so a date could not be edited at a tapped position there;\r\n * inputmode=\"none\" alone keeps the iOS keyboard away (iOS 12.2+) and leaves the cursor.\r\n */\r\n if (Capacitor.getPlatform() !== 'ios') {\r\n target.readOnly = true;\r\n }\r\n\r\n target.setAttribute('inputmode', 'none');\r\n\r\n /*\r\n * type=\"number\" cannot temporarily contain values such as:\r\n * \"-\", \".\", or \"12.\".\r\n *\r\n * Switch it to text while the custom keyboard is active.\r\n */\r\n if (\r\n target instanceof HTMLInputElement &&\r\n target.type === 'number'\r\n ) {\r\n target.type = 'text';\r\n }\r\n\r\n this.activeSession.set(session);\r\n this.blockInitialInteraction(session);\r\n this.applyDock();\r\n\r\n this.updateKeyboardHeight();\r\n document.addEventListener(\r\n 'pointerdown',\r\n this.documentPointerDownHandler,\r\n true\r\n );\r\n\r\n try {\r\n if (Capacitor.getPlatform() === 'ios') {\r\n await Keyboard.setAccessoryBarVisible({\r\n isVisible: false\r\n });\r\n }\r\n\r\n await Keyboard.hide();\r\n } catch {\r\n // The native keyboard may already be closed.\r\n }\r\n\r\n /*\r\n * The keyboard may have closed while Keyboard.hide()\r\n * was running.\r\n */\r\n if (this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n target.focus({\r\n preventScroll: true\r\n });\r\n\r\n this.scrollTargetIntoDialogView(target);\r\n\r\n this.moveCursorToEnd(target);\r\n\r\n window.setTimeout(() => {\r\n if (this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n target.addEventListener(\r\n 'blur',\r\n this.activeTargetBlurHandler\r\n );\r\n }, 350);\r\n }, 50);\r\n }\r\n\r\n private blockInitialInteraction(\r\n session: CustomKeyboardSession\r\n ): void {\r\n if (this.interactionUnlockTimer !== null) {\r\n window.clearTimeout(\r\n this.interactionUnlockTimer\r\n );\r\n }\r\n\r\n this.interactionBlocked.set(true);\r\n\r\n this.interactionUnlockTimer =\r\n window.setTimeout(() => {\r\n this.interactionUnlockTimer = null;\r\n\r\n if (this.activeSession() === session) {\r\n this.interactionBlocked.set(false);\r\n }\r\n }, 350);\r\n }\r\n\r\n private scrollTargetIntoDialogView(\r\n target: CustomKeyboardTarget\r\n ): void {\r\n window.requestAnimationFrame(() => {\r\n const dialogContent =\r\n target.closest<HTMLElement>(\r\n '.p-dialog-content'\r\n );\r\n\r\n /*\r\n * Fallback for inputs outside a PrimeNG dialog.\r\n */\r\n if (!dialogContent) {\r\n target.scrollIntoView({\r\n behavior: 'auto',\r\n block: 'nearest',\r\n inline: 'nearest'\r\n });\r\n\r\n return;\r\n }\r\n\r\n const targetRect =\r\n target.getBoundingClientRect();\r\n\r\n const containerRect =\r\n dialogContent.getBoundingClientRect();\r\n\r\n const spacing = 16;\r\n\r\n const maximumVisibleBottom =\r\n containerRect.bottom - spacing;\r\n\r\n const minimumVisibleTop =\r\n containerRect.top + spacing;\r\n\r\n if (targetRect.bottom > maximumVisibleBottom) {\r\n dialogContent.scrollTop +=\r\n targetRect.bottom -\r\n maximumVisibleBottom;\r\n } else if (targetRect.top < minimumVisibleTop) {\r\n dialogContent.scrollTop -=\r\n minimumVisibleTop -\r\n targetRect.top;\r\n }\r\n });\r\n }\r\n\r\n private updateKeyboardHeight(): void {\r\n /*\r\n * Wait for Angular to render the keyboard first.\r\n */\r\n window.requestAnimationFrame(() => {\r\n window.requestAnimationFrame(() => {\r\n const keyboardElement =\r\n document.querySelector<HTMLElement>(\r\n '[data-vl-custom-keyboard]'\r\n );\r\n\r\n if (!keyboardElement) {\r\n return;\r\n }\r\n\r\n const keyboardHeight = Math.ceil(\r\n keyboardElement.getBoundingClientRect().height\r\n );\r\n\r\n // Measured at the bottom only; at the side the keyboard covers no dialog height.\r\n if (!document.body.classList.contains(SIDE_DOCK_CLASS)) {\r\n this.lastKeyboardHeight = keyboardHeight;\r\n\r\n document.body.style.setProperty(\r\n '--vl-custom-keyboard-height',\r\n `${keyboardHeight}px`\r\n );\r\n }\r\n\r\n this.afterTap(() => {\r\n this.refocusTarget();\r\n this.scrollTargetAboveKeyboard();\r\n });\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Runs once the tap that opened the keyboard is complete. The keyboard opens on touch-down; a\r\n * scroll before the finger lifts makes the click land beside the field, which then loses its\r\n * focus. Without a tap in progress it runs on the next frame.\r\n */\r\n private afterTap(run: () => void): void {\r\n this.trackTaps();\r\n\r\n const tapInProgress =\r\n this.lastPointerDownAt > this.lastClickAt &&\r\n Date.now() - this.lastPointerDownAt < 1000;\r\n\r\n if (!tapInProgress) {\r\n window.requestAnimationFrame(run);\r\n return;\r\n }\r\n\r\n let done = false;\r\n const finish = (): void => {\r\n if (done) {\r\n return;\r\n }\r\n\r\n done = true;\r\n document.removeEventListener('click', onClick, true);\r\n window.clearTimeout(timer);\r\n window.requestAnimationFrame(run);\r\n };\r\n // After the click has reached its target, not before.\r\n const onClick = (): void => {\r\n window.setTimeout(finish, 0);\r\n };\r\n const timer = window.setTimeout(finish, 600);\r\n\r\n document.addEventListener('click', onClick, true);\r\n }\r\n\r\n /**\r\n * Height of the keyboard docked at the bottom: the last measured one, or the height its\r\n * screen-relative key sizes give (see the stylesheet) before it was ever shown.\r\n */\r\n keyboardHeight(): number {\r\n if (this.lastKeyboardHeight) {\r\n return this.lastKeyboardHeight;\r\n }\r\n\r\n const vh = window.innerHeight / 100;\r\n const clamp = (min: number, value: number, max: number) => Math.min(max, Math.max(min, value));\r\n const key = clamp(28, 5.6 * vh, 46);\r\n const gap = clamp(3, 0.8 * vh, 6);\r\n const action = clamp(28, 5.2 * vh, 42);\r\n // Padding 8 px above and below; the gap to the screen edge lies outside the keyboard.\r\n return Math.round(4 * (key + gap) + action + 16);\r\n }\r\n\r\n /** Hands the picker closer over; see pickerCloser. */\r\n setPickerCloser(closer: () => void): void {\r\n this.pickerCloser = closer;\r\n }\r\n\r\n /**\r\n * The keyboard opens on touch-down; under a field near the bottom it slides in under the\r\n * finger and the click of the same tap lands on it, so the field never got its focus.\r\n */\r\n private refocusTarget(): void {\r\n const target = this.activeSession()?.target as HTMLElement | undefined;\r\n\r\n if (target && document.activeElement !== target) {\r\n target.focus({ preventScroll: true });\r\n }\r\n }\r\n\r\n private trackTaps(): void {\r\n if (this.tapsTracked) {\r\n return;\r\n }\r\n\r\n this.tapsTracked = true;\r\n document.addEventListener('pointerdown', () => (this.lastPointerDownAt = Date.now()), true);\r\n document.addEventListener('click', () => (this.lastClickAt = Date.now()), true);\r\n }\r\n\r\n /**\r\n * Scrolls the dialog just far enough that the active field stands fully above the keyboard,\r\n * or fully below the dialog header when it went up out of sight. A field already in view\r\n * does not move.\r\n */\r\n private scrollTargetAboveKeyboard(): void {\r\n const target = this.activeSession()?.target as HTMLElement | undefined;\r\n const content = target?.closest<HTMLElement>('.p-dialog-content');\r\n\r\n if (!target || !content) {\r\n return;\r\n }\r\n\r\n const spacing = 12;\r\n const field = (target.closest<HTMLElement>('.picker-field') ?? target).getBoundingClientRect();\r\n const area = content.getBoundingClientRect();\r\n\r\n if (field.bottom > area.bottom - spacing) {\r\n content.scrollTop += field.bottom - (area.bottom - spacing);\r\n } else if (field.top < area.top + spacing) {\r\n content.scrollTop -= area.top + spacing - field.top;\r\n }\r\n }\r\n\r\n private canProcessKeyboardAction(): boolean {\r\n return (\r\n !this.interactionBlocked() &&\r\n this.activeSession() !== null\r\n );\r\n }\r\n\r\n insert(character: string): void {\r\n if (!this.canProcessKeyboardAction()) {\r\n return;\r\n }\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n const { target, type } = session;\r\n if (\r\n type === 'date' ||\r\n type === 'time'\r\n ) {\r\n this.insertDateTimeDigit(\r\n target,\r\n type,\r\n character\r\n );\r\n\r\n return;\r\n }\r\n const currentValue = target.value ?? '';\r\n\r\n const start =\r\n target.selectionStart ?? currentValue.length;\r\n\r\n const end =\r\n target.selectionEnd ?? currentValue.length;\r\n\r\n const nextValue =\r\n currentValue.slice(0, start) +\r\n character +\r\n currentValue.slice(end);\r\n\r\n if (!this.isValidValue(nextValue, type)) {\r\n return;\r\n }\r\n\r\n this.updateTarget(\r\n target,\r\n nextValue,\r\n start + character.length\r\n );\r\n }\r\n\r\n backspace(): void {\r\n if (!this.canProcessKeyboardAction()) {\r\n return;\r\n }\r\n\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n if (\r\n session.type === 'date' ||\r\n session.type === 'time'\r\n ) {\r\n this.removeDateTimeDigit(\r\n session.target,\r\n session.type\r\n );\r\n\r\n return;\r\n }\r\n\r\n const target = session.target;\r\n const currentValue = target.value ?? '';\r\n\r\n const start =\r\n target.selectionStart ?? currentValue.length;\r\n\r\n const end =\r\n target.selectionEnd ?? currentValue.length;\r\n\r\n if (start !== end) {\r\n const nextValue =\r\n currentValue.slice(0, start) +\r\n currentValue.slice(end);\r\n\r\n this.updateTarget(\r\n target,\r\n nextValue,\r\n start\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (start <= 0) {\r\n return;\r\n }\r\n\r\n const nextValue =\r\n currentValue.slice(0, start - 1) +\r\n currentValue.slice(start);\r\n\r\n this.updateTarget(\r\n target,\r\n nextValue,\r\n start - 1\r\n );\r\n }\r\n\r\n clear(): void {\r\n if (!this.canProcessKeyboardAction()) {\r\n return;\r\n }\r\n const target =\r\n this.activeSession()?.target;\r\n\r\n if (!target) {\r\n return;\r\n }\r\n\r\n this.updateTarget(target, '', 0);\r\n }\r\n\r\n close(\r\n option: {\r\n blurTarget?: boolean;\r\n restoreAccessoryBar?: boolean;\r\n keepBottomArea?: boolean;\r\n } = {}\r\n ): void {\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n const {\r\n blurTarget = true,\r\n restoreAccessoryBar = true,\r\n keepBottomArea = false\r\n } = option;\r\n\r\n const { target } = session;\r\n\r\n document.removeEventListener(\r\n 'pointerdown',\r\n this.documentPointerDownHandler,\r\n true\r\n );\r\n\r\n target.removeEventListener(\r\n 'blur',\r\n this.activeTargetBlurHandler\r\n );\r\n\r\n this.activeSession.set(null);\r\n if (this.interactionUnlockTimer !== null) {\r\n window.clearTimeout(\r\n this.interactionUnlockTimer\r\n );\r\n\r\n this.interactionUnlockTimer = null;\r\n }\r\n\r\n this.interactionBlocked.set(false);\r\n\r\n /*\r\n * Restore input attributes before dispatching the final\r\n * change event.\r\n */\r\n target.readOnly = session.originalReadOnly;\r\n\r\n // inputmode=\"none\" stays while the field still has the focus: without it iOS puts its own\r\n // keyboard on the field. It goes back once the field has lost the focus.\r\n const restoreInputMode = (): void => {\r\n if (session.originalInputMode === null) {\r\n target.removeAttribute('inputmode');\r\n } else {\r\n target.setAttribute('inputmode', session.originalInputMode);\r\n }\r\n };\r\n\r\n if (target instanceof HTMLInputElement) {\r\n if (session.originalInputType === null) {\r\n target.removeAttribute('type');\r\n } else {\r\n target.setAttribute(\r\n 'type',\r\n session.originalInputType\r\n );\r\n }\r\n }\r\n\r\n target.dispatchEvent(\r\n new Event('change', {\r\n bubbles: true\r\n })\r\n );\r\n\r\n if (blurTarget) {\r\n target.blur();\r\n }\r\n\r\n if (document.activeElement === target) {\r\n target.addEventListener('blur', restoreInputMode, { once: true });\r\n } else {\r\n restoreInputMode();\r\n }\r\n\r\n if (!keepBottomArea) {\r\n this.clearDock();\r\n }\r\n\r\n if (\r\n restoreAccessoryBar &&\r\n this.isNativeMobile() &&\r\n Capacitor.getPlatform() === 'ios'\r\n ) {\r\n void Keyboard.setAccessoryBarVisible({\r\n isVisible: true\r\n }).catch(() => {\r\n // Ignore restoration failures.\r\n });\r\n }\r\n }\r\n\r\n closeIfTargetInside(\r\n container: HTMLElement\r\n ): void {\r\n const target =\r\n this.activeSession()?.target;\r\n\r\n if (target && container.contains(target)) {\r\n this.close();\r\n }\r\n }\r\n\r\n private updateTarget(\r\n target: CustomKeyboardTarget,\r\n value: string,\r\n cursorPosition: number\r\n ): void {\r\n /*\r\n * A real key sends keydown before the value changes. PrimeNG DatePicker drops every input\r\n * event without one (onUserInput checks isKeydown), so a date typed here never reached the\r\n * model and vanished on blur.\r\n */\r\n target.dispatchEvent(\r\n new KeyboardEvent('keydown', {\r\n bubbles: true,\r\n key: 'Unidentified'\r\n })\r\n );\r\n\r\n target.value = value;\r\n\r\n /*\r\n * Angular's DefaultValueAccessor and NumberValueAccessor\r\n * listen to this event, so ngModel is updated normally.\r\n */\r\n target.dispatchEvent(\r\n new Event('input', {\r\n bubbles: true,\r\n composed: true\r\n })\r\n );\r\n\r\n queueMicrotask(() => {\r\n try {\r\n target.setSelectionRange(\r\n cursorPosition,\r\n cursorPosition\r\n );\r\n } catch {\r\n // Some specialized inputs do not support selection ranges.\r\n }\r\n });\r\n }\r\n\r\n private isValidValue(\r\n value: string,\r\n type: CustomKeyboardType\r\n ): boolean {\r\n switch (type) {\r\n case 'email':\r\n return (\r\n /^[A-Za-z0-9@._+\\-]*$/.test(value) &&\r\n (value.match(/@/g)?.length ?? 0) <= 1\r\n );\r\n\r\n case 'numeric':\r\n return /^-?\\d*(\\.\\d*)?$/.test(value);\r\n\r\n case 'date': {\r\n const digits =\r\n value.replace(/\\D/g, '');\r\n\r\n return (\r\n /^[0-9-]*$/.test(value) &&\r\n digits.length <= 8 &&\r\n value.length <= 10\r\n );\r\n }\r\n\r\n case 'time': {\r\n const digits =\r\n value.replace(/\\D/g, '');\r\n\r\n return (\r\n /^[0-9:]*$/.test(value) &&\r\n digits.length <= 4 &&\r\n value.length <= 5\r\n );\r\n }\r\n\r\n case 'alpha':\r\n return /^[\\p{L}\\p{M} ]*$/u.test(value);\r\n\r\n case 'string':\r\n // Anything printable; control characters never come from the keys.\r\n return /^[^\\p{Cc}\\p{Cs}]*$/u.test(value);\r\n\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private moveCursorToEnd(\r\n target: CustomKeyboardTarget\r\n ): void {\r\n try {\r\n const position = target.value.length;\r\n\r\n target.setSelectionRange(\r\n position,\r\n position\r\n );\r\n } catch {\r\n // Ignore inputs without selection support.\r\n }\r\n }\r\n\r\n private readonly documentPointerDownHandler = (\r\n event: PointerEvent\r\n ): void => {\r\n this.handleDocumentPointerDown(event);\r\n };\r\n\r\n private readonly activeTargetBlurHandler = (): void => {\r\n this.handleActiveTargetBlur();\r\n };\r\n\r\n private handleDocumentPointerDown(\r\n event: PointerEvent\r\n ): void {\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n const eventTarget = event.target;\r\n\r\n if (!(eventTarget instanceof Node)) {\r\n return;\r\n }\r\n\r\n /*\r\n * User pressed the currently active input.\r\n */\r\n if (\r\n eventTarget === session.target ||\r\n session.target.contains(eventTarget)\r\n ) {\r\n return;\r\n }\r\n\r\n /*\r\n * Keep the keyboard open when one of its keys\r\n * or action buttons is pressed.\r\n */\r\n if (\r\n eventTarget instanceof Element &&\r\n eventTarget.closest(\r\n '[data-vl-custom-keyboard]'\r\n )\r\n ) {\r\n return;\r\n }\r\n\r\n /*\r\n * Direct switch to another input.\r\n */\r\n const nextInput =\r\n eventTarget instanceof Element\r\n ? eventTarget.closest<\r\n HTMLInputElement | HTMLTextAreaElement\r\n >('input, textarea')\r\n : null;\r\n\r\n if (nextInput) {\r\n const expectedSession = session;\r\n\r\n window.setTimeout(() => {\r\n /*\r\n * Another custom-keyboard session may already have\r\n * replaced the previous session.\r\n */\r\n if (\r\n this.activeSession() !==\r\n expectedSession\r\n ) {\r\n return;\r\n }\r\n\r\n this.close({\r\n blurTarget: false\r\n });\r\n }, 0);\r\n\r\n return;\r\n }\r\n\r\n /*\r\n * The toolkit's own picker icon: the picker is about to take the keyboard's place, so the\r\n * bottom area stays reserved and the dialog does not jump in between.\r\n */\r\n if (\r\n eventTarget instanceof Element &&\r\n eventTarget.closest('.picker-field__icon')\r\n ) {\r\n this.close({\r\n blurTarget: false,\r\n restoreAccessoryBar: false,\r\n keepBottomArea: true\r\n });\r\n\r\n return;\r\n }\r\n\r\n /*\r\n * Detect the PrimeNG DatePicker icon button.\r\n */\r\n const pickerTrigger =\r\n eventTarget instanceof Element\r\n ? eventTarget.closest(\r\n [\r\n '.p-datepicker-dropdown',\r\n '.p-datepicker-input-icon-container',\r\n '[data-pc-section=\"dropdown\"]'\r\n ].join(',')\r\n )\r\n : null;\r\n\r\n if (pickerTrigger) {\r\n /*\r\n * Prevent the blur handler from closing and resizing\r\n * the dialog before PrimeNG processes the icon click.\r\n */\r\n this.pickerTriggerPressedUntil =\r\n Date.now() + 600;\r\n\r\n const expectedSession = session;\r\n\r\n /*\r\n * If the picker fails to open, clean up the custom\r\n * keyboard after the icon-click sequence.\r\n */\r\n window.setTimeout(() => {\r\n if (\r\n this.pickerOverlayOpen ||\r\n this.activeSession() !== expectedSession\r\n ) {\r\n return;\r\n }\r\n\r\n if (\r\n document.activeElement !==\r\n expectedSession.target\r\n ) {\r\n this.close();\r\n }\r\n }, 650);\r\n\r\n return;\r\n }\r\n\r\n /*\r\n * Any other outside press closes the keyboard - but the space it held is given back only\r\n * once the tap is complete. Freed at touch-down, the dialog grew or moved under the finger\r\n * and the click missed what was tapped, the close button of the dialog for one.\r\n */\r\n // Only a tap closes it, not a swipe: scrolling the dialog began with the same press and\r\n // closed the keyboard (then iOS put its own keyboard on the still focused field).\r\n this.closeOnTapNotSwipe(event, session);\r\n }\r\n\r\n /** Closes the keyboard when the outside press ends as a tap; a swipe (scrolling) keeps it. */\r\n private closeOnTapNotSwipe(event: Event, session: unknown): void {\r\n const start = event as PointerEvent;\r\n const x = start.clientX ?? 0;\r\n const y = start.clientY ?? 0;\r\n let moved = false;\r\n\r\n const onMove = (e: PointerEvent): void => {\r\n if (Math.abs(e.clientX - x) > 10 || Math.abs(e.clientY - y) > 10) {\r\n moved = true;\r\n }\r\n };\r\n const cleanup = (): void => {\r\n document.removeEventListener('pointermove', onMove, true);\r\n document.removeEventListener('pointerup', onUp, true);\r\n document.removeEventListener('pointercancel', cleanup, true);\r\n };\r\n const onUp = (): void => {\r\n cleanup();\r\n\r\n if (moved || this.activeSession() !== session) {\r\n return;\r\n }\r\n\r\n this.close({ keepBottomArea: true });\r\n this.afterTap(() => {\r\n if (!this.activeSession() && !this.pickerOverlayOpen) {\r\n this.clearDock();\r\n }\r\n });\r\n };\r\n\r\n document.addEventListener('pointermove', onMove, true);\r\n document.addEventListener('pointerup', onUp, true);\r\n // iOS cancels the pointer when the press turns into scrolling.\r\n document.addEventListener('pointercancel', cleanup, true);\r\n }\r\n\r\n private handleActiveTargetBlur(): void {\r\n window.setTimeout(() => {\r\n const session = this.activeSession();\r\n\r\n if (!session) {\r\n return;\r\n }\r\n\r\n /*\r\n * The blur was caused by pressing a DatePicker icon.\r\n * onShow will handle closing the custom keyboard.\r\n */\r\n if (\r\n Date.now() <\r\n this.pickerTriggerPressedUntil\r\n ) {\r\n return;\r\n }\r\n\r\n const activeElement =\r\n document.activeElement;\r\n\r\n if (activeElement === session.target) {\r\n return;\r\n }\r\n\r\n const keyboardElement =\r\n document.querySelector(\r\n '[data-vl-custom-keyboard]'\r\n );\r\n\r\n if (\r\n keyboardElement &&\r\n activeElement &&\r\n keyboardElement.contains(activeElement)\r\n ) {\r\n return;\r\n }\r\n\r\n this.close();\r\n }, 0);\r\n }\r\n\r\n /*\r\n * Date and time have a fixed shape (yyyy-mm-dd, hh:mm), so they are edited on their digits:\r\n * a digit overwrites the one right of the cursor, Backspace removes the last digit or, inside\r\n * the value, steps one digit back; the separators are skipped. With the cursor at the end this is the old append/delete.\r\n */\r\n private insertDateTimeDigit(\r\n target: CustomKeyboardTarget,\r\n type: 'date' | 'time',\r\n character: string\r\n ): void {\r\n if (!/^\\d$/.test(character)) {\r\n return;\r\n }\r\n\r\n const maximumDigits = type === 'date' ? 8 : 4;\r\n const digits = (target.value ?? '').replace(/\\D/g, '');\r\n const caret = this.digitsBeforeCaret(target);\r\n\r\n let nextDigits: string;\r\n\r\n if (caret < digits.length) {\r\n nextDigits = digits.slice(0, caret) + character + digits.slice(caret + 1);\r\n } else if (digits.length < maximumDigits) {\r\n nextDigits = digits + character;\r\n } else {\r\n return;\r\n }\r\n\r\n this.updateDateTimeTarget(target, type, nextDigits, caret + 1);\r\n }\r\n\r\n private removeDateTimeDigit(\r\n target: CustomKeyboardTarget,\r\n type: 'date' | 'time'\r\n ): void {\r\n const digits = (target.value ?? '').replace(/\\D/g, '');\r\n const caret = this.digitsBeforeCaret(target);\r\n\r\n if (caret <= 0) {\r\n return;\r\n }\r\n\r\n /*\r\n * Inside the value Backspace only steps one digit back, ready to be overwritten; removing\r\n * it would shift the rest and turn 2026-11-21 into 2026-12-1.\r\n */\r\n if (caret < digits.length) {\r\n this.setCaret(\r\n target,\r\n this.positionAfterDigits(target.value ?? '', caret - 1)\r\n );\r\n\r\n return;\r\n }\r\n\r\n this.updateDateTimeTarget(\r\n target,\r\n type,\r\n digits.slice(0, caret - 1),\r\n caret - 1\r\n );\r\n }\r\n\r\n private setCaret(target: CustomKeyboardTarget, position: number): void {\r\n try {\r\n target.setSelectionRange(position, position);\r\n } catch {\r\n // Some inputs do not support selection ranges.\r\n }\r\n }\r\n\r\n /** Number of digits left of the cursor; the end when the field has no usable selection. */\r\n private digitsBeforeCaret(target: CustomKeyboardTarget): number {\r\n const value = target.value ?? '';\r\n let position = value.length;\r\n\r\n try {\r\n position = target.selectionStart ?? value.length;\r\n } catch {\r\n // Some inputs do not expose a selection.\r\n }\r\n\r\n return value.slice(0, position).replace(/\\D/g, '').length;\r\n }\r\n\r\n private updateDateTimeTarget(\r\n target: CustomKeyboardTarget,\r\n type: 'date' | 'time',\r\n digits: string,\r\n digitsBeforeCaret: number\r\n ): void {\r\n const formatted = type === 'date'\r\n ? this.formatDateDigits(digits)\r\n : this.formatTimeDigits(digits);\r\n\r\n this.updateTarget(\r\n target,\r\n formatted,\r\n this.positionAfterDigits(formatted, digitsBeforeCaret)\r\n );\r\n }\r\n\r\n /** String position right after the given number of digits, separators included. */\r\n private positionAfterDigits(value: string, count: number): number {\r\n if (count <= 0) {\r\n return 0;\r\n }\r\n\r\n let seen = 0;\r\n\r\n for (let index = 0; index < value.length; index++) {\r\n if (/\\d/.test(value[index]) && ++seen === count) {\r\n return index + 1;\r\n }\r\n }\r\n\r\n return value.length;\r\n }\r\n\r\n private formatDateDigits(\r\n value: string\r\n ): string {\r\n const digits =\r\n value\r\n .replace(/\\D/g, '')\r\n .slice(0, 8);\r\n\r\n if (digits.length <= 4) {\r\n return digits;\r\n }\r\n\r\n if (digits.length <= 6) {\r\n return (\r\n `${digits.slice(0, 4)}-` +\r\n digits.slice(4)\r\n );\r\n }\r\n\r\n return (\r\n `${digits.slice(0, 4)}-` +\r\n `${digits.slice(4, 6)}-` +\r\n digits.slice(6)\r\n );\r\n }\r\n\r\n private formatTimeDigits(\r\n value: string\r\n ): string {\r\n const digits =\r\n value\r\n .replace(/\\D/g, '')\r\n .slice(0, 4);\r\n\r\n if (digits.length <= 2) {\r\n return digits;\r\n }\r\n\r\n return (\r\n `${digits.slice(0, 2)}:` +\r\n digits.slice(2)\r\n );\r\n }\r\n\r\n beginPickerOverlay(): void {\r\n this.pickerOverlayOpen = true;\r\n\r\n /*\r\n * Do not restore the iOS accessory bar yet because\r\n * the picker is about to open.\r\n *\r\n * Do not force another blur because PrimeNG is already\r\n * handling focus during the icon click.\r\n */\r\n /*\r\n * The picker takes the keyboard's place: keep the reserved bottom area until the picker\r\n * reserves its own, otherwise the dialog grows and shrinks again in between.\r\n */\r\n this.close({\r\n blurTarget: false,\r\n restoreAccessoryBar: false,\r\n keepBottomArea: true\r\n });\r\n\r\n if (this.isNativeMobile()) {\r\n void Keyboard.hide().catch(() => {\r\n // Native keyboard may already be hidden.\r\n });\r\n }\r\n }\r\n\r\n endPickerOverlay(\r\n option: { suspendReopen?: boolean; keepBottomArea?: boolean } = {}\r\n ): void {\r\n this.pickerOverlayOpen = false;\r\n\r\n if (option.keepBottomArea) {\r\n /*\r\n * The keyboard is about to take the picker's place (tap into the field): releasing the\r\n * area now would grow the dialog and pull the field away under the finger. Release it\r\n * only if no keyboard follows.\r\n */\r\n window.setTimeout(() => {\r\n if (!this.activeSession() && !this.pickerOverlayOpen) {\r\n this.releaseBottomArea();\r\n }\r\n }, 600);\r\n } else {\r\n this.releaseBottomArea();\r\n }\r\n\r\n /*\r\n * PrimeNG may focus the input again while closing.\r\n * Suppress that focus bounce briefly - unless the user\r\n * closed the picker by tapping into the field on purpose.\r\n */\r\n if (option.suspendReopen !== false) {\r\n this.openingSuspendedUntil =\r\n Date.now() + 250;\r\n }\r\n\r\n if (\r\n this.isNativeMobile() &&\r\n Capacitor.getPlatform() === 'ios'\r\n ) {\r\n void Keyboard.setAccessoryBarVisible({\r\n isVisible: true\r\n }).catch(() => {\r\n // Ignore accessory-bar restoration failures.\r\n });\r\n }\r\n }\r\n /**\r\n * A panel docked at the bottom (date or time picker) takes the keyboard's place: the same body\r\n * class and height variable let the dialog end above it.\r\n */\r\n reserveBottomArea(panel: HTMLElement | null): void {\r\n // A picker that is not docked (the time picker at its field) needs no area down there.\r\n if (!panel) {\r\n this.releaseBottomArea();\r\n return;\r\n }\r\n\r\n const height = Math.ceil(panel.getBoundingClientRect().height);\r\n\r\n document.body.classList.remove(SIDE_DOCK_CLASS);\r\n document.body.classList.add('vl-custom-keyboard-open');\r\n this.followDialog();\r\n document.body.style.setProperty(\r\n '--vl-custom-keyboard-height',\r\n `${height}px`\r\n );\r\n }\r\n\r\n releaseBottomArea(): void {\r\n if (this.activeSession()) {\r\n return;\r\n }\r\n\r\n this.clearDock();\r\n }\r\n\r\n /** See sideDockWidth; keeps the width for the panels' styles. */\r\n dockAtSide(): boolean {\r\n const width = sideDockWidth();\r\n\r\n if (width) {\r\n document.body.style.setProperty('--vl-side-dock-width', `${width}px`);\r\n }\r\n\r\n return width !== null;\r\n }\r\n\r\n\r\n\r\n /** A panel takes the side: the bottom area goes, the dialog stands beside it. */\r\n useSideDock(): void {\r\n document.body.classList.remove('vl-custom-keyboard-open');\r\n document.body.style.removeProperty('--vl-custom-keyboard-height');\r\n document.body.classList.add(SIDE_DOCK_CLASS);\r\n this.followDialog();\r\n }\r\n\r\n /**\r\n * The panel lines up with the dialog - the dialog keeps its own size and place. At the side the\r\n * panel takes over its upper and lower edge, at the bottom its left and right edge, and follows\r\n * when the dialog changes (an error message, a turn of the device).\r\n */\r\n private followDialog(): void {\r\n const dialog = document.querySelector<HTMLElement>('.p-dialog');\r\n\r\n if (!dialog) {\r\n return;\r\n }\r\n\r\n const align = (): void => {\r\n const r = dialog.getBoundingClientRect();\r\n document.body.style.setProperty('--vl-side-dock-top', `${Math.round(r.top)}px`);\r\n document.body.style.setProperty('--vl-side-dock-bottom', `${Math.round(window.innerHeight - r.bottom)}px`);\r\n // At the bottom: the dialog's left and right edge.\r\n document.body.style.setProperty('--vl-dock-left', `${Math.round(r.left)}px`);\r\n document.body.style.setProperty('--vl-dock-right', `${Math.round(window.innerWidth - r.right)}px`);\r\n };\r\n\r\n align();\r\n\r\n if (this.dialogObserver?.target !== dialog) {\r\n this.dialogObserver?.observer.disconnect();\r\n const observer = new ResizeObserver(() => align());\r\n observer.observe(dialog);\r\n this.dialogObserver = { target: dialog, observer };\r\n }\r\n }\r\n\r\n /**\r\n * Keyboard and calendar look like the page behind them: its background colour - from the\r\n * project's styles, the app or the theme - becomes --vl-page-background. Dialogs, masks and the\r\n * panels themselves are looked through; transparent elements pass on their parent's colour.\r\n */\r\n applyPageBackground(): void {\r\n const skip = '.p-dialog-mask, .p-dialog, .p-component-overlay, .custom-keyboard, .p-datepicker-panel, .p-overlay';\r\n const below = document.elementsFromPoint(window.innerWidth / 2, window.innerHeight / 2)\r\n .find(element => !element.closest(skip));\r\n\r\n for (let element: Element | null = below ?? document.body; element; element = element.parentElement) {\r\n const colour = getComputedStyle(element).backgroundColor;\r\n\r\n if (colour && colour !== 'transparent' && !/rgba\\(.*,\\s*0\\)$/.test(colour)) {\r\n document.body.style.setProperty('--vl-page-background', colour);\r\n return;\r\n }\r\n }\r\n\r\n document.body.style.removeProperty('--vl-page-background');\r\n }\r\n\r\n /** Keyboard: side or bottom, the same decision as the calendar's. */\r\n private applyDock(): void {\r\n this.applyPageBackground();\r\n\r\n if (this.dockAtSide()) {\r\n this.useSideDock();\r\n return;\r\n }\r\n\r\n document.body.classList.remove(SIDE_DOCK_CLASS);\r\n document.body.classList.add('vl-custom-keyboard-open');\r\n this.followDialog();\r\n\r\n // Start with the last measured height, not the CSS fallback, so the dialog does not flicker.\r\n if (this.lastKeyboardHeight) {\r\n document.body.style.setProperty(\r\n '--vl-custom-keyboard-height',\r\n `${this.lastKeyboardHeight}px`\r\n );\r\n }\r\n }\r\n\r\n private clearDock(): void {\r\n document.body.classList.remove('vl-custom-keyboard-open', SIDE_DOCK_CLASS);\r\n document.body.style.removeProperty('--vl-custom-keyboard-height');\r\n document.body.style.removeProperty('--vl-side-dock-top');\r\n document.body.style.removeProperty('--vl-side-dock-bottom');\r\n document.body.style.removeProperty('--vl-dock-left');\r\n document.body.style.removeProperty('--vl-dock-right');\r\n this.dialogObserver?.observer.disconnect();\r\n this.dialogObserver = null;\r\n }\r\n\r\n\r\n getActiveValue(\r\n type: CustomKeyboardType,\r\n targetName?: string\r\n ): string | null {\r\n const session = this.activeSession();\r\n\r\n if (!session || session.type !== type) {\r\n return null;\r\n }\r\n\r\n const actualTargetName =\r\n session.target.name ||\r\n session.target.getAttribute('name');\r\n\r\n if (\r\n targetName &&\r\n actualTargetName !== targetName\r\n ) {\r\n return null;\r\n }\r\n\r\n return session.target.value ?? '';\r\n }\r\n}","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-16\r\n// - change: active where toolkitKeyboardActive() says so (also in the Designer preview)\r\nimport {\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnDestroy\r\n} from '@angular/core';\r\n\r\nimport {\r\n normalizeCustomKeyboardType\r\n} from './custom-keyboard.types';\r\n\r\nimport {\r\n CustomKeyboardService,\r\n CustomKeyboardTarget\r\n} from './custom-keyboard.service';\r\nimport { toolkitKeyboardActive } from './toolkit-keyboard-mode';\r\n\r\n@Directive({\r\n selector: '[vlCustomKeyboard]',\r\n standalone: true\r\n})\r\nexport class CustomKeyboardDirective\r\n implements OnDestroy {\r\n\r\n @Input('vlCustomKeyboard')\r\n keyboardType?: string | null;\r\n\r\n constructor(\r\n private readonly elementRef:\r\n ElementRef<HTMLElement>,\r\n private readonly keyboard:\r\n CustomKeyboardService\r\n ) { }\r\n\r\n /*\r\n * pointerdown happens before the browser focuses the input.\r\n * This prevents the native keyboard from appearing first.\r\n */\r\n @HostListener('pointerdown', ['$event'])\r\n onPointerDown(event: PointerEvent): void {\r\n this.openForEvent(event);\r\n }\r\n\r\n /*\r\n * Handles inputs focused using JavaScript, Tab, or accessibility\r\n * navigation.\r\n */\r\n @HostListener('focusin', ['$event'])\r\n onFocusIn(event: FocusEvent): void {\r\n this.openForEvent(event);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.keyboard.closeIfTargetInside(\r\n this.elementRef.nativeElement\r\n );\r\n }\r\n\r\n private openForEvent(\r\n event: Event\r\n ): void {\r\n const type =\r\n normalizeCustomKeyboardType(\r\n this.keyboardType\r\n );\r\n\r\n if (\r\n !type ||\r\n !toolkitKeyboardActive()\r\n ) {\r\n return;\r\n }\r\n\r\n const target =\r\n this.resolveInput(event.target);\r\n\r\n if (!target || target.disabled) {\r\n return;\r\n }\r\n\r\n const activeTarget =\r\n this.keyboard.activeSession()?.target;\r\n\r\n /*\r\n * Do not override a genuinely readonly input.\r\n * The active target is readonly because the service set it.\r\n */\r\n if (\r\n target.readOnly &&\r\n activeTarget !== target\r\n ) {\r\n return;\r\n }\r\n\r\n void this.keyboard.open(\r\n target,\r\n type\r\n );\r\n }\r\n\r\n private resolveInput(\r\n eventTarget: EventTarget | null\r\n ): CustomKeyboardTarget | null {\r\n if (\r\n eventTarget instanceof HTMLInputElement ||\r\n eventTarget instanceof HTMLTextAreaElement\r\n ) {\r\n return eventTarget;\r\n }\r\n\r\n return null;\r\n }\r\n}","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - new: backendUrl - the one place that decides how a backend is reached. On the devices the\r\n// backend is called directly (native HTTP, no CORS). In the web a backend without CORS headers\r\n// (P5 / WildFly) cannot be called from the page, so the call goes to the page's own origin as\r\n// /api/proxy/<host>/<path> and the server that serves the app forwards it - only to declared\r\n// hosts (locally ng serve's proxy.conf.json, in operation nginx with an allow-list). Replaces the\r\n// hard-coded /p5ws path of the web and the direct calls that failed with CORS\r\n\r\nimport { isNativeMobile } from './native-platform';\r\n\r\n/** Prefix of the forwarding path on the app's own origin. */\r\nexport const BACKEND_PROXY_PREFIX = '/api/proxy';\r\n\r\n/**\r\n * The address to call for a backend URL: unchanged on the devices and for relative URLs; in the web\r\n * https://p5w1.wilken.de/p5ws/x?y=1 becomes <origin>/api/proxy/p5w1.wilken.de/p5ws/x?y=1.\r\n */\r\nexport function backendUrl(url: string): string {\r\n if (isNativeMobile() || typeof window === 'undefined' || !/^https?:\\/\\//i.test(url || '')) {\r\n return url;\r\n }\r\n const target = new URL(url);\r\n if (target.origin === window.location.origin) {\r\n return url;\r\n }\r\n return `${window.location.origin}${BACKEND_PROXY_PREFIX}/${target.host}${target.pathname}${target.search}`;\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - change: saveDb and getSaveOrder (web) go through backendUrl (/api/proxy/<host>/...) instead of\r\n// a direct call (CORS) or the /p5ws path only ng serve knew\r\n// Shuaib 2026-09-24\r\n// - change: getLoginUser requires the selected project's Okta issuer.\r\n// - new: reject a missing or non-HTTPS issuer before sending the request.\r\n// - change: build the user-info URL from that issuer instead of a fixed URL.\r\n\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { throwError } from 'rxjs';\r\nimport { backendUrl as viaBackendProxy } from './backend-url';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RequestService {\r\n pageSize: number = 0;\r\n private readonly backendUrl = '/api';\r\n readonly apiUrl = `${this.backendUrl}/project`\r\n constructor(private http: HttpClient) { }\r\n\r\n getAllProject() {\r\n return this.http.get(\"../assets/main/layout_schema.json\");\r\n }\r\n\r\n getEnvironmet(selectedProject: any) {\r\n return this.http.get(`../../assets/projects/${selectedProject}/environments/environment.json`);\r\n }\r\n\r\n getSectionInfo(url: string, envUrl?: any, passToken: boolean = false, selectedProject: string = '', userInfo: any = null) {\r\n if (envUrl) {\r\n if (passToken && selectedProject) {\r\n return this.http.get(envUrl + url, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.get(envUrl + url);\r\n }\r\n } else {\r\n return this.http.get(url);\r\n };\r\n }\r\n\r\n readFile(projectName: any, path: any) {\r\n return this.http.post(`${this.apiUrl}/read`, {\r\n projectName: projectName,\r\n filePath: path\r\n })\r\n }\r\n\r\n getMainLayout(selectedProject: any) {\r\n return this.http.get(`../assets/projects/${selectedProject}/main/layout_schema.json`)\r\n }\r\n\r\n getInfo(url: string) {\r\n return this.http.get(url);\r\n }\r\n\r\n dynamicCall(method: string = \"get\", body: any = null, url: string, passToken: boolean = false, selectedProject: string = '', userInfo: any = null) {\r\n switch (method.toLowerCase()) {\r\n case 'get':\r\n if (passToken && selectedProject) {\r\n return this.http.get(url, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.get(url);\r\n }\r\n\r\n case 'post':\r\n if (passToken && selectedProject) {\r\n return this.http.post(url, body, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.post(url, body);\r\n }\r\n case 'put':\r\n if (passToken && selectedProject) {\r\n return this.http.put(url, body, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.put(url, body);\r\n }\r\n case 'delete':\r\n if (passToken && selectedProject) {\r\n return this.http.delete(url, {\r\n headers: this.createAuthorizationHeader(userInfo),\r\n })\r\n } else {\r\n return this.http.delete(url);\r\n };\r\n case 'patch':\r\n return this.http.patch(url, body);\r\n default:\r\n throw new Error(`Unsupported HTTP method: ${method}`);\r\n }\r\n }\r\n\r\n createAuthorizationHeader(userInfo: any, tokenExist: boolean = false) {\r\n let authHeaders: HttpHeaders = new HttpHeaders();\r\n let token = tokenExist ? userInfo : userInfo && userInfo.jwt ? userInfo.jwt : userInfo?.authToken ? userInfo?.authToken : '';\r\n return authHeaders.set(\r\n 'Authorization',\r\n 'Bearer ' + token\r\n )\r\n }\r\n\r\n getLoginUser(token: any, issuer: string) {\r\n if (!issuer || !/^https:\\/\\//i.test(issuer)) {\r\n return throwError(() => new Error('The project has no valid Okta issuer configured.'));\r\n }\r\n return this.http.get(`${issuer.replace(/\\/+$/, '')}/v1/userinfo`, {\r\n headers: this.createAuthorizationHeader(token, true),\r\n })\r\n }\r\n\r\n saveDb(token: any, userInfo: any, order: any = {}) {\r\n if (token) {\r\n const headers = new HttpHeaders({\r\n 'Authorization': `Bearer ${token}`,\r\n 'Accept': 'application/json'\r\n });\r\n let url2: any = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording?company=${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant ? userInfo.p5_plant : \" \"}&appVersion=1&resourceNo=${userInfo.p5_resource_no}`\r\n this.http.post(viaBackendProxy(url2), order, { headers }).subscribe({\r\n next: res => {\r\n console.log('Save-res: ', res);\r\n }\r\n })\r\n }\r\n }\r\n\r\n getSaveOrder(\r\n token: string,\r\n userInfo: any,\r\n fromDate: string,\r\n toDate: string\r\n ) {\r\n if (!token) {\r\n throw new Error('Missing authentication token');\r\n }\r\n if (!userInfo?.p5_backend_url) {\r\n throw new Error('Missing p5_backend_url');\r\n }\r\n const headers = new HttpHeaders({\r\n Authorization: `Bearer ${token}`,\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json'\r\n });\r\n\r\n const company = userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n\r\n const url = viaBackendProxy(\r\n `${String(userInfo.p5_backend_url).replace(/\\/+$/, '')}` +\r\n '/assetsmobileservice/Zeiterfassung/requestBookedTimeRecording'\r\n );\r\n\r\n const params = new HttpParams()\r\n .set(\r\n 'resourceNo',\r\n userInfo.p5_resource_no || ''\r\n )\r\n .set('workDayFrom', fromDate)\r\n .set('workDayTo', toDate)\r\n .set('company', company)\r\n .set('appVersion', '1');\r\n\r\n console.log('[Saved orders][Web] URL:', url);\r\n console.log(\r\n '[Saved orders][Web] Params:',\r\n params.toString()\r\n );\r\n\r\n return this.http.post(\r\n url,\r\n {},\r\n {\r\n headers,\r\n params\r\n }\r\n );\r\n }\r\n}\r\n\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - fix: Okta web read login.web.scopes, which the Designer never writes (it stores\r\n// login.web.scope), so the configured scope did not reach Okta. Both are read now\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: Okta login on the devices failed with 400 invalid_scope. login.mobile.scope may be an\r\n// array (luv2shop: [\"openid profile email\"]); the OAuth2 plugin expects a string and dropped it,\r\n// so no scope reached Okta. Arrays are joined with spaces, a missing scope falls back to\r\n// \"openid profile email\"\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: showAllProjects (\"Framework Settings > Home\") cleared selectedProject only from session\r\n// storage; the app keeps it in local storage, so after the reload it opened the same project\r\n// instead of the project list\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: on the devices a saved sign-in - KeycloakInfo (keycloak), loginedUser (oktaAuth),\r\n// <project>Logined (jwtToken) - is kept in the iOS keychain / Android keystore through\r\n// @aparajita/capacitor-secure-storage instead of plain WebView storage or Preferences, where any\r\n// code in the page could read it. Values stored the old way move over on first read. The\r\n// browser keeps localStorage / sessionStorage - it has no keychain\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n// - change: the credit card type is tested as creditCard. The rename of 2026-09-15 reached\r\n// model.component.html and the whole Designer but not this file, so one data object rendered\r\n// in a modal and stayed empty in a form\r\n// - new: a @contract comment documenting that the toolkit utility, side menu,\r\n// and ViewDefinition runtime handle keycloak, oktaAuth, and jwtToken.\r\n\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { Injectable } from '@angular/core';\r\nimport { Preferences } from '@capacitor/preferences';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { SecureStorage } from '@aparajita/capacitor-secure-storage';\r\nimport { RequestService } from './request.service';\r\nimport { loadStripe } from '@stripe/stripe-js';\r\nimport { BehaviorSubject, lastValueFrom } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UtilityService {\r\n stripe: any = null;\r\n\r\n constructor(private platform: Platform,\r\n private requestService: RequestService) { }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getProperty(scope: any, itemInfo?: any) {\r\n const property = scope?.reference ? scope?.reference.split('/').pop() : '';\r\n return { key: property, productSchema: itemInfo.propertySchema[property] };\r\n }\r\n\r\n async setStorage(key: string, value: any) {\r\n if (this.isSecureKey(key)) {\r\n await SecureStorage.setItem(key, value);\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.set({ key, value });\r\n } else {\r\n sessionStorage.setItem(key, value);\r\n }\r\n }\r\n\r\n async getStorage(key: string) {\r\n if (this.isSecureKey(key)) {\r\n const secured = await SecureStorage.getItem(key).catch(() => null);\r\n if (secured !== null) {\r\n return secured;\r\n }\r\n // Stored the old way: move it into the keychain.\r\n const legacy = (await Preferences.get({ key })).value ?? sessionStorage.getItem(key);\r\n if (legacy !== null) {\r\n await SecureStorage.setItem(key, legacy);\r\n await Preferences.remove({ key });\r\n sessionStorage.removeItem(key);\r\n }\r\n return legacy;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n const { value } = await Preferences.get({ key });\r\n return value;\r\n } else {\r\n const storage = sessionStorage.getItem(key);\r\n return storage;\r\n }\r\n }\r\n\r\n /**\r\n * Keys that hold a saved sign-in; on the devices they live in the keychain / keystore.\r\n * keycloak: KeycloakInfo, oktaAuth: loginedUser, jwtToken: <project>Logined.\r\n */\r\n private readonly secureKeys = new Set(['KeycloakInfo', 'loginedUser']);\r\n\r\n private isSecureKey(key: string): boolean {\r\n return Capacitor.isNativePlatform() && (this.secureKeys.has(key) || key.endsWith('Logined'));\r\n }\r\n\r\n async setLocalStorage(key: string, value: any) {\r\n const stringValue = JSON.stringify(value);\r\n if (this.isSecureKey(key)) {\r\n await SecureStorage.setItem(key, stringValue);\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.set({ key, value: stringValue });\r\n } else {\r\n localStorage.setItem(key, stringValue);\r\n }\r\n }\r\n\r\n async removeLocalStorage(keyName: string) {\r\n if (this.isSecureKey(keyName)) {\r\n await SecureStorage.removeItem(keyName);\r\n // Also the place it was kept before, so nothing stays behind there.\r\n localStorage.removeItem(keyName);\r\n await Preferences.remove({ key: keyName });\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.remove({ key: keyName });\r\n } else {\r\n localStorage.removeItem(keyName);\r\n }\r\n }\r\n\r\n async removeStorage(key: string) {\r\n if (this.isSecureKey(key)) {\r\n await SecureStorage.removeItem(key);\r\n await Preferences.remove({ key });\r\n sessionStorage.removeItem(key);\r\n return;\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n await Preferences.remove({ key });\r\n } else {\r\n sessionStorage.removeItem(key);\r\n }\r\n }\r\n\r\n /** Reads a credential key from the keychain, moving a value stored the old way on first read. */\r\n private async getSecureItem(key: string): Promise<any> {\r\n const secured = await SecureStorage.getItem(key).catch(() => null);\r\n\r\n if (secured) {\r\n return JSON.parse(secured);\r\n }\r\n\r\n const legacy = localStorage.getItem(key) ?? (await Preferences.get({ key })).value;\r\n\r\n if (!legacy) {\r\n return null;\r\n }\r\n\r\n await SecureStorage.setItem(key, legacy);\r\n localStorage.removeItem(key);\r\n await Preferences.remove({ key });\r\n\r\n return JSON.parse(legacy);\r\n }\r\n\r\n async getLocalStorage<T = unknown>(key: string) {\r\n if (this.isSecureKey(key)) {\r\n return this.getSecureItem(key);\r\n }\r\n if ((this.platform.ANDROID || this.platform.IOS) && !this.platform?.isBrowser) {\r\n const { value } = await Preferences.get({ key });\r\n return value ? JSON.parse(value) : null;\r\n } else {\r\n const value = localStorage.getItem(key);\r\n\r\n if (value === null) {\r\n return null;\r\n }\r\n\r\n try {\r\n return JSON.parse(value) as T;\r\n } catch {\r\n return value;\r\n }\r\n }\r\n }\r\n\r\n async showAllProjects() {\r\n // The app keeps the project in local storage (setLocalStorage), the browser in session\r\n // storage: both go, otherwise the reload opened the same project again.\r\n await this.removeStorage('selectedProject');\r\n await this.removeLocalStorage('selectedProject');\r\n window.location.reload();\r\n }\r\n\r\n parseBodyObject(obj: any): any {\r\n const jsonString = JSON.stringify(obj);\r\n const replacedString = jsonString.replace(/{{(.*?)}}/g, (match, expression) => {\r\n try {\r\n return new Function(`return ${expression.trim()};`).call(this);\r\n } catch (error) {\r\n console.error(`Error evaluating expression: ${expression}`, error);\r\n return match;\r\n }\r\n });\r\n return JSON.parse(replacedString);\r\n }\r\n\r\n getTotalPrice(tableitemInfo: any): number {\r\n const total = tableitemInfo.data.reduce((total: any, item: any) => {\r\n if (item.quantity && !isNaN(item.quantity)) {\r\n return total + (item.unitPrice * item.quantity);\r\n }\r\n return total;\r\n }, 0);\r\n return total.toFixed(2);\r\n }\r\n\r\n getTotalQuantity(tableitemInfo: any) {\r\n let quantity = 0;\r\n tableitemInfo.data.forEach((cartItem: any) => {\r\n if (cartItem.quantity) {\r\n quantity = cartItem.quantity + quantity;\r\n }\r\n });\r\n return quantity;\r\n }\r\n\r\n replacePaginationParams(url: string, currentPage: number, pageSize: number): string {\r\n if (url && url.includes('{{pageNumber}}')) {\r\n url = url.replace(/{{pageNumber}}/g, currentPage.toString());\r\n }\r\n\r\n if (url && url.includes('{{pageSize}}') && pageSize !== undefined) {\r\n url = url.replace(/{{pageSize}}/g, pageSize.toString());\r\n }\r\n return url;\r\n }\r\n\r\n customButton(option: any, propertySchema: any, projectSeleted: any, environment: any) {\r\n if (option.url) {\r\n let body = {}\r\n if (option.propertyKey) {\r\n body = Object.keys(propertySchema[option.propertyKey]).reduce((acc, key) => {\r\n acc[key] = propertySchema[option.propertyKey][key]?.value;\r\n return acc;\r\n }, {} as Record<string, string>);\r\n }\r\n let url = environment?.apiUrl + option.url;\r\n this.requestService.dynamicCall(option.method, body, url, option.passToken, projectSeleted).subscribe((res) => {\r\n window.location.reload();\r\n })\r\n }\r\n }\r\n\r\n setDefaultUser(item: any, userInfo: any, environment: any) {\r\n let schema: any = item;\r\n let role = \"default\";\r\n /* @contract decision: login.type is one of keycloak, oktaAuth, jwtToken.\r\n The toolkit utility and side menu, and the ViewDefinition runtime,\r\n handle all three sign-in types. */\r\n if (environment?.login?.type === \"keycloak\") {\r\n if (userInfo?.name && item.option?.userRoleMapping) {\r\n schema = item.option[item.option?.userRoleMapping[role]];\r\n }\r\n } else if (environment?.login?.type === \"jwtToken\") {\r\n if (item.option?.loginResponse && item.option?.loginResponse.storageType == \"sessionStorage\") {\r\n if (userInfo) {\r\n role = userInfo[item.option?.loginResponse.role]?.toLowerCase();\r\n }\r\n schema = item.option[item.option?.userRoleMapping[role]];\r\n }\r\n } else if (environment?.login?.type === \"oktaAuth\") {\r\n return schema;\r\n }\r\n return schema;\r\n }\r\n\r\n setTableData(data: any, option: any = {}, tableitemInfo: any, projectSeleted: any) {\r\n if (option?.pagination?.pageSize && option?.pagination?.scrollable) {\r\n tableitemInfo.pageSize = option?.pagination?.pageSize;\r\n }\r\n let records: any;\r\n if (option.dataKey) {\r\n records = data[option.dataKey];\r\n } else if (option.key && data?._embedded) {\r\n records = data?._embedded[option.key];\r\n } else {\r\n if (!data?._embedded?.products && !Array.isArray(data)) {\r\n records = [data];\r\n } else {\r\n records = data?._embedded?.products;\r\n }\r\n }\r\n tableitemInfo.totalRecords = data?.totalPages ? data?.totalPages : data?.page?.totalElements;\r\n tableitemInfo.data = records.map((record: any) => ({\r\n ...record,\r\n ...(record.hasOwnProperty('imageUrl') && record.imageUrl\r\n ? { imageUrl: `${projectSeleted}/Media/` + record.imageUrl.split('/').pop() }\r\n : {})\r\n }));\r\n return tableitemInfo;\r\n }\r\n\r\n setOktaWebCredential(environment: any, projectName: any) {\r\n return {\r\n logo: `favicon.ico`,\r\n baseUrl: environment.login.web.issuer.split('/oauth2')[0],\r\n clientId: environment.login.web.clientId,\r\n redirectUri: environment.login.web.redirectUri,\r\n authParams: {\r\n pkce: true,\r\n issuer: environment.login.web.issuer,\r\n // the form stores login.web.scope; \"scopes\" was read here and never written, so Okta\r\n // web fell back to its own default\r\n scopes: this.oauthScopeList(environment.login.web.scopes ?? environment.login.web.scope)\r\n }\r\n }\r\n }\r\n\r\n setOktaMobileCredential(environment: any) {\r\n return {\r\n appId: environment.login.mobile.clientId,\r\n authorizationBaseUrl: environment.login.mobile.authorizationBaseUrl,\r\n accessTokenEndpoint: environment.login.mobile.accessTokenEndpoint,\r\n redirectUrl: environment.login.mobile.redirectUrl,\r\n scope: this.oauthScope(environment.login.mobile.scope),\r\n responseType: environment.login.mobile.responseType,\r\n pkceEnabled: environment.login.mobile.pkceEnabled\r\n }\r\n }\r\n\r\n\r\n /** OAuth scopes as the list okta-auth-js expects; undefined lets it use its default. */\r\n private oauthScopeList(scope: string | string[] | undefined): string[] | undefined {\r\n const value = Array.isArray(scope) ? scope.join(' ') : scope;\r\n const list = (value || '').split(/\\s+/).filter(Boolean);\r\n return list.length ? list : undefined;\r\n }\r\n\r\n /** OAuth scope as the space separated string the OAuth2 plugin expects. */\r\n private oauthScope(scope: string | string[] | undefined): string {\r\n const value = Array.isArray(scope) ? scope.join(' ') : scope;\r\n return value?.trim() || 'openid profile email';\r\n }\r\n\r\n async setupStripePaymentForm(\r\n environment: any,\r\n form: any,\r\n onCardChange: (message: string) => void\r\n ): Promise<void> {\r\n let hasCreditCard = false;\r\n\r\n if (form.layoutSchema?.formSections) {\r\n form.layoutSchema.formSections.forEach((formSection: any) => {\r\n if (formSection.formFields?.length > 0) {\r\n const foundCreditCard = formSection.formFields.some((formField: any) => {\r\n const scopeKey = this.getScope(formField.scope?.reference);\r\n return form.propertySchema[scopeKey] &&\r\n form.propertySchema[scopeKey][formField.scope?.reference.split('/').pop()]?.type === 'creditCard';\r\n });\r\n if (foundCreditCard) {\r\n hasCreditCard = true;\r\n return;\r\n }\r\n }\r\n });\r\n }\r\n\r\n if (hasCreditCard) {\r\n this.stripe = await loadStripe(environment.stripePublishableKey);\r\n const elements = this.stripe.elements();\r\n const cardElement = elements.create('card', { hidePostalCode: true });\r\n cardElement.mount('#card-element');\r\n\r\n cardElement.on('change', (event: { complete: boolean, error?: { message: string } }) => {\r\n if (event.complete) {\r\n onCardChange('');\r\n } else if (event.error) {\r\n onCardChange(event.error.message);\r\n }\r\n });\r\n }\r\n }\r\n\r\n async formData(form: any, environment: any, cartInfo: any): Promise<void> {\r\n if (form.layoutSchema?.formSections) {\r\n for (const formSection of form.layoutSchema.formSections) {\r\n if (formSection.formFields?.length > 0) {\r\n for (const formField of formSection.formFields) {\r\n const scope = this.getScope(formField.scope?.reference);\r\n const fieldKey = formField.scope?.reference.split('/').pop();\r\n const field = form.propertySchema?.[scope]?.[fieldKey];\r\n\r\n if (!field) continue;\r\n\r\n // Checkbox logic with copy action\r\n if ((field.type === 'boolean' || field.type === 'checkbox') && formField.option?.innerAction?.action === 'copy') {\r\n const fromSchema = form.propertySchema[formField.option.innerAction.from];\r\n const toSchema = form.propertySchema[formField.option.innerAction.to];\r\n const keys = Object.keys(fromSchema);\r\n\r\n keys.forEach((key: any) => {\r\n if (toSchema[key]) {\r\n const sourceValue = fromSchema?.[key]?.value;\r\n toSchema[key].value = sourceValue || '';\r\n }\r\n });\r\n }\r\n\r\n // Dropdown logic (async data fetching)\r\n if (field.type === 'dropdown' && formField.option?.data_url) {\r\n try {\r\n const res: any = await lastValueFrom(this.requestService.getInfo(environment.apiUrl + formField.option.data_url));\r\n const key = Object.keys(res._embedded || {})[0];\r\n if (key) {\r\n field.data = res._embedded[key];\r\n }\r\n } catch (err) {\r\n console.error('Failed to load dropdown data', err);\r\n }\r\n }\r\n\r\n // Cart info logic for string fields\r\n if (field.type === 'string' && formField?.option?.cartInfo) {\r\n if (field.value?.toString()?.includes('{{quantity}}')) {\r\n field.value = cartInfo.quantity;\r\n } else if (field.value?.toString()?.includes('{{totalPrice}}')) {\r\n field.value = cartInfo.totalPrice;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // set date in localstorage\r\n normalizeDatesForStorage(obj: any): any {\r\n const normalized: any = {};\r\n Object.entries(obj).forEach(([key, value]: any) => {\r\n if (this.isDateLike(value)) {\r\n const date = value instanceof Date ? value : new Date(value);\r\n normalized[key] = this.toLocalISOString(date);\r\n } else {\r\n normalized[key] = value;\r\n }\r\n });\r\n return normalized;\r\n }\r\n\r\n\r\n isDateLike(value: any): boolean {\r\n if (!value) return false;\r\n\r\n // Actual Date object\r\n if (value instanceof Date && !isNaN(value.getTime())) {\r\n return true;\r\n }\r\n\r\n // ISO string (UTC or local)\r\n if (typeof value === 'string') {\r\n return false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n toLocalISOString(date: Date): string {\r\n const tzOffset = date.getTimezoneOffset() * 60000;\r\n return new Date(date.getTime() - tzOffset)\r\n .toISOString()\r\n .slice(0, 19);\r\n }\r\n\r\n // restore date Field from localstorage\r\n restoreDatesFromStorage(records: any[], propertySchema: any): any[] {\r\n if (!Array.isArray(records)) return records;\r\n if (!propertySchema) return records;\r\n\r\n return records.map(record => {\r\n const restored = { ...record };\r\n\r\n Object.keys(propertySchema).forEach(scopeKey => {\r\n const schemaGroup = propertySchema[scopeKey];\r\n if (!schemaGroup) return;\r\n\r\n Object.keys(schemaGroup).forEach(fieldKey => {\r\n const fieldSchema = schemaGroup[fieldKey];\r\n const value = restored[fieldKey];\r\n if (!value || typeof value !== 'string') return;\r\n\r\n // ✅ DATE or TIME fields only\r\n if (fieldSchema.type === 'date' || fieldSchema.type === 'time') {\r\n restored[fieldKey] = this.parseLocalISODate(value);\r\n }\r\n });\r\n });\r\n\r\n return restored;\r\n });\r\n }\r\n\r\n parseLocalISODate(value: string): Date {\r\n // Remove Z to avoid UTC shift\r\n const clean = value.replace('Z', '');\r\n const [datePart, timePart = '00:00:00.000'] = clean.split('T');\r\n\r\n const [y, m, d] = datePart.split('-').map(Number);\r\n const [hh = 0, mm = 0, ss = 0, ms = 0] =\r\n timePart.split(/[:.]/).map(Number);\r\n\r\n return new Date(y, m - 1, d, hh, mm, ss, ms);\r\n }\r\n\r\n // savecard conversion\r\n convertToDailyLogs(cardOrCards: any | any[]): any[] {\r\n // Normalize input to array\r\n const cards = Array.isArray(cardOrCards) ? cardOrCards : [cardOrCards];\r\n\r\n const results: any[] = [];\r\n\r\n for (const card of cards) {\r\n\r\n const fromDate = new Date(card.fromDate);\r\n const toDate = new Date(card.toDate);\r\n\r\n const fromTime = new Date(card.workDayTimeFrom);\r\n const toTime = new Date(card.workDayTimeTo);\r\n\r\n // Normalize dates to midnight\r\n const startDay = new Date(fromDate);\r\n startDay.setHours(0, 0, 0, 0);\r\n\r\n const endDay = new Date(toDate);\r\n endDay.setHours(0, 0, 0, 0);\r\n\r\n let currentDay = new Date(startDay);\r\n\r\n while (currentDay <= endDay) {\r\n const isFirstDay = this.isSameDay(currentDay, fromDate);\r\n const isLastDay = this.isSameDay(currentDay, toDate);\r\n const isSameDay = isFirstDay && isLastDay;\r\n\r\n let workFrom: Date;\r\n let workTo: Date;\r\n\r\n // SAME DAY\r\n if (isSameDay) {\r\n workFrom = this.applyTimeToDay(currentDay, fromTime);\r\n workTo = this.applyTimeToDay(currentDay, toTime);\r\n }\r\n // FIRST DAY\r\n else if (isFirstDay) {\r\n workFrom = this.applyTimeToDay(currentDay, fromTime);\r\n workTo = this.endOfDay(currentDay);\r\n }\r\n // LAST DAY\r\n else if (isLastDay) {\r\n workFrom = this.startOfDay(currentDay);\r\n workTo = this.applyTimeToDay(currentDay, toTime);\r\n }\r\n // MIDDLE DAY\r\n else {\r\n workFrom = this.startOfDay(currentDay);\r\n workTo = this.endOfDay(currentDay);\r\n }\r\n\r\n results.push({\r\n comment: card.comments || \"\",\r\n onCallDuty: false,\r\n timeCredit: false,\r\n workDay: this.toLocalISO(currentDay, 0, 0),\r\n workDayTimeFrom: this.toLocalISO(workFrom),\r\n workDayTimeTo: this.toLocalISO(workTo),\r\n workOrderNo: card.workOrderNo,\r\n workType: \"A\"\r\n });\r\n\r\n currentDay.setDate(currentDay.getDate() + 1);\r\n }\r\n }\r\n\r\n return results;\r\n }\r\n private applyTimeToDay(day: Date, time: Date): Date {\r\n const d = new Date(day);\r\n d.setHours(time.getHours(), time.getMinutes(), 0, 0);\r\n return d;\r\n }\r\n\r\n private startOfDay(d: Date): Date {\r\n const x = new Date(d);\r\n x.setHours(0, 0, 0, 0);\r\n return x;\r\n }\r\n\r\n private endOfDay(d: Date): Date {\r\n const x = new Date(d);\r\n x.setHours(23, 59, 0, 0);\r\n return x;\r\n }\r\n\r\n private isSameDay(a: Date, b: Date): boolean {\r\n return (\r\n a.getFullYear() === b.getFullYear() &&\r\n a.getMonth() === b.getMonth() &&\r\n a.getDate() === b.getDate()\r\n );\r\n }\r\n\r\n private toLocalISO(date: Date, hour?: number, minute?: number): string {\r\n const d = new Date(date);\r\n\r\n if (hour !== undefined && minute !== undefined) {\r\n d.setHours(hour, minute, 0, 0);\r\n }\r\n\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n\r\n const year = d.getFullYear();\r\n const month = pad(d.getMonth() + 1);\r\n const day = pad(d.getDate());\r\n const hrs = pad(d.getHours());\r\n const mins = pad(d.getMinutes());\r\n\r\n const offset = -d.getTimezoneOffset();\r\n const sign = offset >= 0 ? '+' : '-';\r\n const offH = pad(Math.floor(Math.abs(offset) / 60));\r\n const offM = pad(Math.abs(offset) % 60);\r\n\r\n return `${year}-${month}-${day}T${hrs}:${mins}:00${sign}${offH}:${offM}`;\r\n }\r\n\r\n getMediaSrc(file: any): string {\r\n if (!file) return '';\r\n if (file.src) {\r\n return file.src;\r\n }\r\n if (file.base64) {\r\n const mimeType = file.mimeType || 'image/png';\r\n return `data:${mimeType};base64,${file.base64}`;\r\n }\r\n if (file.dataUrl) {\r\n return file.dataUrl;\r\n }\r\n return '';\r\n }\r\n\r\n private updateProjectlanguage = new BehaviorSubject<any>(null);\r\n currentProjectlanguage$ = this.updateProjectlanguage.asObservable();\r\n\r\n updateProjectUiLanguage(value: any) {\r\n this.updateProjectlanguage.next(value);\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: calendarLocale(languageCode) builds the date picker's month and day names and the first\r\n// day of the week from Intl - the language data the device brings (iOS, Android, browser alike).\r\n// The calendar stayed English in every language; no list per language has to be maintained\r\n\r\n/** Day 1 = Monday ... 7 = Sunday (Intl.Locale weekInfo), as PrimeNG's 0 = Sunday ... 6. */\r\nfunction firstDayOfWeek(languageCode: string): number {\r\n try {\r\n const locale: any = new (Intl as any).Locale(languageCode);\r\n const info = locale.getWeekInfo?.() ?? locale.weekInfo;\r\n\r\n if (info?.firstDay) {\r\n return info.firstDay % 7;\r\n }\r\n } catch {\r\n // Older WebViews without weekInfo.\r\n }\r\n\r\n // Monday, the rule in most European languages; English without region starts on Sunday.\r\n return languageCode === 'en' ? 0 : 1;\r\n}\r\n\r\n/** PrimeNG translation values for the date picker in `languageCode` (e.g. \"de\", \"es\"). */\r\nexport function calendarLocale(languageCode: string): Record<string, any> {\r\n const lang = languageCode || 'en';\r\n const names = (options: Intl.DateTimeFormatOptions, dates: Date[]) =>\r\n dates.map(date => new Intl.DateTimeFormat(lang, options).format(date));\r\n // 2023-01-01 was a Sunday: Sunday ... Saturday, as PrimeNG expects.\r\n const week = Array.from({ length: 7 }, (_, i) => new Date(2023, 0, 1 + i));\r\n const months = Array.from({ length: 12 }, (_, i) => new Date(2023, i, 1));\r\n const short = names({ weekday: 'short' }, week).map(name => name.replace(/\\.$/, ''));\r\n\r\n return {\r\n firstDayOfWeek: firstDayOfWeek(lang),\r\n dayNames: names({ weekday: 'long' }, week),\r\n dayNamesShort: short,\r\n dayNamesMin: short.map(name => name.slice(0, 2)),\r\n monthNames: names({ month: 'long' }, months),\r\n monthNamesShort: names({ month: 'short' }, months).map(name => name.replace(/\\.$/, ''))\r\n };\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-16\r\n// - fix: with a mouse the calendar/time picker opens after the click - the click closed it at once\r\n// - change: docked like on the devices wherever toolkitKeyboardActive() (also in the Designer preview);\r\n// the resize listener is always there and does nothing without a docked panel\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: the docked calendar takes the page's background colour, like the keyboard\r\n// - new: the calendar follows the project language (calendarLocale, from Intl); it was English\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - change: the time picker opens below its field in landscape too, as upright. With too little room\r\n// below (a phone in landscape) PrimeNG put it above the field and it covered the field before;\r\n// now the field scrolls up first so that the picker fits below it\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: DateTimePickerService, the date and time picker behaviour for every container. It lived\r\n// in the dialog only, so the filter dates of a card, the form and the grid still opened the\r\n// calendar and the system keyboard together - the bug this work started from. One picker can be\r\n// open in the whole app, so its state belongs to one root service, not to each component:\r\n// tapping the field opens the toolkit keyboard, the calendar icon the calendar docked at the\r\n// bottom, the clock icon the compact time picker at its field, and the screen stays still.\r\n// - new: the docked calendar keeps the height of six week rows, so paging through months with\r\n// five and six weeks no longer moves it up and down\r\n//\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-09\r\n// - fix: the calendar opened from its icon closed again at once on the iPhone. PrimeNG closes a\r\n// picker when anything around it scrolls - and lining the field up above the docked calendar is\r\n// a scroll. The docked calendar does not hang at its field, so it no longer closes on scrolling;\r\n// only it is lined up, the time picker at its field is not moved\r\n// - fix: a tap into a date field right after closing its calendar brought up the system keyboard\r\n// instead of the toolkit one. PrimeNG reports the close a second time, late; handling it again\r\n// suspended keyboards for 250 ms, the toolkit keyboard fell into that window. A close of a picker\r\n// that is no longer the active one is ignored now\r\n// - fix: the calendar and clock icons waited half a second for the system keyboard to hide even\r\n// when none was open - always the case with the toolkit keyboard. They wait only for an open one\r\n// - change: hands the keyboard service a way to close the open picker, used when a field outside\r\n// the picker is tapped\r\n// - fix: turning the device with the calendar open kept its old height reserved; it is measured\r\n// and the field lined up again on resize\r\n// - new: where a calendar docked at the bottom would leave only the dialog's title bar - a phone\r\n// in landscape - it docks at the right edge over the full height, like the keyboard\r\n// (CustomKeyboardService.dockAtSide decides for both)\r\n// - change: the docked calendar is exactly as high as the keyboard, its day cells sized to fit six\r\n// week rows; with fixed cells it took up to half of a phone held upright, far more than the\r\n// keyboard it replaces\r\n\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { PrimeNG } from 'primeng/config';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { calendarLocale } from '../../services/calendar-locale';\r\nimport { Capacitor, PluginListenerHandle } from '@capacitor/core';\r\nimport { Keyboard } from '@capacitor/keyboard';\r\nimport { CustomKeyboardService, SIDE_DOCK_CLASS } from './custom-keyboard.service';\r\nimport { toolkitKeyboardActive } from './toolkit-keyboard-mode';\r\n\r\ninterface LockedPickerInput {\r\n input: HTMLInputElement;\r\n originalReadOnly: boolean;\r\n originalInputMode: string | null;\r\n}\r\n\r\n\r\n/** Room the compact time picker needs below its field (its height and a gap). */\r\nconst TIME_PANEL_ROOM = 104;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DateTimePickerService {\r\n /** On the devices the date picker docks at the bottom like a keyboard; in a browser it drops down. */\r\n get isNativeMobile(): boolean {\r\n return toolkitKeyboardActive();\r\n }\r\n\r\n /** panelStyleClass of a date picker. */\r\n get datePanelClass(): string {\r\n return this.isNativeMobile\r\n ? 'model-datepicker-panel model-datepicker-panel--docked'\r\n : 'model-datepicker-panel';\r\n }\r\n\r\n /** panelStyleClass of a time picker: compact and attached to its field everywhere. */\r\n readonly timePanelClass = 'model-datepicker-panel model-timepicker-panel';\r\n\r\n /**\r\n * The docked date picker runs without PrimeNG's open/close animation. The animation scales the\r\n * wrapper around the panel, and a transformed wrapper becomes the reference of the panel's\r\n * position: fixed - the docked calendar flew up next to its field while closing.\r\n */\r\n get dockedMotion(): { disabled: boolean } | undefined {\r\n return this.isNativeMobile ? { disabled: true } : undefined;\r\n }\r\n\r\n private activePicker: any = null;\r\n private activePickerRequest: symbol | null = null;\r\n private pickerOpening = false;\r\n /** Whether the system keyboard is up; only then does an icon have to wait for it to hide. */\r\n private systemKeyboardVisible = false;\r\n private lockedPickerInput: LockedPickerInput | null = null;\r\n\r\n constructor(private readonly keyboard: CustomKeyboardService) {\r\n // Month and day names in the project language, from the device's language data.\r\n const primeng = inject(PrimeNG);\r\n inject(UtilityService).currentProjectlanguage$.subscribe((uiLang: any) => {\r\n if (uiLang?.languageCode) {\r\n primeng.setTranslation(calendarLocale(uiLang.languageCode));\r\n }\r\n });\r\n\r\n // Turning the device with the docked calendar open: measure and line up again.\r\n {\r\n window.addEventListener('resize', () => {\r\n const docked = document.querySelector<HTMLElement>('.model-datepicker-panel--docked');\r\n\r\n if (!docked) {\r\n return;\r\n }\r\n\r\n // The six-row height of the other orientation would stay otherwise.\r\n docked.style.minHeight = '';\r\n\r\n window.requestAnimationFrame(() => this.placeDockedPanel(docked));\r\n });\r\n }\r\n\r\n this.keyboard.setPickerCloser(() =>\r\n this.closeActivePicker(undefined, { suspendReopen: false, keepBottomArea: true })\r\n );\r\n\r\n // the system keyboard exists only on the device - not in the preview (plugin missing on web)\r\n if (Capacitor.isNativePlatform()) {\r\n void Keyboard.addListener('keyboardWillShow', () => (this.systemKeyboardVisible = true));\r\n void Keyboard.addListener('keyboardDidHide', () => (this.systemKeyboardVisible = false));\r\n }\r\n }\r\n\r\n /** (onShow) of a picker. */\r\n onShown(): void {\r\n this.pickerOpening = true;\r\n\r\n if (!this.isNativeMobile) {\r\n return;\r\n }\r\n\r\n /*\r\n * A docked panel stands where the keyboard would; the dialog ends above it. Measured one\r\n * frame later, once PrimeNG has laid the panel out. A picker at its field needs no area.\r\n */\r\n window.requestAnimationFrame(() => {\r\n const docked = document.querySelector<HTMLElement>('.model-datepicker-panel--docked');\r\n\r\n /*\r\n * PrimeNG closes a picker on any scroll around it, so that it never floats away from\r\n * its field. The docked calendar stands at the bottom and has no field to float away\r\n * from - and the next lines scroll: the dialog shrinks above it and the field is lined\r\n * up. Without this it closed again right after opening.\r\n */\r\n if (docked) {\r\n this.activePicker?.unbindScrollListener?.();\r\n }\r\n\r\n this.placeDockedPanel(docked);\r\n });\r\n }\r\n\r\n /**\r\n * Side or bottom - the keyboard service decides from the space at hand, the same for the\r\n * keyboard, so switching between calendar and keyboard never moves the dialog. At the side the\r\n * calendar stands at the right edge over the full height with the dialog beside it; at the\r\n * bottom it docks like a keyboard and the dialog ends above it. Decided again on every resize.\r\n */\r\n private placeDockedPanel(docked: HTMLElement | null): void {\r\n if (docked) {\r\n this.keyboard.applyPageBackground();\r\n }\r\n\r\n if (docked && this.keyboard.dockAtSide()) {\r\n docked.style.minHeight = '';\r\n docked.style.height = '';\r\n this.keyboard.useSideDock();\r\n window.requestAnimationFrame(() => {\r\n // Day cells sized to fill the height it now has beside the dialog.\r\n this.fitDays(docked, docked.getBoundingClientRect().height);\r\n this.scrollFieldIntoDialog();\r\n });\r\n return;\r\n }\r\n\r\n // Out of the side layout before measuring; at the side the panel is screen-high.\r\n document.body.classList.remove(SIDE_DOCK_CLASS);\r\n this.fitToKeyboardHeight(docked);\r\n this.keyboard.reserveBottomArea(docked);\r\n\r\n if (docked) {\r\n window.requestAnimationFrame(() => this.scrollFieldAbovePicker());\r\n }\r\n }\r\n\r\n /** Side dock: the field only has to be inside the dialog's visible part. */\r\n private scrollFieldIntoDialog(): void {\r\n const field = this.lockedPickerInput?.input;\r\n const content = field?.closest<HTMLElement>('.p-dialog-content');\r\n\r\n if (!field || !content) {\r\n return;\r\n }\r\n\r\n const spacing = 12;\r\n const f = field.getBoundingClientRect();\r\n const c = content.getBoundingClientRect();\r\n\r\n if (f.bottom > c.bottom - spacing) {\r\n content.scrollTop += f.bottom - (c.bottom - spacing);\r\n } else if (f.top < c.top + spacing) {\r\n content.scrollTop -= c.top + spacing - f.top;\r\n }\r\n }\r\n\r\n /** (onClose) of a picker; pass the picker so a late close of a replaced one is ignored. */\r\n onClose(picker?: any): void {\r\n /*\r\n * A picker that was closed because another one is opening reports onClose late, after\r\n * its leave animation. It must not cancel the request of the picker opening now. The same\r\n * for a picker the toolkit closed itself (tap into the field): handling its late close\r\n * again suspended the keyboard the tap was opening.\r\n */\r\n if (picker && picker !== this.activePicker) {\r\n return;\r\n }\r\n\r\n /*\r\n * Closed by a selection (not by a tap into the field, which unlocks the field first):\r\n * PrimeNG hands the focus back to the field, which then showed a focus frame without a\r\n * keyboard.\r\n */\r\n const lockedInput = this.lockedPickerInput?.input;\r\n\r\n if (lockedInput && document.activeElement === lockedInput) {\r\n lockedInput.blur();\r\n }\r\n\r\n this.activePicker = null;\r\n this.activePickerRequest = null;\r\n this.pickerOpening = false;\r\n this.unlockPickerInput();\r\n\r\n this.keyboard.endPickerOverlay();\r\n }\r\n\r\n /** (pointerdown) of the calendar or clock icon inside a .picker-field. */\r\n async openFromIcon(event: PointerEvent, picker: any): Promise<void> {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n event.stopImmediatePropagation();\r\n\r\n if (this.pickerOpening) {\r\n if (this.activePicker === picker) {\r\n return;\r\n }\r\n\r\n // Another picker is still open: close it and open the requested one.\r\n this.closeActivePicker();\r\n }\r\n\r\n const button = event.currentTarget as HTMLElement;\r\n this.swallowShiftedClick(button);\r\n\r\n const pickerInput = button\r\n .closest('.picker-field')\r\n ?.querySelector<HTMLInputElement>('input');\r\n\r\n if (!pickerInput || pickerInput.disabled) {\r\n return;\r\n }\r\n\r\n /*\r\n * preventDefault keeps the focus where it was, so whatever field had it - an autocomplete\r\n * with its list and keyboard, say - would stay open next to the picker. Let go of it.\r\n */\r\n const focused = document.activeElement;\r\n\r\n if (focused instanceof HTMLElement && focused !== pickerInput) {\r\n focused.blur();\r\n }\r\n\r\n const request = Symbol('picker-open');\r\n this.activePicker = picker;\r\n this.activePickerRequest = request;\r\n this.pickerOpening = true;\r\n\r\n this.lockPickerInput(pickerInput);\r\n pickerInput.blur();\r\n this.keyboard.beginPickerOverlay();\r\n\r\n let keyboardDidHideListener: PluginListenerHandle | undefined;\r\n let resolveKeyboardHidden: (() => void) | undefined;\r\n\r\n const keyboardHidden = new Promise<void>(resolve => {\r\n resolveKeyboardHidden = resolve;\r\n });\r\n\r\n try {\r\n if (Capacitor.isNativePlatform() && this.systemKeyboardVisible) {\r\n keyboardDidHideListener = await Keyboard.addListener(\r\n 'keyboardDidHide',\r\n () => resolveKeyboardHidden?.()\r\n );\r\n\r\n await Keyboard.hide().catch(() => {\r\n // The native keyboard may already be hidden.\r\n });\r\n\r\n await Promise.race([\r\n keyboardHidden,\r\n new Promise<void>(resolve => {\r\n window.setTimeout(resolve, 500);\r\n })\r\n ]);\r\n }\r\n\r\n // With a mouse the click follows the pointerdown and counts for PrimeNG as a click outside:\r\n // a picker opened now was closed at once. Open it after that click (or after 600 ms).\r\n if (!Capacitor.isNativePlatform() && event.pointerType === 'mouse') {\r\n await new Promise<void>(resolve => {\r\n const done = (): void => {\r\n document.removeEventListener('click', done, true);\r\n window.clearTimeout(timer);\r\n window.setTimeout(resolve);\r\n };\r\n const timer = window.setTimeout(done, 600);\r\n document.addEventListener('click', done, true);\r\n });\r\n }\r\n\r\n if (Capacitor.isNativePlatform()) {\r\n // Let the layout settle after the keyboard - system or toolkit - has gone.\r\n await new Promise<void>(resolve => {\r\n window.requestAnimationFrame(() => {\r\n window.requestAnimationFrame(() => resolve());\r\n });\r\n });\r\n }\r\n\r\n // The user may have tapped the input while Keyboard.hide() was pending.\r\n if (this.activePickerRequest !== request) {\r\n return;\r\n }\r\n\r\n if (Capacitor.isNativePlatform()) {\r\n window.dispatchEvent(new Event('resize'));\r\n }\r\n\r\n /*\r\n * PrimeNG 21 DatePicker has no show(); showOverlay() is the API. The picker is OnPush,\r\n * so it is rendered explicitly - otherwise the overlay only appeared on the next event\r\n * inside it, a tap on the input, together with a keyboard.\r\n */\r\n if (picker.timeOnly) {\r\n this.makeRoomBelow(pickerInput);\r\n }\r\n\r\n picker.showOverlay();\r\n picker.cd?.markForCheck();\r\n picker.cd?.detectChanges();\r\n } catch (error) {\r\n if (this.activePickerRequest === request) {\r\n this.activePicker = null;\r\n this.activePickerRequest = null;\r\n this.pickerOpening = false;\r\n this.unlockPickerInput();\r\n this.keyboard.endPickerOverlay();\r\n }\r\n\r\n console.warn('Unable to open date/time picker:', error);\r\n } finally {\r\n await keyboardDidHideListener?.remove().catch(() => {\r\n // Listener may already be removed.\r\n });\r\n }\r\n }\r\n\r\n /** (click) of the icon. */\r\n blockIconClick(event: MouseEvent): void {\r\n /*\r\n * No stopPropagation: the click has to reach the document, where PrimeNG closes other open\r\n * lists (autocomplete, dropdown) on an outside click.\r\n */\r\n event.preventDefault();\r\n }\r\n\r\n /** (pointerdown) of the p-datepicker: a tap into its field while a picker is open. */\r\n onFieldPointerDown(event: PointerEvent, picker: any): void {\r\n const target = event.target;\r\n\r\n if (!(target instanceof HTMLInputElement)) {\r\n return;\r\n }\r\n\r\n this.configureDateTimeInput(target);\r\n\r\n if (!this.pickerOpening) {\r\n return;\r\n }\r\n\r\n /*\r\n * Close the picker that is actually open and let this tap bring up the keyboard of the\r\n * field; the bottom area stays until the keyboard takes it, so the field does not move\r\n * away under the finger.\r\n */\r\n this.closeActivePicker(picker, { suspendReopen: false, keepBottomArea: true });\r\n }\r\n\r\n /** (onFocus) of the p-datepicker. */\r\n onFieldFocus(event: any): void {\r\n const input = (event?.target ?? event?.originalEvent?.target) as HTMLInputElement;\r\n\r\n if (input?.tagName === 'INPUT' && this.lockedPickerInput?.input !== input) {\r\n this.configureDateTimeInput(input);\r\n }\r\n }\r\n\r\n /**\r\n * For ngOnDestroy of a container: a picker can still be open when its dialog or page goes away.\r\n * Without this the keyboard service keeps \"picker open\" and the reserved bottom area: no\r\n * toolkit keyboard opens any more and the next dialog is cut short above an empty strip.\r\n */\r\n closeIfWithin(container: HTMLElement): void {\r\n const input = this.lockedPickerInput?.input;\r\n const host = this.activePicker?.el?.nativeElement as HTMLElement | undefined;\r\n\r\n if (\r\n (input && container.contains(input)) ||\r\n (host && container.contains(host))\r\n ) {\r\n this.closeActivePicker();\r\n }\r\n }\r\n\r\n /**\r\n * The docked calendar is exactly as high as the keyboard, so switching between the two moves\r\n * nothing; the day cells are sized to fit the header, the weekdays and always six week rows,\r\n * so paging through months with five and six weeks does not change its height either.\r\n */\r\n private fitToKeyboardHeight(panel: HTMLElement | null): void {\r\n if (!panel) {\r\n return;\r\n }\r\n\r\n const height = this.keyboard.keyboardHeight();\r\n panel.style.minHeight = '';\r\n panel.style.height = `${height}px`;\r\n this.fitDays(panel, height);\r\n }\r\n\r\n /** Day cells as large as the panel's height allows for its header, the weekdays and six weeks. */\r\n private fitDays(panel: HTMLElement, height: number): void {\r\n const style = getComputedStyle(panel);\r\n const padding = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);\r\n const header = panel.querySelector<HTMLElement>('.p-datepicker-header')?.getBoundingClientRect().height ?? 0;\r\n const weekdays = panel.querySelector<HTMLElement>('.p-datepicker-day-view thead')?.getBoundingClientRect().height ?? 0;\r\n const perRow = Math.floor((height - padding - header - weekdays - 8) / 6);\r\n // Seven columns have to fit the width as well.\r\n const paddingX = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\r\n const perColumn = Math.floor((panel.getBoundingClientRect().width - paddingX - 8) / 7);\r\n // Cell padding of 1 px on each side, see the stylesheet.\r\n const day = Math.max(22, Math.min(44, perRow - 2, perColumn - 2));\r\n\r\n panel.style.setProperty('--vl-day-size', `${day}px`);\r\n }\r\n\r\n /**\r\n * The time picker hangs below its field - upright there is room. Where there is not (a phone in\r\n * landscape), the field scrolls up first; PrimeNG would put the picker above it otherwise.\r\n */\r\n private makeRoomBelow(input: HTMLElement): void {\r\n const field = input.closest<HTMLElement>('.picker-field') ?? input;\r\n let scroller = field.parentElement;\r\n\r\n while (scroller && !(/(auto|scroll)/.test(getComputedStyle(scroller).overflowY) && scroller.scrollHeight > scroller.clientHeight)) {\r\n scroller = scroller.parentElement;\r\n }\r\n\r\n if (!scroller) {\r\n return;\r\n }\r\n\r\n const visibleBottom = Math.min(scroller.getBoundingClientRect().bottom, window.innerHeight);\r\n const missing = field.getBoundingClientRect().bottom + TIME_PANEL_ROOM - visibleBottom;\r\n\r\n if (missing > 0) {\r\n scroller.scrollTop += missing;\r\n }\r\n }\r\n\r\n /**\r\n * Scrolls the dialog so the field sits right above the docked picker: the eye and the thumb\r\n * move a short way from the value to the picker instead of across the whole screen.\r\n */\r\n private scrollFieldAbovePicker(): void {\r\n const field = this.lockedPickerInput?.input;\r\n const content = field?.closest<HTMLElement>('.p-dialog-content');\r\n\r\n if (!field || !content) {\r\n return;\r\n }\r\n\r\n const spacing = 12;\r\n const fieldBottom = field.getBoundingClientRect().bottom;\r\n const contentBottom = content.getBoundingClientRect().bottom - spacing;\r\n\r\n content.scrollTop += fieldBottom - contentBottom;\r\n }\r\n\r\n private configureDateTimeInput(input: HTMLInputElement): void {\r\n // On the devices the toolkit keyboard types into these fields; inputmode belongs to it.\r\n if (this.isNativeMobile) {\r\n return;\r\n }\r\n\r\n input.setAttribute('inputmode', 'numeric');\r\n input.setAttribute('pattern', '[0-9:]*');\r\n input.setAttribute('autocomplete', 'off');\r\n }\r\n\r\n private lockPickerInput(input: HTMLInputElement): void {\r\n this.unlockPickerInput();\r\n\r\n this.lockedPickerInput = {\r\n input,\r\n originalReadOnly: input.readOnly,\r\n originalInputMode: input.getAttribute('inputmode')\r\n };\r\n\r\n // Prevent PrimeNG focus changes from reopening the native keyboard.\r\n input.readOnly = true;\r\n input.setAttribute('inputmode', 'none');\r\n\r\n // The field loses its focus to keep keyboards away; mark it so its picker stays traceable.\r\n input.closest('.picker-field')?.classList.add('picker-field--active');\r\n }\r\n\r\n private unlockPickerInput(): void {\r\n const locked = this.lockedPickerInput;\r\n\r\n if (!locked) {\r\n return;\r\n }\r\n\r\n locked.input.closest('.picker-field')?.classList.remove('picker-field--active');\r\n locked.input.readOnly = locked.originalReadOnly;\r\n\r\n if (locked.originalInputMode === null) {\r\n locked.input.removeAttribute('inputmode');\r\n } else {\r\n locked.input.setAttribute('inputmode', locked.originalInputMode);\r\n }\r\n\r\n this.lockedPickerInput = null;\r\n }\r\n\r\n /**\r\n * The pointerdown on the icon closes the toolkit keyboard and the layout below the finger can\r\n * change. The click that follows lands wherever the finger is now - in the emulator it opened\r\n * the autocomplete list of the field that had moved under it. A click that no longer hits the\r\n * icon is dropped; one on the icon passes, so other lists still close on it.\r\n */\r\n private swallowShiftedClick(button: HTMLElement): void {\r\n const handler = (click: MouseEvent): void => {\r\n document.removeEventListener('click', handler, true);\r\n window.clearTimeout(timer);\r\n\r\n if (click.target instanceof Node && button.contains(click.target)) {\r\n return;\r\n }\r\n\r\n click.preventDefault();\r\n click.stopImmediatePropagation();\r\n };\r\n\r\n const timer = window.setTimeout(\r\n () => document.removeEventListener('click', handler, true),\r\n 800\r\n );\r\n\r\n document.addEventListener('click', handler, true);\r\n }\r\n\r\n private closeActivePicker(\r\n fallbackPicker?: any,\r\n option: { suspendReopen?: boolean; keepBottomArea?: boolean } = {}\r\n ): void {\r\n const openPicker = this.activePicker ?? fallbackPicker;\r\n\r\n this.activePicker = null;\r\n this.activePickerRequest = null;\r\n this.unlockPickerInput();\r\n this.pickerOpening = false;\r\n\r\n try {\r\n /*\r\n * Not hideOverlay(): it focuses the picker's own input, which would open a keyboard on\r\n * the field being left.\r\n */\r\n if (openPicker) {\r\n openPicker.overlayVisible = false;\r\n openPicker.clearTimePickerTimer?.();\r\n openPicker.cd?.markForCheck();\r\n }\r\n } catch {\r\n // Picker may already be closing.\r\n }\r\n\r\n this.keyboard.endPickerOverlay(option);\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: resolvePlaceholder / vlPlaceholder, the one place that reads a field's placeholder from the\r\n// project's property schema. Every control asked for it itself; where the project defines none,\r\n// the DOM turned the missing value into the text \"undefined\". Now it is empty\r\n\r\nimport { Pipe, PipeTransform } from '@angular/core';\r\n\r\n/** \"#/workOrder/properties/comments\" -> \"workOrder\" (the object the field belongs to). */\r\nfunction scopeOf(reference: string): string {\r\n const start = reference.indexOf('#/') + 2;\r\n const end = reference.indexOf('/', start);\r\n\r\n return start >= 2 && end > start ? reference.substring(start, end) : '';\r\n}\r\n\r\n/**\r\n * The placeholder of the field `reference` in `propertySchema`, translated when the selected\r\n * language has an entry for it; empty when the project defines none.\r\n */\r\nexport function resolvePlaceholder(\r\n propertySchema: any,\r\n reference: string | null | undefined,\r\n translations?: Record<string, string> | null\r\n): string {\r\n if (!propertySchema || !reference) {\r\n return '';\r\n }\r\n\r\n const placeholder = propertySchema[scopeOf(reference)]?.[reference.split('/').pop() ?? '']?.placeholder;\r\n\r\n if (typeof placeholder !== 'string' || !placeholder) {\r\n return '';\r\n }\r\n\r\n return translations?.[placeholder] || placeholder;\r\n}\r\n\r\n/** Template form of resolvePlaceholder: [placeholder]=\"propertySchema | vlPlaceholder: reference\". */\r\n@Pipe({\r\n name: 'vlPlaceholder',\r\n standalone: true\r\n})\r\nexport class PlaceholderPipe implements PipeTransform {\r\n transform(propertySchema: any, reference: string | null | undefined, translations?: Record<string, string> | null): string {\r\n return resolvePlaceholder(propertySchema, reference, translations);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NotificationService {\r\n\r\n constructor(public toastr: ToastrService) { }\r\n\r\n success(message: string, time: number = 5000) {\r\n this.toastr.success(message, \"\", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n\r\n info(message: string, time: number = 5000) {\r\n this.toastr.info(message, \"\", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n\r\n warning(message: string, time: number = 20000) {\r\n this.toastr.warning(message, \"\", { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n\r\n error(error: string, time: number = 20000, message?: string,) {\r\n this.toastr.error(error, message, { messageClass: 'toaster-font', titleClass: 'toaster-font', closeButton: true, timeOut: time });\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: RequestTimeoutService / stagedRequest, one waiting rule for every request of the runtime\r\n// (HttpClient through the app's interceptor, CapacitorHttp and fetch through stagedRequest):\r\n// after 10 s a hint, after 30 s a second one, after 60 s the request is given up with a message.\r\n// Nothing is sent again - a save whose answer is late may have arrived, a resend would store it\r\n// twice. Before, a request without an answer left its spinner turning for ever. The texts come\r\n// from the app (framework translation, setMessages); English until it sets them\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { NotificationService } from './notification.service';\r\n\r\nexport interface RequestTimeoutMessages {\r\n requestSlow: string;\r\n requestStillSlow: string;\r\n requestTimeout: string;\r\n}\r\n\r\n/** Thrown when a request was given up after the last stage. */\r\nexport class RequestTimeoutError extends Error {\r\n constructor() {\r\n super('Request timed out');\r\n this.name = 'RequestTimeoutError';\r\n }\r\n}\r\n\r\n/** Stages in ms: first hint, second hint, give up. */\r\nexport const REQUEST_STAGES = { slow: 10_000, stillSlow: 30_000, timeout: 60_000 } as const;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RequestTimeoutService {\r\n /** For code outside Angular's injection (stagedRequest). */\r\n static instance: RequestTimeoutService | null = null;\r\n\r\n private messages: RequestTimeoutMessages = {\r\n requestSlow: 'This is taking longer than usual …',\r\n requestStillSlow: 'The server is still not responding. Please wait …',\r\n requestTimeout: 'The server is not responding. Please check your connection and try again.'\r\n };\r\n\r\n /** When each message was shown last; several requests waiting at once show it only once. */\r\n private lastShown: Partial<Record<keyof RequestTimeoutMessages, number>> = {};\r\n\r\n constructor(private readonly notification: NotificationService) {\r\n RequestTimeoutService.instance = this;\r\n }\r\n\r\n /** The texts in the current language (from the app's framework translation). */\r\n setMessages(messages: Partial<RequestTimeoutMessages> | null | undefined): void {\r\n for (const key of Object.keys(this.messages) as (keyof RequestTimeoutMessages)[]) {\r\n const text = messages?.[key];\r\n\r\n if (typeof text === 'string' && text) {\r\n this.messages[key] = text;\r\n }\r\n }\r\n }\r\n\r\n /** Shows a stage's message, at most once per stage interval. */\r\n notify(stage: keyof RequestTimeoutMessages): void {\r\n const now = Date.now();\r\n\r\n if (now - (this.lastShown[stage] ?? 0) < REQUEST_STAGES.slow) {\r\n return;\r\n }\r\n\r\n this.lastShown[stage] = now;\r\n const text = this.messages[stage];\r\n\r\n if (stage === 'requestTimeout') {\r\n this.notification.error(text, 8000);\r\n } else {\r\n this.notification.info(text, 6000);\r\n }\r\n }\r\n\r\n /**\r\n * Runs one request under the waiting rule. `work` gets an AbortSignal (fetch can use it);\r\n * after the last stage the signal aborts and the promise rejects with RequestTimeoutError.\r\n */\r\n async run<T>(work: (signal: AbortSignal) => Promise<T>): Promise<T> {\r\n const controller = new AbortController();\r\n const timers: ReturnType<typeof setTimeout>[] = [];\r\n\r\n const gaveUp = new Promise<never>((_, reject) => {\r\n timers.push(setTimeout(() => this.notify('requestSlow'), REQUEST_STAGES.slow));\r\n timers.push(setTimeout(() => this.notify('requestStillSlow'), REQUEST_STAGES.stillSlow));\r\n timers.push(setTimeout(() => {\r\n controller.abort();\r\n this.notify('requestTimeout');\r\n reject(new RequestTimeoutError());\r\n }, REQUEST_STAGES.timeout));\r\n });\r\n\r\n try {\r\n return await Promise.race([work(controller.signal), gaveUp]);\r\n } finally {\r\n timers.forEach(clearTimeout);\r\n }\r\n }\r\n}\r\n\r\n/** A request under the waiting rule (RequestTimeoutService.run); runs plainly before Angular is up. */\r\nexport function stagedRequest<T>(work: (signal: AbortSignal) => Promise<T>): Promise<T> {\r\n const service = RequestTimeoutService.instance;\r\n\r\n return service ? service.run(work) : work(new AbortController().signal);\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - change: the web autocomplete goes through backendUrl (/api/proxy/<host>/...) instead of the\r\n// /p5ws path only ng serve forwarded\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: RemoteListService, the one place that loads a field's list from the backend\r\n// (option.autocomplete: url, method, params with {{userInfo.x}} and company), under the waiting\r\n// rule of every request. Only the dialog loaded such lists; card, grid and form showed their\r\n// autocompletes empty. Moved here from ModelComponent unchanged apart from load()\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { Capacitor, CapacitorHttp } from '@capacitor/core';\r\nimport { stagedRequest } from './request-timeout.service';\r\nimport { backendUrl as viaBackendProxy } from './backend-url';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RemoteListService {\r\n /** The signed-in user (claims + token), set by the app; used when a caller has none. */\r\n private currentUser: any = null;\r\n\r\n setUser(userInfo: any): void {\r\n this.currentUser = userInfo ?? null;\r\n }\r\n\r\n /** Lists already loaded, by request (url + params), so a page does not ask twice. */\r\n private readonly cache = new Map<string, Promise<any[]>>();\r\n\r\n /** Like load(), with the current user and one request per source while the app runs. */\r\n loadShared(config: any): Promise<any[]> {\r\n if (!config || !this.currentUser) {\r\n return Promise.resolve([]);\r\n }\r\n\r\n const key = JSON.stringify({ url: config.url, method: config.method, params: config.params, user: this.currentUser?.sub ?? this.currentUser?.email });\r\n\r\n if (!this.cache.has(key)) {\r\n const request = this.load(config, this.currentUser).catch(error => {\r\n this.cache.delete(key);\r\n console.warn('Backend list could not be loaded', config?.url, error);\r\n return [] as any[];\r\n });\r\n this.cache.set(key, request);\r\n }\r\n\r\n return this.cache.get(key)!;\r\n }\r\n /** Loads the list a field's source describes (option.autocomplete: url, method, params). */\r\n async load(config: any, userInfo: any = this.currentUser): Promise<any[]> {\r\n if (!config) return [];\r\n const request: any = this.resolveAutocompleteConfig(config, userInfo);\r\n // Under the waiting rule of every request (hints after 10 and 30 s, given up after 60 s).\r\n const response = await stagedRequest(() => CapacitorHttp.request({\r\n url: request.url,\r\n method: request.method,\r\n params: request.params,\r\n headers: request.headers\r\n }));\r\n\r\n if (response.status >= 400) {\r\n throw new Error(`Autocomplete request failed: ${response.status}`);\r\n }\r\n\r\n return Array.isArray(response.data) ? response.data : [];\r\n }\r\n\r\n resolveAutocompleteConfig(\r\n config: any,\r\n userInfo: any\r\n ) {\r\n const params: any = {};\r\n\r\n Object.entries(\r\n config.params || {}\r\n ).forEach(([key, value]: any) => {\r\n // Dynamic token\r\n if (\r\n typeof value === 'string' &&\r\n value.includes('{{')\r\n ) {\r\n params[key] =\r\n this.resolveToken(\r\n value,\r\n userInfo\r\n );\r\n }\r\n // Computed parameter\r\n else if (value?.type === 'company') {\r\n params[key] =\r\n this.buildCompany(userInfo);\r\n }\r\n // Static parameter\r\n else {\r\n params[key] = value;\r\n }\r\n });\r\n\r\n const requestUrl =\r\n this.getAutocompleteRequestUrl(\r\n userInfo?.p5_backend_url,\r\n config?.url\r\n );\r\n\r\n return {\r\n url: requestUrl,\r\n method: config.method || 'POST',\r\n params,\r\n headers: config.passToken\r\n ? {\r\n Authorization:\r\n `Bearer ${userInfo.token}`,\r\n Accept: 'application/json'\r\n }\r\n : {}\r\n };\r\n }\r\n\r\n private getAutocompleteRequestUrl(\r\n backendUrl: string,\r\n endpoint: string\r\n ): string {\r\n const normalizedBackendUrl = backendUrl?.trim()?.replace(/\\/+$/, '');\r\n const normalizedEndpoint = endpoint?.trim();\r\n\r\n if (!normalizedBackendUrl) {\r\n throw new Error(\r\n 'Missing p5_backend_url for autocomplete request'\r\n );\r\n }\r\n\r\n if (!normalizedEndpoint) {\r\n throw new Error(\r\n 'Missing autocomplete endpoint URL'\r\n );\r\n }\r\n\r\n if (Capacitor.isNativePlatform()) {\r\n if (\r\n /^https?:\\/\\//i.test(\r\n normalizedEndpoint\r\n )\r\n ) {\r\n return normalizedEndpoint;\r\n }\r\n\r\n return (\r\n `${normalizedBackendUrl}/` +\r\n normalizedEndpoint.replace(\r\n /^\\/+/,\r\n ''\r\n )\r\n );\r\n }\r\n\r\n // Web: through the app's own origin (/api/proxy/<host>/...), P5 sends no CORS headers\r\n const absolute = /^https?:\\/\\//i.test(normalizedEndpoint)\r\n ? normalizedEndpoint\r\n : `${normalizedBackendUrl}/${normalizedEndpoint.replace(/^\\/+/, '')}`;\r\n return viaBackendProxy(absolute);\r\n }\r\n\r\n buildCompany(userInfo: any): string {\r\n return userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n }\r\n\r\n resolveToken(template: string, context: any) {\r\n // The project writes {{userInfo.p5_resource_no}}; the context is the user info itself, so a\r\n // leading \"userInfo.\" resolves too - inside it the value came out empty.\r\n const scope = { ...context, userInfo: context };\r\n\r\n return template.replace(/{{(.*?)}}/g, (_, path) => {\r\n return path.trim().split('.').reduce((acc: any, key: any) => acc?.[key], scope) ?? '';\r\n });\r\n }\r\n\r\n /** Suggestions of `list` whose `field` starts with the typed `query` (case-insensitive). */\r\n filter(list: any[] | undefined, field: string | undefined, query: string | undefined): any[] {\r\n const q = (query ?? '').toLowerCase();\r\n\r\n return (list ?? []).filter(item => {\r\n const value = field ? item?.[field] : item;\r\n return value !== undefined && value !== null && `${value}`.toLowerCase().startsWith(q);\r\n });\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - new (#145): media stored as a CouchDB attachment (type media, storage attachment, no data).\r\n// getFileContentFromCouchDb answers it with src = a signed link (getMediaStreamUrl: POST\r\n// /media-token with the tenant header) the player streams with Range through the media cache.\r\n// resolveMediaSource turns a file name in a media field into that link. This brings back what\r\n// getMediaUrlFromCouchDb did, without a login token: /media-token asks for the tenant header only\r\n// - new (#145): preloadProjectMedia - at the start the media named in environments/media.json (the\r\n// Designer's list of media the pages use) get their links, files up to 20 MB are loaded whole\r\n// (object URL): Play starts at once; resolveMediaSource uses them\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - new: listFiles(dbName, prefix) - the files of a project under a folder, e.g. ssl/mobile/, so\r\n// the app can find its certificate instead of expecting a fixed file name\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: the CouchDB reads run under the waiting rule (stagedRequest), so an unreachable CouchDB\r\n// no longer leaves the app loading for ever\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-29\r\n// - change: getMediaUrlFromCouchDb removed. It asked /media-token for a signed URL, built\r\n// before the decision of 2026-09-21: an application has its own sign-in, unrelated to our\r\n// realm, and read access to CouchDB is open to anyone holding a tenant code. The library\r\n// therefore has no token and gets none, so media cannot be secured that way. Media are read\r\n// like any other document - GET with the tenant header - and Traefik routes them to the\r\n// cache. Nothing called this function; leaving it invited someone to wire it in\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-18\r\n// - change: getFileContentFromCouchDb now treats anything not known to be text as binary. The\r\n// rule was the other way round - an allow-list of media extensions, everything else decoded as\r\n// UTF-8 - which fails where nobody looks: an unlisted binary came back as a mangled string\r\n// instead of an error, so a .zip or a .docx was quietly destroyed on read. Since any extension\r\n// can be uploaded into the Media folder, that list could never be complete\r\n// - new: isTextFile, holding the inverted rule. SVG stays binary on purpose although it is text,\r\n// because the menu icons expect the media object with a src\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { UtilityService } from './utility.service';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { isNativeMobile } from './native-platform';\r\nimport { stagedRequest } from './request-timeout.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class Couchdb {\r\n private readonly couchDbBaseUrl = 'https://couchdb.yomotech.de';\r\n\r\n constructor(private utilityService: UtilityService, private platform: Platform) { }\r\n\r\n async getTenantDatabases(tenantKey: any): Promise<any[]> {\r\n if (!tenantKey || !tenantKey.trim()) {\r\n throw new Error('Missing tenantKey');\r\n }\r\n\r\n const response = await stagedRequest(async signal => fetch(`https://couchdb.yomotech.de/tenant-dbs`, { signal,\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n 'X-Tenant-Key': tenantKey.trim(),\r\n },\r\n }));\r\n const data = await this.parseJsonOrText(response);\r\n\r\n // if (!response.ok) {\r\n // throw new Error(\r\n // `GET /tenant-dbs -> ${response.status} ${this.stringifyErrorDetails(data)}`\r\n // );\r\n // }\r\n\r\n return data;\r\n }\r\n\r\n private async parseJsonOrText(response: Response): Promise<any> {\r\n const rawText = await response.text();\r\n\r\n if (!rawText) return null;\r\n\r\n try {\r\n return JSON.parse(rawText);\r\n } catch {\r\n return rawText;\r\n }\r\n }\r\n\r\n private stringifyErrorDetails(data: any): string {\r\n if (typeof data === 'string') return data;\r\n\r\n try {\r\n return JSON.stringify(data);\r\n } catch {\r\n return 'Unknown error';\r\n }\r\n }\r\n\r\n async getFileContentFromCouchDb(\r\n couchDbName: string,\r\n filePath: string\r\n ): Promise<any | null> {\r\n try {\r\n\r\n const dbName = couchDbName?.toLowerCase();\r\n const docId = filePath?.trim();\r\n if (!docId) {\r\n console.error('Missing file path');\r\n return null;\r\n }\r\n\r\n const response = await stagedRequest(async signal => fetch(this.getDocumentUrl(dbName, docId), { signal,\r\n method: 'GET',\r\n headers: await this.getReadHeaders(),\r\n }));\r\n\r\n const doc = await this.parseJsonOrText(response);\r\n\r\n if (!response.ok) {\r\n console.error(\r\n `Failed to fetch file \"${docId}\" from \"${dbName}\": ${response.status}`,\r\n doc\r\n );\r\n return null;\r\n }\r\n\r\n // A media file stored as an attachment (#145): no data, the bytes stay in CouchDB. The\r\n // src is a signed link the player reads itself with Range - streamed through the cache\r\n if (!doc?.data && this.isAttachmentMedia(doc)) {\r\n const name = doc.name || docId.split('/').pop();\r\n const mimeType = this.getMimeType(name, doc.contentType);\r\n return {\r\n type: 'media',\r\n mimeType,\r\n src: await this.getMediaStreamUrl(dbName, docId, name),\r\n name,\r\n path: doc.path,\r\n metadata: doc.metadata || {},\r\n };\r\n }\r\n\r\n if (!doc?.data) {\r\n console.error(`Document \"${docId}\" does not contain file data`);\r\n return null;\r\n }\r\n\r\n // Anything not known to be text is treated as binary.\r\n //\r\n // This used to be the other way round: an allow-list of media extensions,\r\n // with everything else decoded as UTF-8. That fails in the direction\r\n // nobody notices - an unlisted binary came back as a mangled string\r\n // rather than as an error, so a .zip or a .docx was quietly destroyed on\r\n // read. Since any extension can be uploaded into the Media folder, the\r\n // allow-list could never be complete, which is why the default is\r\n // inverted rather than extended.\r\n if (\r\n doc.type === 'media' ||\r\n doc.type === 'base64file' ||\r\n !this.isTextFile(doc.name || doc.path || docId, doc.contentType)\r\n ) {\r\n return {\r\n type: doc.type || 'base64file',\r\n mimeType: this.getMimeType(doc.name || doc.path || docId, doc.contentType),\r\n base64: doc.data,\r\n src: `data:${this.getMimeType(doc.name || doc.path || docId, doc.contentType)};base64,${doc.data}`,\r\n name: doc.name,\r\n path: doc.path,\r\n metadata: doc.metadata || {},\r\n };\r\n }\r\n\r\n const decodedContent = this.fromBase64(doc.data);\r\n\r\n if (this.isJsonFile(doc.name || doc.path || docId, doc.contentType)) {\r\n try {\r\n return JSON.parse(decodedContent);\r\n } catch (jsonError) {\r\n console.error(`Failed to parse JSON for file \"${docId}\"`, jsonError);\r\n return decodedContent;\r\n }\r\n }\r\n\r\n return decodedContent;\r\n } catch (error) {\r\n console.error(\r\n `Unexpected error while fetching file \"${filePath}\" from \"${couchDbName}\"`,\r\n error\r\n );\r\n return null;\r\n }\r\n }\r\n\r\n private isBinaryMediaFile(fileNameOrPath: string, contentType?: string): boolean {\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n const type = contentType || '';\r\n\r\n return (\r\n type.startsWith('image/') ||\r\n type.startsWith('video/') ||\r\n type.startsWith('audio/') ||\r\n type === 'application/pdf' ||\r\n\r\n lower.endsWith('.png') ||\r\n lower.endsWith('.jpg') ||\r\n lower.endsWith('.jpeg') ||\r\n lower.endsWith('.ico') ||\r\n lower.endsWith('.svg') ||\r\n lower.endsWith('.webp') ||\r\n lower.endsWith('.gif') ||\r\n\r\n lower.endsWith('.mp4') ||\r\n lower.endsWith('.webm') ||\r\n lower.endsWith('.mp3') ||\r\n lower.endsWith('.wav') ||\r\n lower.endsWith('.m4a') ||\r\n\r\n lower.endsWith('.pdf')\r\n );\r\n }\r\n\r\n private getMimeType(fileNameOrPath: string, contentType?: string): string {\r\n if (contentType) return contentType;\r\n\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n\r\n if (lower.endsWith('.png')) return 'image/png';\r\n if (lower.endsWith('.jpg') || lower.endsWith('.jpeg')) return 'image/jpeg';\r\n if (lower.endsWith('.ico')) return 'image/x-icon';\r\n if (lower.endsWith('.svg')) return 'image/svg+xml';\r\n if (lower.endsWith('.webp')) return 'image/webp';\r\n if (lower.endsWith('.gif')) return 'image/gif';\r\n\r\n if (lower.endsWith('.mp4')) return 'video/mp4';\r\n if (lower.endsWith('.webm')) return 'video/webm';\r\n\r\n if (lower.endsWith('.mp3')) return 'audio/mpeg';\r\n if (lower.endsWith('.wav')) return 'audio/wav';\r\n if (lower.endsWith('.m4a')) return 'audio/mp4';\r\n\r\n if (lower.endsWith('.pdf')) return 'application/pdf';\r\n\r\n return 'application/octet-stream';\r\n }\r\n\r\n private getImageMimeType(fileNameOrPath: string): string {\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n\r\n if (lower.endsWith('.png')) return 'image/png';\r\n if (lower.endsWith('.jpg') || lower.endsWith('.jpeg')) return 'image/jpeg';\r\n if (lower.endsWith('.ico')) return 'image/x-icon';\r\n if (lower.endsWith('.svg')) return 'image/svg+xml';\r\n\r\n return 'image/png';\r\n }\r\n\r\n private fromBase64(base64: string): string {\r\n try {\r\n return decodeURIComponent(escape(atob(base64)));\r\n } catch {\r\n return atob(base64);\r\n }\r\n }\r\n\r\n private isJsonFile(fileNameOrPath: string, contentType?: string): boolean {\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n return lower.endsWith('.json') || contentType === 'application/json';\r\n }\r\n\r\n /**\r\n * Decides whether a stored file may be decoded as UTF-8 text.\r\n *\r\n * Only what is recognised here is decoded; everything else is handed back as\r\n * binary. Note that SVG counts as binary on purpose even though it is text:\r\n * callers such as the menu icons expect the media object with a `src`, and\r\n * classifying it as text would change the shape they receive.\r\n */\r\n private isTextFile(fileNameOrPath: string, contentType?: string): boolean {\r\n if (this.isBinaryMediaFile(fileNameOrPath, contentType)) {\r\n return false;\r\n }\r\n\r\n const type = (contentType || '').toLowerCase();\r\n\r\n if (type.startsWith('text/')) return true;\r\n if (/^application\\/(json|javascript|typescript|xml|xhtml\\+xml|x-yaml)$/.test(type)) return true;\r\n if (/\\+(json|xml)$/.test(type)) return true;\r\n\r\n const lower = (fileNameOrPath || '').toLowerCase();\r\n\r\n return [\r\n '.json',\r\n '.css', '.scss', '.sass', '.less',\r\n '.html', '.htm', '.xml',\r\n '.js', '.mjs', '.cjs', '.ts',\r\n '.txt', '.md', '.csv', '.log',\r\n '.yml', '.yaml',\r\n '.vtt', '.srt',\r\n ].some((extension) => lower.endsWith(extension));\r\n }\r\n\r\n /** Ids of the files under a folder of the project, e.g. listFiles(db, 'ssl/mobile/'). Empty on any error. */\r\n async listFiles(dbName: string, prefix: string): Promise<string[]> {\r\n try {\r\n const range =\r\n `startkey=${encodeURIComponent(JSON.stringify(prefix))}` +\r\n `&endkey=${encodeURIComponent(JSON.stringify(`${prefix}\\ufff0`))}`;\r\n const response = await stagedRequest(async signal => fetch(`${this.getDbUrl(dbName)}/_all_docs?${range}`, { signal,\r\n method: 'GET',\r\n headers: await this.getReadHeaders(),\r\n }));\r\n if (!response.ok) return [];\r\n const body = await response.json();\r\n return (body?.rows ?? []).map((row: any) => String(row.id));\r\n } catch (error) {\r\n console.error(`Failed to list \"${prefix}\" in \"${dbName}\"`, error);\r\n return [];\r\n }\r\n }\r\n\r\n private getDocumentUrl(dbName: string, docId: string): string {\r\n return `${this.getDbUrl(dbName)}/${encodeURIComponent(docId)}`;\r\n }\r\n\r\n private getDbUrl(dbName: string): string {\r\n return `${this.couchDbBaseUrl}/${dbName}`;\r\n }\r\n\r\n private isAttachmentMedia(doc: any): boolean {\r\n const name = doc?.name || String(doc?._id || '').split('/').pop();\r\n return doc?.storage === 'attachment' && !!doc?._attachments?.[name];\r\n }\r\n\r\n /** Signed links by \"db/doc/name\", reused until a minute before they run out. */\r\n private mediaLinks = new Map<string, { url: string; until: number }>();\r\n\r\n /**\r\n * A signed link for one media attachment (#145). A <video>/<audio src> sends no tenant header,\r\n * so POST /media-token is asked with it instead - the same header every read already carries,\r\n * nothing else is needed - and answers the path it signed plus a token for that one file\r\n * (8 hours). The player then reads couchdb.yomotech.de<path>?token=... with Range itself.\r\n */\r\n async getMediaStreamUrl(dbName: string, docId: string, name: string): Promise<string> {\r\n const key = `${dbName}/${docId}/${name}`;\r\n const known = this.mediaLinks.get(key);\r\n if (known && known.until > Date.now()) return known.url;\r\n\r\n const response = await stagedRequest(async signal => fetch(`${this.couchDbBaseUrl}/media-token`, { signal,\r\n method: 'POST',\r\n headers: { ...(await this.getReadHeaders()), 'Content-Type': 'application/json' },\r\n body: JSON.stringify({ db: dbName, path: docId, name }),\r\n }));\r\n const body = await this.parseJsonOrText(response);\r\n if (!response.ok) {\r\n throw new Error(`media-token for \"${docId}\" in \"${dbName}\": ${response.status} ${this.stringifyErrorDetails(body)}`);\r\n }\r\n const url = `${this.couchDbBaseUrl}${body.path}?token=${encodeURIComponent(body.token)}`;\r\n this.mediaLinks.set(key, { url, until: (Number(body.expiresAt) - 60) * 1000 });\r\n return url;\r\n }\r\n\r\n /**\r\n * What a media field holds, made playable: a URL (http, https, data, blob) stays as it is; a\r\n * file name (\"clip.mp4\", also \"Media/clip.mp4\") is read from Media/ of the selected project -\r\n * a signed link for an attachment, a data URL for an older Base64 document. '' when unknown.\r\n */\r\n async resolveMediaSource(source: string): Promise<string> {\r\n const value = (source || '').trim();\r\n if (!value || /^(https?:|data:|blob:|capacitor:|file:)/i.test(value) || value.startsWith('/')) return value;\r\n\r\n const native = isNativeMobile();\r\n const tenantName = native ? await this.utilityService.getLocalStorage('tenantName') : await this.utilityService.getStorage('tenantName');\r\n const project = native ? await this.utilityService.getLocalStorage('selectedProject') : await this.utilityService.getStorage('selectedProject');\r\n if (!tenantName || !project) return '';\r\n\r\n const dbName = `${tenantName}_${project}`;\r\n const name = value.split('/').pop() || value;\r\n const preloaded = this.preloadedMedia.get(`${dbName}/${name}`);\r\n if (preloaded) {\r\n const url = await preloaded.catch(() => '');\r\n if (url) return url;\r\n }\r\n const file = await this.getFileContentFromCouchDb(dbName, `Media/${name}`);\r\n return this.utilityService.getMediaSrc(file);\r\n }\r\n\r\n /** Media prepared at the start, by \"db/name\": an object URL (loaded whole) or a signed link. */\r\n private preloadedMedia = new Map<string, Promise<string>>();\r\n\r\n /**\r\n * Prepares the project's video and audio at the start of the app, in the background (#145): only\r\n * the files in environments/media.json - the media the pages use, written by the Designer on\r\n * export; without that list nothing is preloaded. Per file the signed link; a file up to maxBytes\r\n * (20 MB) is loaded whole and kept as an object URL, so Play starts at once and without network. A\r\n * larger one keeps only the link. A failure is no error for the app: resolveMediaSource then asks\r\n * for the link as before.\r\n */\r\n async preloadProjectMedia(dbName: string, maxBytes = 20 * 1024 * 1024): Promise<void> {\r\n const list = await this.getFileContentFromCouchDb(dbName, 'environments/media.json');\r\n const names: string[] = Array.isArray(list?.preload) ? list.preload.filter((n: any) => typeof n === 'string' && n) : [];\r\n\r\n for (const name of names) {\r\n const key = `${dbName}/${name}`;\r\n if (this.preloadedMedia.has(key)) continue;\r\n const docId = `Media/${name}`;\r\n const pending = (async () => {\r\n const response = await stagedRequest(async signal => fetch(this.getDocumentUrl(dbName, docId), { signal,\r\n method: 'GET',\r\n headers: await this.getReadHeaders(),\r\n }));\r\n const doc: any = response.ok ? await response.json() : null;\r\n if (!this.isAttachmentMedia(doc)) throw new Error(`${docId} is no media attachment`);\r\n const link = await this.getMediaStreamUrl(dbName, docId, name);\r\n const size = Number(doc._attachments?.[name]?.length || 0);\r\n if (!size || size > maxBytes) return link;\r\n const bytes = await fetch(link);\r\n if (!bytes.ok) return link;\r\n return URL.createObjectURL(await bytes.blob());\r\n })();\r\n pending.catch(error => {\r\n console.warn(`Media \"${name}\" not preloaded`, error);\r\n this.preloadedMedia.delete(key);\r\n });\r\n this.preloadedMedia.set(key, pending);\r\n }\r\n }\r\n\r\n private async getReadHeaders(): Promise<HeadersInit> {\r\n return {\r\n Accept: 'application/json',\r\n ...(await this.buildTenantHeaders()),\r\n };\r\n }\r\n\r\n private async buildTenantHeaders(): Promise<Record<string, string>> {\r\n let tenantKey: any = \"\";\r\n let tenantName: any = \"\";\r\n if (isNativeMobile()) {\r\n tenantKey = await this.utilityService.getLocalStorage('tenantKey');\r\n tenantName = await this.utilityService.getLocalStorage('tenantName');\r\n } else {\r\n tenantKey = await this.utilityService.getStorage('tenantKey');\r\n tenantName = await this.utilityService.getStorage('tenantName');\r\n }\r\n\r\n const selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');\r\n if (typeof tenantKey === 'string' && tenantKey.trim()) {\r\n return { 'X-Tenant-Key': tenantKey.trim() };\r\n }\r\n const normalizedTenantName = typeof tenantName === 'string' ? tenantName.trim() : '';\r\n const normalizedSelectedTenant = typeof selectedTenant === 'string' ? selectedTenant.trim() : '';\r\n const tenant = normalizedTenantName || normalizedSelectedTenant;\r\n if (!tenant) {\r\n throw new Error('Missing tenantKey, tenantName, ' + 'or selectedTenant');\r\n }\r\n return { 'X-Tenant': tenant, };\r\n }\r\n\r\n async getImageSrcFromCouchDb(\r\n couchDbName: string,\r\n filePath: string\r\n ): Promise<string> {\r\n const dbName = couchDbName?.toLowerCase();\r\n const docId = filePath?.trim();\r\n\r\n if (!docId) {\r\n throw new Error('Missing file path');\r\n }\r\n\r\n const response = await stagedRequest(async signal => fetch(this.getDocumentUrl(dbName, docId), { signal,\r\n method: 'GET',\r\n headers: await this.getReadHeaders(),\r\n }));\r\n\r\n const doc = await this.parseJsonOrText(response);\r\n\r\n if (!response.ok) {\r\n throw new Error(\r\n `Failed to fetch image \"${docId}\" from \"${dbName}\": ${response.status} ${this.stringifyErrorDetails(doc)}`\r\n );\r\n }\r\n\r\n if (!doc?.data) {\r\n throw new Error(`Document \"${docId}\" does not contain image data`);\r\n }\r\n\r\n const mimeType = doc.contentType || 'image/png';\r\n\r\n return `data:${mimeType};base64,${doc.data}`;\r\n }\r\n\r\n}","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - fix: Keycloak on iOS/Android came from a hard-coded block (realm p5, client \"mobile\",\r\n// de.yomotech:/login/callback) instead of login.mobile, so every project signed in at wilken/p5\r\n// and login.mobile.offlineAccess had no effect. Now login.mobile of the project is used\r\n// - new: the Keycloak web scope comes from login.web.scope instead of a fixed \"openid profile email\"\r\n// - new: the web takes login.web.redirectUri and login.web.logoutRedirectUri, the origin otherwise\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: getKeycloakMobileConfig passes login.mobile.offlineAccess on\r\nimport { Injectable } from '@angular/core';\r\nimport { UtilityService } from './utility.service';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { Couchdb } from './couchdb';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { isNativeMobile } from './native-platform';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConfigService {\r\n private config: any;\r\n private skipOkta = false;\r\n private keycloakConfig: any;\r\n\r\n constructor(private couchdbService: Couchdb, private utilityService: UtilityService, private platform: Platform) { }\r\n\r\n async loadOktaConfig(projectName: string): Promise<void> {\r\n try {\r\n let tenantKey: any = \"\";\r\n let tenantName: any = \"\";\r\n if (isNativeMobile()) {\r\n tenantKey = await this.utilityService.getLocalStorage('tenantKey');\r\n tenantName = await this.utilityService.getLocalStorage('tenantName');\r\n } else {\r\n tenantKey = await this.utilityService.getStorage('tenantKey');\r\n tenantName = await this.utilityService.getStorage('tenantName');\r\n }\r\n if (tenantName) {\r\n this.config = await this.couchdbService.getFileContentFromCouchDb(\r\n `${tenantName}_${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n } else {\r\n this.config = await this.couchdbService.getFileContentFromCouchDb(\r\n `${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n }\r\n\r\n if (isNativeMobile()) {\r\n if (this.config.environment.login.mobile) {\r\n this.setConfiguration(this.config.environment.login.mobile);\r\n } else {\r\n this.setConfiguration(null);\r\n }\r\n } else {\r\n if (this.config.environment.login.web) {\r\n this.setConfiguration(this.config.environment.login.web);\r\n } else {\r\n this.setConfiguration(null);\r\n }\r\n }\r\n\r\n } catch (err) {\r\n console.error('Error loading config:', err);\r\n }\r\n }\r\n\r\n setConfiguration(config: any) {\r\n if (config) {\r\n this.config = config;\r\n } else {\r\n this.config = {\r\n issuer: 'http://dummy',\r\n clientId: 'dummy',\r\n redirectUri: window.location.origin,\r\n responseType: 'code',\r\n scope: 'openid profile email',\r\n showDebugInformation: true,\r\n pkce: true,\r\n };\r\n }\r\n }\r\n\r\n skipOktaConfig() {\r\n this.skipOkta = true;\r\n }\r\n\r\n get oktaConfig() {\r\n if (this.skipOkta) {\r\n return null;\r\n }\r\n return this.config;\r\n }\r\n\r\n async loadKeycloakConfig(projectName: string): Promise<void> {\r\n let tenantKey: any = \"\";\r\n let tenantName: any = \"\";\r\n if (isNativeMobile()) {\r\n tenantKey = await this.utilityService.getLocalStorage('tenantKey');\r\n tenantName = await this.utilityService.getLocalStorage('tenantName');\r\n } else {\r\n tenantKey = await this.utilityService.getStorage('tenantKey');\r\n tenantName = await this.utilityService.getStorage('tenantName');\r\n }\r\n let env: any = {};\r\n if (tenantName) {\r\n env = await this.couchdbService.getFileContentFromCouchDb(\r\n `${tenantName}_${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n } else {\r\n env = await this.couchdbService.getFileContentFromCouchDb(\r\n `${projectName}`,\r\n 'environments/environment.json'\r\n );\r\n }\r\n if (env?.environment?.login.type === \"keycloak\") {\r\n if (isNativeMobile()) {\r\n // login.mobile of the project - every project its own realm and client\r\n const mobile = env?.environment?.login?.mobile ?? {};\r\n this.keycloakConfig = {\r\n issuer: mobile.issuer,\r\n clientId: mobile.clientId,\r\n redirectUri: mobile.redirectUri,\r\n logoutRedirectUri: mobile.logoutRedirectUri,\r\n scope: mobile.scope || \"openid profile email\",\r\n responseType: \"code\",\r\n offlineAccess: mobile.offlineAccess === true\r\n }\r\n } else {\r\n const web = env?.environment?.login?.web ?? {};\r\n this.keycloakConfig = {\r\n issuer: web.issuer ?? 'http://dummy',\r\n clientId: web.clientId ?? 'dummy',\r\n // login.web.redirectUri / logoutRedirectUri; the origin is right for most web builds\r\n redirectUri: web.redirectUri || window.location.origin,\r\n postLogoutRedirectUri: web.logoutRedirectUri || window.location.origin,\r\n responseType: 'code',\r\n // login.web.scope - a list with one space separated string, or a string\r\n scope: (Array.isArray(web.scope) ? web.scope.join(' ') : web.scope || '').trim() || 'openid profile email',\r\n showDebugInformation: true\r\n };\r\n }\r\n } else {\r\n this.keycloakConfig = {};\r\n }\r\n }\r\n\r\n getKeycloakConfig() {\r\n return this.keycloakConfig;\r\n }\r\n\r\n getKeycloakMobileConfig() {\r\n if (!this.keycloakConfig) return null;\r\n return {\r\n issuer: this.keycloakConfig?.issuer ?? 'http://dummy',\r\n clientId: this.keycloakConfig?.clientId,\r\n redirectUri: this.keycloakConfig.redirectUri,\r\n logoutRedirectUri: this.keycloakConfig.logoutRedirectUri,\r\n scope: this.keycloakConfig.scope,\r\n responseType: this.keycloakConfig.responseType,\r\n // login.mobile.offlineAccess: request an offline token (see MobileKeycloakService.login)\r\n offlineAccess: this.keycloakConfig.offlineAccess === true\r\n };\r\n }\r\n\r\n private updateLoaderValue = new BehaviorSubject<any>(null);\r\n currentLoader$ = this.updateLoaderValue.asObservable();\r\n\r\n updateLoader(value: any) {\r\n this.updateLoaderValue.next(value);\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - fix: white cards on the luv2shop start page (signed out / after logout): the untranslated\r\n// layout copy was taken while the layout was still empty, and the language pass then wrote the\r\n// empty copy over the real layout. The copy is renewed once the layout has content\r\n// - fix: a failed save of a time recording in the web (webSaveDb) left the loader turning without\r\n// any message; it now stops the loader and shows one. (The CORS cause - P5 sends no CORS\r\n// headers - is solved by the backend proxy, shuaib#162/#154)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: getHorizontalLayoutCaption read layout.label.caption; a horizontal layout without label\r\n// threw in the template and the cards stayed half drawn (luv2shop start page: no texts)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: fields with a backend source (option.autocomplete) load their list through\r\n// RemoteListService - autocomplete suggestions, dropdown/combobox items; the autocompletes of this\r\n// container stayed empty before\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: the booked-time and register requests run under the waiting rule (stagedRequest)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// - fix: a phone (native app, shorter side below 600pt) counts as mobile in both orientations;\r\n// tablets keep the tablet/desktop style by width. platform.isBrowser is true in the\r\n// app's web view as well, so a phone in landscape (874px) got the tablet style of the project's\r\n// header: the separator line stood 12px beyond the purple heading on both sides\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: the date filter uses DateTimePickerService like the dialog. Tapping it opened the\r\n// calendar and the system number keyboard at the same time (seen on \"Gebuchte Zeiterfassung\")\r\n// Shuaib 2026-09-24\r\n// - new: renderFieldType maps legacy checkbox fields to boolean so existing cards continue to render.\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Input, NgZone, Output, ViewChild, inject } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { RequestService } from '../../services/request.service';\r\n\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { SimpleChanges } from '@angular/core';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport { CapacitorHttp } from '@capacitor/core';\r\n\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { NzModalModule, NzModalService } from 'ng-zorro-antd/modal';\r\n\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { PaginationComponent } from '../pagination/pagination.component';\r\nimport { String as StringComponent } from '../../components/string/string';\r\nimport { ConfigService } from '../../services/config.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { isNativeMobile, isNativePhone } from '../../services/native-platform';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { stagedRequest } from '../../services/request-timeout.service';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\n\r\n@Component({\r\n selector: 'vl-card',\r\n imports: [PlaceholderPipe, \r\n CommonModule,\r\n FormsModule,\r\n NzIconModule,\r\n DatePickerModule,\r\n NzButtonModule,\r\n NzDatePickerModule,\r\n NzModalModule,\r\n PaginationComponent,\r\n MatTooltipModule,\r\n StringComponent,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n CustomKeyboardDirective,\r\n ],\r\n standalone: true,\r\n templateUrl: './card.component.html',\r\n styleUrl: './card.component.css',\r\n})\r\nexport class CardComponent {\r\n // ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Loaded lists by field reference. */\r\n remoteData: Record<string, any[]> = {};\r\n /** Current suggestions of an autocomplete by field reference. */\r\n remoteSuggestions: Record<string, any[]> = {};\r\n\r\n /** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */\r\n async loadRemoteLists(nodes: any[], propertySchema: any): Promise<void> {\r\n const sources = new Map<string, any>();\r\n const visit = (node: any): void => {\r\n if (!node || typeof node !== 'object') {\r\n return;\r\n }\r\n\r\n if (node.option?.autocomplete && node.scope?.reference) {\r\n sources.set(node.scope.reference, node);\r\n }\r\n\r\n for (const value of Object.values(node)) {\r\n if (value && typeof value === 'object') {\r\n visit(value);\r\n }\r\n }\r\n };\r\n\r\n nodes.forEach(visit);\r\n\r\n await Promise.all([...sources.entries()].map(async ([reference, node]) => {\r\n const list = await this.remoteLists.loadShared(node.option.autocomplete);\r\n this.remoteData[reference] = list;\r\n\r\n const scope = reference.substring(reference.indexOf('#/') + 2, reference.indexOf('/', reference.indexOf('#/') + 2));\r\n const property = propertySchema?.[scope]?.[reference.split('/').pop() ?? ''];\r\n\r\n if (property && node.option?.control && node.option.control !== 'autocomplete' && list.length) {\r\n property.data = list;\r\n }\r\n }));\r\n }\r\n\r\n /** (completeMethod) of an autocomplete with a backend list. */\r\n completeRemote(event: any, node: any): void {\r\n const reference = node?.scope?.reference ?? '';\r\n this.remoteSuggestions[reference] = this.remoteLists.filter(this.remoteData[reference], reference.split('/').pop(), event?.query);\r\n }\r\n\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly pickerHost = inject(ElementRef<HTMLElement>);\r\n\r\n /** Keep existing checkbox data objects usable; new objects use boolean. */\r\n renderFieldType(type: string | undefined): string | undefined {\r\n return type === 'checkbox' ? 'boolean' : type;\r\n }\r\n\r\n @Input() itemInfo: any = {};\r\n @Input() currentPage: number = 0;\r\n @Input() pageSize: number = 5;\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() mobileDisplay: boolean = false;\r\n @Input() scrollPagination: boolean = false;\r\n @Input() pages: number[] = [];\r\n @Output() cardButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() cardHeaderButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() linkDetails: EventEmitter<any> = new EventEmitter();\r\n @Output() imageDetails: EventEmitter<any> = new EventEmitter();\r\n @Output() onPageSizeChange: EventEmitter<any> = new EventEmitter();\r\n @Output() onPageChange: EventEmitter<any> = new EventEmitter();\r\n @Input() paginationMode: 'client' | 'server' = 'server';\r\n @Input() paginationLoading: boolean = false;\r\n @Output() cardDataChange = new EventEmitter<{\r\n records: any[];\r\n resetPage?: boolean;\r\n }>();\r\n @ViewChild('scrollPaginationSentinel')\r\n scrollPaginationSentinel?: ElementRef<HTMLElement>;\r\n\r\n private scrollObserver?: IntersectionObserver;\r\n private requestedScrollPage: number | null = null;\r\n cardPerRow: string = 'md:col-6 lg:col-';\r\n deviceMode: 'desktop' | 'tablet' | 'mobile' = 'desktop';\r\n isLoading: boolean = false;\r\n layoutSchemaCopy: any = {};\r\n headerSchemaCopy: any = {};\r\n footerSchemaCopy: any = {};\r\n\r\n constructor(\r\n private utilityService: UtilityService,\r\n private platform: Platform,\r\n private http: HttpClient,\r\n private configService: ConfigService,\r\n private cdr: ChangeDetectorRef,\r\n private zone: NgZone,\r\n private modalService: NzModalService,\r\n private notificationService: NotificationService,\r\n private oauthService: OAuthService,\r\n private requestService: RequestService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (isNativePhone()) {\r\n this.mobileDisplay = true;\r\n }\r\n\r\n this.updateDeviceMode();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Backend lists of fields with option.autocomplete (any data type, any control).\r\n if (changes['itemInfo'] && this.itemInfo) {\r\n void this.loadRemoteLists([this.itemInfo.layoutSchema, this.itemInfo.header], this.itemInfo.propertySchema);\r\n }\r\n this.updateDeviceMode();\r\n if (\r\n changes['scrollPagination'] ||\r\n changes['currentPage'] ||\r\n changes['paginationLoading'] ||\r\n changes['pages']\r\n ) {\r\n if (!this.paginationLoading) {\r\n this.requestedScrollPage = null;\r\n }\r\n this.refreshScrollObserver();\r\n }\r\n if (isNativePhone()) {\r\n this.mobileDisplay = true;\r\n }\r\n /*\r\n * The untranslated copies the language is applied to. The app fills layoutSchema, header and\r\n * footer into the same itemInfo after it arrived (empty) - so a copy taken then stayed empty,\r\n * and the next language pass wrote that empty copy over the real layout: white cards (luv2shop\r\n * start page). A copy is therefore also taken while it is still empty and the source is not.\r\n */\r\n const hasContent = (value: any) => !!value && Object.keys(value).length > 0;\r\n if (changes['itemInfo'] || (!hasContent(this.layoutSchemaCopy) && hasContent(this.itemInfo?.layoutSchema))) {\r\n if (this.itemInfo.layoutSchema) {\r\n this.layoutSchemaCopy = JSON.parse(JSON.stringify(this.itemInfo.layoutSchema));\r\n }\r\n }\r\n if (changes['itemInfo'] || (!hasContent(this.headerSchemaCopy) && hasContent(this.itemInfo?.header))) {\r\n if (this.itemInfo.header) {\r\n this.headerSchemaCopy = JSON.parse(JSON.stringify(this.itemInfo.header));\r\n }\r\n }\r\n if (changes['itemInfo'] || (!hasContent(this.footerSchemaCopy) && hasContent(this.itemInfo?.footer))) {\r\n if (this.itemInfo.footer) {\r\n this.footerSchemaCopy = JSON.parse(JSON.stringify(this.itemInfo.footer));\r\n }\r\n }\r\n if ((changes['selectedLanguageInfo'] || this.selectedLanguageInfo) && this.selectedLanguageInfo.selectedLanguage) {\r\n this.itemInfo.footer = this.updatebuttonLanguage(this.footerSchemaCopy, this.selectedLanguageInfo.selectedLanguage)\r\n this.itemInfo.header = this.updatebuttonLanguage(this.headerSchemaCopy, this.selectedLanguageInfo.selectedLanguage)\r\n this.itemInfo.layoutSchema = this.updateLayoutLanguage(this.layoutSchemaCopy, this.selectedLanguageInfo.selectedLanguage)\r\n }\r\n }\r\n\r\n @HostListener('window:resize')\r\n onWindowResize(): void {\r\n this.updateDeviceMode();\r\n }\r\n\r\n get displayedRecords(): any[] {\r\n const records = Array.isArray(this.itemInfo?.data)\r\n ? this.itemInfo.data\r\n : [];\r\n\r\n /*\r\n * For server pagination, itemInfo.data contains either:\r\n * - the current numbered page, or\r\n * - all pages loaded through infinite scroll.\r\n */\r\n if (\r\n this.paginationMode === 'server' ||\r\n this.scrollPagination\r\n ) {\r\n return records;\r\n }\r\n\r\n const normalizedPageSize =\r\n Number(this.pageSize) ||\r\n Number(\r\n this.itemInfo?.layoutSchema?.pagination?.defaultPageSize\r\n ) ||\r\n 5;\r\n\r\n const normalizedCurrentPage =\r\n Number(this.currentPage) || 0;\r\n\r\n const startIndex =\r\n normalizedCurrentPage * normalizedPageSize;\r\n\r\n return records.slice(\r\n startIndex,\r\n startIndex + normalizedPageSize\r\n );\r\n }\r\n\r\n private setupScrollObserver(): void {\r\n this.destroyScrollObserver();\r\n\r\n if (\r\n !this.scrollPagination ||\r\n !this.scrollPaginationSentinel ||\r\n typeof IntersectionObserver === 'undefined'\r\n ) {\r\n return;\r\n }\r\n\r\n this.scrollObserver = new IntersectionObserver(\r\n entries => {\r\n const sentinelEntry = entries[0];\r\n\r\n if (sentinelEntry?.isIntersecting) {\r\n this.loadNextScrollPage();\r\n }\r\n },\r\n {\r\n root: null,\r\n rootMargin: '0px 0px 250px 0px',\r\n threshold: 0\r\n }\r\n );\r\n\r\n this.scrollObserver.observe(\r\n this.scrollPaginationSentinel.nativeElement\r\n );\r\n }\r\n\r\n private loadNextScrollPage(): void {\r\n if (\r\n !this.scrollPagination ||\r\n this.paginationLoading ||\r\n !this.hasNextScrollPage()\r\n ) {\r\n return;\r\n }\r\n\r\n const nextPage = this.currentPage + 1;\r\n\r\n if (this.requestedScrollPage === nextPage) {\r\n return;\r\n }\r\n\r\n this.requestedScrollPage = nextPage;\r\n this.onPageChange.emit(nextPage);\r\n }\r\n\r\n private hasNextScrollPage(): boolean {\r\n return (\r\n Array.isArray(this.pages) &&\r\n this.pages.length > 0 &&\r\n this.currentPage < this.pages.length - 1\r\n );\r\n }\r\n\r\n private refreshScrollObserver(): void {\r\n setTimeout(() => {\r\n this.setupScrollObserver();\r\n });\r\n }\r\n\r\n private destroyScrollObserver(): void {\r\n this.scrollObserver?.disconnect();\r\n this.scrollObserver = undefined;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyScrollObserver();\r\n this.picker.closeIfWithin(this.pickerHost.nativeElement);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.setupScrollObserver();\r\n }\r\n\r\n getRecordIndex(record: any): number {\r\n if (!Array.isArray(this.itemInfo?.data)) {\r\n return -1;\r\n }\r\n\r\n return this.itemInfo.data.indexOf(record);\r\n }\r\n\r\n private publishCardDataChange(\r\n resetPage: boolean = false\r\n ): void {\r\n const records = Array.isArray(this.itemInfo?.data)\r\n ? [...this.itemInfo.data]\r\n : [];\r\n\r\n this.cardDataChange.emit({\r\n records,\r\n resetPage\r\n });\r\n }\r\n\r\n private setFilteredCardData(\r\n records: any\r\n ): void {\r\n const normalizedRecords =\r\n this.utilityService.restoreDatesFromStorage(\r\n Array.isArray(records) ? records : [],\r\n this.itemInfo.propertySchema\r\n );\r\n\r\n this.itemInfo.data = normalizedRecords;\r\n\r\n /*\r\n * Filtering creates a new complete client-side dataset.\r\n * Move pagination back to the first page.\r\n */\r\n this.publishCardDataChange(true);\r\n }\r\n\r\n private updateDeviceMode(): void {\r\n if (typeof window === 'undefined') {\r\n this.deviceMode = this.mobileDisplay ? 'mobile' : 'desktop';\r\n return;\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (this.mobileDisplay || width <= 768) {\r\n this.deviceMode = 'mobile';\r\n } else if (width <= 1024) {\r\n this.deviceMode = 'tablet';\r\n } else {\r\n this.deviceMode = 'desktop';\r\n }\r\n }\r\n\r\n private safeUpdate(fn: () => void) {\r\n if (NgZone.isInAngularZone()) {\r\n fn();\r\n this.cdr.markForCheck();\r\n } else {\r\n this.zone.run(() => {\r\n fn();\r\n this.cdr.markForCheck();\r\n });\r\n }\r\n }\r\n\r\n getHorizontalLayoutCaption(layout: any) {\r\n let lang = this.selectedLanguageInfo?.selectedLanguage;\r\n let caption = layout?.label?.caption\r\n ? layout.label.caption\r\n : this.itemInfo.propertySchema[this.getScope(layout.scope?.reference)]?.[\r\n layout.scope?.reference.split('/').pop()\r\n ]?.caption;\r\n return lang && lang[caption] ? lang[caption] : caption;\r\n }\r\n\r\n getHorizontalLayoutTooltip(layout: any) {\r\n let lang = this.selectedLanguageInfo?.selectedLanguage;\r\n let tooltip = layout.option && layout.option.tooltip || '';\r\n return lang && lang[tooltip] ? lang[tooltip] : tooltip;\r\n }\r\n\r\n forceNumericKeyboard(event: any) {\r\n const input = event?.target as HTMLInputElement;\r\n if (input && input.tagName === 'INPUT') {\r\n input.setAttribute('inputmode', 'numeric'); // Android\r\n input.setAttribute('pattern', '[0-9:]*'); // iOS\r\n input.setAttribute('type', 'tel'); // strongest signal\r\n }\r\n }\r\n\r\n onDateTyping(event: any) {\r\n const input = event.target as HTMLInputElement;\r\n if (!input) return;\r\n let digits = input.value.replace(/\\D/g, '');\r\n digits = digits.substring(0, 8);\r\n let formatted = '';\r\n if (digits.length <= 4) {\r\n formatted = digits;\r\n } else if (digits.length <= 6) {\r\n formatted = `${digits.slice(0, 4)}-${digits.slice(4)}`;\r\n } else {\r\n formatted = `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;\r\n }\r\n input.value = formatted;\r\n }\r\n\r\n updatebuttonLanguage<T>(schema: T, translations: Record<string, string>): T {\r\n const cloned = JSON.parse(JSON.stringify(schema));\r\n\r\n const walk = (obj: any) => {\r\n if (!obj || typeof obj !== 'object') return;\r\n\r\n // ✅ Replace direct caption (e.g. button.caption)\r\n if (typeof obj.caption === 'string') {\r\n const original = obj.caption;\r\n obj.caption = translations[original] ?? original;\r\n }\r\n\r\n if (obj.option && obj.option.tooltip && (typeof obj?.option?.tooltip === 'string')) {\r\n const original = obj?.option?.tooltip;\r\n obj.option.tooltip = translations[original] ?? original;\r\n }\r\n\r\n // ✅ Replace modalTitle if present\r\n if (typeof obj.modalTitle === 'string') {\r\n const original = obj.modalTitle;\r\n obj.modalTitle = translations[original] ?? original;\r\n }\r\n\r\n // 🔁 Recurse\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key];\r\n if (typeof value === 'object') {\r\n walk(value);\r\n }\r\n });\r\n };\r\n\r\n walk(cloned);\r\n return cloned;\r\n }\r\n\r\n updateLayoutLanguage<T>(schema: T, translations: Record<string, string>): T {\r\n // Deep clone to avoid mutating original schema\r\n const cloned = JSON.parse(JSON.stringify(schema));\r\n\r\n const walk = (obj: any) => {\r\n if (!obj || typeof obj !== 'object') return;\r\n\r\n // ✅ If label.caption exists → translate it\r\n if (obj.label && typeof obj.label.caption === 'string') {\r\n const originalCaption = obj.label.caption;\r\n obj.label.caption = translations[originalCaption] ?? originalCaption;\r\n }\r\n if (obj.elements && obj.elements.length > 0) {\r\n obj.elements.forEach((element: any) => {\r\n if (element.label && element.label.caption) {\r\n const originalElementCaption = element.label.caption;\r\n element.label.caption = translations[originalElementCaption] ?? originalElementCaption;\r\n }\r\n });\r\n }\r\n\r\n // 🔁 Recurse into object properties\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key];\r\n if (typeof value === 'object') {\r\n walk(value);\r\n }\r\n });\r\n };\r\n\r\n walk(cloned);\r\n return cloned;\r\n }\r\n\r\n dateChangeEvent(filter: any, value: any) {\r\n const scope = this.getScope(filter.scope.reference);\r\n const field = filter.scope?.reference.split('/').pop();\r\n this.itemInfo.propertySchema[scope][field].value = value\r\n this.applyDateFilter(this.extractFilterValues(this.itemInfo.propertySchema[scope]))\r\n }\r\n\r\n async applyDateFilter(filters: any) {\r\n const from = filters.fromDateFilter ? new Date(filters.fromDateFilter) : null;\r\n const to = filters.toDateFilter ? new Date(filters.toDateFilter) : null;\r\n if (to && from) {\r\n const formattedFrom = this.formatToOffsetISO(from);\r\n const formattedTo = this.formatToOffsetISO(to);\r\n const keycloakInfo: any = await this.utilityService.getLocalStorage('KeycloakInfo');\r\n const logined: any = await this.utilityService.getLocalStorage('loginedUser');\r\n this.safeUpdate(() => this.isLoading = true);\r\n if (isNativeMobile()) {\r\n try {\r\n const saveOrders = await this.getSaveOrder(\r\n keycloakInfo?.token,\r\n keycloakInfo,\r\n formattedFrom,\r\n formattedTo\r\n );\r\n\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData(saveOrders);\r\n this.isLoading = false;\r\n });\r\n } catch (error) {\r\n console.error(\r\n 'Failed to fetch saved work orders',\r\n error\r\n );\r\n\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData([]);\r\n this.isLoading = false;\r\n });\r\n }\r\n\r\n return;\r\n } else {\r\n this.requestService\r\n .getSaveOrder(\r\n logined?.token,\r\n logined,\r\n formattedFrom,\r\n formattedTo\r\n )\r\n .subscribe({\r\n next: (saveOrders: any) => {\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData(saveOrders);\r\n this.isLoading = false;\r\n });\r\n },\r\n error: (error: any) => {\r\n console.error(\r\n 'Failed to fetch saved work orders',\r\n error\r\n );\r\n\r\n this.safeUpdate(() => {\r\n this.setFilteredCardData([]);\r\n this.isLoading = false;\r\n });\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n async getSaveOrder(\r\n token: string,\r\n userInfo: any,\r\n fromDate: any,\r\n toDate: any\r\n ) {\r\n if (!token) {\r\n return;\r\n }\r\n\r\n const company = userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n\r\n const url = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/requestBookedTimeRecording`;\r\n\r\n try {\r\n const response = await stagedRequest(() => CapacitorHttp.post({\r\n url,\r\n params: {\r\n resourceNo: userInfo.p5_resource_no,\r\n workDayFrom: fromDate,\r\n workDayTo: toDate,\r\n company,\r\n appVersion: '1',\r\n },\r\n headers: {\r\n Authorization: `Bearer ${token}`, // ✅ REQUIRED\r\n Accept: 'application/json',\r\n },\r\n // ❗ NO BODY needed for this endpoint\r\n }));\r\n\r\n console.log('getSaveOrder response:', response.data);\r\n return response.data;\r\n } catch (error) {\r\n console.error('Failed to fetch saved orders', error);\r\n throw error;\r\n }\r\n }\r\n\r\n formatToOffsetISO(date: Date): string {\r\n if (!date) return '';\r\n\r\n const pad = (n: number, len = 2) => String(n).padStart(len, '0');\r\n const year = date.getFullYear();\r\n const month = pad(date.getMonth() + 1);\r\n const day = pad(date.getDate());\r\n const hours = pad(date.getHours());\r\n const minutes = pad(date.getMinutes());\r\n const seconds = pad(date.getSeconds());\r\n const ms = pad(date.getMilliseconds(), 4); // 4-digit milliseconds\r\n\r\n // timezone offset\r\n const offset = -date.getTimezoneOffset(); // in minutes\r\n const offSign = offset >= 0 ? '+' : '-';\r\n const offHours = pad(Math.floor(Math.abs(offset) / 60));\r\n const offMinutes = pad(Math.abs(offset) % 60);\r\n\r\n return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}:${ms}${offSign}${offHours}:${offMinutes}`;\r\n }\r\n\r\n extractFilterValues(schema: Record<string, any>): Record<string, any> {\r\n return Object.keys(schema).reduce(\r\n (acc, key) => {\r\n if (key.includes('Filter') && schema[key]?.value !== undefined) {\r\n acc[key] = schema[key].value;\r\n }\r\n return acc;\r\n },\r\n {} as Record<string, any>,\r\n );\r\n }\r\n\r\n invokeOnPageSizeChange(pageSize: any): void {\r\n const normalizedPageSize = Number(pageSize);\r\n\r\n if (\r\n !Number.isFinite(normalizedPageSize) ||\r\n normalizedPageSize <= 0\r\n ) {\r\n return;\r\n }\r\n\r\n this.onPageSizeChange.emit(normalizedPageSize);\r\n }\r\n\r\n invokeGoToPage(page: number): void {\r\n if (\r\n page < 0 ||\r\n page >= this.pages.length ||\r\n page === this.currentPage\r\n ) {\r\n return;\r\n }\r\n\r\n this.onPageChange.emit(page);\r\n }\r\n\r\n invokeOnCardHeader(element: any) {\r\n if (element.option && element.option.innerAction === \"saveAll\") {\r\n this.d4_SaveAll();\r\n } else {\r\n this.cardHeaderButtonClick.emit(element);\r\n }\r\n }\r\n\r\n invokeOnCardFooter(element: any) {\r\n // this.cardHeaderButtonClick.emit(element);\r\n }\r\n\r\n async invokeButtonClick(layout: any, record: any, recordIndex: any) {\r\n if (layout?.option?.action === 'delete' && layout?.option?.storageType == 'localstorage') {\r\n if (layout?.option?.deleteMessage) {\r\n this.showConfirm(layout?.option, recordIndex);\r\n }\r\n } else if (layout?.option?.action === 'save' && layout?.option?.storageType === 'database') {\r\n this.configService.updateLoader(true);\r\n const final_array = this.utilityService.convertToDailyLogs(record);\r\n await this.saveToDb(final_array, recordIndex, layout.option.data_url)\r\n } else {\r\n this.cardButtonClick.emit({ layout: layout, record: record, recordIndex: recordIndex });\r\n }\r\n }\r\n\r\n showConfirm(option: any, recordIndex: any) {\r\n this.modalService.confirm({\r\n nzTitle:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Confirm']\r\n ? this.selectedLanguageInfo.selectedLanguage['Confirm']\r\n : 'Confirm',\r\n nzContent:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage &&\r\n this.selectedLanguageInfo?.selectedLanguage[option.deleteMessage]\r\n ? this.selectedLanguageInfo.selectedLanguage[option.deleteMessage]\r\n : option.deleteMessage,\r\n nzOkText:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Delete']\r\n ? this.selectedLanguageInfo.selectedLanguage['Delete']\r\n : 'Delete',\r\n nzCancelText:\r\n this.selectedLanguageInfo && this.selectedLanguageInfo?.selectedLanguage && this.selectedLanguageInfo?.selectedLanguage['Cancel']\r\n ? this.selectedLanguageInfo.selectedLanguage['Cancel']\r\n : 'Cancel',\r\n nzOnOk: () => this.deleteRecord(recordIndex),\r\n });\r\n }\r\n\r\n async d4_SaveAll() {\r\n if (this.itemInfo?.data?.length) {\r\n let allOrders: any[] = [];\r\n for (let i = 0; i < this.itemInfo.data.length; i++) {\r\n const element = this.itemInfo.data[i];\r\n const dailyLogs = this.utilityService.convertToDailyLogs(element);\r\n if (Array.isArray(dailyLogs)) {\r\n allOrders.push(...dailyLogs);\r\n }\r\n }\r\n await this.saveToDb(allOrders, null, true);\r\n } else {\r\n this.notificationService.warning(this.selectedLanguageInfo?.selectedLanguage['noRecordFound'] ? this.selectedLanguageInfo?.selectedLanguage['noRecordFound'] : 'No Record Found')\r\n }\r\n }\r\n\r\n async deleteRecord(recordIndex: number): Promise<void> {\r\n if (\r\n !Array.isArray(this.itemInfo?.data) ||\r\n recordIndex < 0 ||\r\n recordIndex >= this.itemInfo.data.length\r\n ) {\r\n this.configService.updateLoader(false);\r\n return;\r\n }\r\n\r\n this.itemInfo.data.splice(recordIndex, 1);\r\n\r\n await this.utilityService.setLocalStorage(\r\n 'timeRecords',\r\n JSON.stringify(this.itemInfo.data)\r\n );\r\n\r\n /*\r\n * Notify AppComponent so page count is recalculated.\r\n */\r\n this.publishCardDataChange(false);\r\n\r\n this.configService.updateLoader(false);\r\n }\r\n\r\n async deleteAllRecord(): Promise<void> {\r\n this.itemInfo.data = [];\r\n\r\n await this.utilityService.setLocalStorage(\r\n 'timeRecords',\r\n JSON.stringify([])\r\n );\r\n\r\n this.publishCardDataChange(true);\r\n\r\n this.configService.updateLoader(false);\r\n }\r\n\r\n async saveToDb(orders: any, orderIndex?: any, data_url?: any, deleteAll: boolean = false) {\r\n this.safeUpdate(() => (this.isLoading = true));\r\n const token = this.oauthService.getAccessToken();\r\n const logined: any = await this.utilityService.getLocalStorage('loginedUser');\r\n const keycloakInfo: any = await this.utilityService.getLocalStorage('KeycloakInfo');\r\n let saveobject = {\r\n ressourceNo: logined?.p5_resource_no ? logined.p5_resource_no : keycloakInfo?.p5_resource_no,\r\n returnTimeRecordingLine: orders\r\n }\r\n if (isNativeMobile()) {\r\n const res = await this.mobileSaveDb(keycloakInfo.token, keycloakInfo, saveobject, orderIndex, data_url, deleteAll);\r\n } else {\r\n this.webSaveDb(token, logined, saveobject, orderIndex, data_url, deleteAll);\r\n }\r\n }\r\n\r\n webSaveDb(token: any, userInfo: any, order: any = {}, orderIndex?: any, dataUrl?: any, deleteAll: boolean = false) {\r\n if (token) {\r\n const headers = new HttpHeaders({\r\n 'Authorization': `Bearer ${token}`,\r\n 'Accept': 'application/json'\r\n });\r\n let url2: any = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording?company=${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant ? userInfo.p5_plant : \" \"}&appVersion=1&resourceNo=${userInfo.p5_resource_no}`\r\n this.http.post(url2, order, { headers }).subscribe({\r\n next: res => {\r\n this.safeUpdate(() => this.isLoading = false);\r\n if (orderIndex > -1) {\r\n this.deleteRecord(orderIndex)\r\n } else {\r\n this.deleteAllRecord();\r\n }\r\n },\r\n error: (error: any) => {\r\n // The loader kept turning and the record stayed without any message.\r\n this.safeUpdate(() => this.isLoading = false);\r\n console.error('Failed to save time recording', error);\r\n this.notificationService.error(this.selectedLanguageInfo?.selectedLanguage?.['saveFailed'] ?? 'The record could not be saved.');\r\n }\r\n })\r\n }\r\n }\r\n\r\n async mobileSaveDb(token: string, userInfo: any, order: any = {}, orderIndex: number, dataUrl: any, deleteAll: boolean = false) {\r\n if (!token) {\r\n console.log('NO-token', token);\r\n return;\r\n }\r\n\r\n const company = userInfo.p5_plant\r\n ? `${userInfo.p5_group}/${userInfo.p5_client}/${userInfo.p5_plant}`\r\n : `${userInfo.p5_group}/${userInfo.p5_client}/`;\r\n\r\n const url = `${userInfo.p5_backend_url}/assetsmobileservice/Zeiterfassung/registerTimeRecording`;\r\n\r\n try {\r\n const response = await stagedRequest(() => CapacitorHttp.post({\r\n url,\r\n params: {\r\n company,\r\n appVersion: '1',\r\n resourceNo: userInfo.p5_resource_no,\r\n },\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json',\r\n },\r\n data: order,\r\n }));\r\n if (orderIndex != null && orderIndex > -1) {\r\n this.deleteRecord(orderIndex);\r\n } else {\r\n this.deleteAllRecord();\r\n }\r\n this.safeUpdate(() => (this.isLoading = false));\r\n\r\n return response.data;\r\n } catch (error) {\r\n this.safeUpdate(() => (this.isLoading = false));\r\n console.error('Failed to save time recording', error);\r\n throw error;\r\n }\r\n }\r\n\r\n showLinkDetails(option: any, record: any) {\r\n this.linkDetails.emit({ option: option, record: record });\r\n }\r\n\r\n showImageDetails(option: any, record: any) {\r\n this.imageDetails.emit({ option: option, record: record });\r\n }\r\n\r\n getProperty(scope: any) {\r\n const property = scope ? scope.split('/').pop() : '';\r\n return {\r\n key: property,\r\n productSchema: this.itemInfo.propertySchema[this.getScope(scope)][property],\r\n };\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any): {\r\n classes: string;\r\n style: Record<string, any>;\r\n } {\r\n if (!styleObject) {\r\n return {\r\n classes: '',\r\n style: {},\r\n };\r\n }\r\n\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n\r\n return {\r\n classes: Array.isArray(classes) ? classes.filter(Boolean).join(' ') : classes || '',\r\n style: styleWithoutClasses || {},\r\n };\r\n }\r\n\r\n getCardContainerStyle(): Record<string, any> {\r\n const schema = this.itemInfo?.layoutSchema || {};\r\n const layout = schema?.layout || {};\r\n\r\n let cardsPerRow = Number(layout.desktopCardsPerRow) || 3;\r\n\r\n if (this.deviceMode === 'tablet') {\r\n cardsPerRow = Number(layout.tabletCardsPerRow) || 2;\r\n }\r\n\r\n if (this.deviceMode === 'mobile') {\r\n cardsPerRow = Number(layout.mobileCardsPerRow) || 1;\r\n }\r\n\r\n const baseStyle: any = this.getStyleWithoutClasses(schema.style).style;\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n schema?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n display: 'grid',\r\n gridTemplateColumns: `repeat(${Math.max(1, cardsPerRow)}, minmax(0, 1fr))`,\r\n gap: layout.gap || baseStyle.gap || '16px',\r\n padding: '0px 10px 0px 10px',\r\n width: '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getSingleCardStyle(): Record<string, any> {\r\n const schema = this.itemInfo?.layoutSchema || {};\r\n\r\n const baseStyle = this.getStyleWithoutClasses(schema.stylePerCard).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n schema?.stylePerCard?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n width: '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getHeaderStyle(): Record<string, any> {\r\n const header = this.itemInfo?.header || {};\r\n\r\n const baseStyle: any = this.getStyleWithoutClasses(header.style).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n header?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n width: baseStyle.width || '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getHeaderElementWrapperStyle(element: any): Record<string, any> {\r\n const baseStyle = this.getStyleWithoutClasses(element?.wrapperStyle).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n element?.responsiveWrapperStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n getHorizontalLayoutStyle(layout: any): Record<string, any> {\r\n const baseStyle: any = this.getStyleWithoutClasses(layout?.style).style;\r\n\r\n const responsiveStyle = this.getStyleWithoutClasses(\r\n layout?.responsiveStyle?.[this.deviceMode],\r\n ).style;\r\n\r\n return {\r\n ...baseStyle,\r\n ...responsiveStyle,\r\n display: baseStyle.display || 'grid',\r\n width: baseStyle.width || '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n };\r\n }\r\n\r\n showButtonIcon(button: any): boolean {\r\n const mode = button?.option?.buttonContent;\r\n\r\n if (mode === 'icon' || mode === 'iconCaption') {\r\n return !!button?.icon;\r\n }\r\n\r\n return !mode && !button?.caption && !!button?.icon;\r\n }\r\n\r\n showButtonCaption(button: any): boolean {\r\n const mode = button?.option?.buttonContent;\r\n\r\n if (mode === 'caption' || mode === 'iconCaption') {\r\n return !!button?.caption;\r\n }\r\n\r\n return !mode && !!button?.caption;\r\n }\r\n\r\n getScope(scope: any): string {\r\n if (!scope || typeof scope !== 'string') {\r\n return '';\r\n }\r\n\r\n const start = scope.indexOf('#/') + 2;\r\n const end = scope.indexOf('/', start);\r\n\r\n if (start < 2 || end <= start) {\r\n return '';\r\n }\r\n\r\n return scope.substring(start, end);\r\n }\r\n\r\n getMediaSource(layout: any, record: any): string {\r\n const field = layout?.scope?.reference?.split('/').pop();\r\n const value = layout?.option?.src || (field ? record?.[field] : '');\r\n \r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n \r\n getMediaLabel(layout: any): string {\r\n const label = layout?.label;\r\n \r\n if (typeof label === 'string' && label.trim()) {\r\n return label;\r\n }\r\n \r\n const reference = layout?.scope?.reference;\r\n const field = reference?.split('/').pop();\r\n const scope = reference ? this.getScope(reference) : '';\r\n \r\n return label?.caption\r\n || this.itemInfo?.propertySchema?.[scope]?.[field]?.caption\r\n || 'Media';\r\n }\r\n \r\n getMediaKind(\r\n layout: any,\r\n record: any\r\n ): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(layout, record);\r\n \r\n // Base64 sources can identify their type without a filename.\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n \r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n \r\n // Blob and Base64 URLs may have no extension.\r\n // Try the original filename/reference as well.\r\n const field = layout?.scope?.reference?.split('/').pop();\r\n const originalValue = field ? record?.[field] : undefined;\r\n \r\n const candidates = [\r\n source,\r\n layout?.option?.fileName,\r\n originalValue\r\n ];\r\n \r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = [\r\n 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\r\n 'txt', 'csv', 'zip', 'rar', '7z'\r\n ];\r\n \r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string') continue;\r\n if (/^(data|blob):/i.test(candidate)) continue;\r\n \r\n // Ignore URL query parameters and fragments.\r\n let path = candidate.split(/[?#]/)[0];\r\n \r\n try {\r\n path = decodeURIComponent(path);\r\n } catch {\r\n // Keep the original path when URL encoding is invalid.\r\n }\r\n \r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n \r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n \r\n return 'image';\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the bottom pagination read itemInfo?.data.length; before the records arrive data is\r\n undefined, the template threw and the cards stayed half drawn (luv2shop start page: one\r\n card without texts)\r\n - fix: the price fields read ...?.format.currency; a property without format threw the same\r\n way (luv2shop: no prices, cards cut off) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: the date filter uses the shared picker markup (picker-field, DateTimePickerService) -->\r\n\r\n<!-- shuaib 2026-09-24\r\n - change: card field switches use renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment naming the types this container does not render. It carries four\r\n ngSwitch blocks, so the gap belongs to the container and not to one of them -->\r\n\r\n<!-- @contract gap: dateRange, quantity, credit card\r\n reality: a card renders string, number, image, date, time, dropdown, boolean and\r\n autocomplete. Legacy checkbox fields normalize to boolean. dropdown and boolean arrived on 2026-09-18; before that a card\r\n dropped them silently.\r\n failure: a field of a missing type renders empty, with no error.\r\n instead: quantity is grid-only by design; for a dateRange or a credit card use a modal.\r\n seen: this file carries four switch blocks (lines 23, 94, 267, 488) and none of them has\r\n a case for those three - the gap belongs to the container, not to one block -->\r\n\r\n<!-- Loader Spinner -->\r\n\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div class=\"vl-card-runtime\">\r\n <!-- top pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n itemInfo?.layoutSchema?.pagination?.top\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n <div *ngIf=\"itemInfo?.header?.elements?.length\" [ngStyle]=\"getHeaderStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.header?.style\r\n ).classes\">\r\n <div *ngFor=\"let element of itemInfo.header?.elements; let c = index\"\r\n [ngStyle]=\"getHeaderElementWrapperStyle(element)\"\r\n [class]=\"element.option?.innerAction && element.option?.innerAction === 'saveAll' && !displayedRecords?.length ? \r\n 'hidden' :getStyleWithoutClasses(element?.wrapperStyle).classes\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"element.option?.visible ? 'card-field-wrapper' : 'hidden'\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"element.label?.caption\"\r\n [style]=\"getStyleWithoutClasses(element.label?.style).style\"\r\n [class]=\"element.label?.style?.classes?.[0]\">\r\n {{ element.label.caption }}\r\n </span>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <vl-string [formField]=\"element\"\r\n [modalItemInfo]=\"itemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\"\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : ''\"\r\n [ngClass]=\"element?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value : element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <div class=\"picker-field\">\r\n <p-datepicker #cardDatePicker\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [dateFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].format : 'yy-mm-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n (onInput)=\"onDateTyping($event)\"\r\n [class]=\"element?.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(element?.scope?.style).style\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [panelStyleClass]=\"picker.datePanelClass\"\r\n [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"element?.option?.keyboardType ?? 'date'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, cardDatePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(cardDatePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\"\r\n aria-label=\"Open calendar\"\r\n (pointerdown)=\"picker.openFromIcon($event, cardDatePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardHeader(element)\">\r\n <button nz-button type=\"button\"\r\n [matTooltip]=\"element?.option?.tooltip || ''\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [ngStyle]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else headerTextContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #headerTextContent>{{ element.caption\r\n }}</ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"card-responsive-grid\" [ngStyle]=\"getCardContainerStyle()\"\r\n [class]=\"getStyleWithoutClasses(\r\n itemInfo?.layoutSchema?.style\r\n ).classes\">\r\n <div *ngFor=\"let record of displayedRecords; let k = index\"\r\n class=\"card-grid-item\">\r\n <div [ngStyle]=\"getSingleCardStyle()\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.layoutSchema?.stylePerCard).classes\">\r\n <div *ngFor=\"let layout of itemInfo?.layoutSchema?.cards || []\"\r\n class=\"card-layout-item\" [ngStyle]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? {}\r\n : getStyleWithoutClasses(layout?.style).style\r\n \" [class]=\"\r\n layout?.type === 'HorizontalLayout'\r\n ? ''\r\n : getStyleWithoutClasses(layout?.style).classes\r\n \">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(layout?.scope?.reference && itemInfo.propertySchema[getScope(layout.scope?.reference)] ? itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.type : layout?.type == 'HorizontalLayout' ? 'HorizontalLayout' : 'default')\">\r\n <!-- Media Control -->\r\n <div\r\n *ngSwitchCase=\"'media'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"mediaContent; context: { layout: layout, record: record }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(layout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(layout.label?.style).classes\">\r\n {{ getHorizontalLayoutCaption(layout) }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n @if(layout.option && layout.option.control &&\r\n !layout.option.protected){\r\n @switch (layout.option.control) {\r\n @case ('textInput') {\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ??\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ??\r\n '--'\r\n }}\r\n </p>\r\n }\r\n @case ('password') {\r\n <span>Switch not supported yet</span>\r\n\r\n }\r\n @case ('combobox') {\r\n <span>Combobox not supported yet</span>\r\n }\r\n @case('textArea'){\r\n <span>TextArea not supported yet</span>\r\n }\r\n @case ('switch') {\r\n <span>Switch not supported yet</span>\r\n }\r\n\r\n @case('radiobutton') {\r\n <span>Radiobutton not supported yet</span>\r\n }\r\n\r\n @case ('dropdown') {\r\n <select id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(layout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style)?.style\"\r\n [name]=\"layout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)][\r\n layout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[\r\n layout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[layout?.option?.optionValue]\">\r\n {{ item[layout?.option?.optionLabel] }}\r\n </option>\r\n </select>\r\n }\r\n\r\n @case ('autocomplete') {\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[layout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, layout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"layout.option.required\"\r\n [name]=\"layout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"layout?.scope?.style?.classes ? layout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"layout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: layout.scope?.reference\"\r\n [vlCustomKeyboard]=\"layout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n }\r\n }\r\n }@else {\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ??\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ??\r\n '--'\r\n }}\r\n </p>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\"\r\n [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [class]=\"layout.option?.visible ? 'card-field-wrapper' : 'hidden'\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span *ngIf=\"layout?.label?.caption\"\r\n [class]=\"layout.label?.style?.classes?.[0]\">\r\n {{ layout.label.caption }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <p\r\n *ngIf=\"layout.option?.protected && layout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n (click)=\"showLinkDetails(layout.option, record)\">\r\n {{\r\n record?.[layout.scope?.reference.split('/').pop()]\r\n ?? itemInfo.propertySchema[\r\n getScope(layout.scope?.reference)\r\n ]?.[layout.scope?.reference.split('/').pop()]?.default\r\n ?? '--'\r\n }}\r\n </p>\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <!-- VALUE -->\r\n @if(layout.option && layout.option.control &&\r\n !layout.option.protected){\r\n @switch (layout.option.control) {\r\n @case ('textInput') {\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{\r\n record[layout.scope?.reference.split('/').pop()]\r\n | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n }\r\n @case ('slider') {\r\n <p>Slider not Implemented yet</p>\r\n\r\n }\r\n @case ('spinner') {\r\n <p>Spinner not Implemented yet</p>\r\n }\r\n }\r\n } @else{\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n {{\r\n record[layout.scope?.reference.split('/').pop()]\r\n | currency: layout.option?.currency\r\n ?\r\n layout.option.currency\r\n :\r\n 'USD' }}\r\n </h3>\r\n }\r\n\r\n </div>\r\n\r\n <!-- dropdown Control -->\r\n <div *ngSwitchCase=\"'dropdown'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <select id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(layout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style)?.style\"\r\n [name]=\"layout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)][\r\n layout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(layout.scope?.reference)]?.[\r\n layout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[layout?.option?.optionValue]\">\r\n {{ item[layout?.option?.optionLabel]\r\n }}\r\n </option>\r\n </select>\r\n </h3>\r\n </div>\r\n\r\n <!-- autocomplete Control -->\r\n <div *ngSwitchCase=\"'autocomplete'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[layout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, layout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"layout.option.required\"\r\n [name]=\"layout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [class]=\"layout?.scope?.style?.classes ? layout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"layout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: layout.scope?.reference\"\r\n [vlCustomKeyboard]=\"layout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n </h3>\r\n </div>\r\n\r\n <!-- checkbox Control -->\r\n <div *ngSwitchCase=\"'boolean'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(layout.scope?.reference)] && itemInfo.propertySchema[getScope(layout.scope?.reference)][layout.scope?.reference.split('/').pop()]\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(layout?.scope?.style).style\">\r\n <input type=\"checkbox\"\r\n class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(layout.scope?.reference)][\r\n layout.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [name]=\"layout.scope?.reference\" />\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"layout.option?.visible ? 'row' : 'hidden'\">\r\n <button\r\n [style]=\"getStyleWithoutClasses(layout?.style).style\"\r\n [class]=\"layout.option.protected ? 'disabled-button' : getStyleWithoutClasses(layout?.style).classes\"\r\n (click)=\"\r\n invokeButtonClick(\r\n layout,\r\n record,\r\n getRecordIndex(record)\r\n )\r\n\">\r\n <ng-container\r\n *ngIf=\"!layout.caption; else textContent\">\r\n <i nz-icon [nzType]=\"layout.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ layout.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n\r\n <!-- HorizontalLayout Control -->\r\n <div *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div class=\"card-horizontal-layout\"\r\n [class]=\"getStyleWithoutClasses(\r\n layout?.style\r\n ).classes\" [ngStyle]=\"getHorizontalLayoutStyle(layout)\">\r\n <ng-container\r\n *ngFor=\"let innerLayout of layout.elements\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(innerLayout.scope?.reference && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] ? itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n <!-- Media Control -->\r\n <div\r\n *ngSwitchCase=\"'media'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"mediaContent; context: {\r\n layout: innerLayout,\r\n record: record\r\n }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- String Control -->\r\n <div *ngSwitchCase=\"'string'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(innerLayout.label?.style).classes\">\r\n {{\r\n getHorizontalLayoutCaption(innerLayout)\r\n }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n @if(innerLayout.option &&\r\n innerLayout.option.control &&\r\n !innerLayout.option.protected){\r\n @switch\r\n (innerLayout.option.control)\r\n {\r\n @case ('textInput') {\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.dateFormat; else checkInnerTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option.dateFormat)\r\n : '--' }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template\r\n #checkInnerTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalInnerValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n |\r\n date:\r\n innerLayout.option.timeFormat)\r\n : '--' }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template\r\n #normalInnerValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ??\r\n '--' }}\r\n </ng-template>\r\n </h3>\r\n }\r\n @case ('password') {\r\n <span>Switch not supported\r\n yet</span>\r\n\r\n }\r\n @case ('combobox') {\r\n <span>Combobox not supported\r\n yet</span>\r\n }\r\n @case('textArea'){\r\n <span>TextArea not supported\r\n yet</span>\r\n }\r\n @case ('switch') {\r\n <span>Switch not supported\r\n yet</span>\r\n }\r\n\r\n @case('radiobutton') {\r\n <span>Radiobutton not supported\r\n yet</span>\r\n }\r\n\r\n @case ('dropdown') {\r\n <select id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.style\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][\r\n innerLayout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[\r\n innerLayout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[innerLayout?.option?.optionValue]\">\r\n {{\r\n item[innerLayout?.option?.optionLabel]\r\n }}\r\n </option>\r\n </select>\r\n }\r\n\r\n @case ('autocomplete') {\r\n\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[innerLayout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, innerLayout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"innerLayout.option.required\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [class]=\"innerLayout?.scope?.style?.classes ? innerLayout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"innerLayout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: innerLayout.scope?.reference\"\r\n [vlCustomKeyboard]=\"innerLayout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n }\r\n }\r\n }@else{\r\n\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n\r\n <!-- DATE FORMAT -->\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.dateFormat; else checkInnerTime\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option.dateFormat)\r\n : '--' }}\r\n </ng-container>\r\n\r\n <!-- TIME FORMAT -->\r\n <ng-template\r\n #checkInnerTime>\r\n <ng-container\r\n *ngIf=\"innerLayout.option?.timeFormat; else normalInnerValue\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n |\r\n date:\r\n innerLayout.option.timeFormat)\r\n : '--' }}\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- NORMAL STRING -->\r\n <ng-template\r\n #normalInnerValue>\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ??\r\n '--' }}\r\n </ng-template>\r\n </h3>\r\n }\r\n\r\n </div>\r\n\r\n <!-- number Control -->\r\n <div *ngSwitchCase=\"'number'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n {{\r\n record[innerLayout.scope?.reference.split('/').pop()]\r\n | currency:\r\n innerLayout.option?.currency\r\n ?\r\n innerLayout.option.currency\r\n :\r\n 'USD'\r\n }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Date Control -->\r\n <div *ngSwitchCase=\"'date'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(innerLayout.label?.style).classes\">\r\n {{\r\n getHorizontalLayoutCaption(innerLayout)\r\n }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option?.dateFormat\r\n ?\r\n innerLayout.option?.dateFormat\r\n :\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[innerLayout.scope?.reference.split('/').pop()]?.format\r\n || 'yyyy-MM-dd') : '--' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Time Control -->\r\n <div *ngSwitchCase=\"'time'\"\r\n [ngClass]=\"[innerLayout?.option?.visible ? 'card-field-wrapper' : 'hidden',getStyleWithoutClasses(innerLayout?.style).classes]\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.style).style\">\r\n\r\n <!-- LABEL -->\r\n <span\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout.label?.style).style\"\r\n [class]=\"getStyleWithoutClasses(innerLayout.label?.style).classes\">\r\n {{\r\n getHorizontalLayoutCaption(innerLayout)\r\n }}\r\n </span>\r\n\r\n <!-- VALUE -->\r\n <h3\r\n *ngIf=\"innerLayout.option?.protected && innerLayout.option?.visible\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n (click)=\"showLinkDetails(innerLayout.option, record)\">\r\n {{\r\n record?.[innerLayout.scope?.reference.split('/').pop()]\r\n ?\r\n (record[innerLayout.scope?.reference.split('/').pop()]\r\n | date:\r\n innerLayout.option?.timeFormat\r\n ?\r\n innerLayout.option?.timeFormat\r\n :itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[innerLayout.scope?.reference.split('/').pop()]?.format\r\n || 'HH:mm') : '--' }}\r\n </h3>\r\n </div>\r\n\r\n <!-- dropdown Control -->\r\n <div *ngSwitchCase=\"'dropdown'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n <select\r\n id=\"dynamic-dropdown\"\r\n #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(innerLayout?.scope?.style)?.style\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][\r\n innerLayout.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of itemInfo.propertySchema[getScope(innerLayout.scope?.reference)]?.[\r\n innerLayout.scope?.reference.split('/').pop()\r\n ]?.data\r\n \"\r\n [value]=\"item[innerLayout?.option?.optionValue]\">\r\n {{\r\n item[innerLayout?.option?.optionLabel]\r\n }}\r\n </option>\r\n </select>\r\n </h3>\r\n </div>\r\n\r\n <!-- autocomplete Control -->\r\n <div *ngSwitchCase=\"'autocomplete'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]?.format?.currency\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[innerLayout.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, innerLayout)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"innerLayout.option.required\"\r\n [name]=\"innerLayout.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\"\r\n [class]=\"innerLayout?.scope?.style?.classes ? innerLayout?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"innerLayout.option.autocomplete.response.label\"\r\n [placeholder]=\"itemInfo.propertySchema | vlPlaceholder: innerLayout.scope?.reference\"\r\n [vlCustomKeyboard]=\"innerLayout?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n </h3>\r\n </div>\r\n\r\n <!-- checkbox Control -->\r\n <div *ngSwitchCase=\"'boolean'\"\r\n [class]=\"innerLayout.option?.visible ? 'row' : 'hidden'\">\r\n <h3\r\n *ngIf=\"itemInfo.propertySchema[getScope(innerLayout.scope?.reference)] && itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][innerLayout.scope?.reference.split('/').pop()]\"\r\n [class]=\"getStyleWithoutClasses(innerLayout?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.scope?.style).style\">\r\n <input type=\"checkbox\"\r\n class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"\r\n itemInfo.propertySchema[getScope(innerLayout.scope?.reference)][\r\n innerLayout.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [name]=\"innerLayout.scope?.reference\" />\r\n </h3>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button nz-button\r\n [matTooltip]=\"getHorizontalLayoutTooltip(innerLayout)\"\r\n [matTooltipTouchGestures]=\"'auto'\"\r\n [style]=\"getStyleWithoutClasses(innerLayout?.style).style\"\r\n [class]=\"innerLayout.option?.visible ? innerLayout.option.protected ? 'disabled-button' : getStyleWithoutClasses(innerLayout?.style).classes : 'hidden'\"\r\n (click)=\"\r\n invokeButtonClick(\r\n innerLayout,\r\n record,\r\n getRecordIndex(record)\r\n )\r\n\">\r\n <span\r\n class=\"schema-btn-content\">\r\n <i\r\n *ngIf=\"showButtonIcon(innerLayout)\"\r\n nz-icon\r\n [nzType]=\"innerLayout.icon\"\r\n nzTheme=\"outline\">\r\n </i>\r\n\r\n <span\r\n *ngIf=\"showButtonCaption(innerLayout)\">\r\n {{\r\n innerLayout.caption\r\n }}\r\n </span>\r\n\r\n <span *ngIf=\"\r\n !showButtonIcon(innerLayout) &&\r\n !showButtonCaption(innerLayout)\r\n \">\r\n Button\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"itemInfo?.footer?.elements && itemInfo?.data && itemInfo?.data.length\"\r\n [class]=\"getStyleWithoutClasses(itemInfo?.footer?.style).classes\">\r\n <span\r\n *ngFor=\"let element of itemInfo.footer?.elements; let c = index\">\r\n <ng-container\r\n [ngSwitch]=\"renderFieldType(element.scope?.reference && itemInfo.propertySchema[getScope(element.scope?.reference)] ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.type : 'default')\">\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"element.option.protected\"\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">\r\n <h5>{{\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!element.option.protected\">\r\n <div\r\n [class]=\"element?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(element?.label?.style).style\"\r\n [class]=\"element?.label?.style?.classes[0]\">{{\r\n element.label?.value\r\n ?\r\n element.label?.value :\r\n element.label?.caption ?\r\n element.label?.caption :\r\n itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-date-picker\r\n [required]=\"element.option.required\"\r\n [name]=\"element.scope?.reference\"\r\n [nzDisabled]=\"element?.option?.disabled\"\r\n (ngModelChange)=\"dateChangeEvent(element, $event)\"\r\n [nzFormat]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format ? itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()]?.format : 'yyyy-MM-dd'\"\r\n [(ngModel)]=\"itemInfo.propertySchema[getScope(element.scope?.reference)][element.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(element?.style).style\"></nz-date-picker>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Button Control -->\r\n <div *ngSwitchCase=\"'default'\"\r\n [class]=\"element.option?.visible ? 'row' : 'hidden'\"\r\n (click)=\"invokeOnCardFooter(element)\">\r\n <button nz-button\r\n [style]=\"getStyleWithoutClasses(element.style).style\"\r\n [class]=\"element.option.protected ? 'disabled-button' : getStyleWithoutClasses(element.style).classes\">\r\n <ng-container\r\n *ngIf=\"!element.caption; else textContent\">\r\n <i nz-icon [nzType]=\"element.icon\"\r\n nzTheme=\"outline\"></i>\r\n </ng-container>\r\n <ng-template #textContent>\r\n {{ element.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </span>\r\n </div>\r\n <!-- bottom pagination on card -->\r\n <div *ngIf=\"\r\n itemInfo?.data?.length && \r\n itemInfo?.layoutSchema?.pagination?.visible &&\r\n !itemInfo?.layoutSchema?.pagination?.top &&\r\n !scrollPagination\r\n \" class=\"card-pagination-wrapper\">\r\n <vl-pagination [itemInfo]=\"itemInfo\"\r\n [selectedLanguageInfo]=\"selectedLanguageInfo\"\r\n [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n </div>\r\n\r\n @if (scrollPagination) {\r\n <div #scrollPaginationSentinel class=\"scroll-pagination-sentinel\"\r\n aria-hidden=\"true\">\r\n </div>\r\n }\r\n</div>\r\n<ng-template #mediaContent let-layout=\"layout\" let-record=\"record\">\r\n <ng-container *ngIf=\"getMediaSource(layout, record) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(layout, record)\">\r\n\r\n <!-- Default: image. Keep your existing image-click behaviour. -->\r\n <img\r\n *ngSwitchDefault\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"source\"\r\n [alt]=\"getMediaLabel(layout)\"\r\n loading=\"lazy\"\r\n (click)=\"showImageDetails(layout.option, record)\" />\r\n\r\n <video\r\n *ngSwitchCase=\"'video'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(layout)\"\r\n controls\r\n playsinline\r\n preload=\"metadata\">\r\n Your browser does not support video playback.\r\n </video>\r\n\r\n <audio\r\n *ngSwitchCase=\"'audio'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(layout)\"\r\n controls\r\n preload=\"metadata\">\r\n Your browser does not support audio playback.\r\n </audio>\r\n\r\n <a\r\n *ngSwitchCase=\"'pdf'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [href]=\"source\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(layout) }}\r\n </a>\r\n\r\n <a\r\n *ngSwitchCase=\"'file'\"\r\n [class]=\"getStyleWithoutClasses(layout?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(layout?.scope?.style).style\"\r\n [href]=\"source\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(layout) }}\r\n </a>\r\n\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>","import { Component, ChangeDetectorRef, Input } from '@angular/core';\r\nimport { UtilityService } from '../../services/utility.service';\r\n\r\n@Component({\r\n selector: 'vl-label',\r\n standalone: true,\r\n templateUrl: './label.html',\r\n styleUrl: './label.css',\r\n})\r\nexport class Label {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n selectedLanguageInfo: any = {};\r\n\r\n constructor(\r\n private cdr: ChangeDetectorRef,\r\n private utilityService: UtilityService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.utilityService.currentProjectlanguage$.subscribe((uiLang: any) => {\r\n queueMicrotask(() => {\r\n if (uiLang) {\r\n this.selectedLanguageInfo = uiLang\r\n this.cdr.markForCheck();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n getlabel(formField: any) {\r\n let caption = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n const translation = this.selectedLanguageInfo?.selectedLanguage;\r\n return translation && translation[caption] ? translation[caption] : caption;\r\n }\r\n\r\n}\r\n","<label [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style?.classes ? formField?.label?.style?.classes[0] : ''\">{{\r\n this.getlabel(formField) }}</label>","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - new (#145): vlMedia - a media field's value made playable for <video>/<audio>: a file name is\r\n// read from Media/ of the project (signed CouchDB link for an attachment), a URL stays as it is\r\n\r\nimport { Pipe, PipeTransform } from '@angular/core';\r\nimport { Couchdb } from '../services/couchdb';\r\n\r\n/** [src]=\"source | vlMedia | async\" - the same Promise for the same source, so no request loop. */\r\n@Pipe({\r\n name: 'vlMedia',\r\n standalone: true,\r\n})\r\nexport class MediaSourcePipe implements PipeTransform {\r\n /** Kept one hour: a signed link lasts eight, a page lives shorter. */\r\n private static readonly known = new Map<string, { pending: Promise<string>; at: number }>();\r\n\r\n constructor(private couchdb: Couchdb) { }\r\n\r\n transform(source: string | null | undefined): Promise<string> {\r\n const value = (source || '').trim();\r\n const known = MediaSourcePipe.known.get(value);\r\n if (known && Date.now() - known.at < 3600_000) return known.pending;\r\n const pending = this.couchdb.resolveMediaSource(value).catch((error) => {\r\n console.warn(`Media \"${value}\" could not be resolved`, error);\r\n MediaSourcePipe.known.delete(value);\r\n return '';\r\n });\r\n MediaSourcePipe.known.set(value, { pending, at: Date.now() });\r\n return pending;\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-16\r\n// - fix: setErroMessage without a text for the error no longer throws (error.replace of undefined)\r\n// - new: an autocomplete says \"loading\" while its backend list is on the way and \"no results\" only\r\n// after, in the project's language (autocompleteLoading / autocompleteNoResults)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - new (#145): video and audio play through vlMedia - a file name in the field becomes a signed\r\n// CouchDB link (attachment, streamed with Range)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: fields with a backend source (option.autocomplete) load their list through\r\n// RemoteListService - autocomplete suggestions, dropdown/combobox items; the autocompletes of this\r\n// container stayed empty before\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: date and time fields use DateTimePickerService like the dialog - toolkit keyboard in\r\n// the field, calendar docked at the bottom from the icon, time picker at its field. The empty\r\n// picker handlers they called before are gone\r\n// Shuaib 2026-09-24\r\n// - new: renderFieldType maps legacy checkbox fields to boolean so existing forms continue to render.\r\nimport {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n SimpleChanges,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n inject,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { NzSelectModule } from 'ng-zorro-antd/select';\r\n\r\nimport { Label } from '../../components/label/label';\r\nimport { String } from '../../components/string/string';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { MediaSourcePipe } from '../../pipes/media-source.pipe';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [PlaceholderPipe, MediaSourcePipe, CommonModule, FormsModule, NzSelectModule, String, Label,\r\n NzDatePickerModule,\r\n DatePickerModule,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n CustomKeyboardDirective,\r\n ],\r\n selector: 'vl-form',\r\n templateUrl: './form.component.html',\r\n styleUrl: './form.component.css',\r\n})\r\nexport class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\r\n // ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Loaded lists by field reference. */\r\n remoteData: Record<string, any[]> = {};\r\n /** Current suggestions of an autocomplete by field reference. */\r\n remoteSuggestions: Record<string, any[]> = {};\r\n\r\n /** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */\r\n async loadRemoteLists(nodes: any[], propertySchema: any): Promise<void> {\r\n const sources = new Map<string, any>();\r\n const visit = (node: any): void => {\r\n if (!node || typeof node !== 'object') {\r\n return;\r\n }\r\n\r\n if (node.option?.autocomplete && node.scope?.reference) {\r\n sources.set(node.scope.reference, node);\r\n }\r\n\r\n for (const value of Object.values(node)) {\r\n if (value && typeof value === 'object') {\r\n visit(value);\r\n }\r\n }\r\n };\r\n\r\n nodes.forEach(visit);\r\n\r\n await Promise.all([...sources.entries()].map(async ([reference, node]) => {\r\n this.remoteLoading[reference] = true;\r\n const list = await this.remoteLists.loadShared(node.option.autocomplete).finally(() => {\r\n this.remoteLoading[reference] = false;\r\n });\r\n this.remoteData[reference] = list;\r\n // the list opened while it was still loading: show what arrived for what was typed\r\n if (this.lastRemoteQuery?.reference === reference) {\r\n this.completeRemote({ query: this.lastRemoteQuery.query }, node);\r\n }\r\n\r\n const scope = reference.substring(reference.indexOf('#/') + 2, reference.indexOf('/', reference.indexOf('#/') + 2));\r\n const property = propertySchema?.[scope]?.[reference.split('/').pop() ?? ''];\r\n\r\n if (property && node.option?.control && node.option.control !== 'autocomplete' && list.length) {\r\n property.data = list;\r\n }\r\n }));\r\n }\r\n\r\n /** Backend lists still on the way, by field reference. */\r\n remoteLoading: Record<string, boolean> = {};\r\n private lastRemoteQuery: { reference: string; query: string } | null = null;\r\n\r\n /**\r\n * What an autocomplete shows when it has no entries: \"loading\" while its list is on the way,\r\n * \"no results\" after - in the project's language (autocompleteLoading, autocompleteNoResults),\r\n * English when the project has no text for it.\r\n */\r\n autocompleteEmptyText(node: any): string {\r\n const t = this.selectedLanguageInfo?.selectedLanguage || {};\r\n return this.remoteLoading[node?.scope?.reference ?? '']\r\n ? (t['autocompleteLoading'] || 'Loading…')\r\n : (t['autocompleteNoResults'] || 'No results');\r\n }\r\n\r\n /** (completeMethod) of an autocomplete with a backend list. */\r\n completeRemote(event: any, node: any): void {\r\n const reference = node?.scope?.reference ?? '';\r\n this.lastRemoteQuery = { reference, query: event?.query || '' };\r\n this.remoteSuggestions[reference] = this.remoteLists.filter(this.remoteData[reference], reference.split('/').pop(), event?.query);\r\n }\r\n\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n ngOnDestroy(): void {\r\n this.picker.closeIfWithin(this.host.nativeElement);\r\n }\r\n\r\n /** Keep existing checkbox data objects usable; new objects use boolean. */\r\n renderFieldType(type: string | undefined): string | undefined {\r\n return type === 'checkbox' ? 'boolean' : type;\r\n }\r\n\r\n customEmailPattern = '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$';\r\n\r\n showPassword = false;\r\n formCopy: any = {};\r\n\r\n @Input() errorMessages: any = {};\r\n @Input() creditCardError: any = {};\r\n @Input() form: any = {};\r\n @Input() selectedLanguageInfo: any = {};\r\n\r\n @Output() formButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() checkBoxChangeEvent: EventEmitter<any> = new EventEmitter();\r\n\r\n ngOnInit(): void { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Backend lists of fields with option.autocomplete (any data type, any control).\r\n if (changes['form'] && this.form) {\r\n void this.loadRemoteLists([this.form.layoutSchema], this.form.propertySchema);\r\n }\r\n if (changes['form'] && this.form) {\r\n this.formCopy = this.safeClone(this.form);\r\n this.setValidations();\r\n }\r\n\r\n if (\r\n (changes['selectedLanguageInfo'] || this.selectedLanguageInfo) &&\r\n this.selectedLanguageInfo?.selectedLanguage\r\n ) {\r\n this.applySelectedLanguage();\r\n this.setValidations();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.setValidations();\r\n });\r\n }\r\n\r\n private safeClone(value: any): any {\r\n try {\r\n return JSON.parse(JSON.stringify(value || {}));\r\n } catch {\r\n return {};\r\n }\r\n }\r\n\r\n private applySelectedLanguage(): void {\r\n if (this.selectedLanguageInfo?.errorMessages) {\r\n this.errorMessages = this.selectedLanguageInfo.errorMessages;\r\n }\r\n\r\n if (!this.formCopy || !this.form) {\r\n return;\r\n }\r\n\r\n const selectedLanguage = this.selectedLanguageInfo.selectedLanguage;\r\n\r\n this.form.propertySchema = this.formCopy.propertySchema\r\n ? this.safeClone(this.formCopy.propertySchema)\r\n : {};\r\n\r\n this.form.propertySchema = this.translateSchema(\r\n this.form.propertySchema,\r\n selectedLanguage\r\n );\r\n\r\n if (this.formCopy?.layoutSchema?.formSections?.length) {\r\n this.formCopy.layoutSchema.formSections.forEach(\r\n (formSection: any, sectionIndex: number) => {\r\n if (\r\n formSection?.label?.caption &&\r\n selectedLanguage[formSection.label.caption]\r\n ) {\r\n this.form.layoutSchema.formSections[sectionIndex].label.caption =\r\n selectedLanguage[formSection.label.caption];\r\n }\r\n\r\n if (formSection?.formFields?.length) {\r\n formSection.formFields.forEach(\r\n (formField: any, fieldIndex: number) => {\r\n if (\r\n formField?.label?.caption &&\r\n selectedLanguage[formField.label.caption]\r\n ) {\r\n this.form.layoutSchema.formSections[sectionIndex].formFields[\r\n fieldIndex\r\n ].label.caption = selectedLanguage[formField.label.caption];\r\n }\r\n }\r\n );\r\n }\r\n }\r\n );\r\n }\r\n }\r\n\r\n translateSchema(schema: any, selectedLanguage: any): any {\r\n if (!schema || typeof schema !== 'object' || !selectedLanguage) {\r\n return schema;\r\n }\r\n\r\n Object.keys(schema).forEach((key) => {\r\n const value = schema[key];\r\n\r\n if (value && typeof value === 'object' && !Array.isArray(value)) {\r\n this.translateSchema(value, selectedLanguage);\r\n }\r\n\r\n if (Array.isArray(value)) {\r\n value.forEach((item) => {\r\n if (item && typeof item === 'object') {\r\n this.translateSchema(item, selectedLanguage);\r\n }\r\n });\r\n }\r\n\r\n if (\r\n value &&\r\n typeof value === 'object' &&\r\n typeof value.caption === 'string' &&\r\n value.caption.trim()\r\n ) {\r\n const original = value.caption.trim();\r\n\r\n if (selectedLanguage[original]) {\r\n value.caption = selectedLanguage[original];\r\n }\r\n }\r\n\r\n if (\r\n value &&\r\n typeof value === 'object' &&\r\n typeof value.placeholder === 'string' &&\r\n value.placeholder.trim()\r\n ) {\r\n const original = value.placeholder.trim();\r\n\r\n if (selectedLanguage[original]) {\r\n value.placeholder = selectedLanguage[original];\r\n }\r\n }\r\n });\r\n\r\n return schema;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any): { classes: string; style: any } {\r\n if (!styleObject || typeof styleObject !== 'object') {\r\n return { classes: '', style: {} };\r\n }\r\n\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n\r\n return {\r\n classes: Array.isArray(classes) ? classes.join(' ') : classes || '',\r\n style: styleWithoutClasses || {},\r\n };\r\n }\r\n\r\n getSectionBodyStyle(formSection: any): any {\r\n const layout = formSection?.layout || {};\r\n const schemaStyle = this.getStyleWithoutClasses(formSection?.style).style;\r\n\r\n return {\r\n display: schemaStyle?.display || 'grid',\r\n gridTemplateColumns:\r\n schemaStyle?.gridTemplateColumns ||\r\n `repeat(${layout?.desktopColumns || 12}, minmax(0, 1fr))`,\r\n gap: schemaStyle?.gap || layout?.gap || '10px',\r\n alignItems: schemaStyle?.alignItems || 'start',\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n ...schemaStyle,\r\n };\r\n }\r\n\r\n getFieldWrapperStyle(formField: any): any {\r\n const schemaStyle = this.getStyleWithoutClasses(formField?.style).style;\r\n\r\n return {\r\n minWidth: 0,\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n ...schemaStyle,\r\n };\r\n }\r\n\r\n getFieldInnerLayoutStyle(formField: any): any {\r\n if (formField?.layout === 'horizontal') {\r\n return {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(110px, 30%) 1fr',\r\n alignItems: 'center',\r\n gap: '10px',\r\n };\r\n }\r\n\r\n return {\r\n display: 'block',\r\n };\r\n }\r\n\r\n getScope(scope: any): string {\r\n if (!scope || typeof scope !== 'string') {\r\n return '';\r\n }\r\n\r\n const start = scope.indexOf('#/') + 2;\r\n const end = scope.indexOf('/', start);\r\n\r\n if (start >= 2 && end > start) {\r\n return scope.substring(start, end);\r\n }\r\n\r\n return '';\r\n }\r\n\r\n togglePasswordVisibility(): void {\r\n this.showPassword = !this.showPassword;\r\n }\r\n\r\n invokeFormBtnClick(option: any, propertySchema: any): void {\r\n this.formButtonClick.emit({\r\n option,\r\n propertySchema,\r\n });\r\n }\r\n\r\n setformData(): void {\r\n this.checkBoxChangeEvent.emit(this.form?.propertySchema);\r\n }\r\n\r\n setErroMessage(formField: any, errorMessages: any, field: any): string {\r\n let error = '';\r\n let fieldName = '';\r\n\r\n if (field?.errors?.required) {\r\n error = errorMessages?.required || '';\r\n } else if (field?.errors?.email || field?.errors?.pattern) {\r\n error = errorMessages?.pattern || '';\r\n } else if (field?.errors?.minlength) {\r\n error = errorMessages?.minlength || '';\r\n } else if (field?.errors?.maxlength) {\r\n error = errorMessages?.maxlength || '';\r\n }\r\n\r\n if (formField?.label?.value) {\r\n fieldName = formField.label.value;\r\n } else {\r\n const scope = this.getScope(formField?.scope?.reference);\r\n const key = formField?.scope?.reference?.split('/').pop();\r\n const propertySchema = this.form?.propertySchema?.[scope]?.[key];\r\n\r\n fieldName = propertySchema?.caption || propertySchema?.placeholder || '';\r\n }\r\n\r\n if (error && error.toString().includes('{{requiredLength}}')) {\r\n error = error.replace(\r\n /{{\\s*requiredLength\\s*}}/g,\r\n formField?.minlength?.toString() || ''\r\n );\r\n }\r\n\r\n // no text for this error in the project (errorMessages not loaded): nothing to show, no crash -\r\n // the exception came on every change detection of the dialog and stopped it updating\r\n return `${error ?? ''}`.replace(/{{\\s*field\\s*}}/g, fieldName ?? '');\r\n }\r\n\r\n setValidations(): void {\r\n if (!this.form?.layoutSchema?.formSections?.length) {\r\n return;\r\n }\r\n\r\n this.form.layoutSchema.formSections.forEach((formSection: any) => {\r\n if (!formSection?.formFields?.length) {\r\n return;\r\n }\r\n\r\n formSection.formFields.forEach((formField: any) => {\r\n const reference = formField?.scope?.reference;\r\n\r\n if (!reference || !this.form?.propertySchema) {\r\n return;\r\n }\r\n\r\n const scope = this.getScope(reference);\r\n const key = reference.split('/').pop();\r\n\r\n const property = this.form.propertySchema?.[scope]?.[key];\r\n\r\n if (!property?.validation?.length) {\r\n return;\r\n }\r\n\r\n property.validation.forEach((validation: any) => {\r\n if (validation.required) {\r\n formField.required = true;\r\n }\r\n\r\n if (validation.email) {\r\n formField.email = true;\r\n }\r\n\r\n if (validation.minlength) {\r\n formField.minlength = validation.minlength;\r\n }\r\n\r\n if (validation.maxlength) {\r\n formField.maxlength = validation.maxlength;\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n matchData: any = [];\r\n\r\n getLabel(formField: any) {\r\n let caption = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.form.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n const translation = this.selectedLanguageInfo?.selectedLanguage;\r\n return translation && translation[caption] ? translation[caption] : caption;\r\n }\r\n\r\n dateChangeEvent(formField: any, event: any) { }\r\n\r\n onDateTyping(event: any) { }\r\n\r\n onTimeTyping(event: any) { }\r\n\r\n timeChangeEvent(formField: any, event: any) { }\r\n\r\n autocompChangeEvent(event: any, formfield: any) { }\r\n\r\n autocompFocusOutEvent(event: any, formfield: any) { }\r\n\r\n // Media rendering only; does not modify the schema or field values.\r\n private getMediaProperty(field: any): any {\r\n const reference = field?.scope?.reference;\r\n const key = reference?.split('/').pop();\r\n return key ? this.form?.propertySchema?.[this.getScope(reference)]?.[key] : undefined;\r\n }\r\n\r\n getMediaSource(field: any): string {\r\n const property = this.getMediaProperty(field);\r\n const value = field?.option?.src || property?.value || property?.default || '';\r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n\r\n getMediaLabel(field: any): string {\r\n if (typeof field?.label === 'string' && field.label.trim()) return field.label;\r\n return field?.label?.value || field?.label?.caption\r\n || this.getMediaProperty(field)?.caption || 'Media';\r\n }\r\n\r\n getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(field);\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n\r\n const property = this.getMediaProperty(field);\r\n const candidates = [source, field?.option?.fileName, property?.value, property?.default];\r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'csv', 'zip', 'rar', '7z'];\r\n\r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string' || /^(data|blob):/i.test(candidate)) continue;\r\n let path = candidate.split(/[?#]/)[0];\r\n try { path = decodeURIComponent(path); } catch { /* Keep the original path. */ }\r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n return 'image';\r\n }\r\n}","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time fields use the shared picker markup (picker-field, DateTimePickerService)\r\n instead of PrimeNG's own icon with empty handlers -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the form field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - change: the credit card type is spelled creditCard. The rename of 2026-09-15 reached\r\n model.component.html and the whole Designer but not this file, so one data object rendered\r\n in a modal and stayed empty here\r\n - new: a @contract comment on the type switch and on the credit card case, so the rule sits\r\n next to the code that implements it -->\r\n<div class=\"form-renderer\"\r\n [ngClass]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(form?.layoutSchema?.style)?.style\">\r\n <form *ngIf=\"form?.layoutSchema?.formSections?.length > 0\">\r\n <div\r\n *ngFor=\"let formSection of form?.layoutSchema?.formSections; let i = index\"\r\n class=\"section-card\">\r\n <div *ngIf=\"formSection?.label?.caption\" class=\"section-header\">\r\n <div class=\"section-title\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formSection?.label?.style)?.style\">\r\n {{ formSection.label.caption }}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"formSection?.formFields?.length > 0\" class=\"section-body\"\r\n [ngClass]=\"getStyleWithoutClasses(formSection?.style)?.classes\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <div *ngFor=\"let formField of formSection.formFields\" class=\"field-row\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\">\r\n <!-- @contract decision: this switch decides whether a field appears at all\r\n reality: renders string, number, image, date, time, dropdown, boolean,\r\n autocomplete, dateRange and the credit card type. Everything else\r\n falls into the default branch and the field renders empty - no error,\r\n nothing in the console either. Existing checkbox fields are normalized\r\n to boolean before this switch; new fields should use boolean.\r\n seen: measured 2026-09-19 with viewdefinition-contract/derive-capabilities.sh\r\n against this file; date, time, dropdown, boolean, autocomplete and\r\n dateRange arrived on 2026-09-18 -->\r\n <div [ngSwitch]=\"renderFieldType(\r\n formField?.scope?.reference &&\r\n form?.propertySchema?.[getScope(formField.scope?.reference)]\r\n ? form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.type\r\n : 'default'\r\n )\">\r\n <!-- Media control -->\r\n\r\n <div *ngSwitchCase=\"'media'\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <ng-container *ngTemplateOutlet=\"formMediaContent; context: { field: formField }\"></ng-container>\r\n </div>\r\n\r\n\r\n <!-- credit card control -->\r\n <!-- @contract decision: the credit card type is spelled creditCard\r\n reality: it was carditCard here until 2026-09-19. The rename of 2026-09-15\r\n reached model.component.html and the whole Designer, but not this\r\n file and not utility.service.ts, so the same data object rendered in\r\n one container and stayed empty in the other. All four places agree now.\r\n failure: a data object still declaring carditCard renders empty everywhere -\r\n that spelling is read nowhere any more.\r\n instead: declare the type as creditCard. -->\r\n <div *ngSwitchCase=\"'creditCard'\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <div id=\"card-element\"></div>\r\n <div id=\"card-errors\"\r\n [class]=\"creditCardError?.textContent !== '' ? 'text-red-400 m-0' : ''\"></div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <span *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"formField?.option?.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between\">\r\n <span\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </span>\r\n\r\n <span>\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n\r\n <span *ngIf=\"!formField?.option?.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n formField?.label?.value\r\n ? formField.label.value\r\n : formField?.label?.caption\r\n ? formField.label.caption\r\n :\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n\r\n <div [ngStyle]=\"\r\n formField?.option?.password\r\n ? {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center'\r\n }\r\n : {}\r\n \">\r\n <input [type]=\"\r\n formField?.option?.password\r\n ? !showPassword\r\n ? 'password'\r\n : 'text'\r\n : 'text'\r\n \" #inputField=\"ngModel\" [required]=\"formField?.required\"\r\n [attr.inputmode]=\"\r\n formField?.option?.email\r\n ? 'email'\r\n : formField?.option?.password\r\n ? 'numeric'\r\n : 'text'\r\n \" [pattern]=\"formField?.email ? customEmailPattern : ''\"\r\n [email]=\"formField?.email\"\r\n [minlength]=\"formField?.minlength\"\r\n [maxlength]=\"formField?.maxlength\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\" [placeholder]=\"form.propertySchema | vlPlaceholder: formField.scope?.reference\" />\r\n\r\n <i *ngIf=\"formField?.option?.password\" class=\"fa\"\r\n [ngClass]=\"showPassword ? 'fa-eye' : 'fa-eye-slash'\"\r\n (click)=\"togglePasswordVisibility()\"\r\n style=\"position: absolute; right: 10px; cursor: pointer\"></i>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.validation?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.validation?.style)?.style\">\r\n <p [class]=\"\r\n formField?.layout === 'horizontal'\r\n ? 'text-red-400 m-0 horizontal-error'\r\n : 'text-red-400 m-0'\r\n \" *ngIf=\"inputField?.errors\">\r\n {{ setErroMessage(formField, errorMessages, inputField) }}\r\n </p>\r\n </div>\r\n </span>\r\n </span>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"formField?.option?.protected\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n <h5>\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.value\r\n | currency\r\n : formField?.option?.currency\r\n : true\r\n : formField?.option?.decimalPoint\r\n }}\r\n </h5>\r\n </span>\r\n\r\n <span *ngIf=\"!formField?.option?.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n formField?.label?.value\r\n ? formField.label.value\r\n :\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n\r\n <input type=\"number\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\" [placeholder]=\"form.propertySchema | vlPlaceholder: formField.scope?.reference\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- checkbox control -->\r\n <div *ngSwitchCase=\"'boolean'\" class=\"form-group\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <span *ngIf=\"formField?.option?.postfixCaption\">\r\n <label class=\"form-check-label\">\r\n <input type=\"checkbox\" class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"setformData()\" />\r\n\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n </span>\r\n\r\n <div *ngIf=\"!formField?.option?.postfixCaption\"\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label class=\"form-check-label\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n\r\n <input type=\"checkbox\" class=\"form-check-input\" [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"setformData()\" />\r\n </label>\r\n </div>\r\n </div>\r\n\r\n <!-- DateRange control -->\r\n <div *ngSwitchCase=\"'dateRange'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{\r\n formField.label?.value\r\n ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateRangeField?.touched && dateRangeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateRangeField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateRangeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{getLabel(formField)}}</label>\r\n\r\n <span>\r\n <div class=\"picker-field\">\r\n <p-datepicker #datePicker #dateField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\r\n (ngModelChange)=\"dateChangeEvent(formField, $event)\"\r\n (onInput)=\"onDateTyping($event)\" [dateFormat]=\"\r\n form.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ]?.format || 'yy-mm-dd'\r\n \" [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \" [class]=\"formField?.scope?.style?.classes?.[0] || ''\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\" appendTo=\"body\"\r\n [panelStyleClass]=\"picker.datePanelClass\" [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"formField?.option?.keyboardType ?? 'date'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, datePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(datePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\" aria-label=\"Open calendar\"\r\n (pointerdown)=\"picker.openFromIcon($event, datePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"dateField?.touched && dateField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages,\r\n \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Time control -->\r\n <div *ngSwitchCase=\"'time'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{getLabel(formField)}}</label>\r\n <span>\r\n <div class=\"picker-field\">\r\n <p-datepicker #timePicker #timeField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\" [timeOnly]=\"true\"\r\n hourFormat=\"24\" [disabled]=\"formField?.option?.disabled\" [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\r\n (onInput)=\"onTimeTyping($event)\"\r\n (ngModelChange)=\"timeChangeEvent(formField, $event)\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [class]=\"formField?.scope?.style?.classes?.[0] || ''\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\" appendTo=\"body\"\r\n [panelStyleClass]=\"picker.timePanelClass\"\r\n [vlCustomKeyboard]=\"formField?.option?.keyboardType ?? 'time'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, timePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(timePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\" aria-label=\"Open time picker\"\r\n (pointerdown)=\"picker.openFromIcon($event, timePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-clock\"></i>\r\n </button>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n <div *ngIf=\"timeField?.touched && timeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"timeField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages,\r\n \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"timeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Autocomplete control -->\r\n <div *ngSwitchCase=\"'autocomplete'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <vl-label [formField]=\"formField\" [modalItemInfo]=\"form\">\r\n </vl-label>\r\n\r\n <span>\r\n <p-autocomplete [suggestions]=\"remoteSuggestions[formField.scope?.reference] ?? []\" (completeMethod)=\"completeRemote($event, formField)\"\r\n [emptyMessage]=\"autocompleteEmptyText(formField)\" [showEmptyMessage]=\"true\" #autocompleteField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\" [dropdown]=\"true\"\r\n [optionLabel]=\"formField.option.autocomplete.response.label\"\r\n [placeholder]=\"form.propertySchema | vlPlaceholder: formField.scope?.reference\"\r\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\r\n [vlCustomKeyboard]=\"formField?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages,\r\n \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n form.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\">\r\n <span *ngIf=\"formField?.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\" #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.data\r\n \" [value]=\"item[formField?.option?.optionValue]\">\r\n {{ item[formField?.option?.optionLabel] }}\r\n </option>\r\n </select>\r\n\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n </span>\r\n\r\n <div *ngIf=\"!formField?.option?.postfixCaption\">\r\n <div [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [ngClass]=\"getStyleWithoutClasses(formField?.label?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.label?.style)?.style\">\r\n {{\r\n form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption\r\n }}\r\n </label>\r\n\r\n <nz-select nzShowSearch nzAllowClear nzPlaceHolder=\"Select\"\r\n #dropdownField=\"ngModel\"\r\n [required]=\"formField?.required\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.scope?.style)?.style\"\r\n [name]=\"formField.scope?.reference\" [(ngModel)]=\"\r\n form.propertySchema[getScope(formField.scope?.reference)][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <nz-option *ngFor=\"\r\n let item of form.propertySchema[getScope(formField.scope?.reference)]?.[\r\n formField.scope?.reference.split('/').pop()\r\n ]?.data\r\n \" [nzLabel]=\"item[formField?.option?.optionLabel]\"\r\n [nzValue]=\"item[formField?.option?.optionValue]\"></nz-option>\r\n </nz-select>\r\n </div>\r\n\r\n <div *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.validation?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.validation?.style)?.style\">\r\n <p [class]=\"\r\n formField?.layout === 'horizontal'\r\n ? 'text-red-400 m-0 horizontal-error'\r\n : 'text-red-400 m-0'\r\n \" *ngIf=\"dropdownField?.errors\">\r\n {{ setErroMessage(formField, errorMessages, dropdownField)\r\n }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button/default control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [ngClass]=\"getStyleWithoutClasses(formField?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField?.style)?.style\"\r\n (click)=\"invokeFormBtnClick(formField?.option, form.propertySchema)\">\r\n {{ formField?.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n<ng-template #formMediaContent let-field=\"field\">\r\n <ng-container *ngIf=\"getMediaSource(field) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(field)\">\r\n <img *ngSwitchDefault [src]=\"source\" [alt]=\"getMediaLabel(field)\" loading=\"lazy\" />\r\n <video *ngSwitchCase=\"'video'\" [src]=\"(source | vlMedia | async) || null\"\r\n [attr.aria-label]=\"getMediaLabel(field)\" controls playsinline preload=\"metadata\">\r\n Your browser does not support video playback.\r\n </video>\r\n <audio *ngSwitchCase=\"'audio'\" [src]=\"(source | vlMedia | async) || null\"\r\n [attr.aria-label]=\"getMediaLabel(field)\" controls preload=\"metadata\">\r\n Your browser does not support audio playback.\r\n </audio>\r\n <a *ngSwitchCase=\"'pdf'\" [href]=\"source\" target=\"_blank\" rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(field) }}\r\n </a>\r\n <a *ngSwitchCase=\"'file'\" [href]=\"source\" target=\"_blank\" rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(field) }}\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - new (#145): video and audio play through vlMedia - a file name in the field becomes a signed\r\n// CouchDB link (attachment, streamed with Range)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: fields with a backend source (option.autocomplete) load their list through\r\n// RemoteListService - autocomplete suggestions, dropdown/combobox items; the autocompletes of this\r\n// container stayed empty before\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - new: a table wider than its place fades out at the side where more columns lie (has-more-right,\r\n// has-more-left on .ant-table-content), a hint to swipe sideways - like the dialog's lower edge.\r\n// Nothing changes when all columns fit\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: date and time cells use DateTimePickerService like the dialog\r\n// Shuaib 2026-09-24\r\n// - new: isLegacyCheckboxFieldType recognises existing checkbox fields so the grid can render them as boolean.\r\nimport { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, SimpleChanges, inject } from '@angular/core';\r\nimport { OktaAuthStateService } from '@okta/okta-angular';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { NzTableModule } from 'ng-zorro-antd/table';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { NzDropDownModule } from 'ng-zorro-antd/dropdown';\r\nimport { NzMenuModule } from 'ng-zorro-antd/menu';\r\nimport { PaginationComponent } from '../pagination/pagination.component';\r\nimport { RequestService } from '../../services/request.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { MediaSourcePipe } from '../../pipes/media-source.pipe';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\ninterface GridColumnFilterState {\r\n operator: string;\r\n value: string;\r\n}\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [PlaceholderPipe, MediaSourcePipe, \r\n CommonModule,\r\n FormsModule,\r\n NzTableModule,\r\n NzIconModule,\r\n ButtonModule,\r\n NzDropDownModule,\r\n NzMenuModule,\r\n PaginationComponent,\r\n NzDatePickerModule,\r\n DatePickerModule,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n CustomKeyboardDirective,\r\n ],\r\n selector: 'vl-grid',\r\n templateUrl: './grid.component.html',\r\n styleUrl: './grid.component.css'\r\n})\r\nexport class GridComponent implements AfterViewInit, OnDestroy {\r\n // ---- Backend lists (RemoteListService): any field with option.autocomplete, any control ----\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Loaded lists by field reference. */\r\n remoteData: Record<string, any[]> = {};\r\n /** Current suggestions of an autocomplete by field reference. */\r\n remoteSuggestions: Record<string, any[]> = {};\r\n\r\n /** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */\r\n async loadRemoteLists(nodes: any[], propertySchema: any): Promise<void> {\r\n const sources = new Map<string, any>();\r\n const visit = (node: any): void => {\r\n if (!node || typeof node !== 'object') {\r\n return;\r\n }\r\n\r\n if (node.option?.autocomplete && node.scope?.reference) {\r\n sources.set(node.scope.reference, node);\r\n }\r\n\r\n for (const value of Object.values(node)) {\r\n if (value && typeof value === 'object') {\r\n visit(value);\r\n }\r\n }\r\n };\r\n\r\n nodes.forEach(visit);\r\n\r\n await Promise.all([...sources.entries()].map(async ([reference, node]) => {\r\n const list = await this.remoteLists.loadShared(node.option.autocomplete);\r\n this.remoteData[reference] = list;\r\n\r\n const scope = reference.substring(reference.indexOf('#/') + 2, reference.indexOf('/', reference.indexOf('#/') + 2));\r\n const property = propertySchema?.[scope]?.[reference.split('/').pop() ?? ''];\r\n\r\n if (property && node.option?.control && node.option.control !== 'autocomplete' && list.length) {\r\n property.data = list;\r\n }\r\n }));\r\n }\r\n\r\n /** (completeMethod) of an autocomplete with a backend list. */\r\n completeRemote(event: any, node: any): void {\r\n const reference = node?.scope?.reference ?? '';\r\n this.remoteSuggestions[reference] = this.remoteLists.filter(this.remoteData[reference], reference.split('/').pop(), event?.query);\r\n }\r\n\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n ngOnDestroy(): void {\r\n this.picker.closeIfWithin(this.host.nativeElement);\r\n this.sideHintObserver?.disconnect();\r\n this.host.nativeElement.removeEventListener('scroll', this.onSideScroll, true);\r\n }\r\n\r\n private sideHintObserver?: ResizeObserver;\r\n\r\n /** Marks the table's scroll area while columns lie beyond its left or right edge. */\r\n private updateSideHints = (): void => {\r\n for (const area of this.host.nativeElement.querySelectorAll('.ant-table-content') as NodeListOf<HTMLElement>) {\r\n const hidden = area.scrollWidth - area.clientWidth;\r\n area.classList.toggle('has-more-left', hidden > 2 && area.scrollLeft > 2);\r\n area.classList.toggle('has-more-right', hidden > 2 && area.scrollLeft < hidden - 2);\r\n }\r\n };\r\n\r\n private onSideScroll = (event: Event): void => {\r\n if ((event.target as HTMLElement)?.classList?.contains('ant-table-content')) {\r\n this.updateSideHints();\r\n }\r\n };\r\n\r\n /** Watches size and content of the table, so the hints follow new data and a turn of the device. */\r\n private startSideHints(): void {\r\n const el = this.host.nativeElement as HTMLElement;\r\n el.addEventListener('scroll', this.onSideScroll, true);\r\n this.sideHintObserver = new ResizeObserver(() => this.updateSideHints());\r\n this.sideHintObserver.observe(el);\r\n const mutations = new MutationObserver(() => {\r\n el.querySelectorAll('.ant-table-content, .ant-table-content table').forEach(t => this.sideHintObserver?.observe(t));\r\n this.updateSideHints();\r\n });\r\n mutations.observe(el, { childList: true, subtree: true });\r\n const disconnect = this.sideHintObserver.disconnect.bind(this.sideHintObserver);\r\n this.sideHintObserver.disconnect = () => { mutations.disconnect(); disconnect(); };\r\n }\r\n\r\n /** New data objects use boolean; older projects may still use checkbox. */\r\n isLegacyCheckboxFieldType(type: string | undefined): boolean {\r\n return type === 'checkbox';\r\n }\r\n\r\n isLogined: boolean = false;\r\n tableitemInfoCopy: any = {};\r\n @Input() errorMessages: any = {};\r\n @Input() environment: any;\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() tableitemInfo: any = {};\r\n @Input() form: any = {};\r\n @Input() isTableDataLoad: boolean = false;\r\n @Input() currenTableOptions: any = {};\r\n @Input() projectSeleted: any = '';\r\n @Input() pageSize: number = 5;\r\n @Input() currentPage: number = 0;\r\n @Input() pages: number[] = [];\r\n @Input() userInfo: any;\r\n @Output() onPageChange: EventEmitter<any> = new EventEmitter();\r\n @Output() onPageSizeChange: EventEmitter<any> = new EventEmitter();\r\n @Output() onGridScroll: EventEmitter<any> = new EventEmitter();\r\n @Output() showGridLink: EventEmitter<any> = new EventEmitter();\r\n @Output() gridButtonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() gridIncreamentClick: EventEmitter<any> = new EventEmitter();\r\n @Output() gridDecreamentClick: EventEmitter<any> = new EventEmitter();\r\n @Output() gridImgClick: EventEmitter<any> = new EventEmitter();\r\n\r\n filteredTableData: any[] = [];\r\n filtersApplied = false;\r\n private readonly columnFilterStates = new Map<\r\n string,\r\n GridColumnFilterState\r\n >();\r\n\r\n readonly filterOperators = [\r\n {\r\n label: 'Contains',\r\n value: 'contains'\r\n },\r\n {\r\n label: 'Equals',\r\n value: 'equals'\r\n },\r\n {\r\n label: 'Does not equal',\r\n value: 'notEquals'\r\n },\r\n {\r\n label: 'Starts with',\r\n value: 'startsWith'\r\n },\r\n {\r\n label: 'Ends with',\r\n value: 'endsWith'\r\n }\r\n ];\r\n\r\n constructor(private requestService: RequestService,\r\n private utilityService: UtilityService,\r\n private notificationService: NotificationService,\r\n private oktaAuthService: OktaAuthStateService,) {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.startSideHints();\r\n this.authenticating();\r\n setTimeout(() => {\r\n if (this.environment && this.environment?.login && this.environment?.login?.type == \"oktaAuth\") {\r\n this.oktaAuthService.authState$.subscribe(\r\n (result) => {\r\n if (result.isAuthenticated) {\r\n this.isLogined = true;\r\n }\r\n }\r\n );\r\n }\r\n }, 500);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Backend lists of fields with option.autocomplete (any data type, any control).\r\n if ((changes['tableitemInfo'] || changes['form']) && this.tableitemInfo) {\r\n void this.loadRemoteLists([this.tableitemInfo.layoutSchema, this.form?.layoutSchema], this.form?.propertySchema ?? this.tableitemInfo.propertySchema);\r\n }\r\n if (changes['tableitemInfo'] && this.tableitemInfo) {\r\n this.tableitemInfoCopy = JSON.parse(\r\n JSON.stringify(this.tableitemInfo)\r\n );\r\n\r\n if (this.filtersApplied) {\r\n this.applyColumnFilters();\r\n } else {\r\n this.filteredTableData = [\r\n ...(this.tableitemInfo?.data ?? [])\r\n ];\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n if (\r\n changes['selectedLanguageInfo'] ||\r\n this.selectedLanguageInfo?.selectedLanguage\r\n ) {\r\n if (\r\n this.tableitemInfoCopy?.layoutSchema &&\r\n this.tableitemInfoCopy.layoutSchema?.elements?.length\r\n ) {\r\n this.tableitemInfo.propertySchema =\r\n JSON.parse(\r\n JSON.stringify(\r\n this.tableitemInfoCopy.propertySchema\r\n )\r\n );\r\n\r\n this.tableitemInfo.propertySchema =\r\n this.translateSchema(\r\n this.tableitemInfo.propertySchema,\r\n this.selectedLanguageInfo.selectedLanguage\r\n );\r\n\r\n if (this.tableitemInfoCopy?.footer) {\r\n this.tableitemInfo.footer =\r\n JSON.parse(\r\n JSON.stringify(\r\n this.tableitemInfoCopy.footer\r\n )\r\n );\r\n\r\n this.tableitemInfo.footer =\r\n this.translateSchema(\r\n this.tableitemInfo.footer,\r\n this.selectedLanguageInfo.selectedLanguage\r\n );\r\n }\r\n\r\n this.tableitemInfoCopy.layoutSchema.elements.forEach(\r\n (column: any, index: number) => {\r\n const caption = column?.label?.caption;\r\n const translation =\r\n this.selectedLanguageInfo\r\n .selectedLanguage?.[caption];\r\n\r\n if (caption && translation) {\r\n this.tableitemInfo.layoutSchema\r\n .elements[index]\r\n .label.caption = translation;\r\n }\r\n }\r\n );\r\n }\r\n }\r\n }, 500);\r\n }\r\n\r\n get gridDisplayData(): any[] {\r\n return this.filtersApplied\r\n ? this.filteredTableData\r\n : this.tableitemInfo?.data ?? [];\r\n }\r\n\r\n translateSchema(schema: any, SelectedLanguage: any): any {\r\n if (schema && typeof schema === 'object') {\r\n for (const key of Object.keys(schema)) {\r\n const val = schema[key];\r\n if (val && typeof val === 'object') {\r\n this.translateSchema(val, SelectedLanguage);\r\n }\r\n if (val && val.caption !== undefined && typeof val.caption === 'string') {\r\n const original = val.caption.trim();\r\n if (original && SelectedLanguage[original]) {\r\n val.caption = SelectedLanguage[original];\r\n }\r\n }\r\n if (val && val.value !== undefined && typeof val.value === 'string' && !val.value.includes(\"{{\")) {\r\n const originalVal = val.value.trim();\r\n if (originalVal && SelectedLanguage[originalVal]) {\r\n val.value = SelectedLanguage[originalVal];\r\n }\r\n }\r\n }\r\n }\r\n return schema;\r\n }\r\n\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n onScrollEvent(event: any) {\r\n this.onGridScroll.emit(event);\r\n }\r\n\r\n showLinkDetails(option: any, data: any) {\r\n this.showGridLink.emit({ option: option, data: data });\r\n }\r\n\r\n invokeGridBtnClick(option: any, propertySchema: any) {\r\n this.gridButtonClick.emit({ option: option, propertySchema: propertySchema });\r\n }\r\n\r\n upsertAction(option: any, data: any) {\r\n let url = option?.data_url;\r\n if (url && url?.includes(\"{{\")) {\r\n const regex = /{{(.*?)}}/g;\r\n const matches = [...url.matchAll(regex)].map(m => m[1]);\r\n if (matches && data && data[matches[0]]) {\r\n option.data_url = url.replace(`{{${matches[0]}}}`, data[matches[0]])\r\n }\r\n }\r\n let baseUrl = this.environment?.apiUrl + option.data_url;\r\n this.requestService.dynamicCall(option.method, {}, baseUrl, option?.passToken, this.projectSeleted, this.userInfo).subscribe((res: any) => {\r\n console.log('res: ', res);\r\n if (option?.reload) {\r\n window.location.reload();\r\n } else if (option.notifcation) {\r\n if (option.notifcation.success) {\r\n this.notificationService.success(option.notifcation.success);\r\n let findObj: any = this.findDynamicKeyAndValue(option);\r\n if (findObj.keyName) {\r\n data[findObj.keyName] = \"APPROVED\";\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n setActionColumn(option: any, data: any) {\r\n let showAction: boolean = true;\r\n let findCondiontionalKey: any = this.findDynamicKeyAndValue(option);\r\n if (findCondiontionalKey.keyName) {\r\n showAction = data[findCondiontionalKey.keyName] === findCondiontionalKey.value ? true : false;\r\n }\r\n return showAction;\r\n }\r\n\r\n findDynamicKeyAndValue(object: Record<string, any>) {\r\n const regex = /^\\{\\{(.*?)\\}\\}$/;\r\n for (const key of Object.keys(object)) {\r\n const match = key.match(regex);\r\n if (match) {\r\n return {\r\n keyName: match[1].trim(),\r\n value: object[key]\r\n };\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n incrementQuantity(index: any, field: any, option: any) {\r\n this.gridIncreamentClick.emit({ index: index, field: field, option: option });\r\n }\r\n\r\n invokeTableImageClick(column: any, data: any) {\r\n this.gridImgClick.emit({ col: column, data: data });\r\n }\r\n\r\n decrementQuantity(index: any, field: any, option: any) {\r\n this.gridDecreamentClick.emit({ index: index, field: field, option: option });\r\n }\r\n\r\n invokeOnPageSizeChange(pageSize: any) {\r\n this.onPageSizeChange.emit(pageSize);\r\n }\r\n\r\n invokeGoToPage(page: any) {\r\n this.onPageChange.emit(page);\r\n }\r\n\r\n authenticating() {\r\n this.utilityService.getStorage(`${this.projectSeleted}Logined`).then((logined: any) => {\r\n if (logined == \"true\") {\r\n this.isLogined = true;\r\n }\r\n })\r\n }\r\n\r\n private readonly sortFunctionCache = new Map<\r\n string,\r\n (firstRow: any, secondRow: any) => number\r\n >();\r\n\r\n getColumnSortFn(\r\n column: any\r\n ): ((firstRow: any, secondRow: any) => number) | boolean {\r\n if (!column?.option?.sortable || !column?.scope?.reference) {\r\n return false;\r\n }\r\n\r\n const fieldName = this.getColumnFieldName(column);\r\n\r\n if (!fieldName) {\r\n return false;\r\n }\r\n\r\n const propertyDefinition = this.getColumnPropertyDefinition(column);\r\n const propertyType = propertyDefinition?.type ?? 'string';\r\n const propertyFormat = propertyDefinition?.format ?? '';\r\n const dateFormat = column?.option?.dateFormat ?? '';\r\n\r\n const cacheKey = [\r\n column.scope.reference,\r\n propertyType,\r\n propertyFormat,\r\n dateFormat\r\n ].join(':');\r\n\r\n const existingSortFunction = this.sortFunctionCache.get(cacheKey);\r\n\r\n if (existingSortFunction) {\r\n return existingSortFunction;\r\n }\r\n\r\n const sortFunction = (firstRow: any, secondRow: any): number => {\r\n const firstValue = firstRow?.[fieldName];\r\n const secondValue = secondRow?.[fieldName];\r\n\r\n return this.compareGridValues(\r\n firstValue,\r\n secondValue,\r\n propertyType,\r\n propertyFormat,\r\n dateFormat\r\n );\r\n };\r\n\r\n this.sortFunctionCache.set(cacheKey, sortFunction);\r\n\r\n return sortFunction;\r\n }\r\n\r\n private getColumnFieldName(column: any): string {\r\n return column?.scope?.reference?.split('/').pop() ?? '';\r\n }\r\n\r\n private getColumnPropertyDefinition(column: any): any {\r\n const reference = column?.scope?.reference;\r\n const fieldName = this.getColumnFieldName(column);\r\n const propertyScope = this.getScope(reference);\r\n\r\n return this.tableitemInfo?.propertySchema?.[propertyScope]?.[fieldName];\r\n }\r\n\r\n private compareGridValues(\r\n firstValue: any,\r\n secondValue: any,\r\n propertyType: string,\r\n propertyFormat: string,\r\n dateFormat: string\r\n ): number {\r\n if (firstValue == null && secondValue == null) {\r\n return 0;\r\n }\r\n\r\n if (firstValue == null) {\r\n return 1;\r\n }\r\n\r\n if (secondValue == null) {\r\n return -1;\r\n }\r\n\r\n if (propertyType === 'number' || propertyType === 'quantity') {\r\n const firstNumber = Number(firstValue);\r\n const secondNumber = Number(secondValue);\r\n\r\n if (!Number.isNaN(firstNumber) && !Number.isNaN(secondNumber)) {\r\n return firstNumber - secondNumber;\r\n }\r\n }\r\n\r\n const isDateColumn =\r\n Boolean(dateFormat) ||\r\n propertyFormat === 'date' ||\r\n propertyFormat === 'date-time';\r\n\r\n if (isDateColumn) {\r\n const firstDate = new Date(firstValue).getTime();\r\n const secondDate = new Date(secondValue).getTime();\r\n\r\n if (!Number.isNaN(firstDate) && !Number.isNaN(secondDate)) {\r\n return firstDate - secondDate;\r\n }\r\n }\r\n\r\n return String(firstValue).localeCompare(String(secondValue), undefined, {\r\n numeric: true,\r\n sensitivity: 'base'\r\n });\r\n }\r\n\r\n hasAnyColumnFilter(): boolean {\r\n const columns =\r\n this.tableitemInfo?.layoutSchema?.elements ?? [];\r\n console.log('columns: ', columns);\r\n let filter = columns.some(\r\n (column: any) =>\r\n column?.option?.filter?.filtering === true &&\r\n Boolean(column?.scope?.reference)\r\n );\r\n console.log('filter: ', filter);\r\n return filter;\r\n }\r\n\r\n getColumnFilterState(column: any): GridColumnFilterState {\r\n const columnKey = this.getColumnFilterKey(column);\r\n\r\n let filterState = this.columnFilterStates.get(columnKey);\r\n\r\n if (!filterState) {\r\n filterState = {\r\n operator:\r\n column?.option?.filter?.defaultOperator ??\r\n 'contains',\r\n value: ''\r\n };\r\n\r\n this.columnFilterStates.set(columnKey, filterState);\r\n }\r\n\r\n return filterState;\r\n }\r\n\r\n private getColumnFilterKey(column: any): string {\r\n return column?.scope?.reference ?? '';\r\n }\r\n\r\n getColumnFilterPlaceholder(column: any): string {\r\n return column?.option?.filter?.placeholder ?? '';\r\n }\r\n\r\n setColumnFilterOperator(\r\n column: any,\r\n operator: string\r\n ): void {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n filterState.operator = operator;\r\n\r\n if (this.hasActiveColumnFilter(column)) {\r\n this.applyColumnFilters();\r\n }\r\n }\r\n\r\n getFilterOperatorLabel(operatorValue: string): string {\r\n const operator = this.filterOperators.find(\r\n item => item.value === operatorValue\r\n );\r\n\r\n return operator?.label ?? 'Contains';\r\n }\r\n\r\n setColumnFilterValue(\r\n column: any,\r\n value: string\r\n ): void {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n filterState.value = value ?? '';\r\n\r\n this.applyColumnFilters();\r\n }\r\n\r\n hasActiveColumnFilter(column: any): boolean {\r\n const value =\r\n this.getColumnFilterState(column).value;\r\n\r\n return String(value ?? '').trim().length > 0;\r\n }\r\n\r\n applyColumnFilters(): void {\r\n const originalData = this.tableitemInfo?.data ?? [];\r\n const columns =\r\n this.tableitemInfo?.layoutSchema?.elements ?? [];\r\n\r\n const activeFilterColumns = columns.filter((column: any) => {\r\n if (\r\n column?.option?.filter?.filtering !== true ||\r\n !column?.scope?.reference\r\n ) {\r\n return false;\r\n }\r\n\r\n return this.hasActiveColumnFilter(column);\r\n });\r\n\r\n if (!activeFilterColumns.length) {\r\n this.filtersApplied = false;\r\n this.filteredTableData = [...originalData];\r\n return;\r\n }\r\n\r\n this.filtersApplied = true;\r\n\r\n this.filteredTableData = originalData.filter((row: any) => {\r\n return activeFilterColumns.every((column: any) => {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n const fieldName =\r\n this.getColumnFieldName(column);\r\n\r\n return this.matchesColumnFilter(\r\n row?.[fieldName],\r\n filterState.value,\r\n filterState.operator\r\n );\r\n });\r\n });\r\n }\r\n\r\n clearColumnFilter(column: any): void {\r\n const filterState =\r\n this.getColumnFilterState(column);\r\n\r\n filterState.value = '';\r\n filterState.operator =\r\n column?.option?.filter?.defaultOperator ??\r\n 'contains';\r\n\r\n this.applyColumnFilters();\r\n }\r\n\r\n private hasFilterValue(value: any): boolean {\r\n return (\r\n value !== null &&\r\n value !== undefined &&\r\n String(value).trim() !== ''\r\n );\r\n }\r\n\r\n private matchesColumnFilter(\r\n rowValue: any,\r\n filterValue: any,\r\n operator: string\r\n ): boolean {\r\n if (rowValue === null || rowValue === undefined) {\r\n return false;\r\n }\r\n\r\n const source = String(rowValue)\r\n .trim()\r\n .toLocaleLowerCase();\r\n\r\n const search = String(filterValue)\r\n .trim()\r\n .toLocaleLowerCase();\r\n\r\n switch (operator) {\r\n case 'equals':\r\n return source === search;\r\n\r\n case 'notEquals':\r\n return source !== search;\r\n\r\n case 'startsWith':\r\n return source.startsWith(search);\r\n\r\n case 'endsWith':\r\n return source.endsWith(search);\r\n\r\n case 'contains':\r\n default:\r\n return source.includes(search);\r\n }\r\n }\r\n\r\n isMediaColumn(col: any): boolean {\r\n const reference = col?.scope?.reference;\r\n if (typeof reference !== 'string') return false;\r\n \r\n const key = reference.split('/').pop();\r\n const type =\r\n this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[key!]?.type;\r\n \r\n // Preserve existing image properties.\r\n return type === 'media' || type === 'image';\r\n }\r\n \r\n getMediaSource(col: any, data: any): string {\r\n const key = col?.scope?.reference?.split('/').pop();\r\n const value = col?.option?.src || (key ? data?.[key] : '');\r\n \r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n \r\n getMediaLabel(col: any): string {\r\n if (typeof col?.label === 'string' && col.label.trim()) {\r\n return col.label;\r\n }\r\n \r\n const reference = col?.scope?.reference;\r\n const key = reference?.split('/').pop();\r\n const property = reference && key\r\n ? this.tableitemInfo?.propertySchema?.[this.getScope(reference)]?.[key]\r\n : undefined;\r\n \r\n return col?.label?.caption || property?.caption || 'Media';\r\n }\r\n \r\n getMediaKind(\r\n col: any,\r\n data: any\r\n ): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(col, data);\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n \r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n \r\n const key = col?.scope?.reference?.split('/').pop();\r\n const candidates = [\r\n source,\r\n col?.option?.fileName,\r\n key ? data?.[key] : undefined\r\n ];\r\n \r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = [\r\n 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\r\n 'txt', 'csv', 'zip', 'rar', '7z'\r\n ];\r\n \r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string') continue;\r\n if (/^(data|blob):/i.test(candidate)) continue;\r\n \r\n let path = candidate.split(/[?#]/)[0];\r\n \r\n try {\r\n path = decodeURIComponent(path);\r\n } catch {\r\n // Keep the original path.\r\n }\r\n \r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n \r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n \r\n return 'image';\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: autocompletes get their suggestions from RemoteListService (completeRemote) -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: autocomplete fields take the toolkit string keyboard unless option.keyboardType\r\n names another one ('native' keeps the system keyboard)\r\n - change: date and time cells use the shared picker markup (picker-field, DateTimePickerService);\r\n their PrimeNG icon opened the calendar together with the system keyboard -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: grid cells render legacy checkbox fields through the boolean control. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: @contract comments on the sorting, on the column filter and on the footer. The filter\r\n reads option.filter and never option.columnFilter, which is the mistake a layout author\r\n makes without being told -->\r\n<div *ngIf=\"!tableitemInfo.data?.length\" class=\"alert alert-warning col-md-12\"\r\n role=\"alert\">\r\n {{ tableitemInfo.layoutSchema?.noRecordMessage}}\r\n</div>\r\n<div *ngIf=\"tableitemInfo.data?.length\" class=\"reservation-container pt-5 px-3\">\r\n <nz-table #basicTable [nzData]=\"gridDisplayData\"\r\n [nzNoResult]=\"'No matching records found'\" [nzBordered]=\"true\"\r\n [nzFrontPagination]=\"currenTableOptions?.pagination?.tabs\"\r\n [style]=\"getStyleWithoutClasses(currenTableOptions?.style).style\"\r\n (scroll)=\"onScrollEvent($event)\"\r\n [nzLoading]=\"isTableDataLoad\">\r\n <thead>\r\n <!-- @contract decision: option.sortable is read here\r\n reality: nzSortFn is wired to getColumnSortFn since 2026-09-16; before that\r\n the key was decoration. The column also needs a scope.reference -\r\n without one getColumnSortFn has nothing to sort by.\r\n seen: grid.component.ts:338 -->\r\n <!-- Column headings and sorting -->\r\n <tr>\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements\"\r\n [nzSortFn]=\"\r\n column?.option?.sortable\r\n ? getColumnSortFn(column)\r\n : false\r\n \">\r\n\r\n {{ column?.label?.caption }}\r\n </th>\r\n </tr>\r\n\r\n <!-- @contract decision: the column filter reads option.filter, NOT option.columnFilter\r\n reality: option.filter.filtering switches it on, option.filter.defaultOperator\r\n starts the comparison (the renderer falls back to contains), and\r\n option.filter.placeholder labels the input.\r\n failure: option.columnFilter is read nowhere, here or in the runtime app. A\r\n column carrying it looks filterable in the file and is not on screen.\r\n seen: grid.component.ts:450-475; 5 uses of columnFilter across the reference\r\n projects, all of them dead -->\r\n <!-- Column filters -->\r\n <tr *ngIf=\"hasAnyColumnFilter()\" class=\"grid-filter-row\">\r\n\r\n <th *ngFor=\"let column of tableitemInfo.layoutSchema.elements\"\r\n class=\"grid-filter-cell\">\r\n\r\n <ng-container *ngIf=\"\r\n column?.option?.filter?.filtering === true &&\r\n column?.scope?.reference\r\n \">\r\n\r\n <div class=\"grid-filter-input-wrapper\">\r\n <input type=\"text\" class=\"grid-filter-input\"\r\n [placeholder]=\"getColumnFilterPlaceholder(column)\"\r\n [ngModel]=\"getColumnFilterState(column).value\"\r\n (ngModelChange)=\"\r\n setColumnFilterValue(column, $event)\r\n \" />\r\n\r\n <!-- Operator selection button -->\r\n <button type=\"button\"\r\n class=\"grid-filter-operator-button\" nz-dropdown\r\n nzTrigger=\"click\"\r\n [nzDropdownMenu]=\"operatorMenu\"\r\n [class.grid-filter-operator-button--active]=\"\r\n hasActiveColumnFilter(column)\r\n \" [title]=\"\r\n 'Operator: ' +\r\n getFilterOperatorLabel(\r\n getColumnFilterState(column).operator\r\n )\r\n \">\r\n\r\n <span nz-icon nzType=\"filter\"></span>\r\n </button>\r\n\r\n <!-- Clear current column filter -->\r\n <button *ngIf=\"hasActiveColumnFilter(column)\"\r\n type=\"button\" class=\"grid-filter-clear-button\"\r\n aria-label=\"Clear column filter\"\r\n title=\"Clear filter\"\r\n (click)=\"clearColumnFilter(column)\">\r\n\r\n <span nz-icon nzType=\"close\"></span>\r\n </button>\r\n </div>\r\n\r\n <!-- Operator dropdown -->\r\n <nz-dropdown-menu #operatorMenu=\"nzDropdownMenu\">\r\n <ul nz-menu class=\"grid-filter-operator-menu\">\r\n <li *ngFor=\"let operator of filterOperators\"\r\n nz-menu-item [nzSelected]=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" (click)=\"\r\n setColumnFilterOperator(\r\n column,\r\n operator.value\r\n )\r\n \">\r\n\r\n <span *ngIf=\"\r\n getColumnFilterState(column).operator ===\r\n operator.value\r\n \" nz-icon nzType=\"check\">\r\n </span>\r\n\r\n {{ operator.label }}\r\n </li>\r\n </ul>\r\n </nz-dropdown-menu>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <!-- @contract decision: the column chain below, and what it does not carry\r\n reality: string, number, image, quantity, date, time, dropdown, boolean,\r\n autocomplete and dateRange each have their own condition. There is no\r\n branch for the credit card type.\r\n failure: a column whose type has no branch stays empty, with no error.\r\n instead: format the value in the endpoint and send a string.\r\n\r\n @contract decision: columns without scope.reference are valid\r\n reality: with option.actionColumn they render save/delete icons, otherwise a\r\n button. That is why the conditions below all guard on the reference. -->\r\n <tbody>\r\n <tr *ngFor=\"let data of basicTable.data; let i = index\">\r\n <td *ngFor=\"let col of tableitemInfo.layoutSchema.elements\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'string'\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span *ngIf=\"col.option?.link\"\r\n (click)=\"showLinkDetails(col.option, data)\">\r\n {{data[col.scope?.reference.split('/').pop()]}}\r\n </span>\r\n <span *ngIf=\"!col.option?.link\">\r\n <ng-container\r\n *ngIf=\"col?.option?.dateFormat; else string\">\r\n {{\r\n data[col.scope?.reference.split('/').pop()]\r\n | date:'yyyy-MM-dd' }}\r\n </ng-container>\r\n <ng-template #string>\r\n {{\r\n data[col.scope?.reference.split('/').pop()]\r\n }}\r\n </ng-template>\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input\r\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'number'\">\r\n <span *ngIf=\"col.option.protected\">\r\n <span\r\n *ngIf=\"col.option?.innerAction?.action == 'multiply'\">\r\n {{\r\n (data[col.option?.innerAction?.from] *\r\n data[col.option?.innerAction?.to])\r\n | number:'1.2-2'\r\n }}\r\n </span>\r\n <span *ngIf=\"!col.option?.innerAction\">\r\n {{data[col.scope?.reference.split('/').pop()] |\r\n currency:\r\n tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.currency\r\n :true }}\r\n </span>\r\n </span>\r\n <span *ngIf=\"!col.option.protected\">\r\n <input\r\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n type=\"number\"\r\n class=\"p-inputtext p-component\" />\r\n </span>\r\n </ng-container>\r\n\r\n <!-- Media control: also supports existing image properties -->\r\n <ng-container *ngIf=\"isMediaColumn(col)\">\r\n <ng-container\r\n *ngIf=\"getMediaSource(col, data) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(col, data)\">\r\n\r\n <img\r\n *ngSwitchDefault\r\n [src]=\"source\"\r\n [alt]=\"getMediaLabel(col)\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n loading=\"lazy\"\r\n (click)=\"invokeTableImageClick(col, data)\" />\r\n\r\n <video\r\n *ngSwitchCase=\"'video'\"\r\n [src]=\"(source | vlMedia | async) || null\"\r\n [attr.aria-label]=\"getMediaLabel(col)\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n controls\r\n playsinline\r\n preload=\"metadata\">\r\n Your browser does not support video\r\n playback.\r\n </video>\r\n\r\n <audio\r\n *ngSwitchCase=\"'audio'\"\r\n [src]=\"(source | vlMedia | async) || null\"\r\n [attr.aria-label]=\"getMediaLabel(col)\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n controls\r\n preload=\"metadata\">\r\n Your browser does not support audio\r\n playback.\r\n </audio>\r\n\r\n <a\r\n *ngSwitchCase=\"'pdf'\"\r\n [href]=\"source\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(col) }}\r\n </a>\r\n\r\n <a\r\n *ngSwitchCase=\"'file'\"\r\n [href]=\"source\"\r\n [class]=\"getStyleWithoutClasses(col?.scope?.style).classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(col) }}\r\n </a>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- @contract compatibility: existing checkbox fields render as boolean. -->\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && (tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'boolean' || isLegacyCheckboxFieldType(tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type))\">\r\n <input type=\"checkbox\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n class=\"form-check-input mr-2\"\r\n [(ngModel)]=\"data[col.scope?.reference.split('/').pop()]\"\r\n [name]=\"col.scope?.reference\" />\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'dateRange'\">\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(col?.style).style\"\r\n [(ngModel)]=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)][col.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'date'\">\r\n <div class=\"picker-field\">\r\n <p-datepicker #datePicker #dateField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\"\r\n [disabled]=\"col?.option?.disabled\"\r\n [autoZIndex]=\"true\" [baseZIndex]=\"10000\"\r\n [dateFormat]=\"\r\n tableitemInfo.propertySchema[\r\n getScope(col.scope?.reference)\r\n ][\r\n col.scope?.reference.split('/').pop()\r\n ]?.format || 'yy-mm-dd'\r\n \" [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(col.scope?.reference)\r\n ][\r\n col.scope?.reference.split('/').pop()\r\n ].value\r\n \" [class]=\"col?.scope?.style?.classes?.[0] || ''\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [panelStyleClass]=\"picker.datePanelClass\"\r\n [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"col?.option?.keyboardType ?? 'date'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, datePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(datePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\"\r\n aria-label=\"Open calendar\"\r\n (pointerdown)=\"picker.openFromIcon($event, datePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'time'\">\r\n <div class=\"picker-field\">\r\n <p-datepicker #timePicker #timeField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\" [timeOnly]=\"true\"\r\n hourFormat=\"24\"\r\n [disabled]=\"col?.option?.disabled\"\r\n [autoZIndex]=\"true\"\r\n [baseZIndex]=\"10000\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [(ngModel)]=\"\r\n form.propertySchema[\r\n getScope(col.scope?.reference)\r\n ][\r\n col.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [class]=\"col?.scope?.style?.classes?.[0] || ''\"\r\n [showIcon]=\"false\" [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [panelStyleClass]=\"picker.timePanelClass\"\r\n [vlCustomKeyboard]=\"col?.option?.keyboardType ?? 'time'\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, timePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(timePicker)\">\r\n </p-datepicker>\r\n <button type=\"button\" class=\"picker-field__icon\"\r\n aria-label=\"Open time picker\"\r\n (pointerdown)=\"picker.openFromIcon($event, timePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-clock\"></i>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'autocomplete'\">\r\n <p-autocomplete\r\n [suggestions]=\"remoteSuggestions[col.scope?.reference] ?? []\"\r\n (completeMethod)=\"completeRemote($event, col)\"\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"col.option.required\"\r\n [name]=\"col.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"form.propertySchema[getScope(col.scope?.reference)][col.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(col?.scope?.style).style\"\r\n [class]=\"col?.scope?.style?.classes ? col?.scope?.style?.classes[0] : ''\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"col.option.autocomplete.response.label\"\r\n [placeholder]=\"form.propertySchema | vlPlaceholder: col.scope?.reference\"\r\n [vlCustomKeyboard]=\"col?.option?.keyboardType ?? 'string'\">\r\n </p-autocomplete>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'dropdown'\">\r\n <select id=\"dynamic-dropdown\" #dropdownField=\"ngModel\"\r\n [ngClass]=\"getStyleWithoutClasses(col?.scope?.style)?.classes\"\r\n [ngStyle]=\"getStyleWithoutClasses(col?.scope?.style)?.style\"\r\n [name]=\"col.scope?.reference\"\r\n [(ngModel)]=\"\r\n form.propertySchema[getScope(col.scope?.reference)][\r\n col.scope?.reference.split('/').pop()\r\n ].value\r\n \">\r\n <option *ngFor=\"\r\n let item of form.propertySchema[getScope(col.scope?.reference)]?.[\r\n col.scope?.reference.split('/').pop()\r\n ]?.data\r\n \" [value]=\"item[col?.option?.optionValue]\">\r\n {{ item[col?.option?.optionLabel] }}\r\n </option>\r\n </select>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!col?.scope?.reference\">\r\n <span *ngIf=\"col.option?.actionColumn\">\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.save, data)\"\r\n [nzType]=\"col.option?.save?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.save?.style\"\r\n [nzTwotoneColor]=\"'#52c41a'\"\r\n [class]=\"col.option?.save?.style?.classes[0]\"\r\n (click)=\"upsertAction(col.option?.save, data)\">\r\n </span>\r\n <span nz-icon\r\n *ngIf=\"setActionColumn(col.option?.delete, data)\"\r\n [nzType]=\"col.option?.delete?.icon\"\r\n [nzTheme]=\"'twotone'\"\r\n [style]=\"col.option?.delete?.style\"\r\n [nzTwotoneColor]=\"'#FF0000'\"\r\n [class]=\"col.option?.delete?.style?.classes[0]\"\r\n (click)=\"upsertAction(col.option?.delete, data)\"></span>\r\n\r\n </span>\r\n <span *ngIf=\"!col.option?.actionColumn\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(col?.label?.style).style\"\r\n (click)=\"invokeGridBtnClick(col.option, data)\"\r\n [class]=\"col?.label?.style?.classes[0]\">\r\n {{ col.label?.caption }}\r\n </button>\r\n </span>\r\n </ng-container>\r\n\r\n <!-- For quantity column, display increment/decrement buttons -->\r\n <ng-container\r\n *ngIf=\"tableitemInfo.propertySchema[getScope(col.scope?.reference)] && tableitemInfo.propertySchema[getScope(col.scope?.reference)][col?.scope?.reference?.split('/').pop()]?.type === 'quantity'\">\r\n <div style=\"display: flex; align-items: center;\">\r\n <button pButton icon=\"pi pi-minus\"\r\n (click)=\"decrementQuantity(i,col.scope?.reference.split('/').pop(), col.option)\"\r\n [disabled]=\"data.quantity <= 0\"\r\n style=\"margin-right: 8px; height: 10px; width: 10px;\"></button>\r\n <span>{{ data[col.scope?.reference.split('/').pop()]\r\n }}</span>\r\n <button pButton icon=\"pi pi-plus\"\r\n (click)=\"incrementQuantity(i, col.scope?.reference.split('/').pop(), col.option)\"\r\n style=\"margin-left: 8px; height: 10px; width: 10px;\"></button>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </nz-table>\r\n</div>\r\n\r\n<!-- table footer -->\r\n<div *ngIf=\"tableitemInfo?.footer?.formFields && tableitemInfo.data?.length\"\r\n class=\"table-footer flex flex-column align-items-end gap-2 pt-2 mx-4 border-top-1 border-cyan-500\">\r\n <!-- @contract decision: the footer renders string and number only\r\n reality: the switch below carries those two cases and a default. It did NOT change\r\n when the columns gained their types on 2026-09-18.\r\n failure: any other type in a footer field renders empty.\r\n instead: keep aggregates numeric, or pre-format them as text in the endpoint. -->\r\n <div *ngFor=\"let tableField of tableitemInfo?.footer?.formFields\">\r\n <div\r\n [ngSwitch]=\"tableField?.scope?.reference && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)] && tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()] ?\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.type : 'default'\">\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\">\r\n <h5 style=\"display: flex; justify-content: space-between;\">\r\n <span\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n </span>\r\n <span>\r\n {{\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n }}\r\n </span>\r\n </h5>\r\n </span>\r\n <div *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"text\" #inputField=\"ngModel\"\r\n [required]=\"tableField.option.required\"\r\n [email]=\"tableField.option.email\"\r\n [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"tableitemInfo.propertySchema | vlPlaceholder: tableField.scope?.reference\" />\r\n </div>\r\n <!-- Error Message -->\r\n <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(tableField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"inputField?.errors?.['required']\">{{tableField.label?.value\r\n ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"inputField?.errors?.['email']\">{{(tableField.label?.value\r\n ?\r\n tableField.label?.value :\r\n tableitemInfo.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group\">\r\n <span *ngIf=\"tableField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">\r\n <h5>{{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:tableField.option.currency :true:\r\n tableField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!tableField.option.protected\">\r\n <div\r\n [class]=\"tableField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(tableField?.label?.style).style\"\r\n [class]=\"tableField?.label?.style?.classes[0]\">{{\r\n tableField.label?.value ?\r\n tableField.label?.value :\r\n form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\"\r\n [class]=\"tableField.scope?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(tableField?.scope?.style).style\"\r\n [(ngModel)]=\"form.propertySchema[getScope(tableField.scope?.reference)][tableField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"tableField.scope?.reference\"\r\n [placeholder]=\"form.propertySchema | vlPlaceholder: tableField.scope?.reference\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"submit\"\r\n [style]=\"getStyleWithoutClasses(tableField.label.style).style\"\r\n (click)=\"invokeGridBtnClick(tableField.option, tableitemInfo.propertySchema)\">\r\n {{ tableField.label?.caption }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- bottom pagination on grid -->\r\n<div\r\n *ngIf=\"tableitemInfo.data?.length && !tableitemInfo?.layoutSchema?.pagination?.top && tableitemInfo?.layoutSchema?.pagination?.bottom\">\r\n <vl-pagination [itemInfo]=\"tableitemInfo\" [pageSize]=\"pageSize\"\r\n [currentPage]=\"currentPage\" [pages]=\"pages\"\r\n (pageSizeChange)=\"invokeOnPageSizeChange($event)\"\r\n (onGoToPage)=\"invokeGoToPage($event)\">\r\n </vl-pagination>\r\n</div>\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// Shuaib 2026-09-24\r\n// - change: pass the selected project's Okta issuer to getLoginUser.\r\n// - new: check the mobile login state for jwtToken and keycloak projects.\r\nimport { AfterViewInit, Component, EventEmitter, Input, Output, SimpleChanges } from '@angular/core';\r\nimport { OktaAuthStateService } from '@okta/okta-angular';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { RequestService } from '../../services/request.service';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { Couchdb } from '../../services/couchdb';\r\nimport { isNativeMobile } from '../../services/native-platform';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n NzIconModule\r\n ],\r\n selector: 'vl-header-menu',\r\n templateUrl: './header-menu.component.html',\r\n styleUrl: './header-menu.component.css'\r\n})\r\nexport class HeaderMenuComponent implements AfterViewInit {\r\n isLogined: boolean = false;\r\n propertyschema: any = {};\r\n @Input() headerItems: any[] = [];\r\n @Input() headerLayout: any = {};\r\n @Input() environment: any;\r\n @Input() tenantName: any;\r\n @Input() projectSeleted: any;\r\n @Input() cartInfo: any = {\r\n items: [],\r\n totalPrice: 0,\r\n quantity: 0\r\n };\r\n\r\n @Output() buttonClick: EventEmitter<any> = new EventEmitter();\r\n @Output() showTableContent: EventEmitter<any> = new EventEmitter();\r\n @Output() searchItems: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(\r\n private oktaAuthService: OktaAuthStateService,\r\n private requestService: RequestService,\r\n private utilityService: UtilityService,\r\n private couchdbService: Couchdb,\r\n private platform: Platform\r\n ) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['headerItems'] && this.headerItems) {\r\n this.setHeaderItems(this.headerItems).then((updatedHeaderItems: any) => {\r\n this.headerItems = updatedHeaderItems;\r\n console.log('this.headerItems : ', this.headerItems);\r\n });\r\n }\r\n\r\n if (changes['environment'] && this.environment && this.environment?.login && this.environment?.login?.type == \"oktaAuth\") {\r\n if (isNativeMobile()) {\r\n this.utilityService.getLocalStorage(`loginedUser`).then((logined: any) => {\r\n if (logined && logined.token) {\r\n this.requestService.getLoginUser(\r\n logined.token,\r\n this.environment.login.mobile?.issuer || this.environment.login.web?.issuer\r\n ).subscribe(() => {\r\n this.isLogined = true;\r\n });\r\n }\r\n });\r\n }\r\n\r\n this.oktaAuthService.authState$.subscribe((result) => {\r\n if (result.isAuthenticated) {\r\n this.isLogined = true;\r\n }\r\n });\r\n }\r\n if (changes['environment'] && this.environment && this.environment?.login && this.environment?.login?.type == \"jwtToken\") {\r\n if (isNativeMobile()) {\r\n this.utilityService.getLocalStorage(`loginedUser`).then((logined: any) => {\r\n if (logined && logined.name) {\r\n this.isLogined = true;\r\n }\r\n });\r\n }\r\n }\r\n if (changes['environment'] && this.environment && this.environment?.login && this.environment?.login?.type == \"keycloak\") {\r\n if (isNativeMobile()) {\r\n this.utilityService.getLocalStorage(`loginedUser`).then((logined: any) => {\r\n this.isLogined = !!(logined?.token && logined?.name);\r\n });\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n }\r\n\r\n getStyle(styleObject: any): Record<string, any> {\r\n if (!styleObject || typeof styleObject !== 'object') {\r\n return {};\r\n }\r\n\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return styleWithoutClasses;\r\n }\r\n\r\n isVisible(header: any): boolean {\r\n return header?.option?.visible !== false;\r\n }\r\n\r\n shouldShowDefaultButton(header: any): boolean {\r\n if (!this.isVisible(header)) {\r\n return false;\r\n }\r\n\r\n if (header?.option?.islogin === true) {\r\n return this.isLogined;\r\n }\r\n\r\n if (header?.option?.islogin === false) {\r\n return !this.isLogined;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n invokeSearchedItems(option: any, search: any) {\r\n this.searchItems.emit({ option: option, search: search });\r\n }\r\n\r\n invokeHeaderButtonClick(option: any) {\r\n this.buttonClick.emit(option);\r\n }\r\n\r\n invokeShowtableContent(option: any) {\r\n this.showTableContent.emit(option);\r\n }\r\n\r\n async setHeaderItems(items: any[]): Promise<any[]> {\r\n let getfile = false;\r\n for (const item of items) {\r\n if (item?.scope?.reference) {\r\n let objectFile = item?.scope?.reference.split('/')[1];\r\n if (objectFile && !getfile && this.projectSeleted) {\r\n let projectName = `${this.tenantName}_${this.projectSeleted}`\r\n getfile = true;\r\n this.propertyschema = await this.couchdbService.getFileContentFromCouchDb(\r\n projectName,\r\n `objects/${objectFile}.json`\r\n );\r\n\r\n }\r\n }\r\n if (item?.scope?.reference?.includes('logo')) {\r\n const logoUrl = item?.option?.src;\r\n if (logoUrl && this.projectSeleted) {\r\n let projectName = `${this.tenantName}_${this.projectSeleted}`\r\n const image = await this.couchdbService.getImageSrcFromCouchDb(\r\n projectName,\r\n `${logoUrl}`\r\n );\r\n item.option.src = this.utilityService.getMediaSrc(image);\r\n }\r\n }\r\n }\r\n return items;\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: a field without a placeholder in the project stays empty; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment stating that this container resolves by field NAME, not by field\r\n type. A correctly typed field with another name renders nothing, silently -->\r\n<header *ngIf=\"headerItems.length > 0\" [ngStyle]=\"getStyle(headerLayout?.style)\">\r\n\r\n <!-- @contract decision: resolves by field NAME, not by field type\r\n reality: the switch reads the LAST segment of scope.reference. Only logo, cart and\r\n searchInput render; any other name produces an empty element.\r\n failure: a correctly typed field with a different name renders nothing, silently.\r\n instead: name the field logo, cart or searchInput, or put it in another container -->\r\n <ng-container *ngFor=\"let header of headerItems\"\r\n [ngSwitch]=\"header.scope?.reference ? header.scope?.reference.split('/').pop() : 'default'\">\r\n\r\n <!-- Logo -->\r\n <ng-container *ngSwitchCase=\"'logo'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <img [src]=\"header.option.src\" [alt]=\"header.alt || 'Logo'\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" />\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Search -->\r\n <ng-container *ngSwitchCase=\"'searchInput'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <input #search type=\"text\" [placeholder]=\"header.option.placeholder ?? ''\"\r\n (keyup.enter)=\"invokeSearchedItems(header.option, search)\"\r\n [ngStyle]=\"getStyle(header?.scope?.style)\" />\r\n\r\n <button *ngIf=\"header.option.button !== false\" type=\"button\"\r\n (click)=\"invokeSearchedItems(header.option, search)\" [ngStyle]=\"getStyle(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!header.caption; else searchTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #searchTextContent>\r\n {{ header.caption }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Cart -->\r\n <ng-container *ngSwitchCase=\"'cart'\">\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Default Button -->\r\n <ng-container *ngSwitchCase=\"'default'\">\r\n @if (header.option && header.option?.action && (header.option?.action == \"cart\")) {\r\n <div *ngIf=\"isVisible(header)\" [ngStyle]=\"getStyle(header?.option?.style)\"\r\n (click)=\"invokeShowtableContent(header.option)\">\r\n\r\n <span [ngStyle]=\"getStyle(header?.priceStyle)\">\r\n {{ cartInfo.totalPrice | currency : header.option?.currency ? header.option.currency : 'USD' }}\r\n </span>\r\n\r\n <span [ngStyle]=\"getStyle(header?.quantityStyle)\">\r\n {{ cartInfo.quantity }}\r\n </span>\r\n\r\n <i [class]=\"header.icon\" [ngStyle]=\"getStyle(header?.iconStyle)\">\r\n </i>\r\n </div>\r\n }@else {\r\n <div *ngIf=\"shouldShowDefaultButton(header)\" [ngStyle]=\"getStyle(header?.option?.style)\">\r\n\r\n <button type=\"button\" (click)=\"invokeHeaderButtonClick(header.option)\"\r\n [ngStyle]=\"getStyle(header?.buttonStyle)\">\r\n <ng-container *ngIf=\"!header.label; else buttonTextContent\">\r\n <i nz-icon [nzType]=\"header.icon\" nzTheme=\"outline\"></i>\r\n </ng-container>\r\n\r\n <ng-template #buttonTextContent>\r\n {{ header.label }}\r\n </ng-template>\r\n </button>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n </ng-container>\r\n</header>","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NetworkLogService {\r\n\r\n private logs: any[] = [];\r\n\r\n addLog(log: any) {\r\n this.logs.unshift(log); // latest first\r\n localStorage.setItem('networkLogs', JSON.stringify(this.logs));\r\n }\r\n\r\n getLogsByDate(date: string): any[] {\r\n return this.logs.filter(l => l.date === date);\r\n }\r\n\r\n getAll(): any[] {\r\n return [...this.logs];\r\n }\r\n\r\n clear() {\r\n this.logs = [];\r\n localStorage.removeItem('networkLogs');\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { NetworkLogService } from '../../services/network-log.service';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [\r\n CommonModule\r\n ],\r\n selector: 'vl-logs',\r\n templateUrl: './logs.component.html',\r\n styleUrl: './logs.component.css'\r\n})\r\nexport class LogsComponent {\r\n logs: any[] = [];\r\n expandedRow: number | null = null;\r\n\r\n constructor(private logService: NetworkLogService) {}\r\n\r\n ngOnInit() {\r\n const today = new Date().toISOString().split('T')[0];\r\n this.logs = this.logService.getLogsByDate(today);\r\n console.log('this.logs: ', this.logs);\r\n }\r\n\r\n toggleRow(index: number) {\r\n this.expandedRow = this.expandedRow === index ? null : index;\r\n }\r\n}\r\n","<div class=\"network-log-wrapper\">\r\n\r\n <div class=\"network-log-table\">\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Time</th>\r\n <th>Method</th>\r\n <th>URL</th>\r\n <th>Status</th>\r\n <th>Duration (ms)</th>\r\n <th>Size (KB)</th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngFor=\"let log of logs; let i = index\">\r\n\r\n <!-- MAIN ROW -->\r\n <tr class=\"log-row\" (click)=\"toggleRow(i)\">\r\n <td>{{ i + 1 }}</td>\r\n <td>{{ log.time }}</td>\r\n\r\n <td>\r\n <span class=\"method\" [class.get]=\"log.method === 'GET'\" [class.post]=\"log.method === 'POST'\"\r\n [class.put]=\"log.method === 'PUT'\" [class.delete]=\"log.method === 'DELETE'\">\r\n {{ log.method }}\r\n </span>\r\n </td>\r\n\r\n <td class=\"ellipsis\" [title]=\"log.url\">\r\n {{ log.url }}\r\n </td>\r\n\r\n <td [class.error]=\"log.status >= 400\">\r\n {{ log.status }}\r\n </td>\r\n\r\n <td>{{ log.duration }}</td>\r\n\r\n <td>{{ log.size | number:'1.0-2' }}</td>\r\n </tr>\r\n\r\n <!-- DETAILS ROW -->\r\n <tr *ngIf=\"expandedRow === i\" class=\"details-row\">\r\n <td colspan=\"7\">\r\n <div class=\"details-container\">\r\n\r\n <!-- META -->\r\n <div class=\"detail-block\">\r\n <h4>Meta</h4>\r\n <p><strong>Date:</strong> {{ log.date }}</p>\r\n <p><strong>Type:</strong> {{ log.type }}</p>\r\n </div>\r\n\r\n <!-- REQUEST -->\r\n <div class=\"detail-block\">\r\n <h4>Request</h4>\r\n <p><strong>Headers</strong></p>\r\n <pre>{{ log.requestHeaders | json }}</pre>\r\n\r\n <p><strong>Body</strong></p>\r\n <pre>{{ log.requestBody | json }}</pre>\r\n </div>\r\n\r\n <!-- RESPONSE -->\r\n <div class=\"detail-block\">\r\n <h4>Response</h4>\r\n <pre>{{ log.responseBody | json }}</pre>\r\n </div>\r\n\r\n <!-- PERFORMANCE -->\r\n <div class=\"detail-block\">\r\n <h4>Performance</h4>\r\n <p><strong>Duration:</strong> {{ log.duration }} ms</p>\r\n <p><strong>Size:</strong> {{ log.size | number:'1.0-2' }} KB</p>\r\n </div>\r\n\r\n </div>\r\n </td>\r\n </tr>\r\n\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n</div>","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: a field without a placeholder stays empty; it showed the text \"undefined\" (resolvePlaceholder)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: keyboardTypeFor. A text field took the toolkit keyboard only with option.keyboardType,\r\n// which no layout sets; the attribute type now decides\r\nimport { ChangeDetectorRef, Component, Input } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { CustomKeyboardDirective } from '../custom-keyboard/custom-keyboard.directive';\r\nimport { CustomKeyboardType, resolveCustomKeyboardType } from '../custom-keyboard/custom-keyboard.types';\r\nimport { resolvePlaceholder } from '../../pipes/placeholder.pipe';\r\n\r\n@Component({\r\n selector: 'vl-textbox',\r\n standalone: true,\r\n templateUrl: './textbox.html',\r\n styleUrl: './textbox.css',\r\n imports: [FormsModule, InputTextModule, CustomKeyboardDirective]\r\n})\r\nexport class Textbox {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n selectedLanguageInfo: any = {};\r\n\r\n constructor(\r\n private cdr: ChangeDetectorRef,\r\n private utilityService: UtilityService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.utilityService.currentProjectlanguage$.subscribe((uiLang: any) => {\r\n queueMicrotask(() => {\r\n if (uiLang) {\r\n this.selectedLanguageInfo = uiLang\r\n this.cdr.markForCheck();\r\n }\r\n });\r\n });\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n /** The toolkit keyboard for this field, from option.keyboardType or the attribute type. */\r\n keyboardTypeFor(formField: any): CustomKeyboardType | null {\r\n const reference = formField?.scope?.reference;\r\n const property = reference\r\n ? this.modalItemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop()]\r\n : null;\r\n\r\n return resolveCustomKeyboardType(formField?.option, property);\r\n }\r\n\r\n getPlaceholder(formField: any) {\r\n return resolvePlaceholder(this.modalItemInfo.propertySchema, formField.scope?.reference, this.selectedLanguageInfo?.selectedLanguage);\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: the toolkit keyboard follows the attribute type (keyboardTypeFor) -->\r\n<input pInputText type=\"text\" #inputField=\"ngModel\" [vlCustomKeyboard]=\"keyboardTypeFor(formField)\"\r\n [required]=\"formField?.option?.required\" [email]=\"formField?.option?.email\" [disabled]=\"formField?.option?.disabled\"\r\n [readonly]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope.reference.split('/').pop()\r\n ]?.readonly\r\n \" [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"\r\n formField?.scope?.style?.classes\r\n ? formField.scope.style.classes[0]\r\n : ''\r\n \" [(ngModel)]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope.reference.split('/').pop()\r\n ].value\r\n \" [name]=\"formField.scope?.reference\" [placeholder]=\"getPlaceholder(formField)\" />","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: a field's backend list (option.autocomplete: url, method, params) is requested whenever the\r\n// field has that source, whatever its data type and control - autocomplete reads it as its\r\n// suggestions, dropdown and combobox as their items (agreed with the developer). The work order\r\n// fields are type string and were never requested. {{userInfo.x}} in the parameters resolves -\r\n// resourceNo was sent empty\r\n// - fix: the autocomplete request runs under the waiting rule of every request (stagedRequest:\r\n// hints after 10 and 30 s, given up after 60 s); on failure the list is empty, so the spinner no\r\n// longer turns for ever\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: the date and time icons open the picker with showOverlay() and markForCheck(). PrimeNG 21\r\n// DatePicker has no show(); the call threw, the catch swallowed it, and the overlay set in finally\r\n// stayed invisible (the picker is OnPush) until the user tapped the field - which then showed the\r\n// calendar together with a keyboard: the \"two keyboards\" seen on iOS\r\n// - change: a second picker icon is no longer ignored while another picker is open. The open picker\r\n// is closed without focusing its field, and its late onClose no longer cancels the new one\r\n// - change: after an icon tap a click that no longer hits the icon is dropped. Closing the keyboard\r\n// resizes the dialog under the finger, and the click opened the autocomplete moved there\r\n// - change: an icon tap releases the field that has the focus. Its preventDefault kept an\r\n// autocomplete focused, so its list and the system keyboard stayed open beside the calendar\r\n// - new: keyboardTypeFor, so every field gets the toolkit keyboard of its attribute type\r\n// - new: on the devices the date picker docks at the bottom, where the keyboard would be, and the\r\n// dialog ends above it; the small time picker stays at its field. Tapping into a field with an\r\n// open picker opens the keyboard at once\r\n// - change: after a selection in a picker the field gives up the focus PrimeNG returns to it; it\r\n// showed a focus frame without any keyboard\r\n// - change: the docked date picker has no open/close animation; it made the panel jump up to its\r\n// field while closing\r\n// - new: the field of an open picker keeps a focus frame (picker-field--active), since the field\r\n// itself gives the focus away\r\n// - change: the picker logic moved to DateTimePickerService, shared with form, card and grid\r\n// - new: ngOnDestroy closes a picker that is still open, so closing the dialog cannot leave the\r\n// keyboard service blocked and the next dialog cut short\r\n// Shuaib 2026-09-24\r\n// - new: renderFieldType maps legacy checkbox fields to boolean.\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { ChangeDetectorRef, Component, ElementRef, Input, OnChanges, OnDestroy, SimpleChanges, inject } from '@angular/core';\r\nimport { FormsModule, NgForm } from '@angular/forms';\r\nimport { Capacitor, CapacitorHttp } from '@capacitor/core';\r\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\r\nimport { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';\r\nimport { NzSelectModule } from 'ng-zorro-antd/select';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { Label } from '../../components/label/label';\r\nimport { String } from '../../components/string/string';\r\nimport { Textbox } from '../../components/textbox/textbox';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { CustomKeyboardDirective } from '../../components/custom-keyboard/custom-keyboard.directive';\r\nimport { DateTimePickerService } from '../../components/custom-keyboard/date-time-picker.service';\r\nimport { CustomKeyboardType, resolveCustomKeyboardType } from '../../components/custom-keyboard/custom-keyboard.types';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\nimport { stagedRequest } from '../../services/request-timeout.service';\r\nimport { RemoteListService } from '../../services/remote-list.service';\r\n\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'vl-model',\r\n templateUrl: './model.component.html',\r\n styleUrl: './model.component.css',\r\n imports: [PlaceholderPipe, \r\n CommonModule,\r\n FormsModule,\r\n NzSelectModule,\r\n NzDatePickerModule,\r\n DatePickerModule,\r\n AutoCompleteModule,\r\n InputTextModule,\r\n Label,\r\n String,\r\n Textbox,\r\n CustomKeyboardDirective,\r\n ]\r\n})\r\nexport class ModelComponent implements OnChanges, OnDestroy {\r\n private readonly remoteLists = inject(RemoteListService);\r\n /** Keep existing checkbox data objects usable; new objects use boolean. */\r\n renderFieldType(type: string | undefined): string | undefined {\r\n return type === 'checkbox' ? 'boolean' : type;\r\n }\r\n /** Date and time picker behaviour shared by all containers. */\r\n readonly picker = inject(DateTimePickerService);\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n /** The toolkit keyboard for a field, from option.keyboardType or the attribute type. */\r\n keyboardTypeFor(formField: any): CustomKeyboardType | null {\r\n const reference = formField?.scope?.reference;\r\n const property = reference\r\n ? this.modalItemInfo?.propertySchema?.[this.getScope(reference)]?.[reference.split('/').pop()]\r\n : null;\r\n\r\n return resolveCustomKeyboardType(formField?.option, property);\r\n }\r\n matchData: any[] = [];\r\n date2: Date | undefined;\r\n\r\n @Input() errorMessages: any = {};\r\n @Input() modalItemInfo: any = {};\r\n @Input() selectedLanguageInfo: any = {};\r\n @Input() userInfo: any = {};\r\n @Input() setFormDataHandler?: () => void | Promise<void>;\r\n\r\n copyLayoutSchema: any = {};\r\n isLoading = false;\r\n projectLanguage: any = {};\r\n\r\n constructor(\r\n private cdr: ChangeDetectorRef,\r\n private readonly dialogRef: DynamicDialogRef,\r\n private readonly dialogConfig: DynamicDialogConfig,\r\n private utilityService: UtilityService\r\n ) { }\r\n\r\n ngAfterViewInit(): void {\r\n this.projectLanguage = this.utilityService.currentProjectlanguage$.subscribe((uiLang: any) => {\r\n console.log('uiLang: ', uiLang);\r\n queueMicrotask(() => {\r\n if (uiLang) {\r\n this.selectedLanguageInfo = uiLang;\r\n this.updateDialogHeader();\r\n this.cdr.markForCheck();\r\n }\r\n });\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n /*\r\n * The dialog can be closed with a picker still open. Without this the keyboard service keeps\r\n * \"picker open\" and the reserved bottom area: no toolkit keyboard opens any more and the next\r\n * dialog is cut short above an empty strip.\r\n */\r\n this.picker.closeIfWithin(this.host.nativeElement);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (\r\n !changes['modalItemInfo'] &&\r\n !changes['selectedLanguageInfo'] &&\r\n !changes['userInfo']\r\n ) {\r\n return;\r\n }\r\n this.initializeDialogContent();\r\n }\r\n\r\n private async initializeDialogContent(loadData: boolean = true): Promise<void> {\r\n if (!this.modalItemInfo?.layoutSchema) {\r\n return;\r\n }\r\n\r\n this.copyLayoutSchema = JSON.parse(\r\n JSON.stringify(this.modalItemInfo.layoutSchema)\r\n );\r\n\r\n const translations =\r\n this.selectedLanguageInfo?.selectedLanguage;\r\n\r\n if (translations) {\r\n this.modalItemInfo.layoutSchema =\r\n this.updateLayoutLanguage(\r\n this.copyLayoutSchema,\r\n translations\r\n );\r\n }\r\n\r\n if (this.modalItemInfo?.currentRecord) {\r\n this.mapDataToPropertySchema(\r\n this.modalItemInfo.currentRecord,\r\n this.modalItemInfo\r\n );\r\n }\r\n\r\n await this.setAutoCompleteData();\r\n }\r\n\r\n private updateDialogHeader(): void {\r\n const titleKey =\r\n this.modalItemInfo?.modalTitleKey ??\r\n this.modalItemInfo?.modalTitle;\r\n\r\n if (!titleKey) {\r\n return;\r\n }\r\n\r\n const translations = this.selectedLanguageInfo?.selectedLanguage;\r\n this.dialogConfig.header = translations?.[titleKey] ?? titleKey;\r\n }\r\n\r\n updateLayoutLanguage<T>(\r\n schema: T,\r\n translations: Record<string, string>\r\n ): T {\r\n const cloned = JSON.parse(JSON.stringify(schema));\r\n\r\n const walk = (obj: any) => {\r\n if (!obj || typeof obj !== 'object') return;\r\n\r\n // 🔹 label.caption (most common in form schemas)\r\n if (obj.label && typeof obj.label.caption === 'string') {\r\n const original = obj.label.caption;\r\n obj.label.caption = translations[original] ?? original;\r\n }\r\n\r\n // 🔹 direct caption (fallback / buttons / future-proof)\r\n if (typeof obj.caption === 'string') {\r\n const original = obj.caption;\r\n obj.caption = translations[original] ?? original;\r\n }\r\n\r\n // 🚫 Skip huge data arrays (autocomplete datasets, etc.)\r\n if (Array.isArray(obj.data)) return;\r\n\r\n // 🔁 Recurse\r\n Object.keys(obj).forEach((key) => {\r\n const value = obj[key];\r\n if (typeof value === 'object') {\r\n walk(value);\r\n }\r\n });\r\n };\r\n\r\n walk(cloned);\r\n return cloned;\r\n }\r\n\r\n getLabel(formField: any) {\r\n let caption = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n const translation = this.selectedLanguageInfo?.selectedLanguage;\r\n return translation && translation[caption] ? translation[caption] : caption;\r\n }\r\n\r\n getButtonCaption(formField: any) {\r\n let caption = formField.label?.caption;\r\n const translation = this.selectedLanguageInfo?.selectedLanguage;\r\n return translation && translation[caption] ? translation[caption] : caption;\r\n }\r\n\r\n mapDataToPropertySchema(data: any, modalItemInfo: any): void {\r\n if (!data || !modalItemInfo?.propertySchema) return;\r\n const [rootScope] = Object.keys(modalItemInfo.propertySchema);\r\n if (!rootScope) return;\r\n\r\n const schemaFields = modalItemInfo.propertySchema[rootScope];\r\n Object.keys(schemaFields).forEach((fieldKey) => {\r\n if (data.hasOwnProperty(fieldKey)) {\r\n if (!schemaFields[fieldKey]) {\r\n schemaFields[fieldKey] = {};\r\n }\r\n schemaFields[fieldKey].value = data[fieldKey];\r\n }\r\n });\r\n }\r\n\r\n\r\n async setAutoCompleteData(): Promise<void> {\r\n const sections =\r\n this.modalItemInfo?.layoutSchema?.formSections || [];\r\n\r\n for (const section of sections) {\r\n for (const field of section?.formFields || []) {\r\n const reference = field?.scope?.reference;\r\n\r\n if (!reference) {\r\n continue;\r\n }\r\n\r\n const scope = this.getScope(reference);\r\n const fieldName = reference.split('/').pop();\r\n\r\n // Loaded whenever the field has an autocomplete source, whatever its data type: the\r\n // project's work order fields are type string - checked against 'autocomplete' only, the\r\n // list was shown but never requested (decision with the developer, 2026-10-13).\r\n if (field?.option?.autocomplete) {\r\n this.isLoading = true;\r\n this.cdr.detectChanges();\r\n\r\n try {\r\n field.data = await this.fetchAutocompleteData(field);\r\n\r\n // Any control reads the loaded list: dropdown and combobox take their items from the\r\n // property schema - filled from the backend now as well (agreed with the developer).\r\n const property = this.modalItemInfo?.propertySchema?.[scope]?.[fieldName ?? ''];\r\n\r\n if (property && field.option?.control && field.option.control !== 'autocomplete' && field.data.length) {\r\n property.data = field.data;\r\n }\r\n } catch (error) {\r\n // Empty list: the spinner stops; the waiting rule has already told the user.\r\n field.data = [];\r\n console.warn('Autocomplete list could not be loaded', fieldName, error);\r\n } finally {\r\n this.isLoading = false;\r\n this.cdr.detectChanges();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** The field's backend list (RemoteListService - shared by every container). */\r\n async fetchAutocompleteData(formField: any) {\r\n return this.remoteLists.load(formField?.option?.autocomplete, this.userInfo);\r\n }\r\n\r\n /** Resolves {{...}} against the user info (RemoteListService). */\r\n resolveToken(template: string, context: any) {\r\n return this.remoteLists.resolveToken(template, context);\r\n }\r\n\r\n buildCompany(userInfo: any): string {\r\n return this.remoteLists.buildCompany(userInfo);\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n autocompChangeEvent(event: any, formField: any) {\r\n const q = (event.query || '').toLowerCase();\r\n let fieldName = formField.scope?.reference?.split('/')?.pop()\r\n if (fieldName) {\r\n // Always an array: undefined kept PrimeNG's loading spinner turning.\r\n this.matchData = (formField.data ?? []).filter((x: any) => x[fieldName] && `${x[fieldName]}`.toLowerCase().startsWith(q));\r\n }\r\n }\r\n\r\n autocompFocusOutEvent(event: any, formField: any) {\r\n let actualObj = Object.keys(event)\r\n if (actualObj.length && formField) {\r\n this.autocompSelectEvent(event, formField)\r\n }\r\n }\r\n\r\n autocompSelectEvent(obj: any, formField?: any) {\r\n const mapping = formField.option?.onSelect?.mapFields;\r\n if (!mapping) return;\r\n Object.entries(mapping).forEach(([targetProp, sourceKey]) => {\r\n const scope = this.getScope(formField.scope.reference);\r\n if (this.modalItemInfo.propertySchema?.[scope]?.[targetProp]) {\r\n this.modalItemInfo.propertySchema[scope][targetProp].value = obj[sourceKey as string] ?? null;\r\n }\r\n });\r\n }\r\n\r\n setErroMessage(formField: any, errorMessages: any, errorType: any) {\r\n let error: any = \"\";\r\n let fieldName: any = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;\r\n if (errorType == \"required\") {\r\n error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required\r\n }\r\n if (error && error.toString().includes(\"{{requiredLength}}\")) {\r\n error = error.replace(/{{\\s*requiredLength\\s*}}/g, formField?.minlength.toString());\r\n }\r\n return error.replace(/{{\\s*field\\s*}}/g, fieldName);\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n getSectionBodyStyle(formSection: any): Record<string, any> {\r\n const sectionStyle = {\r\n ...(formSection?.style || {})\r\n };\r\n\r\n return this.getStyleWithoutClasses({\r\n display: sectionStyle.display || 'grid',\r\n gridTemplateColumns:\r\n sectionStyle.gridTemplateColumns ||\r\n sectionStyle['grid-template-columns'] ||\r\n 'repeat(12, minmax(0, 1fr))',\r\n gap: sectionStyle.gap || '12px',\r\n width: sectionStyle.width || '100%',\r\n boxSizing: sectionStyle.boxSizing || 'border-box',\r\n ...sectionStyle\r\n }).style;\r\n }\r\n\r\n getFieldWrapperStyle(formField: any): Record<string, any> {\r\n const style = formField?.style || {};\r\n\r\n return {\r\n gridColumn:\r\n style.gridColumn ||\r\n style['grid-column'] ||\r\n `span ${formField?.gridSpan || 12}`,\r\n gridRow: style.gridRow || style['grid-row'] || undefined,\r\n justifySelf: style.justifySelf || style['justify-self'] || undefined,\r\n alignSelf: style.alignSelf || style['align-self'] || undefined,\r\n width: style.width || '100%',\r\n maxWidth: style.maxWidth || style['max-width'] || undefined,\r\n minWidth: style.minWidth || style['min-width'] || '0',\r\n margin: style.margin || undefined,\r\n marginTop: style.marginTop || style['margin-top'] || undefined,\r\n marginRight: style.marginRight || style['margin-right'] || undefined,\r\n marginBottom: style.marginBottom || style['margin-bottom'] || undefined,\r\n marginLeft: style.marginLeft || style['margin-left'] || undefined,\r\n boxSizing: style.boxSizing || style['box-sizing'] || 'border-box'\r\n };\r\n }\r\n\r\n onTimePanelShow(formField: any): void {\r\n this.picker.onShown();\r\n\r\n const reference =\r\n formField?.scope?.reference;\r\n\r\n const scope =\r\n this.getScope(reference);\r\n\r\n const fieldName =\r\n reference?.split('/')?.pop();\r\n\r\n const field =\r\n this.modalItemInfo\r\n ?.propertySchema\r\n ?.[scope]\r\n ?.[fieldName];\r\n\r\n if (!field || field.value) {\r\n return;\r\n }\r\n\r\n const currentTime = new Date();\r\n currentTime.setSeconds(0, 0);\r\n\r\n this.handleRules(\r\n formField,\r\n currentTime\r\n );\r\n }\r\n\r\n\r\n getControlStyle(formField: any): Record<string, any> {\r\n const style = {\r\n ...(formField?.style || {})\r\n };\r\n\r\n /*\r\n * These properties belong to the field wrapper because the wrapper\r\n * is the direct child of the section grid.\r\n */\r\n delete style.gridColumn;\r\n delete style['grid-column'];\r\n delete style.gridRow;\r\n delete style['grid-row'];\r\n delete style.justifySelf;\r\n delete style['justify-self'];\r\n delete style.alignSelf;\r\n delete style['align-self'];\r\n delete style.margin;\r\n delete style.marginTop;\r\n delete style['margin-top'];\r\n delete style.marginRight;\r\n delete style['margin-right'];\r\n delete style.marginBottom;\r\n delete style['margin-bottom'];\r\n delete style.marginLeft;\r\n delete style['margin-left'];\r\n delete style.classes;\r\n\r\n return {\r\n width: style.width || '100%',\r\n maxWidth: style.maxWidth || style['max-width'] || undefined,\r\n minWidth: style.minWidth || style['min-width'] || '0',\r\n boxSizing: style.boxSizing || style['box-sizing'] || 'border-box',\r\n ...style\r\n };\r\n }\r\n\r\n getFieldInnerLayoutStyle(formField: any): Record<string, any> {\r\n const layoutStyle = formField?.layoutStyle || {};\r\n\r\n if (formField?.layout === 'horizontal') {\r\n return {\r\n display: 'grid',\r\n gridTemplateColumns:\r\n layoutStyle.gridTemplateColumns ||\r\n layoutStyle['grid-template-columns'] ||\r\n '80px minmax(0, 1fr)',\r\n alignItems: layoutStyle.alignItems || 'center',\r\n gap: layoutStyle.gap || '10px',\r\n width: '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n ...layoutStyle\r\n };\r\n }\r\n\r\n return {\r\n display: 'grid',\r\n gridTemplateColumns: 'minmax(0, 1fr)',\r\n gap: layoutStyle.gap || '6px',\r\n width: '100%',\r\n minWidth: '0',\r\n boxSizing: 'border-box',\r\n ...layoutStyle\r\n };\r\n }\r\n\r\n dateChangeEvent(formField: any, value: any) {\r\n this.handleRules(formField, value);\r\n }\r\n\r\n onDateTyping(event: any) {\r\n const input = event.target as HTMLInputElement;\r\n if (!input) return;\r\n let digits = input.value.replace(/\\D/g, '');\r\n digits = digits.substring(0, 8);\r\n let formatted = '';\r\n if (digits.length <= 4) {\r\n formatted = digits;\r\n } else if (digits.length <= 6) {\r\n formatted = `${digits.slice(0, 4)}-${digits.slice(4)}`;\r\n } else {\r\n formatted = `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;\r\n }\r\n input.value = formatted;\r\n }\r\n\r\n onTimeTyping(event: any) {\r\n const input: HTMLInputElement =\r\n event?.target || event?.originalEvent?.target;\r\n if (!input) return;\r\n let digits = input.value.replace(/\\D/g, '');\r\n digits = digits.substring(0, 4);\r\n let formatted = '';\r\n if (digits.length <= 2) {\r\n formatted = digits;\r\n } else {\r\n formatted = `${digits.slice(0, 2)}:${digits.slice(2)}`;\r\n }\r\n\r\n input.value = formatted;\r\n }\r\n\r\n timeChangeEvent(formField: any, value: any) {\r\n this.handleRules(formField, value);\r\n }\r\n\r\n handleRules(formField: any, value: any) {\r\n const scope = this.getScope(formField.scope.reference);\r\n const field = formField.scope?.reference.split('/').pop()\r\n const rules = formField.option?.rules;\r\n this.modalItemInfo.propertySchema[scope][field].value = value;\r\n if (!rules) return;\r\n rules.forEach((rule: any) => {\r\n let exist = this.isRuleTriggered(rule, formField)\r\n if (!exist) return;\r\n switch (rule.action) {\r\n case 'calculateDuration':\r\n this.applyDurationRule(rule, formField);\r\n break;\r\n case 'resetValue':\r\n this.resetRule(rule, formField);\r\n break;\r\n }\r\n });\r\n }\r\n\r\n resetRule(rule: any, formField: any) {\r\n const scope = this.getScope(formField.scope.reference);\r\n if (rule?.resetValue?.length > 0) {\r\n rule.resetValue.forEach((prop: any) => {\r\n this.modalItemInfo.propertySchema[scope][prop].value = null;\r\n });\r\n }\r\n }\r\n\r\n isRuleTriggered(rule: any, formField: any): boolean {\r\n if (rule.when === 'timeRangeComplete') {\r\n const scope = this.getScope(formField.scope.reference);\r\n return (\r\n this.modalItemInfo.propertySchema[scope]?.workDayTimeFrom?.value &&\r\n this.modalItemInfo.propertySchema[scope]?.workDayTimeTo?.value\r\n );\r\n } else if (rule.when === 'change') {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n applyDurationRule(rule: any, formField: any) {\r\n const scope = this.getScope(formField.scope.reference);\r\n const schema = this.modalItemInfo.propertySchema[scope];\r\n const fromTimeVal: Date = schema?.workDayTimeFrom?.value;\r\n const toTimeVal: Date = schema?.workDayTimeTo?.value;\r\n const baseDateVal: Date = schema?.fromDate?.value;\r\n\r\n // 🔒 Guard\r\n if (!fromTimeVal || !toTimeVal || !baseDateVal) {\r\n schema[rule.params.durationField].value = '';\r\n return;\r\n }\r\n\r\n // 📅 Base date (From Date)\r\n const baseDate = new Date(baseDateVal);\r\n baseDate.setHours(0, 0, 0, 0);\r\n\r\n // ⏱ FROM datetime\r\n const fromDateTime = new Date(baseDate);\r\n fromDateTime.setHours(\r\n fromTimeVal.getHours(),\r\n fromTimeVal.getMinutes(),\r\n 0,\r\n 0\r\n );\r\n\r\n // ⏱ TO datetime\r\n let toDateTime = new Date(baseDate);\r\n toDateTime.setHours(\r\n toTimeVal.getHours(),\r\n toTimeVal.getMinutes(),\r\n 0,\r\n 0\r\n );\r\n\r\n // 🌙 Overnight handling\r\n if (toDateTime <= fromDateTime) {\r\n toDateTime.setDate(toDateTime.getDate() + 1);\r\n }\r\n\r\n // ⏳ Duration calculation\r\n const diffMs = toDateTime.getTime() - fromDateTime.getTime();\r\n const totalMinutes = Math.floor(diffMs / 60000);\r\n const hours = Math.floor(totalMinutes / 60);\r\n const minutes = totalMinutes % 60;\r\n const duration = `${hours}:${minutes.toString().padStart(2, '0')}`;\r\n // ✅ Set duration\r\n schema[rule.params.durationField].value = duration;\r\n\r\n // ✅ Auto set To Date\r\n schema.toDate.value = new Date(toDateTime);\r\n }\r\n\r\n invokeSetformData(): void {\r\n void this.setFormDataHandler?.();\r\n }\r\n\r\n invokeFormBtnClick(\r\n option: any,\r\n propertySchema: any,\r\n form: NgForm\r\n ): void {\r\n if (option?.innerAction === 'cancel') {\r\n this.onCancel();\r\n return;\r\n }\r\n\r\n if (option?.innerAction === 'submit') {\r\n const valid = this.checkValidty(form);\r\n\r\n if (!valid) {\r\n return;\r\n }\r\n\r\n this.dialogRef.close({\r\n option,\r\n action: 'buttonClick',\r\n propertySchema,\r\n recordIndex: this.modalItemInfo?.recordIndex\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n checkValidty(form: NgForm): boolean {\r\n if (!form) {\r\n return false;\r\n }\r\n\r\n Object.values(form.controls).forEach(control => {\r\n control.markAsTouched();\r\n control.updateValueAndValidity();\r\n });\r\n\r\n return !!form.valid;\r\n }\r\n\r\n onCancel(): void {\r\n this.dialogRef.close({\r\n action: 'cancel'\r\n });\r\n }\r\n\r\n private getMediaProperty(field: any): any {\r\n const reference = field?.scope?.reference;\r\n const key = reference?.split('/').pop();\r\n \r\n return key\r\n ? this.modalItemInfo?.propertySchema?.[this.getScope(reference)]?.[key]\r\n : undefined;\r\n }\r\n \r\n getMediaSource(field: any): string {\r\n const property = this.getMediaProperty(field);\r\n const value =\r\n field?.option?.src || property?.value || property?.default || '';\r\n \r\n return typeof value === 'string' ? value.trim() : '';\r\n }\r\n \r\n getMediaLabel(field: any): string {\r\n if (typeof field?.label === 'string' && field.label.trim()) {\r\n return field.label;\r\n }\r\n \r\n return field?.label?.value\r\n || field?.label?.caption\r\n || this.getMediaProperty(field)?.caption\r\n || 'Media';\r\n }\r\n \r\n getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file' {\r\n const source = this.getMediaSource(field);\r\n const mime = /^data:([^;,]+)/i.exec(source)?.[1]?.toLowerCase();\r\n \r\n if (mime?.startsWith('image/')) return 'image';\r\n if (mime?.startsWith('video/')) return 'video';\r\n if (mime?.startsWith('audio/')) return 'audio';\r\n if (mime === 'application/pdf') return 'pdf';\r\n \r\n const property = this.getMediaProperty(field);\r\n const candidates = [\r\n source,\r\n field?.option?.fileName,\r\n property?.value,\r\n property?.default\r\n ];\r\n \r\n const videos = ['mp4', 'm4v', 'webm', 'mov', 'ogv', 'avi', 'mkv'];\r\n const audios = ['mp3', 'wav', 'ogg', 'oga', 'm4a', 'aac', 'flac', 'opus'];\r\n const files = [\r\n 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\r\n 'txt', 'csv', 'zip', 'rar', '7z'\r\n ];\r\n \r\n for (const candidate of candidates) {\r\n if (typeof candidate !== 'string') continue;\r\n if (/^(data|blob):/i.test(candidate)) continue;\r\n \r\n let path = candidate.split(/[?#]/)[0];\r\n \r\n try {\r\n path = decodeURIComponent(path);\r\n } catch {\r\n // Keep the original path.\r\n }\r\n \r\n const extension = /\\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();\r\n \r\n if (!extension) continue;\r\n if (videos.includes(extension)) return 'video';\r\n if (audios.includes(extension)) return 'audio';\r\n if (extension === 'pdf') return 'pdf';\r\n if (files.includes(extension)) return 'file';\r\n }\r\n \r\n return 'image';\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - change: number, autocomplete, date and time fields take the toolkit keyboard of their\r\n attribute type (keyboardTypeFor) instead of only an explicit option.keyboardType\r\n - change: the date picker docks at the bottom on the devices (model-datepicker-panel--docked);\r\n the time picker stays attached to its field in a compact form (model-timepicker-panel);\r\n both report which picker closed (onPickerClose(picker)) -->\r\n\r\n<!-- Shuaib 2026-09-24\r\n - change: the model field switch uses renderFieldType so legacy checkbox fields render as boolean. -->\r\n\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the widest type coverage in the toolkit, and one on the credit\r\n card case recording that the rename reached this file first -->\r\n<!-- Loader Spinner -->\r\n<div *ngIf=\"isLoading\" class=\"loader-overlay\">\r\n <div class=\"spinner\"></div>\r\n</div>\r\n<div [style]=\"getStyleWithoutClasses(modalItemInfo?.layoutSchema?.style).style\"\r\n [class]=\"modalItemInfo?.layoutSchema?.style?.classes[0]\">\r\n <form #dynamicForm=\"ngForm\"\r\n *ngIf=\"modalItemInfo?.layoutSchema?.formSections?.length > 0\"\r\n (submit)=\"$event.preventDefault()\">\r\n <div\r\n *ngFor=\"let formSection of modalItemInfo?.layoutSchema?.formSections\">\r\n <div *ngIf=\"formSection?.label?.caption\"\r\n [class]=\"formSection?.label?.style?.classes[0]\"\r\n [style]=\"getStyleWithoutClasses(formSection?.label?.style).style\">\r\n {{formSection.label.caption}}\r\n </div>\r\n <div *ngIf=\"formSection?.formFields?.length > 0\"\r\n [class]=\"formSection?.style?.classes?.[0] || ''\"\r\n [ngStyle]=\"getSectionBodyStyle(formSection)\">\r\n <div *ngFor=\"let formField of formSection.formFields\"\r\n [ngStyle]=\"getFieldWrapperStyle(formField)\"\r\n [class]=\"formField?.style?.classes || ''\">\r\n\r\n <!-- @contract decision: the widest type coverage in the toolkit\r\n reality: every field type except the grid-only quantity renders here.\r\n When another container drops a type, this is the way out.\r\n seen: measured 2026-09-19. Note the file is model.component.html while\r\n the container is called modal in layout files - that costs a\r\n search every time -->\r\n <!-- @contract compatibility: checkbox is rendered as boolean for existing projects. -->\r\n <div [ngSwitch]=\"renderFieldType(\r\n formField?.scope?.reference &&\r\n modalItemInfo?.propertySchema?.[\r\n getScope(formField.scope.reference)\r\n ]\r\n ? modalItemInfo.propertySchema[\r\n getScope(formField.scope.reference)\r\n ]?.[\r\n formField.scope.reference.split('/').pop()\r\n ]?.type\r\n : 'default'\r\n )\">\r\n <!-- Media control -->\r\n <div\r\n *ngSwitchCase=\"'media'\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0] : ''\">\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"modelMediaContent; context: { field: formField }\">\r\n </ng-container>\r\n </div>\r\n\r\n <!-- credit card control -->\r\n <!-- @contract decision: the credit card type is spelled creditCard\r\n reality: this file was renamed on 2026-09-15, form.component.html and\r\n utility.service.ts followed on 2026-09-19. carditCard is read\r\n nowhere any more.\r\n failure: a data object still declaring carditCard renders empty. -->\r\n <div *ngSwitchCase=\"'creditCard'\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes[0]\">\r\n <div id=\"card-element\">\r\n <!-- a Stripe element will be inserted here -->\r\n </div>\r\n <!-- Used to display form errors -->\r\n <div id=\"card-errors\"\r\n class=\"displayError.textContent!=='': 'alert alert-danger mt-1'\">\r\n </div>\r\n </div>\r\n\r\n <!-- string control -->\r\n <div *ngSwitchCase=\"'string'\" class=\"form-group mb-3\">\r\n @if(formField.option && formField.option.control &&\r\n !formField.option.protected){\r\n @switch (formField.option.control) {\r\n @case ('textInput') {\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <vl-label [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n <vl-textbox [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-textbox>\r\n </div>\r\n <!-- Error Message -->\r\n <!-- <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div> -->\r\n }\r\n\r\n @case ('password') {\r\n <span>Switch not supported yet</span>\r\n\r\n }\r\n @case ('combobox') {\r\n <span>Combobox not supported yet</span>\r\n }\r\n @case('textArea'){\r\n <span>TextArea not supported yet</span>\r\n }\r\n @case ('switch') {\r\n <span>Switch not supported yet</span>\r\n }\r\n\r\n @case('radiobutton') {\r\n <span>Radiobutton not supported yet</span>\r\n }\r\n\r\n @case ('dropdown') {\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\r\n #dropdownField=\"ngModel\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [value]=\"formField?.option?.optionValue ? formField.option.optionValue : 'value'\">\r\n {{ formField?.option?.optionLabel ?\r\n formField.option.optionLabel :\r\n 'label'}}</option>\r\n </select>\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-select nzShowSearch nzAllowClear\r\n nzPlaceHolder=\"Select\"\r\n #dropdownField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <nz-option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [nzLabel]=\"item[formField?.option?.optionLabel ? formField.option.optionLabel : 'label']\"\r\n [nzValue]=\"item[formField?.option?.optionValue ? formField.option.optionValue : 'value']\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dropdownField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dropdownField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('autocomplete') {\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <vl-label [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n\r\n <span>\r\n <p-autocomplete\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\"\r\n [suggestions]=\"matchData\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"formField?.option?.autocomplete?.response?.label ? formField.option.autocomplete.response.label : 'label'\"\r\n [placeholder]=\"modalItemInfo.propertySchema | vlPlaceholder: formField.scope?.reference\"\r\n (completeMethod)=\"autocompChangeEvent($event, formField)\"\r\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\r\n [vlCustomKeyboard]=\"keyboardTypeFor(formField)\">\r\n </p-autocomplete>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField,\r\n errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' +\r\n errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n </div>\r\n }\r\n }\r\n }@else{\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <vl-label [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n <vl-textbox [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-textbox>\r\n </div>\r\n <!-- Error Message -->\r\n <!-- <div *ngIf=\"inputField?.touched && inputField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"inputField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div> -->\r\n </div>\r\n }\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n\r\n </div>\r\n\r\n <!-- number control -->\r\n <div *ngSwitchCase=\"'number'\" class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <h5>{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }} {{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.value\r\n |\r\n currency:formField.option.currency :true:\r\n formField.option?.decimalPoint}}\r\n </h5>\r\n </span>\r\n <span *ngIf=\"!formField.option.protected\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{\r\n formField.label?.value\r\n ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <input type=\"number\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\r\n [vlCustomKeyboard]=\"keyboardTypeFor(formField)\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n [placeholder]=\"modalItemInfo.propertySchema | vlPlaceholder: formField.scope?.reference\" />\r\n </div>\r\n </span>\r\n </div>\r\n\r\n <!-- DateRange control -->\r\n <div *ngSwitchCase=\"'dateRange'\"\r\n class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">{{\r\n formField.label?.value\r\n ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n <nz-range-picker #dateRangeField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"></nz-range-picker>\r\n </div>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"dateRangeField?.touched && dateRangeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateRangeField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateRangeField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Date control -->\r\n <div *ngSwitchCase=\"'date'\" class=\"form-group mb-3\">\r\n <span\r\n *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string\r\n [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n {{ getLabel(formField) }}\r\n </label>\r\n\r\n <span>\r\n <div class=\"picker-field\">\r\n <p-datepicker\r\n #datePicker\r\n #dateField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n [showIcon]=\"false\"\r\n [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [autoZIndex]=\"true\"\r\n [baseZIndex]=\"10000\"\r\n [panelStyleClass]=\"picker.datePanelClass\"\r\n [motionOptions]=\"picker.dockedMotion\"\r\n [vlCustomKeyboard]=\"keyboardTypeFor(formField)\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, datePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"picker.onShown()\"\r\n (onClose)=\"picker.onClose(datePicker)\"\r\n (ngModelChange)=\"dateChangeEvent(formField, $event)\"\r\n (onInput)=\"onDateTyping($event)\"\r\n [dateFormat]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ]?.format || 'yy-mm-dd'\r\n \"\r\n [(ngModel)]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [class]=\"formField?.scope?.style?.classes?.[0] || ''\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\">\r\n </p-datepicker>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"picker-field__icon\"\r\n aria-label=\"Open calendar\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n (pointerdown)=\"picker.openFromIcon($event, datePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-calendar\"></i>\r\n </button>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"dateField?.touched && dateField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateField?.errors?.['required']\">\r\n {{ setErroMessage(formField,\r\n errorMessages, 'required') }}\r\n </p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dateField?.errors?.['email']\">\r\n {{\r\n (formField.label?.value\r\n ? formField.label?.value\r\n : modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption)\r\n + ' ' + errorMessages.pattern\r\n }}\r\n </p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Time control -->\r\n <div *ngSwitchCase=\"'time'\" class=\"form-group mb-3\">\r\n <span\r\n *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string\r\n [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n {{ getLabel(formField) }}\r\n </label>\r\n\r\n <span>\r\n <div class=\"picker-field\">\r\n <p-datepicker\r\n #timePicker\r\n #timeField=\"ngModel\"\r\n styleClass=\"custom-datepicker\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n [timeOnly]=\"true\"\r\n hourFormat=\"24\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n [showIcon]=\"false\"\r\n [showOnFocus]=\"false\"\r\n appendTo=\"body\"\r\n [autoZIndex]=\"true\"\r\n [baseZIndex]=\"10000\"\r\n [panelStyleClass]=\"picker.timePanelClass\"\r\n [vlCustomKeyboard]=\"keyboardTypeFor(formField)\"\r\n (pointerdown)=\"picker.onFieldPointerDown($event, timePicker)\"\r\n (onFocus)=\"picker.onFieldFocus($event)\"\r\n (onShow)=\"onTimePanelShow(formField)\"\r\n (onClose)=\"picker.onClose(timePicker)\"\r\n (onInput)=\"onTimeTyping($event)\"\r\n (ngModelChange)=\"timeChangeEvent(formField, $event)\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [(ngModel)]=\"\r\n modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ].value\r\n \"\r\n [class]=\"formField?.scope?.style?.classes?.[0] || ''\">\r\n </p-datepicker>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"picker-field__icon\"\r\n aria-label=\"Open time picker\"\r\n [disabled]=\"formField?.option?.disabled\"\r\n (pointerdown)=\"picker.openFromIcon($event, timePicker)\"\r\n (click)=\"picker.blockIconClick($event)\">\r\n <i class=\"pi pi-clock\"></i>\r\n </button>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"timeField?.touched && timeField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"timeField?.errors?.['required']\">\r\n {{ setErroMessage(formField,\r\n errorMessages, 'required') }}\r\n </p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"timeField?.errors?.['email']\">\r\n {{\r\n (formField.label?.value\r\n ? formField.label?.value\r\n : modalItemInfo.propertySchema[\r\n getScope(formField.scope?.reference)\r\n ][\r\n formField.scope?.reference.split('/').pop()\r\n ]?.caption)\r\n + ' ' + errorMessages.pattern\r\n }}\r\n </p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Autocomplete control -->\r\n <div *ngSwitchCase=\"'autocomplete'\"\r\n class=\"form-group mb-3\">\r\n <span *ngIf=\"formField.option.protected\"\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\"\r\n [class]=\"formField?.label?.style.classes ? formField?.label?.style?.classes[0] : ''\">\r\n <vl-string [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-string>\r\n </span>\r\n <div *ngIf=\"!formField.option.protected\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <vl-label [formField]=\"formField\"\r\n [modalItemInfo]=\"modalItemInfo\">\r\n </vl-label>\r\n\r\n <span>\r\n <p-autocomplete\r\n #autocompleteField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [name]=\"formField.scope?.reference\"\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\"\r\n [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\"\r\n [suggestions]=\"matchData\"\r\n [dropdown]=\"true\"\r\n [optionLabel]=\"formField?.option?.autocomplete?.response?.label ? formField.option.autocomplete.response.label : 'label'\"\r\n [placeholder]=\"modalItemInfo.propertySchema | vlPlaceholder: formField.scope?.reference\"\r\n (completeMethod)=\"autocompChangeEvent($event, formField)\"\r\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\r\n [vlCustomKeyboard]=\"keyboardTypeFor(formField)\">\r\n </p-autocomplete>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField,\r\n errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' +\r\n errorMessages.pattern}}</p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- checkBox control -->\r\n <div *ngSwitchCase=\"'boolean'\" class=\"form-group mb-3\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0] : ''\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <label class=\"form-check-label\"><input\r\n type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\"\r\n (ngModelChange)=\"invokeSetformData()\" />{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\"\r\n [class]=\"formField?.layout == 'horizontal' ? 'horizontal-layout' : 'row'\">\r\n <label class=\"form-check-label\">{{\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}\r\n <input type=\"checkbox\"\r\n class=\"form-check-input\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [name]=\"formField.scope?.reference\" /></label>\r\n </div>\r\n </div>\r\n\r\n <!-- dropdown control -->\r\n <div *ngSwitchCase=\"'dropdown'\" class=\"form-group mb-3\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0] : ''\">\r\n <span *ngIf=\"formField.option?.postfixCaption\">\r\n <select id=\"dynamic-dropdown\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\r\n #dropdownField=\"ngModel\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [value]=\"formField?.option?.optionValue ? formField.option.optionValue : 'value'\">\r\n {{ formField?.option?.optionLabel ?\r\n formField.option.optionLabel :\r\n 'label'}}</option>\r\n </select>\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n </span>\r\n <div *ngIf=\"!formField.option?.postfixCaption\">\r\n <div\r\n [ngStyle]=\"getFieldInnerLayoutStyle(formField)\">\r\n <label\r\n [style]=\"getStyleWithoutClasses(formField?.label?.style).style\">{{modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n }}</label>\r\n\r\n <nz-select nzShowSearch nzAllowClear\r\n nzPlaceHolder=\"Select\"\r\n #dropdownField=\"ngModel\"\r\n [required]=\"formField.option.required\"\r\n [class]=\"formField.style?.classes ? formField.style?.classes[0]: ''\"\r\n [style]=\"getStyleWithoutClasses(formField?.style).style\"\r\n [name]=\"formField.scope?.reference\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\">\r\n <nz-option\r\n *ngFor=\"let item of modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.data\"\r\n [nzLabel]=\"item[formField?.option?.optionLabel ? formField.option.optionLabel : 'label']\"\r\n [nzValue]=\"item[formField?.option?.optionValue ? formField.option.optionValue : 'value']\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <!-- Error Message -->\r\n <div\r\n *ngIf=\"dropdownField?.touched && dropdownField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\"\r\n *ngIf=\"dropdownField?.errors?.['required']\">\r\n {{formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption\r\n +\r\n ' ' + errorMessages.required}}</p>\r\n <p class=\"text-danger\"\r\n *ngIf=\"dropdownField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button control -->\r\n <div *ngSwitchCase=\"'default'\">\r\n <button type=\"button\"\r\n [ngStyle]=\"getStyleWithoutClasses(formField.style).style\"\r\n (click)=\"invokeFormBtnClick(formField.option, modalItemInfo.propertySchema, dynamicForm)\"\r\n class=\"btn btn-primary btn-block\">\r\n {{ getButtonCaption(formField) }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n<ng-template #modelMediaContent let-field=\"field\">\r\n <ng-container *ngIf=\"getMediaSource(field) as source\">\r\n <ng-container [ngSwitch]=\"getMediaKind(field)\">\r\n\r\n <img\r\n *ngSwitchDefault\r\n [src]=\"source\"\r\n [alt]=\"getMediaLabel(field)\"\r\n loading=\"lazy\" />\r\n\r\n <video\r\n *ngSwitchCase=\"'video'\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(field)\"\r\n controls\r\n playsinline\r\n preload=\"metadata\">\r\n Your browser does not support video playback.\r\n </video>\r\n\r\n <audio\r\n *ngSwitchCase=\"'audio'\"\r\n [src]=\"source\"\r\n [attr.aria-label]=\"getMediaLabel(field)\"\r\n controls\r\n preload=\"metadata\">\r\n Your browser does not support audio playback.\r\n </audio>\r\n\r\n <a\r\n *ngSwitchCase=\"'pdf'\"\r\n [href]=\"source\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open PDF — {{ getMediaLabel(field) }}\r\n </a>\r\n\r\n <a\r\n *ngSwitchCase=\"'file'\"\r\n [href]=\"source\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\">\r\n Open file — {{ getMediaLabel(field) }}\r\n </a>\r\n\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - fix: the placeholder comes through PlaceholderPipe (vlPlaceholder): empty when the project has\r\n// none, it showed \"undefined\"\r\nimport { NgIf } from '@angular/common';\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { AutoCompleteModule } from 'primeng/autocomplete';\r\nimport { SelectModule } from 'primeng/select';\r\nimport { PlaceholderPipe } from '../../pipes/placeholder.pipe';\r\n\r\n@Component({\r\n selector: 'vl-autocomplete',\r\n standalone: true,\r\n imports: [\r\n PlaceholderPipe,\r\n FormsModule,\r\n AutoCompleteModule,\r\n SelectModule,\r\n NgIf\r\n ],\r\n templateUrl: './autocomplete.html',\r\n styleUrl: './autocomplete.css',\r\n})\r\nexport class Autocomplete {\r\n @Input() formField: any;\r\n @Input() modalItemInfo: any;\r\n @Input() matchData: any;\r\n @Input() selectedLanguageInfo: any;\r\n @Input() errorMessages: any;\r\n @Output() autocompChange: EventEmitter<any> = new EventEmitter();\r\n @Output() autocompFocusOut: EventEmitter<any> = new EventEmitter();\r\n\r\n autocompChangeEvent(event: any, formField: any) {\r\n this.autocompChange.emit({ event: event, formField: formField });\r\n }\r\n\r\n autocompFocusOutEvent(event: any, formField: any) {\r\n this.autocompFocusOut.emit({ event: event, formField: formField });\r\n }\r\n\r\n getScope(scope: any) {\r\n let propertyScope = \"\";\r\n let start = scope?.indexOf(\"#/\") + 2;\r\n let end = scope?.indexOf(\"/\", start);\r\n if (start && end) {\r\n propertyScope = scope.substring(start, end);\r\n }\r\n return propertyScope;\r\n }\r\n\r\n getStyleWithoutClasses(styleObject: any) {\r\n if (!styleObject) {\r\n return { classes: '', style: {} };\r\n }\r\n const { classes, ...styleWithoutClasses } = styleObject;\r\n return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };\r\n }\r\n\r\n setErroMessage(formField: any, errorMessages: any, errorType: any) {\r\n let error: any = \"\";\r\n let fieldName: any = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;\r\n if (errorType == \"required\") {\r\n error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required\r\n }\r\n if (error && error.toString().includes(\"{{requiredLength}}\")) {\r\n error = error.replace(/{{\\s*requiredLength\\s*}}/g, formField?.minlength.toString());\r\n }\r\n return error.replace(/{{\\s*field\\s*}}/g, fieldName);\r\n }\r\n\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - fix: the placeholder comes from vlPlaceholder (pipes/placeholder.pipe.ts) - empty where the\r\n project defines none; it showed the text \"undefined\" -->\r\n<p-autoComplete #autocompleteField=\"ngModel\" [required]=\"formField.option.required\" [name]=\"formField.scope?.reference\"\r\n inputmode\r\n styleClass=\"custom-autocomplete\"\r\n [(ngModel)]=\"modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value\"\r\n [style]=\"getStyleWithoutClasses(formField?.scope?.style).style\" [class]=\"formField?.scope?.style?.classes ? formField?.scope?.style?.classes[0] : ''\"\r\n [suggestions]=\"matchData\" [dropdown]=\"true\" [optionLabel]=\"formField.option.autocomplete.response.label\"\r\n [placeholder]=\"modalItemInfo.propertySchema | vlPlaceholder: formField.scope?.reference\"\r\n (completeMethod)=\"autocompChangeEvent($event, formField)\" \r\n (ngModelChange)=\"autocompFocusOutEvent($event, formField)\"\r\n [attr.inputmode]=\"formField.option.keyboard === 'numeric' ? 'numeric' : null\">\r\n</p-autoComplete>\r\n\r\n<!-- Error Message -->\r\n<div *ngIf=\"autocompleteField?.touched && autocompleteField?.invalid\"\r\n [style]=\"getStyleWithoutClasses(formField?.validation?.style).style\">\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['required']\">\r\n {{setErroMessage(formField, errorMessages, \"required\")}}</p>\r\n <p class=\"text-danger\" *ngIf=\"autocompleteField?.errors?.['email']\">\r\n {{(formField.label?.value ?\r\n formField.label?.value :\r\n modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)\r\n +\r\n ' ' + errorMessages.pattern}}</p>\r\n</div>","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-button',\r\n standalone: true,\r\n templateUrl: './button.html',\r\n styleUrl: './button.css',\r\n})\r\nexport class Button {\r\n\r\n}\r\n","<p>button works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-date',\r\n standalone: true,\r\n templateUrl: './date.html',\r\n styleUrl: './date.css',\r\n})\r\nexport class Date {\r\n\r\n}\r\n","<p>date works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-dropdown',\r\n standalone: true,\r\n templateUrl: './dropdown.html',\r\n styleUrl: './dropdown.css',\r\n})\r\nexport class Dropdown {\r\n\r\n}\r\n","<p>dropdown works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-error-message',\r\n standalone: true,\r\n templateUrl: './error-message.html',\r\n styleUrl: './error-message.css',\r\n})\r\nexport class ErrorMessage {\r\n\r\n}\r\n","<p>error-message works!</p>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'vl-time',\r\n standalone: true,\r\n templateUrl: './time.html',\r\n styleUrl: './time.css',\r\n})\r\nexport class Time {\r\n\r\n}\r\n","<p>time works!</p>\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - new: one OpenID Connect flow for the devices, used by Keycloak and Okta alike. Both are OIDC with\r\n// PKCE; only issuer, client id and redirect differ, and the endpoints come from the issuer's\r\n// discovery document. Before, MobileKeycloakService and MobileOktaService each had their own\r\n// login, refresh and logout, and the logout behaved differently (Okta: white page, browser window)\r\nimport { Injectable } from '@angular/core';\r\nimport { OAuth2Client } from '@byteowls/capacitor-oauth2';\r\nimport { stagedRequest } from './request-timeout.service';\r\n\r\n/** What a project's login configuration has to say about its identity provider. */\r\nexport interface OidcProvider {\r\n /** e.g. https://keycloak-poc.wilken.de/realms/p5, https://integrator-1772139.okta.com/oauth2/default */\r\n issuer: string;\r\n clientId: string;\r\n redirectUri: string;\r\n /** Space separated string or array; default \"openid profile email\". */\r\n scope?: string | string[];\r\n /** Ask for offline_access (refresh token that outlives the browser session). */\r\n offlineAccess?: boolean;\r\n}\r\n\r\nexport interface OidcTokens {\r\n access_token: string;\r\n refresh_token?: string;\r\n id_token?: string;\r\n expires_in?: number;\r\n token_type?: string;\r\n issuer?: string;\r\n}\r\n\r\n/** Result of a refresh: new tokens, 'refused' (sign in again) or null (no answer - keep the sign-in). */\r\nexport type OidcRefresh = OidcTokens | 'refused' | null;\r\n\r\n/** Set by signOut: the next login asks for the password instead of reusing the provider session. */\r\nconst PROMPT_LOGIN_KEY = 'vl-oidc-prompt-login';\r\n/** Set by signOut when the project requires a login: the restarted app shows its loader (app.ts). */\r\nconst RELOGIN_KEY = 'vl-relogin';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MobileOidcService {\r\n private discoveries = new Map<string, Promise<any>>();\r\n\r\n /** The issuer's discovery document, fetched once per issuer. */\r\n discover(issuer: string): Promise<any> {\r\n const key = issuer.replace(/\\/+$/, '');\r\n\r\n if (!this.discoveries.has(key)) {\r\n const request = stagedRequest(signal => fetch(`${key}/.well-known/openid-configuration`, { signal }))\r\n .then(response => {\r\n if (!response.ok) {\r\n throw new Error(`OIDC discovery failed (${response.status})`);\r\n }\r\n return response.json();\r\n });\r\n // A failed discovery must not stay cached.\r\n request.catch(() => this.discoveries.delete(key));\r\n this.discoveries.set(key, request);\r\n }\r\n\r\n return this.discoveries.get(key)!;\r\n }\r\n\r\n /**\r\n * Signs in through the system browser (authorization code + PKCE). With offlineAccess the scope\r\n * gets offline_access; if the provider refuses it the login is repeated without it. After a\r\n * logout the provider is asked for the password again (prompt=login).\r\n */\r\n async login(provider: OidcProvider): Promise<OidcTokens | null> {\r\n const discovery = await this.discover(provider.issuer);\r\n const scope = this.scopeOf(provider.scope);\r\n const promptLogin = this.flag(PROMPT_LOGIN_KEY);\r\n\r\n const authenticate = (withScope: string) => OAuth2Client.authenticate({\r\n appId: provider.clientId,\r\n authorizationBaseUrl: discovery.authorization_endpoint,\r\n accessTokenEndpoint: discovery.token_endpoint,\r\n redirectUrl: provider.redirectUri,\r\n responseType: 'code',\r\n scope: withScope,\r\n pkceEnabled: true,\r\n logsEnabled: false,\r\n ...(promptLogin ? { additionalParameters: { prompt: 'login' } } : {})\r\n });\r\n\r\n let result: any;\r\n\r\n try {\r\n result = await authenticate(provider.offlineAccess ? this.withOfflineAccess(scope) : scope);\r\n } catch (error: any) {\r\n const cancelled = /USER_CANCELLED/i.test(String(error?.message ?? error));\r\n\r\n if (!provider.offlineAccess || cancelled) {\r\n throw error;\r\n }\r\n\r\n console.warn('Identity provider refused offline_access, signing in without it');\r\n result = await authenticate(scope);\r\n }\r\n\r\n this.setFlag(PROMPT_LOGIN_KEY, false);\r\n\r\n const response = result?.access_token_response ?? result;\r\n const accessToken = response?.access_token ?? result?.access_token;\r\n\r\n if (!accessToken) {\r\n return null;\r\n }\r\n\r\n return {\r\n access_token: accessToken,\r\n refresh_token: response?.refresh_token,\r\n id_token: response?.id_token,\r\n expires_in: response?.expires_in,\r\n token_type: response?.token_type,\r\n issuer: provider.issuer\r\n };\r\n }\r\n\r\n /** New tokens from the refresh token (grant_type=refresh_token, public client - no secret). */\r\n async refresh(provider: OidcProvider, stored: OidcTokens | any): Promise<OidcRefresh> {\r\n if (!stored?.refresh_token || !provider?.clientId) {\r\n return 'refused';\r\n }\r\n\r\n try {\r\n const discovery = await this.discover(stored.issuer || provider.issuer);\r\n const response = await stagedRequest(signal => fetch(discovery.token_endpoint, {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded', Accept: 'application/json' },\r\n body: new URLSearchParams({\r\n grant_type: 'refresh_token',\r\n refresh_token: stored.refresh_token,\r\n client_id: provider.clientId\r\n }).toString(),\r\n signal\r\n }));\r\n\r\n if (!response.ok) {\r\n // 400 invalid_grant: expired, rotated away or revoked.\r\n return 'refused';\r\n }\r\n\r\n const result: any = await response.json();\r\n\r\n if (!result?.access_token) {\r\n return 'refused';\r\n }\r\n\r\n return {\r\n access_token: result.access_token,\r\n // With token rotation the provider sends a new refresh token each time.\r\n refresh_token: result.refresh_token ?? stored.refresh_token,\r\n id_token: result.id_token ?? stored.id_token,\r\n expires_in: result.expires_in,\r\n token_type: result.token_type,\r\n issuer: stored.issuer || provider.issuer\r\n };\r\n } catch {\r\n console.warn('Token refresh not reachable');\r\n return null;\r\n }\r\n }\r\n\r\n /** The user's claims from the provider's userinfo endpoint; null when the token is refused. */\r\n async userInfo(provider: OidcProvider, accessToken: string): Promise<any | null> {\r\n const discovery = await this.discover(provider.issuer);\r\n const response = await stagedRequest(signal => fetch(discovery.userinfo_endpoint, {\r\n headers: { Authorization: `Bearer ${accessToken}`, Accept: 'application/json' },\r\n signal\r\n }));\r\n\r\n return response.ok ? response.json() : null;\r\n }\r\n\r\n /**\r\n * The same logout for every provider, without a browser window: the provider session is ended\r\n * where the provider allows it from the app (Keycloak: logout endpoint with the refresh token),\r\n * refresh and access token are revoked, the saved sign-in is removed and the app restarts. The\r\n * next login asks for the password. When the project requires a login, the restarted app shows\r\n * its loader until the sign-in window opens.\r\n */\r\n async signOut(\r\n provider: OidcProvider | null,\r\n stored: OidcTokens | any,\r\n storageKey: string,\r\n removeStored: (key: string) => Promise<void>,\r\n options: { loginRequired: boolean }\r\n ): Promise<void> {\r\n this.setFlag(PROMPT_LOGIN_KEY, true);\r\n\r\n if (provider?.clientId && (stored?.refresh_token || stored?.access_token)) {\r\n try {\r\n const discovery = await this.discover(stored?.issuer || provider.issuer);\r\n\r\n // Back-channel end of the session; providers without it (Okta) simply refuse - ignored.\r\n if (discovery.end_session_endpoint && stored?.refresh_token) {\r\n await this.post(discovery.end_session_endpoint, {\r\n client_id: provider.clientId,\r\n refresh_token: stored.refresh_token\r\n });\r\n }\r\n\r\n if (discovery.revocation_endpoint) {\r\n if (stored?.refresh_token) {\r\n await this.post(discovery.revocation_endpoint, {\r\n client_id: provider.clientId, token: stored.refresh_token, token_type_hint: 'refresh_token'\r\n });\r\n }\r\n if (stored?.access_token) {\r\n await this.post(discovery.revocation_endpoint, {\r\n client_id: provider.clientId, token: stored.access_token, token_type_hint: 'access_token'\r\n });\r\n }\r\n }\r\n } catch {\r\n console.warn('Identity provider not reachable, signing out locally');\r\n }\r\n }\r\n\r\n await removeStored(storageKey);\r\n this.setFlag(RELOGIN_KEY, options.loginRequired);\r\n window.location.reload();\r\n }\r\n\r\n /** Scope as the space separated string the OAuth2 plugin expects. */\r\n scopeOf(scope: string | string[] | undefined): string {\r\n const value = Array.isArray(scope) ? scope.join(' ') : scope;\r\n return value?.trim() || 'openid profile email';\r\n }\r\n\r\n private withOfflineAccess(scope: string): string {\r\n const parts = scope.split(/\\s+/).filter(Boolean);\r\n if (!parts.includes('offline_access')) {\r\n parts.push('offline_access');\r\n }\r\n return parts.join(' ');\r\n }\r\n\r\n private async post(url: string, fields: Record<string, string>): Promise<void> {\r\n try {\r\n const response = await stagedRequest(signal => fetch(url, {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n body: new URLSearchParams(fields).toString(),\r\n signal\r\n }));\r\n if (!response.ok) {\r\n console.warn('Logout request refused', response.status);\r\n }\r\n } catch {\r\n console.warn('Logout request not reachable');\r\n }\r\n }\r\n\r\n private flag(key: string): boolean {\r\n try {\r\n return localStorage.getItem(key) === '1';\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n private setFlag(key: string, on: boolean): void {\r\n try {\r\n on ? localStorage.setItem(key, '1') : localStorage.removeItem(key);\r\n } catch {\r\n // Storage not available - the flag is a convenience only.\r\n }\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - change: login, refresh and logout run through MobileOidcService - the same OpenID Connect flow\r\n// as Okta. The logout additionally revokes the tokens and makes the next login ask for the\r\n// password; the Keycloak session is still ended through the logout endpoint\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: the Keycloak requests (discovery, token refresh, logout) run under the waiting rule\r\n// - new: logout marks the restart (localStorage vl-relogin); the app shows its loader until the\r\n// sign-in window opens\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// - fix: logout ends the Keycloak session with a direct request instead of the end-session page in\r\n// an in-app browser. That window stayed empty after the redirect and did not close, and closing it\r\n// cancelled the sign-in the reloaded app had started (\"The sign-in was cancelled\")\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: refreshTokens. The refresh token was stored after the login but never used, so an expired\r\n// access token always meant a new login. It now asks Keycloak for new tokens first; only when the\r\n// refresh token has expired too the user has to sign in again\r\n// - new: login asks for offline_access when login.mobile.offlineAccess is set, and signs in without\r\n// it if Keycloak refuses the scope\r\n// - change: the login no longer writes the token response and the user claims (which include\r\n// password fields) to the console, and it awaits storing the tokens before reloading; the logout\r\n// URL (it carries the id token) is not logged either\r\nimport { Injectable } from '@angular/core';\r\nimport { ConfigService } from './config.service';\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { App } from '@capacitor/app';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { UtilityService } from './utility.service';\r\nimport { isNativeMobile } from './native-platform';\r\nimport { stagedRequest } from './request-timeout.service';\r\nimport { MobileOidcService, OidcProvider } from './mobile-oidc.service';\r\n\r\n\r\nexport interface MobileAuthTokens {\r\n access_token: string;\r\n refresh_token?: string;\r\n id_token?: string;\r\n expires_in?: number;\r\n token_type?: string;\r\n}\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MobileKeycloakService {\r\n\r\n private tokens: MobileAuthTokens | any = null;\r\n constructor(private config: ConfigService, private http: HttpClient, private utilityService: UtilityService, private platform: Platform, private oidc: MobileOidcService) {\r\n if (Capacitor.isNativePlatform()) {\r\n App.addListener('appUrlOpen', async (url: any) => {\r\n // Nothing to do here; capacitor-oauth2 resolves internally.\r\n // Keep listener to satisfy deep link expectations.\r\n });\r\n }\r\n }\r\n\r\n /** The Keycloak realm as an OIDC provider, from login.mobile of the project. */\r\n private provider(): OidcProvider {\r\n const cfg: any = this.config.getKeycloakMobileConfig();\r\n return {\r\n issuer: cfg?.issuer,\r\n clientId: cfg?.clientId,\r\n redirectUri: cfg?.redirectUri,\r\n scope: cfg?.scope,\r\n // login.mobile.offlineAccess: the sign-in lasts as long as the app is used at least once per\r\n // \"Offline Session Idle\" (30 days in realm p5) instead of the 5 days of a normal refresh token\r\n offlineAccess: cfg?.offlineAccess === true\r\n };\r\n }\r\n\r\n async login(): Promise<any> {\r\n if (!Capacitor.isNativePlatform()) return null;\r\n const cfg: any = this.config.getKeycloakMobileConfig();\r\n const tokens = await this.oidc.login(this.provider());\r\n if (!tokens) return '';\r\n this.tokens = { ...tokens };\r\n let keycloakLoginUser = \"\";\r\n if (this.tokens.access_token) {\r\n keycloakLoginUser = await this.getUserInfo(this.tokens.access_token, cfg.issuer);\r\n if (keycloakLoginUser) {\r\n this.tokens['issuer'] = cfg.issuer;\r\n // Awaited: the reload below must not cut off the (asynchronous) keychain write.\r\n await this.utilityService.setLocalStorage(\"KeycloakInfo\", this.tokens);\r\n if (isNativeMobile()) {\r\n window.location.reload();\r\n }\r\n }\r\n }\r\n return keycloakLoginUser;\r\n }\r\n\r\n async refreshTokens(stored: MobileAuthTokens | any): Promise<any | null> {\r\n const result = await this.oidc.refresh(this.provider(), stored);\r\n if (!result || result === 'refused') {\r\n return null;\r\n }\r\n this.tokens = { ...result, issuer: stored?.issuer || result.issuer };\r\n return this.tokens;\r\n }\r\n\r\n async getUserInfo(accessToken: any, issuer: any): Promise<any> {\r\n try {\r\n const headers = new HttpHeaders({\r\n Authorization: `Bearer ${accessToken}`,\r\n });\r\n const url = `${issuer}/protocol/openid-connect/userinfo`;\r\n return await this.http.get(url, { headers }).toPromise();\r\n } catch (err) {\r\n console.error('Error fetching user info:', err);\r\n throw err;\r\n }\r\n }\r\n\r\n getAccessToken(): string | null {\r\n return this.tokens?.access_token ?? null;\r\n }\r\n\r\n getRefreshToken(): string | null {\r\n return this.tokens?.refresh_token ?? null;\r\n }\r\n\r\n /**\r\n * Ends the Keycloak session without a browser window: the refresh token goes to the logout\r\n * endpoint directly (allowed for public clients). The browser variant left an empty in-app window\r\n * that did not close, and its close button cancelled the new sign-in started behind it. The local\r\n * sign-in is removed in any case - without network the session simply runs out at Keycloak.\r\n */\r\n async logout(): Promise<void> {\r\n const keycloakInfo: any = await this.utilityService.getLocalStorage('KeycloakInfo');\r\n const tokens = keycloakInfo?.keycloakInfo ?? keycloakInfo;\r\n this.tokens = null;\r\n\r\n // Keycloak projects require a login: the restarted app shows its loader until the sign-in opens.\r\n await this.oidc.signOut(this.provider(), tokens, 'KeycloakInfo',\r\n key => this.utilityService.removeLocalStorage(key), { loginRequired: true });\r\n }\r\n\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-16\r\n// - fix: the menu closes after a pagination choice too (it stayed open, unlike after a language)\r\n// - change: the menu starts closed and closes after a choice wherever the app behaves like on a device\r\n// (toolkitKeyboardActive - also the Designer preview with Mobile/Tablet, the tablet too, wider than\r\n// 768 px); sign-in stays native-only\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: activeLanguage, the language file in use (\"de.json\"); its menu entry gets a check mark\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - change: choosing a language closes the menu on phone and tablet (mobile mode)\r\n// - fix: the language flags load whatever language the menu is in (found by option.changeLang,\r\n// not by the captions \"Setting\" / \"Languages\" - in German they were missing)\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\n// - fix: the logout button in the profile came and went: it was taken from the menu items when the\r\n// sign-in was set, and was missing for good when the items arrived later (after a project\r\n// change). It is looked up again when the items arrive, and in submenus too\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: menu items that arrive after the language was loaded are translated too; with the\r\n// Face ID lock the items came later and the menu stayed English\r\n// - new: languageChange carries languageCode next to the translations. The custom keyboards\r\n// need the language to show its letters (ä ö ü ß for German); the translation file alone\r\n// does not say which language it is\r\n// Shuaib 2026-09-24\r\n// - new: derive the signed-in user from a JWT for jwtToken projects.\r\n// - change: pass the selected project's Okta issuer to getLoginUser.\r\n// - change: clear the displayed login state when the token or authentication state is invalid.\r\nimport { Platform, PlatformModule } from '@angular/cdk/platform';\r\nimport { CommonModule } from '@angular/common';\r\nimport {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Injector,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\n\r\nimport { Device } from '@capacitor/device';\r\nimport {\r\n OKTA_AUTH,\r\n OktaAuthStateService\r\n} from '@okta/okta-angular';\r\nimport { jwtDecode } from 'jwt-decode';\r\nimport {\r\n de_DE,\r\n en_US,\r\n NzI18nService\r\n} from 'ng-zorro-antd/i18n';\r\nimport { NzButtonModule } from 'ng-zorro-antd/button';\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzMenuModule } from 'ng-zorro-antd/menu';\r\nimport { NzTooltipModule } from 'ng-zorro-antd/tooltip';\r\nimport { OAuthService } from 'angular-oauth2-oidc';\r\nimport {\r\n DialogService,\r\n DynamicDialogModule\r\n} from 'primeng/dynamicdialog';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { LogsComponent } from '../logs/logs.component';\r\nimport { Couchdb } from '../../services/couchdb';\r\nimport { MobileKeycloakService } from '../../services/mobile-keycloak.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { RequestService } from '../../services/request.service';\r\nimport { UtilityService } from '../../services/utility.service';\r\nimport { isNativeMobile } from '../../services/native-platform';\r\nimport { toolkitKeyboardActive } from '../../components/custom-keyboard/toolkit-keyboard-mode';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'vl-side-menu',\r\n templateUrl: './side-menu.component.html',\r\n styleUrl: './side-menu.component.css',\r\n imports: [\r\n CommonModule,\r\n PlatformModule,\r\n\r\n // NG-ZORRO\r\n NzMenuModule,\r\n NzIconModule,\r\n NzTooltipModule,\r\n NzButtonModule,\r\n\r\n // PrimeNG\r\n DynamicDialogModule\r\n ]\r\n})\r\nexport class SideMenuComponent\r\n implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n isCollapsed = false;\r\n isMobile = false;\r\n projectsLayoutSchema: any;\r\n loginUser: any = {};\r\n isLogined = false;\r\n loginedUserInfo: any = {};\r\n menuItemsCopy: any[] = [];\r\n settingMenu: any = {};\r\n setLanguage = false;\r\n /** Translations of the last language change, for menu items that arrive after it. */\r\n private lastMenuTranslations: Record<string, string> | null = null;\r\n tenantKey = '';\r\n scrollPagination: any = false\r\n\r\n private oktaAuthStateSubscription?: Subscription;\r\n private mobileLoginSubscription?: Subscription;\r\n private mobileLoginRequestInProgress = false;\r\n private currentMobileLoginToken?: string;\r\n\r\n @Input() menuItems: any[] = [];\r\n @Input() userInfo: any = {};\r\n @Input() settings: any = {};\r\n @Input() projects: any;\r\n @Input() tenantName: any;\r\n @Input() environment: any;\r\n @Input() projectSeleted: any;\r\n @Input() appVersionInfo: any;\r\n\r\n @Output() languageChange = new EventEmitter<any>();\r\n @Output() invokeMenu = new EventEmitter<any>();\r\n @Output() menuToggle = new EventEmitter<any>();\r\n @Output() invokeProject = new EventEmitter<any>();\r\n @Output() errorMessage = new EventEmitter<any>();\r\n @Output() deleteProject = new EventEmitter<any>();\r\n @Output() paginationType = new EventEmitter<any>();\r\n\r\n /** The language file in use (\"de.json\"); its menu entry has a check mark. */\r\n activeLanguage: string | null = null;\r\n\r\n @ViewChild('sideMenu', { static: true })\r\n sideMenu!: ElementRef<HTMLElement>;\r\n\r\n readonly PRIME_DE = {\r\n firstDayOfWeek: 1,\r\n dayNames: [\r\n 'Sonntag',\r\n 'Montag',\r\n 'Dienstag',\r\n 'Mittwoch',\r\n 'Donnerstag',\r\n 'Freitag',\r\n 'Samstag'\r\n ],\r\n dayNamesShort: [\r\n 'So',\r\n 'Mo',\r\n 'Di',\r\n 'Mi',\r\n 'Do',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n dayNamesMin: [\r\n 'So',\r\n 'Mo',\r\n 'Di',\r\n 'Mi',\r\n 'Do',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n monthNames: [\r\n 'Januar',\r\n 'Februar',\r\n 'März',\r\n 'April',\r\n 'Mai',\r\n 'Juni',\r\n 'Juli',\r\n 'August',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Dezember'\r\n ],\r\n monthNamesShort: [\r\n 'Jan',\r\n 'Feb',\r\n 'Mär',\r\n 'Apr',\r\n 'Mai',\r\n 'Jun',\r\n 'Jul',\r\n 'Aug',\r\n 'Sep',\r\n 'Okt',\r\n 'Nov',\r\n 'Dez'\r\n ],\r\n today: 'Heute',\r\n clear: 'Löschen',\r\n dateFormat: 'yy-mm-dd',\r\n weekHeader: 'KW'\r\n };\r\n\r\n readonly PRIME_EN = {\r\n firstDayOfWeek: 0,\r\n dayNames: [\r\n 'Sunday',\r\n 'Monday',\r\n 'Tuesday',\r\n 'Wednesday',\r\n 'Thursday',\r\n 'Friday',\r\n 'Saturday'\r\n ],\r\n dayNamesShort: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n dayNamesMin: [\r\n 'Su',\r\n 'Mo',\r\n 'Tu',\r\n 'We',\r\n 'Th',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n monthNames: [\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December'\r\n ],\r\n monthNamesShort: [\r\n 'Jan',\r\n 'Feb',\r\n 'Mar',\r\n 'Apr',\r\n 'May',\r\n 'Jun',\r\n 'Jul',\r\n 'Aug',\r\n 'Sep',\r\n 'Oct',\r\n 'Nov',\r\n 'Dec'\r\n ],\r\n today: 'Today',\r\n clear: 'Clear',\r\n dateFormat: 'yy-mm-dd',\r\n weekHeader: 'Wk'\r\n };\r\n\r\n constructor(\r\n private i18n: NzI18nService,\r\n private mobileKeycloakService: MobileKeycloakService,\r\n private couchdbService: Couchdb,\r\n private oauthService: OAuthService,\r\n private platform: Platform,\r\n private requestService: RequestService,\r\n private utilityService: UtilityService,\r\n private dialogService: DialogService,\r\n private notificationService: NotificationService,\r\n private injector: Injector\r\n ) { }\r\n\r\n async ngOnInit(): Promise<void> {\r\n this.getPaginationType();\r\n // closed at the start and closing after a choice: on the devices and in the Designer preview\r\n // with \"Mobile\"/\"Tablet\" (toolkitKeyboardActive), so the preview behaves like the app\r\n if (toolkitKeyboardActive()) {\r\n this.isCollapsed = true;\r\n this.isMobile = true;\r\n }\r\n if (this.isNativeMobile()) {\r\n this.tenantKey =\r\n await this.utilityService.getLocalStorage('tenantKey') ?? '';\r\n } else {\r\n this.tenantKey =\r\n await this.utilityService.getStorage('tenantKey') ?? '';\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (\r\n changes['environment'] ||\r\n changes['userInfo'] ||\r\n changes['projectSeleted']\r\n ) {\r\n void this.setLoginUser();\r\n }\r\n\r\n if (\r\n changes['projects'] ||\r\n changes['projectSeleted']\r\n ) {\r\n this.initializeProjects();\r\n }\r\n\r\n if (\r\n changes['menuItems'] &&\r\n this.menuItems?.length\r\n ) {\r\n this.menuItemsCopy =\r\n JSON.parse(JSON.stringify(this.menuItems));\r\n\r\n /*\r\n * The language can be loaded before the menu items arrive - e.g. while the app waits for\r\n * Face ID - and then had nothing to translate: the menu stayed English while the forms\r\n * were German. Apply the last loaded language to items that come later.\r\n */\r\n if (this.lastMenuTranslations) {\r\n this.applyMenuTranslations(this.lastMenuTranslations);\r\n }\r\n\r\n // The sign-in can be known before the menu items arrive; the logout button in the profile\r\n // is taken from them, so it is looked up again now.\r\n if (this.loginUser?.name) {\r\n this.setLoginedUser(this.loginUser);\r\n }\r\n\r\n void this.setProjectSetting();\r\n }\r\n\r\n if (\r\n changes['settings'] ||\r\n changes['tenantName'] ||\r\n changes['projectSeleted']\r\n ) {\r\n void this.setSettingImages();\r\n }\r\n }\r\n\r\n async getPaginationType() {\r\n if (isNativeMobile()) {\r\n this.scrollPagination = await this.utilityService.getLocalStorage('scrollPagination')\r\n } else {\r\n this.scrollPagination = await this.utilityService.getStorage('scrollPagination');\r\n }\r\n }\r\n\r\n async ngAfterViewInit(): Promise<void> {\r\n this.initializeProjects();\r\n\r\n if (!this.isNativeMobile()) {\r\n return;\r\n }\r\n\r\n try {\r\n const deviceLanguage = await this.getDeviceLanguage();\r\n\r\n const supportedLanguage =\r\n deviceLanguage === 'de' ? 'de' : 'en';\r\n\r\n await this.changeLanguage(\r\n `${supportedLanguage}.json`\r\n );\r\n } catch (error) {\r\n console.error(\r\n 'Failed to load device language:',\r\n error\r\n );\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroyOktaSubscription();\r\n this.destroyMobileLoginSubscription();\r\n }\r\n\r\n /**\r\n * Mobile menu (overlay when open, no width when closed, styles under :host(.sidemenu-mobile)):\r\n * the app on iOS and Android - phones and tablets - and small browser windows.\r\n */\r\n @HostBinding('class.sidemenu-mobile')\r\n mobileMode = this.computeMobileMode();\r\n\r\n @HostListener('window:resize')\r\n onResizeMobileMode(): void {\r\n this.mobileMode = this.computeMobileMode();\r\n }\r\n\r\n private computeMobileMode(): boolean {\r\n return (\r\n toolkitKeyboardActive() ||\r\n (typeof window !== 'undefined' &&\r\n window.matchMedia('(max-width: 768px), (max-height: 500px)').matches)\r\n );\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onDocumentClick(event: MouseEvent): void {\r\n const path =\r\n event.composedPath() as HTMLElement[];\r\n\r\n const clickedInsideMenu =\r\n path.some(\r\n element =>\r\n element === this.sideMenu?.nativeElement\r\n );\r\n\r\n const clickedToggle =\r\n path.some(\r\n element =>\r\n element instanceof HTMLElement &&\r\n element.classList?.contains(\r\n 'side-toggle-handle'\r\n )\r\n );\r\n\r\n if (\r\n !clickedInsideMenu &&\r\n !clickedToggle &&\r\n this.isMobile\r\n ) {\r\n const button =\r\n document.getElementById('toggle-id');\r\n\r\n if (\r\n button &&\r\n !this.isCollapsed\r\n ) {\r\n button.click();\r\n }\r\n }\r\n }\r\n\r\n toggleCollapsed(): void {\r\n this.isCollapsed = !this.isCollapsed;\r\n\r\n if (!this.isMobile) {\r\n return;\r\n }\r\n\r\n const sideMenu =\r\n document.querySelector('.side-menu');\r\n\r\n sideMenu?.classList.toggle(\r\n 'open',\r\n !this.isCollapsed\r\n );\r\n }\r\n\r\n private isNativeMobile(): boolean {\r\n return isNativeMobile();\r\n }\r\n\r\n async getDeviceLanguage(): Promise<string> {\r\n const info =\r\n await Device.getLanguageCode();\r\n\r\n return info.value;\r\n }\r\n\r\n async setLoginUser(): Promise<void> {\r\n try {\r\n const loginType =\r\n this.environment?.login?.type;\r\n\r\n if (!loginType) {\r\n return;\r\n }\r\n\r\n if (loginType === 'oktaAuth') {\r\n if (this.isNativeMobile()) {\r\n await this.initializeMobileOktaUser();\r\n } else {\r\n this.initializeWebOktaUser();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // The current project is not an Okta project.\r\n this.destroyOktaSubscription();\r\n this.destroyMobileLoginSubscription();\r\n\r\n if (\r\n loginType === 'jwtToken' &&\r\n this.userInfo?.jwt\r\n ) {\r\n const decodedUser =\r\n this.getUserInfoFromToken(\r\n this.userInfo.jwt\r\n );\r\n\r\n if (decodedUser) {\r\n this.setLoginedUser(decodedUser);\r\n } else {\r\n this.clearLoginUser();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if (\r\n loginType === 'keycloak' &&\r\n this.userInfo?.name\r\n ) {\r\n this.setLoginedUser(this.userInfo);\r\n return;\r\n }\r\n\r\n this.clearLoginUser();\r\n } catch (error) {\r\n console.error(\r\n 'Error while setting logged-in user:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n }\r\n\r\n private async initializeMobileOktaUser(): Promise<void> {\r\n const logined: any =\r\n await this.utilityService.getLocalStorage(\r\n 'loginedUser'\r\n );\r\n\r\n if (!logined?.token) {\r\n this.destroyMobileLoginSubscription();\r\n this.clearLoginUser();\r\n return;\r\n }\r\n\r\n if (\r\n this.mobileLoginRequestInProgress &&\r\n this.currentMobileLoginToken ===\r\n logined.token\r\n ) {\r\n return;\r\n }\r\n\r\n if (\r\n this.currentMobileLoginToken ===\r\n logined.token &&\r\n this.loginUser?.name\r\n ) {\r\n return;\r\n }\r\n\r\n this.destroyMobileLoginSubscription();\r\n\r\n this.currentMobileLoginToken =\r\n logined.token;\r\n\r\n this.mobileLoginRequestInProgress = true;\r\n\r\n this.mobileLoginSubscription =\r\n this.requestService\r\n .getLoginUser(\r\n logined.token,\r\n this.environment?.login?.mobile?.issuer || this.environment?.login?.web?.issuer\r\n )\r\n .subscribe({\r\n next: (userInfo: any) => {\r\n this.mobileLoginRequestInProgress =\r\n false;\r\n\r\n this.setLoginedUser({\r\n ...this.userInfo,\r\n ...userInfo,\r\n ...logined\r\n });\r\n },\r\n error: (error) => {\r\n this.mobileLoginRequestInProgress =\r\n false;\r\n\r\n console.error(\r\n 'Failed to fetch the mobile Okta user:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n });\r\n }\r\n\r\n private initializeWebOktaUser(): void {\r\n if (this.oktaAuthStateSubscription) {\r\n return;\r\n }\r\n\r\n try {\r\n /*\r\n * Okta dependencies are resolved only when this is\r\n * an Okta project running in the web application.\r\n *\r\n * Keycloak projects will never request OKTA_AUTH.\r\n */\r\n const oktaAuthStateService =\r\n this.injector.get(\r\n OktaAuthStateService\r\n );\r\n\r\n const oktaAuth: any =\r\n this.injector.get(OKTA_AUTH);\r\n\r\n this.oktaAuthStateSubscription =\r\n oktaAuthStateService.authState$\r\n .subscribe({\r\n next: async authState => {\r\n if (!authState.isAuthenticated) {\r\n this.clearLoginUser();\r\n return;\r\n }\r\n\r\n try {\r\n const oktaWebUser =\r\n await oktaAuth.getUser();\r\n\r\n this.setLoginedUser({\r\n ...this.userInfo,\r\n ...oktaWebUser\r\n });\r\n } catch (error) {\r\n console.error(\r\n 'Failed to fetch the web Okta user:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n },\r\n error: error => {\r\n console.error(\r\n 'Okta authentication state error:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n });\r\n } catch (error) {\r\n console.error(\r\n 'Failed to initialize web Okta authentication:',\r\n error\r\n );\r\n\r\n this.clearLoginUser();\r\n }\r\n }\r\n\r\n private destroyOktaSubscription(): void {\r\n this.oktaAuthStateSubscription?.unsubscribe();\r\n this.oktaAuthStateSubscription = undefined;\r\n }\r\n\r\n private destroyMobileLoginSubscription(): void {\r\n this.mobileLoginSubscription?.unsubscribe();\r\n this.mobileLoginSubscription = undefined;\r\n this.mobileLoginRequestInProgress = false;\r\n this.currentMobileLoginToken = undefined;\r\n }\r\n\r\n private clearLoginUser(): void {\r\n this.loginUser = {};\r\n this.loginedUserInfo = {};\r\n this.isLogined = false;\r\n }\r\n\r\n getUserInfoFromToken(token: string): any | null {\r\n try {\r\n const decoded: any =\r\n jwtDecode(token);\r\n\r\n return {\r\n sub: decoded.sub,\r\n name:\r\n decoded.name ??\r\n 'User is undefined',\r\n role:\r\n decoded.role ??\r\n 'Role is undefined',\r\n email:\r\n decoded.email ??\r\n decoded.sub,\r\n iat: decoded.iat,\r\n exp: decoded.exp\r\n };\r\n } catch (error) {\r\n console.error(\r\n 'Failed to decode JWT:',\r\n error\r\n );\r\n\r\n return null;\r\n }\r\n }\r\n\r\n setLoginedUser(user: any): void {\r\n if (!user?.name) {\r\n this.clearLoginUser();\r\n return;\r\n }\r\n\r\n const logoutMenu = this.findLogoutMenu(this.menuItems);\r\n\r\n this.loginUser = {\r\n ...user\r\n };\r\n\r\n this.loginedUserInfo = {\r\n ...user,\r\n image: 'user.png',\r\n ...(logoutMenu\r\n ? { actions: [logoutMenu] }\r\n : {})\r\n };\r\n\r\n this.isLogined = true;\r\n }\r\n\r\n /** The menu entry with action 'logout', at any depth of the menu. */\r\n private findLogoutMenu(items: any[] | undefined): any {\r\n for (const item of items ?? []) {\r\n if (item?.option?.action === 'logout') {\r\n return item;\r\n }\r\n\r\n const inSubmenu = this.findLogoutMenu(item?.submenu);\r\n\r\n if (inSubmenu) {\r\n return inSubmenu;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n initializeProjects(): void {\r\n this.projectsLayoutSchema =\r\n this.projects;\r\n }\r\n\r\n async setProjectSetting(): Promise<void> {\r\n if (!this.menuItems?.length) {\r\n return;\r\n }\r\n\r\n // Language entries are found by what they do (option.changeLang), at any depth: looked up by\r\n // the captions \"Setting\" / \"Languages\" they were missed once the menu was translated, and the\r\n // flags never loaded.\r\n const tasks: Promise<void>[] = [];\r\n const visit = (items: any[] | undefined): void => {\r\n for (const item of items ?? []) {\r\n if (item?.option?.changeLang && item.icon && !this.isUrl(item.icon)) {\r\n tasks.push(this.setLanguageMenuImage(item));\r\n }\r\n\r\n visit(item?.submenu);\r\n }\r\n };\r\n\r\n visit(this.menuItems);\r\n await Promise.all(tasks);\r\n }\r\n\r\n private async setLanguageMenuImage(\r\n childMenu: any\r\n ): Promise<void> {\r\n try {\r\n if (\r\n !this.tenantName ||\r\n !this.projectSeleted ||\r\n !childMenu?.icon\r\n ) {\r\n return;\r\n }\r\n\r\n const projectName =\r\n `${this.tenantName}_${this.projectSeleted}`;\r\n\r\n const imagePath =\r\n `Media/${childMenu.icon}`;\r\n\r\n const image =\r\n await this.couchdbService\r\n .getFileContentFromCouchDb(\r\n projectName,\r\n imagePath\r\n );\r\n\r\n const imageSource =\r\n this.getMediaSrc(image);\r\n\r\n if (imageSource) {\r\n childMenu.icon = imageSource;\r\n }\r\n } catch (error) {\r\n console.error(\r\n 'Failed to load language icon:',\r\n error\r\n );\r\n }\r\n }\r\n\r\n async setSettingImages(): Promise<void> {\r\n if (!this.settings) {\r\n this.settingMenu = {};\r\n return;\r\n }\r\n\r\n this.settingMenu =\r\n JSON.parse(JSON.stringify(this.settings));\r\n\r\n if (!this.settings?.submenu?.length) {\r\n return;\r\n }\r\n\r\n const tasks: Promise<void>[] = [];\r\n\r\n for (const menu of this.settings.submenu) {\r\n if (!menu?.submenu?.length) {\r\n continue;\r\n }\r\n\r\n for (const childMenu of menu.submenu) {\r\n if (\r\n childMenu?.option?.changeProject\r\n ) {\r\n tasks.push(\r\n this.setProjectMenuImage(childMenu)\r\n );\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(tasks);\r\n\r\n this.settingMenu =\r\n JSON.parse(JSON.stringify(this.settings));\r\n }\r\n\r\n private async setProjectMenuImage(\r\n childMenu: any\r\n ): Promise<void> {\r\n try {\r\n if (\r\n !this.tenantName ||\r\n !childMenu?.id ||\r\n !childMenu?.icon\r\n ) {\r\n return;\r\n }\r\n\r\n const projectName =\r\n `${this.tenantName}_${childMenu.id}`;\r\n\r\n const imagePath =\r\n `Media/${childMenu.icon}`;\r\n\r\n const image =\r\n await this.couchdbService\r\n .getFileContentFromCouchDb(\r\n projectName,\r\n imagePath\r\n );\r\n\r\n const imageSource =\r\n this.getMediaSrc(image);\r\n\r\n if (imageSource) {\r\n childMenu.icon = imageSource;\r\n }\r\n } catch (error) {\r\n console.error(\r\n 'Failed to load project icon:',\r\n error\r\n );\r\n }\r\n }\r\n\r\n getMediaSrc(file: any): string {\r\n if (!file) {\r\n return '';\r\n }\r\n\r\n if (file.src) {\r\n return file.src;\r\n }\r\n\r\n if (file.base64) {\r\n const mimeType =\r\n file.mimeType || 'image/png';\r\n\r\n return (\r\n `data:${mimeType};base64,` +\r\n file.base64\r\n );\r\n }\r\n\r\n if (file.dataUrl) {\r\n return file.dataUrl;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n isUrl(value: string): boolean {\r\n if (!value) {\r\n return false;\r\n }\r\n\r\n return (\r\n /^https?:\\/\\//.test(value) ||\r\n value.startsWith('blob:') ||\r\n value.startsWith('data:')\r\n );\r\n }\r\n\r\n async invokeNavigate(\r\n menu: any,\r\n parentMenu?: any\r\n ): Promise<void> {\r\n const option = menu?.option;\r\n\r\n if (!option) {\r\n return;\r\n }\r\n\r\n // Pagination chosen: like the language and any other entry, the menu closes on phone and tablet\r\n if (option.scrollPagination || option.numberedPagination) {\r\n if (this.mobileMode && !this.isCollapsed) {\r\n this.toggleCollapsed();\r\n }\r\n }\r\n\r\n if (option.scrollPagination) {\r\n this.scrollPagination = true;\r\n this.paginationType.emit({ scroll: true });\r\n return;\r\n }\r\n\r\n if (option.numberedPagination) {\r\n this.scrollPagination = false;\r\n this.paginationType.emit({ scroll: false });\r\n return;\r\n }\r\n\r\n if (option?.switchTenant) {\r\n if (isNativeMobile()) {\r\n await this.utilityService.removeLocalStorage('tenantKey')\r\n await this.utilityService.removeLocalStorage('selectedProject')\r\n } else {\r\n await this.utilityService.removeStorage('tenantKey');\r\n await this.utilityService.removeStorage('selectedProject');\r\n }\r\n window.location.reload();\r\n return;\r\n }\r\n\r\n if (option.showAllProjects) {\r\n await this.utilityService.showAllProjects();\r\n return;\r\n }\r\n\r\n if (option.changeLang) {\r\n // On the phone and tablet the menu closes once a language is chosen, like after any other\r\n // entry; left open it had to be closed with the tab, and that tap closed the keyboard of the\r\n // dialog field the language change had just reopened.\r\n if (this.mobileMode && !this.isCollapsed) {\r\n this.toggleCollapsed();\r\n }\r\n\r\n await this.changeLanguage(\r\n option.data_url\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (option.changeProject) {\r\n this.navigateToProject(menu);\r\n return;\r\n }\r\n\r\n if (option.logs) {\r\n this.openLogsTable();\r\n return;\r\n }\r\n\r\n if (option.terms) {\r\n this.notificationService.info(\r\n 'Term Not Apply'\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (option.projectPrivacy) {\r\n this.notificationService.warning(\r\n 'Project Privacy Not Apply'\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (option.projectVersion) {\r\n this.notificationService.warning(\r\n 'Project Version Not Apply'\r\n );\r\n\r\n return;\r\n }\r\n\r\n if (\r\n option.action === 'login' &&\r\n this.environment?.login?.type ===\r\n 'keycloak'\r\n ) {\r\n if (this.isNativeMobile()) {\r\n await this.mobileKeycloakService.login();\r\n } else {\r\n this.oauthService.initLoginFlow();\r\n }\r\n\r\n return;\r\n }\r\n\r\n this.toggleCollapsed();\r\n this.invokeMenu.emit(menu);\r\n }\r\n\r\n openLogsTable(): void {\r\n // this.dialogService.open(\r\n // LogsComponent,\r\n // {\r\n // width: '700px',\r\n // data: {}\r\n // }\r\n // );\r\n }\r\n\r\n deleteMenuItem(\r\n subChild: any,\r\n index: number,\r\n event: Event\r\n ): void {\r\n event.stopPropagation();\r\n\r\n const projectMenu =\r\n this.settings?.submenu?.[2]?.submenu;\r\n\r\n if (\r\n Array.isArray(projectMenu) &&\r\n index >= 0 &&\r\n index < projectMenu.length\r\n ) {\r\n projectMenu.splice(index, 1);\r\n }\r\n\r\n this.deleteProject.emit(subChild);\r\n }\r\n\r\n navigateToProject(project: any): void {\r\n this.invokeProject.emit(project);\r\n }\r\n\r\n async changeLanguage(lang: string): Promise<void> {\r\n if (\r\n !lang ||\r\n !this.tenantName ||\r\n !this.projectSeleted\r\n ) {\r\n return;\r\n }\r\n\r\n try {\r\n if (lang === 'de.json') {\r\n this.i18n.setLocale(de_DE);\r\n } else {\r\n this.i18n.setLocale(en_US);\r\n }\r\n\r\n const databaseName =\r\n `${this.tenantName}_${this.projectSeleted}`;\r\n\r\n const [\r\n selectedLanguage,\r\n errorMessages\r\n ] = await Promise.all([\r\n this.couchdbService\r\n .getFileContentFromCouchDb(\r\n databaseName,\r\n `languages/${lang}`\r\n ),\r\n\r\n this.couchdbService\r\n .getFileContentFromCouchDb(\r\n databaseName,\r\n `languages/errorMessage_${lang}`\r\n )\r\n ]);\r\n\r\n if (\r\n !selectedLanguage ||\r\n typeof selectedLanguage !== 'object'\r\n ) {\r\n console.warn(\r\n `Language file \"${lang}\" was not found.`\r\n );\r\n\r\n return;\r\n }\r\n\r\n this.languageChange.emit({\r\n selectedLanguage,\r\n errorMessages,\r\n // The custom keyboards pick their letter layout from it (\"de.json\" -> \"de\").\r\n languageCode: lang.replace(/\\.json$/i, '').split(/[-_]/)[0].toLowerCase()\r\n });\r\n\r\n this.setLanguage = true;\r\n this.activeLanguage = lang;\r\n this.lastMenuTranslations = selectedLanguage;\r\n\r\n this.applyMenuTranslations(\r\n selectedLanguage\r\n );\r\n\r\n this.applySettingTranslations(\r\n selectedLanguage\r\n );\r\n } catch (error) {\r\n console.error(\r\n `Failed to change language to \"${lang}\":`,\r\n error\r\n );\r\n }\r\n }\r\n\r\n private applyMenuTranslations(\r\n selectedLanguage: Record<string, string>\r\n ): void {\r\n if (!this.menuItemsCopy?.length) {\r\n return;\r\n }\r\n\r\n this.menuItemsCopy.forEach(\r\n (menu: any, menuIndex: number) => {\r\n const translatedCaption =\r\n selectedLanguage[\r\n menu?.label?.caption\r\n ];\r\n\r\n if (\r\n translatedCaption &&\r\n this.menuItems?.[menuIndex]?.label\r\n ) {\r\n this.menuItems[\r\n menuIndex\r\n ].label.caption = translatedCaption;\r\n }\r\n\r\n menu?.submenu?.forEach(\r\n (\r\n subMenu: any,\r\n subMenuIndex: number\r\n ) => {\r\n const translatedSubCaption =\r\n selectedLanguage[\r\n subMenu?.label?.caption\r\n ];\r\n\r\n if (\r\n translatedSubCaption &&\r\n this.menuItems?.[menuIndex]\r\n ?.submenu?.[subMenuIndex]\r\n ?.label\r\n ) {\r\n this.menuItems[\r\n menuIndex\r\n ].submenu[\r\n subMenuIndex\r\n ].label.caption =\r\n translatedSubCaption;\r\n }\r\n\r\n subMenu?.submenu?.forEach(\r\n (\r\n childMenu: any,\r\n childIndex: number\r\n ) => {\r\n const translatedChildCaption =\r\n selectedLanguage[\r\n childMenu?.label?.caption\r\n ];\r\n\r\n if (\r\n translatedChildCaption &&\r\n this.menuItems?.[menuIndex]\r\n ?.submenu?.[subMenuIndex]\r\n ?.submenu?.[childIndex]\r\n ?.label\r\n ) {\r\n this.menuItems[\r\n menuIndex\r\n ].submenu[\r\n subMenuIndex\r\n ].submenu[\r\n childIndex\r\n ].label.caption =\r\n translatedChildCaption;\r\n }\r\n }\r\n );\r\n }\r\n );\r\n }\r\n );\r\n }\r\n\r\n private applySettingTranslations(\r\n selectedLanguage: Record<string, string>\r\n ): void {\r\n const settingCaption =\r\n this.settings?.label?.caption;\r\n\r\n if (\r\n settingCaption &&\r\n this.settingMenu?.label\r\n ) {\r\n this.settingMenu.label.caption =\r\n selectedLanguage[settingCaption] ??\r\n settingCaption;\r\n }\r\n\r\n this.settings?.submenu?.forEach(\r\n (menu: any, index: number) => {\r\n const originalCaption =\r\n menu?.label?.caption;\r\n\r\n if (\r\n !originalCaption ||\r\n !this.settingMenu?.submenu?.[index]\r\n ?.label\r\n ) {\r\n return;\r\n }\r\n\r\n this.settingMenu.submenu[\r\n index\r\n ].label.caption =\r\n selectedLanguage[originalCaption] ??\r\n originalCaption;\r\n }\r\n );\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - new: the active language has a check mark, like the active pagination type\r\n - fix: all check marks (pagination, language) stand in one column at the right edge; the\r\n pagination marks followed their caption at a fixed distance and landed elsewhere on iOS\r\n - change: the version footer has three columns - version, build (source commit) and build\r\n number (appBuildNumber), the three values build.sh and the web Docker build produce -->\r\n<!-- Shuaib 2026-09-24\r\n - change: sign-in visibility checks now include jwtToken alongside keycloak and oktaAuth. -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-09-19\r\n - new: a @contract comment on the option key, singular since 2026-09-16, and on the sign-in\r\n branches, which know keycloak and oktaAuth but not jwtToken -->\r\n<div class=\"left-wrap sidemenu\" [class.collapsed]=\"isCollapsed\"\r\n [ngStyle]=\"{ 'z-index': !isCollapsed && isMobile ? 999999 : 'auto' }\"\r\n #sideMenu>\r\n <!-- Move toggle button OUTSIDE menu container -->\r\n <div class=\"side-toggle-handle\" id=\"toggle-id\" (click)=\"toggleCollapsed()\"\r\n [class.collapsed]=\"isCollapsed\">\r\n <span id=\"toggle-icon\" nz-icon\r\n [nzType]=\"isCollapsed ? 'caret-right' : 'caret-left'\"></span>\r\n </div>\r\n <div class=\"side-menu\" id=\"sidemenuwrap\"\r\n [ngStyle]=\"{ width: (isMobile && isCollapsed) ? '1px' : isCollapsed ? '60px' : '' }\">\r\n <!-- user content -->\r\n <ng-container *ngIf=\"loginedUserInfo && loginedUserInfo?.name\">\r\n <div class=\"user-profile\" [class.collapsed]=\"isCollapsed\">\r\n <img class=\"avatar\" [src]=\"loginedUserInfo?.image\" alt=\"User\" />\r\n <div [class]=\"isMobile ? '' : 'details'\" *ngIf=\"!isCollapsed\">\r\n <div class=\"name\">{{ loginedUserInfo.name }}</div>\r\n <div class=\"email\">{{ loginedUserInfo?.email }}</div>\r\n <div class=\"actions\" *ngIf=\"loginedUserInfo?.actions?.length\">\r\n <button *ngFor=\"let action of loginedUserInfo?.actions\" nz-button\r\n nzType=\"link\" nzSize=\"small\"\r\n (click)=\"invokeNavigate(action)\">\r\n <span>{{ action?.label?.caption }}</span>\r\n <span nz-icon [nzType]=\"action.icon\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- @contract decision: this container reads option (singular), like every other one\r\n reality: it read options (plural) until 2026-09-16. A menu file written for the old\r\n spelling is ignored without an error.\r\n\r\n @contract decision: sign-in visibility supports keycloak, oktaAuth and jwtToken.\r\n A JWT project uses the decoded user's login state, like the other providers.\r\n seen: the login type comparisons in the lines below -->\r\n <!-- dynamic menu -->\r\n <ul nz-menu nzMode=\"inline\" nzTheme=\"dark\"\r\n [nzInlineCollapsed]=\"isCollapsed\">\r\n <ng-container *ngFor=\"let item of menuItems\">\r\n <ng-container\r\n *ngIf=\"!item.submenu && item?.option?.action != 'logout'; else submenu\">\r\n <span\r\n [class]=\"environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken' ? item.option?.login === true ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : '' : userInfo?.userId ? item.option?.login ? item.option.role ? item.option.role == userInfo.userRole ? '' : 'hidden' : '' : 'hidden' : !item.option?.login ? '' : 'hidden' \">\r\n <li (click)=\"invokeNavigate(item)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? item?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"item.icon\"></span>\r\n <span>{{ item?.label?.caption }}</span>\r\n </li>\r\n </span>\r\n </ng-container>\r\n <ng-template #submenu>\r\n <span\r\n [class]=\"item.option?.login === true && (environment?.login?.type === 'oktaAuth' || environment?.login?.type === 'keycloak' || environment?.login?.type === 'jwtToken') ? loginedUserInfo?.name ? '' : 'hidden' : item.option?.login === false ? loginedUserInfo?.name ? 'hidden' : '' : ''\">\r\n <li nz-submenu *ngIf=\"item?.option?.action != 'logout'\"\r\n [nzTitle]=\"item?.label?.caption\"\r\n [nzIcon]=\"item.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of item.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let subChild of child.submenu\">\r\n <li (click)=\"invokeNavigate(subChild)\" nz-menu-item>\r\n <ng-container\r\n *ngIf=\"subChild?.option?.setImageUrl; else antIcon\">\r\n <img *ngIf=\"isUrl(subChild?.icon)\"\r\n [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n @if(subChild?.option?.numberedPagination &&\r\n !scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.scrollPagination &&\r\n scrollPagination){\r\n <span nz-icon\r\n nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n @if(subChild?.option?.changeLang &&\r\n subChild?.option?.data_url === activeLanguage){\r\n <span nz-icon nzType=\"check\" nzTheme=\"outline\"\r\n class=\"pagination-check\">\r\n </span>\r\n }\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- separator -->\r\n <li *ngIf=\"settingMenu.submenu\" class=\"menu-separator\"></li>\r\n\r\n <!-- settings menu -->\r\n <ng-container *ngIf=\"!settingMenu.submenu; else settingSubmenu\"\r\n style=\"position: absolute; bottom: 0;\">\r\n <li (click)=\"invokeNavigate(settingMenu)\" nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? settingMenu?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"settingMenu.icon\"></span>\r\n <span>{{ settingMenu?.label?.caption }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #settingSubmenu>\r\n <li nz-submenu [nzTitle]=\"settingMenu?.label?.caption\"\r\n [nzIcon]=\"settingMenu.icon\">\r\n <ul>\r\n <ng-container *ngFor=\"let child of settingMenu.submenu\">\r\n <li (click)=\"invokeNavigate(child)\" *ngIf=\"!child.submenu\"\r\n nz-menu-item nz-tooltip\r\n nzTooltipPlacement=\"right\"\r\n [nzTooltipTitle]=\"isCollapsed && !isMobile ? child?.label?.caption : ''\">\r\n <span nz-icon [nzType]=\"child?.icon\"></span>\r\n <span>{{ child?.label?.caption }}</span>\r\n </li>\r\n <ng-container *ngIf=\"child.submenu\">\r\n <li nz-submenu [nzTitle]=\"child?.label?.caption\"\r\n [nzIcon]=\"child?.icon\">\r\n <ul style=\"width: 260px;\">\r\n <ng-container\r\n *ngFor=\"let subChild of child.submenu; let i = index\">\r\n <li (click)=\"invokeNavigate(subChild, child)\"\r\n nz-menu-item>\r\n <span\r\n [class]=\"child?.label?.caption === 'Languages' ? '' : 'menu-row'\">\r\n <ng-container\r\n *ngIf=\"subChild?.option?.changeProject; else antIcon\">\r\n <img [src]=\"subChild?.icon\" alt=\"icon\"\r\n style=\"width: 16px; height: 16px; margin-right: 8px;\" />\r\n </ng-container>\r\n <ng-template #antIcon>\r\n <span nz-icon [nzType]=\"subChild?.icon\"></span>\r\n </ng-template>\r\n <span>{{ subChild?.label?.caption }}</span>\r\n <!-- Delete icon (prevent click bubbling) -->\r\n <span *ngIf=\"child?.label?.caption != 'Languages'\"\r\n nz-icon nzType=\"delete\" class=\"delete-icon\"\r\n style=\"padding-left: 5%;\"\r\n (click)=\"deleteMenuItem(subChild, i, $event)\"></span>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n @if (!isCollapsed && appVersionInfo?.appVersion) {\r\n <div class=\"app-version-footer\">\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Version</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appVersion }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuild || '-' }}</span>\r\n </div>\r\n <div class=\"app-version-footer__item\">\r\n <span class=\"app-version-footer__label\">Build No.</span>\r\n <span class=\"app-version-footer__value\">{{ appVersionInfo.appBuildNumber || '-' }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","// lib/view-toolkit.module.ts\r\n\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { NgModule } from '@angular/core';\r\nimport { CardComponent } from \"./containers/card/card.component\";\r\nimport { FormComponent } from \"./containers/form/form.component\";\r\nimport { PaginationComponent } from \"./containers/pagination/pagination.component\";\r\nimport { GridComponent } from \"./containers/grid/grid.component\";\r\nimport { HeaderMenuComponent } from \"./containers/header-menu/header-menu.component\";\r\nimport { LogsComponent } from \"./containers/logs/logs.component\";\r\nimport { ModelComponent } from \"./containers/model/model.component\";\r\nimport { Autocomplete } from \"./components/autocomplete/autocomplete\";\r\nimport { Button } from \"./components/button/button\";\r\nimport { Date } from \"./components/date/date\";\r\nimport { Dropdown } from \"./components/dropdown/dropdown\";\r\nimport { ErrorMessage } from \"./components/error-message/error-message\";\r\nimport { Label } from \"./components/label/label\";\r\nimport { String } from \"./components/string/string\";\r\nimport { Textbox } from \"./components/textbox/textbox\";\r\nimport { Time } from \"./components/time/time\";\r\nimport { SideMenuComponent } from \"./containers/side-menu/side-menu.component\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CardComponent,\r\n FormComponent,\r\n GridComponent,\r\n HeaderMenuComponent,\r\n LogsComponent,\r\n ModelComponent,\r\n PaginationComponent,\r\n SideMenuComponent,\r\n\r\n Autocomplete,\r\n Button,\r\n Date,\r\n Dropdown,\r\n ErrorMessage,\r\n Label,\r\n String,\r\n Textbox,\r\n Time\r\n ],\r\n exports: [\r\n CardComponent,\r\n FormComponent,\r\n GridComponent,\r\n HeaderMenuComponent,\r\n LogsComponent,\r\n ModelComponent,\r\n PaginationComponent,\r\n SideMenuComponent\r\n\r\n ]\r\n})\r\nexport class ViewToolkitModule { }","// AUTO-GENERATED. Do not edit.\nexport const APP_VERSION = '1.0.204';\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-11\r\n// - fix: \"is this the app on iOS/Android\" asks isNativeMobile() (native-platform.ts) instead of\r\n// Angular CDK platform.IOS/ANDROID; an iPad reports itself as a Mac there, so it ran as the web\r\n// version (web sign-in: Keycloak \"Invalid parameter: redirect_uri\")\r\nimport { Injectable } from '@angular/core';\r\nimport { Preferences } from '@capacitor/preferences';\r\nimport { APP_VERSION } from '../app-version';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { isNativeMobile } from './native-platform';\r\n\r\nconst VERSION_KEY = 'APP_VERSION';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppVersionResetService {\r\n\r\n constructor(\r\n private platform: Platform) {\r\n }\r\n\r\n\r\n async run(): Promise<void> {\r\n if (isNativeMobile()) {\r\n await this.clearNativeIfChanged();\r\n // this.clearWebIfChanged();\r\n // return;\r\n }\r\n }\r\n\r\n private async clearNativeIfChanged(): Promise<void> {\r\n const { value: savedVersion } = await Preferences.get({ key: VERSION_KEY });\r\n if (savedVersion === APP_VERSION) return;\r\n console.log(`🧹 Clearing Capacitor Preferences (new build ${APP_VERSION})`);\r\n await Preferences.clear();\r\n this.clearWebStores();\r\n await Preferences.set({ key: VERSION_KEY, value: APP_VERSION });\r\n }\r\n\r\n // private clearWebIfChanged(): void {\r\n // const savedVersion = sessionStorage.getItem(VERSION_KEY) || localStorage.getItem(VERSION_KEY);\r\n // if (savedVersion === APP_VERSION) return;\r\n // this.clearWebStores();\r\n // localStorage.setItem(VERSION_KEY, APP_VERSION);\r\n // sessionStorage.setItem(VERSION_KEY, APP_VERSION);\r\n // }\r\n\r\n private clearWebStores(): void {\r\n try { localStorage.clear(); } catch { }\r\n try { sessionStorage.clear(); } catch { }\r\n try {\r\n if (typeof document !== 'undefined' && document.cookie) {\r\n document.cookie.split(';').forEach((c) => {\r\n const eqPos = c.indexOf('=');\r\n const name = eqPos > -1 ? c.substring(0, eqPos).trim() : c.trim();\r\n if (name) {\r\n document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;\r\n }\r\n });\r\n }\r\n } catch { }\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - change: login, refresh and logout run through MobileOidcService - the same OpenID Connect flow\r\n// as Keycloak; the endpoints come from the issuer's discovery document instead of login.mobile.\r\n// The logout follows login.required: a project with an optional login (luv2shop) restarts on its\r\n// start page, signed out\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: Okta sign-in on the devices with a refresh token. The login asks for offline_access, the\r\n// tokens (access, refresh, id) are kept with the user, an expired access token is renewed with\r\n// the refresh token (grant_type=refresh_token, public client with PKCE - no secret) and the\r\n// logout revokes the refresh token. Before, only the access token was kept: after its lifetime\r\n// (1 hour in luv2shop) the backend calls failed until the user signed in again\r\n// - new: signOut ends the sign-in without a browser window: refresh and access token are revoked\r\n// and the next login asks Okta for the password again (prompt=login). The logout page in the\r\n// in-app browser stayed white after its redirect to the app scheme and did not close\r\nimport { Injectable } from '@angular/core';\r\nimport { UtilityService } from './utility.service';\r\nimport { MobileOidcService, OidcProvider, OidcRefresh, OidcTokens } from './mobile-oidc.service';\r\n\r\nexport type MobileOktaTokens = OidcTokens;\r\nexport type MobileOktaRefresh = OidcRefresh;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MobileOktaService {\r\n\r\n constructor(private utilityService: UtilityService, private oidc: MobileOidcService) { }\r\n\r\n /**\r\n * The Okta authorization server as an OIDC provider, from login.mobile of the project. The issuer\r\n * is login.mobile.issuer, else login.web.issuer, else derived from the authorize URL\r\n * (https://…/oauth2/default/v1/authorize → https://…/oauth2/default).\r\n */\r\n provider(environment: any): OidcProvider {\r\n const mobile = environment?.login?.mobile ?? {};\r\n const issuer = mobile.issuer\r\n || environment?.login?.web?.issuer\r\n || String(mobile.authorizationBaseUrl ?? '').replace(/\\/v1\\/authorize.*$/, '');\r\n\r\n return {\r\n issuer,\r\n clientId: mobile.clientId,\r\n redirectUri: mobile.redirectUrl,\r\n scope: mobile.scope,\r\n // Always: the refresh token keeps the sign-in beyond the access token's lifetime.\r\n offlineAccess: true\r\n };\r\n }\r\n\r\n login(environment: any): Promise<MobileOktaTokens | null> {\r\n return this.oidc.login(this.provider(environment));\r\n }\r\n\r\n refreshTokens(environment: any, stored: MobileOktaTokens | any): Promise<MobileOktaRefresh> {\r\n return this.oidc.refresh(this.provider(environment), stored);\r\n }\r\n\r\n /**\r\n * Logout with the shared flow. login.required decides where the restarted app goes: true → the\r\n * loader until the sign-in opens, otherwise (default for Okta) the start page, signed out.\r\n */\r\n signOut(environment: any, stored: MobileOktaTokens | any): Promise<void> {\r\n return this.oidc.signOut(this.provider(environment), stored, 'loginedUser',\r\n key => this.utilityService.removeLocalStorage(key),\r\n { loginRequired: environment?.login?.required === true });\r\n }\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - new: letter layouts per language and a symbol page for the custom keyboards. The keyboard had\r\n// one hard-wired QWERTY without umlauts or punctuation, so German text such as a comment could\r\n// not be typed. A project can bring its own layout in its language file (keyboardLayout)\r\n\r\n/** Rows of letter keys, lowercase; the keyboard derives the uppercase form itself. */\r\nexport type KeyboardLetterRows = string[][];\r\n\r\nconst LETTER_LAYOUTS: Record<string, KeyboardLetterRows> = {\r\n en: [\r\n ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'],\r\n ['z', 'x', 'c', 'v', 'b', 'n', 'm']\r\n ],\r\n de: [\r\n ['q', 'w', 'e', 'r', 't', 'z', 'u', 'i', 'o', 'p', 'ü'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'ö', 'ä'],\r\n ['y', 'x', 'c', 'v', 'b', 'n', 'm', 'ß']\r\n ],\r\n fr: [\r\n ['a', 'z', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['q', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm'],\r\n ['w', 'x', 'c', 'v', 'b', 'n', 'é', 'è', 'à', 'ç']\r\n ],\r\n es: [\r\n ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'ñ'],\r\n ['z', 'x', 'c', 'v', 'b', 'n', 'm', 'á', 'é', 'ó']\r\n ],\r\n it: [\r\n ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],\r\n ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'à'],\r\n ['z', 'x', 'c', 'v', 'b', 'n', 'm', 'è', 'ò', 'ù']\r\n ]\r\n};\r\n\r\nexport const DIGIT_ROW = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];\r\n\r\n/** Second page behind the ?123 key: everything a free text needs besides letters. */\r\nexport const SYMBOL_ROWS: string[][] = [\r\n DIGIT_ROW,\r\n ['-', '/', ':', ';', '(', ')', '€', '&', '@', '\"'],\r\n ['.', ',', '?', '!', \"'\", '#', '%', '+', '=', '_'],\r\n ['*', '$', '§', '°', '<', '>', '[', ']', '\\\\', '~']\r\n];\r\n\r\n/**\r\n * Letter rows for a language. A layout the project defines wins: its language file may carry\r\n * keyboardLayout as rows of keys, either arrays or strings (\"qwertzuiopü\").\r\n */\r\nexport function getLetterRows(\r\n languageCode: string | null | undefined,\r\n projectLayout?: unknown\r\n): KeyboardLetterRows {\r\n const fromProject = normalizeProjectLayout(projectLayout);\r\n\r\n if (fromProject) {\r\n return fromProject;\r\n }\r\n\r\n const code = (languageCode ?? '').toLowerCase().split(/[-_]/)[0];\r\n\r\n return LETTER_LAYOUTS[code] ?? LETTER_LAYOUTS['en'];\r\n}\r\n\r\nfunction normalizeProjectLayout(\r\n layout: unknown\r\n): KeyboardLetterRows | null {\r\n if (!Array.isArray(layout) || layout.length === 0) {\r\n return null;\r\n }\r\n\r\n const rows = layout\r\n .map(row =>\r\n typeof row === 'string'\r\n ? Array.from(row)\r\n : Array.isArray(row)\r\n ? row.filter(key => typeof key === 'string' && key.length > 0)\r\n : []\r\n )\r\n .map(row => row.map(key => key.toLowerCase()))\r\n .filter(row => row.length > 0);\r\n\r\n return rows.length > 0 ? rows : null;\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - change: capitals as on the iOS keyboard - on for the first letter of an empty field, off after\r\n// one letter; shift capitalises the next letter only. The keyboard stayed in capitals\r\n// - change: the space key has no label (see the template)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n// - change: the letter rows follow the project language (QWERTZ with ä ö ü ß for German) instead\r\n// of one fixed QWERTY; the language comes from the project's language selection\r\n// - new: a ?123 page with digits and punctuation for string fields, so a comment can hold\r\n// \"Termin 14:30, Raum 2-B.\" - before only A-Z, 0-9 and space could be entered\r\n\r\nimport {\r\n Component,\r\n DestroyRef,\r\n effect,\r\n inject,\r\n signal\r\n} from '@angular/core';\r\n\r\nimport {\r\n takeUntilDestroyed\r\n} from '@angular/core/rxjs-interop';\r\n\r\nimport {\r\n CustomKeyboardService\r\n} from './custom-keyboard.service';\r\n\r\nimport {\r\n CustomKeyboardType\r\n} from './custom-keyboard.types';\r\n\r\nimport {\r\n DIGIT_ROW,\r\n SYMBOL_ROWS,\r\n getLetterRows\r\n} from './custom-keyboard.layouts';\r\n\r\nimport {\r\n UtilityService\r\n} from '../../services/utility.service';\r\n\r\n@Component({\r\n selector: 'vl-custom-keyboard',\r\n standalone: true,\r\n templateUrl: './custom-keyboard.component.html',\r\n styleUrl: './custom-keyboard.component.css'\r\n})\r\nexport class CustomKeyboardComponent {\r\n readonly keyboard =\r\n inject(CustomKeyboardService);\r\n\r\n /** Capital letters: on for the first letter of an empty field, then off - as on iOS. */\r\n readonly uppercase = signal(true);\r\n\r\n /** true while the ?123 page is shown instead of the letters. */\r\n readonly symbols = signal(false);\r\n\r\n private readonly languageCode = signal<string | null>(null);\r\n private readonly projectLayout = signal<unknown>(null);\r\n\r\n constructor() {\r\n // A field opens with capitals only when it is still empty (start of the text).\r\n effect(() => {\r\n const target = this.keyboard.activeSession()?.target as HTMLInputElement | undefined;\r\n\r\n this.uppercase.set(!target?.value);\r\n });\r\n\r\n inject(UtilityService)\r\n .currentProjectlanguage$\r\n .pipe(takeUntilDestroyed(inject(DestroyRef)))\r\n .subscribe((uiLang: any) => {\r\n if (!uiLang) {\r\n return;\r\n }\r\n\r\n this.languageCode.set(uiLang.languageCode ?? null);\r\n this.projectLayout.set(uiLang.selectedLanguage?.keyboardLayout ?? null);\r\n });\r\n }\r\n\r\n get keyboardType():\r\n CustomKeyboardType | null {\r\n return (\r\n this.keyboard.activeSession()?.type ??\r\n null\r\n );\r\n }\r\n\r\n /** The symbol page exists where free text is typed. */\r\n get hasSymbolPage(): boolean {\r\n return this.keyboardType === 'string';\r\n }\r\n\r\n get rows(): string[][] {\r\n const type = this.keyboardType;\r\n\r\n if (!type) {\r\n return [];\r\n }\r\n\r\n if (type === 'numeric') {\r\n return [\r\n ['1', '2', '3'],\r\n ['4', '5', '6'],\r\n ['7', '8', '9'],\r\n ['-', '0', '.']\r\n ];\r\n }\r\n\r\n if (\r\n type === 'date' ||\r\n type === 'time'\r\n ) {\r\n return [\r\n ['1', '2', '3'],\r\n ['4', '5', '6'],\r\n ['7', '8', '9'],\r\n ['0']\r\n ];\r\n }\r\n\r\n if (type === 'email') {\r\n return [\r\n DIGIT_ROW,\r\n ...getLetterRows('en'),\r\n ['@', '.', '_', '-', '+']\r\n ];\r\n }\r\n\r\n if (this.hasSymbolPage && this.symbols()) {\r\n return SYMBOL_ROWS;\r\n }\r\n\r\n const letterRows =\r\n getLetterRows(this.languageCode(), this.projectLayout())\r\n .map(row =>\r\n row.map(character =>\r\n this.uppercase()\r\n ? this.toUpper(character)\r\n : character\r\n )\r\n );\r\n\r\n if (type === 'string') {\r\n return [\r\n DIGIT_ROW,\r\n ...letterRows\r\n ];\r\n }\r\n\r\n return letterRows;\r\n }\r\n\r\n /** ß has no single-letter capital in common use (\"SS\"), so it keeps its form. */\r\n private toUpper(character: string): string {\r\n const upper = character.toLocaleUpperCase(this.languageCode() ?? undefined);\r\n\r\n return upper.length === 1 ? upper : character;\r\n }\r\n\r\n enterKey(key: string): void {\r\n this.keyboard.insert(key);\r\n\r\n // Shift applies to one letter, like the iOS keyboard.\r\n if (this.uppercase() && /\\p{L}/u.test(key)) {\r\n this.uppercase.set(false);\r\n }\r\n }\r\n\r\n enterSpace(): void {\r\n this.keyboard.insert(' ');\r\n }\r\n\r\n toggleCase(): void {\r\n this.uppercase.update(\r\n value => !value\r\n );\r\n }\r\n\r\n toggleSymbols(): void {\r\n this.symbols.update(\r\n value => !value\r\n );\r\n }\r\n}\r\n","<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n - change: the space key has no label (it said \"Space\" in every language); a label per language\r\n would have to be maintained for each new project language -->\r\n<!-- Faramarz Yousefian and Agent Toni (Claude Opus 5) 2026-10-07\r\n - new: a ?123 / ABC key switches string keyboards between letters and the symbol page -->\r\n@if (keyboard.activeSession(); as session) {\r\n<section class=\"custom-keyboard\" data-vl-custom-keyboard [class.custom-keyboard--numeric]=\"\r\n session.type === 'numeric' ||\r\n session.type === 'date' ||\r\n session.type === 'time'\" [class.custom-keyboard--opening]=\"keyboard.interactionBlocked()\"\r\n [attr.aria-label]=\"session.type + ' keyboard'\" (pointerdown)=\"$event.preventDefault()\">\r\n\r\n @for (row of rows; track $index) {\r\n <div class=\"custom-keyboard__row\">\r\n @for (key of row; track key) {\r\n <button type=\"button\" class=\"custom-keyboard__key\" (click)=\"enterKey(key)\">\r\n {{ key }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- One mobile-style action row for every keyboard type -->\r\n <div class=\"custom-keyboard__actions\" [class.custom-keyboard__actions--compact]=\"\r\n session.type !== 'alpha' &&\r\n session.type !== 'string'\r\n \" [class.custom-keyboard__actions--symbols]=\"hasSymbolPage\">\r\n\r\n @if (\r\n session.type === 'alpha' ||\r\n session.type === 'string'\r\n ) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__shift\" [class.active]=\"uppercase()\"\r\n [disabled]=\"symbols()\" aria-label=\"Change letter case\" title=\"Shift\" (click)=\"toggleCase()\">\r\n <i class=\"pi pi-arrow-up\"></i>\r\n </button>\r\n\r\n @if (hasSymbolPage) {\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__page\"\r\n [attr.aria-label]=\"symbols() ? 'Letters' : 'Digits and symbols'\" (click)=\"toggleSymbols()\">\r\n {{ symbols() ? 'ABC' : '?123' }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__space\" aria-label=\"Space\" (click)=\"enterSpace()\">\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__delete\"\r\n aria-label=\"Delete previous character\" title=\"Delete\" (click)=\"keyboard.backspace()\">\r\n <i class=\"pi pi-delete-left\"></i>\r\n </button>\r\n\r\n <button type=\"button\" class=\"custom-keyboard__action-button custom-keyboard__done\" aria-label=\"Done\"\r\n title=\"Done\" (click)=\"keyboard.close()\">\r\n <i class=\"pi pi-check\"></i>\r\n </button>\r\n </div>\r\n</section>\r\n}\r\n","// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-15\r\n// - new: exports MediaSourcePipe (vlMedia, #145)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-14\r\n// - new: exports MobileOidcService (one OpenID Connect flow for Keycloak and Okta on the devices)\r\n// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-10-13\r\n// - new: exports native-platform (isNativeMobile/isNativePhone), PlaceholderPipe,\r\n// RequestTimeoutService and RemoteListService\r\n// - new: exports MobileOktaService (Okta sign-in on the devices with refresh token)\r\n/*\r\n * Public API Surface of view-toolkit\r\n */\r\n\r\nexport * from './lib/view-toolkit.module';\r\n\r\n// container\r\nexport * from './lib/containers/card/card.component';\r\nexport * from './lib/containers/form/form.component';\r\nexport * from './lib/containers/grid/grid.component';\r\nexport * from './lib/containers/header-menu/header-menu.component';\r\nexport * from './lib/containers/logs/logs.component';\r\nexport * from './lib/containers/model/model.component';\r\nexport * from './lib/containers/pagination/pagination.component';\r\nexport * from './lib/containers/side-menu/side-menu.component';\r\n\r\n// services\r\nexport * from './lib/services/app-version-reset.service';\r\nexport * from './lib/services/config.service';\r\nexport * from './lib/services/couchdb';\r\nexport * from './lib/services/mobile-keycloak.service';\r\nexport * from './lib/services/mobile-okta.service';\r\nexport * from './lib/services/mobile-oidc.service';\r\nexport * from './lib/services/native-platform';\r\nexport * from './lib/services/network-log.service';\r\nexport * from './lib/services/notification.service';\r\nexport * from './lib/services/request.service';\r\nexport * from './lib/services/utility.service';\r\n\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.component';\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.directive';\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.service';\r\nexport * from './lib/components/custom-keyboard/custom-keyboard.types';\r\nexport * from './lib/components/custom-keyboard/toolkit-keyboard-mode';\r\nexport * from './lib/pipes/placeholder.pipe';\r\nexport * from './lib/pipes/media-source.pipe';\r\nexport * from './lib/services/request-timeout.service';\r\nexport * from './lib/services/remote-list.service';\r\nexport * from './lib/services/backend-url';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","String","i1.CustomKeyboardService","viaBackendProxy","i1","i2.RequestService","i1.NotificationService","backendUrl","i1.UtilityService","i1.Couchdb","i2.UtilityService","i3","i4.ConfigService","i5","i6.NotificationService","i8.RequestService","i9","i10","i16","StringComponent","i6","i1.RequestService","i3.NotificationService","i4","i7","i8","i11","i12","i13","i14","i3.UtilityService","i4.Couchdb","i1.NetworkLogService","Date","i1.ConfigService","i5.MobileOidcService","i2.MobileKeycloakService","i3.Couchdb","i6.RequestService","i7.UtilityService","i9.NotificationService","i15","i2.MobileOidcService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAIA;SACgB,cAAc,GAAA;AAC1B,IAAA,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAE;AAExC,IAAA,OAAO,SAAS,CAAC,gBAAgB,EAAE,KAAK,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,SAAS,CAAC;AACzF;AAEA;;;AAGG;SACa,aAAa,GAAA;IACzB,OAAO,cAAc,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG;AACxF;;ACtBA;AACA;AACA;AACA;MA+Ba,mBAAmB,CAAA;AAqBpB,IAAA,QAAA;AApBD,IAAA,QAAQ,GAAQ;AACvB,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,IAAI,EAAE;KACP;AAEQ,IAAA,QAAQ;IACR,WAAW,GAAW,CAAC;IACvB,oBAAoB,GAAQ,EAAE;IAC9B,KAAK,GAAa,EAAE;AAEnB,IAAA,cAAc,GACtB,IAAI,YAAY,EAAO;AAEf,IAAA,UAAU,GAClB,IAAI,YAAY,EAAO;IAEzB,QAAQ,GAAY,KAAK;AAEzB,IAAA,WAAA,CACU,QAAkB,EAAA;Q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