{"version":3,"file":"nakedobjects-view-models.mjs","sources":["../../../view-models/src/choice-view-model.ts","../../../view-models/src/menu-item-view-model.ts","../../../view-models/src/user-messages.ts","../../../view-models/src/validate.ts","../../../view-models/src/helpers-view-models.ts","../../../view-models/src/action-view-model.ts","../../../view-models/src/application-properties-view-model.ts","../../../view-models/src/attachment-view-model.ts","../../../view-models/src/message-view-model.ts","../../../view-models/src/contributed-action-parent-view-model.ts","../../../view-models/src/collection-view-model.ts","../../../view-models/src/dialog-view-model.ts","../../../view-models/src/domain-object-view-model.ts","../../../view-models/src/error-view-model.ts","../../../view-models/src/link-view-model.ts","../../../view-models/src/item-view-model.ts","../../../view-models/src/list-view-model.ts","../../../view-models/src/menu-view-model.ts","../../../view-models/src/menus-view-model.ts","../../../view-models/src/multi-line-dialog-view-model.ts","../../../view-models/src/field-view-model.ts","../../../view-models/src/parameter-view-model.ts","../../../view-models/src/property-view-model.ts","../../../view-models/src/recent-item-view-model.ts","../../../view-models/src/recent-items-view-model.ts","../../../view-models/src/table-row-column-view-model.ts","../../../view-models/src/table-row-view-model.ts","../../../view-models/src/view-model-factory.service.ts","../../../view-models/src/drag-and-drop.service.ts","../../../view-models/src/lib.module.ts","../../../view-models/src/nakedobjects-view-models.ts"],"sourcesContent":["import * as Ro from '@nakedobjects/restful-objects';\n\nexport class ChoiceViewModel {\n\n    constructor(\n        private readonly wrapped: Ro.Value,\n        private readonly id: string,\n        name?: string | null,\n        searchTerm?: string\n    ) {\n        this.name = name || wrapped.toString();\n        this.search = searchTerm || this.name;\n        this.isEnum = !wrapped.isReference() && (this.name !== this.getValue().toValueString());\n    }\n\n    readonly name: string;\n    private readonly search: string;\n    private readonly isEnum: boolean;\n\n    readonly getValue = () => this.wrapped;\n\n    readonly equals = (other: ChoiceViewModel): boolean =>\n        other instanceof ChoiceViewModel &&\n        this.id === other.id &&\n        this.name === other.name &&\n        this.wrapped.toValueString() === other.wrapped.toValueString();\n\n    readonly valuesEqual = (other: ChoiceViewModel | null): boolean => {\n        if (other instanceof ChoiceViewModel) {\n            const thisValue = this.isEnum ? this.wrapped.toValueString().trim() : this.search.trim();\n            const otherValue = this.isEnum ? other.wrapped.toValueString().trim() : other.search.trim();\n            return thisValue === otherValue;\n        }\n        return false;\n    };\n\n    readonly toString = () => this.name;\n}\n","import { ActionViewModel } from './action-view-model';\nimport { IMenuHolderViewModel } from './imenu-holder-view-model';\n\nexport class MenuItemViewModel implements IMenuHolderViewModel {\n    constructor(\n        public readonly name: string,\n        public readonly actions: ActionViewModel[],\n        public readonly menuItems: MenuItemViewModel[] | null\n    ) {\n        this.navCollapsed = !!this.name;    \n     }\n\n    navCollapsed : boolean;\n    readonly toggleCollapsed: () => void = () => this.navCollapsed = !this.navCollapsed;\n}\n","import { ILocalFilter } from '@nakedobjects/services';\n\n// user message constants\nexport const noResultMessage = 'no result found';\nexport const obscuredText = '*****';\nexport const tooShort = 'Too short';\nexport const tooLong = 'Too long';\nexport const notAnInteger = 'Not an integer';\nexport const notANumber = 'Not a number';\nexport const mandatory = 'Mandatory';\nexport const optional = 'Optional';\nexport const choices = 'Choices';\nexport const pendingAutoComplete = 'Pending auto-complete...';\nexport const noPatternMatch = 'Invalid entry';\nexport const closeActions = 'Close actions';\nexport const noActions = 'No actions available';\nexport const openActions = 'Open actions (Alt-a)';\nexport const mandatoryFieldsPrefix = 'Missing mandatory fields: ';\nexport const invalidFieldsPrefix = 'Invalid fields: ';\nexport const unknownFileTitle = 'UnknownFile';\nexport const unknownCollectionSize = '';\nexport const emptyCollectionSize = 'Empty';\nexport const noItemsFound = 'No items found';\nexport const noItemsSelected = 'Must select items for collection contributed action';\nexport const dropPrompt = '(drop here)';\nexport const autoCompletePrompt = '(auto-complete or drop)';\nexport const concurrencyMessage = 'The object has been reloaded to pick up changes by another user. Please review, and re-enter any changes you still require.';\nexport const loadingMessage = 'Loading...';\nexport const submittedMessage = 'Submitted';\n\nexport const today = 'Today';\nexport const clear = 'Clear';\nexport const recentDisabledMessage = 'Nothing to clear';\nexport const recentMessage = 'Clear recent history';\nexport const recentTitle = 'Recently Viewed Objects';\nexport const noUserMessage = '\\'No user set\\'';\nexport const noImageMessage = 'No image';\nexport const noFileMessage = 'Empty';\n\nexport const invalidDate = 'Invalid date';\nexport const invalidTime = 'Invalid time';\n\nexport const pageMessage = (p: number, tp: number, c: number, tc: number) => `Page ${p} of ${tp}; viewing ${c} of ${tc} items`;\n\nexport const logOffMessage = (u: string) => `Please confirm logoff of user: ${u}`;\n\nexport const submittedCount = (c: number) => ` with ${c} lines submitted.`;\n\nexport const outOfRange = (_: unknown, min: unknown, max: unknown, filter?: ILocalFilter) => {\n    const minVal = filter ? filter.filter(min) : min;\n    const maxVal = filter ? filter.filter(max) : max;\n\n    return `Value is outside the range ${minVal || 'unlimited'} to ${maxVal || 'unlimited'}`;\n};\n\nexport const editing = 'Editing';\n\n// Error messages\nexport const errorUnknown = 'Unknown software error';\nexport const errorExpiredTransient = 'The requested view of unsaved object details has expired';\nexport const errorWrongType = 'An unexpected type of result was returned';\nexport const errorNotImplemented = 'The requested software feature is not implemented';\nexport const errorSoftware = 'A software error occurred';\nexport const errorConnection = 'The client failed to connect to the server';\nexport const errorClient = 'Client Error';\n","import * as Models from '@nakedobjects/restful-objects';\nimport { DateTime } from 'luxon';\nimport { ILocalFilter } from '@nakedobjects/services';\nimport * as Msg from './user-messages';\nimport { fixedDateFormat } from '@nakedobjects/services';\n\n\nfunction isInteger(value: number) {\n    return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\n\nfunction getDate(val: string): Date | null {\n    const dt1 = DateTime.fromFormat(val, fixedDateFormat); \n    return dt1.isValid ? dt1.toJSDate() : null;\n}\n\nexport function validateNumber(model: Models.IHasExtensions, newValue: number, filter?: ILocalFilter): string {\n    const format = model.extensions().format();\n\n    switch (format) {\n        case ('int'):\n            if (!isInteger(newValue)) {\n                return 'Not an integer';\n            }\n    }\n\n    const range = model.extensions().range();\n\n    if (range) {\n        const min = range.min;\n        const max = range.max;\n\n        if (typeof min === 'number' && newValue < min) {\n            return Msg.outOfRange(newValue, min, max, filter);\n        }\n\n        if (typeof max === 'number' && newValue > max) {\n            return Msg.outOfRange(newValue, min, max, filter);\n        }\n    }\n\n    return '';\n}\n\nexport function validateStringFormat(model: Models.IHasExtensions, newValue: string): string {\n\n    const maxLength = model.extensions().maxLength();\n    const pattern = model.extensions().pattern();\n    const len = newValue ? newValue.length : 0;\n\n    if (maxLength && len > maxLength) {\n        return Msg.tooLong;\n    }\n\n    if (pattern) {\n        const regex = new RegExp(pattern);\n        return regex.test(newValue) ? '' : Msg.noPatternMatch;\n    }\n    return '';\n}\n\nexport function validateDateTimeFormat(_model: Models.IHasExtensions, _newValue: string): string {\n    return '';\n}\n\nexport function validateDateFormat(model: Models.IHasExtensions, newValue: string, filter?: ILocalFilter): string {\n    const range = model.extensions().range();\n    const newDate = getDate(newValue);\n\n    if (range && newDate) {\n        const min = range.min ? getDate(range.min as string) : null;\n        const max = range.max ? getDate(range.max as string) : null;\n\n        if (min && newDate < min) {\n            return Msg.outOfRange(Models.toDateString(newDate), min.toISOString(), max?.toISOString(), filter);\n        }\n\n        if (max && newDate > max) {\n            return Msg.outOfRange(Models.toDateString(newDate), min?.toISOString(), max.toISOString(), filter);\n        }\n    }\n\n    return '';\n}\n\nexport function validateTimeFormat(_model: Models.IHasExtensions, _newValue: string): string {\n    return '';\n}\n\nexport function validateString(model: Models.IHasExtensions, newValue: string, filter?: ILocalFilter): string {\n    const format = model.extensions().format();\n\n    switch (format) {\n        case ('string'):\n            return validateStringFormat(model, newValue);\n        case ('date-time'):\n            return validateDateTimeFormat(model, newValue);\n        case ('date'):\n            return validateDateFormat(model, newValue, filter);\n        case ('time'):\n            return validateTimeFormat(model, newValue);\n        default:\n            return '';\n    }\n}\n\nexport function validateMandatory(model: Models.IHasExtensions, viewValue: string): string {\n    // first check\n    const isMandatory = !model.extensions().optional();\n\n    if (isMandatory && (viewValue === '' || viewValue == null)) {\n        return Msg.mandatory;\n    }\n\n    return '';\n}\n\nexport function validateMandatoryAgainstType(model: Models.IHasExtensions, viewValue: string, filter?: ILocalFilter): string {\n\n    // check type\n    const returnType = model.extensions().returnType();\n\n    switch (returnType) {\n        case ('number'): {\n            const valueAsNumber = parseFloat(viewValue);\n            if (Number.isFinite(valueAsNumber)) {\n                return validateNumber(model, valueAsNumber, filter);\n            }\n            return Msg.notANumber;\n        }\n        case ('string'):\n            return validateString(model, viewValue, filter);\n        case ('boolean'):\n            return '';\n        default:\n            return '';\n    }\n}\n\nexport function validateDate(newValue: string, validInputFormats: string[]) {\n\n    if (newValue) {\n        for (const f of validInputFormats) {\n            const dt = DateTime.fromFormat(newValue, f);\n            if (dt.isValid) {\n                return dt;\n            }\n        }\n    }\n\n    return null;\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ConfigService, ContextService, ErrorService, ErrorWrapper, ILocalFilter, Pane } from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport each from 'lodash-es/each';\nimport filter from 'lodash-es/filter';\nimport find from 'lodash-es/find';\nimport map from 'lodash-es/map';\nimport reduce from 'lodash-es/reduce';\nimport uniqWith from 'lodash-es/uniqWith';\nimport { ActionViewModel } from './action-view-model';\nimport { ChoiceViewModel } from './choice-view-model';\nimport { DragAndDropService } from './drag-and-drop.service';\nimport { FieldViewModel } from './field-view-model';\nimport { IDraggableViewModel } from './idraggable-view-model';\nimport { IMessageViewModel } from './imessage-view-model';\nimport { MenuItemViewModel } from './menu-item-view-model';\nimport * as Msg from './user-messages';\nimport { validateMandatory, validateMandatoryAgainstType } from './validate';\nimport { Router } from '@angular/router';\n\nexport function copy(event: KeyboardEvent, item: IDraggableViewModel, drandAndDrop: DragAndDropService) {\n    const cKeyCode = 67;\n    if (event && (event.keyCode === cKeyCode && event.ctrlKey)) {\n        drandAndDrop.setCopyViewModel(item);\n        event.preventDefault();\n    }\n}\n\nexport function tooltip(onWhat: { clientValid: () => boolean }, fields: FieldViewModel[]): string {\n    if (onWhat.clientValid()) {\n        return '';\n    }\n\n    const missingMandatoryFields = filter(fields, p => !p.clientValid && !p.getMessage());\n\n    if (missingMandatoryFields.length > 0) {\n        return reduce(missingMandatoryFields, (s, t) => s + t.title + '; ', Msg.mandatoryFieldsPrefix);\n    }\n\n    const invalidFields = filter(fields, p => !p.clientValid);\n\n    if (invalidFields.length > 0) {\n        return reduce(invalidFields, (s, t) => s + t.title + '; ', Msg.invalidFieldsPrefix);\n    }\n\n    return '';\n}\n\nfunction getMenuNameForLevel(menupath: string, level: number) {\n    let menu = '';\n\n    if (menupath && menupath.length > 0) {\n        const menus = menupath.split('_');\n\n        if (menus.length > level) {\n            menu = menus[level];\n        }\n    }\n\n    return menu || '';\n}\n\nfunction removeDuplicateMenuNames(menus: { name: string, action: ActionViewModel }[]) {\n    return uniqWith(menus,\n        (m1, m2) => {\n            if (m1.name && m2.name) {\n                return m1.name === m2.name;\n            }\n            return false;\n        });\n}\n\nexport function createSubmenuItems(avms: ActionViewModel[], menuSlot: { name: string, action: ActionViewModel }, level: number): MenuItemViewModel {\n    // if not root menu aggregate all actions with same name\n    let menuActions: ActionViewModel[];\n    let menuItems: MenuItemViewModel[] | null;\n\n    if (menuSlot.name) {\n        const actions = filter(avms, a => getMenuNameForLevel(a.menuPath, level) === menuSlot.name && !getMenuNameForLevel(a.menuPath, level + 1));\n        menuActions = actions;\n\n        // then collate submenus\n        const submenuActions = filter(avms, a => getMenuNameForLevel(a.menuPath, level) === menuSlot.name && !!getMenuNameForLevel(a.menuPath, level + 1));\n        let menuSubSlots = map(submenuActions, a => ({ name: getMenuNameForLevel(a.menuPath, level + 1), action: a }));\n        menuSubSlots = removeDuplicateMenuNames(menuSubSlots);\n\n        menuItems = map(menuSubSlots, slot => createSubmenuItems(submenuActions, slot, level + 1));\n    } else {\n        menuActions = [menuSlot.action];\n        menuItems = null;\n    }\n\n    return new MenuItemViewModel(menuSlot.name, menuActions, menuItems);\n}\n\nexport function createMenuItems(avms: ActionViewModel[]) {\n\n    // first create a top level menu for each action\n    // note at top level we leave 'un-menued' actions\n    // use an anonymous object locally so we can construct objects with readonly properties\n    let menuSlots = map(avms, a => ({ name: getMenuNameForLevel(a.menuPath, 0), action: a }));\n\n    // remove non unique submenus\n    menuSlots = removeDuplicateMenuNames(menuSlots);\n\n    // update submenus with all actions under same submenu\n    return map(menuSlots, slot => createSubmenuItems(avms, slot, 0));\n}\n\nexport function actionsTooltip(onWhat: { noActions: () => boolean }, actionsOpen: boolean) {\n    if (actionsOpen) {\n        return Msg.closeActions;\n    }\n    return onWhat.noActions() ? Msg.noActions : Msg.openActions;\n}\n\nexport function getCollectionDetails(count: number | null) {\n    if (count == null) {\n        return Msg.unknownCollectionSize;\n    }\n\n    if (count === 0) {\n        return Msg.emptyCollectionSize;\n    }\n\n    const postfix = count === 1 ? 'Item' : 'Items';\n\n    return `${count} ${postfix}`;\n}\n\nexport function drop(context: ContextService, error: ErrorService, vm: FieldViewModel, newValue: IDraggableViewModel) {\n    return context.isSubTypeOf(newValue.draggableType, vm.returnType).\n        then((canDrop: boolean) => {\n            if (canDrop) {\n                vm.setNewValue(newValue);\n                return true;\n            }\n            return false;\n        }).\n        catch((reject: ErrorWrapper) => error.handleError(reject));\n}\n\nfunction validateAgainstType(model: Ro.IHasExtensions, modelValue: string | ChoiceViewModel | string[] | ChoiceViewModel[], viewValue: string, localFilter?: ILocalFilter): string {\n    // first check\n\n    const mandatory = validateMandatory(model, viewValue);\n\n    if (mandatory) {\n        return mandatory;\n    }\n\n    // if optional but empty always valid\n    if (modelValue == null || modelValue === '') {\n        return '';\n    }\n\n    return validateMandatoryAgainstType(model, viewValue, localFilter);\n}\n\nexport function validate(rep: Ro.IHasExtensions, vm: FieldViewModel, modelValue: string | ChoiceViewModel | string[] | ChoiceViewModel[], viewValue: string, mandatoryOnly: boolean) {\n    const message = mandatoryOnly ? validateMandatory(rep, viewValue) : validateAgainstType(rep, modelValue, viewValue, vm.localFilter);\n\n    if (message !== Msg.mandatory) {\n        vm.setMessage(message);\n    } else {\n        vm.resetMessage();\n    }\n\n    vm.clientValid = !message;\n    return vm.clientValid;\n}\n\nexport function setScalarValueInView(vm: { value: string | number | boolean | Date | null }, propertyRep: Ro.PropertyMember, value: Ro.Value) {\n    vm.value = value.scalar();\n}\n\nexport function dirtyMarker(context: ContextService, configService: ConfigService, oid: Ro.ObjectIdWrapper) {\n    return (configService.config.showDirtyFlag && context.getIsDirty(oid)) ? '*' : '';\n}\n\nexport function createChoiceViewModels(id: string, choices: Dictionary<Ro.Value>, searchTerm?: string) {\n    return Promise.resolve(map(choices, (v, k) => new ChoiceViewModel(v, id, k, searchTerm)));\n}\n\nexport function handleErrorResponse(err: Ro.ErrorMap, messageViewModel: IMessageViewModel, valueViewModels: FieldViewModel[]) {\n\n    let requiredFieldsMissing = false; // only show warning message if we have nothing else\n    let fieldValidationErrors = false;\n    let contributedParameterErrorMsg = '';\n\n    each(err.valuesMap(), (errorValue, k) => {\n\n        const valueViewModel = find(valueViewModels, vvm => vvm.id === k);\n\n        if (valueViewModel) {\n            const reason = errorValue.invalidReason;\n            if (reason) {\n                if (reason === 'Mandatory') {\n                    const r = 'REQUIRED';\n                    requiredFieldsMissing = true;\n                    valueViewModel.description = valueViewModel.description.indexOf(r) === 0 ? valueViewModel.description : `${r} ${valueViewModel.description}`;\n                } else {\n                    valueViewModel.setMessage(reason);\n                    fieldValidationErrors = true;\n                }\n            }\n        } else {\n            // no matching parm for message - this can happen in contributed actions\n            // make the message a dialog level warning.\n            contributedParameterErrorMsg = errorValue.invalidReason || '';\n        }\n    });\n\n    let msg = contributedParameterErrorMsg || err.invalidReason() || '';\n    if (requiredFieldsMissing) { msg = `${msg} Please complete REQUIRED fields. `; }\n    if (fieldValidationErrors) { msg = `${msg} See field validation message(s). `; }\n\n    if (!msg) { msg = err.warningMessage; }\n    messageViewModel.setMessage(msg);\n}\n\nexport function incrementPendingPotentAction(context: ContextService, invokableaction: Ro.ActionRepresentation | Ro.InvokableActionMember, paneId: Pane) {\n    if (invokableaction.isPotent()) {\n        context.incPendingPotentActionOrReload(paneId);\n    }\n}\n\nexport function decrementPendingPotentAction(context: ContextService, invokableaction: Ro.ActionRepresentation | Ro.InvokableActionMember, paneId: Pane) {\n    if (invokableaction.isPotent()) {\n        context.decPendingPotentActionOrReload(paneId);\n    }\n}\n\nexport function handleUrlLink(action: { extensions(): Ro.Extensions }, actionResult: Ro.ActionResultRepresentation, router: Router) {\n    const urlLink = action.extensions().urlLink();\n    if (urlLink) {\n        const [newPane] = urlLink.split(',');\n        const newPaneBool = newPane.toLowerCase() === 'true';\n\n        const href = actionResult.result().scalar()?.value().toString();\n        if (href) {\n            if (newPaneBool) {\n                window.open(href, '_blank');\n            }\n            else if (href.startsWith('http')) {\n                window.location.href = href;\n            }\n            else {\n                const tree = router.createUrlTree([href]);\n                router.navigateByUrl(tree);\n            }\n        }\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport {\n    ClickHandlerService,\n    ContextService,\n    ErrorService,\n    ErrorWrapper,\n    InteractionMode,\n    Pane,\n    PaneRouteData,\n    UrlManagerService\n} from '@nakedobjects/services';\nimport { Dictionary, every } from 'lodash';\nimport forEach from 'lodash-es/forEach';\nimport map from 'lodash-es/map';\nimport pickBy from 'lodash-es/pickBy';\nimport zipObject from 'lodash-es/zipObject';\nimport * as Helpers from './helpers-view-models';\nimport { IMessageViewModel } from './imessage-view-model';\nimport { ParameterViewModel } from './parameter-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\nimport { Router } from '@angular/router';\nimport { handleUrlLink } from './helpers-view-models';\n\nexport class ActionViewModel {\n\n    constructor(\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly context: ContextService,\n        private readonly urlManager: UrlManagerService,\n        private readonly error: ErrorService,\n        private readonly clickHandler: ClickHandlerService,\n        public readonly actionRep: Ro.ActionMember | Ro.ActionRepresentation,\n        private readonly vm: IMessageViewModel,\n        private readonly routeData: PaneRouteData,\n        private readonly router: Router\n    ) {\n\n        if (actionRep instanceof Ro.ActionRepresentation || actionRep instanceof Ro.InvokableActionMember) {\n            this.invokableActionRep = actionRep;\n        }\n\n        this.paneId = routeData.paneId;\n        this.title = actionRep.extensions().friendlyName();\n        this.presentationHint = actionRep.extensions().presentationHint();\n        this.menuPath = actionRep.extensions().menuPath() || '';\n        this.description = this.disabled() ? actionRep.disabledReason() : actionRep.extensions().description();\n        this.editProperties = actionRep.extensions().editProperties()?.split(',') ?? [];\n        this.createNewProperties = actionRep.extensions().createNewProperties()?.split(',') ?? [];\n        this.doInvoke = this.showDialog() ? this.invokeWithDialog : this.invokeWithoutDialog;\n    }\n\n    readonly paneId: Pane;\n    readonly menuPath: string;\n    readonly title: string;\n    readonly description: string;\n    readonly presentationHint: string;\n    readonly editProperties: string[];\n    readonly createNewProperties: string[];\n    readonly isCreateNew: boolean | undefined;\n    gotoResult = true;\n    invokableActionRep?: Ro.ActionRepresentation | Ro.InvokableActionMember;\n\n    // form actions should never show dialogs\n    readonly showDialog = () => this.actionRep.extensions().hasParams() && (this.routeData.interactionMode !== InteractionMode.Form);\n\n    private readonly incrementPendingPotentAction = () => {\n        Helpers.incrementPendingPotentAction(this.context, this.invokableActionRep!, this.paneId);\n    };\n\n    private readonly decrementPendingPotentAction = () => {\n        Helpers.decrementPendingPotentAction(this.context, this.invokableActionRep!, this.paneId);\n    };\n\n    readonly invokeWithDialog = (_right?: boolean) => {\n        // clear any previous dialog so we don't pick up values from it\n        this.context.clearDialogCachedValues(this.paneId);\n\n        if (this.createNewProperties.length > 0) {\n            this.parameters().then(pps => {\n                const pNames = map(pps, p => p.title);\n\n                if (every(pNames, p => this.createNewProperties.includes(p))) {\n                    this.urlManager.openCreateNewDialog(this.actionRep, this.paneId);\n                } else {\n                    this.urlManager.setDialogOrMultiLineDialog(this.actionRep, this.paneId);\n                    this.context.broadcastMessage('Showing CreateNew dialog as ordinary dialog because of mismatched names');\n                }\n            });\n        } else {\n            this.urlManager.setDialogOrMultiLineDialog(this.actionRep, this.paneId);\n        }\n    };\n\n    readonly invokeWithoutDialogWithParameters = (parameters: Promise<ParameterViewModel[]>, right?: boolean) => {\n        return parameters\n            .then((pps: ParameterViewModel[]) => {\n                return this.execute(pps, right);\n            });\n    };\n\n    private readonly invokeWithoutDialog = (right?: boolean) => {\n        this.incrementPendingPotentAction();\n        this.invokeWithoutDialogWithParameters(this.parameters(), right)\n            .then((actionResult: Ro.ActionResultRepresentation) => {\n                this.decrementPendingPotentAction();\n                // if expect result and no warning from server generate one here\n                if (actionResult.shouldExpectResult() && !actionResult.warningsOrMessages()) {\n                    this.context.broadcastWarning(Msg.noResultMessage);\n                }\n                handleUrlLink(this.actionRep, actionResult, this.router);\n            })\n            .catch((reject: ErrorWrapper) => {\n                this.decrementPendingPotentAction();\n                const display = (em: Ro.ErrorMap) => this.vm.setMessage(em.invalidReason() || em.warningMessage);\n                this.error.handleErrorAndDisplayMessages(reject, display);\n            });\n    };\n\n    // open dialog on current pane always - invoke action goes to pane indicated by click\n    // note this can be modified by decorators\n   \n    doInvoke;\n\n    private getInvokable() {\n        if (this.invokableActionRep) {\n            return Promise.resolve(this.invokableActionRep);\n        }\n\n        return this.context.getInvokableAction(this.actionRep)\n            .then((details: Ro.ActionRepresentation | Ro.InvokableActionMember) => {\n                this.invokableActionRep = details;\n                return details;\n            });\n    }\n\n    // note this is modified by decorators\n    execute = (pps: ParameterViewModel[], right?: boolean): Promise<Ro.ActionResultRepresentation> => {\n        const parmMap = zipObject(map(pps, p => p.id), map(pps, p => p.getValue())) as Dictionary<Ro.Value>;\n        forEach(pps, p => this.urlManager.setParameterValue(this.actionRep.actionId(), p.parameterRep, p.getValue(), this.paneId));\n        return this.getInvokable()\n            .then((details: Ro.ActionRepresentation | Ro.InvokableActionMember) => this.context.invokeAction(details, parmMap, this.paneId, this.clickHandler.pane(this.paneId, right), this.gotoResult));\n    };\n\n    readonly disabled = () => !!this.actionRep.disabledReason();\n\n    readonly returnsScalar = () => this.actionRep.returnsScalar() && !this.actionRep.extensions().urlLink();\n\n    readonly tempDisabled = () => this.invokableActionRep &&\n        this.invokableActionRep.isPotent() &&\n        this.context.isPendingPotentActionOrReload(this.paneId);\n\n    private getParameters(invokableAction: Ro.ActionRepresentation | Ro.InvokableActionMember) {\n        const parameters = pickBy(invokableAction.parameters(), p => !p.isCollectionContributed()) as Dictionary<Ro.Parameter>;\n        const parms = this.routeData.actionParams!;\n        return map(parameters, parm => this.viewModelFactory.parameterViewModel(parm, parms[parm.id()], this.paneId));\n    }\n\n    readonly parameters = () => {\n\n        if (this.invokableActionRep) {\n            const pps = this.getParameters(this.invokableActionRep);\n            return Promise.resolve(pps);\n        }\n\n        return this.context.getInvokableAction(this.actionRep)\n            .then((details: Ro.ActionRepresentation | Ro.InvokableActionMember) => {\n                this.invokableActionRep = details;\n                return this.getParameters(details);\n            });\n    };\n\n    readonly makeInvokable = (details: Ro.ActionRepresentation | Ro.InvokableActionMember) => this.invokableActionRep = details;\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ConfigService, ContextService, ErrorService, ErrorWrapper } from '@nakedobjects/services';\nimport * as Msg from './user-messages';\n\nexport class ApplicationPropertiesViewModel {\n\n    constructor(\n        private readonly context: ContextService,\n        private readonly error: ErrorService,\n        private readonly configService: ConfigService\n    ) {\n        this.setUp();\n    }\n\n    serverVersion?: Ro.IVersionRepresentation;\n    user?: Ro.IUserRepresentation;\n    serverUrl?: string;\n    applicationName?: string;\n\n    get userName() {\n        return this.user ? this.user.userName : Msg.noUserMessage;\n    }\n\n    private setUp() {\n        this.context.getUser().\n            then((u: Ro.UserRepresentation) => this.user = u.wrapped()).\n            catch((reject: ErrorWrapper) => this.error.handleError(reject));\n\n        this.context.getVersion().\n            then((v: Ro.VersionRepresentation) => this.serverVersion = v.wrapped()).\n            catch((reject: ErrorWrapper) => this.error.handleError(reject));\n\n        this.serverUrl = this.configService.config.appPath;\n\n        this.applicationName = this.configService.config.applicationName;\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ContextService, ErrorService, ErrorWrapper, Pane } from '@nakedobjects/services';\nimport * as Msg from './user-messages';\n\nexport class AttachmentViewModel {\n\n    constructor(\n        public readonly link: Ro.Link,\n        private readonly parent: Ro.DomainObjectRepresentation,\n        private readonly context: ContextService,\n        private readonly error: ErrorService,\n        public readonly onPaneId: Pane\n    ) {\n        this.href = link.href();\n        this.mimeType = link.type()!.asString;\n        this.title = link.title() || Msg.unknownFileTitle;\n    }\n\n    private readonly href: string;\n    private readonly mimeType: string;\n    empty = false;\n    title: string;\n    readonly downloadFile = () => this.context.getFile(this.parent, this.href, this.mimeType);\n    readonly clearCachedFile = () => this.context.clearCachedFile(this.href);\n\n    readonly displayInline = () =>\n        this.mimeType === 'image/jpeg' ||\n        this.mimeType === 'image/gif' ||\n        this.mimeType === 'application/octet-stream';\n\n    setImage(setImageOn: { image?: string, title: string }) {\n        this.downloadFile().then(blob => {\n            if (blob.size > 0) {\n                const reader = new FileReader();\n                reader.onloadend = () => {\n                    if (reader.result) {\n                        setImageOn.image = reader.result as string;\n                    }\n                };\n                reader.readAsDataURL(blob);\n            } else {\n                this.empty = true;\n                this.title = this.emptyMessage;\n            }\n            setImageOn.title = this.title;\n        }).catch((reject: ErrorWrapper) => this.error.handleError(reject));\n    }\n\n    setTitle(setTitleOn: { title: string }) {\n        setTitleOn.title = this.title;\n    }\n\n    get emptyMessage() {\n        return this.displayInline() ? Msg.noImageMessage : Msg.noFileMessage; \n    }\n\n}\n","import { IMessageViewModel } from './imessage-view-model';\n\nexport abstract class MessageViewModel implements IMessageViewModel {\n    private previousMessage = '';\n    private message = '';\n\n    readonly clearMessage = () => {\n        if (this.message === this.previousMessage) {\n            this.resetMessage();\n        } else {\n            this.previousMessage = this.message;\n        }\n    };\n    readonly resetMessage = () => this.message = this.previousMessage = '';\n    readonly setMessage = (msg: string) => this.message = msg;\n    readonly getMessage = () => this.message;\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport {\n    ContextService,\n    ErrorCategory,\n    ErrorService,\n    ErrorWrapper,\n    HttpStatusCode,\n    Pane,\n    PaneRouteData,\n    UrlManagerService\n    } from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport clone from 'lodash-es/clone';\nimport each from 'lodash-es/each';\nimport every from 'lodash-es/every';\nimport filter from 'lodash-es/filter';\nimport find from 'lodash-es/find';\nimport first from 'lodash-es/first';\nimport forEach from 'lodash-es/forEach';\nimport keys from 'lodash-es/keys';\nimport map from 'lodash-es/map';\nimport some from 'lodash-es/some';\nimport toArray from 'lodash-es/toArray';\nimport values from 'lodash-es/values';\nimport { ActionViewModel } from './action-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { ItemViewModel } from './item-view-model';\nimport { MenuItemViewModel } from './menu-item-view-model';\nimport { MessageViewModel } from './message-view-model';\nimport { ParameterViewModel } from './parameter-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport abstract class ContributedActionParentViewModel extends MessageViewModel {\n\n    protected constructor(\n        protected readonly context: ContextService,\n        protected readonly viewModelFactory: ViewModelFactoryService,\n        protected readonly urlManager: UrlManagerService,\n        protected readonly error: ErrorService,\n        public readonly onPaneId: Pane\n    ) {\n        super();\n    }\n\n    items?: ItemViewModel[];\n    actions?: ActionViewModel[];\n    menuItems: MenuItemViewModel[] = [];\n    readonly allSelected = () => every(this.items, item => item.selected);\n\n    private isLocallyContributed(action: Ro.ActionRepresentation | Ro.InvokableActionMember) {\n        return some(action.parameters(), p => p.isCollectionContributed());\n    }\n\n    setActions(actions: Dictionary<Ro.ActionMember>, routeData: PaneRouteData) {\n        this.actions = map(actions, action => this.viewModelFactory.actionViewModel(action, this, routeData)).filter(avm => !avm.returnsScalar());\n        this.menuItems = Helpers.createMenuItems(this.actions);\n        forEach(this.actions, a => this.decorate(a));\n    }\n\n    protected collectionContributedActionDecorator(actionViewModel: ActionViewModel) {\n        const wrappedInvoke = actionViewModel.execute;\n        actionViewModel.execute = (pps: ParameterViewModel[], right?: boolean) => {\n\n            const selected = filter(this.items, i => i.selected);\n\n            const rejectAsNeedSelection = (action: Ro.ActionRepresentation | Ro.InvokableActionMember): ErrorWrapper | null => {\n                if (this.isLocallyContributed(action)) {\n                    if (selected.length === 0) {\n                        const em = new Ro.ErrorMap({}, 0, Msg.noItemsSelected);\n                        const rp = new ErrorWrapper(ErrorCategory.HttpClientError, HttpStatusCode.UnprocessableEntity, em);\n                        return rp;\n                    }\n                }\n                return null;\n            };\n\n            const getParms = (action: Ro.ActionRepresentation | Ro.InvokableActionMember) => {\n\n                const parms = values(action.parameters()) as Ro.Parameter[];\n                const contribParm = find(parms, p => p.isCollectionContributed());\n\n                if (contribParm) {\n                    const parmValue = new Ro.Value(map(selected, i => i.link));\n                    const collectionParmVm = this.viewModelFactory.parameterViewModel(contribParm, parmValue, this.onPaneId);\n\n                    const allpps = clone(pps);\n                    allpps.push(collectionParmVm);\n                    return allpps;\n                }\n                return pps;\n            };\n\n            const detailsPromise = actionViewModel.invokableActionRep\n                ? Promise.resolve(actionViewModel.invokableActionRep)\n                : this.context.getActionDetails(actionViewModel.actionRep as Ro.ActionMember);\n\n            return detailsPromise.\n                then(details => {\n                    const rp = rejectAsNeedSelection(details);\n                    return rp ? Promise.reject(rp) : wrappedInvoke(getParms(details), right);\n                }).\n                then(result => {\n                    // clear selected items on void actions\n                    this.clearSelected(result);\n                    return result;\n                });\n        };\n    }\n\n    protected collectionContributedInvokeDecorator(actionViewModel: ActionViewModel) {\n\n        const showDialog = () =>\n            this.context.getInvokableAction(actionViewModel.actionRep).\n                then(invokableAction => {\n                    actionViewModel.makeInvokable(invokableAction);\n                    const keyCount = keys(invokableAction.parameters()).length;\n                    return keyCount > 1 || keyCount === 1 && !toArray(invokableAction.parameters())[0].isCollectionContributed();\n                });\n\n        // make sure not invokable  while waiting for promise to assign correct function\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        actionViewModel.doInvoke = () => { };\n\n        const invokeWithoutDialog = (right?: boolean) =>\n            actionViewModel.invokeWithoutDialogWithParameters(Promise.resolve([]), right).\n            then((actionResult: Ro.ActionResultRepresentation) => {\n                this.setMessage(actionResult.shouldExpectResult() ? actionResult.warningsOrMessages() || Msg.noResultMessage : '');\n                // clear selected items on void actions\n                this.clearSelected(actionResult);\n            }).\n            catch((reject: ErrorWrapper) => {\n                this.setMessage(reject.message);\n                this.error.handleError(reject);\n            });\n\n        showDialog().\n            then(show => actionViewModel.doInvoke = show ? actionViewModel.invokeWithDialog : invokeWithoutDialog).\n            catch((reject: ErrorWrapper) => this.error.handleError(reject));\n    }\n\n    protected decorate(actionViewModel: ActionViewModel) {\n        this.collectionContributedActionDecorator(actionViewModel);\n        this.collectionContributedInvokeDecorator(actionViewModel);\n    }\n\n    private setItems(newValue: boolean) {\n        each(this.items, item => item.silentSelect(newValue));\n        // TODO fix \"!\"\n        const id = first(this.items)!.id;\n        this.urlManager.setAllItemsSelected(newValue, id, this.onPaneId);\n    }\n\n    protected clearSelected(result: Ro.ActionResultRepresentation) {\n        if (result.resultType() === 'void') {\n            this.setItems(false);\n        }\n    }\n\n    readonly selectAll = () => {\n        const newState = !this.allSelected();\n        this.setItems(newState);\n    };\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport {\n    CollectionViewState,\n    ColorService,\n    ConfigService,\n    ContextService,\n    ErrorService,\n    ErrorWrapper,\n    InteractionMode,\n    LoggerService,\n    PaneRouteData,\n    UrlManagerService\n} from '@nakedobjects/services';\nimport find from 'lodash-es/find';\nimport some from 'lodash-es/some';\nimport { ContributedActionParentViewModel } from './contributed-action-parent-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { ItemViewModel } from './item-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class CollectionViewModel extends ContributedActionParentViewModel {\n\n    constructor(\n        viewModelFactory: ViewModelFactoryService,\n        private readonly colorService: ColorService,\n        error: ErrorService,\n        context: ContextService,\n        urlManager: UrlManagerService,\n        private readonly configService: ConfigService,\n        private readonly loggerService: LoggerService,\n        public readonly collectionRep: Ro.CollectionMember | Ro.CollectionRepresentation,\n        public readonly routeData: PaneRouteData,\n        forceReload: boolean\n    ) {\n        super(context, viewModelFactory, urlManager, error, routeData.paneId);\n        this.title = collectionRep.extensions().friendlyName();\n        this.presentationHint = collectionRep.extensions().presentationHint();\n        this.pluralName = collectionRep.extensions().pluralName();\n        this.name = collectionRep.collectionId().toLowerCase();\n\n        this.colorService.toColorNumberFromType(collectionRep.extensions().elementType()).\n            then(c => this.color = `${this.configService.config.linkColor}${c}`).\n            catch((reject: ErrorWrapper) => this.error.handleError(reject));\n\n        this.reset(routeData, forceReload);\n    }\n\n    private readonly template?: string;\n    private readonly messages?: string;\n    private readonly pluralName?: string;\n\n    private color?: string;\n    private editing?: boolean;\n\n    readonly title: string;\n    readonly name: string;\n    readonly presentationHint: string;\n\n    details?: string;\n    mayHaveItems?: boolean;\n    header?: string[];\n    currentState?: CollectionViewState;\n\n    readonly reset = (routeData: PaneRouteData, resetting: boolean) => {\n\n        let state = routeData.collections![this.collectionRep.collectionId()];\n\n        // collections are always shown as summary on transient\n        if (routeData.interactionMode === InteractionMode.Transient) {\n            state = CollectionViewState.Summary;\n        }\n\n        function getDefaultTableState(exts: Ro.Extensions) {\n            if (exts.renderEagerly()) {\n                return exts.tableViewColumns() || exts.tableViewTitle() ? CollectionViewState.Table : CollectionViewState.List;\n            }\n            return CollectionViewState.Summary;\n        }\n\n        if (state == null) {\n            state = getDefaultTableState(this.collectionRep.extensions());\n        }\n\n        this.editing = routeData.interactionMode === InteractionMode.Edit;\n\n        if (resetting || state !== this.currentState) {\n\n            const size = this.collectionRep.size();\n            const itemLinks = this.collectionRep.value();\n\n            if (size == null || size > 0) {\n                this.mayHaveItems = true;\n            }\n            this.details = Helpers.getCollectionDetails(size);\n            const getDetails = itemLinks == null || state === CollectionViewState.Table;\n\n            const actions = this.collectionRep.actionMembers();\n            this.setActions(actions, routeData);\n\n            if (state === CollectionViewState.Summary) {\n                this.items = [];\n            } else if (getDetails) {\n                this.context.getCollectionDetails(this.collectionRep as Ro.CollectionMember, state, resetting).\n                    then(details => {\n                        this.items = this.viewModelFactory.getItems(details.value()!,\n                            state === CollectionViewState.Table,\n                            routeData,\n                            this);\n                        this.details = Helpers.getCollectionDetails(this.items.length);\n                    }).\n                    catch((reject: ErrorWrapper) => this.error.handleError(reject));\n            } else {\n                this.items = this.viewModelFactory.getItems(itemLinks!, this.currentState === CollectionViewState.Table, routeData, this);\n            }\n            this.currentState = state;\n        }\n    };\n\n    readonly doSummary = () => this.urlManager.setCollectionMemberState(this.collectionRep.collectionId(), CollectionViewState.Summary, this.onPaneId);\n    readonly doList = () => this.urlManager.setCollectionMemberState(this.collectionRep.collectionId(), CollectionViewState.List, this.onPaneId);\n    readonly doTable = () => this.urlManager.setCollectionMemberState(this.collectionRep.collectionId(), CollectionViewState.Table, this.onPaneId);\n    readonly hasTableData = () => this.items && some(this.items, (i: ItemViewModel) => i.tableRowViewModel);\n\n    readonly description = () => this.details!.toString();\n\n    readonly noActions = () => this.editing || !this.actions || this.actions.length === 0;\n\n    readonly actionMember = (id: string) => {\n        const actionViewModel = find(this.actions, a => a.actionRep.actionId() === id);\n        if (actionViewModel) {\n            return actionViewModel.actionRep;\n        }\n        return this.loggerService.throw(`CollectionViewModel:actionMember no member ${id} on ${this.name}`);\n    };\n\n    private hasActionMember(id: string) {\n        return !!find(this.actions, a => a.actionRep.actionId() === id);\n    }\n\n    readonly hasMatchingLocallyContributedAction = (id: string) => {\n        return id && this.actions && this.actions.length > 0 && this.hasActionMember(id);\n    };\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ContextService, ErrorService, ErrorWrapper, Pane, PaneRouteData, UrlManagerService } from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport each from 'lodash-es/each';\nimport every from 'lodash-es/every';\nimport forEach from 'lodash-es/forEach';\nimport map from 'lodash-es/map';\nimport pickBy from 'lodash-es/pickBy';\nimport { ActionViewModel } from './action-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { MessageViewModel } from './message-view-model';\nimport { ParameterViewModel } from './parameter-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\nimport { handleUrlLink } from './helpers-view-models';\nimport { Router } from '@angular/router';\n\nexport class DialogViewModel extends MessageViewModel {\n    constructor(\n        private readonly context: ContextService,\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly urlManager: UrlManagerService,\n        private readonly error: ErrorService,\n        routeData: PaneRouteData,\n        private readonly router: Router,\n        action: Ro.ActionRepresentation | Ro.InvokableActionMember,\n        actionViewModel: ActionViewModel | null,\n        public readonly isMultiLineDialogRow: boolean,\n        row?: number\n    ) {\n        super();\n\n        this.actionViewModel = actionViewModel || this.viewModelFactory.actionViewModel(action, this, routeData);\n\n        this.onPaneId = routeData.paneId;\n\n        const fields = this.context.getDialogCachedValues(this.actionMember().actionId(), this.onPaneId);\n\n        const parameters = pickBy(this.actionViewModel.invokableActionRep!.parameters(), p => !p.isCollectionContributed()) as Dictionary<Ro.Parameter>;\n        this.parameters = map(parameters, p => this.viewModelFactory.parameterViewModel(p, fields[p.id()], this.onPaneId));\n\n        this.title = this.actionMember().extensions().friendlyName();\n        this.isQueryOnly = this.actionViewModel.invokableActionRep!.isQueryOnly();\n        this.resetMessage();\n        this.id = this.actionViewModel.actionRep.actionId();\n\n        this.incrementPendingPotentAction();\n\n        if (this.isMultiLineDialogRow) {\n            this.actionViewModel.gotoResult = false;\n            this.parameters.forEach(p => p.setAsRow(row!));\n        }\n    }\n\n    private readonly onPaneId: Pane;\n    private readonly isQueryOnly: boolean;\n    readonly title: string;\n    readonly id: string;\n    readonly parameters: ParameterViewModel[];\n    submitted = false;\n    closed = false; // make sure we never close more than once\n\n    public readonly actionViewModel: ActionViewModel;\n\n    private incrementPendingPotentAction() {\n        if (!this.isMultiLineDialogRow) {\n            Helpers.incrementPendingPotentAction(this.context, this.actionViewModel.invokableActionRep!, this.onPaneId);\n        }\n    }\n\n    private decrementPendingPotentAction() {\n        if (!this.isMultiLineDialogRow && !this.closed) {\n            Helpers.decrementPendingPotentAction(this.context, this.actionViewModel.invokableActionRep!, this.onPaneId);\n        }\n        this.closed = true;\n    }\n\n    private readonly actionMember = () => this.actionViewModel.actionRep;\n\n    private readonly execute = (right?: boolean) => {\n        const pps = this.parameters;\n        return this.actionViewModel.execute(pps, right);\n    };\n\n    readonly refresh = () => {\n        const fields = this.context.getDialogCachedValues(this.actionMember().actionId(), this.onPaneId);\n        forEach(this.parameters, p => p.refresh(fields[p.id]));\n    };\n\n    readonly clientValid = () => every(this.parameters, p => p.clientValid);\n\n    readonly tooltip = () => Helpers.tooltip(this, this.parameters);\n\n    readonly setParms = () => forEach(this.parameters, p => this.context.cacheFieldValue(this.actionMember().actionId(), p.parameterRep.id(), p.getValue(), this.onPaneId));\n\n    readonly doInvoke = (right?: boolean) =>\n        this.execute(right)\n            .then((actionResult: Ro.ActionResultRepresentation) => {\n                if (actionResult.shouldExpectResult()) {\n                    this.setMessage(actionResult.warningsOrMessages() || Msg.noResultMessage);\n                } else if (actionResult.resultType() === 'void') {\n                    // dialog staying on same page so treat as cancel\n                    // for url replacing purposes and have to explicitly close\n                    this.doCloseReplaceHistory();\n                } else if (!this.isQueryOnly) {\n                    // not query only and going to new page mark as complete\n                    // and have to explicitly close\n                    this.doCloseKeepHistory();\n                } else {\n                    // query only - if on same pane will be replaced if on other pane\n                    // will stay open\n                    this.doComplete();\n                }\n                handleUrlLink(this.actionMember(), actionResult, this.router);\n            })\n            .catch((reject: ErrorWrapper) => {\n                const display = (em: Ro.ErrorMap) => Helpers.handleErrorResponse(em, this, this.parameters);\n                this.error.handleErrorAndDisplayMessages(reject, display);\n            });\n\n    private submit() {\n        if (this.isMultiLineDialogRow) {\n            this.submitted = true;\n        }\n    }\n\n    doCloseKeepUrl = () => {\n        this.doComplete();\n    };\n\n    doCloseKeepHistory = () => {\n        this.urlManager.closeDialogKeepHistory(this.id, this.onPaneId);\n        this.doComplete();\n    };\n\n    doCloseReplaceHistory = () => {\n        this.urlManager.closeDialogReplaceHistory(this.id, this.onPaneId);\n        this.doComplete();\n    };\n\n    private doComplete() {\n        this.decrementPendingPotentAction();\n        this.submit();\n    }\n\n    clearMessages = () => {\n        this.resetMessage();\n        this.actionViewModel.parameters().then(pp => each(pp, p => p.clearMessage()));\n    };\n\n    getMessageOrSubmitted = () => {\n        return this.submitted ? Msg.submittedMessage : this.getMessage();\n    };\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport {\n    ColorService,\n    ConfigService,\n    ContextService,\n    ErrorService,\n    ErrorWrapper,\n    InteractionMode,\n    Pane,\n    PaneRouteData,\n    UrlManagerService\n} from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport every from 'lodash-es/every';\nimport filter from 'lodash-es/filter';\nimport forEach from 'lodash-es/forEach';\nimport fromPairs from 'lodash-es/fromPairs';\nimport map from 'lodash-es/map';\nimport mapValues from 'lodash-es/mapValues';\nimport values from 'lodash-es/values';\nimport without from 'lodash-es/without';\nimport zipObject from 'lodash-es/zipObject';\nimport { ActionViewModel } from './action-view-model';\nimport { ChoiceViewModel } from './choice-view-model';\nimport { CollectionViewModel } from './collection-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { IMenuHolderViewModel } from './imenu-holder-view-model';\nimport { MenuItemViewModel } from './menu-item-view-model';\nimport { MessageViewModel } from './message-view-model';\nimport { ParameterViewModel } from './parameter-view-model';\nimport { PropertyViewModel } from './property-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class DomainObjectViewModel extends MessageViewModel implements IMenuHolderViewModel {\n\n    constructor(\n        private readonly colorService: ColorService,\n        private readonly contextService: ContextService,\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly urlManager: UrlManagerService,\n        private readonly error: ErrorService,\n        private readonly configService: ConfigService,\n        obj: Ro.DomainObjectRepresentation,\n        public routeData: PaneRouteData,\n        forceReload: boolean\n    ) {\n        super();\n        this.reset(obj, routeData, forceReload);\n    }\n\n    private props!: Dictionary<Ro.Value>;\n    unsaved!: boolean;\n\n    // IDraggableViewModel\n    value!: string;\n    reference = '';\n    selectedChoice!: ChoiceViewModel | null;\n    color = '';\n    draggableType!: string;\n\n    domainObject!: Ro.DomainObjectRepresentation;\n    onPaneId!: Pane;\n\n    title!: string;\n    friendlyName!: string;\n    presentationHint!: string;\n    domainType!: string;\n\n    isInEdit!: boolean;\n\n    actions!: ActionViewModel[];\n    menuItems!: MenuItemViewModel[];\n    properties!: PropertyViewModel[];\n    collections!: CollectionViewModel[];\n\n    draggableTitle = () => this.title;\n\n    private readonly editProperties = () => filter(this.properties, p => p.isEditable);\n\n    private readonly isFormOrTransient = () => this.domainObject.extensions().interactionMode() === 'form' || this.domainObject.extensions().interactionMode() === 'transient';\n\n    private readonly cancelHandler = () => this.isFormOrTransient() ? () => this.urlManager.popUrlState(this.onPaneId) : () => this.urlManager.setInteractionMode(InteractionMode.View, this.onPaneId);\n\n    private readonly saveHandler = (): (object: Ro.DomainObjectRepresentation, props: Dictionary<Ro.Value>, paneId: Pane, viewSavedObject: boolean) => Promise<Ro.DomainObjectRepresentation> =>\n        this.domainObject.isTransient() ? this.contextService.saveObject : this.contextService.updateObject;\n\n    private readonly validateHandler = () => this.domainObject.isTransient() ? this.contextService.validateSaveObject : this.contextService.validateUpdateObject;\n\n    private handleWrappedError(reject: ErrorWrapper) {\n        const display = (em: Ro.ErrorMap) => Helpers.handleErrorResponse(em, this, this.properties);\n        this.error.handleErrorAndDisplayMessages(reject, display);\n    }\n\n    // leave this a lambda as it's passed as a function and we must keep the 'this'.\n    private propertyMap = () => {\n        const pps = filter(this.properties, property => property.isEditable);\n        return zipObject(map(pps, p => p.id), map(pps, p => p.getValue())) as Dictionary<Ro.Value>;\n    };\n\n    private wrapAction(a: ActionViewModel) {\n        const wrappedInvoke = a.execute;\n        a.execute = (pps: ParameterViewModel[], right?: boolean) => {\n            this.setProperties();\n            const pairs = map(this.editProperties(), p => [p.id, p.getValue()]);\n            const prps = fromPairs(pairs) as Dictionary<Ro.Value>;\n\n            const parmValueMap = mapValues(a.invokableActionRep!.parameters(), p => ({ parm: p, value: prps[p.id()] }));\n            const allpps = map(parmValueMap, o => this.viewModelFactory.parameterViewModel(o.parm, o.value, this.onPaneId));\n            return wrappedInvoke(allpps, right)\n                .catch((reject: ErrorWrapper) => {\n                    this.handleWrappedError(reject);\n                    return Promise.reject(reject);\n                });\n        };\n    }\n\n    private reset(obj: Ro.DomainObjectRepresentation, routeData: PaneRouteData, resetting: boolean) {\n        this.domainObject = obj;\n        this.onPaneId = routeData.paneId;\n        this.routeData = routeData;\n        const iMode = this.domainObject.extensions().interactionMode();\n        this.isInEdit = routeData.interactionMode !== InteractionMode.View || iMode === 'form' || iMode === 'transient';\n        this.props = routeData.interactionMode !== InteractionMode.View ? this.contextService.getObjectCachedValues(this.domainObject.id(), routeData.paneId) : {};\n\n        const actionMembers = values(this.domainObject.actionMembers()) as Ro.ActionMember[];\n        const allActions = map(actionMembers, action => this.viewModelFactory.actionViewModel(action, this, this.routeData)).filter(avm => !avm.returnsScalar());\n\n        // don't show editActions in menu\n        const editActions = allActions.filter(avm => avm.editProperties.length > 0);\n        this.actions = without(allActions, ...editActions);\n\n        const editActionTuples: [ActionViewModel, string[]][] = map(editActions, a => [a, a.editProperties]) as [ActionViewModel, string[]][];\n\n        this.menuItems = Helpers.createMenuItems(this.actions);\n\n        this.properties = map(this.domainObject.propertyMembers(), (property, id) => this.viewModelFactory.propertyViewModel(property, id!, this.props[id!], this.onPaneId, this.propertyMap, editActionTuples));\n        this.collections = map(this.domainObject.collectionMembers(), collection => this.viewModelFactory.collectionViewModel(collection, this.routeData, resetting));\n\n        this.unsaved = routeData.interactionMode === InteractionMode.Transient;\n\n        this.title = this.unsaved ? `Unsaved ${this.domainObject.extensions().friendlyName()}` : this.domainObject.title();\n\n        this.title = this.title + Helpers.dirtyMarker(this.contextService, this.configService, obj.getOid());\n\n        this.friendlyName = this.domainObject.extensions().friendlyName();\n        this.presentationHint = this.domainObject.extensions().presentationHint();\n        this.domainType = this.domainObject.domainType()!;\n        this.draggableType = this.domainObject.domainType()!;\n\n        const selfAsValue = (): Ro.Value | null => {\n            const link = this.domainObject.selfLink();\n            if (link) {\n                // not transient - can't drag transients so no need to set up IDraggable members on transients\n                link.setTitle(this.title);\n                return new Ro.Value(link);\n            }\n            return null;\n        };\n        const sav = selfAsValue();\n\n        this.value = sav ? sav.toString() : '';\n        this.reference = sav ? sav.toValueString() : '';\n        this.selectedChoice = sav ? new ChoiceViewModel(sav, '') : null;\n\n        this.colorService.toColorNumberFromType(this.domainObject.domainType())\n            .then(c => this.color = `${this.configService.config.objectColor}${c}`)\n            .catch((reject: ErrorWrapper) => this.error.handleError(reject));\n\n        this.resetMessage();\n\n        if (routeData.interactionMode === InteractionMode.Form) {\n            forEach(this.actions, a => this.wrapAction(a));\n        }\n    }\n\n    concurrency() {\n        this.routeData = this.urlManager.getRouteData().pane(this.onPaneId)!;\n        this.contextService.getObject(this.onPaneId, this.domainObject.getOid(), this.routeData.interactionMode!)\n            .then((obj: Ro.DomainObjectRepresentation) => {\n                // cleared cached values so all values are from reloaded representation\n                this.contextService.clearObjectCachedValues(this.onPaneId);\n                return this.contextService.reloadObject(this.onPaneId, obj);\n            })\n            .then((reloadedObj: Ro.DomainObjectRepresentation) => {\n                if (this.routeData.dialogId) {\n                    this.urlManager.closeDialogReplaceHistory(this.routeData.dialogId, this.onPaneId);\n                }\n                this.reset(reloadedObj, this.routeData, true);\n                const em = new Ro.ErrorMap({}, 0, Msg.concurrencyMessage);\n                Helpers.handleErrorResponse(em, this, this.properties);\n            })\n            .catch((reject: ErrorWrapper) => this.error.handleError(reject));\n    }\n\n    readonly clientValid = () => every(this.properties, p => p.clientValid);\n\n    readonly tooltip = () => Helpers.tooltip(this, this.properties);\n\n    readonly actionsTooltip = () => Helpers.actionsTooltip(this, !!this.routeData.actionsOpen);\n\n    readonly toggleActionMenu = () => {\n        this.urlManager.toggleObjectMenu(this.onPaneId);\n    };\n\n    readonly setProperties = () => forEach(this.editProperties(),\n        p => this.contextService.cachePropertyValue(this.domainObject, p.propertyRep, p.getValue(), this.onPaneId));\n\n    readonly doEditCancel = () => {\n\n        this.contextService.clearObjectCachedValues(this.onPaneId);\n        this.cancelHandler()();\n    };\n\n    readonly clearCachedFiles = () => forEach(this.properties, p => p.attachment ? p.attachment.clearCachedFile() : null);\n\n    readonly doSave = (viewObject: boolean, onSuccess: () => void) => {\n        this.clearCachedFiles();\n        const propMap = this.propertyMap();\n        return this.saveHandler()(this.domainObject, propMap, this.onPaneId, viewObject)\n            .then((obj: Ro.DomainObjectRepresentation) => {\n                onSuccess();\n                this.reset(obj, this.urlManager.getRouteData().pane(this.onPaneId)!, true);\n            })\n            .catch((reject: ErrorWrapper) => this.handleWrappedError(reject));\n    };\n\n    readonly currentPaneData = () => this.urlManager.getRouteData().pane(this.onPaneId)!;\n\n    readonly doSaveValidate = () => {\n        const propMap = this.propertyMap();\n\n        return this.validateHandler()(this.domainObject, propMap)\n            .then(() => {\n                this.resetMessage();\n                return true;\n            })\n            .catch((reject: ErrorWrapper) => {\n                this.handleWrappedError(reject);\n                return Promise.reject(false);\n            });\n    };\n\n    readonly doEdit = () => {\n        this.clearCachedFiles();\n        this.contextService.clearObjectCachedValues(this.onPaneId);\n        this.contextService.getObjectForEdit(this.onPaneId, this.domainObject)\n            .then((updatedObject: Ro.DomainObjectRepresentation) => {\n                this.reset(updatedObject, this.currentPaneData(), true);\n                this.urlManager.pushUrlState(this.onPaneId);\n                this.urlManager.setInteractionMode(InteractionMode.Edit, this.onPaneId);\n            })\n            .catch((reject: ErrorWrapper) => this.handleWrappedError(reject));\n    };\n\n    readonly doReload = () => {\n        this.clearCachedFiles();\n        this.contextService.reloadObject(this.onPaneId, this.domainObject)\n            .then((updatedObject: Ro.DomainObjectRepresentation) => this.reset(updatedObject, this.currentPaneData(), true))\n            .catch((reject: ErrorWrapper) => this.handleWrappedError(reject));\n    };\n\n    readonly hideEdit = () => this.isFormOrTransient() || every(this.properties, p => !p.isEditable);\n\n    readonly noActions = () => !this.actions || this.actions.length === 0;\n\n    readonly canDropOn = (targetType: string) => this.contextService.isSubTypeOf(this.domainType, targetType);\n\n    readonly showActions = () => !!this.currentPaneData().actionsOpen;\n\n    readonly getTitle = (mode?: InteractionMode) => {\n        const prefix = mode === InteractionMode.Edit || mode === InteractionMode.Transient ? `${Msg.editing} - ` : '';\n        return `${prefix}${this.title}`;\n    };\n\n    public friendTypeName() {\n        return Ro.friendlyTypeName(this.domainType);\n    }\n}\n","import { ErrorWrapper, ErrorCategory, HttpStatusCode } from '@nakedobjects/services';\n\nexport class ErrorViewModel {\n\n    constructor(error: ErrorWrapper | null) {\n        this.originalError = error;\n        if (error) {\n            this.title = error.title;\n            this.description = error.description;\n            this.errorCode = error.errorCode;\n            this.message = error.message;\n            const stackTrace = error.stackTrace;\n\n            this.stackTrace = stackTrace && stackTrace.length !== 0 ? stackTrace : null;\n\n            this.isConcurrencyError =\n                error.category === ErrorCategory.HttpClientError &&\n                error.httpErrorCode === HttpStatusCode.PreconditionFailed;\n        }\n\n        this.description = this.description || 'No description available';\n        this.errorCode = this.errorCode || 'No code available';\n        this.message = this.message || 'No message available';\n        this.stackTrace = this.stackTrace || ['No stack trace available'];\n    }\n\n    readonly originalError: ErrorWrapper | null;\n    readonly title?: string;\n    readonly message?: string;\n    readonly stackTrace?: string[] | null;\n    readonly errorCode?: string;\n    readonly description?: string;\n    readonly isConcurrencyError: boolean = false;\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ColorService, ConfigService, ContextService, ErrorService, ErrorWrapper, Pane, UrlManagerService } from '@nakedobjects/services';\nimport { ChoiceViewModel } from './choice-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { IDraggableViewModel } from './idraggable-view-model';\n\nexport class LinkViewModel implements IDraggableViewModel {\n\n    constructor(\n        protected readonly context: ContextService,\n        protected readonly colorService: ColorService,\n        protected readonly error: ErrorService,\n        protected readonly urlManager: UrlManagerService,\n        private readonly configService: ConfigService,\n        public readonly link: Ro.Link,\n        public readonly paneId: Pane\n    ) {\n\n        this.title = link.title() + Helpers.dirtyMarker(this.context, this.configService, link.getOid(this.configService.config.keySeparator));\n        this.domainType = link.type()!.domainType!;\n\n        // for dropping\n        const value = new Ro.Value(link);\n\n        this.value = value.toString();\n        this.reference = value.toValueString();\n        this.selectedChoice = new ChoiceViewModel(value, '');\n        this.draggableType = this.domainType;\n\n        this.colorService.toColorNumberFromHref(link.href()).\n            then(c => this.color = `${this.configService.config.linkColor}${c}`).\n            catch((reject: ErrorWrapper) => this.error.handleError(reject));\n    }\n\n    readonly title: string;\n    private readonly domainType: string;\n\n    // IDraggableViewModel\n    color= '';\n    readonly value: Ro.ScalarValueType;\n    readonly reference: string;\n    readonly selectedChoice: ChoiceViewModel;\n    readonly draggableType: string;\n\n    readonly draggableTitle = () => this.title;\n\n    readonly canDropOn = (targetType: string) => this.context.isSubTypeOf(this.domainType, targetType);\n\n    // because may be clicking on menu already open so want to reset focus\n    readonly doClick = (_right?: boolean) => {\n        const menuId = this.link.rel()?.parms[0].value;\n        if (menuId) {\n            this.urlManager.setMenu(menuId, this.paneId);\n        }\n    };\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ClickHandlerService, ColorService, ConfigService, ContextService, ErrorService, Pane, UrlManagerService } from '@nakedobjects/services';\nimport { LinkViewModel } from './link-view-model';\nimport { TableRowViewModel } from './table-row-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class ItemViewModel extends LinkViewModel {\n\n    constructor(\n        context: ContextService,\n        colorService: ColorService,\n        error: ErrorService,\n        urlManager: UrlManagerService,\n        configService: ConfigService,\n        link: Ro.Link,\n        paneId: Pane,\n        private readonly clickHandler: ClickHandlerService,\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly index: number,\n        private isSelected: boolean,\n        public readonly id: string\n    ) {\n        super(context, colorService, error, urlManager, configService, link, paneId);\n\n        const members = link.members();\n\n        if (members) {\n            this.tableRowViewModel = this.viewModelFactory.tableRowViewModel(members, paneId, this.title);\n        }\n    }\n\n    readonly tableRowViewModel?: TableRowViewModel;\n\n    readonly selectionChange = () => {\n        this.urlManager.setItemSelected(this.index, this.selected, this.id, this.paneId);\n    };\n\n    override readonly doClick = (right?: boolean) => {\n        const currentPane = this.clickHandler.pane(this.paneId, right);\n        this.urlManager.setItem(this.link, currentPane);\n    };\n\n    set selected(v: boolean) {\n        this.isSelected = v;\n        this.selectionChange();\n    }\n\n    get selected() {\n        return this.isSelected;\n    }\n\n    silentSelect(v: boolean) {\n        this.isSelected = v;\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport {\n    CollectionViewState,\n    ColorService,\n    ContextService,\n    ErrorService,\n    ErrorWrapper,\n    LoggerService,\n    PaneRouteData,\n    UrlManagerService\n} from '@nakedobjects/services';\nimport find from 'lodash-es/find';\nimport { ContributedActionParentViewModel } from './contributed-action-parent-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { IMenuHolderViewModel } from './imenu-holder-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class ListViewModel extends ContributedActionParentViewModel implements IMenuHolderViewModel {\n\n    constructor(\n        private readonly colorService: ColorService,\n        context: ContextService,\n        viewModelFactory: ViewModelFactoryService,\n        urlManager: UrlManagerService,\n        error: ErrorService,\n        private readonly loggerService: LoggerService,\n        list: Ro.ListRepresentation,\n        public routeData: PaneRouteData\n    ) {\n        super(context, viewModelFactory, urlManager, error, routeData.paneId);\n        this.reset(list, routeData);\n        const actions = this.listRep.actionMembers();\n        this.setActions(actions, routeData);\n    }\n\n    private page!: number;\n    private pageSize!: number;\n    private numPages!: number;\n    private state!: CollectionViewState;\n    id!: string;\n    listRep!: Ro.ListRepresentation;\n    size!: number;\n    header: string[] | null = null;\n    description!: () => string;\n    readonly name = 'item';\n\n    private readonly earlierDisabled = () => this.page === 1 || this.numPages === 1;\n\n    private readonly laterDisabled = () => this.page === this.numPages || this.numPages === 1;\n\n   \n    readonly pageFirstDisabled = this.earlierDisabled;\n    readonly pageLastDisabled = this.laterDisabled;\n    readonly pageNextDisabled = this.laterDisabled;\n    readonly pagePreviousDisabled = this.earlierDisabled;\n   \n\n    private readonly recreate = (page: number, pageSize: number) => {\n        return this.routeData.objectId\n            ? this.context.getListFromObject(this.routeData, page, pageSize)\n            : this.context.getListFromMenu(this.routeData, page, pageSize);\n    };\n\n    readonly currentPaneData = () => this.urlManager.getRouteData().pane(this.onPaneId)!;\n\n    private readonly pageOrRecreate = (newPage: number, newPageSize: number, newState: CollectionViewState) => {\n        this.recreate(newPage, newPageSize)\n            .then((list: Ro.ListRepresentation) => {\n                this.urlManager.setListPaging(newPage, newPageSize, newState, this.onPaneId);\n                this.routeData = this.currentPaneData();\n                this.reset(list, this.routeData);\n            })\n            .catch((reject: ErrorWrapper) => {\n                const display = (em: Ro.ErrorMap) => this.setMessage(em.invalidReason() || em.warningMessage);\n                this.error.handleErrorAndDisplayMessages(reject, display);\n            });\n    };\n\n    private readonly setPage = (newPage: number, newState: CollectionViewState) => {\n        this.pageOrRecreate(newPage, this.pageSize, newState);\n    };\n\n    private readonly updateItems = (value: Ro.Link[]) => {\n        this.items = this.viewModelFactory.getItems(value,\n            this.state === CollectionViewState.Table,\n            this.routeData,\n            this);\n\n        const totalCount = this.listRep.pagination()!.totalCount;\n        const count = this.items.length;\n        this.size = count;\n        if (count > 0) {\n            this.description = () => Msg.pageMessage(this.page, this.numPages, count, totalCount);\n        } else {\n            this.description = () => Msg.noItemsFound;\n        }\n    };\n\n    readonly hasTableData = () => this.listRep.hasTableData();\n\n    readonly refresh = (routeData: PaneRouteData) => {\n\n        this.routeData = routeData;\n        if (this.state !== routeData.state) {\n            if (routeData.state === CollectionViewState.Table && !this.hasTableData()) {\n                this.recreate(this.page, this.pageSize)\n                    .then(list => {\n                        this.state = list.hasTableData() ? CollectionViewState.Table : CollectionViewState.List;\n                        this.listRep = list;\n                        this.updateItems(list.value());\n                    })\n                    .catch((reject: ErrorWrapper) => {\n                        this.error.handleError(reject);\n                    });\n            } else {\n                this.state = routeData.state ?? CollectionViewState.List;\n                this.updateItems(this.listRep.value());\n            }\n        }\n    };\n\n    readonly reset = (list: Ro.ListRepresentation, routeData: PaneRouteData) => {\n        this.listRep = list;\n        this.routeData = routeData;\n\n        this.id = this.urlManager.getListCacheIndex(routeData.paneId, routeData.page!, routeData.pageSize!);\n\n        this.page = this.listRep.pagination()!.page;\n        this.pageSize = this.listRep.pagination()!.pageSize;\n        this.numPages = this.listRep.pagination()!.numPages;\n\n        this.state = this.listRep.hasTableData() ? CollectionViewState.Table : CollectionViewState.List;\n        this.updateItems(list.value());\n    };\n\n    readonly toggleActionMenu = () => {\n        if (this.noActions()) { return; }\n        this.urlManager.toggleObjectMenu(this.onPaneId);\n    };\n\n    readonly pageNext = () => {\n        if (this.pageNextDisabled()) { return; }\n        this.setPage(this.page < this.numPages ? this.page + 1 : this.page, this.state);\n    };\n\n    readonly pagePrevious = () => {\n        if (this.pagePreviousDisabled()) { return; }\n        this.setPage(this.page > 1 ? this.page - 1 : this.page, this.state);\n    };\n\n    readonly pageFirst = () => {\n        if (this.pageFirstDisabled()) { return; }\n        this.setPage(1, this.state);\n    };\n\n    readonly pageLast = () => {\n        if (this.pageLastDisabled()) { return; }\n        this.setPage(this.numPages, this.state);\n    };\n\n    readonly doSummary = () => {\n        this.urlManager.setListState(CollectionViewState.Summary, this.onPaneId);\n    };\n\n    readonly doList = () => {\n        this.urlManager.setListState(CollectionViewState.List, this.onPaneId);\n    };\n\n    readonly doTable = () => {\n        this.urlManager.setListState(CollectionViewState.Table, this.onPaneId);\n    };\n\n    readonly reload = () => {\n        this.context.clearCachedList(this.onPaneId, this.routeData.page!, this.routeData.pageSize!);\n        this.setPage(this.page, this.state);\n    };\n\n    readonly noActions = () => !this.actions || this.actions.length === 0 || !this.items || this.items.length === 0;\n\n    readonly actionsTooltip = () => Helpers.actionsTooltip(this, !!this.routeData.actionsOpen);\n\n    readonly actionMember = (id: string) => {\n        const actionViewModel = find(this.actions, a => a.actionRep.actionId() === id);\n\n        if (actionViewModel) {\n            return actionViewModel.actionRep;\n        }\n        return this.loggerService.throw(`no actionviewmodel ${id} on ${this.id}`);\n    };\n\n    readonly showActions = () => {\n        return !!this.currentPaneData().actionsOpen;\n    };\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { PaneRouteData } from '@nakedobjects/services';\nimport map from 'lodash-es/map';\nimport { ActionViewModel } from './action-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { IMenuHolderViewModel } from './imenu-holder-view-model';\nimport { MenuItemViewModel } from './menu-item-view-model';\nimport { MessageViewModel } from './message-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class MenuViewModel extends MessageViewModel implements IMenuHolderViewModel {\n\n    constructor(\n        private readonly viewModelFactory: ViewModelFactoryService,\n        public readonly menuRep: Ro.MenuRepresentation,\n        public readonly routeData: PaneRouteData\n    ) {\n        super();\n\n        this.id = menuRep.menuId();\n\n        const actions = menuRep.actionMembers();\n        this.title = menuRep.title();\n        this.actions = map(actions, action => viewModelFactory.actionViewModel(action, this, routeData)).filter(avm => !avm.returnsScalar());\n        this.menuItems = Helpers.createMenuItems(this.actions);\n    }\n\n    private readonly id: string;\n    private readonly title: string;\n    private readonly actions: ActionViewModel[];\n    readonly menuItems: MenuItemViewModel[];\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { Pane } from '@nakedobjects/services';\nimport map from 'lodash-es/map';\nimport { LinkViewModel } from './link-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class MenusViewModel {\n    constructor(\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly menusRep: Ro.MenusRepresentation,\n        onPaneId: Pane\n    ) {\n        this.items = map(this.menusRep.value(), link => this.viewModelFactory.linkViewModel(link, onPaneId));\n    }\n\n    readonly items: LinkViewModel[];\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ColorService, ContextService, ErrorService, PaneRouteData, UrlManagerService } from '@nakedobjects/services';\nimport filter from 'lodash-es/filter';\nimport map from 'lodash-es/map';\nimport range from 'lodash-es/range';\nimport takeRight from 'lodash-es/takeRight';\nimport { CollectionViewModel } from './collection-view-model';\nimport { DialogViewModel } from './dialog-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\nimport * as Msg from './user-messages';\n\nexport class MultiLineDialogViewModel {\n\n    constructor(\n        private readonly color: ColorService,\n        private readonly context: ContextService,\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly urlManager: UrlManagerService,\n        private readonly error: ErrorService,\n        private readonly routeData: PaneRouteData,\n        private readonly action: Ro.ActionRepresentation | Ro.InvokableActionMember,\n        holder: Ro.MenuRepresentation | Ro.DomainObjectRepresentation | CollectionViewModel\n    ) {\n\n        if (holder instanceof Ro.DomainObjectRepresentation) {\n            this.objectTitle = holder.title();\n            this.objectFriendlyName = holder.extensions().friendlyName();\n        }\n\n        const initialCount = action.extensions().multipleLines() || 1;\n\n        this.dialogs = map(range(initialCount), i => this.createRow(i));\n        this.title = this.dialogs[0].title;\n\n        if (this.action.parent){\n            this.action.parent.etagDigest = '*';\n        }\n    }\n\n    readonly objectFriendlyName: string = '';\n    readonly objectTitle: string = '';\n    readonly title: string;\n    readonly dialogs: DialogViewModel[];\n\n    private readonly createRow = (i: number) => {\n        return this.viewModelFactory.dialogViewModel(this.routeData, this.action as Ro.ActionRepresentation | Ro.InvokableActionMember, null, true, i);\n    };\n\n    readonly header = () => this.dialogs.length === 0 ? [] : map(this.dialogs[0].parameters, p => p.title);\n\n    readonly invokeAndAdd = (index: number) => {\n        this.dialogs[index].doInvoke();\n        this.context.clearDialogCachedValues();\n        return this.add(index);\n    };\n\n    private readonly pushNewDialog = () => this.dialogs.push(this.createRow(this.dialogs.length)) - 1;\n\n    private readonly add = (index: number) => {\n        if (index === this.dialogs.length - 1) {\n            // if this is last dialog always add another\n            return this.pushNewDialog();\n        } else if (takeRight(this.dialogs)[0].submitted) {\n            // if the last dialog is submitted add another\n            return this.pushNewDialog();\n        }\n        return 0;\n    };\n\n    readonly submittedCount = () => filter(this.dialogs, d => d.submitted).length;\n\n    readonly submittedCountMsg = () => {\n        return Msg.submittedCount(this.submittedCount());\n    };\n}\n","import { AbstractControl } from '@angular/forms';\nimport * as Ro from '@nakedobjects/restful-objects';\nimport { ColorService, ConfigService, ContextService, ErrorService, ErrorWrapper, ILocalFilter, Pane } from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport concat from 'lodash-es/concat';\nimport every from 'lodash-es/every';\nimport filter from 'lodash-es/filter';\nimport find from 'lodash-es/find';\nimport fromPairs from 'lodash-es/fromPairs';\nimport map from 'lodash-es/map';\nimport some from 'lodash-es/some';\nimport { ChoiceViewModel } from './choice-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { IDraggableViewModel } from './idraggable-view-model';\nimport { MessageViewModel } from './message-view-model';\nimport * as Msg from './user-messages';\n\nexport abstract class FieldViewModel extends MessageViewModel {\n\n    protected constructor(\n        private readonly rep: Ro.IHasExtensions,\n        protected readonly colorService: ColorService,\n        protected readonly error: ErrorService,\n        protected readonly context: ContextService,\n        private readonly configService: ConfigService,\n        public readonly onPaneId: Pane,\n        public readonly isScalar: boolean,\n        public readonly id: string,\n        public readonly isCollectionContributed: boolean,\n        public readonly entryType: Ro.EntryType,\n        public readonly isEditable: boolean\n    ) {\n        super();\n        const ext = rep.extensions();\n        this.optional = ext.optional();\n        this.description = ext.description();\n        this.presentationHint = ext.presentationHint();\n        this.mask = ext.mask();\n        this.title = ext.friendlyName();\n        this.returnType = ext.returnType()!;\n        this.format = Ro.withNull(ext.format());\n        this.multipleLines = ext.multipleLines() || 1;\n        this.password = ext.dataType() === 'password';\n        this.type = isScalar ? 'scalar' : 'ref';\n        this.argId = `${id.toLowerCase()}`;\n        this.paneArgId = `${this.argId}${onPaneId}`;\n    }\n\n    readonly argId: string;\n    paneArgId: string;\n\n    readonly optional: boolean;\n    description: string;\n    readonly presentationHint: string;\n    readonly mask: string;\n    readonly title: string;\n    readonly returnType: string;\n    readonly format: Ro.FormatType | null;\n    readonly multipleLines: number;\n    readonly password: boolean;\n    readonly type: 'scalar' | 'ref';\n\n    clientValid = true;\n    reference = '';\n    minLength?: number;\n    color = '';\n    promptArguments?: Dictionary<Ro.Value>;\n    currentValue?: Ro.Value;\n    originalValue?: Ro.Value;\n    localFilter?: ILocalFilter;\n    formattedValue?: string;\n    private currentChoice: ChoiceViewModel | null = null;\n    private currentMultipleChoices?: ChoiceViewModel[];\n    private currentRawValue: Ro.ScalarValueType | Date | null = null;\n    private choiceOptions: ChoiceViewModel[] = [];\n    hasValue = false;\n\n    file?: Ro.Link;\n\n    refresh: (newValue: Ro.Value) => void = () => { throw new Error('Uninitialized'); };\n    prompt?: (searchTerm: string) => Promise<ChoiceViewModel[]>;\n    conditionalChoices?: (args: Dictionary<Ro.Value>) => Promise<ChoiceViewModel[]>;\n\n    readonly drop = (newValue: IDraggableViewModel) => Helpers.drop(this.context, this.error, this, newValue);\n\n    readonly validate = (modelValue: string | ChoiceViewModel | string[] | ChoiceViewModel[], viewValue: string, mandatoryOnly: boolean) =>\n        Helpers.validate(this.rep, this, modelValue, viewValue, mandatoryOnly);\n\n    get choices(): ChoiceViewModel[] {\n        return this.choiceOptions;\n    }\n\n    set choices(options: ChoiceViewModel[]) {\n        this.choiceOptions = options;\n\n        if (this.entryType === Ro.EntryType.MultipleConditionalChoices) {\n            const currentSelectedOptions = this.selectedMultiChoices;\n            this.selectedMultiChoices = filter(this.choiceOptions, c => some(currentSelectedOptions, choiceToSet => c.valuesEqual(choiceToSet)));\n        } else if (this.entryType === Ro.EntryType.ConditionalChoices) {\n            const currentSelectedOption = this.selectedChoice;\n            this.selectedChoice = find(this.choiceOptions, c => c.valuesEqual(currentSelectedOption)) ?? null;\n        }\n\n        if (!this.optional && !this.hasValue && this.entryType !== Ro.EntryType.AutoComplete) {\n            // mandatory and not selected so add a mandatory indicator choice\n            const indicatorChoice = new ChoiceViewModel(new Ro.Value(''), this.id, '*');\n            this.choiceOptions = concat<ChoiceViewModel>([indicatorChoice], this.choices);\n            this.selectedChoice = indicatorChoice;\n        }\n    }\n\n    get selectedChoice(): ChoiceViewModel | null {\n        return this.currentChoice;\n    }\n\n    set selectedChoice(newChoice: ChoiceViewModel | null) {\n        // type guard because angular pushes string value here until directive finds\n        // choice\n        if (newChoice instanceof ChoiceViewModel || newChoice == null) {\n            this.currentChoice = newChoice;\n            this.update();\n        }\n    }\n\n    get value(): Ro.ScalarValueType | Date | null {\n        return this.currentRawValue;\n    }\n\n    set value(newValue: Ro.ScalarValueType | Date | null) {\n        this.currentRawValue = newValue;\n        this.update();\n    }\n\n    get selectedMultiChoices(): ChoiceViewModel[] | undefined {\n        return this.currentMultipleChoices;\n    }\n\n    set selectedMultiChoices(choices: ChoiceViewModel[] | undefined) {\n        this.currentMultipleChoices = choices;\n        this.update();\n    }\n\n    private isValid(viewValue: string | ChoiceViewModel | string[] | ChoiceViewModel[]): boolean {\n\n        let val: string;\n\n        if (viewValue instanceof ChoiceViewModel) {\n            val = viewValue.getValue().toValueString();\n        } else if (viewValue instanceof Array) {\n            if (viewValue.length) {\n                return every(viewValue as (string | ChoiceViewModel)[], v => this.isValid(v));\n            }\n            val = '';\n        } else {\n            val = viewValue as string;\n        }\n\n        if (this.entryType === Ro.EntryType.AutoComplete && !(viewValue instanceof ChoiceViewModel)) {\n\n            if (val) {\n                this.setMessage(Msg.pendingAutoComplete);\n                this.clientValid = false;\n                return false;\n            } else if (!this.optional) {\n                this.resetMessage();\n                this.clientValid = false;\n                return false;\n            }\n        }\n\n        // only fully validate freeform scalar\n        const fullValidate = this.entryType === Ro.EntryType.FreeForm && this.type === 'scalar';\n\n        return this.validate(viewValue, val, !fullValidate);\n    }\n\n    readonly validator = (c: AbstractControl): Record<string, string> | null => {\n        const viewValue = c.value as string | ChoiceViewModel | string[] | ChoiceViewModel[];\n        const isvalid = this.isValid(viewValue);\n        return isvalid ? null : { invalid: 'invalid entry' };\n    };\n\n    readonly setNewValue = (newValue: IDraggableViewModel) => {\n        this.selectedChoice = newValue.selectedChoice;\n        this.value = newValue.value;\n        this.reference = newValue.reference;\n    };\n\n    readonly clear = () => {\n        this.selectedChoice = null;\n        this.value = null;\n        this.reference = '';\n    };\n\n    protected update() {\n        this.setColor();\n    }\n\n    protected setupChoices(choices: Dictionary<Ro.Value>) {\n        this.choices = map(choices, (v, n) => new ChoiceViewModel(v, this.id, n));\n    }\n\n    protected setupAutocomplete(rep: Ro.IField, parentValues: () => Dictionary<Ro.Value>, digest?: string | null) {\n\n        this.prompt = (searchTerm: string) => {\n            const createcvm = (choices : Dictionary<Ro.Value>) => Helpers.createChoiceViewModels(this.id, choices, searchTerm);\n            return this.context.autoComplete(rep, this.id, parentValues, searchTerm, digest).then(createcvm);\n        };\n        const promptLink = rep.promptLink() as Ro.Link; // always\n        this.minLength = promptLink.extensions().minLength() as number; // always\n        this.description = this.description || Msg.autoCompletePrompt;\n    }\n\n    protected setupConditionalChoices(rep: Ro.IField, digest?: string | null) {\n\n        this.conditionalChoices = (args: Dictionary<Ro.Value>) => {\n            const createcvm = (choices : Dictionary<Ro.Value>) => Helpers.createChoiceViewModels(this.id, choices, undefined);\n            return this.context.conditionalChoices(rep, this.id, () => ({} as Dictionary<Ro.Value>), args, digest).then(createcvm);\n        };\n        const promptLink = rep.promptLink() as Ro.Link;\n        this.promptArguments = fromPairs(map(promptLink!.arguments()!, (v : Ro.IValue, key) => [key, new Ro.Value(v.value)]));\n    }\n\n    protected getRequiredIndicator() {\n        return this.optional || typeof this.value === 'boolean' ? '' : '* ';\n    }\n\n    private setColor() {\n\n        if (this.entryType === Ro.EntryType.AutoComplete && this.selectedChoice && this.type === 'ref') {\n            const href = this.selectedChoice.getValue().getHref();\n            if (href) {\n                this.colorService.toColorNumberFromHref(href)\n                    .then(c => {\n                        // only if we still have a choice may have been cleared by a later call\n                        if (this.selectedChoice) {\n                            this.color = `${this.configService.config.linkColor}${c}`;\n                        }\n                    })\n                    .catch((reject: ErrorWrapper) => this.error.handleError(reject));\n                return;\n            }\n        } else if (this.entryType !== Ro.EntryType.AutoComplete && this.value) {\n            this.colorService.toColorNumberFromType(this.returnType)\n                .then(c => {\n                    // only if we still have a value may have been cleared by a later call\n                    if (this.value) {\n                        this.color = `${this.configService.config.linkColor}${c}`;\n                    }\n                })\n                .catch((reject: ErrorWrapper) => this.error.handleError(reject));\n            return;\n        }\n\n        this.color = '';\n    }\n\n    readonly setValueFromControl = (newValue: Ro.ScalarValueType | Date | ChoiceViewModel | ChoiceViewModel[]) => {\n\n        if (newValue instanceof Array) {\n            this.selectedMultiChoices = newValue;\n        } else if (newValue instanceof ChoiceViewModel) {\n            this.selectedChoice = newValue;\n        } else {\n            this.value = newValue;\n        }\n    };\n\n    readonly getValueForControl = () => this.selectedMultiChoices || this.selectedChoice || this.value;\n\n    readonly setInvalidDate = () => this.setMessage(Msg.invalidDate);\n\n    readonly setInvalidTime = () => this.setMessage(Msg.invalidTime);\n\n    readonly getValue = () => {\n\n        if (this.entryType === Ro.EntryType.File) {\n            return new Ro.Value(this.file!);\n        }\n\n        if (this.entryType !== Ro.EntryType.FreeForm || this.isCollectionContributed) {\n\n            if (this.entryType === Ro.EntryType.MultipleChoices || this.entryType === Ro.EntryType.MultipleConditionalChoices || this.isCollectionContributed) {\n                const selections = this.selectedMultiChoices || [];\n                if (this.type === 'scalar') {\n                    const selValues = map(selections, (cvm: ChoiceViewModel) => cvm.getValue().scalar());\n                    return new Ro.Value(selValues);\n                }\n                const selRefs = map(selections, cvm => ({ href: cvm.getValue().getHref()!, title: cvm.name })); // reference\n                return new Ro.Value(selRefs);\n            }\n\n            const choiceValue = this.selectedChoice ? this.selectedChoice.getValue() : null;\n            if (this.type === 'scalar') {\n                return new Ro.Value(choiceValue && choiceValue.scalar() != null ? choiceValue.scalar() : '');\n            }\n\n            // reference\n            return new Ro.Value(choiceValue && choiceValue.isReference() && this.selectedChoice ? { href: choiceValue.getHref()!, title: this.selectedChoice.name } : null);\n        }\n\n        if (this.type === 'scalar') {\n            if (this.value == null) {\n                return new Ro.Value('');\n            }\n\n            if (this.value instanceof Date) {\n\n                if (this.format === 'time') {\n                    // time format\n                    return new Ro.Value(Ro.toTimeString(this.value as Date));\n                }\n\n                if (this.format === 'date') {\n                    // truncate time;\n                    return new Ro.Value(Ro.toDateString(this.value as Date));\n                }\n                // date-time\n                return new Ro.Value((this.value as Date).toISOString());\n            }\n\n            return new Ro.Value(this.value as Ro.ScalarValueType);\n        }\n\n        // reference\n        return new Ro.Value(this.reference ? { href: this.reference, title: this.value!.toString() } : null);\n    };\n\n    public friendlyTypeName() {\n        return Ro.friendlyTypeName(this.returnType);\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ColorService, ConfigService, ContextService, ErrorService, MaskService, Pane } from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport filter from 'lodash-es/filter';\nimport find from 'lodash-es/find';\nimport map from 'lodash-es/map';\nimport some from 'lodash-es/some';\nimport { ChoiceViewModel } from './choice-view-model';\nimport { FieldViewModel } from './field-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class ParameterViewModel extends FieldViewModel {\n\n    constructor(\n        public readonly parameterRep: Ro.Parameter,\n        onPaneId: Pane,\n        color: ColorService,\n        error: ErrorService,\n        private readonly maskService: MaskService,\n        private readonly previousValue: Ro.Value,\n        private readonly viewModelFactory: ViewModelFactoryService,\n        context: ContextService,\n        configService: ConfigService\n    ) {\n\n        super(parameterRep,\n            color,\n            error,\n            context,\n            configService,\n            onPaneId,\n            parameterRep.isScalar(),\n            parameterRep.id(),\n            parameterRep.isCollectionContributed(),\n            parameterRep.entryType(),\n            !parameterRep.disabledReason());\n\n        this.dflt = parameterRep.default().toString();\n        this.hasValue = !!this.dflt;\n\n        const fieldEntryType = this.entryType;\n\n        if (parameterRep.isScalar()) {\n            const remoteMask = parameterRep.extensions().mask();\n            this.localFilter = this.maskService.toLocalFilter(remoteMask, parameterRep.extensions().format()!);\n        }\n\n        if (fieldEntryType === Ro.EntryType.Choices || fieldEntryType === Ro.EntryType.MultipleChoices) {\n            this.setupParameterChoices();\n        }\n\n        if (fieldEntryType === Ro.EntryType.AutoComplete) {\n            this.setupParameterAutocomplete();\n        }\n\n        if (fieldEntryType === Ro.EntryType.FreeForm && this.type === 'ref') {\n            this.setupParameterFreeformReference();\n        }\n\n        if (fieldEntryType === Ro.EntryType.ConditionalChoices || fieldEntryType === Ro.EntryType.MultipleConditionalChoices) {\n            this.setupParameterConditionalChoices();\n        }\n\n        if (fieldEntryType !== Ro.EntryType.FreeForm || this.isCollectionContributed) {\n            this.setupParameterSelectedChoices();\n        } else {\n            this.setupParameterSelectedValue();\n        }\n\n        this.update();\n        this.description = this.getRequiredIndicator() + this.description;\n    }\n\n    private readonly dflt: string;\n\n    private setupParameterChoices() {\n        this.setupChoices(this.parameterRep.choices()!);\n    }\n\n    private setupParameterAutocomplete() {\n        const parmRep = this.parameterRep;\n        this.setupAutocomplete(parmRep, () => ({} as Dictionary<Ro.Value>));\n    }\n\n    private setupParameterFreeformReference() {\n        const parmRep = this.parameterRep;\n        this.description = this.description || Msg.dropPrompt;\n\n        const val = this.previousValue && !this.previousValue.isNull() ? this.previousValue : parmRep.default();\n\n        if (!val.isNull() && val.isReference()) {\n            const link = val.link()!;\n            this.reference = link.href();\n            this.selectedChoice = new ChoiceViewModel(val, this.id, link.title());\n        }\n    }\n\n    private setupParameterConditionalChoices() {\n        const parmRep = this.parameterRep;\n        this.setupConditionalChoices(parmRep);\n    }\n\n    private setupParameterSelectedChoices() {\n        const parmRep = this.parameterRep;\n        const fieldEntryType = this.entryType;\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const parmViewModel = this;\n        function setCurrentChoices(vals: Ro.Value) {\n            const list = vals.list()!;\n            const choicesToSet = map(list, val => new ChoiceViewModel(val, parmViewModel.id, val.link() ? val.link()!.title() : undefined));\n\n            if (fieldEntryType === Ro.EntryType.MultipleChoices) {\n                parmViewModel.selectedMultiChoices = filter(parmViewModel.choices, c => some(choicesToSet, choiceToSet => c.valuesEqual(choiceToSet)));\n            } else {\n                parmViewModel.selectedMultiChoices = choicesToSet;\n            }\n        }\n\n        function setCurrentChoice(val: Ro.Value) {\n            const choiceToSet = new ChoiceViewModel(val, parmViewModel.id, val.link() ? val.link()!.title() : undefined);\n\n            if (fieldEntryType === Ro.EntryType.Choices) {\n                const choices = parmViewModel.choices!;\n                parmViewModel.selectedChoice = find(choices, c => c.valuesEqual(choiceToSet)) || null;\n            } else {\n                if (!parmViewModel.selectedChoice || parmViewModel.selectedChoice.getValue().toValueString() !== choiceToSet.getValue().toValueString()) {\n                    parmViewModel.selectedChoice = choiceToSet;\n                }\n            }\n        }\n\n        parmViewModel.refresh = (newValue: Ro.Value) => {\n\n            if (newValue || parmViewModel.dflt) {\n                const toSet = newValue || parmRep.default();\n                if (fieldEntryType === Ro.EntryType.MultipleChoices || fieldEntryType === Ro.EntryType.MultipleConditionalChoices ||\n                    parmViewModel.isCollectionContributed) {\n                    setCurrentChoices(toSet);\n                } else {\n                    setCurrentChoice(toSet);\n                }\n            }\n        };\n\n        parmViewModel.refresh(this.previousValue);\n\n    }\n\n    private toTriStateBoolean(valueToSet: string | boolean | number | null): boolean | null {\n\n        // looks stupid but note type checking\n        if (valueToSet === true || valueToSet === 'true') {\n            return true;\n        }\n        if (valueToSet === false || valueToSet === 'false') {\n            return false;\n        }\n        return null;\n    }\n\n    private setupParameterSelectedValue() {\n        const parmRep = this.parameterRep;\n        const returnType = parmRep.extensions().returnType();\n\n        this.refresh = (newValue: Ro.Value) => {\n\n            if (returnType === 'boolean') {\n                const valueToSet = (newValue ? newValue.toValueString() : null) || parmRep.default().scalar();\n                const bValueToSet = this.toTriStateBoolean(valueToSet);\n\n                this.value = bValueToSet;\n            } else if (Ro.isDateOrDateTime(parmRep)) {\n                const date = Ro.toUtcDate(newValue || new Ro.Value(this.dflt));\n                this.value = date ? Ro.toDateString(date) : '';\n            } else if (Ro.isTime(parmRep)) {\n                const time = Ro.toTime(newValue || new Ro.Value(this.dflt));\n                this.value = time ? Ro.toTimeString(time) : '';\n            } else {\n                this.value = (newValue ? newValue.toString() : null) || this.dflt || '';\n            }\n        };\n\n        this.refresh(this.previousValue);\n    }\n\n    readonly setAsRow = (i: number) => this.paneArgId = `${this.argId}${i}`;\n\n    protected override update() {\n        super.update();\n\n        switch (this.entryType) {\n            case (Ro.EntryType.FreeForm):\n                if (this.type === 'scalar') {\n                    if (this.localFilter) {\n                        this.formattedValue = this.value ? this.localFilter.filter(this.value) : '';\n                    } else {\n                        this.formattedValue = this.value ? this.value.toString() : '';\n                    }\n                    break;\n                }\n                this.formattedValue = this.selectedChoice ? this.selectedChoice.toString() : '';\n                break;\n            case (Ro.EntryType.AutoComplete):\n            case (Ro.EntryType.Choices):\n            case (Ro.EntryType.ConditionalChoices):\n                this.formattedValue = this.selectedChoice ? this.selectedChoice.toString() : '';\n                break;\n            case (Ro.EntryType.MultipleChoices):\n            case (Ro.EntryType.MultipleConditionalChoices): {\n                const selectedChoices = this.selectedMultiChoices?.map((c) => c.toString());\n                this.formattedValue = selectedChoices ? selectedChoices.join() : '';\n                break;\n            }\n            default:\n                this.formattedValue = this.value ? this.value.toString() : '';\n        }\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport {\n    ClickHandlerService,\n    ColorService,\n    ConfigService,\n    ContextService,\n    ErrorService,\n    MaskService,\n    Pane,\n    UrlManagerService\n} from '@nakedobjects/services';\nimport { ActionViewModel } from './action-view-model';\nimport { Dictionary } from 'lodash';\nimport concat from 'lodash-es/concat';\nimport find from 'lodash-es/find';\nimport { AttachmentViewModel } from './attachment-view-model';\nimport { ChoiceViewModel } from './choice-view-model';\nimport { FieldViewModel } from './field-view-model';\nimport * as Helpers from './helpers-view-models';\nimport { IDraggableViewModel } from './idraggable-view-model';\nimport * as Msg from './user-messages';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class PropertyViewModel extends FieldViewModel implements IDraggableViewModel {\n\n    readonly attachment: AttachmentViewModel | null;\n    refType?: 'null' | 'navigable' | 'notNavigable';\n    // IDraggableViewModel\n    readonly draggableType: string;\n    readonly isLink: boolean;\n\n    constructor(\n        public readonly propertyRep: Ro.PropertyMember,\n        color: ColorService,\n        error: ErrorService,\n        private readonly viewModelfactory: ViewModelFactoryService,\n        context: ContextService,\n        private readonly maskService: MaskService,\n        private readonly urlManager: UrlManagerService,\n        private readonly clickHandler: ClickHandlerService,\n        configService: ConfigService,\n        id: string,\n        private readonly previousValue: Ro.Value,\n        onPaneId: Pane,\n        parentValues: () => Dictionary<Ro.Value>,\n        readonly editActionTuples: [ActionViewModel, string[]][]\n        ) {\n\n        super(propertyRep,\n            color,\n            error,\n            context,\n            configService,\n            onPaneId,\n            propertyRep.isScalar(),\n            id,\n            propertyRep.isCollectionContributed(),\n            propertyRep.entryType(),\n            !propertyRep.disabledReason()\n            );\n\n        this.draggableType = propertyRep.extensions().returnType()!;\n\n        this.attachment = this.viewModelfactory.attachmentViewModel(propertyRep, onPaneId);\n\n        const fieldEntryType = this.entryType;\n\n        if (fieldEntryType === Ro.EntryType.AutoComplete) {\n            this.setupPropertyAutocomplete(parentValues);\n        }\n\n        if (fieldEntryType === Ro.EntryType.ConditionalChoices) {\n            this.setupPropertyConditionalChoices();\n        }\n\n        if (propertyRep.isScalar()) {\n            this.setupScalarPropertyValue();\n        } else {\n            // is reference\n            this.setupReferencePropertyValue();\n        }\n\n        this.refresh(previousValue);\n\n        if (!previousValue) {\n            this.originalValue = this.getValue();\n        }\n        this.hasValue = previousValue && !previousValue.isNull;\n        this.description = this.getRequiredIndicator() + this.description;\n\n        const editActions = editActionTuples.filter(t => t[1].includes(id)).map(t => t[0]);\n        this.isEditByAction = editActions.length > 0;\n        if (this.isEditByAction) {\n            this.editAction = editActions[0];\n        }\n\n        this.isLink = !!propertyRep.extensions().urlLink();\n    }\n\n    linkProperties() {\n        if (this.isLink) {\n            const [newPane, displayName] = this.propertyRep.extensions().urlLink().split(',');\n            const newPaneBool = newPane.toLowerCase() === 'true';\n            return [newPaneBool, displayName] as [boolean, string];\n        }\n        return null;\n    }\n\n    private editAction?: ActionViewModel;\n\n    readonly isEditByAction: boolean;\n\n    private getDigest(propertyRep: Ro.PropertyMember): string | null {\n        const parent = propertyRep.parent;\n        if (parent instanceof Ro.DomainObjectRepresentation) {\n            if (parent.isTransient()) {\n                return Ro.withNull(parent.etagDigest);\n            }\n        }\n        return null;\n    }\n\n    private setupPropertyAutocomplete(parentValues: () => Dictionary<Ro.Value>) {\n        const propertyRep = this.propertyRep;\n        this.setupAutocomplete(propertyRep, parentValues, this.getDigest(propertyRep));\n    }\n\n    private setupPropertyConditionalChoices() {\n        const propertyRep = this.propertyRep;\n        this.setupConditionalChoices(propertyRep, this.getDigest(propertyRep));\n    }\n\n    private callIfChanged(newValue: Ro.Value, doRefresh: (newValue: Ro.Value) => void) {\n        const propertyRep = this.propertyRep;\n        const value = newValue || propertyRep.value();\n\n        if (this.currentValue == null || value.toValueString() !== this.currentValue.toValueString()) {\n            doRefresh(value);\n            this.currentValue = value;\n        }\n    }\n\n    private setupChoice(newValue: Ro.Value) {\n        const propertyRep = this.propertyRep;\n        if (this.entryType === Ro.EntryType.Choices) {\n\n            const choices = propertyRep.choices()!;\n\n            this.setupChoices(choices);\n\n            if (this.optional) {\n                const emptyChoice = new ChoiceViewModel(new Ro.Value(''), this.id);\n                this.choices = concat<ChoiceViewModel>([emptyChoice], this.choices);\n            }\n\n            const currentChoice = new ChoiceViewModel(newValue, this.id);\n            this.selectedChoice = find(this.choices, c => c.valuesEqual(currentChoice)) || null;\n        } else if (!propertyRep.isScalar()) {\n            this.selectedChoice = new ChoiceViewModel(newValue, this.id);\n        }\n    }\n\n    private setupReference(value: Ro.Value, rep: Ro.IHasExtensions) {\n        if (value.isNull()) {\n            this.reference = '';\n            this.value = this.description;\n            this.formattedValue = '';\n            this.refType = 'null';\n        } else {\n            this.reference = value!.link()!.href();\n            this.value = value.toString();\n            this.formattedValue = value.toString();\n            this.refType = rep.extensions().notNavigable() ? 'notNavigable' : 'navigable';\n        }\n        if (this.entryType === Ro.EntryType.FreeForm) {\n            this.description = this.description || Msg.dropPrompt;\n        }\n    }\n\n    private setupReferencePropertyValue() {\n        const propertyRep = this.propertyRep;\n        this.refresh = (newValue: Ro.Value) => this.callIfChanged(newValue, (value: Ro.Value) => {\n            this.setupChoice(value);\n            this.setupReference(value, propertyRep);\n        });\n    }\n\n    private setupScalarPropertyValue() {\n        const propertyRep = this.propertyRep;\n\n        const remoteMask = propertyRep.extensions().mask();\n        const localFilter = this.maskService.toLocalFilter(remoteMask, propertyRep.extensions().format()!);\n        this.localFilter = localFilter;\n\n        this.refresh = (newValue: Ro.Value) => this.callIfChanged(newValue, (value: Ro.Value) => {\n\n            this.setupChoice(value);\n            Helpers.setScalarValueInView(this, this.propertyRep, value);\n\n            if (propertyRep.entryType() === Ro.EntryType.Choices) {\n                if (this.selectedChoice) {\n                    this.value = this.selectedChoice.name;\n                    this.formattedValue = this.selectedChoice.name;\n                }\n            } else if (this.password) {\n                this.formattedValue = Msg.obscuredText;\n            } else {\n                this.formattedValue = localFilter.filter(this.value);\n            }\n        });\n    }\n\n    readonly draggableTitle = () => this.formattedValue ?? '';\n    readonly canDropOn = (targetType: string) => this.context.isSubTypeOf(this.returnType, targetType) as Promise<boolean>;\n\n    readonly doClick = (right?: boolean) => this.urlManager.setProperty(this.reference, this.clickHandler.pane(this.onPaneId, right));\n\n    readonly doEditByAction = () => this.editAction?.doInvoke();\n\n    readonly isDirty = () => !!this.previousValue || this.getValue().toValueString() !== this.originalValue?.toValueString();\n\n    get editActionTooltip() {\n        return `${this.editAction?.title} ${this.editAction?.description}`.trim();\n    }\n\n    get isEditActionDisabled() {\n        return this.editAction?.disabled();\n    }\n}\n","import * as Models from '@nakedobjects/restful-objects';\nimport { ClickHandlerService, ColorService, ConfigService, ContextService, ErrorService, Pane, UrlManagerService } from '@nakedobjects/services';\nimport { ItemViewModel } from './item-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class RecentItemViewModel extends ItemViewModel {\n\n    constructor(\n        context: ContextService,\n        colorService: ColorService,\n        error: ErrorService,\n        urlManager: UrlManagerService,\n        configService: ConfigService,\n        link: Models.Link,\n        paneId: Pane,\n        clickHandler: ClickHandlerService,\n        viewModelFactory: ViewModelFactoryService,\n        index: number,\n        isSelected: boolean,\n        public readonly friendlyName: string\n    ) {\n        super(context, colorService, error, urlManager, configService, link, paneId, clickHandler, viewModelFactory, index, isSelected, '');\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { ContextService, Pane, PaneRouteData, UrlManagerService } from '@nakedobjects/services';\nimport every from 'lodash-es/every';\nimport map from 'lodash-es/map';\nimport { RecentItemViewModel } from './recent-item-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\nimport * as Msg from './user-messages';\n\nexport enum SortType { ByUsage, ByType, ByTitle }\n\nexport class RecentItemsViewModel {\n\n    constructor(\n        private readonly viewModelFactory: ViewModelFactoryService,\n        private readonly context: ContextService,\n        private readonly urlManager: UrlManagerService,\n        private readonly onPaneId: Pane\n    ) {\n        this.recentlyViewed = this.context.getRecentlyViewed();\n        this.refreshItems();\n    }\n\n    private recentItems: RecentItemViewModel[] = [];\n    private recentlyViewed: Ro.DomainObjectRepresentation[];\n    private sortType = SortType.ByUsage; \n\n    public get currentSortType() {\n        return this.sortType;\n    }\n\n    title = Msg.recentTitle;\n    clearMessage = Msg.clear;\n\n    private refreshItems() {\n        const items = map(this.recentlyViewed, (o, i) => ({ obj: o, link: o.updateSelfLinkWithTitle(), index: i }));\n        const itemViewModels = map(items, i => this.viewModelFactory.recentItemViewModel(i.obj, i.link!, this.onPaneId, false, i.index));\n\n        if (this.currentSortType === SortType.ByTitle) {\n            this.recentItems = itemViewModels.sort((r1, r2) => r1.title.localeCompare(r2.title));\n        }\n        else if (this.currentSortType === SortType.ByType) {\n            this.recentItems = itemViewModels.sort((r1, r2) => r1.friendlyName.localeCompare(r2.friendlyName));\n        }\n        else {\n            this.recentItems = itemViewModels;\n        }\n    }\n\n    private itemsHaveChanged() {\n        const currentRecentlyViewed = this.context.getRecentlyViewed();\n\n        const same = this.recentlyViewed.length === currentRecentlyViewed.length &&\n            every(this.recentlyViewed, (v, i) => v.id() === currentRecentlyViewed[i].id());\n\n        if (!same) {\n            this.recentlyViewed = currentRecentlyViewed;\n        }\n\n        return !same;\n    }\n\n    get items(): RecentItemViewModel[] {\n        if (this.itemsHaveChanged()) {\n            this.refreshItems();\n        }\n        return this.recentItems;\n    }\n\n    readonly clear = () => {\n        this.context.clearRecentlyViewed();\n        this.recentItems = [];\n        this.urlManager.triggerPageReloadByFlippingReloadFlagInUrl(this.onPaneId);\n    };\n\n    readonly clearSelected = (routeData?: PaneRouteData) => {\n        const toClear = routeData?.selectedCollectionItems?.[''] || [];\n        this.context.clearSelectedRecentlyViewed(toClear);\n        this.urlManager.setAllItemsSelected(false, '', this.onPaneId);\n    };\n\n\n    sort = (sortBy: SortType) => {\n        if (sortBy !== this.currentSortType) {\n            this.sortType = sortBy;\n            this.refreshItems();\n        }\n    };\n\n    getRecentMessage(disabled: boolean) {\n        return disabled ? Msg.recentDisabledMessage : Msg.recentMessage;\n    }\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { MaskService } from '@nakedobjects/services';\nimport find from 'lodash-es/find';\nimport map from 'lodash-es/map';\nimport { ChoiceViewModel } from './choice-view-model';\nimport * as Helpers from './helpers-view-models';\nimport * as Msg from './user-messages';\n\nexport class TableRowColumnViewModel {\n\n    constructor(\n        public readonly id: string,\n        propertyRep?: Ro.PropertyMember | Ro.CollectionMember,\n        mask?: MaskService\n    ) {\n\n        if (propertyRep && mask) {\n\n            this.title = propertyRep.extensions().friendlyName();\n\n            if (propertyRep instanceof Ro.CollectionMember) {\n                const size = propertyRep.size();\n\n                this.formattedValue = Helpers.getCollectionDetails(size);\n                this.value = '';\n                this.type = 'scalar';\n                this.returnType = 'string';\n            }\n\n            if (propertyRep instanceof Ro.PropertyMember) {\n                const isPassword = propertyRep.extensions().dataType() === 'password';\n                const value = propertyRep.value();\n                this.returnType = propertyRep.extensions().returnType()!;\n\n                if (propertyRep.isScalar()) {\n                    this.type = 'scalar';\n                    Helpers.setScalarValueInView(this, propertyRep, value);\n\n                    const remoteMask = propertyRep.extensions().mask();\n                    const localFilter = mask.toLocalFilter(remoteMask, propertyRep.extensions().format()!);\n\n                    if (propertyRep.entryType() === Ro.EntryType.Choices) {\n                        const currentChoice = new ChoiceViewModel(value, id);\n                        const choicesMap = propertyRep.choices()!;\n                        const choices = map(choicesMap, (v, n) => new ChoiceViewModel(v, id, n));\n                        const choice = find(choices, c => c.valuesEqual(currentChoice));\n\n                        if (choice) {\n                            this.value = choice.name;\n                            this.formattedValue = choice.name;\n                        }\n                    } else if (isPassword) {\n                        this.formattedValue = Msg.obscuredText;\n                    } else {\n                        this.formattedValue = localFilter.filter(this.value!);\n                    }\n                } else {\n                    // is reference\n                    this.type = 'ref';\n                    this.formattedValue = value.isNull() ? '' : value.toString();\n                }\n            }\n        } else {\n            this.type = 'scalar';\n            this.value = '';\n            this.formattedValue = '';\n            this.title = '';\n        }\n    }\n\n    readonly type!: 'ref' | 'scalar';\n    readonly returnType?: string;\n    readonly value: Ro.ScalarValueType | Date = null;\n    readonly formattedValue: string = '';\n    readonly title: string;\n}\n","import * as Ro from '@nakedobjects/restful-objects';\nimport { Pane } from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport find from 'lodash-es/find';\nimport map from 'lodash-es/map';\nimport { TableRowColumnViewModel } from './table-row-column-view-model';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\nexport class TableRowViewModel {\n\n    constructor(\n        private readonly viewModelFactory: ViewModelFactoryService,\n        properties: Dictionary<Ro.PropertyMember | Ro.CollectionMember>,\n        private readonly paneId: Pane,\n        public readonly title: string\n    ) {\n        this.properties = map(properties, (property, id) => viewModelFactory.propertyTableViewModel(id as string, property));\n    }\n\n    properties: TableRowColumnViewModel[];\n\n    showTitle = false;\n\n    readonly getPlaceHolderTableRowColumnViewModel = (id: string) => this.viewModelFactory.propertyTableViewModel(id); // no property so place holder for column\n\n    readonly conformColumns = (showTitle: boolean, columns: string[]) => {\n        this.showTitle = showTitle;\n        if (columns) {\n            this.properties = map(columns, c => find(this.properties, tp => tp.id === c) || this.getPlaceHolderTableRowColumnViewModel(c));\n        }\n    };\n}\n","import { Injectable } from '@angular/core';\nimport * as Ro from '@nakedobjects/restful-objects';\nimport {\n    ClickHandlerService,\n    ColorService,\n    ConfigService,\n    ContextService,\n    ErrorService,\n    ErrorWrapper,\n    LoggerService,\n    MaskService,\n    Pane,\n    PaneRouteData,\n    UrlManagerService\n} from '@nakedobjects/services';\nimport { Dictionary } from 'lodash';\nimport find from 'lodash-es/find';\nimport forEach from 'lodash-es/forEach';\nimport map from 'lodash-es/map';\nimport { ActionViewModel } from './action-view-model';\nimport { ApplicationPropertiesViewModel } from './application-properties-view-model';\nimport { AttachmentViewModel } from './attachment-view-model';\nimport { CollectionViewModel } from './collection-view-model';\nimport { DialogViewModel } from './dialog-view-model';\nimport { DomainObjectViewModel } from './domain-object-view-model';\nimport { ErrorViewModel } from './error-view-model';\nimport { IMessageViewModel } from './imessage-view-model';\nimport { ItemViewModel } from './item-view-model';\nimport { LinkViewModel } from './link-view-model';\nimport { ListViewModel } from './list-view-model';\nimport { MenuViewModel } from './menu-view-model';\nimport { MenusViewModel } from './menus-view-model';\nimport { MultiLineDialogViewModel } from './multi-line-dialog-view-model';\nimport { ParameterViewModel } from './parameter-view-model';\nimport { PropertyViewModel } from './property-view-model';\nimport { RecentItemViewModel } from './recent-item-view-model';\nimport { RecentItemsViewModel } from './recent-items-view-model';\nimport { TableRowColumnViewModel } from './table-row-column-view-model';\nimport { TableRowViewModel } from './table-row-view-model';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class ViewModelFactoryService {\n\n    constructor(\n        private readonly context: ContextService,\n        private readonly urlManager: UrlManagerService,\n        private readonly color: ColorService,\n        private readonly error: ErrorService,\n        private readonly clickHandler: ClickHandlerService,\n        private readonly mask: MaskService,\n        private readonly configService: ConfigService,\n        private readonly loggerService: LoggerService,\n        private readonly router: Router\n    ) { }\n\n    errorViewModel = (error: ErrorWrapper | null) => {\n        return new ErrorViewModel(error);\n    };\n\n    attachmentViewModel = (propertyRep: Ro.PropertyMember, paneId: Pane): AttachmentViewModel | null => {\n        const link = propertyRep.attachmentLink();\n        if (link) {\n            const parent = propertyRep.parent as Ro.DomainObjectRepresentation;\n            return new AttachmentViewModel(link, parent, this.context, this.error, paneId);\n        }\n        return null;\n    };\n\n    linkViewModel = (linkRep: Ro.Link, paneId: Pane) => {\n        return new LinkViewModel(this.context, this.color, this.error, this.urlManager, this.configService, linkRep, paneId);\n    };\n\n    itemViewModel = (linkRep: Ro.Link, paneId: Pane, selected: boolean, index: number, id: string) => {\n        return new ItemViewModel(this.context, this.color, this.error, this.urlManager, this.configService, linkRep, paneId, this.clickHandler, this, index, selected, id);\n    };\n\n    recentItemViewModel = (obj: Ro.DomainObjectRepresentation, linkRep: Ro.Link, paneId: Pane, selected: boolean, index: number) => {\n        return new RecentItemViewModel(this.context, this.color, this.error, this.urlManager, this.configService, linkRep, paneId, this.clickHandler, this, index, selected, obj.extensions().friendlyName());\n    };\n\n    actionViewModel = (actionRep: Ro.ActionMember | Ro.ActionRepresentation, vm: IMessageViewModel, routeData: PaneRouteData) => {\n        return new ActionViewModel(this, this.context, this.urlManager, this.error, this.clickHandler, actionRep, vm, routeData, this.router);\n    };\n\n    propertyTableViewModel = (id: string, propertyRep?: Ro.PropertyMember | Ro.CollectionMember) => {\n        return propertyRep ? new TableRowColumnViewModel(id, propertyRep, this.mask) : new TableRowColumnViewModel(id);\n    };\n\n    propertyViewModel = (propertyRep: Ro.PropertyMember, id: string, previousValue: Ro.Value, paneId: Pane, parentValues: () => Dictionary<Ro.Value>, editActionTuples: [ActionViewModel, string[]][]) => {\n        return new PropertyViewModel(propertyRep,\n            this.color,\n            this.error,\n            this,\n            this.context,\n            this.mask,\n            this.urlManager,\n            this.clickHandler,\n            this.configService,\n            id,\n            previousValue,\n            paneId,\n            parentValues,\n            editActionTuples);\n    };\n\n    dialogViewModel = (routeData: PaneRouteData, action: Ro.ActionRepresentation | Ro.InvokableActionMember, actionViewModel: ActionViewModel | null, isRow: boolean, row?: number) => {\n\n        return new DialogViewModel(\n            this.context,\n            this,\n            this.urlManager,\n            this.error,\n            routeData,\n            this.router,\n            action,\n            actionViewModel,\n            isRow,\n            row);\n    };\n\n    multiLineDialogViewModel = (routeData: PaneRouteData,\n        action: Ro.ActionRepresentation | Ro.InvokableActionMember,\n        holder: Ro.MenuRepresentation | Ro.DomainObjectRepresentation | CollectionViewModel) => {\n\n        return new MultiLineDialogViewModel(this.color,\n            this.context,\n            this,\n            this.urlManager,\n            this.error,\n            routeData,\n            action,\n            holder);\n    };\n\n    domainObjectViewModel = (obj: Ro.DomainObjectRepresentation, routeData: PaneRouteData, forceReload: boolean) => {\n        const ovm = new DomainObjectViewModel(this.color, this.context, this, this.urlManager, this.error, this.configService, obj, routeData, forceReload);\n        if (forceReload) {\n            ovm.clearCachedFiles();\n        }\n        return ovm;\n    };\n\n    listViewModel = (list: Ro.ListRepresentation, routeData: PaneRouteData) => {\n        return new ListViewModel(\n            this.color,\n            this.context,\n            this,\n            this.urlManager,\n            this.error,\n            this.loggerService,\n            list,\n            routeData\n        );\n    };\n\n    parameterViewModel = (parmRep: Ro.Parameter, previousValue: Ro.Value, paneId: Pane) => {\n        return new ParameterViewModel(parmRep, paneId, this.color, this.error, this.mask, previousValue, this, this.context, this.configService);\n    };\n\n    collectionViewModel = (collectionRep: Ro.CollectionMember, routeData: PaneRouteData, forceReload: boolean) => {\n        return new CollectionViewModel(this, this.color, this.error, this.context, this.urlManager, this.configService, this.loggerService, collectionRep, routeData, forceReload);\n    };\n\n    menuViewModel = (menuRep: Ro.MenuRepresentation, routeData: PaneRouteData) => {\n        return new MenuViewModel(this, menuRep, routeData);\n    };\n\n    menusViewModel = (menusRep: Ro.MenusRepresentation, routeData: PaneRouteData) => {\n        return new MenusViewModel(this, menusRep, routeData.paneId);\n    };\n\n    recentItemsViewModel = (paneId: Pane) => {\n        return new RecentItemsViewModel(this, this.context, this.urlManager, paneId);\n    };\n\n    tableRowViewModel = (properties: Dictionary<Ro.PropertyMember | Ro.CollectionMember>, paneId: Pane, title: string): TableRowViewModel => {\n        return new TableRowViewModel(this, properties, paneId, title);\n    };\n\n    applicationPropertiesViewModel = () => new ApplicationPropertiesViewModel(this.context, this.error, this.configService);\n\n    getItems = (links: Ro.Link[], tableView: boolean, routeData: PaneRouteData, listViewModel: ListViewModel | CollectionViewModel) => {\n\n        const collection = listViewModel instanceof CollectionViewModel ? listViewModel : null;\n        const id = collection ? collection.name : '';\n        const selectedItems = routeData.selectedCollectionItems ? routeData.selectedCollectionItems[id] : undefined;\n        const items = map(links, (link, i) => this.itemViewModel(link, routeData.paneId, !!selectedItems && selectedItems[i], i, id));\n\n        if (tableView) {\n\n            const getActionExtensions = routeData.objectId\n                ? (): Promise<Ro.Extensions> =>\n                    this.context.getActionExtensionsFromObject(routeData.paneId, Ro.ObjectIdWrapper.fromObjectId(routeData.objectId!, this.configService.config.keySeparator), routeData.actionId!)\n                : (): Promise<Ro.Extensions> => this.context.getActionExtensionsFromMenu(routeData.menuId!, routeData.actionId!);\n\n            const getExtensions = listViewModel instanceof CollectionViewModel ? () => Promise.resolve(listViewModel.collectionRep.extensions()) : getActionExtensions;\n\n            // clear existing header\n            listViewModel.header = null;\n\n            if (items.length > 0) {\n                getExtensions().\n                    then((ext: Ro.Extensions) => {\n                        forEach(items, itemViewModel => {\n                            itemViewModel.tableRowViewModel?.conformColumns(ext.tableViewTitle(), ext.tableViewColumns());\n                        });\n\n                        const firstItem = items[0].tableRowViewModel;\n                        if (!listViewModel.header && firstItem) {\n                            const propertiesHeader =\n                                map(firstItem?.properties, (p, i) => {\n                                    const match = find(items, item => !!item.tableRowViewModel?.properties[i].title);\n                                    return match ? match.tableRowViewModel!.properties[i].title : firstItem.properties[i].id;\n                                });\n\n                            listViewModel.header = firstItem.showTitle ? [''].concat(propertiesHeader) : propertiesHeader;\n                        }\n                    }).\n                    catch((reject: ErrorWrapper) => this.error.handleError(reject));\n            }\n        }\n\n        return items;\n    };\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { IDraggableViewModel } from './idraggable-view-model';\n\n@Injectable()\nexport class DragAndDropService {\n\n    private copiedViewModelSource = new Subject<IDraggableViewModel | null>();\n\n    copiedViewModel$ = this.copiedViewModelSource.asObservable();\n\n    private copiedViewModel: IDraggableViewModel | null = null;\n\n    private dropZoneIds: string[] = [];\n    // Use BehaviorSubject so that subscriptions pick up current values\n    private dropZoneIdsSource = new BehaviorSubject<string[]>(this.dropZoneIds);\n\n    dropZoneIds$ = this.dropZoneIdsSource.asObservable();\n\n    setCopyViewModel(dvm: IDraggableViewModel | null) {\n        this.copiedViewModel = dvm;\n        this.copiedViewModelSource.next(dvm);\n    }\n\n    getCopyViewModel() {\n        return this.copiedViewModel;\n    }\n\n    setDropZoneId (id: string) {\n        if (!this.dropZoneIds.includes(id)) {\n            this.dropZoneIds.push(id);\n            this.dropZoneIdsSource.next(this.dropZoneIds);\n        }\n    }\n\n    clearDropZoneId(id: string) {\n        if (this.dropZoneIds.includes(id)) {\n            this.dropZoneIds = this.dropZoneIds.filter(v => v !== id);\n            this.dropZoneIdsSource.next(this.dropZoneIds);\n        }\n    }\n}\n","import { HttpClientModule } from '@angular/common/http';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouterModule } from '@angular/router';\nimport { DragAndDropService } from './drag-and-drop.service';\nimport { ViewModelFactoryService } from './view-model-factory.service';\n\n@NgModule({\n    imports: [\n        BrowserModule,\n        FormsModule,\n        ReactiveFormsModule,\n        HttpClientModule,\n        RouterModule,\n    ],\n    exports: [\n    ],\n})\nexport class LibModule {\n    public static forRoot(): ModuleWithProviders<LibModule> {\n\n        return {\n            ngModule: LibModule,\n            providers: [\n                ViewModelFactoryService,\n                DragAndDropService\n            ]\n        };\n    }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["Msg.outOfRange","Msg.tooLong","Msg.noPatternMatch","Models","Msg.mandatory","Msg.notANumber","Msg.mandatoryFieldsPrefix","Msg.invalidFieldsPrefix","Msg.closeActions","Msg.noActions","Msg.openActions","Msg.unknownCollectionSize","Msg.emptyCollectionSize","Helpers.incrementPendingPotentAction","Helpers.decrementPendingPotentAction","Msg.noResultMessage","Msg.noUserMessage","Msg.unknownFileTitle","Msg.noImageMessage","Msg.noFileMessage","every","Helpers.createMenuItems","Msg.noItemsSelected","Helpers.getCollectionDetails","Helpers.tooltip","Helpers.handleErrorResponse","Msg.submittedMessage","Helpers.dirtyMarker","Msg.concurrencyMessage","Helpers.actionsTooltip","Msg.editing","Msg.pageMessage","Msg.noItemsFound","Msg.submittedCount","Helpers.drop","Helpers.validate","Msg.pendingAutoComplete","Helpers.createChoiceViewModels","Msg.autoCompletePrompt","Msg.invalidDate","Msg.invalidTime","Msg.dropPrompt","Helpers.setScalarValueInView","Msg.obscuredText","Msg.recentTitle","Msg.clear","Msg.recentDisabledMessage","Msg.recentMessage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEa,eAAe,CAAA;AAGH,IAAA,OAAA;AACA,IAAA,EAAA;AAFrB,IAAA,WAAA,CACqB,OAAiB,EACjB,EAAU,EAC3B,IAAoB,EACpB,UAAmB,EAAA;QAHF,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAE,CAAA,EAAA,G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