@wavemaker/app-ng-runtime 11.4.0-next.1417070 → 11.4.0-next.1417072

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +1 -1
  2. app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
  3. app-ng-runtime/build-task/esm2015/data/form/form-field/form-field.build.js +2 -2
  4. app-ng-runtime/build-task/fesm2015/index.js +1 -1
  5. app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
  6. app-ng-runtime/components/base/bundles/index.umd.js +7 -1
  7. app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
  8. app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +3 -2
  9. app-ng-runtime/components/base/esm2015/widgets/common/dialog/dialog.service.js +7 -1
  10. app-ng-runtime/components/base/fesm2015/index.js +7 -1
  11. app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
  12. app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
  13. app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
  14. app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
  15. app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
  16. app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
  17. app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
  18. app-ng-runtime/components/data/form/index.metadata.json +1 -1
  19. app-ng-runtime/components/data/list/bundles/index.umd.js +1 -1
  20. app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
  21. app-ng-runtime/components/data/list/esm2015/list.component.js +2 -2
  22. app-ng-runtime/components/data/list/fesm2015/index.js +1 -1
  23. app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
  24. app-ng-runtime/components/data/list/index.metadata.json +1 -1
  25. app-ng-runtime/components/data/list/list.component.d.ts +1 -1
  26. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +5 -0
  27. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  28. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +7 -2
  29. app-ng-runtime/components/dialogs/default/fesm2015/index.js +6 -1
  30. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  31. app-ng-runtime/components/input/epoch/bundles/index.umd.js +1 -1
  32. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  33. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -2
  34. app-ng-runtime/components/input/epoch/fesm2015/index.js +1 -1
  35. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  36. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  37. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -0
  38. app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
  39. app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +4 -1
  40. app-ng-runtime/components/navigation/popover/fesm2015/index.js +3 -0
  41. app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
  42. app-ng-runtime/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../projects/components/widgets/dialogs/default/src/dialog-body/dialog-body.directive.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog-footer/dialog-footer.props.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog-footer/dialog-footer.directive.ts","../../../../../projects/components/widgets/dialogs/default/src/base-dialog.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog-header/dialog-header.component.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog.module.ts","../../../../../projects/components/widgets/dialogs/default/src/index.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Inject, Renderer2 } from '@angular/core';\n\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\nimport { addClass, setAttr, setCSS } from '@wm/core';\n\nimport { DialogRef } from '@wm/components/base';\n\ndeclare const $;\n\nconst DEFAULT_CLS = 'app-dialog-body modal-body';\n\n@Directive({\n selector: 'div[wmDialogBody]',\n})\nexport class DialogBodyDirective {\n @HostBinding('style.height') height;\n constructor(\n elRef: ElementRef,\n @Inject(DialogRef) private dialogRef,\n bsModal: BsModalService,\n private renderer: Renderer2\n ) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n\n const subscription = bsModal.onShown.subscribe(() => {\n const dialogRoot = $(elRef.nativeElement).closest('.app-dialog')[0];\n let dialogRootContainer = $('body.wm-app')[0];\n // To identify the microfrontend, if body tag doesn't have wm-app class then app loading as micro-frontend\n if(!dialogRootContainer) {\n const dialogBackrop = $('body > .modal-backdrop')[0];\n const parentContainer = $('body > modal-container')[0];\n dialogRootContainer = $('.wm-app')[0];\n if(dialogRootContainer && parentContainer ){\n if(dialogBackrop){\n this.renderer.appendChild(dialogRootContainer, dialogBackrop);\n }\n this.renderer.appendChild(dialogRootContainer, parentContainer);\n \n }\n }\n const width = this.dialogRef.width;\n const height = this.dialogRef.height;\n if(height){\n setTimeout(e=>{\n setCSS($(elRef.nativeElement)[0], 'height', height);\n });\n } \n if (dialogRoot) {\n if (width) {\n setCSS(dialogRoot, 'width', width);\n }\n setAttr(dialogRoot, 'tabindex', this.dialogRef.tabindex);\n setAttr(dialogRoot, 'name', this.dialogRef.name);\n\n }\n subscription.unsubscribe();\n });\n }\n}\n","import { PROP_BOOLEAN, PROP_STRING, register } from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-dialogfooter',\n new Map([\n ['class', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ])\n );\n};\n","import { Directive, Injector } from '@angular/core';\n\nimport { BaseComponent, IWidgetConfig, provideAsWidgetRef } from '@wm/components/base';\nimport { registerProps } from './dialog-footer.props';\n\nconst WIDGET_INFO: IWidgetConfig = {\n widgetType: 'wm-dialogfooter',\n hostClass: 'app-dialog-footer modal-footer'\n};\n\n@Directive({\n selector: 'div[wmDialogFooter]',\n providers: [\n provideAsWidgetRef(DialogFooterDirective)\n ]\n})\nexport class DialogFooterDirective extends BaseComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector) {\n super(inj, WIDGET_INFO);\n }\n}\n","import { Injector, OnDestroy, TemplateRef, Injectable } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { BsModalRef, BsModalService, ModalOptions } from 'ngx-bootstrap/modal';\n\nimport { Subscription } from 'rxjs';\n\nimport {AbstractDialogService, closePopover, findRootContainer, generateGUId} from '@wm/core';\n\nimport { BaseComponent, IDialog, IWidgetConfig } from '@wm/components/base';\nimport { createFocusTrap } from '@wavemaker/focus-trap/dist/focus-trap';\n\ndeclare const _;\n\nlet eventsRegistered = false;\n\nlet focusTrapObj = {\n activeElement: null\n};\n\nconst invokeOpenedCallback = (ref) => {\n if (ref) {\n setTimeout(() => {\n const root = findRootContainer(ref.$element);\n // if page styles have to be applied to dialog then dialog has to be child of page element.\n if (root) {\n $('body > modal-container > div').wrap('<' + root + '/>');\n }\n ref.invokeEventCallback('opened', {$event: {type: 'opened'}});\n // focusTrapObj will create focus trap for the respective dialog according to the titleId assigned to them which is unique.\n const container = $('[aria-labelledby= ' + ref.titleId + ']')[0];\n\n const keyboardFocusableElements = [container.querySelectorAll(\n 'a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]:not([tabindex=\"-1\"])'\n )].filter(el => {\n return (\n !el[0].hasAttribute('disabled') && !el[0].hasAttribute('hidden'))\n })[0];\n\n $(keyboardFocusableElements[0]).focus();\n\n focusTrapObj[ref.titleId] = createFocusTrap(container, {\n onActivate: () => container.classList.add('is-active'),\n onDeactivate: () => container.classList.remove('is-active'),\n allowOutsideClick: true,\n setReturnFocus: focusTrapObj.activeElement,\n });\n focusTrapObj[ref.titleId].activate();\n });\n }\n};\n\nconst invokeClosedCallback = (ref) => {\n if (ref) {\n ref.invokeEventCallback('close');\n ref.dialogRef = undefined;\n }\n};\n\n@Injectable()\nexport abstract class BaseDialog extends BaseComponent implements IDialog, OnDestroy {\n\n public name: string;\n\n private readonly dialogService: AbstractDialogService;\n private readonly bsModal: BsModalService;\n\n private dialogRef: BsModalRef;\n public titleId:string = 'wmdialog-' + generateGUId();\n\n protected constructor(\n inj: Injector,\n widgetConfig: IWidgetConfig,\n protected modalOptions: ModalOptions\n ) {\n super(inj, widgetConfig);\n this.dialogService = inj.get(AbstractDialogService);\n this.bsModal = inj.get(BsModalService);\n const router = inj.get(Router);\n\n const subscriptions: Subscription[] = [\n this.bsModal.onShown.subscribe(() => {\n const ref = this.dialogService.getLastOpenedDialog();\n if (ref === this) {\n // Always get the reference of last pushed dialog in the array for calling onOpen callback\n invokeOpenedCallback(ref);\n }\n }),\n this.bsModal.onShow.subscribe(() => {\n focusTrapObj.activeElement = document.activeElement;\n }),\n this.bsModal.onHidden.subscribe((closeReason) => {\n const ref = closeReason === 'esc' || closeReason === 'backdrop-click' ? this.dialogService.getLastOpenedDialog() : this.dialogService.getDialogRefFromClosedDialogs();\n if (ref === this) {\n // remove the dialog reference from opened dialogs and closed dialogs\n this.dialogService.removeFromOpenedDialogs(ref);\n this.dialogService.removeFromClosedDialogs(ref);\n invokeClosedCallback(ref);\n if (ref.closeCallBackFn) {\n ref.closeCallBackFn();\n }\n }\n }),\n this.bsModal.onHide.subscribe(() => {\n // Will de-activate focus trap for the respective dialog when they are closed.\n const ref = this.dialogService.getDialogRefFromClosedDialogs();\n if (ref && focusTrapObj[ref.titleId] !== undefined) {\n focusTrapObj[ref.titleId].deactivate();\n }\n }),\n router.events.subscribe(e => {\n if (e instanceof NavigationEnd) {\n this.close();\n }\n })\n ];\n this.registerDestroyListener(() => {// remove the dialog reference from opened dialogs and closed dialogs\n this.dialogService.removeFromOpenedDialogs(this);\n this.dialogService.removeFromClosedDialogs(this);\n subscriptions.forEach(s => s.unsubscribe());\n });\n }\n\n /**\n * Opens the dialog\n * Subscribe to the onShown event emitter of bsModal and trigger on-opened event callback\n */\n public open(initState?: any) {\n\n // remove the popovers in the page to avoid the overlap with dialog\n // closePopover(this.$element); Commenting this line because it is causing regression(if we have dialog inside popover as partail content, then the dialog close is not working because on closing the popover the partial get destroyed.)\n\n // do not open the dialog again if it is already opened\n const duplicateDialogCheck = (openedDialog) => {\n return openedDialog === this;\n };\n\n if (this.dialogService.getOpenedDialogs().some(duplicateDialogCheck)) {\n return;\n }\n\n this.dialogService.addToOpenedDialogs(this);\n\n // extend the context with the initState\n Object.assign(this.context, initState);\n this.modalOptions.ariaLabelledBy = this.titleId;\n this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);\n }\n\n /**\n * closes the dialog\n * invokes the on-close event callback\n */\n public close() {\n // remove the popovers in the page to avoid the overlap with dialog\n // closePopover(this.$element); Commenting this line because it is causing regression(if we have dialog inside popover as partail content, then the dialog close is not working because on closing the popover the partial get destroyed.)\n if (this.dialogRef) {\n this.dialogService.addToClosedDialogs(this);\n this.dialogRef.hide();\n }\n }\n\n /**\n * Register the dialog with the dialog service for programmatic access\n */\n protected register(scope) {\n // add scope along with name in the dialogRefsCollection Map while registering dialog\n // So that 2 dialogs having same name on different pages won't be overridden.\n this.dialogService.register(this.name, this, scope);\n }\n\n /**\n * De Register the dialog with the dialog service after dialog destruction\n */\n protected deRegister(scope) {\n this.dialogService.deRegister(this.name, scope);\n }\n\n /**\n * subclasses of BaseDialog must implement this method to return the proper template element ref\n * bsModal will use this refence to open the dialog\n * @returns {TemplateRef<any>}\n */\n protected abstract getTemplateRef(): TemplateRef<any>;\n\n protected onPropertyChange(key: string, nv: any, ov?: any) {\n // ignore the class attribute.\n // Prevent the framework from setting the class on the host element.\n if (key === 'class' || key === 'name' || key === 'tabindex') {\n return;\n } else if (key === 'animation') {\n this.modalOptions.class = this.modalOptions.class.replace(' animated ' + ov, '');\n if (nv) {\n this.modalOptions.class = this.modalOptions.class + ' animated ' + nv;\n }\n }\n super.onPropertyChange(key, nv, ov);\n }\n\n public ngOnDestroy() {\n this.close();\n this.deRegister(this.viewParent);\n super.ngOnDestroy();\n }\n}\n","import { Component, ElementRef, Inject, Input } from '@angular/core';\n\nimport { addClass, toBoolean } from '@wm/core';\n\nimport { DialogRef } from '@wm/components/base';\nimport { BaseDialog } from '../base-dialog';\n\nconst DEFAULT_CLS = 'app-dialog-header modal-header';\nconst DEFAULT_ICON_DIMENSIONS = '21px';\n\n@Component({\n selector: 'div[wmDialogHeader]',\n templateUrl: './dialog-header.component.html'\n})\nexport class DialogHeaderComponent {\n\n @Input() public iconwidth = DEFAULT_ICON_DIMENSIONS;\n @Input() public iconheight = DEFAULT_ICON_DIMENSIONS;\n @Input() public iconmargin: string;\n @Input() public iconclass: string;\n @Input() public iconurl: string;\n @Input() public closable = true;\n @Input() public heading: string;\n @Input() public subheading: string;\n @Input() public titleid:string;\n\n public get isClosable() {\n return toBoolean(this.closable);\n }\n\n constructor(elRef: ElementRef, @Inject(DialogRef) private dialogRef: BaseDialog) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n }\n\n public closeDialog() {\n this.dialogRef.close();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ModalModule } from 'ngx-bootstrap/modal';\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { DialogBodyDirective } from './dialog-body/dialog-body.directive';\nimport { DialogFooterDirective } from './dialog-footer/dialog-footer.directive';\nimport { DialogHeaderComponent } from './dialog-header/dialog-header.component';\n\nconst components = [\n DialogBodyDirective,\n DialogFooterDirective,\n DialogHeaderComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ModalModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components],\n entryComponents: []\n})\nexport class DialogModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {registerProps as ɵa} from './dialog-footer/dialog-footer.props';"],"names":["DEFAULT_CLS"],"mappings":";;;;;;;;AAUA,MAAMA,aAAW,GAAG,4BAA4B,CAAC;MAKpC,mBAAmB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AAE,CAAC,GAAG,UAAU,CAAC;gBACxB,eAAe,EAAE,EAAE;aACtB;;;ACzBD;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../projects/components/widgets/dialogs/default/src/dialog-body/dialog-body.directive.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog-footer/dialog-footer.props.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog-footer/dialog-footer.directive.ts","../../../../../projects/components/widgets/dialogs/default/src/base-dialog.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog-header/dialog-header.component.ts","../../../../../projects/components/widgets/dialogs/default/src/dialog.module.ts","../../../../../projects/components/widgets/dialogs/default/src/index.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Inject, Renderer2 } from '@angular/core';\n\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\nimport { addClass, setAttr, setCSS } from '@wm/core';\n\nimport { DialogRef } from '@wm/components/base';\n\ndeclare const $;\n\nconst DEFAULT_CLS = 'app-dialog-body modal-body';\n\n@Directive({\n selector: 'div[wmDialogBody]',\n})\nexport class DialogBodyDirective {\n @HostBinding('style.height') height;\n constructor(\n elRef: ElementRef,\n @Inject(DialogRef) private dialogRef,\n bsModal: BsModalService,\n private renderer: Renderer2\n ) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n\n const subscription = bsModal.onShown.subscribe(() => {\n const dialogRoot = $(elRef.nativeElement).closest('.app-dialog')[0];\n let dialogRootContainer = $('body.wm-app')[0];\n // To identify the microfrontend, if body tag doesn't have wm-app class then app loading as micro-frontend\n if(!dialogRootContainer) {\n const dialogBackrop = $('body > .modal-backdrop')[0];\n const parentContainer = $('body > modal-container')[0];\n dialogRootContainer = $('.wm-app')[0];\n if(dialogRootContainer && parentContainer ){\n if(dialogBackrop){\n this.renderer.appendChild(dialogRootContainer, dialogBackrop);\n }\n this.renderer.appendChild(dialogRootContainer, parentContainer);\n \n }\n }\n const width = this.dialogRef.width;\n const height = this.dialogRef.height;\n if(height){\n setTimeout(e=>{\n setCSS($(elRef.nativeElement)[0], 'height', height);\n });\n } \n if (dialogRoot) {\n if (width) {\n setCSS(dialogRoot, 'width', width);\n }\n setAttr(dialogRoot, 'tabindex', this.dialogRef.tabindex);\n setAttr(dialogRoot, 'name', this.dialogRef.name);\n\n }\n subscription.unsubscribe();\n });\n }\n}\n","import { PROP_BOOLEAN, PROP_STRING, register } from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-dialogfooter',\n new Map([\n ['class', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}]\n ])\n );\n};\n","import { Directive, Injector } from '@angular/core';\n\nimport { BaseComponent, IWidgetConfig, provideAsWidgetRef } from '@wm/components/base';\nimport { registerProps } from './dialog-footer.props';\n\nconst WIDGET_INFO: IWidgetConfig = {\n widgetType: 'wm-dialogfooter',\n hostClass: 'app-dialog-footer modal-footer'\n};\n\n@Directive({\n selector: 'div[wmDialogFooter]',\n providers: [\n provideAsWidgetRef(DialogFooterDirective)\n ]\n})\nexport class DialogFooterDirective extends BaseComponent {\n static initializeProps = registerProps();\n\n constructor(inj: Injector) {\n super(inj, WIDGET_INFO);\n }\n}\n","import { Injector, OnDestroy, TemplateRef, Injectable } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { BsModalRef, BsModalService, ModalOptions } from 'ngx-bootstrap/modal';\n\nimport { Subscription } from 'rxjs';\n\nimport {AbstractDialogService, closePopover, findRootContainer, generateGUId, isMobileApp} from '@wm/core';\n\nimport { BaseComponent, IDialog, IWidgetConfig } from '@wm/components/base';\nimport { createFocusTrap } from '@wavemaker/focus-trap/dist/focus-trap';\n\ndeclare const _;\n\nlet eventsRegistered = false;\n\nlet focusTrapObj = {\n activeElement: null\n};\n\nconst invokeOpenedCallback = (ref) => {\n if (ref) {\n setTimeout(() => {\n const root = findRootContainer(ref.$element);\n // if page styles have to be applied to dialog then dialog has to be child of page element.\n if (root) {\n $('body > modal-container > div').wrap('<' + root + '/>');\n }\n ref.invokeEventCallback('opened', {$event: {type: 'opened'}});\n // focusTrapObj will create focus trap for the respective dialog according to the titleId assigned to them which is unique.\n const container = $('[aria-labelledby= ' + ref.titleId + ']')[0];\n\n const keyboardFocusableElements = [container.querySelectorAll(\n 'a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]:not([tabindex=\"-1\"])'\n )].filter(el => {\n return (\n !el[0].hasAttribute('disabled') && !el[0].hasAttribute('hidden'))\n })[0];\n\n $(keyboardFocusableElements[0]).focus();\n\n focusTrapObj[ref.titleId] = createFocusTrap(container, {\n onActivate: () => container.classList.add('is-active'),\n onDeactivate: () => container.classList.remove('is-active'),\n allowOutsideClick: true,\n setReturnFocus: focusTrapObj.activeElement,\n });\n focusTrapObj[ref.titleId].activate();\n });\n }\n};\n\nconst invokeClosedCallback = (ref) => {\n if (ref) {\n ref.invokeEventCallback('close');\n ref.dialogRef = undefined;\n }\n};\n\n@Injectable()\nexport abstract class BaseDialog extends BaseComponent implements IDialog, OnDestroy {\n\n public name: string;\n\n private readonly dialogService: AbstractDialogService;\n private readonly bsModal: BsModalService;\n\n private dialogRef: BsModalRef;\n public titleId:string = 'wmdialog-' + generateGUId();\n\n protected constructor(\n inj: Injector,\n widgetConfig: IWidgetConfig,\n protected modalOptions: ModalOptions\n ) {\n super(inj, widgetConfig);\n this.dialogService = inj.get(AbstractDialogService);\n this.bsModal = inj.get(BsModalService);\n const router = inj.get(Router);\n\n const subscriptions: Subscription[] = [\n this.bsModal.onShown.subscribe(() => {\n const ref = this.dialogService.getLastOpenedDialog();\n if (ref === this) {\n // Always get the reference of last pushed dialog in the array for calling onOpen callback\n invokeOpenedCallback(ref);\n }\n }),\n this.bsModal.onShow.subscribe(() => {\n focusTrapObj.activeElement = document.activeElement;\n }),\n this.bsModal.onHidden.subscribe((closeReason) => {\n const ref = closeReason === 'esc' || closeReason === 'backdrop-click' ? this.dialogService.getLastOpenedDialog() : this.dialogService.getDialogRefFromClosedDialogs();\n if (ref === this) {\n // remove the dialog reference from opened dialogs and closed dialogs\n this.dialogService.removeFromOpenedDialogs(ref);\n this.dialogService.removeFromClosedDialogs(ref);\n invokeClosedCallback(ref);\n if (ref.closeCallBackFn) {\n ref.closeCallBackFn();\n }\n }\n }),\n this.bsModal.onHide.subscribe(() => {\n // Will de-activate focus trap for the respective dialog when they are closed.\n const ref = this.dialogService.getDialogRefFromClosedDialogs();\n if (ref && focusTrapObj[ref.titleId] !== undefined) {\n focusTrapObj[ref.titleId].deactivate();\n }\n }),\n router.events.subscribe(e => {\n if (e instanceof NavigationEnd) {\n this.close();\n }\n })\n ];\n this.registerDestroyListener(() => {// remove the dialog reference from opened dialogs and closed dialogs\n this.dialogService.removeFromOpenedDialogs(this);\n this.dialogService.removeFromClosedDialogs(this);\n subscriptions.forEach(s => s.unsubscribe());\n });\n }\n\n /**\n * Opens the dialog\n * Subscribe to the onShown event emitter of bsModal and trigger on-opened event callback\n */\n public open(initState?: any) {\n\n // remove the popovers in the page to avoid the overlap with dialog\n // closePopover(this.$element); Commenting this line because it is causing regression(if we have dialog inside popover as partail content, then the dialog close is not working because on closing the popover the partial get destroyed.)\n\n // do not open the dialog again if it is already opened\n const duplicateDialogCheck = (openedDialog) => {\n return openedDialog === this;\n };\n\n if (this.dialogService.getOpenedDialogs().some(duplicateDialogCheck)) {\n return;\n }\n\n this.dialogService.addToOpenedDialogs(this);\n\n // extend the context with the initState\n Object.assign(this.context, initState);\n this.modalOptions.ariaLabelledBy = this.titleId;\n this.dialogRef = this.bsModal.show(this.getTemplateRef(), this.modalOptions);\n // Fix for [WMS-23948]: Focus moving out of active Dialog widget\n if (this.dialogService.getOpenedDialogs().length === 1 && isMobileApp()) {\n const parentSelector = $('body > app-root')[0];\n parentSelector.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * closes the dialog\n * invokes the on-close event callback\n */\n public close() {\n // remove the popovers in the page to avoid the overlap with dialog\n // closePopover(this.$element); Commenting this line because it is causing regression(if we have dialog inside popover as partail content, then the dialog close is not working because on closing the popover the partial get destroyed.)\n if (this.dialogRef) {\n this.dialogService.addToClosedDialogs(this);\n this.dialogRef.hide();\n }\n }\n\n /**\n * Register the dialog with the dialog service for programmatic access\n */\n protected register(scope) {\n // add scope along with name in the dialogRefsCollection Map while registering dialog\n // So that 2 dialogs having same name on different pages won't be overridden.\n this.dialogService.register(this.name, this, scope);\n }\n\n /**\n * De Register the dialog with the dialog service after dialog destruction\n */\n protected deRegister(scope) {\n this.dialogService.deRegister(this.name, scope);\n }\n\n /**\n * subclasses of BaseDialog must implement this method to return the proper template element ref\n * bsModal will use this refence to open the dialog\n * @returns {TemplateRef<any>}\n */\n protected abstract getTemplateRef(): TemplateRef<any>;\n\n protected onPropertyChange(key: string, nv: any, ov?: any) {\n // ignore the class attribute.\n // Prevent the framework from setting the class on the host element.\n if (key === 'class' || key === 'name' || key === 'tabindex') {\n return;\n } else if (key === 'animation') {\n this.modalOptions.class = this.modalOptions.class.replace(' animated ' + ov, '');\n if (nv) {\n this.modalOptions.class = this.modalOptions.class + ' animated ' + nv;\n }\n }\n super.onPropertyChange(key, nv, ov);\n }\n\n public ngOnDestroy() {\n this.close();\n this.deRegister(this.viewParent);\n super.ngOnDestroy();\n }\n}\n","import { Component, ElementRef, Inject, Input } from '@angular/core';\n\nimport { addClass, toBoolean } from '@wm/core';\n\nimport { DialogRef } from '@wm/components/base';\nimport { BaseDialog } from '../base-dialog';\n\nconst DEFAULT_CLS = 'app-dialog-header modal-header';\nconst DEFAULT_ICON_DIMENSIONS = '21px';\n\n@Component({\n selector: 'div[wmDialogHeader]',\n templateUrl: './dialog-header.component.html'\n})\nexport class DialogHeaderComponent {\n\n @Input() public iconwidth = DEFAULT_ICON_DIMENSIONS;\n @Input() public iconheight = DEFAULT_ICON_DIMENSIONS;\n @Input() public iconmargin: string;\n @Input() public iconclass: string;\n @Input() public iconurl: string;\n @Input() public closable = true;\n @Input() public heading: string;\n @Input() public subheading: string;\n @Input() public titleid:string;\n\n public get isClosable() {\n return toBoolean(this.closable);\n }\n\n constructor(elRef: ElementRef, @Inject(DialogRef) private dialogRef: BaseDialog) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n }\n\n public closeDialog() {\n this.dialogRef.close();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ModalModule } from 'ngx-bootstrap/modal';\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { DialogBodyDirective } from './dialog-body/dialog-body.directive';\nimport { DialogFooterDirective } from './dialog-footer/dialog-footer.directive';\nimport { DialogHeaderComponent } from './dialog-header/dialog-header.component';\n\nconst components = [\n DialogBodyDirective,\n DialogFooterDirective,\n DialogHeaderComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ModalModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components],\n entryComponents: []\n})\nexport class DialogModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {registerProps as ɵa} from './dialog-footer/dialog-footer.props';"],"names":["DEFAULT_CLS"],"mappings":";;;;;;;;AAUA,MAAMA,aAAW,GAAG,4BAA4B,CAAC;MAKpC,mBAAmB;IAE5B,YACI,KAAiB,EACU,SAAS,EACpC,OAAuB,EACd,QAAmB;QAFD,cAAS,GAAT,SAAS,CAAA;QAE3B,aAAQ,GAAR,QAAQ,CAAW;QAE5B,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAEA,aAAW,CAAC,CAAC;QAE3C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;YAC3C,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;YACpE,IAAI,mBAAmB,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;;YAE9C,IAAG,CAAC,mBAAmB,EAAE;gBACrB,MAAM,aAA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YA1DF,QAAQ;;YAEoB,YAAY;;;ACKjD,MAAM,WAAW,GAAG,gCAAgC,CAAC;AACrD,MAAM,uBAAuB,GAAG,MAAM,CAAC;MAM1B,qBAAqB;IAgB9B,YAAY,KAAiB,EAA6B,SAAqB;QAArB,cAAS,GAAT,SAAS,CAAY;QAd/D,cAAS,GAAG,uBAAuB,CAAC;QACpC,eAAU,GAAG,uBAAuB,CAAC;QAIrC,aAAQ,GAAG,IAAI,CAAC;QAU5B,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;KAC9C;IAND,IAAW,UAAU;QACjB,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACnC;IAMM,WAAW;QACd,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KAC1B;;;YA1BJ,SAAS,SAAC;gBACP,QAAQ,EAAE,qBAAqB;gBAC/B,+uBAA6C;aAChD;;;YAbmB,UAAU;YAKrB,UAAU,uBAyBiB,MAAM,SAAC,SAAS;;;wBAd/C,KAAK;yBACL,KAAK;yBACL,KAAK;wBACL,KAAK;sBACL,KAAK;uBACL,KAAK;sBACL,KAAK;yBACL,KAAK;sBACL,KAAK;;;ACdV,MAAM,UAAU,GAAG;IACf,mBAAmB;IACnB,qBAAqB;IACrB,qBAAqB;CACxB,CAAC;MAYW,YAAY;;;YAVxB,QAAQ,SAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,WAAW;oBACX,kBAAkB;iBACrB;gBACD,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;gBAC7B,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;gBACxB,eAAe,EAAE,EAAE;aACtB;;;ACzBD;;;;;;"}
@@ -1871,7 +1871,7 @@
1871
1871
  DateComponent.decorators = [
1872
1872
  { type: core.Component, args: [{
1873
1873
  selector: '[wmDate]',
1874
- template: " <input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n [tabindex]=\"tabindex\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"hint\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event);\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [container]=\"containerTarget || 'body'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n<ng-template [ngIf]=\"loadNativeDateInput\">\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n tabindex=\"1000000\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n (click)=\"!(disabled || readonly || isCurrentDate) && showDatePickerModal()\">\n </div>\n</ng-template>\n",
1874
+ template: " <input class=\"form-control app-textbox app-dateinput display-input\"\n focus-target\n type=\"text\"\n [name]=\"name\"\n [tabindex]=\"tabindex\"\n [value]=\"displayValue\"\n (click)=\"toggleDpDropdown($event, true)\"\n (focus)=\"onDateTimeInputFocus(); invokeOnFocus($event);\"\n (blur)=\"onInputBlur($event)\"\n [disabled]=\"disabled || readonly\"\n [autofocus]=\"autofocus\"\n [required]=\"required\"\n [readOnly]=\"isReadOnly\"\n [attr.placeholder]=\"placeholder\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"hint\"\n (change)=\"onDisplayDateChange($event)\"\n (keydown)=\"this._triggeredByUser = true; onDisplayKeydown($event);\">\n\n <span class=\"input-group-btn\">\n <button type=\"button\"\n class=\"btn btn-default btn-time\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled || readonly\"\n [attr.aria-label]=\"displayValue ? 'Change Date ' + displayValue : 'Choose date by pressing enter'\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n (click)=\"toggleDpDropdown($event, false)\">\n <i aria-hidden=\"true\"\n class=\"app-icon wm-sl-l sl-calendar\"></i>\n </button>\n </span>\n <div style=\"width: 0;display: inline-block;\">\n <input class=\"model-holder\"\n aria-label=\"datepicker dropdownmenu\"\n aria-controls=\"date\"\n [container]=\"containerTarget || 'body'\"\n [bsConfig]=\"_dateOptions\"\n [isOpen]=\"isOpen\"\n #datepicker=\"bsDatepicker\"\n bsDatepicker\n [daysDisabled]=\"excludedDaysToDisable\"\n [datesDisabled]=\"excludedDatesToDisable\"\n placement=\"bottom right\"\n [isDisabled]=\"disabled || readonly\"\n [bsValue]=\"bsDataValue\"\n (onShown)=\"onDatePickerOpen()\"\n (onHidden)=\"hideDatepickerDropdown()\"\n (bsValueChange)=\"onDateChange($event)\">\n</div>\n\n<ng-template [ngIf]=\"loadNativeDateInput\">\n <wm-datetimepicker\n dateTimePicker\n mode=\"DATE\"\n [config]=\"_dateOptions\"\n [placement]=\"modal\"\n [excludedDaysToDisable]=\"excludedDaysToDisable\"\n [excludedDatesToDisable]=\"excludedDatesToDisable\"\n [displayFormat]=\"dateInputFormat\"\n [value]=\"bsDataValue\"\n (change)=\"onDateChange($event)\">\n </wm-datetimepicker>\n <div class=\"mobile-input mobile-datepicker-container\"\n tabindex=\"1000000\"\n (focus)=\"onDateTimeInputFocus(true); invokeOnFocus($event);\"\n (blur)=\"onDateTimeInputBlur(); invokeOnTouched($event)\"\n (click)=\"!(disabled || readonly || isCurrentDate) && showDatePickerModal()\">\n </div>\n</ng-template>\n",
1875
1875
  providers: [
1876
1876
  base.provideAs(DateComponent, forms.NG_VALUE_ACCESSOR, true),
1877
1877
  base.provideAs(DateComponent, forms.NG_VALIDATORS, true),