@wavemaker/app-ng-runtime 11.8.0-next.24904 → 11.8.0-next.27301
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.
- app-ng-runtime/build-task/bundles/index.umd.js +5 -5
- app-ng-runtime/build-task/esm2022/basic/progress/progress-bar/progress-bar.build.mjs +1 -1
- app-ng-runtime/build-task/esm2022/page/page.build.mjs +3 -2
- app-ng-runtime/build-task/fesm2022/index.mjs +2 -1
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/carousel/bundles/index.umd.js +5 -5
- app-ng-runtime/components/advanced/carousel/esm2022/carousel.animator.mjs +3 -2
- app-ng-runtime/components/advanced/carousel/esm2022/carousel.directive.mjs +1 -1
- app-ng-runtime/components/advanced/carousel/fesm2022/index.mjs +2 -1
- app-ng-runtime/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/advanced/login/bundles/index.umd.js +6 -6
- app-ng-runtime/components/advanced/login/esm2022/login.component.mjs +4 -3
- app-ng-runtime/components/advanced/login/fesm2022/index.mjs +3 -2
- app-ng-runtime/components/advanced/login/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +203 -171
- app-ng-runtime/components/base/esm2022/directives/show-in-device.directive.mjs +1 -1
- app-ng-runtime/components/base/esm2022/pipes/custom-pipes.mjs +12 -11
- app-ng-runtime/components/base/esm2022/pipes/wm-pipe.mjs +3 -2
- app-ng-runtime/components/base/esm2022/utils/data-utils.mjs +30 -29
- app-ng-runtime/components/base/esm2022/utils/form-utils.mjs +47 -41
- app-ng-runtime/components/base/esm2022/utils/live-utils.mjs +8 -7
- app-ng-runtime/components/base/esm2022/utils/widget-utils.mjs +28 -27
- app-ng-runtime/components/base/esm2022/widgets/common/base/base-container.component.mjs +4 -3
- app-ng-runtime/components/base/esm2022/widgets/common/base/base-field-validations.mjs +24 -21
- app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +12 -11
- app-ng-runtime/components/base/esm2022/widgets/common/base/dataset-aware-nav.component.mjs +40 -14
- app-ng-runtime/components/base/esm2022/widgets/common/base/partial-container.directive.mjs +3 -2
- app-ng-runtime/components/base/esm2022/widgets/common/dialog/dialog.service.mjs +3 -2
- app-ng-runtime/components/base/esm2022/widgets/common/lazy-load/lazy-load.directive.mjs +1 -1
- app-ng-runtime/components/base/esm2022/widgets/common/partial/partial.directive.mjs +3 -2
- app-ng-runtime/components/base/esm2022/widgets/common/partial-param/partial-param.directive.mjs +3 -2
- app-ng-runtime/components/base/esm2022/widgets/common/smooth-scroll/smooth-scroll.directive.mjs +6 -5
- app-ng-runtime/components/base/esm2022/widgets/framework/deviceview.mjs +1 -1
- app-ng-runtime/components/base/esm2022/widgets/framework/property-change-handler.mjs +3 -2
- app-ng-runtime/components/base/esm2022/widgets/framework/widget-proxy-provider.mjs +4 -3
- app-ng-runtime/components/base/fesm2022/index.mjs +206 -173
- app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/pipes/custom-pipes.d.ts +1 -1
- app-ng-runtime/components/base/utils/data-utils.d.ts +0 -1
- app-ng-runtime/components/base/utils/widget-utils.d.ts +2 -2
- app-ng-runtime/components/base/widgets/common/base/base-field-validations.d.ts +1 -1
- app-ng-runtime/components/base/widgets/common/base/partial-container.directive.d.ts +1 -1
- app-ng-runtime/components/basic/default/bundles/index.umd.js +10 -10
- app-ng-runtime/components/basic/default/esm2022/label/label.directive.mjs +4 -3
- app-ng-runtime/components/basic/default/esm2022/spinner/spinner.component.mjs +6 -5
- app-ng-runtime/components/basic/default/fesm2022/index.mjs +7 -6
- app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/bundles/index.umd.js +13 -13
- app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +5 -4
- app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +6 -5
- app-ng-runtime/components/basic/progress/esm2022/utils.mjs +3 -3
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs +10 -9
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +15 -10
- app-ng-runtime/components/basic/rich-text-editor/esm2022/rich-text-editor.component.mjs +14 -8
- app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs +13 -7
- app-ng-runtime/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/rich-text-editor/rich-text-editor.component.d.ts +2 -2
- app-ng-runtime/components/basic/search/bundles/index.umd.js +67 -65
- app-ng-runtime/components/basic/search/esm2022/data-provider/data-provider.mjs +1 -1
- app-ng-runtime/components/basic/search/esm2022/data-provider/local-data-provider.mjs +26 -23
- app-ng-runtime/components/basic/search/esm2022/data-provider/remote-data-provider.mjs +12 -11
- app-ng-runtime/components/basic/search/esm2022/search.component.mjs +31 -30
- app-ng-runtime/components/basic/search/fesm2022/index.mjs +66 -63
- app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/tree/bundles/index.umd.js +9 -9
- app-ng-runtime/components/basic/tree/esm2022/tree.component.mjs +7 -6
- app-ng-runtime/components/basic/tree/fesm2022/index.mjs +6 -5
- app-ng-runtime/components/basic/tree/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/chart/bundles/index.umd.js +72 -63
- app-ng-runtime/components/chart/chart.component.d.ts +1 -1
- app-ng-runtime/components/chart/chart.utils.d.ts +3 -3
- app-ng-runtime/components/chart/esm2022/chart.component.mjs +58 -48
- app-ng-runtime/components/chart/esm2022/chart.utils.mjs +14 -13
- app-ng-runtime/components/chart/fesm2022/index.mjs +69 -59
- app-ng-runtime/components/chart/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/accordion/bundles/index.umd.js +16 -16
- app-ng-runtime/components/containers/accordion/esm2022/accordion.directive.mjs +14 -13
- app-ng-runtime/components/containers/accordion/fesm2022/index.mjs +13 -12
- app-ng-runtime/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/panel/bundles/index.umd.js +5 -5
- app-ng-runtime/components/containers/panel/esm2022/panel.component.mjs +3 -2
- app-ng-runtime/components/containers/panel/fesm2022/index.mjs +2 -1
- app-ng-runtime/components/containers/panel/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/panel/panel.component.d.ts +1 -1
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js +17 -17
- app-ng-runtime/components/containers/tabs/esm2022/tabs.component.mjs +15 -14
- app-ng-runtime/components/containers/tabs/fesm2022/index.mjs +14 -13
- app-ng-runtime/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/bundles/index.umd.js +75 -75
- app-ng-runtime/components/data/form/esm2022/form-action/form-action.directive.mjs +3 -2
- app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +10 -9
- app-ng-runtime/components/data/form/esm2022/form.component.mjs +54 -53
- app-ng-runtime/components/data/form/esm2022/live-filter/live-filter.directive.mjs +3 -2
- app-ng-runtime/components/data/form/esm2022/live-form/live-form.directive.mjs +11 -10
- app-ng-runtime/components/data/form/fesm2022/index.mjs +77 -76
- app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/form/form.component.d.ts +2 -2
- app-ng-runtime/components/data/form/live-form/live-form.directive.d.ts +1 -1
- app-ng-runtime/components/data/list/bundles/index.umd.js +692 -687
- app-ng-runtime/components/data/list/esm2022/list-item.directive.mjs +1 -1
- app-ng-runtime/components/data/list/esm2022/list.animator.mjs +5 -3
- app-ng-runtime/components/data/list/esm2022/list.component.mjs +687 -682
- app-ng-runtime/components/data/list/fesm2022/index.mjs +690 -684
- app-ng-runtime/components/data/list/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/list/list.component.d.ts +53 -53
- app-ng-runtime/components/data/live-table/bundles/index.umd.js +1 -1
- app-ng-runtime/components/data/live-table/esm2022/live-table.component.mjs +2 -2
- app-ng-runtime/components/data/live-table/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/data/live-table/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/pagination/bundles/index.umd.js +14 -14
- app-ng-runtime/components/data/pagination/esm2022/pagination.component.mjs +12 -11
- app-ng-runtime/components/data/pagination/fesm2022/index.mjs +11 -10
- app-ng-runtime/components/data/pagination/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/bundles/index.umd.js +175 -172
- app-ng-runtime/components/data/table/esm2022/table-action/table-action.directive.mjs +3 -2
- app-ng-runtime/components/data/table/esm2022/table-column/table-column.directive.mjs +19 -18
- app-ng-runtime/components/data/table/esm2022/table-cud.directive.mjs +7 -6
- app-ng-runtime/components/data/table/esm2022/table-filter.directive.mjs +53 -55
- app-ng-runtime/components/data/table/esm2022/table-row-action/table-row-action.directive.mjs +3 -2
- app-ng-runtime/components/data/table/esm2022/table.component.mjs +98 -91
- app-ng-runtime/components/data/table/fesm2022/index.mjs +172 -168
- app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/table-column/table-column.directive.d.ts +6 -6
- app-ng-runtime/components/data/table/table.component.d.ts +2 -2
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js +2 -2
- app-ng-runtime/components/dialogs/default/esm2022/base-dialog.mjs +3 -3
- app-ng-runtime/components/dialogs/default/esm2022/dialog-body/dialog-body.directive.mjs +1 -1
- app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/calendar/bundles/index.umd.js +33 -31
- app-ng-runtime/components/input/calendar/esm2022/calendar.component.mjs +31 -28
- app-ng-runtime/components/input/calendar/fesm2022/index.mjs +30 -27
- app-ng-runtime/components/input/calendar/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/chips/bundles/index.umd.js +29 -28
- app-ng-runtime/components/input/chips/chips.component.d.ts +1 -1
- app-ng-runtime/components/input/chips/esm2022/chips.component.mjs +27 -25
- app-ng-runtime/components/input/chips/fesm2022/index.mjs +26 -24
- app-ng-runtime/components/input/chips/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/base-form.component.d.ts +3 -3
- app-ng-runtime/components/input/default/bundles/index.umd.js +75 -62
- app-ng-runtime/components/input/default/checkbox/checkbox.component.d.ts +1 -0
- app-ng-runtime/components/input/default/dataset-aware-form.component.d.ts +4 -4
- app-ng-runtime/components/input/default/esm2022/base-form.component.mjs +14 -8
- app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +3 -2
- app-ng-runtime/components/input/default/esm2022/checkbox/checkbox.component.mjs +2 -2
- app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +6 -4
- app-ng-runtime/components/input/default/esm2022/dataset-aware-form.component.mjs +29 -23
- app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +4 -3
- app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +4 -3
- app-ng-runtime/components/input/default/esm2022/switch/switch.component.mjs +6 -5
- app-ng-runtime/components/input/default/esm2022/text/base/base-input.mjs +4 -3
- app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +20 -18
- app-ng-runtime/components/input/default/esm2022/text/text/input-text.component.mjs +2 -2
- app-ng-runtime/components/input/default/fesm2022/index.mjs +75 -62
- app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -1
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +53 -51
- app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +34 -31
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +5 -4
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time-picker.component.mjs +5 -4
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +7 -6
- app-ng-runtime/components/input/epoch/esm2022/picker/picker.component.mjs +1 -1
- app-ng-runtime/components/input/epoch/esm2022/time/time.component.mjs +6 -5
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +48 -45
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/file-upload/bundles/index.umd.js +15 -15
- app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +13 -12
- app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +12 -11
- app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/rating/bundles/index.umd.js +12 -12
- app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +10 -9
- app-ng-runtime/components/input/rating/fesm2022/index.mjs +9 -8
- app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/breadcrumb/bundles/index.umd.js +1 -1
- app-ng-runtime/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +2 -2
- app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +23 -22
- app-ng-runtime/components/navigation/menu/esm2022/menu-adapator.component.mjs +3 -2
- app-ng-runtime/components/navigation/menu/esm2022/menu-dropdown-item/menu-dropdown-item.component.mjs +6 -5
- app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +8 -7
- app-ng-runtime/components/navigation/menu/esm2022/nav/nav.component.mjs +10 -8
- app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +20 -18
- app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +12 -1
- app-ng-runtime/components/navigation/popover/esm2022/popover.component.mjs +1 -1
- app-ng-runtime/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/prefab/bundles/index.umd.js +6 -6
- app-ng-runtime/components/prefab/esm2022/prefab-container/prefab-container.directive.mjs +3 -2
- app-ng-runtime/components/prefab/esm2022/prefab.directive.mjs +3 -2
- app-ng-runtime/components/prefab/fesm2022/index.mjs +3 -2
- app-ng-runtime/components/prefab/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +119 -130
- app-ng-runtime/core/esm2022/public_api.mjs +2 -2
- app-ng-runtime/core/esm2022/services/field-type.service.mjs +3 -2
- app-ng-runtime/core/esm2022/services/field-widget.service.mjs +3 -2
- app-ng-runtime/core/esm2022/services/pagination.service.mjs +7 -6
- app-ng-runtime/core/esm2022/services/state-persistence.service.mjs +17 -16
- app-ng-runtime/core/esm2022/services/utils.service.mjs +3 -2
- app-ng-runtime/core/esm2022/services/viewport.service.mjs +3 -2
- app-ng-runtime/core/esm2022/utils/build-utils.mjs +5 -4
- app-ng-runtime/core/esm2022/utils/expression-parser.mjs +5 -4
- app-ng-runtime/core/esm2022/utils/lru-cache.mjs +3 -2
- app-ng-runtime/core/esm2022/utils/utils.mjs +79 -82
- app-ng-runtime/core/esm2022/utils/watcher.mjs +9 -7
- app-ng-runtime/core/fesm2022/index.mjs +117 -123
- app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/core/public_api.d.ts +1 -1
- app-ng-runtime/core/services/pagination.service.d.ts +1 -1
- app-ng-runtime/core/utils/utils.d.ts +5 -9
- app-ng-runtime/http/bundles/index.umd.js +7 -7
- app-ng-runtime/http/esm2022/http.service.mjs +5 -4
- app-ng-runtime/http/esm2022/wm-http-request.mjs +1 -1
- app-ng-runtime/http/esm2022/wm-http-response.mjs +1 -1
- app-ng-runtime/http/fesm2022/index.mjs +4 -3
- app-ng-runtime/http/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/basic/default/bundles/index.umd.js +24 -20
- app-ng-runtime/mobile/components/basic/default/esm2022/anchor/anchor.directive.mjs +5 -4
- app-ng-runtime/mobile/components/basic/default/esm2022/file-browser/file-browser.component.mjs +12 -8
- app-ng-runtime/mobile/components/basic/default/esm2022/file-browser/file-selector.service.mjs +5 -3
- app-ng-runtime/mobile/components/basic/default/esm2022/image-cache/image-cache.directive.mjs +3 -2
- app-ng-runtime/mobile/components/basic/default/esm2022/process-manager/process-manager.component.mjs +5 -4
- app-ng-runtime/mobile/components/basic/default/fesm2022/index.mjs +21 -16
- app-ng-runtime/mobile/components/basic/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/containers/segmented-control/bundles/index.umd.js +7 -7
- app-ng-runtime/mobile/components/containers/segmented-control/esm2022/segment-content/segment-content.component.mjs +2 -2
- app-ng-runtime/mobile/components/containers/segmented-control/esm2022/segmented-control.component.mjs +4 -3
- app-ng-runtime/mobile/components/containers/segmented-control/fesm2022/index.mjs +4 -3
- app-ng-runtime/mobile/components/containers/segmented-control/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/data/media-list/bundles/index.umd.js +8 -8
- app-ng-runtime/mobile/components/data/media-list/esm2022/media-list.component.mjs +4 -3
- app-ng-runtime/mobile/components/data/media-list/fesm2022/index.mjs +3 -2
- app-ng-runtime/mobile/components/data/media-list/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/default/bundles/index.umd.js +5 -5
- app-ng-runtime/mobile/components/page/default/esm2022/page.directive.mjs +3 -2
- app-ng-runtime/mobile/components/page/default/fesm2022/index.mjs +2 -1
- app-ng-runtime/mobile/components/page/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/components/page/tab-bar/bundles/index.umd.js +9 -9
- app-ng-runtime/mobile/components/page/tab-bar/esm2022/tabbar.component.mjs +7 -6
- app-ng-runtime/mobile/components/page/tab-bar/fesm2022/index.mjs +6 -5
- app-ng-runtime/mobile/components/page/tab-bar/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/core/bundles/index.umd.js +25 -25
- app-ng-runtime/mobile/core/esm2022/services/device-file-download.service.mjs +5 -4
- app-ng-runtime/mobile/core/esm2022/services/device-file-opener.service.mjs +3 -2
- app-ng-runtime/mobile/core/esm2022/services/device-file-upload.service.mjs +4 -3
- app-ng-runtime/mobile/core/esm2022/services/device-file.service.mjs +6 -5
- app-ng-runtime/mobile/core/esm2022/services/device.service.mjs +3 -2
- app-ng-runtime/mobile/core/esm2022/services/ext-app-message.service.mjs +5 -4
- app-ng-runtime/mobile/core/esm2022/services/network.service.mjs +9 -8
- app-ng-runtime/mobile/core/fesm2022/index.mjs +22 -21
- app-ng-runtime/mobile/core/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/core/services/ext-app-message.service.d.ts +1 -1
- app-ng-runtime/mobile/core/services/network.service.d.ts +7 -1
- app-ng-runtime/mobile/offline/bundles/index.umd.js +161 -144
- app-ng-runtime/mobile/offline/esm2022/models/local-db-store.mjs +23 -21
- app-ng-runtime/mobile/offline/esm2022/services/change-log.service.mjs +7 -6
- app-ng-runtime/mobile/offline/esm2022/services/local-db-data-pull.service.mjs +37 -35
- app-ng-runtime/mobile/offline/esm2022/services/local-db-management.service.mjs +54 -45
- app-ng-runtime/mobile/offline/esm2022/services/local-db.service.mjs +5 -4
- app-ng-runtime/mobile/offline/esm2022/services/workers/error-blocker.mjs +4 -3
- app-ng-runtime/mobile/offline/esm2022/services/workers/file-handler.mjs +18 -13
- app-ng-runtime/mobile/offline/esm2022/services/workers/multi-part-param-transformer.mjs +9 -5
- app-ng-runtime/mobile/offline/esm2022/utils/live-variable.utils.mjs +12 -11
- app-ng-runtime/mobile/offline/esm2022/utils/query-executor.utils.mjs +5 -4
- app-ng-runtime/mobile/offline/esm2022/utils/security.utils.mjs +3 -2
- app-ng-runtime/mobile/offline/fesm2022/index.mjs +156 -138
- app-ng-runtime/mobile/offline/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/runtime/bundles/index.umd.js +11 -8
- app-ng-runtime/mobile/runtime/esm2022/mobile-runtime.module.mjs +3 -2
- app-ng-runtime/mobile/runtime/esm2022/services/cookie.service.mjs +6 -2
- app-ng-runtime/mobile/runtime/esm2022/services/http-interceptor.service.mjs +4 -3
- app-ng-runtime/mobile/runtime/fesm2022/index.mjs +8 -4
- app-ng-runtime/mobile/runtime/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js +2 -2
- app-ng-runtime/mobile/runtime-dynamic/esm2022/services/live-sync.service.mjs +3 -3
- app-ng-runtime/mobile/runtime-dynamic/fesm2022/index.mjs +2 -2
- app-ng-runtime/mobile/runtime-dynamic/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/mobile/variables/bundles/index.umd.js +23 -16
- app-ng-runtime/mobile/variables/esm2022/services/camera-service.mjs +2 -2
- app-ng-runtime/mobile/variables/esm2022/services/datasync-service.mjs +10 -9
- app-ng-runtime/mobile/variables/esm2022/services/file-service.mjs +11 -3
- app-ng-runtime/mobile/variables/fesm2022/index.mjs +19 -11
- app-ng-runtime/mobile/variables/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/oAuth/bundles/index.umd.js +12 -12
- app-ng-runtime/oAuth/esm2022/oAuth.service.mjs +4 -3
- app-ng-runtime/oAuth/esm2022/oAuth.utils.mjs +8 -7
- app-ng-runtime/oAuth/fesm2022/index.mjs +9 -8
- app-ng-runtime/oAuth/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +121 -120
- app-ng-runtime/runtime/base/esm2022/components/base-layout.component.mjs +4 -3
- app-ng-runtime/runtime/base/esm2022/components/base-page.component.mjs +14 -13
- app-ng-runtime/runtime/base/esm2022/components/base-partial.component.mjs +13 -12
- app-ng-runtime/runtime/base/esm2022/components/base-prefab.component.mjs +15 -14
- app-ng-runtime/runtime/base/esm2022/components/base-spa-page.component.mjs +14 -13
- app-ng-runtime/runtime/base/esm2022/components/custom-toaster.component.mjs +6 -5
- app-ng-runtime/runtime/base/esm2022/directives/accessroles.directive.mjs +11 -10
- app-ng-runtime/runtime/base/esm2022/guards/page-not-found.guard.mjs +1 -1
- app-ng-runtime/runtime/base/esm2022/guards/role.guard.mjs +3 -2
- app-ng-runtime/runtime/base/esm2022/services/app-defaults.service.mjs +1 -1
- app-ng-runtime/runtime/base/esm2022/services/app.manager.service.mjs +17 -14
- app-ng-runtime/runtime/base/esm2022/services/app.service.mjs +7 -6
- app-ng-runtime/runtime/base/esm2022/services/dynamic-component-ref-provider.service.mjs +3 -2
- app-ng-runtime/runtime/base/esm2022/services/http-interceptor.services.mjs +4 -3
- app-ng-runtime/runtime/base/esm2022/services/i18n.service.mjs +12 -10
- app-ng-runtime/runtime/base/esm2022/services/navigation.service.mjs +8 -7
- app-ng-runtime/runtime/base/esm2022/services/prefab-manager.service.mjs +3 -2
- app-ng-runtime/runtime/base/esm2022/services/spinner.service.mjs +7 -6
- app-ng-runtime/runtime/base/esm2022/services/toaster.service.mjs +6 -5
- app-ng-runtime/runtime/base/esm2022/util/wm-route-reuse-strategy.mjs +6 -7
- app-ng-runtime/runtime/base/fesm2022/index.mjs +119 -117
- app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/runtime/base/services/i18n.service.d.ts +1 -1
- app-ng-runtime/runtime/dynamic/bundles/index.umd.js +7 -7
- app-ng-runtime/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +4 -3
- app-ng-runtime/runtime/dynamic/esm2022/main.mjs +3 -2
- app-ng-runtime/runtime/dynamic/fesm2022/index.mjs +4 -3
- app-ng-runtime/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/scripts/jquery-ui/ui/widgets/droppable.js +7 -7
- app-ng-runtime/scripts/jquery-ui/ui/widgets/resizable.js +13 -10
- app-ng-runtime/scripts/jquery-ui/ui/widgets/sortable.js +7 -7
- app-ng-runtime/security/bundles/index.umd.js +14 -14
- app-ng-runtime/security/esm2022/security.service.mjs +12 -11
- app-ng-runtime/security/fesm2022/index.mjs +11 -10
- app-ng-runtime/security/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/security/security.service.d.ts +1 -1
- app-ng-runtime/swipey/esm2022/swipe.animation.mjs +1 -1
- app-ng-runtime/swipey/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/transpiler/bundles/index.umd.js +10 -9
- app-ng-runtime/transpiler/esm2022/build.mjs +8 -6
- app-ng-runtime/transpiler/fesm2022/index.mjs +7 -5
- app-ng-runtime/transpiler/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/variables/bundles/index.umd.js +155 -145
- app-ng-runtime/variables/esm2022/manager/action/login-action.manager.mjs +15 -14
- app-ng-runtime/variables/esm2022/manager/action/notification-action.manager.mjs +9 -8
- app-ng-runtime/variables/esm2022/manager/variable/base-variable.manager.mjs +3 -2
- app-ng-runtime/variables/esm2022/manager/variable/web-socket-variable.manager.mjs +11 -10
- app-ng-runtime/variables/esm2022/service/variables.service.mjs +7 -6
- app-ng-runtime/variables/esm2022/util/action/navigation-action.utils.mjs +4 -4
- app-ng-runtime/variables/esm2022/util/variable/pagination.utils.mjs +30 -23
- app-ng-runtime/variables/esm2022/util/variable/service-variable.utils.mjs +29 -28
- app-ng-runtime/variables/esm2022/util/variable/variables.utils.mjs +75 -70
- app-ng-runtime/variables/fesm2022/index.mjs +169 -158
- app-ng-runtime/variables/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/variables/util/variable/service-variable.utils.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-bootstrap/tooltip'), require('ngx-bootstrap/dropdown'), require('@wm/components/base'), require('@wm/components/basic'), require('@wm/components/input'), require('@wm/components/navigation/menu'), require('@wm/components/data/list'), require('@wm/components/data/pagination'), require('@wm/core'), require('rxjs'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-bootstrap/tooltip', 'ngx-bootstrap/dropdown', '@wm/components/base', '@wm/components/basic', '@wm/components/input', '@wm/components/navigation/menu', '@wm/components/data/list', '@wm/components/data/pagination', '@wm/core', 'rxjs', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.data = global.wm.components.data || {}, global.wm.components.data.table = {}), global.ng.core, global.ng.common, global.ng.forms, global.tooltip, global.dropdown, global.wm.components.base, global.wm.components.basic, global.wm.components.input, global.wm.components.navigation.menu, global.wm.components.data.list, global.wm.components.data.pagination, global.wm.core, global.rxjs, global.rxjs.operators));
|
|
5
|
-
})(this, (function (exports, i0, i7, i1, tooltip, i6, i4, i5, i8, i9, i3, i10, i2, rxjs, operators) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-bootstrap/tooltip'), require('ngx-bootstrap/dropdown'), require('@wm/components/base'), require('@wm/components/basic'), require('@wm/components/input'), require('@wm/components/navigation/menu'), require('@wm/components/data/list'), require('@wm/components/data/pagination'), require('@wm/core'), require('rxjs'), require('rxjs/operators'), require('lodash-es')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-bootstrap/tooltip', 'ngx-bootstrap/dropdown', '@wm/components/base', '@wm/components/basic', '@wm/components/input', '@wm/components/navigation/menu', '@wm/components/data/list', '@wm/components/data/pagination', '@wm/core', 'rxjs', 'rxjs/operators', 'lodash-es'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.data = global.wm.components.data || {}, global.wm.components.data.table = {}), global.ng.core, global.ng.common, global.ng.forms, global.tooltip, global.dropdown, global.wm.components.base, global.wm.components.basic, global.wm.components.input, global.wm.components.navigation.menu, global.wm.components.data.list, global.wm.components.data.pagination, global.wm.core, global.rxjs, global.rxjs.operators, global._));
|
|
5
|
+
})(this, (function (exports, i0, i7, i1, tooltip, i6, i4, i5, i8, i9, i3, i10, i2, rxjs, operators, lodashEs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
set gridData(newValue) {
|
|
238
238
|
this.isDataLoading = false;
|
|
239
239
|
// Fix for [WMS-24012]: hide no datafound msg when variableInflight is true and dataset is empty
|
|
240
|
-
if (this.variableInflight &&
|
|
240
|
+
if (this.variableInflight && lodashEs.isEmpty(newValue)) {
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
this.variableInflight = false;
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
[this._gridData, this.currentPage] = this.paginationService.updateFieldsOnPagination(this, newValue);
|
|
254
254
|
// When edit action is performed on previous page, update the _gridData field with the modified row data
|
|
255
255
|
if (this.gridOptions.lastActionPerformed === this.gridOptions.ACTIONS.EDIT) {
|
|
256
|
-
const rowIndex =
|
|
256
|
+
const rowIndex = lodashEs.floor(this.actionRowIndex % this.pagesize);
|
|
257
257
|
this._gridData.splice(this.actionRowIndex, 1, newValue[rowIndex]);
|
|
258
258
|
}
|
|
259
259
|
this.setDataGridOption('isLastPage', !!(this.dataNavigator.isDisableNext));
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
this.setDataGridOption('colDefs', i2.getClonedObject(this.fieldDefs));
|
|
292
292
|
}
|
|
293
293
|
// If data and colDefs are present, call on before data render event
|
|
294
|
-
if (!this.isdynamictable && !
|
|
294
|
+
if (!this.isdynamictable && !lodashEs.isEmpty(newValue) && gridOptions.colDefs.length) {
|
|
295
295
|
this.invokeEventCallback('beforedatarender', { $data: this._gridData, $columns: this.columns, data: this._gridData, columns: this.columns });
|
|
296
296
|
}
|
|
297
297
|
this.setDataGridOption('data', i2.getClonedObject(this._gridData));
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
if (this.multiselect) {
|
|
305
305
|
return i2.getClonedObject(this.items);
|
|
306
306
|
}
|
|
307
|
-
if (
|
|
307
|
+
if (lodashEs.isEmpty(this.items)) {
|
|
308
308
|
return {};
|
|
309
309
|
}
|
|
310
310
|
return i2.getClonedObject(this.items[0]);
|
|
@@ -370,8 +370,8 @@
|
|
|
370
370
|
this.fullFieldDefs = [];
|
|
371
371
|
this.variableInflight = true;
|
|
372
372
|
this.applyProps = new Map();
|
|
373
|
-
this.redraw =
|
|
374
|
-
this.debouncedHandleLoading =
|
|
373
|
+
this.redraw = lodashEs.debounce(this._redraw, 150);
|
|
374
|
+
this.debouncedHandleLoading = lodashEs.debounce(this.handleLoading, 350);
|
|
375
375
|
// Filter and Sort Methods
|
|
376
376
|
this.rowFilter = {};
|
|
377
377
|
this._searchSortHandler = noop;
|
|
@@ -436,11 +436,11 @@
|
|
|
436
436
|
isLastPage: false,
|
|
437
437
|
// get the current page number
|
|
438
438
|
getCurrentPage: () => {
|
|
439
|
-
return
|
|
439
|
+
return lodashEs.get(this.dataNavigator, 'dn.currentPage') || 1;
|
|
440
440
|
},
|
|
441
441
|
// set the page number
|
|
442
442
|
setCurrentPage: (pageNum) => {
|
|
443
|
-
|
|
443
|
+
lodashEs.set(this.dataNavigator, 'dn.currentPage', pageNum || 1);
|
|
444
444
|
},
|
|
445
445
|
getDataSource: () => {
|
|
446
446
|
return this.datasource;
|
|
@@ -512,8 +512,8 @@
|
|
|
512
512
|
if (this.selectedItems.length && rowData.$index && this.getConfiguredState() !== 'none' && this.dataNavigator && i4.unsupportedStatePersistenceTypes.indexOf(this.navigation) < 0) {
|
|
513
513
|
const obj = { page: this.dataNavigator.dn.currentPage, index: rowData.$index - 1 };
|
|
514
514
|
const widgetState = this.statePersistence.getWidgetState(this);
|
|
515
|
-
if (
|
|
516
|
-
if (!
|
|
515
|
+
if (lodashEs.get(widgetState, 'selectedItem') && this.multiselect) {
|
|
516
|
+
if (!lodashEs.some(widgetState.selectedItem, obj)) {
|
|
517
517
|
widgetState.selectedItem.push(obj);
|
|
518
518
|
}
|
|
519
519
|
this.statePersistence.setWidgetState(this, { 'selectedItem': widgetState.selectedItem });
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
*/
|
|
538
538
|
if (this.multiselect) {
|
|
539
539
|
//Fix for [WMS-25110]: Add row to items list only if the row is selected
|
|
540
|
-
if (
|
|
540
|
+
if (lodashEs.findIndex(this.items, row) === -1 && (rowInfo?._selected === undefined || rowInfo?._selected == true || (this.gridfirstrowselect && rowInfo?.rowId == 0 && !this.showFirstRow))) {
|
|
541
541
|
this.items.push(row);
|
|
542
542
|
if (rowInfo?.rowId == 0) {
|
|
543
543
|
this.showFirstRow = true;
|
|
@@ -557,16 +557,16 @@
|
|
|
557
557
|
onRowDeselect: (row, e) => {
|
|
558
558
|
if (this.multiselect) {
|
|
559
559
|
this.ngZone.run(() => {
|
|
560
|
-
this.items =
|
|
560
|
+
this.items = lodashEs.pullAllWith(this.items, [row], lodashEs.isEqual);
|
|
561
561
|
this.selectedItems = this.callDataGridMethod('getSelectedRows');
|
|
562
562
|
this.invokeEventCallback('rowdeselect', { $data: row, $event: e, row });
|
|
563
563
|
const rowData = this.addRowIndex(row);
|
|
564
564
|
if (this.getConfiguredState() !== 'none' && i4.unsupportedStatePersistenceTypes.indexOf(this.navigation) < 0) {
|
|
565
565
|
const obj = { page: this.dataNavigator.dn.currentPage, index: rowData.$index - 1 };
|
|
566
566
|
const widgetState = this.statePersistence.getWidgetState(this);
|
|
567
|
-
if (
|
|
568
|
-
|
|
569
|
-
return
|
|
567
|
+
if (lodashEs.get(widgetState, 'selectedItem')) {
|
|
568
|
+
lodashEs.remove(widgetState.selectedItem, function (selectedItem) {
|
|
569
|
+
return lodashEs.isEqual(selectedItem, obj);
|
|
570
570
|
});
|
|
571
571
|
this.statePersistence.removeWidgetState(this, 'selectedItem');
|
|
572
572
|
if (widgetState.selectedItem.length > 0) {
|
|
@@ -609,11 +609,16 @@
|
|
|
609
609
|
},
|
|
610
610
|
onRowDelete: (row, cancelRowDeleteCallback, e, callBack, options) => {
|
|
611
611
|
this.ngZone.run(() => {
|
|
612
|
-
this.deleteRecord(
|
|
612
|
+
this.deleteRecord(lodashEs.extend({}, options, {
|
|
613
|
+
row,
|
|
614
|
+
'cancelRowDeleteCallback': cancelRowDeleteCallback,
|
|
615
|
+
'evt': e,
|
|
616
|
+
'callBack': callBack
|
|
617
|
+
}));
|
|
613
618
|
});
|
|
614
619
|
},
|
|
615
620
|
onRowInsert: (row, e, callBack, options) => {
|
|
616
|
-
this.insertRecord(
|
|
621
|
+
this.insertRecord(lodashEs.extend({}, options, { row, event: e, 'callBack': callBack }));
|
|
617
622
|
},
|
|
618
623
|
beforeRowUpdate: (row, eventName) => {
|
|
619
624
|
if (this._liveTableParent) {
|
|
@@ -622,7 +627,7 @@
|
|
|
622
627
|
this.prevData = i2.getClonedObject(row);
|
|
623
628
|
},
|
|
624
629
|
afterRowUpdate: (row, e, callBack, options) => {
|
|
625
|
-
this.updateRecord(
|
|
630
|
+
this.updateRecord(lodashEs.extend({}, options, { row, 'prevData': this.prevData, 'event': e, 'callBack': callBack }));
|
|
626
631
|
},
|
|
627
632
|
onBeforeRowUpdate: (row, e, options) => {
|
|
628
633
|
return this.invokeEventCallback('beforerowupdate', { $event: e, $data: row, row, options: options });
|
|
@@ -703,7 +708,7 @@
|
|
|
703
708
|
const customExprView = this.customExprViewRef.createEmbeddedView(tmpl, context);
|
|
704
709
|
const rootNode = customExprView.rootNodes[0];
|
|
705
710
|
const fieldName = rootNode.getAttribute('data-col-identifier');
|
|
706
|
-
|
|
711
|
+
lodashEs.extend(colDef, this.columns[fieldName]);
|
|
707
712
|
if (!summaryRow) {
|
|
708
713
|
this.customExprCompiledTl[fieldName + index] = rootNode;
|
|
709
714
|
}
|
|
@@ -931,7 +936,7 @@
|
|
|
931
936
|
if (this.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
932
937
|
this.actionRowIndex = parseInt(val);
|
|
933
938
|
this.setDataGridOption('actionRowIndex', this.actionRowIndex);
|
|
934
|
-
if (!
|
|
939
|
+
if (!lodashEs.isNaN(this.actionRowIndex)) {
|
|
935
940
|
this.actionRowPage = Math.floor(this.actionRowIndex / this.pagesize) + 1;
|
|
936
941
|
this.setDataGridOption('actionRowPage', this.actionRowPage || this.gridOptions.actionRowPage);
|
|
937
942
|
}
|
|
@@ -973,7 +978,7 @@
|
|
|
973
978
|
clearForm: this.clearForm.bind(this),
|
|
974
979
|
callLoadInlineWidgetData: () => {
|
|
975
980
|
this.fullFieldDefs.forEach(col => {
|
|
976
|
-
if (
|
|
981
|
+
if (lodashEs.isUndefined(col.isDataSetBound)) {
|
|
977
982
|
i2.triggerFn(col.loadInlineWidgetData && col.loadInlineWidgetData.bind(col));
|
|
978
983
|
}
|
|
979
984
|
});
|
|
@@ -1010,12 +1015,12 @@
|
|
|
1010
1015
|
const listenersToRemove = [
|
|
1011
1016
|
// Updates pagination, filter, sort etc options for service and crud variables
|
|
1012
1017
|
this.app.subscribe('check-state-persistence-options', options => {
|
|
1013
|
-
let dataSourceName =
|
|
1018
|
+
let dataSourceName = lodashEs.get(this.datasource, 'name');
|
|
1014
1019
|
// in Prefabs, this.datasource is not resolved at the time of variable invocation, so additional check is required.
|
|
1015
1020
|
if (!dataSourceName) {
|
|
1016
1021
|
dataSourceName = i4.extractDataSourceName(this.binddatasource);
|
|
1017
1022
|
}
|
|
1018
|
-
if (
|
|
1023
|
+
if (lodashEs.get(options, 'variable.name') !== dataSourceName) {
|
|
1019
1024
|
return;
|
|
1020
1025
|
}
|
|
1021
1026
|
if (this._pageLoad && this.getConfiguredState() !== 'none') {
|
|
@@ -1062,7 +1067,7 @@
|
|
|
1062
1067
|
ngAfterContentInit() {
|
|
1063
1068
|
super.ngAfterContentInit();
|
|
1064
1069
|
this.headerConfig = this.headerConfig.filter(this.filterEmptyValues.bind(this));
|
|
1065
|
-
|
|
1070
|
+
lodashEs.remove(this.fieldDefs, f => f === undefined);
|
|
1066
1071
|
const runModeInitialProperties = {
|
|
1067
1072
|
showrowindex: 'showRowIndex',
|
|
1068
1073
|
multiselect: 'multiselect',
|
|
@@ -1110,7 +1115,7 @@
|
|
|
1110
1115
|
this.gridOptions.loadingdatamsg = this.loadingdatamsg;
|
|
1111
1116
|
// When loadondemand property is enabled(deferload="true") and show is true, only the column titles of the datatable are rendered, the data(body of the datatable) is not at all rendered.
|
|
1112
1117
|
// Because the griddata is setting before the datatable dom is rendered but we are sending empty data to the datatable.
|
|
1113
|
-
if (!
|
|
1118
|
+
if (!lodashEs.isEmpty(this.gridData)) {
|
|
1114
1119
|
this.gridOptions.data = i2.getClonedObject(this.gridData);
|
|
1115
1120
|
}
|
|
1116
1121
|
this.gridOptions.messages = {
|
|
@@ -1119,7 +1124,7 @@
|
|
|
1119
1124
|
this.datagridElement = $(this._tableElement.nativeElement);
|
|
1120
1125
|
this.gridElement = this.$element;
|
|
1121
1126
|
this.$element.css({ 'position': 'relative' });
|
|
1122
|
-
|
|
1127
|
+
lodashEs.forEach(runModeInitialProperties, (value, key) => {
|
|
1123
1128
|
if (i2.isDefined(this[key])) {
|
|
1124
1129
|
this.gridOptions[value] = (this[key] === 'true' || this[key] === true);
|
|
1125
1130
|
}
|
|
@@ -1147,17 +1152,17 @@
|
|
|
1147
1152
|
return mode && mode.toLowerCase();
|
|
1148
1153
|
}
|
|
1149
1154
|
handleStateParams(widgetState, options) {
|
|
1150
|
-
if (
|
|
1155
|
+
if (lodashEs.get(widgetState, 'selectedItem')) {
|
|
1151
1156
|
this._selectedItemsExist = true;
|
|
1152
1157
|
}
|
|
1153
1158
|
options.options = options.options || {};
|
|
1154
|
-
if (
|
|
1159
|
+
if (lodashEs.get(widgetState, 'pagination')) {
|
|
1155
1160
|
options.options.page = widgetState.pagination;
|
|
1156
|
-
if (
|
|
1161
|
+
if (lodashEs.get(widgetState, 'sort')) {
|
|
1157
1162
|
this.sortStateHandler(widgetState);
|
|
1158
|
-
options.options.orderBy =
|
|
1163
|
+
options.options.orderBy = lodashEs.get(widgetState, 'sort.field') + ' ' + lodashEs.get(widgetState, 'sort.direction');
|
|
1159
1164
|
}
|
|
1160
|
-
if (
|
|
1165
|
+
if (lodashEs.get(widgetState, 'search')) {
|
|
1161
1166
|
setTimeout(() => {
|
|
1162
1167
|
this.searchStateHandler(widgetState);
|
|
1163
1168
|
}, 500);
|
|
@@ -1166,15 +1171,15 @@
|
|
|
1166
1171
|
}
|
|
1167
1172
|
else {
|
|
1168
1173
|
options.options.page = 1;
|
|
1169
|
-
if (
|
|
1174
|
+
if (lodashEs.get(widgetState, 'search')) {
|
|
1170
1175
|
setTimeout(() => {
|
|
1171
1176
|
this.searchStateHandler(widgetState);
|
|
1172
1177
|
}, 500);
|
|
1173
1178
|
options.options.filterFields = this.getFilterFields(widgetState.search);
|
|
1174
1179
|
}
|
|
1175
|
-
if (
|
|
1180
|
+
if (lodashEs.get(widgetState, 'sort')) {
|
|
1176
1181
|
this.sortStateHandler(widgetState);
|
|
1177
|
-
options.options.orderBy =
|
|
1182
|
+
options.options.orderBy = lodashEs.get(widgetState, 'sort.field') + ' ' + lodashEs.get(widgetState, 'sort.direction');
|
|
1178
1183
|
}
|
|
1179
1184
|
}
|
|
1180
1185
|
return options;
|
|
@@ -1188,17 +1193,17 @@
|
|
|
1188
1193
|
}
|
|
1189
1194
|
sortStateHandler(widgetState) {
|
|
1190
1195
|
const $gridElement = this.datagridElement;
|
|
1191
|
-
const $sortIcon = $gridElement.find('th[data-col-field="' +
|
|
1192
|
-
if (
|
|
1196
|
+
const $sortIcon = $gridElement.find('th[data-col-field="' + lodashEs.get(widgetState, 'sort.field') + '"] .sort-icon');
|
|
1197
|
+
if (lodashEs.get(widgetState, 'sort.direction') === 'asc' && $sortIcon.length) {
|
|
1193
1198
|
$sortIcon.addClass('asc wi wi-long-arrow-up');
|
|
1194
1199
|
}
|
|
1195
|
-
else if (
|
|
1200
|
+
else if (lodashEs.get(widgetState, 'sort.direction') === 'desc' && $sortIcon.length) {
|
|
1196
1201
|
$sortIcon.addClass('desc wi wi-long-arrow-down');
|
|
1197
1202
|
}
|
|
1198
1203
|
}
|
|
1199
1204
|
searchStateHandler(widgetState) {
|
|
1200
|
-
if (
|
|
1201
|
-
|
|
1205
|
+
if (lodashEs.isArray(widgetState.search)) {
|
|
1206
|
+
lodashEs.forEach(widgetState.search, (filterObj) => {
|
|
1202
1207
|
if (this.rowFilter[filterObj.field]) {
|
|
1203
1208
|
this.rowFilter[filterObj.field].value = filterObj.value;
|
|
1204
1209
|
this.rowFilter[filterObj.field].matchMode = filterObj.matchMode;
|
|
@@ -1225,11 +1230,11 @@
|
|
|
1225
1230
|
}
|
|
1226
1231
|
// Compares the prevFilterCriteria Rules with the new rules
|
|
1227
1232
|
compareFilterExpressions(prevFilters, newFilters) {
|
|
1228
|
-
return !!((prevFilters.length === newFilters.length) && (
|
|
1233
|
+
return !!((prevFilters.length === newFilters.length) && (lodashEs.isEqual(prevFilters, newFilters)));
|
|
1229
1234
|
}
|
|
1230
1235
|
// Set the table lastActionPerformed to Filter Criteria and maintain the prevFilterExpression
|
|
1231
1236
|
setLastActionToFilterCriteria() {
|
|
1232
|
-
this.prevFilterExpression =
|
|
1237
|
+
this.prevFilterExpression = lodashEs.get(this.datasource, 'filterExpressions.rules') ? i2.getClonedObject(this.datasource.filterExpressions.rules) : i2.getClonedObject([].concat(this.datasource.dataBinding));
|
|
1233
1238
|
this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.FILTER_CRITERIA);
|
|
1234
1239
|
this.gridOptions.setIsSearchTrigerred(true);
|
|
1235
1240
|
}
|
|
@@ -1243,8 +1248,8 @@
|
|
|
1243
1248
|
}
|
|
1244
1249
|
// Update the lastActionPerformed to Filter_Criteria, when there is change in the Variable filter criteria rules
|
|
1245
1250
|
checkIfVarFiltersApplied() {
|
|
1246
|
-
if (!
|
|
1247
|
-
const currentFilterExpr =
|
|
1251
|
+
if (!lodashEs.isEmpty(lodashEs.get(this.datasource, 'filterExpressions.rules')) || !lodashEs.isEmpty(lodashEs.get(this.datasource, 'dataBinding'))) {
|
|
1252
|
+
const currentFilterExpr = lodashEs.get(this.datasource, 'filterExpressions.rules') ? this.datasource.filterExpressions.rules : [].concat(this.datasource.dataBinding);
|
|
1248
1253
|
const isEqual = this.compareFilterExpressions(this.prevFilterExpression, currentFilterExpr);
|
|
1249
1254
|
if (!isEqual) {
|
|
1250
1255
|
this.setLastActionToFilterCriteria();
|
|
@@ -1258,29 +1263,29 @@
|
|
|
1258
1263
|
this.checkIfVarFiltersApplied();
|
|
1259
1264
|
}
|
|
1260
1265
|
// State handling for static variables
|
|
1261
|
-
if (
|
|
1266
|
+
if (lodashEs.get(this.datasource, 'category') === 'wm.Variable' && this._pageLoad && this.getConfiguredState() !== 'none') {
|
|
1262
1267
|
const widgetState = this.statePersistence.getWidgetState(this);
|
|
1263
1268
|
this._pageLoad = false;
|
|
1264
|
-
if (
|
|
1269
|
+
if (lodashEs.get(widgetState, 'selectedItem')) {
|
|
1265
1270
|
this._selectedItemsExist = true;
|
|
1266
1271
|
}
|
|
1267
1272
|
else {
|
|
1268
1273
|
this.setDataGridOption('selectFirstRow', this.gridfirstrowselect);
|
|
1269
1274
|
}
|
|
1270
|
-
if (
|
|
1275
|
+
if (lodashEs.get(widgetState, 'search')) {
|
|
1271
1276
|
this.searchStateHandler(widgetState);
|
|
1272
1277
|
this.searchSortHandler(widgetState.search, undefined, 'search', true);
|
|
1273
1278
|
}
|
|
1274
|
-
if (
|
|
1279
|
+
if (lodashEs.get(widgetState, 'sort')) {
|
|
1275
1280
|
this.searchSortHandler(widgetState.sort, undefined, 'sort', true);
|
|
1276
1281
|
this.sortStateHandler(widgetState);
|
|
1277
1282
|
}
|
|
1278
|
-
if (
|
|
1283
|
+
if (lodashEs.get(widgetState, 'pagination')) {
|
|
1279
1284
|
this.dataNavigator.pageChanged({ page: widgetState.pagination }, true);
|
|
1280
1285
|
}
|
|
1281
1286
|
}
|
|
1282
1287
|
// After the setting the watch on navigator, dataset is triggered with undefined. In this case, return here.
|
|
1283
|
-
if (this.dataNavigatorWatched &&
|
|
1288
|
+
if (this.dataNavigatorWatched && lodashEs.isUndefined(newVal) && this.__fullData) {
|
|
1284
1289
|
return;
|
|
1285
1290
|
}
|
|
1286
1291
|
// If variable is in loading state, show loading icon
|
|
@@ -1314,7 +1319,7 @@
|
|
|
1314
1319
|
else {
|
|
1315
1320
|
this.resetPageNavigation();
|
|
1316
1321
|
// If the dataset is undefined or empty or table is bound to static variable then set variableInflight to false inorder to update the status
|
|
1317
|
-
if (newVal === '' || newVal === undefined ||
|
|
1322
|
+
if (newVal === '' || newVal === undefined || lodashEs.get(this.datasource, 'category') === 'wm.Variable') {
|
|
1318
1323
|
this.variableInflight = false;
|
|
1319
1324
|
}
|
|
1320
1325
|
/*for run mode, disabling the loader and showing no data found message if dataset is not valid*/
|
|
@@ -1326,7 +1331,8 @@
|
|
|
1326
1331
|
if (!this.isNavigationEnabled() && newVal) {
|
|
1327
1332
|
this.checkFiltersApplied(this.getSortExpr());
|
|
1328
1333
|
}
|
|
1329
|
-
|
|
1334
|
+
// @ts-ignore
|
|
1335
|
+
if (!lodashEs.isObject(newVal) || newVal === '' || (newVal && newVal.dataValue === '')) {
|
|
1330
1336
|
if (!this.variableInflight) {
|
|
1331
1337
|
// If variable has finished loading and resultSet is empty, ender empty data
|
|
1332
1338
|
this.setGridData([]);
|
|
@@ -1349,7 +1355,7 @@
|
|
|
1349
1355
|
}
|
|
1350
1356
|
addRowIndex(row) {
|
|
1351
1357
|
const rowData = i2.getClonedObject(row);
|
|
1352
|
-
const rowIndex =
|
|
1358
|
+
const rowIndex = lodashEs.indexOf(this.gridOptions.data, row);
|
|
1353
1359
|
if (rowIndex < 0) {
|
|
1354
1360
|
return row;
|
|
1355
1361
|
}
|
|
@@ -1375,7 +1381,7 @@
|
|
|
1375
1381
|
getClonedRowObject(rowData) {
|
|
1376
1382
|
const row = i2.getClonedObject(rowData);
|
|
1377
1383
|
row.getProperty = field => {
|
|
1378
|
-
return
|
|
1384
|
+
return lodashEs.get(row, field);
|
|
1379
1385
|
};
|
|
1380
1386
|
row.$isFirst = row.$index === 1;
|
|
1381
1387
|
row.$isLast = this.gridData.length === row.$index;
|
|
@@ -1391,7 +1397,7 @@
|
|
|
1391
1397
|
}
|
|
1392
1398
|
else {
|
|
1393
1399
|
// If grid is in edit mode or grid has data, dont show the no data message
|
|
1394
|
-
if (!this.isGridEditMode &&
|
|
1400
|
+
if (!this.isGridEditMode && lodashEs.isEmpty(this.dataset)) {
|
|
1395
1401
|
this.callDataGridMethod('setStatus', 'nodata', this.nodatamessage);
|
|
1396
1402
|
}
|
|
1397
1403
|
else {
|
|
@@ -1410,7 +1416,7 @@
|
|
|
1410
1416
|
}
|
|
1411
1417
|
clearForm(newRow) {
|
|
1412
1418
|
const ctrls = this.ngform.controls;
|
|
1413
|
-
|
|
1419
|
+
lodashEs.keys(this.ngform.controls).forEach(key => {
|
|
1414
1420
|
// If new row, clear the controls in the new row. Else, clear the controls in edit row
|
|
1415
1421
|
if (!key.endsWith('_filter') && ((key.endsWith('_new') && newRow) || (!key.endsWith('_new') && !newRow))) {
|
|
1416
1422
|
ctrls[key].setValue('');
|
|
@@ -1462,7 +1468,7 @@
|
|
|
1462
1468
|
const data = this.filternullrecords ? this.removeEmptyRecords(serverData) : serverData;
|
|
1463
1469
|
// fix for [WMS-24012] set variableinflight flag to false for static variables
|
|
1464
1470
|
// If the table is bound to some widget and not bound to any variable (ex: Table1.selectedItem) then set variableInflight to false
|
|
1465
|
-
if (
|
|
1471
|
+
if (lodashEs.get(this.datasource, 'category') === 'wm.Variable' || lodashEs.get(this.datasource, 'category') === undefined) {
|
|
1466
1472
|
this.variableInflight = false;
|
|
1467
1473
|
}
|
|
1468
1474
|
if (!this.variableInflight) {
|
|
@@ -1480,7 +1486,7 @@
|
|
|
1480
1486
|
return;
|
|
1481
1487
|
}
|
|
1482
1488
|
const option = {};
|
|
1483
|
-
if (i2.isDefined && (!
|
|
1489
|
+
if (i2.isDefined && (!lodashEs.isEqual(newVal, this.gridOptions[optionName]) || forceSet)) {
|
|
1484
1490
|
option[optionName] = newVal;
|
|
1485
1491
|
this.datagridElement.datatable('option', option);
|
|
1486
1492
|
this.gridOptions[optionName] = newVal;
|
|
@@ -1504,13 +1510,13 @@
|
|
|
1504
1510
|
if (!this.fieldDefs.length) {
|
|
1505
1511
|
return;
|
|
1506
1512
|
}
|
|
1507
|
-
rowActionCol =
|
|
1508
|
-
|
|
1509
|
-
|
|
1513
|
+
rowActionCol = lodashEs.find(this.fullFieldDefs, { 'field': ROW_OPS_FIELD, type: 'custom' }); // Check if column is fetched from markup
|
|
1514
|
+
lodashEs.remove(this.fieldDefs, { type: 'custom', field: ROW_OPS_FIELD }); // Removing operations column
|
|
1515
|
+
lodashEs.remove(this.headerConfig, { field: rowOperationsColumn.field });
|
|
1510
1516
|
/*Add the column for row operations only if at-least one operation has been enabled.*/
|
|
1511
1517
|
if (this.rowActions.length) {
|
|
1512
1518
|
if (rowActionCol) { // If column is present in markup, push the column or push the default column
|
|
1513
|
-
insertPosition = rowActionCol.rowactionsposition ?
|
|
1519
|
+
insertPosition = rowActionCol.rowactionsposition ? lodashEs.toNumber(rowActionCol.rowactionsposition) : this.fieldDefs.length;
|
|
1514
1520
|
this.fieldDefs.splice(insertPosition, 0, rowActionCol);
|
|
1515
1521
|
if (insertPosition === 0) {
|
|
1516
1522
|
this.headerConfig.unshift(config);
|
|
@@ -1539,15 +1545,15 @@
|
|
|
1539
1545
|
if (i2.isDefined(newVal)) {
|
|
1540
1546
|
// Watch will not be triggered if dataset and new value are equal. So trigger the property change handler manually
|
|
1541
1547
|
// This happens in case, if dataset is directly updated.
|
|
1542
|
-
if (
|
|
1548
|
+
if (lodashEs.isEqual(this.dataset, newVal)) {
|
|
1543
1549
|
this.watchVariableDataSet(newVal);
|
|
1544
1550
|
}
|
|
1545
1551
|
else {
|
|
1546
|
-
if (
|
|
1552
|
+
if (lodashEs.isArray(newVal)) {
|
|
1547
1553
|
this.widget.dataset = [].concat(newVal);
|
|
1548
1554
|
}
|
|
1549
|
-
else if (
|
|
1550
|
-
this.widget.dataset =
|
|
1555
|
+
else if (lodashEs.isObject(newVal)) {
|
|
1556
|
+
this.widget.dataset = lodashEs.extend({}, newVal);
|
|
1551
1557
|
}
|
|
1552
1558
|
else {
|
|
1553
1559
|
this.widget.dataset = newVal;
|
|
@@ -1627,7 +1633,7 @@
|
|
|
1627
1633
|
if (this.getConfiguredState() !== 'none' && this._selectedItemsExist && serviceData.length) {
|
|
1628
1634
|
const widgetState = this.statePersistence.getWidgetState(this);
|
|
1629
1635
|
let currentPageItems;
|
|
1630
|
-
if (
|
|
1636
|
+
if (lodashEs.get(widgetState, 'selectedItem')) {
|
|
1631
1637
|
currentPageItems = widgetState.selectedItem.filter(val => {
|
|
1632
1638
|
return val.page === this.dataNavigator.dn.currentPage;
|
|
1633
1639
|
});
|
|
@@ -1635,7 +1641,7 @@
|
|
|
1635
1641
|
// if an item is already selected, don't trigger onSelect event for it again
|
|
1636
1642
|
if (currentPageItems.length && this.selecteditem.length !== widgetState.selectedItem.length) {
|
|
1637
1643
|
// don't reassign this.selecteditem if selected items already exist.
|
|
1638
|
-
if (
|
|
1644
|
+
if (lodashEs.isArray(this.selecteditem)) {
|
|
1639
1645
|
currentPageItems.forEach((item) => {
|
|
1640
1646
|
this.selectItem(item.index, undefined);
|
|
1641
1647
|
});
|
|
@@ -1652,15 +1658,15 @@
|
|
|
1652
1658
|
this.fieldDefs = []; // empty the form fields
|
|
1653
1659
|
// empty the filter field template refs.
|
|
1654
1660
|
this.filterTmpl._results = [];
|
|
1655
|
-
if (
|
|
1661
|
+
if (lodashEs.isEmpty(columns)) {
|
|
1656
1662
|
return;
|
|
1657
1663
|
}
|
|
1658
1664
|
let tmpl = '';
|
|
1659
1665
|
columns.forEach(col => {
|
|
1660
1666
|
let attrsTmpl = '';
|
|
1661
1667
|
let customTmpl = '';
|
|
1662
|
-
|
|
1663
|
-
if (!
|
|
1668
|
+
lodashEs.forEach(col, (val, key) => {
|
|
1669
|
+
if (!lodashEs.isUndefined(val) && val !== '') {
|
|
1664
1670
|
// If custom expression is present, keep it inside table column. Else, keep as attribute
|
|
1665
1671
|
if (key === 'customExpression') {
|
|
1666
1672
|
customTmpl = val;
|
|
@@ -1699,7 +1705,7 @@
|
|
|
1699
1705
|
/*call utility function to prepare fieldDefs for grid against given data (A MAX OF 10 COLUMNS ONLY)*/
|
|
1700
1706
|
defaultFieldDefs = i4.prepareFieldDefs(properties);
|
|
1701
1707
|
/*append additional properties*/
|
|
1702
|
-
|
|
1708
|
+
lodashEs.forEach(defaultFieldDefs, columnDef => {
|
|
1703
1709
|
columnDef.binding = columnDef.field;
|
|
1704
1710
|
columnDef.caption = columnDef.displayName;
|
|
1705
1711
|
columnDef.pcDisplay = true;
|
|
@@ -1721,7 +1727,7 @@
|
|
|
1721
1727
|
this.invokeEventCallback('beforedatarender', { $data: data, $columns: this.columns, data: data, columns: this.columns });
|
|
1722
1728
|
defaultFieldDefs = [];
|
|
1723
1729
|
// Apply the changes made by the user
|
|
1724
|
-
|
|
1730
|
+
lodashEs.forEach(this.columns, val => {
|
|
1725
1731
|
defaultFieldDefs.push(val);
|
|
1726
1732
|
});
|
|
1727
1733
|
this.generateDynamicColumns(defaultFieldDefs);
|
|
@@ -1731,11 +1737,11 @@
|
|
|
1731
1737
|
/* check whether data is valid or not */
|
|
1732
1738
|
const dataValid = data && !data.error;
|
|
1733
1739
|
/*if the data is type json object, make it an array of the object*/
|
|
1734
|
-
if (dataValid && !
|
|
1740
|
+
if (dataValid && !lodashEs.isArray(data)) {
|
|
1735
1741
|
data = [data];
|
|
1736
1742
|
}
|
|
1737
1743
|
/* if the data is empty, show nodatamessage */
|
|
1738
|
-
if (
|
|
1744
|
+
if (lodashEs.isEmpty(data)) {
|
|
1739
1745
|
this.setGridData(data);
|
|
1740
1746
|
return;
|
|
1741
1747
|
}
|
|
@@ -1752,7 +1758,7 @@
|
|
|
1752
1758
|
let pagingOptions;
|
|
1753
1759
|
if (this.datasource && this.datasource.execute(i2.DataSource.Operation.IS_PAGEABLE)) {
|
|
1754
1760
|
pagingOptions = this.datasource.execute(i2.DataSource.Operation.GET_PAGING_OPTIONS);
|
|
1755
|
-
sortExp =
|
|
1761
|
+
sortExp = lodashEs.isEmpty(pagingOptions) ? '' : i4.getOrderByExpr(pagingOptions.sort);
|
|
1756
1762
|
}
|
|
1757
1763
|
return sortExp || '';
|
|
1758
1764
|
}
|
|
@@ -1778,7 +1784,7 @@
|
|
|
1778
1784
|
}
|
|
1779
1785
|
// if table is inside list then table dataset will be set as "item.XXX" and there is no datasource.
|
|
1780
1786
|
// So extracting datasource from the datset bound expression.
|
|
1781
|
-
if (this.parentList && !this.datasource &&
|
|
1787
|
+
if (this.parentList && !this.datasource && lodashEs.startsWith(this.binddataset, 'item')) {
|
|
1782
1788
|
this.datasource = i2.getDatasourceFromExpr(this.widget.$attrs.get('datasetboundexpr'), this);
|
|
1783
1789
|
}
|
|
1784
1790
|
if (this.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
@@ -1795,7 +1801,7 @@
|
|
|
1795
1801
|
}
|
|
1796
1802
|
// for Static Variables with Retain State enabled, prevent Table from rendering more than once
|
|
1797
1803
|
// Fix for [WMS-25284]: Render table that is inside list widget and bound to static Variable
|
|
1798
|
-
if (!(
|
|
1804
|
+
if (!(lodashEs.get(this.datasource, 'category') === 'wm.Variable' && this._pageLoad && this.getConfiguredState() !== 'none') || (this.parentList && lodashEs.startsWith(this.binddataset, 'item'))) {
|
|
1799
1805
|
this.watchVariableDataSet(nv);
|
|
1800
1806
|
}
|
|
1801
1807
|
break;
|
|
@@ -1846,7 +1852,7 @@
|
|
|
1846
1852
|
this.exportOptions = [];
|
|
1847
1853
|
if (nv) {
|
|
1848
1854
|
// Populate options for export drop down menu
|
|
1849
|
-
|
|
1855
|
+
lodashEs.forEach(lodashEs.split(nv, ','), type => {
|
|
1850
1856
|
this.exportOptions.push({
|
|
1851
1857
|
label: type,
|
|
1852
1858
|
icon: exportIconMapping[type]
|
|
@@ -1856,7 +1862,7 @@
|
|
|
1856
1862
|
break;
|
|
1857
1863
|
case 'shownewrow':
|
|
1858
1864
|
// Enable new row if shownew is true or addNewRow buton is present
|
|
1859
|
-
enableNewRow = nv ||
|
|
1865
|
+
enableNewRow = nv || lodashEs.some(this.actions, act => lodashEs.includes(act.action, 'addNewRow()'));
|
|
1860
1866
|
this.callDataGridMethod('option', 'actionsEnabled.new', enableNewRow);
|
|
1861
1867
|
break;
|
|
1862
1868
|
case 'pagesize':
|
|
@@ -1911,11 +1917,11 @@
|
|
|
1911
1917
|
populateActions() {
|
|
1912
1918
|
this._actions.header = [];
|
|
1913
1919
|
this._actions.footer = [];
|
|
1914
|
-
|
|
1915
|
-
if (
|
|
1920
|
+
lodashEs.forEach(this.actions, (action) => {
|
|
1921
|
+
if (lodashEs.includes(action.position, 'header')) {
|
|
1916
1922
|
this._actions.header.push(action);
|
|
1917
1923
|
}
|
|
1918
|
-
if (
|
|
1924
|
+
if (lodashEs.includes(action.position, 'footer')) {
|
|
1919
1925
|
this._actions.footer.push(action);
|
|
1920
1926
|
}
|
|
1921
1927
|
});
|
|
@@ -1984,9 +1990,9 @@
|
|
|
1984
1990
|
if (data) {
|
|
1985
1991
|
this.serverData = data;
|
|
1986
1992
|
}
|
|
1987
|
-
if (
|
|
1988
|
-
item =
|
|
1989
|
-
return
|
|
1993
|
+
if (lodashEs.isObject(item)) {
|
|
1994
|
+
item = lodashEs.omitBy(item, (value) => {
|
|
1995
|
+
return lodashEs.isArray(value) && lodashEs.isEmpty(value);
|
|
1990
1996
|
});
|
|
1991
1997
|
}
|
|
1992
1998
|
this.callDataGridMethod('selectRow', item, true);
|
|
@@ -2001,7 +2007,7 @@
|
|
|
2001
2007
|
this.checkFiltersApplied(this.getSortExpr());
|
|
2002
2008
|
if (this._isClientSearch) {
|
|
2003
2009
|
data = i2.getClonedObject(this.__fullData);
|
|
2004
|
-
if (
|
|
2010
|
+
if (lodashEs.isObject(data) && !lodashEs.isArray(data)) {
|
|
2005
2011
|
data = [data];
|
|
2006
2012
|
}
|
|
2007
2013
|
data = this.getSearchResult(data, this.filterInfo);
|
|
@@ -2017,7 +2023,7 @@
|
|
|
2017
2023
|
}
|
|
2018
2024
|
export($item) {
|
|
2019
2025
|
let filterFields;
|
|
2020
|
-
const sortOptions =
|
|
2026
|
+
const sortOptions = lodashEs.isEmpty(this.sortInfo) ? '' : this.sortInfo.field + ' ' + this.sortInfo.direction;
|
|
2021
2027
|
const columns = {};
|
|
2022
2028
|
let isValid;
|
|
2023
2029
|
let requestData;
|
|
@@ -2053,7 +2059,7 @@
|
|
|
2053
2059
|
if (isValid === false) {
|
|
2054
2060
|
return;
|
|
2055
2061
|
}
|
|
2056
|
-
requestData.fields =
|
|
2062
|
+
requestData.fields = lodashEs.values(requestData.columns);
|
|
2057
2063
|
this.datasource.execute(i2.DataSource.Operation.DOWNLOAD, { data: requestData });
|
|
2058
2064
|
}
|
|
2059
2065
|
expandRow(rowId) {
|
|
@@ -2114,7 +2120,7 @@
|
|
|
2114
2120
|
}
|
|
2115
2121
|
ngOnDetach() {
|
|
2116
2122
|
super.ngOnDetach();
|
|
2117
|
-
if (
|
|
2123
|
+
if (lodashEs.get(this.datasource, 'category') === 'wm.Variable' && this.getConfiguredState() !== 'none') {
|
|
2118
2124
|
this._pageLoad = false;
|
|
2119
2125
|
}
|
|
2120
2126
|
else {
|
|
@@ -2267,7 +2273,7 @@
|
|
|
2267
2273
|
type: i0.HostListener,
|
|
2268
2274
|
args: ['keypress', ['$event']]
|
|
2269
2275
|
}] }); })();
|
|
2270
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(TableComponent, { className: "TableComponent", filePath: "table.component.ts", lineNumber:
|
|
2276
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(TableComponent, { className: "TableComponent", filePath: "table.component.ts", lineNumber: 122 }); })();
|
|
2271
2277
|
|
|
2272
2278
|
const OPERATION = {
|
|
2273
2279
|
'NEW': 'new',
|
|
@@ -2389,23 +2395,23 @@
|
|
|
2389
2395
|
generatePath(binddataset) {
|
|
2390
2396
|
let path, index;
|
|
2391
2397
|
let dataBoundExpr = this.table.widget.$attrs.get('datasetboundexpr');
|
|
2392
|
-
if (
|
|
2393
|
-
if (
|
|
2398
|
+
if (lodashEs.startsWith(binddataset, 'item') && dataBoundExpr) {
|
|
2399
|
+
if (lodashEs.startsWith(dataBoundExpr, 'Widgets.')) {
|
|
2394
2400
|
dataBoundExpr = i2.extractCurrentItemExpr(dataBoundExpr, this.table);
|
|
2395
2401
|
}
|
|
2396
2402
|
const parentListItems = this.table.$element.parents('.app-list-item');
|
|
2397
|
-
const indexArr =
|
|
2403
|
+
const indexArr = lodashEs.map(parentListItems, (item) => lodashEs.parseInt($(item).attr('listitemindex')));
|
|
2398
2404
|
for (let i = indexArr.length - 1; i >= 0; i--) {
|
|
2399
2405
|
dataBoundExpr = dataBoundExpr.replace('$i', indexArr[i]);
|
|
2400
2406
|
}
|
|
2401
|
-
index =
|
|
2407
|
+
index = lodashEs.last(indexArr);
|
|
2402
2408
|
path = dataBoundExpr.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g, '');
|
|
2403
2409
|
}
|
|
2404
2410
|
else {
|
|
2405
2411
|
// if we have dataset as "Variables.staticVar1.dataSet[1].details" then pass index as 1.
|
|
2406
2412
|
const regEx = /^Variables\..*\.dataSet([\[][0-9]])/g;
|
|
2407
2413
|
if (regEx.test(binddataset)) {
|
|
2408
|
-
index =
|
|
2414
|
+
index = lodashEs.parseInt(binddataset.replace(/^Variables\..*\.dataSet([\[])/g, ''));
|
|
2409
2415
|
}
|
|
2410
2416
|
path = binddataset.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g, '');
|
|
2411
2417
|
}
|
|
@@ -2746,12 +2752,12 @@
|
|
|
2746
2752
|
return undefined;
|
|
2747
2753
|
}
|
|
2748
2754
|
if (i2.isNumberType(type)) {
|
|
2749
|
-
return
|
|
2755
|
+
return lodashEs.toNumber(value);
|
|
2750
2756
|
}
|
|
2751
2757
|
if (type === i2.DataType.DATETIME) {
|
|
2752
2758
|
return moment(value).valueOf();
|
|
2753
2759
|
}
|
|
2754
|
-
return
|
|
2760
|
+
return lodashEs.toString(value).toLowerCase();
|
|
2755
2761
|
};
|
|
2756
2762
|
// Filter the data based on the search value and conditions
|
|
2757
2763
|
const getFilteredData = (data, searchObj, visibleCols = []) => {
|
|
@@ -2760,26 +2766,27 @@
|
|
|
2760
2766
|
// Return whole data if
|
|
2761
2767
|
// - search value is undefined and matchmode is not an empty matchmode type
|
|
2762
2768
|
// - search value is null and datatype is number. Null can not be compared with numeric values[WMS-19275].
|
|
2763
|
-
if ((!i2.isDefined(searchVal) && !
|
|
2769
|
+
if ((!i2.isDefined(searchVal) && !lodashEs.includes(emptyMatchModes, searchObj.matchMode)) || (i2.isNumberType(searchObj.type) && lodashEs.isNull(searchObj.value))) {
|
|
2764
2770
|
return data;
|
|
2765
2771
|
}
|
|
2766
2772
|
data = data.filter((obj) => {
|
|
2767
2773
|
let isExists;
|
|
2768
2774
|
if (searchObj.field) {
|
|
2769
|
-
currentVal = getSearchValue(
|
|
2775
|
+
currentVal = getSearchValue(lodashEs.get(obj, searchObj.field), searchObj.type);
|
|
2770
2776
|
}
|
|
2771
2777
|
else {
|
|
2772
2778
|
currentVal = [];
|
|
2773
|
-
|
|
2774
|
-
if ((
|
|
2779
|
+
lodashEs.forEach(obj, (val, key) => {
|
|
2780
|
+
if ((lodashEs.includes(visibleCols, key))) {
|
|
2775
2781
|
currentVal.push(val);
|
|
2776
2782
|
}
|
|
2777
2783
|
else {
|
|
2778
2784
|
// WMS-22271 If the key is in nested key format (dot format)
|
|
2779
2785
|
// Find all the indexes of the key in visiblecols and extract their values from obj
|
|
2780
|
-
const colIndex =
|
|
2781
|
-
|
|
2782
|
-
|
|
2786
|
+
const colIndex = lodashEs.filter(lodashEs.range(visibleCols.length), (i) => visibleCols[i].includes(key));
|
|
2787
|
+
lodashEs.forEach(colIndex, (index) => {
|
|
2788
|
+
// @ts-ignore
|
|
2789
|
+
const value = lodashEs.get(obj, visibleCols[index]);
|
|
2783
2790
|
if (currentVal.indexOf(value) < 0) {
|
|
2784
2791
|
currentVal.push(value);
|
|
2785
2792
|
}
|
|
@@ -2790,31 +2797,31 @@
|
|
|
2790
2797
|
}
|
|
2791
2798
|
switch (searchObj.matchMode) {
|
|
2792
2799
|
case 'start':
|
|
2793
|
-
isExists =
|
|
2800
|
+
isExists = lodashEs.startsWith(currentVal, searchVal);
|
|
2794
2801
|
break;
|
|
2795
2802
|
case 'end':
|
|
2796
|
-
isExists =
|
|
2803
|
+
isExists = lodashEs.endsWith(currentVal, searchVal);
|
|
2797
2804
|
break;
|
|
2798
2805
|
case 'exact':
|
|
2799
|
-
isExists =
|
|
2806
|
+
isExists = lodashEs.isEqual(currentVal, searchVal);
|
|
2800
2807
|
break;
|
|
2801
2808
|
case 'notequals':
|
|
2802
|
-
isExists = !
|
|
2809
|
+
isExists = !lodashEs.isEqual(currentVal, searchVal);
|
|
2803
2810
|
break;
|
|
2804
2811
|
case 'null':
|
|
2805
|
-
isExists =
|
|
2812
|
+
isExists = lodashEs.isNull(currentVal);
|
|
2806
2813
|
break;
|
|
2807
2814
|
case 'isnotnull':
|
|
2808
|
-
isExists = !
|
|
2815
|
+
isExists = !lodashEs.isNull(currentVal);
|
|
2809
2816
|
break;
|
|
2810
2817
|
case 'empty':
|
|
2811
|
-
isExists =
|
|
2818
|
+
isExists = lodashEs.isEmpty(currentVal);
|
|
2812
2819
|
break;
|
|
2813
2820
|
case 'isnotempty':
|
|
2814
|
-
isExists = !
|
|
2821
|
+
isExists = !lodashEs.isEmpty(currentVal);
|
|
2815
2822
|
break;
|
|
2816
2823
|
case 'nullorempty':
|
|
2817
|
-
isExists =
|
|
2824
|
+
isExists = lodashEs.isNull(currentVal) || lodashEs.isEmpty(currentVal);
|
|
2818
2825
|
break;
|
|
2819
2826
|
case 'lessthan':
|
|
2820
2827
|
isExists = currentVal < searchVal;
|
|
@@ -2829,7 +2836,7 @@
|
|
|
2829
2836
|
isExists = currentVal >= searchVal;
|
|
2830
2837
|
break;
|
|
2831
2838
|
default:
|
|
2832
|
-
isExists = i2.isNumberType(searchObj.type) ?
|
|
2839
|
+
isExists = i2.isNumberType(searchObj.type) ? lodashEs.isEqual(currentVal, searchVal) : lodashEs.includes(currentVal, searchVal);
|
|
2833
2840
|
break;
|
|
2834
2841
|
}
|
|
2835
2842
|
return isExists;
|
|
@@ -2914,13 +2921,13 @@
|
|
|
2914
2921
|
// Get first or last page based on sort info of primary key
|
|
2915
2922
|
getNavigationTargetBySortInfo() {
|
|
2916
2923
|
return this.table.sortInfo && this.table.sortInfo.direction === 'desc' &&
|
|
2917
|
-
|
|
2924
|
+
lodashEs.includes(this.table.primaryKey, this.table.sortInfo.field) ? 'first' : 'last';
|
|
2918
2925
|
}
|
|
2919
2926
|
// Returns all the columns of the table wherein, showinfilter is set to true
|
|
2920
2927
|
getTableVisibleCols() {
|
|
2921
2928
|
const visibleCols = [];
|
|
2922
|
-
|
|
2923
|
-
if (
|
|
2929
|
+
lodashEs.forEach(this.table.columns, (val, col) => {
|
|
2930
|
+
if (lodashEs.toLower(lodashEs.toString(val.showinfilter)) === 'true' && col !== 'rowOperations' && val.searchable) {
|
|
2924
2931
|
visibleCols.push(col);
|
|
2925
2932
|
}
|
|
2926
2933
|
});
|
|
@@ -2931,7 +2938,7 @@
|
|
|
2931
2938
|
if (searchObj.field) {
|
|
2932
2939
|
setFilterFields(filterFields, searchObj);
|
|
2933
2940
|
}
|
|
2934
|
-
else if (!
|
|
2941
|
+
else if (!lodashEs.isEmpty(searchObj)) {
|
|
2935
2942
|
const visibleCols = this.getTableVisibleCols();
|
|
2936
2943
|
setFilterFields(filterFields, searchObj, visibleCols);
|
|
2937
2944
|
}
|
|
@@ -2940,8 +2947,8 @@
|
|
|
2940
2947
|
getFilterFields(searchObj) {
|
|
2941
2948
|
searchObj = searchObj || {};
|
|
2942
2949
|
const filterFields = {};
|
|
2943
|
-
if (
|
|
2944
|
-
|
|
2950
|
+
if (lodashEs.isArray(searchObj)) {
|
|
2951
|
+
lodashEs.forEach(searchObj, obj => {
|
|
2945
2952
|
this.invokeSetFilterfieldBasedOnFieldval(obj, filterFields);
|
|
2946
2953
|
});
|
|
2947
2954
|
}
|
|
@@ -2962,11 +2969,11 @@
|
|
|
2962
2969
|
// Reset the sort based on sort returned by the call
|
|
2963
2970
|
resetSortStatus(variableSort) {
|
|
2964
2971
|
let gridSortString;
|
|
2965
|
-
if (!
|
|
2972
|
+
if (!lodashEs.isEmpty(this.table.sortInfo) && this.table.datasource) {
|
|
2966
2973
|
gridSortString = this.table.sortInfo.field + ' ' + this.table.sortInfo.direction;
|
|
2967
2974
|
variableSort = this.table.datasource.execute(i2.DataSource.Operation.GET_OPTIONS).orderBy || variableSort;
|
|
2968
2975
|
if (variableSort) { // If multiple order by fields are present, compare with the first one
|
|
2969
|
-
variableSort =
|
|
2976
|
+
variableSort = lodashEs.head(lodashEs.split(variableSort, ','));
|
|
2970
2977
|
}
|
|
2971
2978
|
if (gridSortString !== variableSort) {
|
|
2972
2979
|
this.table.callDataGridMethod('resetSortIcons');
|
|
@@ -3004,7 +3011,7 @@
|
|
|
3004
3011
|
return;
|
|
3005
3012
|
}
|
|
3006
3013
|
if (this.table.datasource.execute(i2.DataSource.Operation.SUPPORTS_SERVER_FILTER)) {
|
|
3007
|
-
if (
|
|
3014
|
+
if (lodashEs.isEmpty(this.table.datasource.execute(i2.DataSource.Operation.GET_OPTIONS).filterFields)) {
|
|
3008
3015
|
this.clearFilter(true);
|
|
3009
3016
|
}
|
|
3010
3017
|
this.resetSortStatus(variableSort);
|
|
@@ -3020,7 +3027,7 @@
|
|
|
3020
3027
|
if (!searchObj) {
|
|
3021
3028
|
return data;
|
|
3022
3029
|
}
|
|
3023
|
-
if (
|
|
3030
|
+
if (lodashEs.isArray(searchObj)) {
|
|
3024
3031
|
searchObj.forEach((obj) => {
|
|
3025
3032
|
data = getFilteredData(data, obj, visibleCols);
|
|
3026
3033
|
});
|
|
@@ -3033,7 +3040,7 @@
|
|
|
3033
3040
|
// Returns data sorted using sortObj
|
|
3034
3041
|
getSortResult(data, sortObj) {
|
|
3035
3042
|
if (sortObj && sortObj.direction) {
|
|
3036
|
-
data =
|
|
3043
|
+
data = lodashEs.orderBy(data, sortObj.field, sortObj.direction);
|
|
3037
3044
|
}
|
|
3038
3045
|
return data;
|
|
3039
3046
|
}
|
|
@@ -3048,7 +3055,7 @@
|
|
|
3048
3055
|
else {
|
|
3049
3056
|
this.table.sortInfo = searchSortObj;
|
|
3050
3057
|
}
|
|
3051
|
-
if (
|
|
3058
|
+
if (lodashEs.isObject(data) && !lodashEs.isArray(data)) {
|
|
3052
3059
|
data = [data];
|
|
3053
3060
|
}
|
|
3054
3061
|
/*Both the functions return same 'data' if arguments are undefined*/
|
|
@@ -3080,9 +3087,9 @@
|
|
|
3080
3087
|
this.table.filterInfo = searchObj;
|
|
3081
3088
|
data = this.getSearchResult(data, searchObj);
|
|
3082
3089
|
// Compared the filtered data and original data, to show or hide the rows
|
|
3083
|
-
|
|
3090
|
+
lodashEs.forEach(this.table.gridData, (value, index) => {
|
|
3084
3091
|
const $row = $($rows[index]);
|
|
3085
|
-
if (
|
|
3092
|
+
if (lodashEs.find(data, obj => lodashEs.isEqual(obj, value))) {
|
|
3086
3093
|
$row.show();
|
|
3087
3094
|
}
|
|
3088
3095
|
else {
|
|
@@ -3153,7 +3160,7 @@
|
|
|
3153
3160
|
}
|
|
3154
3161
|
searchHandler(searchSortObj, e, type, statePersistenceTriggered) {
|
|
3155
3162
|
let obj;
|
|
3156
|
-
if (
|
|
3163
|
+
if (lodashEs.isArray(searchSortObj)) {
|
|
3157
3164
|
obj = searchSortObj.filter(function (searchObject) {
|
|
3158
3165
|
return (searchObject.matchMode !== undefined && searchObject.value !== undefined) || (searchObject.value !== undefined && searchObject.field === '');
|
|
3159
3166
|
});
|
|
@@ -3162,7 +3169,7 @@
|
|
|
3162
3169
|
obj = { field: searchSortObj.field, value: searchSortObj.value, type: searchSortObj.type };
|
|
3163
3170
|
}
|
|
3164
3171
|
if (this.table.getConfiguredState() !== 'none' && i4.unsupportedStatePersistenceTypes.indexOf(this.table.navigation) < 0) {
|
|
3165
|
-
if ((
|
|
3172
|
+
if ((lodashEs.isArray(searchSortObj) && obj.length) || (searchSortObj.value)) {
|
|
3166
3173
|
this.table.statePersistence.removeWidgetState(this.table, 'search');
|
|
3167
3174
|
this.table.statePersistence.setWidgetState(this.table, { search: obj });
|
|
3168
3175
|
}
|
|
@@ -3185,7 +3192,7 @@
|
|
|
3185
3192
|
let output;
|
|
3186
3193
|
const userFilters = {};
|
|
3187
3194
|
// Transform filter fields from array to object having field names as keys
|
|
3188
|
-
if (
|
|
3195
|
+
if (lodashEs.isArray(filterFields)) {
|
|
3189
3196
|
filterFields.forEach(filterField => {
|
|
3190
3197
|
transformFilterField(userFilters, filterField);
|
|
3191
3198
|
});
|
|
@@ -3200,9 +3207,9 @@
|
|
|
3200
3207
|
}
|
|
3201
3208
|
filterFields = [];
|
|
3202
3209
|
// if the field is not selected in search filter dropdown, building the filter fields object
|
|
3203
|
-
if (
|
|
3204
|
-
if (
|
|
3205
|
-
|
|
3210
|
+
if (lodashEs.isEmpty(userFilters) && !lodashEs.isEmpty(obj)) {
|
|
3211
|
+
if (lodashEs.isArray(obj)) {
|
|
3212
|
+
lodashEs.forEach(obj, searchObj => {
|
|
3206
3213
|
addToFilterFields(filterFields, searchObj);
|
|
3207
3214
|
});
|
|
3208
3215
|
}
|
|
@@ -3212,13 +3219,9 @@
|
|
|
3212
3219
|
}
|
|
3213
3220
|
else {
|
|
3214
3221
|
// Transform back the filter fields from object to array
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
matchMode: val.matchMode,
|
|
3219
|
-
type: val.type,
|
|
3220
|
-
value: val.value
|
|
3221
|
-
});
|
|
3222
|
+
lodashEs.forEach(userFilters, (val, key) => {
|
|
3223
|
+
// @ts-ignore
|
|
3224
|
+
filterFields.push({ field: key, matchMode: val.matchMode, type: val.type, value: val.value });
|
|
3222
3225
|
});
|
|
3223
3226
|
}
|
|
3224
3227
|
if (dataSource && dataSource.execute(i2.DataSource.Operation.SUPPORTS_SERVER_FILTER)) {
|
|
@@ -3296,7 +3299,7 @@
|
|
|
3296
3299
|
this.table.rowFilter[fieldName] = this.table.rowFilter[fieldName] || {};
|
|
3297
3300
|
this.table.rowFilter[fieldName].matchMode = condition;
|
|
3298
3301
|
// For empty match modes, clear off the value and call filter
|
|
3299
|
-
if (
|
|
3302
|
+
if (lodashEs.includes(this.table.emptyMatchModes, condition)) {
|
|
3300
3303
|
this.table.columns[fieldName].resetFilter();
|
|
3301
3304
|
this.table.onRowFilterChange();
|
|
3302
3305
|
}
|
|
@@ -3319,10 +3322,10 @@
|
|
|
3319
3322
|
}
|
|
3320
3323
|
const fieldName = filterDef.field;
|
|
3321
3324
|
const formFields = this.table.fullFieldDefs;
|
|
3322
|
-
const filterOnFields =
|
|
3323
|
-
const newVal =
|
|
3325
|
+
const filterOnFields = lodashEs.filter(formFields, { 'filteronfilter': fieldName });
|
|
3326
|
+
const newVal = lodashEs.get(this.table.rowFilter, [fieldName, 'value']);
|
|
3324
3327
|
// Loop over the fields for which the current field is filter on field
|
|
3325
|
-
|
|
3328
|
+
lodashEs.forEach(filterOnFields, filterField => {
|
|
3326
3329
|
const filterOn = filterField.filteronfilter;
|
|
3327
3330
|
const filterKey = filterField.field;
|
|
3328
3331
|
const filterFields = {};
|
|
@@ -3347,13 +3350,13 @@
|
|
|
3347
3350
|
// This method is triggered on value change in multi column filter
|
|
3348
3351
|
onRowFilterChange(fieldName) {
|
|
3349
3352
|
const searchObj = [];
|
|
3350
|
-
const field =
|
|
3353
|
+
const field = lodashEs.find(this.table.fullFieldDefs, { 'field': fieldName });
|
|
3351
3354
|
// Convert row filters to a search object and call search handler
|
|
3352
|
-
|
|
3353
|
-
if ((i2.isDefined(value.value) && value.value !== '') ||
|
|
3355
|
+
lodashEs.forEach(this.table.rowFilter, (value, key) => {
|
|
3356
|
+
if ((i2.isDefined(value.value) && value.value !== '') || lodashEs.includes(this.table.emptyMatchModes, value.matchMode)) {
|
|
3354
3357
|
if (field && key === field.field) {
|
|
3355
3358
|
value.type = value.type || field.type;
|
|
3356
|
-
value.matchMode = value.matchMode ||
|
|
3359
|
+
value.matchMode = value.matchMode || lodashEs.get(this.table.matchModeTypesMap[value.type], 0);
|
|
3357
3360
|
}
|
|
3358
3361
|
searchObj.push({
|
|
3359
3362
|
field: key,
|
|
@@ -3438,7 +3441,7 @@
|
|
|
3438
3441
|
show: this.show,
|
|
3439
3442
|
class: this.class || '',
|
|
3440
3443
|
iconclass: this.iconclass || '',
|
|
3441
|
-
title:
|
|
3444
|
+
title: lodashEs.isUndefined(this.title) ? (this['display-name'] || '') : this.title,
|
|
3442
3445
|
action: this.action,
|
|
3443
3446
|
accessroles: this.accessroles,
|
|
3444
3447
|
shortcutkey: this.shortcutkey,
|
|
@@ -3700,22 +3703,22 @@
|
|
|
3700
3703
|
this.observeOnFields = [];
|
|
3701
3704
|
this.aggregate = {
|
|
3702
3705
|
sum: () => {
|
|
3703
|
-
return
|
|
3706
|
+
return lodashEs.sum(this._getColumnData());
|
|
3704
3707
|
},
|
|
3705
3708
|
average: (precision = 2) => {
|
|
3706
|
-
return
|
|
3709
|
+
return lodashEs.round(lodashEs.mean(this._getColumnData()), precision);
|
|
3707
3710
|
},
|
|
3708
3711
|
count: () => {
|
|
3709
3712
|
return this._getColumnData().length;
|
|
3710
3713
|
},
|
|
3711
3714
|
minimum: () => {
|
|
3712
|
-
return
|
|
3715
|
+
return lodashEs.min(this._getColumnData());
|
|
3713
3716
|
},
|
|
3714
3717
|
maximum: () => {
|
|
3715
|
-
return
|
|
3718
|
+
return lodashEs.max(this._getColumnData());
|
|
3716
3719
|
},
|
|
3717
3720
|
percent: (value, precision = 2) => {
|
|
3718
|
-
return
|
|
3721
|
+
return lodashEs.round((lodashEs.sum(this._getColumnData()) / value) * 100, precision);
|
|
3719
3722
|
}
|
|
3720
3723
|
};
|
|
3721
3724
|
this.notifyForFields = [];
|
|
@@ -3972,7 +3975,7 @@
|
|
|
3972
3975
|
if (this.relatedEntityName) {
|
|
3973
3976
|
this.widget['is-related'] = true;
|
|
3974
3977
|
this.widget['lookup-type'] = this.relatedEntityName;
|
|
3975
|
-
this.widget['lookup-field'] =
|
|
3978
|
+
this.widget['lookup-field'] = lodashEs.last(lodashEs.split(this.field, '.'));
|
|
3976
3979
|
}
|
|
3977
3980
|
if (this.filterwidget === i2.FormWidgetType.AUTOCOMPLETE) {
|
|
3978
3981
|
this.filterInstance.dataoptions = i4.getDistinctFieldProperties(this.table.datasource, this);
|
|
@@ -3999,11 +4002,11 @@
|
|
|
3999
4002
|
if (this['related-entity-name'] && this['primary-key']) {
|
|
4000
4003
|
// Fetch the data for the related fields
|
|
4001
4004
|
this.isDataSetBound = true;
|
|
4002
|
-
const bindings =
|
|
4005
|
+
const bindings = lodashEs.split(this.binding, '.');
|
|
4003
4006
|
this.showPendingSpinner = true;
|
|
4004
4007
|
i4.fetchRelatedFieldData(dataSource, this.widget, {
|
|
4005
|
-
relatedField:
|
|
4006
|
-
datafield:
|
|
4008
|
+
relatedField: lodashEs.head(bindings),
|
|
4009
|
+
datafield: lodashEs.last(bindings),
|
|
4007
4010
|
widget: 'edit-widget-type'
|
|
4008
4011
|
});
|
|
4009
4012
|
}
|
|
@@ -4032,7 +4035,7 @@
|
|
|
4032
4035
|
this.filterInstance.registerReadyStateListener(() => {
|
|
4033
4036
|
if (i4.isDataSetWidget(this.filterwidget)) {
|
|
4034
4037
|
// if binding is department.deptId then field will be deptId
|
|
4035
|
-
const field =
|
|
4038
|
+
const field = lodashEs.last(this.binding.split('.'));
|
|
4036
4039
|
this.filterInstance.dataset = this._filterDataSet;
|
|
4037
4040
|
this.filterInstance.datafield = this.filterdatafield || field;
|
|
4038
4041
|
this.filterInstance.displayfield = this.filterdisplayfield || field;
|
|
@@ -4049,7 +4052,7 @@
|
|
|
4049
4052
|
}
|
|
4050
4053
|
// Notifies all the dependent validation controls incase of any changes
|
|
4051
4054
|
notifyChanges(quickEdit) {
|
|
4052
|
-
|
|
4055
|
+
lodashEs.forEach(this.notifyForFields, field => {
|
|
4053
4056
|
if (quickEdit && this._isNewEditableRow) {
|
|
4054
4057
|
field.fieldValidations_new.validate();
|
|
4055
4058
|
}
|
|
@@ -4060,7 +4063,7 @@
|
|
|
4060
4063
|
}
|
|
4061
4064
|
// Watches control for dependent validation changes
|
|
4062
4065
|
observeOn(fields) {
|
|
4063
|
-
this.observeOnFields =
|
|
4066
|
+
this.observeOnFields = lodashEs.cloneDeep(fields);
|
|
4064
4067
|
}
|
|
4065
4068
|
// Sets the default validators inline and quickedit new row using props
|
|
4066
4069
|
setUpValidators() {
|
|
@@ -4071,11 +4074,11 @@
|
|
|
4071
4074
|
}
|
|
4072
4075
|
// Sets the Async validators on the inline and quickedit new row form control
|
|
4073
4076
|
setAsyncValidators(validators) {
|
|
4074
|
-
this.asyncValidators =
|
|
4077
|
+
this.asyncValidators = lodashEs.cloneDeep(validators);
|
|
4075
4078
|
}
|
|
4076
4079
|
// Sets the default/custom validators on the inline and quickedit new row form control
|
|
4077
4080
|
setValidators(validators) {
|
|
4078
|
-
this.syncValidators =
|
|
4081
|
+
this.syncValidators = lodashEs.cloneDeep(validators);
|
|
4079
4082
|
}
|
|
4080
4083
|
boundFn(fn) {
|
|
4081
4084
|
return fn();
|
|
@@ -4090,7 +4093,7 @@
|
|
|
4090
4093
|
this._invokeSummaryRowData(newData);
|
|
4091
4094
|
}
|
|
4092
4095
|
_invokeSummaryRowData(data) {
|
|
4093
|
-
|
|
4096
|
+
lodashEs.forEach(data, (item, index) => {
|
|
4094
4097
|
const content = item;
|
|
4095
4098
|
if (content instanceof Promise) {
|
|
4096
4099
|
content.then(res => {
|
|
@@ -4108,7 +4111,7 @@
|
|
|
4108
4111
|
});
|
|
4109
4112
|
}
|
|
4110
4113
|
_getColumnData() {
|
|
4111
|
-
return
|
|
4114
|
+
return lodashEs.map(this.table.dataset, this.binding);
|
|
4112
4115
|
}
|
|
4113
4116
|
/* Summary Row Logic end */
|
|
4114
4117
|
// Set the props on the inline edit widget
|
|
@@ -4158,7 +4161,7 @@
|
|
|
4158
4161
|
this.limit = this.limit ? +this.limit : undefined;
|
|
4159
4162
|
this.editWidgetType = this['edit-widget-type'] = this['edit-widget-type'] || i4.getEditModeWidget(this);
|
|
4160
4163
|
this.filterOn = this['filter-on'];
|
|
4161
|
-
this.readonly = i2.isDefined(this.getAttr('readonly')) ? this.getAttr('readonly') === 'true' : (this['related-entity-name'] ? !this['primary-key'] :
|
|
4164
|
+
this.readonly = i2.isDefined(this.getAttr('readonly')) ? this.getAttr('readonly') === 'true' : (this['related-entity-name'] ? !this['primary-key'] : lodashEs.includes(['identity', 'uniqueid', 'sequence'], this.generator));
|
|
4162
4165
|
this.filterwidget = this.filterwidget || i4.getDataTableFilterWidget(this.type || 'string');
|
|
4163
4166
|
this.isFilterDataSetBound = !!this.bindfilterdataset;
|
|
4164
4167
|
this.defaultvalue = i4.getDefaultValue(this.defaultvalue, this.type, this.editWidgetType);
|
|
@@ -4389,7 +4392,7 @@
|
|
|
4389
4392
|
contexts[0].addNewRow = (evt) => this.table.addNewRow(evt);
|
|
4390
4393
|
}
|
|
4391
4394
|
getTitle() {
|
|
4392
|
-
return
|
|
4395
|
+
return lodashEs.isUndefined(this.title) ? (this['display-name'] || '') : this.title;
|
|
4393
4396
|
}
|
|
4394
4397
|
populateAction() {
|
|
4395
4398
|
this.buttonDef = {
|