@wavemaker-ai/app-ng-runtime 12.1.1-rc.352 → 12.1.2-rc.353
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.
- package/build-task/bundles/index.umd.js +153 -139
- package/build-task/fesm2022/index.mjs +154 -141
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/build-task/types/index-rolldown-runtime-C25Le4-w.d.ts +1 -0
- package/build-task/types/index.d.ts +41 -37
- package/components/base/bundles/index.umd.js +16 -9
- package/components/base/fesm2022/index.mjs +18 -11
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/bundles/index.umd.js +2 -8
- package/components/basic/audio/fesm2022/index.mjs +3 -9
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/bundles/index.umd.js +101 -65
- package/components/containers/wizard/fesm2022/index.mjs +99 -62
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +79 -5
- package/components/containers/wizardstepper/bundles/index.umd.js +237 -0
- package/components/containers/wizardstepper/fesm2022/index.mjs +215 -0
- package/components/containers/wizardstepper/fesm2022/index.mjs.map +1 -0
- package/components/containers/wizardstepper/package.json +19 -0
- package/components/containers/wizardstepper/types/index.d.ts +71 -0
- package/components/data/list/bundles/index.umd.js +4 -0
- package/components/data/list/fesm2022/index.mjs +4 -0
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +1 -0
- package/components/data/pagination/bundles/index.umd.js +26 -8
- package/components/data/pagination/fesm2022/index.mjs +24 -5
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +5 -3
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/core/bundles/index.umd.js +20 -14
- package/core/fesm2022/index.mjs +23 -17
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +20 -15
- package/runtime/base/fesm2022/index.mjs +52 -46
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +23 -21
- package/runtime/dynamic/bundles/index.umd.js +6 -1
- package/runtime/dynamic/fesm2022/index.mjs +6 -1
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/variables/bundles/index.umd.js +13 -13
- package/variables/fesm2022/index.mjs +18 -18
- package/variables/fesm2022/index.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["DEFAULT_CLS","i1","i1","i3.BaseDialog"],"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-header/dialog-header.component.html"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Inject, OnDestroy, Renderer2 } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\nimport { addClass, getSheetPositionClass, 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 standalone: true,\n selector: 'div[wmDialogBody]',\n})\nexport class DialogBodyDirective implements OnDestroy {\n @HostBinding('style.height') height;\n private bsModalShownSubscription: Subscription;\n\n constructor(\n elRef: ElementRef,\n @Inject(DialogRef) private dialogRef,\n bsModal: BsModalService,\n private readonly renderer: Renderer2\n ) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n\n this.bsModalShownSubscription = bsModal.onShown.subscribe(() => {\n const dialogRoot = $(elRef.nativeElement).closest('.app-dialog')[0];\n const dialogContent = $(elRef.nativeElement).closest('.modal-content')[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 isSheet = this.dialogRef.sheet;\n const sheetPosition = this.dialogRef.sheetPosition;\n if(isSheet) {\n $(dialogRoot).addClass('modal-sheet');\n $(dialogRoot).addClass(getSheetPositionClass(sheetPosition));\n }\n const animation = this.dialogRef.animation;\n if(animation) {\n $(dialogContent).addClass('animated');\n $(dialogContent).addClass(animation);\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 // Clean up subscription after first use\n if (this.bsModalShownSubscription) {\n this.bsModalShownSubscription.unsubscribe();\n this.bsModalShownSubscription = null;\n }\n });\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Unsubscribe from bsModal.onShown if not already unsubscribed\n if (this.bsModalShownSubscription) {\n this.bsModalShownSubscription.unsubscribe();\n this.bsModalShownSubscription = null;\n }\n\n // MEMORY LEAK FIX: Clear dialogRef reference\n this.dialogRef = null;\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, Inject, Injector, Optional} 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 standalone: true,\n selector: 'div[wmDialogFooter]',\n providers: [\n provideAsWidgetRef(DialogFooterDirective)\n ]\n})\nexport class DialogFooterDirective extends BaseComponent {\n static readonly initializeProps = registerProps();\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_INFO, explicitContext);\n }\n}\n","import { Inject, Injectable, Injector, OnDestroy, Optional, TemplateRef } 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, findRootContainer, generateGUId, isMobile } from '@wm/core';\n\nimport { BaseComponent, IDialog, IWidgetConfig, WidgetConfig } from '@wm/components/base';\n\n\nconst invokeOpenedCallback = (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 // Focusing the first focusable element when the dialog is opened\n const container = $('[aria-labelledby= ' + ref.titleId + ']')[0];\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 $(keyboardFocusableElements[0]).focus();\n\n const openedDialogs = ref.dialogService.getOpenedDialogs();\n if (openedDialogs.length > 1) {\n const zIndex = Number($(\"[aria-labelledby= \" + openedDialogs[openedDialogs.length - 2].titleId + \"]\").css('z-index'));\n $('[aria-labelledby= ' + ref.dialogService.getLastOpenedDialog().titleId + ']').css('z-index', zIndex + 2);\n $('bs-modal-backdrop').css('z-index', zIndex + 1);\n }\n });\n};\n\nconst invokeClosedCallback = (ref) => {\n ref.invokeEventCallback('close');\n ref.dialogRef = undefined;\n const openedDialogs = ref.dialogService.getOpenedDialogs();\n if (openedDialogs.length >= 1) {\n const zIndex: any = Number($(\"[aria-labelledby= \" + openedDialogs[openedDialogs.length - 1].titleId + \"]\").css('z-index'));\n $('bs-modal-backdrop').css('z-index', zIndex - 1);\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 private dialogId: string;\n public titleId: string = 'wmdialog-' + generateGUId();\n public sheet: string | boolean;\n public sheetPosition: string;\n private readonly dialogOriginFocusStack: HTMLElement[] = [];\n\n protected constructor(\n inj: Injector,\n @Inject(WidgetConfig) config: IWidgetConfig,\n protected modalOptions: ModalOptions,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, config, explicitContext);\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(({ id }) => {\n const ref = this.dialogService.getLastOpenedDialog();\n if (ref === this && !this.dialogId) {\n // Always get the reference of last pushed dialog in the array for calling onOpen callback\n invokeOpenedCallback(ref);\n this.dialogId = id;\n }\n }),\n this.bsModal.onShow.subscribe(() => { }),\n this.bsModal.onHidden.subscribe((closeReason) => {\n let ref = this.dialogService.getDialogRefFromClosedDialogs();\n if (this.dialogId && closeReason?.id === this.dialogId) {\n ref = this;\n } else if (closeReason === 'esc' || closeReason === 'backdrop-click') {\n ref = this.dialogService.getLastOpenedDialog();\n }\n if (ref === this) {\n this.dialogId = null;\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 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 // extend the context with the initState\n Object.assign(this.context, initState);\n this.modalOptions.ariaLabelledBy = this.titleId;\n this.dialogOriginFocusStack.push(document.activeElement as HTMLElement);\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 && (isMobile())) {\n const parentSelector = $('body > app-root')[0];\n parentSelector.setAttribute('aria-hidden', 'true');\n }\n $('.cdk-focus-trap-anchor').removeAttr('aria-hidden');\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 const lastDialogOrigin = this.dialogOriginFocusStack.pop();\n this.dialogService.addToClosedDialogs(this);\n this.dialogRef.hide();\n // Return focus to the originating element upon dialog closure\n lastDialogOrigin?.focus();\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}","import {CommonModule} from '@angular/common';\nimport {DialogRef, TextContentDirective, WmAppIconComponent} from \"@wm/components/base\";\nimport {Component, ElementRef, Inject, Input, ChangeDetectionStrategy} from '@angular/core';\n\nimport {addClass, App, toBoolean} from '@wm/core';\nimport {BaseDialog} from '../base-dialog';\n\nconst DEFAULT_CLS = 'app-dialog-header modal-header';\nconst DEFAULT_ICON_DIMENSIONS = '21px';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: true,\n imports: [CommonModule, TextContentDirective, WmAppIconComponent],\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 headinglevel?: string = 'h4';\n @Input() public subheading: string;\n @Input() public titleid:string;\n @Input() public title: string;\n isPrism: boolean;\n\n public get isClosable() {\n return toBoolean(this.closable);\n }\n\n constructor(elRef: ElementRef, @Inject(DialogRef) public dialogRef: BaseDialog, public app: App ) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n this.isPrism = this.app.isPrism;\n }\n\n public closeDialog() {\n this.dialogRef.close();\n }\n}\n","@if (isClosable) {\n <button (click)=\"closeDialog();\"\n [attr.aria-label]=\"'Close ' + (title ? title : '') + ' dialog'\" class=\"app-dialog-close close\" [ngClass]=\"{'btn-text': isPrism}\" [attr.title]=\"title ? 'Close ' + title + ' dialog' : dialogRef.appLocale.LABEL_CLOSE\" >\n <span class=\"app-icon wi wi-clear\" aria-hidden=\"true\"></span>\n </button>\n}\n\n@switch (headinglevel) {\n @case ('h1') {\n <h1 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h1>\n }\n @case ('h2') {\n <h2 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h2>\n }\n @case ('h3') {\n <h3 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h3>\n }\n @case ('h4') {\n <h4 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h4>\n }\n @case ('h5') {\n <h5 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h5>\n }\n @case ('h6') {\n <h6 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h6>\n }\n @default {\n <h4 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h4>\n }\n}\n\n<ng-template #headerTemplate>\n @if (iconclass || iconurl) {\n <wm-app-icon [iconclass]=\"iconclass\"\n [iconurl]=\"iconurl\"\n [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\"></wm-app-icon>\n }\n <span class=\"dialog-heading\" [textContent]=\"heading\" [id]=\"titleid\"></span>\n @if (subheading) {\n <span class=\"dialog-sub-heading\" [title]=\"subheading\" [textContent]=\"subheading\"></span>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;AAWA,MAAMA,gBAAc;AAMpB,IAAa,sBAAb,MAAa,oBAAmB;CAI5B,YACI,OAC2B,WAC3B,SACkB,UAAmB;EAFV,KAAA,YAAA;EAET,KAAA,WAAA;EAElB,SAAS,MAAM,eAAeA,aAAW;EAEzC,KAAK,2BAA2B,QAAQ,QAAQ,gBAAe;GAC3D,MAAM,aAAa,EAAE,MAAM,aAAa,CAAC,CAAC,QAAQ,aAAa,CAAC,CAAC;GACjE,MAAM,gBAAgB,EAAE,MAAM,aAAa,CAAC,CAAC,QAAQ,gBAAgB,CAAC,CAAC;GACvE,IAAI,sBAAsB,EAAE,aAAa,CAAC,CAAC;GAE3C,IAAG,CAAC,qBAAqB;IACrB,MAAM,gBAAgB,EAAE,wBAAwB,CAAC,CAAC;IAClD,MAAM,kBAAkB,EAAE,wBAAwB,CAAC,CAAC;IACpD,sBAAsB,EAAE,SAAS,CAAC,CAAC;IACnC,IAAG,uBAAwB,iBAAiB;KACxC,IAAG,eACC,KAAK,SAAS,YAAY,qBAAqB,aAAa;KAEhE,KAAK,SAAS,YAAY,qBAAqB,eAAe;IAEnE;GACH;GACA,MAAM,UAAU,KAAK,UAAU;GAC/B,MAAM,gBAAgB,KAAK,UAAU;GACrC,IAAG,SAAS;IACR,EAAE,UAAU,CAAC,C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og-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-header/dialog-header.component.html"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Inject, OnDestroy, Renderer2 } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\nimport { addClass, getSheetPositionClass, 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 standalone: true,\n selector: 'div[wmDialogBody]',\n})\nexport class DialogBodyDirective implements OnDestroy {\n @HostBinding('style.height') height;\n private bsModalShownSubscription: Subscription;\n\n constructor(\n elRef: ElementRef,\n @Inject(DialogRef) private dialogRef,\n bsModal: BsModalService,\n private readonly renderer: Renderer2\n ) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n\n this.bsModalShownSubscription = bsModal.onShown.subscribe(() => {\n const dialogRoot = $(elRef.nativeElement).closest('.app-dialog')[0];\n const dialogContent = $(elRef.nativeElement).closest('.modal-content')[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 isSheet = this.dialogRef.sheet;\n const sheetPosition = this.dialogRef.sheetPosition;\n if(isSheet) {\n $(dialogRoot).addClass('modal-sheet');\n $(dialogRoot).addClass(getSheetPositionClass(sheetPosition));\n }\n const animation = this.dialogRef.animation;\n if(animation) {\n $(dialogContent).addClass('animated');\n $(dialogContent).addClass(animation);\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 // Clean up subscription after first use\n if (this.bsModalShownSubscription) {\n this.bsModalShownSubscription.unsubscribe();\n this.bsModalShownSubscription = null;\n }\n });\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Unsubscribe from bsModal.onShown if not already unsubscribed\n if (this.bsModalShownSubscription) {\n this.bsModalShownSubscription.unsubscribe();\n this.bsModalShownSubscription = null;\n }\n\n // MEMORY LEAK FIX: Clear dialogRef reference\n this.dialogRef = null;\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, Inject, Injector, Optional} 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 standalone: true,\n selector: 'div[wmDialogFooter]',\n providers: [\n provideAsWidgetRef(DialogFooterDirective)\n ]\n})\nexport class DialogFooterDirective extends BaseComponent {\n static readonly initializeProps = registerProps();\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_INFO, explicitContext);\n }\n}\n","import { Inject, Injectable, Injector, OnDestroy, Optional, TemplateRef } 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, findRootContainer, generateGUId, isMobile } from '@wm/core';\n\nimport { BaseComponent, IDialog, IWidgetConfig, WidgetConfig } from '@wm/components/base';\n\n\nconst invokeOpenedCallback = (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 // Focusing the first focusable element when the dialog is opened\n const container = $('[aria-labelledby= ' + ref.titleId + ']')[0];\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 $(keyboardFocusableElements[0]).focus();\n\n const openedDialogs = ref.dialogService.getOpenedDialogs();\n if (openedDialogs.length > 1) {\n const zIndex = Number($(\"[aria-labelledby= \" + openedDialogs[openedDialogs.length - 2].titleId + \"]\").css('z-index'));\n $('[aria-labelledby= ' + ref.dialogService.getLastOpenedDialog().titleId + ']').css('z-index', zIndex + 2);\n $('bs-modal-backdrop').css('z-index', zIndex + 1);\n }\n });\n};\n\nconst invokeClosedCallback = (ref) => {\n ref.invokeEventCallback('close');\n ref.dialogRef = undefined;\n const openedDialogs = ref.dialogService.getOpenedDialogs();\n if (openedDialogs.length >= 1) {\n const zIndex: any = Number($(\"[aria-labelledby= \" + openedDialogs[openedDialogs.length - 1].titleId + \"]\").css('z-index'));\n $('bs-modal-backdrop').css('z-index', zIndex - 1);\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 private dialogId: string;\n public titleId: string = 'wmdialog-' + generateGUId();\n public sheet: string | boolean;\n public sheetPosition: string;\n private readonly dialogOriginFocusStack: HTMLElement[] = [];\n\n protected constructor(\n inj: Injector,\n @Inject(WidgetConfig) config: IWidgetConfig,\n protected modalOptions: ModalOptions,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, config, explicitContext);\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(({ id }) => {\n const ref = this.dialogService.getLastOpenedDialog();\n if (ref === this && !this.dialogId) {\n // Always get the reference of last pushed dialog in the array for calling onOpen callback\n invokeOpenedCallback(ref);\n this.dialogId = id;\n }\n }),\n this.bsModal.onShow.subscribe(() => { }),\n this.bsModal.onHidden.subscribe((closeReason) => {\n let ref = this.dialogService.getDialogRefFromClosedDialogs();\n if (this.dialogId && closeReason?.id === this.dialogId) {\n ref = this;\n } else if (closeReason === 'esc' || closeReason === 'backdrop-click') {\n ref = this.dialogService.getLastOpenedDialog();\n }\n if (ref === this) {\n this.dialogId = null;\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 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 // extend the context with the initState\n Object.assign(this.context, initState);\n this.modalOptions.ariaLabelledBy = this.titleId;\n this.dialogOriginFocusStack.push(document.activeElement as HTMLElement);\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 && (isMobile())) {\n const parentSelector = $('body > app-root')[0];\n parentSelector.setAttribute('aria-hidden', 'true');\n }\n $('.cdk-focus-trap-anchor').removeAttr('aria-hidden');\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 const lastDialogOrigin = this.dialogOriginFocusStack.pop();\n this.dialogService.addToClosedDialogs(this);\n this.dialogRef.hide();\n // Return focus to the originating element upon dialog closure\n lastDialogOrigin?.focus();\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}","import {CommonModule} from '@angular/common';\nimport {DialogRef, TextContentDirective, WmAppIconComponent} from \"@wm/components/base\";\nimport {Component, ElementRef, Inject, Input, ChangeDetectionStrategy} from '@angular/core';\n\nimport {addClass, App, toBoolean} from '@wm/core';\nimport {BaseDialog} from '../base-dialog';\n\nconst DEFAULT_CLS = 'app-dialog-header modal-header';\nconst DEFAULT_ICON_DIMENSIONS = '21px';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: true,\n imports: [CommonModule, TextContentDirective, WmAppIconComponent],\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 headinglevel?: string = 'h4';\n @Input() public subheading: string;\n @Input() public titleid:string;\n @Input() public title: string;\n isPrism: boolean;\n\n public get isClosable() {\n return toBoolean(this.closable);\n }\n\n constructor(elRef: ElementRef, @Inject(DialogRef) public dialogRef: BaseDialog, public app: App ) {\n addClass(elRef.nativeElement, DEFAULT_CLS);\n this.isPrism = this.app.isPrism;\n }\n\n public closeDialog() {\n this.dialogRef.close();\n }\n}\n","@if (isClosable) {\n <button (click)=\"closeDialog();\"\n [attr.aria-label]=\"'Close ' + (title ? title : '') + ' dialog'\" class=\"app-dialog-close close\" [ngClass]=\"{'btn-text': isPrism}\" [attr.title]=\"title ? 'Close ' + title + ' dialog' : dialogRef.appLocale.LABEL_CLOSE\" >\n <span class=\"app-icon wi wi-clear\" aria-hidden=\"true\"></span>\n </button>\n}\n\n@switch (headinglevel) {\n @case ('h1') {\n <h1 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h1>\n }\n @case ('h2') {\n <h2 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h2>\n }\n @case ('h3') {\n <h3 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h3>\n }\n @case ('h4') {\n <h4 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h4>\n }\n @case ('h5') {\n <h5 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h5>\n }\n @case ('h6') {\n <h6 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h6>\n }\n @default {\n <h4 class=\"app-dialog-title modal-title\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </h4>\n }\n}\n\n<ng-template #headerTemplate>\n @if (iconclass || iconurl) {\n <wm-app-icon [iconclass]=\"iconclass\"\n [iconurl]=\"iconurl\"\n [iconStyle]=\"{width: iconwidth, height: iconheight, margin: iconmargin, fontSize: iconwidth}\"></wm-app-icon>\n }\n <span class=\"dialog-heading\" [textContent]=\"heading\" [id]=\"titleid\"></span>\n @if (subheading) {\n <span class=\"dialog-sub-heading\" [title]=\"subheading\" [textContent]=\"subheading\"></span>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;AAWA,MAAMA,gBAAc;AAMpB,IAA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AE;KAAoB,UAAA;KAAA,QAAA,CAAA,aAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAkB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAIvD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAPjC,MAAA;EACoB,MAAA,CAAA;GAAA,iBAAA,wBAAwB;GAAK,YAClC;GAAI,SACP;IAAC;IAAc;IAAsB;GAAkB;GAAC,UACvD;GAAqB,UAAA;EAAA,CAAA;;;;;;;IAsBC,MAAA;IAAO,MAAA,CAAA,SAAS;;;;;;E,cAjB/C,MAAA,M;E,eACA,MAAA,M;E,eACA,MAAA,M;E,cACA,MAAA,M;E,YACA,MAAA,M;E,aACA,MAAA,M;E,YACA,MAAA,M;E,iBACA,MAAA,M;E,eACA,MAAA,M;E,YACA,MAAA,M;E,UACA,MAAA,M"}
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
27
27
|
|
|
28
28
|
var __defProp = Object.defineProperty;
|
|
29
|
-
var __exportAll = (all,
|
|
30
|
-
let target = {};
|
|
29
|
+
var __exportAll = (all, flags) => {
|
|
30
|
+
let target = Object.setPrototypeOf({}, null);
|
|
31
31
|
for (var name in all) __defProp(target, name, {
|
|
32
32
|
get: all[name],
|
|
33
33
|
enumerable: true
|
|
34
34
|
});
|
|
35
35
|
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
36
|
-
return target;
|
|
36
|
+
return Object.preventExtensions(target);
|
|
37
37
|
};
|
|
38
38
|
exports.FormWidgetType = void 0;
|
|
39
39
|
(function(FormWidgetType) {
|
|
@@ -1540,7 +1540,7 @@
|
|
|
1540
1540
|
const ifDef = (v, d) => v === void 0 ? d : v;
|
|
1541
1541
|
const plus = (a, b) => void 0 === a ? b : void 0 === b ? a : a + b;
|
|
1542
1542
|
const minus = (a, b) => ifDef(a, 0) - ifDef(b, 0);
|
|
1543
|
-
const noop$
|
|
1543
|
+
const noop$1 = () => {};
|
|
1544
1544
|
const createParseSourceSpan = (content) => {
|
|
1545
1545
|
const sourceFile = new compiler.ParseSourceFile(content, "");
|
|
1546
1546
|
const start = new compiler.ParseLocation(sourceFile, 0, 0, 0);
|
|
@@ -1835,7 +1835,7 @@
|
|
|
1835
1835
|
}
|
|
1836
1836
|
};
|
|
1837
1837
|
const nullPipe = () => {
|
|
1838
|
-
return { transform: noop$
|
|
1838
|
+
return { transform: noop$1 };
|
|
1839
1839
|
};
|
|
1840
1840
|
let _cspEnabled;
|
|
1841
1841
|
const isCSPEnabled = () => {
|
|
@@ -1858,11 +1858,11 @@
|
|
|
1858
1858
|
ExpressionType[ExpressionType["Action"] = 1] = "Action";
|
|
1859
1859
|
})(ExpressionType || (ExpressionType = {}));
|
|
1860
1860
|
function $parseExpr(expr, defOnly) {
|
|
1861
|
-
if (!pipeProvider) return noop$
|
|
1862
|
-
if (typeof expr !== "string") return noop$
|
|
1861
|
+
if (!pipeProvider) return noop$1;
|
|
1862
|
+
if (typeof expr !== "string") return noop$1;
|
|
1863
1863
|
expr = expr.trim();
|
|
1864
1864
|
if (expr.endsWith(";")) expr = expr.slice(0, -1);
|
|
1865
|
-
if (!expr.length) return noop$
|
|
1865
|
+
if (!expr.length) return noop$1;
|
|
1866
1866
|
let fn = exprFnCache.get(expr);
|
|
1867
1867
|
if (fn) return fn;
|
|
1868
1868
|
let boundFn;
|
|
@@ -1876,7 +1876,7 @@
|
|
|
1876
1876
|
else {
|
|
1877
1877
|
const ast = new compiler.Parser(new compiler.Lexer()).parseBinding(expr, createParseSourceSpan(expr), 0);
|
|
1878
1878
|
if (ast.errors.length) {
|
|
1879
|
-
fn = noop$
|
|
1879
|
+
fn = noop$1;
|
|
1880
1880
|
boundFn = fn;
|
|
1881
1881
|
} else {
|
|
1882
1882
|
const pipeNameVsIsPureMap = pipeProvider.getPipeNameVsIsPureMap();
|
|
@@ -1926,9 +1926,9 @@
|
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
function $parseEvent(expr, defOnly) {
|
|
1929
|
-
if (typeof expr !== "string") return noop$
|
|
1929
|
+
if (typeof expr !== "string") return noop$1;
|
|
1930
1930
|
expr = expr.trim();
|
|
1931
|
-
if (!expr.length) return noop$
|
|
1931
|
+
if (!expr.length) return noop$1;
|
|
1932
1932
|
let fn = eventFnCache.get(expr);
|
|
1933
1933
|
if (fn) return fn;
|
|
1934
1934
|
if (!defOnly) fn = getFnForEventExpr(expr);
|
|
@@ -1936,7 +1936,7 @@
|
|
|
1936
1936
|
if (isCSPEnabled()) fn = simpleFunctionEvaluator.bind(void 0, expr);
|
|
1937
1937
|
else {
|
|
1938
1938
|
const ast = new compiler.Parser(new compiler.Lexer()).parseAction(expr, createParseSourceSpan(expr), 0);
|
|
1939
|
-
if (ast.errors.length) return noop$
|
|
1939
|
+
if (ast.errors.length) return noop$1;
|
|
1940
1940
|
fn = new ASTCompiler(ast.ast, ExpressionType.Action).compile(defOnly);
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
@@ -3241,7 +3241,7 @@
|
|
|
3241
3241
|
});
|
|
3242
3242
|
scope.itemsPerRowClass = temp.trim();
|
|
3243
3243
|
} else scope.itemsPerRowClass = `col-xs-${12 / parseInt(scope.itemsperrow, 10)}`;
|
|
3244
|
-
} else scope.itemsPerRowClass = "
|
|
3244
|
+
} else scope.itemsPerRowClass = "";
|
|
3245
3245
|
};
|
|
3246
3246
|
const findParent = (lView, viewParentApp) => {
|
|
3247
3247
|
let parent = findViewParent(lView);
|
|
@@ -3775,8 +3775,14 @@
|
|
|
3775
3775
|
}
|
|
3776
3776
|
loadPreviewFontConfig().then((props) => this.loadCss(props?.default)).catch(() => this.loadCss(void 0));
|
|
3777
3777
|
}
|
|
3778
|
+
resolveCssPath(csspath) {
|
|
3779
|
+
const cdnUrl = _WM_APP_PROJECT?.cdnUrl;
|
|
3780
|
+
if (_WM_APP_PROJECT?.isPreview || !cdnUrl || csspath.startsWith(cdnUrl)) return csspath;
|
|
3781
|
+
const relativePath = csspath.startsWith("./") ? csspath.substring(2) : csspath;
|
|
3782
|
+
return relativePath.startsWith("resources/") ? cdnUrl + relativePath : csspath;
|
|
3783
|
+
}
|
|
3778
3784
|
loadCss(fontConfig) {
|
|
3779
|
-
const cssPaths = (fontConfig?.fonts ?? []).filter((font) => !!font.csspath).map((font) => font.csspath);
|
|
3785
|
+
const cssPaths = (fontConfig?.fonts ?? []).filter((font) => !!font.csspath).map((font) => this.resolveCssPath(font.csspath));
|
|
3780
3786
|
loadStyleSheets(cssPaths);
|
|
3781
3787
|
}
|
|
3782
3788
|
static {
|
package/core/fesm2022/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attribute, Binary, BindingPipe, Call, Chain, Conditional, ImplicitReceiver, KeyedRead, Lexer, LiteralArray, LiteralMap, LiteralPrimitive, ParenthesizedExpression, ParseLocation, ParseSourceFile, ParseSourceSpan, Parser, PrefixNot, PropertyRead, Unary } from "@angular/compiler";
|
|
2
|
-
import { assign, attempt, camelCase, clone, cloneDeep, debounce as debounce$1, every, filter, flatten, forEach, get, identity, includes, indexOf, intersection, isArray, isDate, isEmpty, isEqual, isEqualWith, isError, isFunction, isNil, isNull, isNumber, isObject as isObject$1, isString, isUndefined, keys, map, merge, noop as noop$
|
|
2
|
+
import { assign, attempt, camelCase, clone, cloneDeep, debounce as debounce$1, every, filter, flatten, forEach, get, identity, includes, indexOf, intersection, isArray, isDate, isEmpty, isEqual, isEqualWith, isError, isFunction, isNil, isNull, isNumber, isObject as isObject$1, isString, isUndefined, keys, map, merge, noop as noop$2, omit, replace as replace$1, split, startsWith, toLower, toUpper, trim } from "lodash-es";
|
|
3
3
|
import { Subject } from "rxjs";
|
|
4
4
|
import { take } from "rxjs/operators";
|
|
5
5
|
import X2JS from "x2js";
|
|
@@ -8,14 +8,14 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
import { Injectable } from "@angular/core";
|
|
9
9
|
import * as i1 from "@angular/common/http";
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
|
-
var __exportAll = (all,
|
|
12
|
-
let target = {};
|
|
11
|
+
var __exportAll = (all, flags) => {
|
|
12
|
+
let target = Object.setPrototypeOf({}, null);
|
|
13
13
|
for (var name in all) __defProp(target, name, {
|
|
14
14
|
get: all[name],
|
|
15
15
|
enumerable: true
|
|
16
16
|
});
|
|
17
|
-
if (!
|
|
18
|
-
return target;
|
|
17
|
+
if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
+
return flags & 2 ? target : Object.preventExtensions(target);
|
|
19
19
|
};
|
|
20
20
|
var FormWidgetType;
|
|
21
21
|
(function(FormWidgetType) {
|
|
@@ -1522,7 +1522,7 @@ const isDef = (v) => v !== void 0;
|
|
|
1522
1522
|
const ifDef = (v, d) => v === void 0 ? d : v;
|
|
1523
1523
|
const plus = (a, b) => void 0 === a ? b : void 0 === b ? a : a + b;
|
|
1524
1524
|
const minus = (a, b) => ifDef(a, 0) - ifDef(b, 0);
|
|
1525
|
-
const noop$
|
|
1525
|
+
const noop$1 = () => {};
|
|
1526
1526
|
const createParseSourceSpan = (content) => {
|
|
1527
1527
|
const sourceFile = new ParseSourceFile(content, "");
|
|
1528
1528
|
const start = new ParseLocation(sourceFile, 0, 0, 0);
|
|
@@ -1817,7 +1817,7 @@ var ASTCompiler = class {
|
|
|
1817
1817
|
}
|
|
1818
1818
|
};
|
|
1819
1819
|
const nullPipe = () => {
|
|
1820
|
-
return { transform: noop$
|
|
1820
|
+
return { transform: noop$1 };
|
|
1821
1821
|
};
|
|
1822
1822
|
let _cspEnabled;
|
|
1823
1823
|
const isCSPEnabled = () => {
|
|
@@ -1840,11 +1840,11 @@ var ExpressionType;
|
|
|
1840
1840
|
ExpressionType[ExpressionType["Action"] = 1] = "Action";
|
|
1841
1841
|
})(ExpressionType || (ExpressionType = {}));
|
|
1842
1842
|
function $parseExpr(expr, defOnly) {
|
|
1843
|
-
if (!pipeProvider) return noop$
|
|
1844
|
-
if (typeof expr !== "string") return noop$
|
|
1843
|
+
if (!pipeProvider) return noop$1;
|
|
1844
|
+
if (typeof expr !== "string") return noop$1;
|
|
1845
1845
|
expr = expr.trim();
|
|
1846
1846
|
if (expr.endsWith(";")) expr = expr.slice(0, -1);
|
|
1847
|
-
if (!expr.length) return noop$
|
|
1847
|
+
if (!expr.length) return noop$1;
|
|
1848
1848
|
let fn = exprFnCache.get(expr);
|
|
1849
1849
|
if (fn) return fn;
|
|
1850
1850
|
let boundFn;
|
|
@@ -1858,7 +1858,7 @@ function $parseExpr(expr, defOnly) {
|
|
|
1858
1858
|
else {
|
|
1859
1859
|
const ast = new Parser(new Lexer()).parseBinding(expr, createParseSourceSpan(expr), 0);
|
|
1860
1860
|
if (ast.errors.length) {
|
|
1861
|
-
fn = noop$
|
|
1861
|
+
fn = noop$1;
|
|
1862
1862
|
boundFn = fn;
|
|
1863
1863
|
} else {
|
|
1864
1864
|
const pipeNameVsIsPureMap = pipeProvider.getPipeNameVsIsPureMap();
|
|
@@ -1908,9 +1908,9 @@ function simpleFunctionEvaluator(expr, ctx, locals) {
|
|
|
1908
1908
|
}
|
|
1909
1909
|
}
|
|
1910
1910
|
function $parseEvent(expr, defOnly) {
|
|
1911
|
-
if (typeof expr !== "string") return noop$
|
|
1911
|
+
if (typeof expr !== "string") return noop$1;
|
|
1912
1912
|
expr = expr.trim();
|
|
1913
|
-
if (!expr.length) return noop$
|
|
1913
|
+
if (!expr.length) return noop$1;
|
|
1914
1914
|
let fn = eventFnCache.get(expr);
|
|
1915
1915
|
if (fn) return fn;
|
|
1916
1916
|
if (!defOnly) fn = getFnForEventExpr(expr);
|
|
@@ -1918,7 +1918,7 @@ function $parseEvent(expr, defOnly) {
|
|
|
1918
1918
|
if (isCSPEnabled()) fn = simpleFunctionEvaluator.bind(void 0, expr);
|
|
1919
1919
|
else {
|
|
1920
1920
|
const ast = new Parser(new Lexer()).parseAction(expr, createParseSourceSpan(expr), 0);
|
|
1921
|
-
if (ast.errors.length) return noop$
|
|
1921
|
+
if (ast.errors.length) return noop$1;
|
|
1922
1922
|
fn = new ASTCompiler(ast.ast, ExpressionType.Action).compile(defOnly);
|
|
1923
1923
|
}
|
|
1924
1924
|
}
|
|
@@ -2981,7 +2981,7 @@ const validateDataSourceCtx = (ds, ctx) => {
|
|
|
2981
2981
|
return ds.execute(DataSource.Operation.GET_CONTEXT_IDENTIFIER) === ctx;
|
|
2982
2982
|
};
|
|
2983
2983
|
const processFilterExpBindNode = (context, filterExpressions, variable) => {
|
|
2984
|
-
const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : noop$
|
|
2984
|
+
const destroyFn = context.registerDestroyListener ? context.registerDestroyListener.bind(context) : noop$2;
|
|
2985
2985
|
const filter$ = new Subject();
|
|
2986
2986
|
const bindFilExpObj = (obj, targetNodeKey) => {
|
|
2987
2987
|
const listener = (newVal, oldVal) => {
|
|
@@ -3241,7 +3241,7 @@ const setListClass = (scope) => {
|
|
|
3241
3241
|
});
|
|
3242
3242
|
scope.itemsPerRowClass = temp.trim();
|
|
3243
3243
|
} else scope.itemsPerRowClass = `col-xs-${12 / parseInt(scope.itemsperrow, 10)}`;
|
|
3244
|
-
} else scope.itemsPerRowClass = "
|
|
3244
|
+
} else scope.itemsPerRowClass = "";
|
|
3245
3245
|
};
|
|
3246
3246
|
const findParent = (lView, viewParentApp) => {
|
|
3247
3247
|
let parent = findViewParent(lView);
|
|
@@ -3775,8 +3775,14 @@ var CustomIconsLoaderService = class CustomIconsLoaderService {
|
|
|
3775
3775
|
}
|
|
3776
3776
|
loadPreviewFontConfig().then((props) => this.loadCss(props?.default)).catch(() => this.loadCss(void 0));
|
|
3777
3777
|
}
|
|
3778
|
+
resolveCssPath(csspath) {
|
|
3779
|
+
const cdnUrl = _WM_APP_PROJECT?.cdnUrl;
|
|
3780
|
+
if (_WM_APP_PROJECT?.isPreview || !cdnUrl || csspath.startsWith(cdnUrl)) return csspath;
|
|
3781
|
+
const relativePath = csspath.startsWith("./") ? csspath.substring(2) : csspath;
|
|
3782
|
+
return relativePath.startsWith("resources/") ? cdnUrl + relativePath : csspath;
|
|
3783
|
+
}
|
|
3778
3784
|
loadCss(fontConfig) {
|
|
3779
|
-
const cssPaths = (fontConfig?.fonts ?? []).filter((font) => !!font.csspath).map((font) => font.csspath);
|
|
3785
|
+
const cssPaths = (fontConfig?.fonts ?? []).filter((font) => !!font.csspath).map((font) => this.resolveCssPath(font.csspath));
|
|
3780
3786
|
loadStyleSheets(cssPaths);
|
|
3781
3787
|
}
|
|
3782
3788
|
static {
|