@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
|
@@ -9,10 +9,11 @@ import { TypeaheadDirective, TypeaheadModule } from 'ngx-bootstrap/typeahead';
|
|
|
9
9
|
import * as i4 from '@wm/components/base';
|
|
10
10
|
import { PROP_BOOLEAN, PROP_STRING, PROP_ANY, PROP_NUMBER, register, registerFormWidget, interpolateBindExpressions, ALLFIELDS, extractDataAsArray, convertDataToObject, transformFormData, getUniqObjsByDataField, styler, getContainerTargetClass, provideAs, provideAsWidgetRef, WmComponentsModule } from '@wm/components/base';
|
|
11
11
|
import { Observable, of, from } from 'rxjs';
|
|
12
|
-
import { filter, mergeMap } from 'rxjs/operators';
|
|
12
|
+
import { filter as filter$1, mergeMap } from 'rxjs/operators';
|
|
13
13
|
import * as i1 from '@wm/core';
|
|
14
14
|
import { FormWidgetType, DataSource, getClonedObject, AppConstants, findValueOf, addClass, isDefined, isMobile, adjustContainerPosition, toBoolean } from '@wm/core';
|
|
15
15
|
import { DatasetAwareFormComponent } from '@wm/components/input';
|
|
16
|
+
import { isNumber, includes, startsWith, endsWith, isEqual, split, get, toString, toLower, filter, isArray, isObject, values, assign, set, isEmpty, indexOf, slice, trim, debounce, isUndefined, find, map } from 'lodash-es';
|
|
16
17
|
|
|
17
18
|
const searchProps = new Map([
|
|
18
19
|
['casesensitive', { value: false, ...PROP_BOOLEAN }],
|
|
@@ -65,17 +66,17 @@ const registerProps = () => {
|
|
|
65
66
|
|
|
66
67
|
class LocalDataProvider {
|
|
67
68
|
applyFilter(entry, queryText, filtername) {
|
|
68
|
-
entry =
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
69
|
+
entry = isNumber(entry) ? entry.toString() : entry;
|
|
70
|
+
if (includes(filtername, 'start')) {
|
|
71
|
+
return startsWith(entry, queryText);
|
|
71
72
|
}
|
|
72
|
-
else if (
|
|
73
|
-
return
|
|
73
|
+
else if (includes(filtername, 'end')) {
|
|
74
|
+
return endsWith(entry, queryText);
|
|
74
75
|
}
|
|
75
|
-
else if (
|
|
76
|
-
return
|
|
76
|
+
else if (includes(filtername, 'exact')) {
|
|
77
|
+
return isEqual(entry, queryText);
|
|
77
78
|
}
|
|
78
|
-
return
|
|
79
|
+
return includes(entry, queryText);
|
|
79
80
|
}
|
|
80
81
|
// LocalData filtering is done based on the searchkey.
|
|
81
82
|
filter(config) {
|
|
@@ -83,7 +84,7 @@ class LocalDataProvider {
|
|
|
83
84
|
let casesensitive = config.casesensitive;
|
|
84
85
|
const matchMode = config.matchMode;
|
|
85
86
|
// for supporting existing projects
|
|
86
|
-
if (matchMode && !
|
|
87
|
+
if (matchMode && !includes(matchMode, 'ignorecase')) {
|
|
87
88
|
casesensitive = true;
|
|
88
89
|
}
|
|
89
90
|
let queryText = config.query, filteredData;
|
|
@@ -93,13 +94,13 @@ class LocalDataProvider {
|
|
|
93
94
|
* return the filtered data containing the matching string.
|
|
94
95
|
*/
|
|
95
96
|
if (config.searchKey) {
|
|
96
|
-
const keys =
|
|
97
|
-
filteredData =
|
|
97
|
+
const keys = split(config.searchKey, ',');
|
|
98
|
+
filteredData = filter(config.dataset, (item) => {
|
|
98
99
|
return keys.some(key => {
|
|
99
|
-
let a =
|
|
100
|
+
let a = get(item, key), b = queryText;
|
|
100
101
|
if (!casesensitive) {
|
|
101
|
-
a =
|
|
102
|
-
b =
|
|
102
|
+
a = toLower(toString(a));
|
|
103
|
+
b = toLower(toString(b));
|
|
103
104
|
}
|
|
104
105
|
return this.applyFilter(a, b, matchMode);
|
|
105
106
|
});
|
|
@@ -108,21 +109,23 @@ class LocalDataProvider {
|
|
|
108
109
|
else {
|
|
109
110
|
// local search on data with array of objects.
|
|
110
111
|
// Iterate over each item and return the filtered data containing the matching string.
|
|
111
|
-
if (
|
|
112
|
-
filteredData =
|
|
113
|
-
let a =
|
|
112
|
+
if (isArray(entries) && isObject(entries[0])) {
|
|
113
|
+
filteredData = filter(entries, entry => {
|
|
114
|
+
let a = values(entry).join(' ');
|
|
114
115
|
if (!casesensitive) {
|
|
115
|
-
a =
|
|
116
|
-
|
|
116
|
+
a = toLower(a);
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
queryText = toLower(queryText);
|
|
117
119
|
}
|
|
118
120
|
return this.applyFilter(a, queryText);
|
|
119
121
|
});
|
|
120
122
|
}
|
|
121
123
|
else {
|
|
122
|
-
filteredData =
|
|
124
|
+
filteredData = filter(entries, entry => {
|
|
123
125
|
if (!casesensitive) {
|
|
124
|
-
entry =
|
|
125
|
-
|
|
126
|
+
entry = toLower(entry);
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
queryText = toLower(queryText);
|
|
126
129
|
}
|
|
127
130
|
return this.applyFilter(entry, queryText, matchMode);
|
|
128
131
|
});
|
|
@@ -152,7 +155,7 @@ class RemoteDataProvider {
|
|
|
152
155
|
interpolateBindExpressions(config.viewParent, dataoptions.filterExpr, (filterexpressions) => {
|
|
153
156
|
requestParams.filterExpr = dataoptions.filterExpr = filterexpressions;
|
|
154
157
|
dataoptions.filterExpr = filterexpressions;
|
|
155
|
-
config.datasource.execute(DataSource.Operation.GET_RELATED_TABLE_DATA,
|
|
158
|
+
config.datasource.execute(DataSource.Operation.GET_RELATED_TABLE_DATA, assign({ relatedField: dataoptions.relatedField }, requestParams)).then(resolve, reject);
|
|
156
159
|
});
|
|
157
160
|
});
|
|
158
161
|
}
|
|
@@ -163,7 +166,7 @@ class RemoteDataProvider {
|
|
|
163
166
|
page: config.page,
|
|
164
167
|
fields: dataoptions.distinctField,
|
|
165
168
|
entityName: dataoptions.tableName,
|
|
166
|
-
filterFields:
|
|
169
|
+
filterFields: assign(dataoptions.filterFields, requestParams.filterFields),
|
|
167
170
|
filterExpr: getClonedObject(dataoptions.filterExpr || {})
|
|
168
171
|
});
|
|
169
172
|
}
|
|
@@ -187,7 +190,7 @@ class RemoteDataProvider {
|
|
|
187
190
|
// in case data received is value as string then add that string value to object and convert object into array
|
|
188
191
|
if (tempResponse) {
|
|
189
192
|
const tempObj = {};
|
|
190
|
-
|
|
193
|
+
set(tempObj, operationResult, tempResponse);
|
|
191
194
|
data = [tempObj]; // convert data into an array having tempObj
|
|
192
195
|
}
|
|
193
196
|
else {
|
|
@@ -200,7 +203,7 @@ class RemoteDataProvider {
|
|
|
200
203
|
return [];
|
|
201
204
|
}
|
|
202
205
|
isLastPageForDistinctApi(data, page, totalElements, _isLastPage) {
|
|
203
|
-
return page > 1 && !_isLastPage &&
|
|
206
|
+
return page > 1 && !_isLastPage && isEmpty(data) && totalElements === AppConstants.INT_MAX_VALUE;
|
|
204
207
|
}
|
|
205
208
|
// this function processes the response depending on pageOptions, isPageable and prepares the formattedDataset.
|
|
206
209
|
onFilterSuccess(config, response) {
|
|
@@ -209,8 +212,8 @@ class RemoteDataProvider {
|
|
|
209
212
|
let _isLastPage;
|
|
210
213
|
let page;
|
|
211
214
|
let isPaginatedData;
|
|
212
|
-
const expressionArray =
|
|
213
|
-
const dataExpression =
|
|
215
|
+
const expressionArray = split(config.binddataset, '.');
|
|
216
|
+
const dataExpression = slice(expressionArray, indexOf(expressionArray, 'dataSet') + 1).join('.');
|
|
214
217
|
const $I = '[$i]';
|
|
215
218
|
return new Promise((resolve, reject) => {
|
|
216
219
|
const pageOptions = response.pagination;
|
|
@@ -232,19 +235,19 @@ class RemoteDataProvider {
|
|
|
232
235
|
}
|
|
233
236
|
// if data expression exists, extract the data from the expression path
|
|
234
237
|
if (dataExpression) {
|
|
235
|
-
if (
|
|
238
|
+
if (isArray(data)) {
|
|
236
239
|
const index = dataExpression.lastIndexOf($I);
|
|
237
240
|
if (index > -1) {
|
|
238
241
|
const restExpr = dataExpression.substr(index + 5);
|
|
239
242
|
formattedData = data.map(datum => findValueOf(datum, restExpr));
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
|
-
else if (
|
|
243
|
-
formattedData =
|
|
245
|
+
else if (isObject(data)) {
|
|
246
|
+
formattedData = get(data, dataExpression);
|
|
244
247
|
}
|
|
245
248
|
data = formattedData || data;
|
|
246
249
|
}
|
|
247
|
-
if (!
|
|
250
|
+
if (!isArray(data)) {
|
|
248
251
|
data = this.getTransformedData(config.datasource, data);
|
|
249
252
|
}
|
|
250
253
|
// in case of no data received, resolve the promise with empty array
|
|
@@ -512,7 +515,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
512
515
|
if (this.lastSelectedIndex) {
|
|
513
516
|
this.typeahead._container = undefined;
|
|
514
517
|
}
|
|
515
|
-
}).pipe(filter(() => {
|
|
518
|
+
}).pipe(filter$1(() => {
|
|
516
519
|
this._loadingItems = false;
|
|
517
520
|
return (this.minchars === 0 || (this.query && this.query.length >= this.minchars));
|
|
518
521
|
}), mergeMap((token) => this.getDataSourceAsObservable(token)));
|
|
@@ -522,7 +525,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
522
525
|
* after getting the response, set the queryModel and query.
|
|
523
526
|
*/
|
|
524
527
|
const datavalueSubscription = this.datavalue$.subscribe((val) => {
|
|
525
|
-
const query = (
|
|
528
|
+
const query = (isArray(val) ? val[0] : val);
|
|
526
529
|
if (query === null || query === '') {
|
|
527
530
|
this._modelByValue = '';
|
|
528
531
|
// reset the query.
|
|
@@ -534,7 +537,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
534
537
|
if (!this._unsubscribeDv) {
|
|
535
538
|
this._defaultQueryInvoked = false;
|
|
536
539
|
// if prev datavalue is not equal to current datavalue then clear the modelByKey and queryModel
|
|
537
|
-
if (!
|
|
540
|
+
if (!isObject(val) && this.prevDatavalue !== val) {
|
|
538
541
|
this._modelByKey = undefined;
|
|
539
542
|
this.query = this.queryModel = '';
|
|
540
543
|
}
|
|
@@ -622,7 +625,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
622
625
|
getDataSourceAsObservable(query) {
|
|
623
626
|
// show dropdown only when there is change in query. This should not apply when dataoptions with filterFields are updated.
|
|
624
627
|
// when lastResult is not available i.e. still the first call is pending and second query is invoked then do not return.
|
|
625
|
-
if (this._lastQuery === query && !
|
|
628
|
+
if (this._lastQuery === query && !get(this.dataoptions, 'filterFields') && isDefined(this._lastResult)) {
|
|
626
629
|
this._loadingItems = false;
|
|
627
630
|
return of(this._lastResult);
|
|
628
631
|
}
|
|
@@ -634,12 +637,12 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
634
637
|
*/
|
|
635
638
|
if (this.type === 'autocomplete' && this.searchkey && this.query && this.datavalue) {
|
|
636
639
|
let bindDisplayLabelArray = [];
|
|
637
|
-
const searchKeyArray =
|
|
640
|
+
const searchKeyArray = split(this.searchkey, ',');
|
|
638
641
|
let displaylabel;
|
|
639
642
|
if (this.binddisplaylabel) {
|
|
640
|
-
bindDisplayLabelArray =
|
|
643
|
+
bindDisplayLabelArray = split(this.binddisplaylabel, '+');
|
|
641
644
|
if (bindDisplayLabelArray.length === 1) {
|
|
642
|
-
if (!
|
|
645
|
+
if (!includes(bindDisplayLabelArray[0], '|')) {
|
|
643
646
|
const regex = /\[(.*?)\]/;
|
|
644
647
|
displaylabel = regex.exec(bindDisplayLabelArray[0])[1];
|
|
645
648
|
}
|
|
@@ -648,8 +651,8 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
648
651
|
}
|
|
649
652
|
}
|
|
650
653
|
}
|
|
651
|
-
if ((bindDisplayLabelArray.length > 1 || (displaylabel && !
|
|
652
|
-
|| (this.displayexpression && !
|
|
654
|
+
if ((bindDisplayLabelArray.length > 1 || (displaylabel && !includes(searchKeyArray, displaylabel))
|
|
655
|
+
|| (this.displayexpression && !includes(searchKeyArray, this.displayexpression)))) {
|
|
653
656
|
this._loadingItems = false;
|
|
654
657
|
return of([]);
|
|
655
658
|
}
|
|
@@ -658,7 +661,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
658
661
|
return from(this.getDataSource(query));
|
|
659
662
|
}
|
|
660
663
|
handleEvent(node, eventName, eventCallback, locals) {
|
|
661
|
-
if (!
|
|
664
|
+
if (!includes(['blur', 'focus', 'select', 'submit', 'change'], eventName)) {
|
|
662
665
|
super.handleEvent(node, eventName, eventCallback, locals);
|
|
663
666
|
}
|
|
664
667
|
}
|
|
@@ -708,7 +711,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
708
711
|
// trigger the typeahead change manually to fetch the next set of results.
|
|
709
712
|
this.typeahead.onInput({
|
|
710
713
|
target: {
|
|
711
|
-
value:
|
|
714
|
+
value: trim(this.query) || '0' // dummy data to notify the observables
|
|
712
715
|
}
|
|
713
716
|
});
|
|
714
717
|
}
|
|
@@ -759,7 +762,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
759
762
|
// Triggered for enter event
|
|
760
763
|
handleEnterEvent($event) {
|
|
761
764
|
// submit event triggered when there is no search results
|
|
762
|
-
if (!
|
|
765
|
+
if (!get(this.typeahead, 'matches.length')) {
|
|
763
766
|
this.onSearchSelect($event);
|
|
764
767
|
}
|
|
765
768
|
}
|
|
@@ -801,7 +804,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
801
804
|
}
|
|
802
805
|
// setting the ulElements, liElement on typeaheadContainer.
|
|
803
806
|
// as we are using customOption template, liElements are not available on typeaheadContainer so append them explicitly.
|
|
804
|
-
const fn =
|
|
807
|
+
const fn = debounce(() => {
|
|
805
808
|
this._isOpen = true;
|
|
806
809
|
this.typeaheadContainer = this.typeahead._container || this.typeahead._typeahead.instance;
|
|
807
810
|
this.typeaheadContainer.liElements = this.liElements;
|
|
@@ -819,7 +822,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
819
822
|
const screenHeight = this.$element.closest('.app-content').height();
|
|
820
823
|
dropdownEl.css({ position: 'relative', top: 0, height: screenHeight + 'px' });
|
|
821
824
|
this.showClosebtn = this.query && this.query !== '';
|
|
822
|
-
if (!
|
|
825
|
+
if (!isUndefined(this.dataProvider.isLastPage) && !this.dataProvider.isLastPage) {
|
|
823
826
|
this.triggerSearch();
|
|
824
827
|
}
|
|
825
828
|
}
|
|
@@ -874,7 +877,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
874
877
|
this.query = '';
|
|
875
878
|
}
|
|
876
879
|
if (this.clearData) {
|
|
877
|
-
if (
|
|
880
|
+
if (get(this.typeahead, '_typeahead.isShown')) {
|
|
878
881
|
this.typeahead.hide();
|
|
879
882
|
}
|
|
880
883
|
}
|
|
@@ -887,9 +890,9 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
887
890
|
updateByDataSource(data) {
|
|
888
891
|
// value is present but the corresponding key is not found then fetch next set
|
|
889
892
|
// modelByKey will be set only when datavalue is available inside the localData otherwise make a N/w call.
|
|
890
|
-
if (isDefined(data) && !
|
|
893
|
+
if (isDefined(data) && !isObject(data) && this.datasource && !isDefined(this._modelByKey) && this.datafield !== ALLFIELDS) {
|
|
891
894
|
// Avoid making default query if queryModel already exists.
|
|
892
|
-
if (isDefined(this.queryModel) && !
|
|
895
|
+
if (isDefined(this.queryModel) && !isEmpty(this.queryModel)) {
|
|
893
896
|
this.updateDatavalueFromQueryModel();
|
|
894
897
|
return;
|
|
895
898
|
}
|
|
@@ -902,8 +905,8 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
902
905
|
// updates the model value using queryModel
|
|
903
906
|
updateDatavalueFromQueryModel() {
|
|
904
907
|
if (isDefined(this.queryModel)) {
|
|
905
|
-
this._modelByValue =
|
|
906
|
-
this._modelByKey =
|
|
908
|
+
this._modelByValue = isArray(this.queryModel) ? this.queryModel[0].value : this.queryModel;
|
|
909
|
+
this._modelByKey = isArray(this.queryModel) ? this.queryModel[0].key : this.queryModel;
|
|
907
910
|
this.toBeProcessedDatavalue = undefined;
|
|
908
911
|
}
|
|
909
912
|
}
|
|
@@ -913,14 +916,14 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
913
916
|
if (this._defaultQueryInvoked && this.searchkey) {
|
|
914
917
|
return;
|
|
915
918
|
}
|
|
916
|
-
const selectedItem =
|
|
917
|
-
return (
|
|
919
|
+
const selectedItem = find(this.datasetItems, (item) => {
|
|
920
|
+
return (isObject(item.value) ? isEqual(item.value, data) : (toString(item.value)).toLowerCase() === (toString(data)).toLowerCase());
|
|
918
921
|
});
|
|
919
922
|
// set the default only when it is available in dataset.
|
|
920
923
|
if (selectedItem) {
|
|
921
924
|
this.queryModel = [selectedItem];
|
|
922
925
|
}
|
|
923
|
-
else if (this.datafield === ALLFIELDS &&
|
|
926
|
+
else if (this.datafield === ALLFIELDS && isObject(data)) {
|
|
924
927
|
this.queryModel = this.getTransformedData(extractDataAsArray(data));
|
|
925
928
|
}
|
|
926
929
|
else {
|
|
@@ -933,7 +936,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
933
936
|
}
|
|
934
937
|
this.updateDatavalueFromQueryModel();
|
|
935
938
|
// Show the label value on input.
|
|
936
|
-
this._lastQuery = this.query = isDefined(this.queryModel) && this.queryModel.length ?
|
|
939
|
+
this._lastQuery = this.query = isDefined(this.queryModel) && this.queryModel.length ? get(this.queryModel[0], 'label') : '';
|
|
937
940
|
this.showClosebtn = (this.query !== '');
|
|
938
941
|
}
|
|
939
942
|
// If we have last search results then open dropdown on focus
|
|
@@ -999,19 +1002,19 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
999
1002
|
this.typeahead.typeaheadOptionsLimit = this.formattedDataset.length;
|
|
1000
1003
|
}
|
|
1001
1004
|
// In mobile, trigger the search by default until the results have height upto page height. Other results can be fetched by scrolling
|
|
1002
|
-
if (this._isOpen && this.isMobileAutoComplete() && !
|
|
1005
|
+
if (this._isOpen && this.isMobileAutoComplete() && !isUndefined(this.dataProvider.isLastPage) && !this.dataProvider.isLastPage) {
|
|
1003
1006
|
this.triggerSearch();
|
|
1004
1007
|
}
|
|
1005
1008
|
const transformedData = this.getTransformedData(this.formattedDataset, nextItemIndex);
|
|
1006
1009
|
// result contains the datafield values.
|
|
1007
|
-
this.result =
|
|
1010
|
+
this.result = map(transformedData, 'value');
|
|
1008
1011
|
return transformedData;
|
|
1009
1012
|
}, (error) => {
|
|
1010
1013
|
this._loadingItems = false;
|
|
1011
1014
|
return [];
|
|
1012
1015
|
}).then(result => {
|
|
1013
1016
|
if (this.isScrolled) {
|
|
1014
|
-
(
|
|
1017
|
+
(debounce(() => {
|
|
1015
1018
|
this.setLastActiveMatchAsSelected();
|
|
1016
1019
|
}, 30))();
|
|
1017
1020
|
this.isScrolled = false;
|
|
@@ -1033,7 +1036,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
1033
1036
|
}
|
|
1034
1037
|
// this method returns the parent context i.e. Page context and not parent component's context.
|
|
1035
1038
|
getContext(context) {
|
|
1036
|
-
if (context &&
|
|
1039
|
+
if (context && get(context, 'widget')) {
|
|
1037
1040
|
return this.getContext(context.viewParent);
|
|
1038
1041
|
}
|
|
1039
1042
|
return context;
|
|
@@ -1129,7 +1132,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
1129
1132
|
}
|
|
1130
1133
|
// when dataoptions are provided and there is no displaylabel given then displaylabel is set as the relatedfield
|
|
1131
1134
|
if (key === 'displaylabel' && this.dataoptions && this.binddisplaylabel === null) {
|
|
1132
|
-
this.query =
|
|
1135
|
+
this.query = get(this._modelByValue, nv) || this._modelByValue;
|
|
1133
1136
|
}
|
|
1134
1137
|
// when search is disabled, do not load any more data or just clear the data that is already in process or loaded.
|
|
1135
1138
|
if (key === 'disabled') {
|
|
@@ -1138,7 +1141,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
1138
1141
|
}
|
|
1139
1142
|
else {
|
|
1140
1143
|
this.clearData = true;
|
|
1141
|
-
if (
|
|
1144
|
+
if (get(this.typeahead, '_typeahead.isShown')) {
|
|
1142
1145
|
this.typeahead.hide();
|
|
1143
1146
|
}
|
|
1144
1147
|
}
|
|
@@ -1195,7 +1198,7 @@ class SearchComponent extends DatasetAwareFormComponent {
|
|
|
1195
1198
|
type: ViewChildren,
|
|
1196
1199
|
args: ['liElements']
|
|
1197
1200
|
}] }); })();
|
|
1198
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchComponent, { className: "SearchComponent", filePath: "search.component.ts", lineNumber:
|
|
1201
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchComponent, { className: "SearchComponent", filePath: "search.component.ts", lineNumber: 61 }); })();
|
|
1199
1202
|
|
|
1200
1203
|
class ScrollableDirective {
|
|
1201
1204
|
constructor(inj, searchRef) {
|