@wavemaker/app-ng-runtime 11.14.1-rc.6311 → 11.14.2-1.245
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/components/advanced/carousel/bundles/index.umd.js +15 -1
- package/components/advanced/carousel/carousel.directive.d.ts +1 -0
- package/components/advanced/carousel/esm2022/carousel.directive.mjs +16 -2
- package/components/advanced/carousel/fesm2022/index.mjs +15 -1
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/bundles/index.umd.js +24 -3
- package/components/advanced/login/esm2022/login.component.mjs +25 -4
- package/components/advanced/login/fesm2022/index.mjs +24 -3
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/login.component.d.ts +5 -2
- package/components/base/bundles/index.umd.js +323 -28
- package/components/base/directives/show-in-device.directive.d.ts +2 -1
- package/components/base/esm2022/directives/show-in-device.directive.mjs +22 -4
- package/components/base/esm2022/pipes/custom-pipes.mjs +1 -1
- package/components/base/esm2022/utils/widget-utils.mjs +3 -3
- package/components/base/esm2022/widgets/common/base/base-container.component.mjs +27 -1
- package/components/base/esm2022/widgets/common/base/base-field-validations.mjs +18 -1
- package/components/base/esm2022/widgets/common/base/base.component.mjs +68 -7
- package/components/base/esm2022/widgets/common/base/custom-widget-container.directive.mjs +9 -1
- package/components/base/esm2022/widgets/common/base/dataset-aware-nav.component.mjs +44 -11
- package/components/base/esm2022/widgets/common/base/partial-container.directive.mjs +20 -1
- package/components/base/esm2022/widgets/common/item-template/item-template.directive.mjs +26 -1
- package/components/base/esm2022/widgets/common/lazy-load/lazy-load.directive.mjs +44 -4
- package/components/base/esm2022/widgets/common/partial-param/partial-param.directive.mjs +16 -1
- package/components/base/esm2022/widgets/common/pull-to-refresh/pull-to-refresh.mjs +22 -1
- package/components/base/esm2022/widgets/framework/property-change-handler.mjs +7 -2
- package/components/base/esm2022/widgets/framework/widget-proxy-provider.mjs +5 -3
- package/components/base/esm2022/widgets/framework/widget-registry.mjs +6 -3
- package/components/base/fesm2022/index.mjs +319 -26
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/widgets/common/base/base-container.component.d.ts +3 -2
- package/components/base/widgets/common/base/base-field-validations.d.ts +1 -0
- package/components/base/widgets/common/base/custom-widget-container.directive.d.ts +3 -2
- package/components/base/widgets/common/base/dataset-aware-nav.component.d.ts +6 -2
- package/components/base/widgets/common/base/partial-container.directive.d.ts +3 -2
- package/components/base/widgets/common/item-template/item-template.directive.d.ts +3 -2
- package/components/base/widgets/common/lazy-load/lazy-load.directive.d.ts +1 -1
- package/components/base/widgets/common/partial-param/partial-param.directive.d.ts +3 -2
- package/components/base/widgets/common/pull-to-refresh/pull-to-refresh.d.ts +3 -2
- package/components/basic/anchor/bundles/index.umd.js +13 -1
- package/components/basic/anchor/esm2022/anchor.component.mjs +14 -2
- package/components/basic/anchor/fesm2022/index.mjs +13 -1
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/html/bundles/index.umd.js +13 -1
- package/components/basic/html/esm2022/html.directive.mjs +14 -2
- package/components/basic/html/fesm2022/index.mjs +13 -1
- package/components/basic/html/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/bundles/index.umd.js +17 -1
- package/components/basic/label/esm2022/label.directive.mjs +18 -2
- package/components/basic/label/fesm2022/index.mjs +17 -1
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/label.directive.d.ts +3 -2
- package/components/basic/progress/progress-circle/bundles/index.umd.js +10 -0
- package/components/basic/progress/progress-circle/esm2022/progress-circle.component.mjs +11 -1
- package/components/basic/progress/progress-circle/fesm2022/index.mjs +10 -0
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-circle/progress-circle.component.d.ts +3 -2
- package/components/basic/search/bundles/index.umd.js +40 -12
- package/components/basic/search/esm2022/scrollable.directive.mjs +11 -2
- package/components/basic/search/esm2022/search.component.mjs +31 -12
- package/components/basic/search/fesm2022/index.mjs +40 -12
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/scrollable.directive.d.ts +4 -2
- package/components/basic/search/search.component.d.ts +3 -2
- package/components/basic/spinner/bundles/index.umd.js +9 -1
- package/components/basic/spinner/esm2022/spinner.component.mjs +10 -2
- package/components/basic/spinner/fesm2022/index.mjs +9 -1
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/spinner.component.d.ts +4 -2
- package/components/chart/bundles/index.umd.js +21 -3
- package/components/chart/esm2022/chart.component.mjs +22 -4
- package/components/chart/fesm2022/index.mjs +21 -3
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +3 -2
- package/components/containers/accordion/accordion.directive.d.ts +5 -2
- package/components/containers/accordion/bundles/index.umd.js +49 -2
- package/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +10 -1
- package/components/containers/accordion/esm2022/accordion.directive.mjs +41 -3
- package/components/containers/accordion/fesm2022/index.mjs +49 -2
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/bundles/index.umd.js +13 -0
- package/components/containers/panel/esm2022/panel.component.mjs +14 -1
- package/components/containers/panel/fesm2022/index.mjs +13 -0
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/panel.component.d.ts +3 -2
- package/components/containers/tabs/bundles/index.umd.js +54 -2
- package/components/containers/tabs/esm2022/tab-pane/tab-pane.component.mjs +10 -1
- package/components/containers/tabs/esm2022/tabs.component.mjs +46 -3
- package/components/containers/tabs/fesm2022/index.mjs +54 -2
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/tab-pane/tab-pane.component.d.ts +3 -2
- package/components/containers/tabs/tabs.component.d.ts +5 -2
- package/components/containers/wizard/bundles/index.umd.js +47 -3
- package/components/containers/wizard/esm2022/wizard-step/wizard-step.component.mjs +16 -3
- package/components/containers/wizard/esm2022/wizard.component.mjs +33 -2
- package/components/containers/wizard/fesm2022/index.mjs +47 -3
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/wizard-step/wizard-step.component.d.ts +3 -2
- package/components/containers/wizard/wizard.component.d.ts +4 -2
- package/components/data/card/bundles/index.umd.js +17 -1
- package/components/data/card/card-content/card-content.component.d.ts +3 -2
- package/components/data/card/card.component.d.ts +4 -2
- package/components/data/card/esm2022/card-content/card-content.component.mjs +6 -1
- package/components/data/card/esm2022/card.component.mjs +13 -2
- package/components/data/card/fesm2022/index.mjs +17 -1
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/form/bundles/index.umd.js +92 -0
- package/components/data/form/esm2022/form-action/form-action.directive.mjs +7 -1
- package/components/data/form/esm2022/form-field/form-field.directive.mjs +28 -1
- package/components/data/form/esm2022/form-widget.directive.mjs +8 -1
- package/components/data/form/esm2022/form.component.mjs +27 -1
- package/components/data/form/esm2022/live-actions/live-actions.directive.mjs +7 -1
- package/components/data/form/esm2022/live-filter/live-filter.directive.mjs +12 -1
- package/components/data/form/esm2022/live-form/live-form.directive.mjs +10 -1
- package/components/data/form/fesm2022/index.mjs +92 -0
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/form-action/form-action.directive.d.ts +3 -2
- package/components/data/form/form-field/form-field.directive.d.ts +3 -2
- package/components/data/form/form-widget.directive.d.ts +3 -2
- package/components/data/form/live-actions/live-actions.directive.d.ts +3 -1
- package/components/data/form/live-filter/live-filter.directive.d.ts +3 -1
- package/components/data/form/live-form/live-form.directive.d.ts +3 -1
- package/components/data/list/bundles/index.umd.js +180 -17
- package/components/data/list/esm2022/list-item.directive.mjs +95 -11
- package/components/data/list/esm2022/list.component.mjs +87 -8
- package/components/data/list/fesm2022/index.mjs +180 -17
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/list-item.directive.d.ts +7 -2
- package/components/data/list/list.component.d.ts +3 -0
- package/components/data/live-table/bundles/index.umd.js +13 -1
- package/components/data/live-table/esm2022/live-table.component.mjs +14 -2
- package/components/data/live-table/fesm2022/index.mjs +13 -1
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/live-table.component.d.ts +4 -2
- package/components/data/pagination/bundles/index.umd.js +57 -4
- package/components/data/pagination/esm2022/pagination.component.mjs +58 -5
- package/components/data/pagination/fesm2022/index.mjs +57 -4
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/pagination.component.d.ts +4 -2
- package/components/data/table/bundles/index.umd.js +311 -12
- package/components/data/table/esm2022/table-action/table-action.directive.mjs +8 -1
- package/components/data/table/esm2022/table-column/table-column.directive.mjs +107 -3
- package/components/data/table/esm2022/table-column-group/table-column-group.directive.mjs +9 -1
- package/components/data/table/esm2022/table-cud.directive.mjs +8 -2
- package/components/data/table/esm2022/table-filter.directive.mjs +12 -2
- package/components/data/table/esm2022/table-row/table-row.directive.mjs +8 -1
- package/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +8 -1
- package/components/data/table/esm2022/table.component.mjs +159 -9
- package/components/data/table/fesm2022/index.mjs +311 -12
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/table-action/table-action.directive.d.ts +3 -2
- package/components/data/table/table-column/table-column.directive.d.ts +3 -2
- package/components/data/table/table-column-group/table-column-group.directive.d.ts +3 -2
- package/components/data/table/table-cud.directive.d.ts +3 -1
- package/components/data/table/table-filter.directive.d.ts +3 -1
- package/components/data/table/table-row/table-row.directive.d.ts +3 -2
- package/components/data/table/table-row-action/table-row-action.directive.d.ts +3 -2
- package/components/data/table/table.component.d.ts +2 -2
- package/components/dialogs/alert-dialog/alert-dialog.component.d.ts +3 -2
- package/components/dialogs/alert-dialog/bundles/index.umd.js +5 -0
- package/components/dialogs/alert-dialog/esm2022/alert-dialog.component.mjs +6 -1
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +5 -0
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/bundles/index.umd.js +5 -0
- package/components/dialogs/confirm-dialog/confirm-dialog.component.d.ts +3 -2
- package/components/dialogs/confirm-dialog/esm2022/confirm-dialog.component.mjs +6 -1
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs +5 -0
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/bundles/index.umd.js +15 -2
- package/components/dialogs/default/dialog-body/dialog-body.directive.d.ts +4 -2
- package/components/dialogs/default/esm2022/dialog-body/dialog-body.directive.mjs +16 -3
- package/components/dialogs/default/fesm2022/index.mjs +15 -2
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/bundles/index.umd.js +7 -0
- package/components/dialogs/design-dialog/dialog.component.d.ts +3 -2
- package/components/dialogs/design-dialog/esm2022/dialog.component.mjs +8 -1
- package/components/dialogs/design-dialog/fesm2022/index.mjs +7 -0
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/bundles/index.umd.js +5 -0
- package/components/dialogs/iframe-dialog/esm2022/iframe-dialog.component.mjs +6 -1
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs +5 -0
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/iframe-dialog.component.d.ts +3 -2
- package/components/dialogs/partial-dialog/bundles/index.umd.js +23 -3
- package/components/dialogs/partial-dialog/esm2022/partial-dialog.component.mjs +24 -4
- package/components/dialogs/partial-dialog/fesm2022/index.mjs +23 -3
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/partial-dialog.component.d.ts +4 -2
- package/components/input/base-form/base-form.component.d.ts +4 -2
- package/components/input/base-form/bundles/index.umd.js +16 -2
- package/components/input/base-form/esm2022/base-form.component.mjs +17 -3
- package/components/input/base-form/fesm2022/index.mjs +16 -2
- package/components/input/base-form/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form-custom/base-form-custom.component.d.ts +3 -2
- package/components/input/base-form-custom/bundles/index.umd.js +13 -2
- package/components/input/base-form-custom/esm2022/base-form-custom.component.mjs +14 -3
- package/components/input/base-form-custom/fesm2022/index.mjs +13 -2
- package/components/input/base-form-custom/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/bundles/index.umd.js +7 -0
- package/components/input/checkbox/checkbox.component.d.ts +3 -2
- package/components/input/checkbox/esm2022/checkbox.component.mjs +8 -1
- package/components/input/checkbox/fesm2022/index.mjs +7 -0
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/bundles/index.umd.js +18 -2
- package/components/input/checkboxset/checkboxset.component.d.ts +4 -2
- package/components/input/checkboxset/esm2022/checkboxset.component.mjs +19 -3
- package/components/input/checkboxset/fesm2022/index.mjs +18 -2
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/bundles/index.umd.js +45 -5
- package/components/input/chips/chips.component.d.ts +3 -2
- package/components/input/chips/esm2022/chips.component.mjs +46 -6
- package/components/input/chips/fesm2022/index.mjs +45 -5
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/bundles/index.umd.js +8 -0
- package/components/input/color-picker/color-picker.component.d.ts +3 -2
- package/components/input/color-picker/esm2022/color-picker.component.mjs +9 -1
- package/components/input/color-picker/fesm2022/index.mjs +8 -0
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/composite/bundles/index.umd.js +10 -1
- package/components/input/composite/composite.directive.d.ts +3 -2
- package/components/input/composite/esm2022/composite.directive.mjs +11 -2
- package/components/input/composite/fesm2022/index.mjs +10 -1
- package/components/input/composite/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/bundles/index.umd.js +7 -0
- package/components/input/currency/currency.component.d.ts +3 -2
- package/components/input/currency/esm2022/currency.component.mjs +8 -1
- package/components/input/currency/fesm2022/index.mjs +7 -0
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/dataset-aware-form/bundles/index.umd.js +26 -2
- package/components/input/dataset-aware-form/esm2022/dataset-aware-form.component.mjs +27 -3
- package/components/input/dataset-aware-form/fesm2022/index.mjs +26 -2
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/bundles/index.umd.js +22 -0
- package/components/input/epoch/date/date.component.d.ts +1 -0
- package/components/input/epoch/date/esm2022/date.component.mjs +23 -1
- package/components/input/epoch/date/fesm2022/index.mjs +22 -0
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/bundles/index.umd.js +25 -8
- package/components/input/file-upload/esm2022/file-upload.component.mjs +26 -9
- package/components/input/file-upload/fesm2022/index.mjs +25 -8
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/file-upload.component.d.ts +3 -0
- package/components/input/number/bundles/index.umd.js +8 -0
- package/components/input/number/esm2022/number.component.mjs +9 -1
- package/components/input/number/fesm2022/index.mjs +8 -0
- package/components/input/number/fesm2022/index.mjs.map +1 -1
- package/components/input/number/number.component.d.ts +3 -2
- package/components/input/radioset/bundles/index.umd.js +18 -2
- package/components/input/radioset/esm2022/radioset.component.mjs +19 -3
- package/components/input/radioset/fesm2022/index.mjs +18 -2
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/radioset.component.d.ts +4 -2
- package/components/input/rating/bundles/index.umd.js +10 -0
- package/components/input/rating/esm2022/rating.component.mjs +11 -1
- package/components/input/rating/fesm2022/index.mjs +10 -0
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/rating.component.d.ts +3 -2
- package/components/input/select/bundles/index.umd.js +6 -0
- package/components/input/select/esm2022/select.component.mjs +7 -1
- package/components/input/select/fesm2022/index.mjs +6 -0
- package/components/input/select/fesm2022/index.mjs.map +1 -1
- package/components/input/select/select.component.d.ts +3 -2
- package/components/input/slider/bundles/index.umd.js +10 -0
- package/components/input/slider/esm2022/slider.component.mjs +11 -1
- package/components/input/slider/fesm2022/index.mjs +10 -0
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/slider.component.d.ts +3 -2
- package/components/input/switch/bundles/index.umd.js +22 -2
- package/components/input/switch/esm2022/switch.component.mjs +23 -3
- package/components/input/switch/fesm2022/index.mjs +22 -2
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/switch.component.d.ts +3 -2
- package/components/input/text/bundles/index.umd.js +36 -0
- package/components/input/text/esm2022/input-calendar/input-calendar.component.mjs +8 -1
- package/components/input/text/esm2022/input-color/input-color.component.mjs +8 -1
- package/components/input/text/esm2022/input-email/input-email.component.mjs +8 -1
- package/components/input/text/esm2022/input-number/input-number.component.mjs +8 -1
- package/components/input/text/esm2022/input-text/input-text.component.mjs +9 -1
- package/components/input/text/fesm2022/index.mjs +36 -0
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/input-calendar/input-calendar.component.d.ts +3 -2
- package/components/input/text/input-color/input-color.component.d.ts +3 -2
- package/components/input/text/input-email/input-email.component.d.ts +3 -2
- package/components/input/text/input-number/input-number.component.d.ts +3 -2
- package/components/input/text/input-text/input-text.component.d.ts +3 -2
- package/components/input/textarea/bundles/index.umd.js +7 -0
- package/components/input/textarea/esm2022/textarea.component.mjs +8 -1
- package/components/input/textarea/fesm2022/index.mjs +7 -0
- package/components/input/textarea/fesm2022/index.mjs.map +1 -1
- package/components/input/textarea/textarea.component.d.ts +3 -2
- package/components/navigation/menu/bundles/index.umd.js +55 -6
- package/components/navigation/menu/esm2022/menu-adapator.component.mjs +17 -3
- package/components/navigation/menu/esm2022/menu.component.mjs +10 -3
- package/components/navigation/menu/esm2022/nav/nav-item/nav-item.directive.mjs +6 -1
- package/components/navigation/menu/esm2022/nav/nav.component.mjs +11 -1
- package/components/navigation/menu/esm2022/nav/navigation-control.directive.mjs +16 -3
- package/components/navigation/menu/fesm2022/index.mjs +55 -6
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/menu-adapator.component.d.ts +4 -2
- package/components/navigation/menu/nav/nav-item/nav-item.directive.d.ts +3 -2
- package/components/navigation/menu/nav/nav.component.d.ts +3 -2
- package/components/navigation/menu/nav/navigation-control.directive.d.ts +4 -2
- package/components/navigation/navbar/bundles/index.umd.js +5 -0
- package/components/navigation/navbar/esm2022/navbar.component.mjs +6 -1
- package/components/navigation/navbar/fesm2022/index.mjs +5 -0
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/navbar.component.d.ts +3 -2
- package/components/navigation/popover/bundles/index.umd.js +65 -13
- package/components/navigation/popover/esm2022/popover.component.mjs +63 -11
- package/components/navigation/popover/fesm2022/index.mjs +62 -10
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/popover.component.d.ts +11 -3
- package/components/page/default/bundles/index.umd.js +20 -2
- package/components/page/default/esm2022/layout.directive.mjs +9 -1
- package/components/page/default/esm2022/page-content/page-content.component.mjs +13 -3
- package/components/page/default/fesm2022/index.mjs +20 -2
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/default/layout.directive.d.ts +3 -2
- package/components/page/default/page-content/page-content.component.d.ts +3 -2
- package/components/page/left-panel/bundles/index.umd.js +16 -0
- package/components/page/left-panel/esm2022/left-panel.directive.mjs +17 -1
- package/components/page/left-panel/fesm2022/index.mjs +16 -0
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/left-panel.directive.d.ts +3 -2
- package/components/page/top-nav/bundles/index.umd.js +2 -1
- package/components/page/top-nav/esm2022/top-nav.props.mjs +3 -2
- package/components/page/top-nav/fesm2022/index.mjs +2 -1
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/prefab/bundles/index.umd.js +4 -0
- package/components/prefab/esm2022/prefab.directive.mjs +5 -1
- package/components/prefab/fesm2022/index.mjs +4 -0
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/core/bundles/index.umd.js +391 -94
- package/core/esm2022/public_api.mjs +3 -3
- package/core/esm2022/services/viewport.service.mjs +24 -10
- package/core/esm2022/types/types.mjs +1 -1
- package/core/esm2022/utils/dom.mjs +18 -2
- package/core/esm2022/utils/event-notifier.mjs +5 -2
- package/core/esm2022/utils/lru-cache.mjs +16 -2
- package/core/esm2022/utils/utils.mjs +6 -2
- package/core/esm2022/utils/watcher.mjs +323 -81
- package/core/fesm2022/index.mjs +390 -96
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/public_api.d.ts +2 -2
- package/core/services/viewport.service.d.ts +5 -2
- package/core/types/types.d.ts +1 -0
- package/core/utils/lru-cache.d.ts +6 -0
- package/core/utils/utils.d.ts +1 -0
- package/core/utils/watcher.d.ts +26 -5
- package/http/bundles/index.umd.js +31 -1
- package/http/esm2022/http.service.mjs +32 -2
- package/http/fesm2022/index.mjs +31 -1
- package/http/fesm2022/index.mjs.map +1 -1
- package/http/http.service.d.ts +6 -2
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/bundles/index.umd.js +9 -0
- package/oAuth/esm2022/oAuth.service.mjs +10 -1
- package/oAuth/fesm2022/index.mjs +9 -0
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/oAuth.service.d.ts +3 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +364 -30
- package/runtime/base/components/app-component/app.component.d.ts +4 -0
- package/runtime/base/components/prefab-preview.component.d.ts +5 -2
- package/runtime/base/directives/accessroles.directive.d.ts +4 -3
- package/runtime/base/directives/prefab.directive.d.ts +3 -2
- package/runtime/base/esm2022/components/app-component/app.component.mjs +40 -9
- package/runtime/base/esm2022/components/base-custom-widget.component.mjs +33 -2
- package/runtime/base/esm2022/components/base-layout.component.mjs +7 -1
- package/runtime/base/esm2022/components/base-page.component.mjs +36 -3
- package/runtime/base/esm2022/components/base-partial.component.mjs +37 -3
- package/runtime/base/esm2022/components/base-prefab.component.mjs +32 -3
- package/runtime/base/esm2022/components/base-spa-page.component.mjs +37 -3
- package/runtime/base/esm2022/components/prefab-preview.component.mjs +23 -4
- package/runtime/base/esm2022/directives/accessroles.directive.mjs +11 -2
- package/runtime/base/esm2022/directives/prefab.directive.mjs +9 -1
- package/runtime/base/esm2022/services/app.manager.service.mjs +37 -10
- package/runtime/base/esm2022/services/app.service.mjs +34 -2
- package/runtime/base/esm2022/services/dynamic-component-ref-provider.service.mjs +4 -1
- package/runtime/base/esm2022/services/pipe-provider.service.mjs +7 -4
- package/runtime/base/esm2022/services/spinner.service.mjs +15 -1
- package/runtime/base/esm2022/util/fragment-monitor.mjs +23 -2
- package/runtime/base/fesm2022/index.mjs +365 -31
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/services/app.manager.service.d.ts +6 -1
- package/runtime/base/services/app.service.d.ts +12 -2
- package/runtime/base/services/dynamic-component-ref-provider.service.d.ts +2 -1
- package/runtime/base/services/spinner.service.d.ts +3 -1
- package/runtime/base/util/fragment-monitor.d.ts +6 -0
- package/runtime/dynamic/bundles/index.umd.js +5 -0
- package/runtime/dynamic/esm2022/app/components/page-wrapper.component.mjs +6 -1
- package/runtime/dynamic/fesm2022/index.mjs +5 -0
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/scripts/datatable/datatable.js +100 -14
- package/security/bundles/index.umd.js +41 -2
- package/security/esm2022/security.service.mjs +42 -3
- package/security/fesm2022/index.mjs +41 -2
- package/security/fesm2022/index.mjs.map +1 -1
- package/security/security.service.d.ts +5 -2
- package/variables/bundles/index.umd.js +50 -6
- package/variables/esm2022/manager/action/notification-action.manager.mjs +18 -3
- package/variables/esm2022/manager/variable/base-variable.manager.mjs +15 -2
- package/variables/esm2022/manager/variable/web-socket-variable.manager.mjs +13 -3
- package/variables/esm2022/service/variables.service.mjs +8 -2
- package/variables/fesm2022/index.mjs +50 -6
- package/variables/fesm2022/index.mjs.map +1 -1
|
@@ -5,7 +5,7 @@ import { ActivatedRoute, Router, RouterOutlet, NavigationStart, NavigationEnd, N
|
|
|
5
5
|
import * as i5 from '@angular/common';
|
|
6
6
|
import { DOCUMENT, ɵgetDOM as _getDOM, CommonModule, AsyncPipe, SlicePipe, PercentPipe, I18nPluralPipe, NgLocalization, I18nSelectPipe, KeyValuePipe, UpperCasePipe, LowerCasePipe, JsonPipe, DecimalPipe, TitleCasePipe, CurrencyPipe, DatePipe } from '@angular/common';
|
|
7
7
|
import * as i1 from '@wm/core';
|
|
8
|
-
import { $appDigest, isDefined, getWmProjectProperties, triggerFn, fetchContent, _WM_APP_PROJECT, stringStartsWith, loadStyleSheets, loadScripts, noop as noop$1, App, AbstractI18nService, ScriptLoaderService, Viewport, UtilsService, $invokeWatchers, registerFnByExpr, LRUCache, muteWatchers, AbstractNavigationService, isIos, isAndroid, unMuteWatchers, $watch, isIE, CustomPipeManager, getSessionStorageItem, setPipeProvider, DynamicComponentRefProvider, FieldWidgetService, FieldTypeService, ConstantService, AbstractToasterService, StatePersistence, AbstractSpinnerService, AbstractDialogService, EventNotifier, setCSS, setSessionStorageItem, replace, setNgZone, setAppRef, addClass, removeClass, extendProto, $parseExpr, AppDefaults, isObject as isObject$1, isIphone, isIpod, isIpad } from '@wm/core';
|
|
8
|
+
import { $appDigest, isDefined, getWmProjectProperties, triggerFn, fetchContent, _WM_APP_PROJECT, stringStartsWith, loadStyleSheets, loadScripts, noop as noop$1, App, AbstractI18nService, ScriptLoaderService, Viewport, UtilsService, $invokeWatchers, registerFnByExpr, $unwatchAllByScope, LRUCache, muteWatchers, AbstractNavigationService, isIos, isAndroid, unMuteWatchers, $watch, isIE, CustomPipeManager, getSessionStorageItem, setPipeProvider, DynamicComponentRefProvider, FieldWidgetService, FieldTypeService, ConstantService, AbstractToasterService, StatePersistence, AbstractSpinnerService, AbstractDialogService, EventNotifier, setCSS, setSessionStorageItem, replace, setNgZone, setAppRef, addClass, removeClass, extendProto, $parseExpr, AppDefaults, isObject as isObject$1, isIphone, isIpod, isIpad } from '@wm/core';
|
|
9
9
|
import * as i2 from '@wm/security';
|
|
10
10
|
import { SecurityService } from '@wm/security';
|
|
11
11
|
import * as i4 from '@wm/variables';
|
|
@@ -163,10 +163,13 @@ class AppManagerService {
|
|
|
163
163
|
this.appVariablesLoaded = false;
|
|
164
164
|
this.appVariablesFired = false;
|
|
165
165
|
this._noRedirect = false;
|
|
166
|
+
this.appSubscriptions = []; // MEMORY LEAK FIX: Track subscriptions
|
|
166
167
|
// register method to invoke on session timeout
|
|
167
|
-
|
|
168
|
+
// MEMORY LEAK FIX: Store unsubscribe function for cleanup
|
|
169
|
+
this.sessionTimeoutUnsubscribe = this.$http.registerOnSessionTimeout(this.handle401.bind(this));
|
|
168
170
|
this.$variables.registerDependency('appManager', this);
|
|
169
|
-
|
|
171
|
+
// MEMORY LEAK FIX: Store subscription unsubscribe functions
|
|
172
|
+
this.appSubscriptions.push(this.$app.subscribe('toggle-variable-state', (data) => {
|
|
170
173
|
const variable = data.variable, active = data.active;
|
|
171
174
|
if (!isEmpty(trim(variable.spinnerContext))) {
|
|
172
175
|
if (active) {
|
|
@@ -191,8 +194,8 @@ class AppManagerService {
|
|
|
191
194
|
this.$spinner.hide(variable._spinnerId.shift());
|
|
192
195
|
}
|
|
193
196
|
}
|
|
194
|
-
});
|
|
195
|
-
this.$app.subscribe('userLoggedIn', () => {
|
|
197
|
+
}));
|
|
198
|
+
this.appSubscriptions.push(this.$app.subscribe('userLoggedIn', () => {
|
|
196
199
|
this.setLandingPage();
|
|
197
200
|
if (this.lastLoggedUserId) {
|
|
198
201
|
this.$security.getConfig(config => {
|
|
@@ -201,11 +204,11 @@ class AppManagerService {
|
|
|
201
204
|
}
|
|
202
205
|
}, null);
|
|
203
206
|
}
|
|
204
|
-
});
|
|
205
|
-
this.$app.subscribe('userLoggedOut', () => this.setLandingPage().then(() => {
|
|
206
|
-
this.$app.clearPageCache();
|
|
207
207
|
}));
|
|
208
|
-
this.$app.subscribe('
|
|
208
|
+
this.appSubscriptions.push(this.$app.subscribe('userLoggedOut', () => this.setLandingPage().then(() => {
|
|
209
|
+
this.$app.clearPageCache();
|
|
210
|
+
})));
|
|
211
|
+
this.appSubscriptions.push(this.$app.subscribe('http401', (d = {}) => this.handle401(d.page, d.options)));
|
|
209
212
|
}
|
|
210
213
|
/**
|
|
211
214
|
* On session timeout, if the session timeout config is set to a dialog, then open login dialog
|
|
@@ -605,12 +608,36 @@ class AppManagerService {
|
|
|
605
608
|
// Apply restored modes
|
|
606
609
|
this.$app.setMode(storedModes);
|
|
607
610
|
// Listener for postMessage-based mode changes
|
|
608
|
-
|
|
611
|
+
// MEMORY LEAK FIX: Store bound function reference for cleanup
|
|
612
|
+
this.windowMessageListener = (event) => {
|
|
609
613
|
const { key, modes, shouldPersist } = event.data || {};
|
|
610
614
|
if (key === 'switch-mode' && modes) {
|
|
611
615
|
this.$app.setMode(modes, !shouldPersist);
|
|
612
616
|
}
|
|
617
|
+
};
|
|
618
|
+
window.addEventListener('message', this.windowMessageListener);
|
|
619
|
+
}
|
|
620
|
+
ngOnDestroy() {
|
|
621
|
+
// MEMORY LEAK FIX: Unsubscribe from all app subscriptions
|
|
622
|
+
this.appSubscriptions.forEach(unsubscribe => {
|
|
623
|
+
if (unsubscribe) {
|
|
624
|
+
unsubscribe();
|
|
625
|
+
}
|
|
613
626
|
});
|
|
627
|
+
this.appSubscriptions = [];
|
|
628
|
+
// MEMORY LEAK FIX: Unsubscribe from session timeout
|
|
629
|
+
if (this.sessionTimeoutUnsubscribe) {
|
|
630
|
+
this.sessionTimeoutUnsubscribe();
|
|
631
|
+
this.sessionTimeoutUnsubscribe = null;
|
|
632
|
+
}
|
|
633
|
+
// MEMORY LEAK FIX: Remove window message listener
|
|
634
|
+
if (this.windowMessageListener) {
|
|
635
|
+
window.removeEventListener('message', this.windowMessageListener);
|
|
636
|
+
this.windowMessageListener = null;
|
|
637
|
+
}
|
|
638
|
+
// MEMORY LEAK FIX: Clear references
|
|
639
|
+
this.templates = null;
|
|
640
|
+
this.lastLoggedUserId = null;
|
|
614
641
|
}
|
|
615
642
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppManagerService, deps: [{ token: i1.AbstractHttpService }, { token: i2.SecurityService }, { token: i1.AbstractDialogService }, { token: i1$1.Router }, { token: i1.App }, { token: i4.VariablesService }, { token: i4.MetadataService }, { token: i1.AbstractSpinnerService }, { token: i1.AbstractI18nService }, { token: i5.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
616
643
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppManagerService }); }
|
|
@@ -736,11 +763,32 @@ class FragmentMonitor {
|
|
|
736
763
|
}
|
|
737
764
|
init() {
|
|
738
765
|
// console.log(`inside fragmentMonitor: Page-${(this as any).pageName}, Partial-${(this as any).partialName}`);
|
|
739
|
-
|
|
766
|
+
// MEMORY LEAK FIX: Store subscription reference for cleanup
|
|
767
|
+
this.viewInitSubscription = this.viewInit$.subscribe(noop$1, noop$1, () => {
|
|
740
768
|
this.isViewInitialized = true;
|
|
741
769
|
this.isReady();
|
|
742
770
|
});
|
|
743
771
|
}
|
|
772
|
+
/**
|
|
773
|
+
* MEMORY LEAK FIX: Clean up FragmentMonitor resources
|
|
774
|
+
* Should be called from implementing class's ngOnDestroy
|
|
775
|
+
*/
|
|
776
|
+
cleanupFragmentMonitor() {
|
|
777
|
+
// MEMORY LEAK FIX: Unsubscribe from viewInit$ subscription
|
|
778
|
+
if (this.viewInitSubscription) {
|
|
779
|
+
this.viewInitSubscription.unsubscribe();
|
|
780
|
+
this.viewInitSubscription = null;
|
|
781
|
+
}
|
|
782
|
+
// MEMORY LEAK FIX: Complete Subjects to release subscriptions (if not already completed)
|
|
783
|
+
if (this.viewInit$ && !this.viewInit$.closed) {
|
|
784
|
+
this.viewInit$.complete();
|
|
785
|
+
}
|
|
786
|
+
this.viewInit$ = null;
|
|
787
|
+
if (this.fragmentsLoaded$ && !this.fragmentsLoaded$.closed) {
|
|
788
|
+
this.fragmentsLoaded$.complete();
|
|
789
|
+
}
|
|
790
|
+
this.fragmentsLoaded$ = null;
|
|
791
|
+
}
|
|
744
792
|
registerFragment() {
|
|
745
793
|
this.fragments++;
|
|
746
794
|
}
|
|
@@ -924,7 +972,41 @@ class BasePartialComponent extends FragmentMonitor {
|
|
|
924
972
|
});
|
|
925
973
|
}
|
|
926
974
|
ngOnDestroy() {
|
|
927
|
-
|
|
975
|
+
// MEMORY LEAK FIX: Unwatch all Partial-scoped watchers for THIS specific partial when partial is destroyed
|
|
976
|
+
// Only unwatch watchers for this partial, not all partials (other partials may still be on the page)
|
|
977
|
+
if (this.partialName) {
|
|
978
|
+
$unwatchAllByScope('Partial', this.partialName);
|
|
979
|
+
}
|
|
980
|
+
// MEMORY LEAK FIX: Complete Subjects to release subscriptions
|
|
981
|
+
if (this.destroy$) {
|
|
982
|
+
this.destroy$.complete();
|
|
983
|
+
this.destroy$ = null;
|
|
984
|
+
}
|
|
985
|
+
if (this.viewInit$) {
|
|
986
|
+
this.viewInit$.complete();
|
|
987
|
+
this.viewInit$ = null;
|
|
988
|
+
}
|
|
989
|
+
// MEMORY LEAK FIX: Clear references to prevent memory leaks
|
|
990
|
+
this.Widgets = null;
|
|
991
|
+
this.Variables = null;
|
|
992
|
+
this.Actions = null;
|
|
993
|
+
this.App = null;
|
|
994
|
+
this.containerWidget = null;
|
|
995
|
+
this.i18nService = null;
|
|
996
|
+
this.appLocale = null;
|
|
997
|
+
this.partialDirective = null;
|
|
998
|
+
this.pageDirective = null;
|
|
999
|
+
this.Prefab = null;
|
|
1000
|
+
this.scriptLoaderService = null;
|
|
1001
|
+
this.Viewport = null;
|
|
1002
|
+
this.route = null;
|
|
1003
|
+
this.appManager = null;
|
|
1004
|
+
this.navigationService = null;
|
|
1005
|
+
this.router = null;
|
|
1006
|
+
this.pageParams = null;
|
|
1007
|
+
this.viewParent = null;
|
|
1008
|
+
// MEMORY LEAK FIX: Cleanup FragmentMonitor resources
|
|
1009
|
+
this.cleanupFragmentMonitor();
|
|
928
1010
|
}
|
|
929
1011
|
ngOnAttach(refreshData) {
|
|
930
1012
|
this.unmute();
|
|
@@ -1369,9 +1451,42 @@ class BasePageComponent extends FragmentMonitor {
|
|
|
1369
1451
|
});
|
|
1370
1452
|
}
|
|
1371
1453
|
ngOnDestroy() {
|
|
1454
|
+
// MEMORY LEAK FIX: Unwatch all Page-scoped watchers for THIS specific page when page is destroyed
|
|
1455
|
+
if (this.pageName) {
|
|
1456
|
+
const removedCount = $unwatchAllByScope('Page', this.pageName);
|
|
1457
|
+
if (removedCount > 0) {
|
|
1458
|
+
console.log(`🧹 Cleaned up ${removedCount} Page-scoped watcher(s) for page ${this.pageName}`);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1372
1461
|
//this.captureApplicationThumbnail();
|
|
1373
1462
|
this.savePageSnapShot();
|
|
1374
|
-
|
|
1463
|
+
// MEMORY LEAK FIX: Complete Subjects to release subscriptions
|
|
1464
|
+
if (this.destroy$) {
|
|
1465
|
+
this.destroy$.complete();
|
|
1466
|
+
this.destroy$ = null;
|
|
1467
|
+
}
|
|
1468
|
+
if (this.viewInit$) {
|
|
1469
|
+
this.viewInit$.complete();
|
|
1470
|
+
this.viewInit$ = null;
|
|
1471
|
+
}
|
|
1472
|
+
// MEMORY LEAK FIX: Clear references to prevent memory leaks
|
|
1473
|
+
this.Widgets = null;
|
|
1474
|
+
this.Variables = null;
|
|
1475
|
+
this.Actions = null;
|
|
1476
|
+
this.App = null;
|
|
1477
|
+
this.route = null;
|
|
1478
|
+
this.appManager = null;
|
|
1479
|
+
this.navigationService = null;
|
|
1480
|
+
this.router = null;
|
|
1481
|
+
this.pageParams = null;
|
|
1482
|
+
this.i18nService = null;
|
|
1483
|
+
this.appLocale = null;
|
|
1484
|
+
this.pageDirective = null;
|
|
1485
|
+
this.$page = null;
|
|
1486
|
+
this.scriptLoaderService = null;
|
|
1487
|
+
this.Viewport = null;
|
|
1488
|
+
// MEMORY LEAK FIX: Cleanup FragmentMonitor resources
|
|
1489
|
+
this.cleanupFragmentMonitor();
|
|
1375
1490
|
}
|
|
1376
1491
|
captureApplicationThumbnail() {
|
|
1377
1492
|
const root = this;
|
|
@@ -1736,7 +1851,38 @@ class BaseCustomWidgetComponent extends FragmentMonitor {
|
|
|
1736
1851
|
}, 100);
|
|
1737
1852
|
}
|
|
1738
1853
|
ngOnDestroy() {
|
|
1739
|
-
|
|
1854
|
+
// MEMORY LEAK FIX: Complete Subjects to release subscriptions
|
|
1855
|
+
if (this.destroy$) {
|
|
1856
|
+
this.destroy$.complete();
|
|
1857
|
+
this.destroy$ = null;
|
|
1858
|
+
}
|
|
1859
|
+
if (this.viewInit$) {
|
|
1860
|
+
this.viewInit$.complete();
|
|
1861
|
+
this.viewInit$ = null;
|
|
1862
|
+
}
|
|
1863
|
+
// MEMORY LEAK FIX: Clear references to prevent memory leaks
|
|
1864
|
+
this.Widgets = null;
|
|
1865
|
+
this.BaseWidget = null;
|
|
1866
|
+
this.Variables = null;
|
|
1867
|
+
this.Actions = null;
|
|
1868
|
+
this.App = null;
|
|
1869
|
+
this.containerWidget = null;
|
|
1870
|
+
this.i18nService = null;
|
|
1871
|
+
this.appLocale = null;
|
|
1872
|
+
this.pageDirective = null;
|
|
1873
|
+
this.Prefab = null;
|
|
1874
|
+
this.scriptLoaderService = null;
|
|
1875
|
+
this.customwidgetConfigProvider = null;
|
|
1876
|
+
this.Viewport = null;
|
|
1877
|
+
this.route = null;
|
|
1878
|
+
this.appManager = null;
|
|
1879
|
+
this.navigationService = null;
|
|
1880
|
+
this.router = null;
|
|
1881
|
+
this.props = null;
|
|
1882
|
+
this.events = null;
|
|
1883
|
+
this.viewParent = null;
|
|
1884
|
+
// MEMORY LEAK FIX: Cleanup FragmentMonitor resources
|
|
1885
|
+
this.cleanupFragmentMonitor();
|
|
1740
1886
|
}
|
|
1741
1887
|
ngOnAttach(refreshData) {
|
|
1742
1888
|
this.unmute();
|
|
@@ -1963,7 +2109,36 @@ class BasePrefabComponent extends FragmentMonitor {
|
|
|
1963
2109
|
});
|
|
1964
2110
|
}
|
|
1965
2111
|
ngOnDestroy() {
|
|
1966
|
-
|
|
2112
|
+
// MEMORY LEAK FIX: Unwatch all Prefab-scoped watchers for THIS specific prefab when prefab is destroyed
|
|
2113
|
+
// Only unwatch watchers for this prefab, not all prefabs (other prefabs may still be on the page)
|
|
2114
|
+
if (this.prefabName) {
|
|
2115
|
+
$unwatchAllByScope('Prefab', this.prefabName);
|
|
2116
|
+
}
|
|
2117
|
+
// MEMORY LEAK FIX: Complete Subjects to release subscriptions
|
|
2118
|
+
if (this.destroy$) {
|
|
2119
|
+
this.destroy$.complete();
|
|
2120
|
+
this.destroy$ = null;
|
|
2121
|
+
}
|
|
2122
|
+
if (this.viewInit$) {
|
|
2123
|
+
this.viewInit$.complete();
|
|
2124
|
+
this.viewInit$ = null;
|
|
2125
|
+
}
|
|
2126
|
+
// MEMORY LEAK FIX: Clear references to prevent memory leaks
|
|
2127
|
+
this.Widgets = null;
|
|
2128
|
+
this.Variables = null;
|
|
2129
|
+
this.Actions = null;
|
|
2130
|
+
this.App = null;
|
|
2131
|
+
this.containerWidget = null;
|
|
2132
|
+
this.prefabMngr = null;
|
|
2133
|
+
this.i18nService = null;
|
|
2134
|
+
this.appLocale = null;
|
|
2135
|
+
this.prefabContainerDirective = null;
|
|
2136
|
+
this.scriptLoaderService = null;
|
|
2137
|
+
this.pageDirective = null;
|
|
2138
|
+
this.Viewport = null;
|
|
2139
|
+
this.viewParent = null;
|
|
2140
|
+
// MEMORY LEAK FIX: Cleanup FragmentMonitor resources
|
|
2141
|
+
this.cleanupFragmentMonitor();
|
|
1967
2142
|
}
|
|
1968
2143
|
// user overrides this
|
|
1969
2144
|
onPropertyChange() { }
|
|
@@ -2017,6 +2192,12 @@ class BaseLayoutComponent {
|
|
|
2017
2192
|
}
|
|
2018
2193
|
//TODO: To work cache properly need to implement the below methods and WmRouteReuseStrategy
|
|
2019
2194
|
ngOnDestroy() {
|
|
2195
|
+
// MEMORY LEAK FIX: Clear references to prevent memory leaks
|
|
2196
|
+
this.App = null;
|
|
2197
|
+
this.routerOutlet = null;
|
|
2198
|
+
this.pageDirective = null;
|
|
2199
|
+
this.layoutPages = null;
|
|
2200
|
+
this.layoutName = null;
|
|
2020
2201
|
}
|
|
2021
2202
|
canReuse() {
|
|
2022
2203
|
}
|
|
@@ -2719,8 +2900,42 @@ class BaseSpaPageComponent extends FragmentMonitor {
|
|
|
2719
2900
|
});
|
|
2720
2901
|
}
|
|
2721
2902
|
ngOnDestroy() {
|
|
2903
|
+
// MEMORY LEAK FIX: Unwatch all Page-scoped watchers for THIS specific page when page is destroyed
|
|
2904
|
+
if (this.pageName) {
|
|
2905
|
+
$unwatchAllByScope('Page', this.pageName);
|
|
2906
|
+
// if (removedCount > 0) {
|
|
2907
|
+
// console.log(`🧹 Cleaned up ${removedCount} Page-scoped watcher(s) for page ${this.pageName}`);
|
|
2908
|
+
// }
|
|
2909
|
+
}
|
|
2722
2910
|
this.savePageSnapShot();
|
|
2723
|
-
|
|
2911
|
+
// MEMORY LEAK FIX: Complete Subjects to release subscriptions
|
|
2912
|
+
if (this.destroy$) {
|
|
2913
|
+
this.destroy$.complete();
|
|
2914
|
+
this.destroy$ = null;
|
|
2915
|
+
}
|
|
2916
|
+
if (this.viewInit$) {
|
|
2917
|
+
this.viewInit$.complete();
|
|
2918
|
+
this.viewInit$ = null;
|
|
2919
|
+
}
|
|
2920
|
+
// MEMORY LEAK FIX: Clear references to prevent memory leaks
|
|
2921
|
+
this.Widgets = null;
|
|
2922
|
+
this.Variables = null;
|
|
2923
|
+
this.Actions = null;
|
|
2924
|
+
this.App = null;
|
|
2925
|
+
this.route = null;
|
|
2926
|
+
this.appManager = null;
|
|
2927
|
+
this.navigationService = null;
|
|
2928
|
+
this.router = null;
|
|
2929
|
+
this.pageParams = null;
|
|
2930
|
+
this.i18nService = null;
|
|
2931
|
+
this.appLocale = null;
|
|
2932
|
+
this.layoutDirective = null;
|
|
2933
|
+
this.spaPageDirective = null;
|
|
2934
|
+
this.$page = null;
|
|
2935
|
+
this.scriptLoaderService = null;
|
|
2936
|
+
this.Viewport = null;
|
|
2937
|
+
// MEMORY LEAK FIX: Cleanup FragmentMonitor resources
|
|
2938
|
+
this.cleanupFragmentMonitor();
|
|
2724
2939
|
}
|
|
2725
2940
|
onReady() { }
|
|
2726
2941
|
onBeforePageReady() { }
|
|
@@ -2806,7 +3021,7 @@ class AccessrolesDirective {
|
|
|
2806
3021
|
this.securityService = securityService;
|
|
2807
3022
|
this.inj = inj;
|
|
2808
3023
|
this.processed = false;
|
|
2809
|
-
this.context = {};
|
|
3024
|
+
this.context = {}; // Changed from readonly to allow cleanup
|
|
2810
3025
|
const securityConfig = this.securityService.get();
|
|
2811
3026
|
this.securityEnabled = get(securityConfig, 'securityEnabled');
|
|
2812
3027
|
this.isUserAuthenticated = get(securityConfig, 'authenticated');
|
|
@@ -2879,6 +3094,15 @@ class AccessrolesDirective {
|
|
|
2879
3094
|
this.viewContainerRef.clear();
|
|
2880
3095
|
}
|
|
2881
3096
|
}
|
|
3097
|
+
ngOnDestroy() {
|
|
3098
|
+
// MEMORY LEAK FIX: Clear context to release references to parent scope data
|
|
3099
|
+
if (this.context) {
|
|
3100
|
+
Object.keys(this.context).forEach(key => {
|
|
3101
|
+
delete this.context[key];
|
|
3102
|
+
});
|
|
3103
|
+
this.context = null;
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
2882
3106
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccessrolesDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i2.SecurityService }, { token: i0.Injector }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2883
3107
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: AccessrolesDirective, isStandalone: true, selector: "[accessroles]", inputs: { accessroles: "accessroles" }, ngImport: i0 }); }
|
|
2884
3108
|
}
|
|
@@ -3108,7 +3332,10 @@ class PipeProvider {
|
|
|
3108
3332
|
this.preparePipeMeta(CurrencyPipe, 'currency', true, [this._locale]),
|
|
3109
3333
|
this.preparePipeMeta(DatePipe, 'date', true, [this._locale]),
|
|
3110
3334
|
this.preparePipeMeta(ToDatePipe, 'toDate', true, [
|
|
3111
|
-
new DatePipe(this._locale),
|
|
3335
|
+
new DatePipe(this._locale),
|
|
3336
|
+
undefined,
|
|
3337
|
+
this.injector.get(App),
|
|
3338
|
+
this.injector.get(CustomPipeManager)
|
|
3112
3339
|
]),
|
|
3113
3340
|
this.preparePipeMeta(ToNumberPipe, 'toNumber', true, [
|
|
3114
3341
|
new DecimalPipe(this._locale),
|
|
@@ -3125,7 +3352,7 @@ class PipeProvider {
|
|
|
3125
3352
|
new DecimalPipe(this._locale)
|
|
3126
3353
|
]),
|
|
3127
3354
|
this.preparePipeMeta(StringToNumberPipe, 'stringToNumber', true),
|
|
3128
|
-
this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(CustomPipeManager)]),
|
|
3355
|
+
this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(App), this.injector.get(CustomPipeManager)]),
|
|
3129
3356
|
this.preparePipeMeta(TrustAsPipe, 'trustAs', true, [this.domSanitizer]),
|
|
3130
3357
|
this.preparePipeMeta(SanitizePipe, 'sanitize', true, [this.domSanitizer]),
|
|
3131
3358
|
this.preparePipeMeta(TemplateReplacePipe, 'templateReplace', true),
|
|
@@ -3288,7 +3515,8 @@ class AppRef {
|
|
|
3288
3515
|
this.isTemplateBundleType = wmProjectProperties.type === "TEMPLATEBUNDLE" /* PROJECT_TYPE.TEMPLATE_BUNDLE */;
|
|
3289
3516
|
this.targetPlatform = wmProjectProperties.platformType;
|
|
3290
3517
|
this.isPrism = wmProjectProperties.template === "PRISM";
|
|
3291
|
-
|
|
3518
|
+
// MEMORY LEAK FIX: Store unsubscribe function for cleanup
|
|
3519
|
+
this.sessionTimeoutUnsubscribe = this.httpService.registerOnSessionTimeout(this.on401.bind(this));
|
|
3292
3520
|
this.appLocale = this.i18nService.getAppLocale();
|
|
3293
3521
|
this.httpService.setLocale(this.appLocale);
|
|
3294
3522
|
}
|
|
@@ -3375,6 +3603,19 @@ class AppRef {
|
|
|
3375
3603
|
registerFnByExpr(expr, fn[0], fn[1]);
|
|
3376
3604
|
});
|
|
3377
3605
|
}
|
|
3606
|
+
/**
|
|
3607
|
+
* Utility method to check if an object has a property
|
|
3608
|
+
* This is commonly used in expressions to check object properties
|
|
3609
|
+
* @param obj The object to check
|
|
3610
|
+
* @param prop The property name to check
|
|
3611
|
+
* @returns true if the object has the property, false otherwise
|
|
3612
|
+
*/
|
|
3613
|
+
hasOwnObjectProperty(obj, prop) {
|
|
3614
|
+
if (!obj || typeof obj !== 'object') {
|
|
3615
|
+
return false;
|
|
3616
|
+
}
|
|
3617
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
3618
|
+
}
|
|
3378
3619
|
setMode(modes, shouldPersist = false) {
|
|
3379
3620
|
const htmlEl = document.getElementsByTagName('html')[0];
|
|
3380
3621
|
//html element sanity check
|
|
@@ -3403,6 +3644,24 @@ class AppRef {
|
|
|
3403
3644
|
localStorage.setItem('wm-app-modes', JSON.stringify(modes));
|
|
3404
3645
|
}
|
|
3405
3646
|
;
|
|
3647
|
+
ngOnDestroy() {
|
|
3648
|
+
// MEMORY LEAK FIX: Destroy EventNotifier to release subscribers
|
|
3649
|
+
if (this._eventNotifier) {
|
|
3650
|
+
this._eventNotifier.destroy();
|
|
3651
|
+
this._eventNotifier = null;
|
|
3652
|
+
}
|
|
3653
|
+
// MEMORY LEAK FIX: Unsubscribe from session timeout
|
|
3654
|
+
if (this.sessionTimeoutUnsubscribe) {
|
|
3655
|
+
this.sessionTimeoutUnsubscribe();
|
|
3656
|
+
this.sessionTimeoutUnsubscribe = null;
|
|
3657
|
+
}
|
|
3658
|
+
// MEMORY LEAK FIX: Clear references
|
|
3659
|
+
this.Variables = null;
|
|
3660
|
+
this.Actions = null;
|
|
3661
|
+
this.appLocale = null;
|
|
3662
|
+
this.modes = null;
|
|
3663
|
+
this.dynamicComponentContainerRef = null;
|
|
3664
|
+
}
|
|
3406
3665
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppRef, deps: [{ token: i0.Injector }, { token: i1.AbstractI18nService }, { token: i1.StatePersistence }, { token: i1.AbstractHttpService }, { token: i2.SecurityService }, { token: i1$1.RouteReuseStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3407
3666
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppRef }); }
|
|
3408
3667
|
}
|
|
@@ -3905,6 +4164,20 @@ class SpinnerServiceImpl extends AbstractSpinnerService {
|
|
|
3905
4164
|
this.messagesByContext[ctx] = {};
|
|
3906
4165
|
}
|
|
3907
4166
|
}
|
|
4167
|
+
ngOnDestroy() {
|
|
4168
|
+
// MEMORY LEAK FIX: Complete Subject to release subscriptions
|
|
4169
|
+
if (this.messageSource) {
|
|
4170
|
+
this.messageSource.complete();
|
|
4171
|
+
this.messageSource = null;
|
|
4172
|
+
}
|
|
4173
|
+
// MEMORY LEAK FIX: Clear messages by context
|
|
4174
|
+
if (this.messagesByContext) {
|
|
4175
|
+
Object.keys(this.messagesByContext).forEach(key => {
|
|
4176
|
+
delete this.messagesByContext[key];
|
|
4177
|
+
});
|
|
4178
|
+
this.messagesByContext = null;
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
3908
4181
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3909
4182
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerServiceImpl }); }
|
|
3910
4183
|
}
|
|
@@ -4420,6 +4693,7 @@ class AppComponent {
|
|
|
4420
4693
|
this.isApplicationType = false;
|
|
4421
4694
|
this.enableSkipToMainContent = getWmProjectProperties().enableSkipToMainContent === 'true' || getWmProjectProperties().enableSkipToMainContent === true;
|
|
4422
4695
|
this.retryCount = 0;
|
|
4696
|
+
this.appManagerSubscriptions = []; // MEMORY LEAK FIX: Track appManager subscriptions
|
|
4423
4697
|
this.appLocale = {};
|
|
4424
4698
|
this.spinner = { show: false, messages: [], arialabel: '' };
|
|
4425
4699
|
this.isOAuthDialogOpen = false;
|
|
@@ -4432,7 +4706,8 @@ class AppComponent {
|
|
|
4432
4706
|
this.customIconsLoaderService.load();
|
|
4433
4707
|
}
|
|
4434
4708
|
// subscribe to OAuth changes
|
|
4435
|
-
|
|
4709
|
+
// MEMORY LEAK FIX: Store subscription reference for cleanup
|
|
4710
|
+
this.oAuthProvidersSubscription = oAuthService.getOAuthProvidersAsObservable().subscribe((providers) => {
|
|
4436
4711
|
this.providersConfig = providers;
|
|
4437
4712
|
if (providers.length) {
|
|
4438
4713
|
this.showOAuthDialog();
|
|
@@ -4442,7 +4717,8 @@ class AppComponent {
|
|
|
4442
4717
|
}
|
|
4443
4718
|
});
|
|
4444
4719
|
// Subscribe to the message source to show/hide app spinner
|
|
4445
|
-
|
|
4720
|
+
// MEMORY LEAK FIX: Store subscription reference for cleanup
|
|
4721
|
+
this.spinnerMessageSubscription = this.spinnerService.getMessageSource().asObservable().subscribe((data) => {
|
|
4446
4722
|
// setTimeout is to avoid 'ExpressionChangedAfterItHasBeenCheckedError'
|
|
4447
4723
|
setTimeout(() => {
|
|
4448
4724
|
this.spinner.show = data.show;
|
|
@@ -4454,7 +4730,8 @@ class AppComponent {
|
|
|
4454
4730
|
setTheme('bs3');
|
|
4455
4731
|
let spinnerId;
|
|
4456
4732
|
let onPageRendered = noop$1;
|
|
4457
|
-
|
|
4733
|
+
// MEMORY LEAK FIX: Store subscription reference for cleanup
|
|
4734
|
+
this.routerEventsSubscription = this.router.events.subscribe(e => {
|
|
4458
4735
|
if (e instanceof NavigationStart) {
|
|
4459
4736
|
let page = e.url.split('?')[0];
|
|
4460
4737
|
page = page.substring(1);
|
|
@@ -4489,12 +4766,13 @@ class AppComponent {
|
|
|
4489
4766
|
}, 1000);
|
|
4490
4767
|
}
|
|
4491
4768
|
});
|
|
4492
|
-
|
|
4769
|
+
// MEMORY LEAK FIX: Store subscription unsubscribe functions
|
|
4770
|
+
this.appManagerSubscriptions.push(this.appManager.subscribe('pageReady', () => {
|
|
4493
4771
|
onPageRendered();
|
|
4494
|
-
});
|
|
4495
|
-
this.appManager.subscribe('pageAttach', () => {
|
|
4772
|
+
}));
|
|
4773
|
+
this.appManagerSubscriptions.push(this.appManager.subscribe('pageAttach', () => {
|
|
4496
4774
|
onPageRendered();
|
|
4497
|
-
});
|
|
4775
|
+
}));
|
|
4498
4776
|
}
|
|
4499
4777
|
showOAuthDialog() {
|
|
4500
4778
|
if (!this.isOAuthDialogOpen) {
|
|
@@ -4569,9 +4847,35 @@ class AppComponent {
|
|
|
4569
4847
|
$invokeWatchers();
|
|
4570
4848
|
}
|
|
4571
4849
|
ngOnDestroy() {
|
|
4850
|
+
// MEMORY LEAK FIX: Unwatch all App-scoped watchers when app is destroyed
|
|
4851
|
+
$unwatchAllByScope('App');
|
|
4852
|
+
// MEMORY LEAK FIX: Unsubscribe from navigation end subscription
|
|
4572
4853
|
if (this.navigationEndSubscription) {
|
|
4573
4854
|
this.navigationEndSubscription.unsubscribe();
|
|
4574
|
-
|
|
4855
|
+
this.navigationEndSubscription = null;
|
|
4856
|
+
}
|
|
4857
|
+
// MEMORY LEAK FIX: Unsubscribe from OAuth providers subscription
|
|
4858
|
+
if (this.oAuthProvidersSubscription) {
|
|
4859
|
+
this.oAuthProvidersSubscription.unsubscribe();
|
|
4860
|
+
this.oAuthProvidersSubscription = null;
|
|
4861
|
+
}
|
|
4862
|
+
// MEMORY LEAK FIX: Unsubscribe from spinner message subscription
|
|
4863
|
+
if (this.spinnerMessageSubscription) {
|
|
4864
|
+
this.spinnerMessageSubscription.unsubscribe();
|
|
4865
|
+
this.spinnerMessageSubscription = null;
|
|
4866
|
+
}
|
|
4867
|
+
// MEMORY LEAK FIX: Unsubscribe from router events subscription
|
|
4868
|
+
if (this.routerEventsSubscription) {
|
|
4869
|
+
this.routerEventsSubscription.unsubscribe();
|
|
4870
|
+
this.routerEventsSubscription = null;
|
|
4871
|
+
}
|
|
4872
|
+
// MEMORY LEAK FIX: Unsubscribe from appManager subscriptions
|
|
4873
|
+
this.appManagerSubscriptions.forEach(unsubscribe => {
|
|
4874
|
+
if (unsubscribe) {
|
|
4875
|
+
unsubscribe();
|
|
4876
|
+
}
|
|
4877
|
+
});
|
|
4878
|
+
this.appManagerSubscriptions = [];
|
|
4575
4879
|
}
|
|
4576
4880
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AppComponent, deps: [{ token: PipeProvider }, { token: i0.ApplicationRef }, { token: i0.ElementRef }, { token: i2$2.OAuthService }, { token: i1.AbstractDialogService }, { token: i1.AbstractSpinnerService }, { token: i0.NgZone }, { token: i1$1.Router }, { token: i1.App }, { token: AppManagerService }, { token: i1.CustomIconsLoaderService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4577
4881
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: AppComponent, isStandalone: true, selector: "app-root", viewQueries: [{ propertyName: "routerOutlet", first: true, predicate: RouterOutlet, descendants: true }, { propertyName: "dynamicComponentContainerRef", first: true, predicate: ["dynamicComponent"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (startApp) {\n @if(enableSkipToMainContent) {\n <div id=\"app-focus-start\" tabindex=\"-1\"></div>\n <a href=\"javascript:void(0);\" class=\"skip\" (click)=\"skipToAppContent($event)\">{{appLocale.LABEL_SKIP_TO_MAIN_CONTENT || 'Skip to main content'}}</a>\n }\n <router-outlet></router-outlet>\n @if (isApplicationType) {\n <div wmContainer partialContainer content=\"Common\" hidden class=\"ng-hide\"></div>\n }\n <app-spinner name=\"globalspinner\" classname=\"global-spinner\" role=\"alert\" aria-live=\"assertive\" [attr.aria-label]=\"spinner.arialabel || 'Loading'\" [show]=\"spinner.show\" [spinnermessages]=\"spinner.messages\"></app-spinner>\n <div wmDialog name=\"oAuthLoginDialog\" title=\"Application is requesting you to sign in with\"\n close.event=\"closeOAuthDialog()\">\n <ng-template #dialogBody>\n <ul class=\"list-items\">\n @for (provider of providersConfig; track provider) {\n <li class=\"list-item\">\n <button class=\"btn\" (click)=\"provider.invoke()\">{{provider.name}}</button>\n </li>\n }\n </ul>\n </ng-template>\n </div>\n <div wmConfirmDialog name=\"_app-confirm-dialog\" title.bind=\"title\" message.bind=\"message\" oktext.bind=\"oktext\"\n canceltext.bind=\"canceltext\" closable=\"false\" iconclass.bind=\"iconclass\"\n escape.event=\"onEscape()\" ok.event=\"onOk()\" cancel.event=\"onCancel()\" close.event=\"onClose()\" opened.event=\"onOpen()\"></div>\n @if (!isApplicationType) {\n <div wmConfirmDialog name=\"PrefabConfirmDialog\" title.bind=\"title\" message.bind=\"text\" oktext.bind=\"okButtonText\"\n canceltext.bind=\"cancelButtonText\" closable=\"false\" iconclass.bind=\"iconclass\"\n escape.event=\"onEscape()\" ok.event=\"onOk()\" cancel.event=\"onCancel()\" close.event=\"onClose()\" opened.event=\"onOpen()\"></div>\n }\n @if (!isApplicationType) {\n <div wmAlertDialog name=\"PrefabAlertDialog\" title.bind=\"title\" message.bind=\"text\" oktext.bind=\"okButtonText\"\n canceltext.bind=\"cancelButtonText\" closable=\"false\" iconclass.bind=\"iconclass\"\n escape.event=\"onEscape()\" ok.event=\"onOk()\" cancel.event=\"onCancel()\" close.event=\"onClose()\" opened.event=\"onOpen()\"></div>\n }\n <div wmAppExt></div>\n <i id=\"wm-mobile-display\"></i>\n}\n<!--Dummy container to create the component dynamically-->\n<ng-container #dynamicComponent></ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: AlertDialogComponent, selector: "div[wmAlertDialog]" }, { kind: "component", type: ConfirmDialogComponent, selector: "div[wmConfirmDialog]" }, { kind: "component", type: DialogComponent, selector: "div[wmDialog]" }, { kind: "component", type: AppSpinnerComponent, selector: "app-spinner", inputs: ["show", "spinnermessages", "classname", "arialabel"] }, { kind: "directive", type: ContainerDirective, selector: "[wmContainer]" }, { kind: "directive", type: PartialParamHandlerDirective, selector: "[partialContainer]" }, { kind: "directive", type: PartialContainerDirective, selector: "[partialContainer]" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -4680,6 +4984,14 @@ class PrefabDirective {
|
|
|
4680
4984
|
}
|
|
4681
4985
|
});
|
|
4682
4986
|
}
|
|
4987
|
+
ngOnDestroy() {
|
|
4988
|
+
// MEMORY LEAK FIX: Clear ViewContainerRef to destroy dynamically created components
|
|
4989
|
+
if (this.vcRef) {
|
|
4990
|
+
this.vcRef.clear();
|
|
4991
|
+
}
|
|
4992
|
+
// MEMORY LEAK FIX: Clear ElementRef reference
|
|
4993
|
+
this.elRef = null;
|
|
4994
|
+
}
|
|
4683
4995
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PrefabDirective, deps: [{ token: WidgetRef, self: true }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: PrefabManagerService }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: ComponentRefProvider }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4684
4996
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: PrefabDirective, isStandalone: true, selector: "[wmPrefab][prefabname]", ngImport: i0 }); }
|
|
4685
4997
|
}
|
|
@@ -4700,7 +5012,8 @@ const PREFAB = 'PREFAB';
|
|
|
4700
5012
|
class PrefabPreviewComponent {
|
|
4701
5013
|
constructor(prefabManager) {
|
|
4702
5014
|
this.prefabManager = prefabManager;
|
|
4703
|
-
|
|
5015
|
+
// MEMORY LEAK FIX: Store bound function reference for cleanup
|
|
5016
|
+
this.windowMessageListener = (e) => {
|
|
4704
5017
|
const context = e.data && e.data.context;
|
|
4705
5018
|
if (context !== PREFAB) {
|
|
4706
5019
|
return;
|
|
@@ -4719,7 +5032,8 @@ class PrefabPreviewComponent {
|
|
|
4719
5032
|
else if (action === 'invoke-script') {
|
|
4720
5033
|
this.invokeScript(payload);
|
|
4721
5034
|
}
|
|
4722
|
-
}
|
|
5035
|
+
};
|
|
5036
|
+
window.addEventListener('message', this.windowMessageListener);
|
|
4723
5037
|
}
|
|
4724
5038
|
postMessage(action, payload) {
|
|
4725
5039
|
const data = {
|
|
@@ -4736,7 +5050,8 @@ class PrefabPreviewComponent {
|
|
|
4736
5050
|
}
|
|
4737
5051
|
init() {
|
|
4738
5052
|
this.previewMode = true;
|
|
4739
|
-
|
|
5053
|
+
// MEMORY LEAK FIX: Store subscription reference
|
|
5054
|
+
this.readyStateSubscription = this.prefabInstance.readyState.subscribe(() => { }, () => { }, () => {
|
|
4740
5055
|
this.prefabManager.getConfig('__self__')
|
|
4741
5056
|
.then(config => {
|
|
4742
5057
|
this.config = config;
|
|
@@ -4770,6 +5085,22 @@ class PrefabPreviewComponent {
|
|
|
4770
5085
|
this.setupEventListeners();
|
|
4771
5086
|
this.postMessage('init');
|
|
4772
5087
|
}
|
|
5088
|
+
ngOnDestroy() {
|
|
5089
|
+
// MEMORY LEAK FIX: Remove window message listener
|
|
5090
|
+
if (this.windowMessageListener) {
|
|
5091
|
+
window.removeEventListener('message', this.windowMessageListener);
|
|
5092
|
+
this.windowMessageListener = null;
|
|
5093
|
+
}
|
|
5094
|
+
// MEMORY LEAK FIX: Unsubscribe from readyState
|
|
5095
|
+
if (this.readyStateSubscription) {
|
|
5096
|
+
this.readyStateSubscription.unsubscribe();
|
|
5097
|
+
this.readyStateSubscription = null;
|
|
5098
|
+
}
|
|
5099
|
+
// MEMORY LEAK FIX: Clear ViewChild reference
|
|
5100
|
+
this.prefabInstance = null;
|
|
5101
|
+
// MEMORY LEAK FIX: Clear config
|
|
5102
|
+
this.config = null;
|
|
5103
|
+
}
|
|
4773
5104
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PrefabPreviewComponent, deps: [{ token: PrefabManagerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4774
5105
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PrefabPreviewComponent, isStandalone: true, selector: "wm-prefab-preview", viewQueries: [{ propertyName: "prefabInstance", first: true, predicate: PrefabDirective$1, descendants: true, static: true }], ngImport: i0, template: `
|
|
4775
5106
|
<div class="prefab-preview row">
|
|
@@ -4850,6 +5181,7 @@ class DynamicComponentRefProviderService {
|
|
|
4850
5181
|
selector: selector of the component
|
|
4851
5182
|
transpile: flag for transpiling HTML. By default it is true
|
|
4852
5183
|
nocache: flag for render it from cache or not. By default it is true
|
|
5184
|
+
* @returns ComponentRef - the created component reference for cleanup
|
|
4853
5185
|
*/
|
|
4854
5186
|
async addComponent(target, markup, context = {}, options = {}) {
|
|
4855
5187
|
options.transpile = isDefined(options.transpile) ? options.transpile : true;
|
|
@@ -4859,6 +5191,8 @@ class DynamicComponentRefProviderService {
|
|
|
4859
5191
|
const component = this.app.dynamicComponentContainerRef.createComponent(componentFactoryRef, 0, get(options, 'inj'));
|
|
4860
5192
|
extendProto(component.instance, context);
|
|
4861
5193
|
target.appendChild(component.location.nativeElement);
|
|
5194
|
+
// MEMORY LEAK FIX: Return component reference so caller can destroy it
|
|
5195
|
+
return component;
|
|
4862
5196
|
}
|
|
4863
5197
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DynamicComponentRefProviderService, deps: [{ token: i1.App }, { token: AppManagerService }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4864
5198
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DynamicComponentRefProviderService }); }
|