@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('@wavemaker/variables'), require('@wm/core'), require('angular2-websocket/angular2-websocket'), require('@metrichor/jmespath'), require('@angular/core'), require('@angular/router'), require('@wm/oAuth'), require('@wm/security'), require('@angular/common'), require('@angular/common/http'), require('ngx-toastr'), require('@wm/http')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@wavemaker/variables', '@wm/core', 'angular2-websocket/angular2-websocket', '@metrichor/jmespath', '@angular/core', '@angular/router', '@wm/oAuth', '@wm/security', '@angular/common', '@angular/common/http', 'ngx-toastr', '@wm/http'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.variables = {}), global.wm_common_variables, global.wm.core, global.angularWebSocket, global.jmespath, global.ng.core, global.ng.router, global.wm.oAuth, global.wm.security, global.ng.common, global.ng.common.http, global.ngxToastr, global.wm.http));
|
|
5
|
-
})(this, (function (exports, variables, i1, angular2Websocket, jmespath, i0, i3, i4, i5, common, http, i1$1, http$1) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wavemaker/variables'), require('@wm/core'), require('lodash-es'), require('angular2-websocket/angular2-websocket'), require('@metrichor/jmespath'), require('@angular/core'), require('@angular/router'), require('@wm/oAuth'), require('@wm/security'), require('@angular/common'), require('@angular/common/http'), require('ngx-toastr'), require('@wm/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@wavemaker/variables', '@wm/core', 'lodash-es', 'angular2-websocket/angular2-websocket', '@metrichor/jmespath', '@angular/core', '@angular/router', '@wm/oAuth', '@wm/security', '@angular/common', '@angular/common/http', 'ngx-toastr', '@wm/http'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.variables = {}), global.wm_common_variables, global.wm.core, global._, global.angularWebSocket, global.jmespath, global.ng.core, global.ng.router, global.wm.oAuth, global.wm.security, global.ng.common, global.ng.common.http, global.ngxToastr, global.wm.http));
|
|
5
|
+
})(this, (function (exports, variables, i1, lodashEs, angular2Websocket, jmespath, i0, i3, i4, i5, common, http, i1$1, http$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -365,16 +365,16 @@
|
|
|
365
365
|
exports.dialogService = void 0;
|
|
366
366
|
const DOT_EXPR_REX = /^\[("|')[\w\W]*(\1)\]$/, internalBoundNodeMap = new Map(), timers = new Map();
|
|
367
367
|
const _invoke = (variable, op) => {
|
|
368
|
-
let debouncedFn, cancelFn =
|
|
368
|
+
let debouncedFn, cancelFn = lodashEs.noop, retVal;
|
|
369
369
|
if (timers.has(variable)) {
|
|
370
370
|
cancelFn = timers.get(variable).cancel;
|
|
371
371
|
}
|
|
372
372
|
cancelFn();
|
|
373
|
-
debouncedFn =
|
|
373
|
+
debouncedFn = lodashEs.debounce(function () {
|
|
374
374
|
retVal = variable[op]();
|
|
375
375
|
// handle promises to avoid uncaught promise errors in console
|
|
376
376
|
if (retVal instanceof Promise) {
|
|
377
|
-
retVal.catch(
|
|
377
|
+
retVal.catch(lodashEs.noop);
|
|
378
378
|
}
|
|
379
379
|
}, 100);
|
|
380
380
|
timers.set(variable, debouncedFn);
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
case VARIABLE_CONSTANTS.CATEGORY.LIVE:
|
|
386
386
|
if (variable.operation === 'read') {
|
|
387
387
|
if (nodeName === 'dataBinding') {
|
|
388
|
-
|
|
388
|
+
lodashEs.forEach(nodeVal, function (val, key) {
|
|
389
389
|
variable.filterFields[key] = {
|
|
390
390
|
'value': val
|
|
391
391
|
};
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
400
|
/* if auto-update set for the variable with read operation only, get its data */
|
|
401
|
-
if (variable.autoUpdate && !
|
|
401
|
+
if (variable.autoUpdate && !lodashEs.isUndefined(nodeVal) && lodashEs.isFunction(variable.listRecords) && !noUpdate) {
|
|
402
402
|
_invoke(variable, 'listRecords');
|
|
403
403
|
}
|
|
404
404
|
}
|
|
@@ -410,25 +410,25 @@
|
|
|
410
410
|
variable.inputFields[nodeName] = nodeVal;
|
|
411
411
|
}
|
|
412
412
|
/* if auto-update set for the variable with read operation only, get its data */
|
|
413
|
-
if (variable.autoUpdate && !
|
|
413
|
+
if (variable.autoUpdate && !lodashEs.isUndefined(nodeVal) && lodashEs.isFunction(variable[variable.operation + 'Record']) && !noUpdate) {
|
|
414
414
|
_invoke(variable, variable.operation + 'Record');
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
break;
|
|
418
418
|
case VARIABLE_CONSTANTS.CATEGORY.CRUD:
|
|
419
|
-
if (variable.operationType === 'list' && variable.autoUpdate && !
|
|
419
|
+
if (variable.operationType === 'list' && variable.autoUpdate && !lodashEs.isUndefined(nodeVal) && lodashEs.isFunction(variable.invoke) && !noUpdate) {
|
|
420
420
|
_invoke(variable, 'invoke');
|
|
421
421
|
}
|
|
422
422
|
break;
|
|
423
423
|
case VARIABLE_CONSTANTS.CATEGORY.SERVICE:
|
|
424
424
|
case VARIABLE_CONSTANTS.CATEGORY.LOGIN:
|
|
425
|
-
if (variable.autoUpdate && !
|
|
425
|
+
if (variable.autoUpdate && !lodashEs.isUndefined(nodeVal) && lodashEs.isFunction(variable.invoke) && !noUpdate) {
|
|
426
426
|
_invoke(variable, 'invoke');
|
|
427
427
|
}
|
|
428
428
|
break;
|
|
429
429
|
case VARIABLE_CONSTANTS.CATEGORY.DEVICE:
|
|
430
430
|
variable[nodeName] = nodeVal;
|
|
431
|
-
if (variable.autoUpdate && !
|
|
431
|
+
if (variable.autoUpdate && !lodashEs.isUndefined(nodeVal) && lodashEs.isFunction(variable.invoke) && !noUpdate) {
|
|
432
432
|
_invoke(variable, 'invoke');
|
|
433
433
|
}
|
|
434
434
|
break;
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
errorVariable = callBackScope.Actions[VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION];
|
|
481
481
|
if (errorVariable) {
|
|
482
482
|
data = errorVariable.getMessage() || data;
|
|
483
|
-
data =
|
|
483
|
+
data = lodashEs.isString(data) ? data : 'An error has occured. Please check the app logs.';
|
|
484
484
|
errorVariable.invoke({ 'message': data }, undefined, undefined);
|
|
485
485
|
// $rootScope.$evalAsync(function () {
|
|
486
486
|
// $rootScope.$emit("invoke-service", VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION, {scope: callBackScope, message: response});
|
|
@@ -572,10 +572,10 @@
|
|
|
572
572
|
* @param params
|
|
573
573
|
*/
|
|
574
574
|
const setParamsFromURL = (queryParams, params) => {
|
|
575
|
-
queryParams =
|
|
576
|
-
|
|
577
|
-
param =
|
|
578
|
-
params[param[0]] = decodeURIComponent(
|
|
575
|
+
queryParams = lodashEs.split(queryParams, '&');
|
|
576
|
+
lodashEs.forEach(queryParams, function (param) {
|
|
577
|
+
param = lodashEs.split(param, '=');
|
|
578
|
+
params[param[0]] = decodeURIComponent(lodashEs.join(lodashEs.slice(param, 1), '='));
|
|
579
579
|
});
|
|
580
580
|
};
|
|
581
581
|
/**
|
|
@@ -603,7 +603,9 @@
|
|
|
603
603
|
requestParams.url = requestParams.url.slice(0, 1) + requestParams.url.slice(2);
|
|
604
604
|
}
|
|
605
605
|
let iFrameElement, formEl, paramElement, queryParams = '', data;
|
|
606
|
-
const IFRAME_NAME = 'fileDownloadIFrame', FORM_NAME = 'fileDownloadForm', CONTENT_TYPE = 'Content-Type', url = requestParams.url, encType =
|
|
606
|
+
const IFRAME_NAME = 'fileDownloadIFrame', FORM_NAME = 'fileDownloadForm', CONTENT_TYPE = 'Content-Type', url = requestParams.url, encType = lodashEs.get(requestParams.headers, CONTENT_TYPE), params = lodashEs.pickBy(requestParams.headers, function (val, key) {
|
|
607
|
+
return key !== CONTENT_TYPE;
|
|
608
|
+
});
|
|
607
609
|
/* Todo: shubham : define getService method
|
|
608
610
|
WS_CONSTANTS = getService('WS_CONSTANTS');*/
|
|
609
611
|
/* look for existing iframe. If exists, remove it first */
|
|
@@ -620,20 +622,20 @@
|
|
|
620
622
|
'target': iFrameElement.attr('name'),
|
|
621
623
|
'action': url,
|
|
622
624
|
'method': requestParams.method,
|
|
623
|
-
'enctype': !(
|
|
625
|
+
'enctype': !(lodashEs.isEmpty(requestParams.data) && lodashEs.isEmpty(queryParams)) ? encType : WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA
|
|
624
626
|
});
|
|
625
627
|
// For Non body methods only, set the input fields from query parameters
|
|
626
|
-
if (
|
|
628
|
+
if (lodashEs.includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, lodashEs.toUpper(requestParams.method))) {
|
|
627
629
|
setParamsFromURL(queryParams, params); // Set params for URL query params
|
|
628
630
|
}
|
|
629
|
-
if (!
|
|
631
|
+
if (!lodashEs.isEmpty(requestParams.data)) {
|
|
630
632
|
setParamsFromURL(requestParams.data, params); // Set params for request data
|
|
631
633
|
data = params;
|
|
632
634
|
}
|
|
633
635
|
else {
|
|
634
|
-
data =
|
|
636
|
+
data = lodashEs.isEmpty(dataBinding) ? params : dataBinding;
|
|
635
637
|
}
|
|
636
|
-
|
|
638
|
+
lodashEs.forEach(data, function (val, key) {
|
|
637
639
|
paramElement = $('<input type="hidden">');
|
|
638
640
|
paramElement.attr({
|
|
639
641
|
'name': key,
|
|
@@ -760,7 +762,7 @@
|
|
|
760
762
|
};
|
|
761
763
|
const setValueToNode = (target, obj, root, variable, value, noUpdate) => {
|
|
762
764
|
const targetNodeKey = getTargetNodeKey(target), targetObj = getTargetObj(obj, root, variable);
|
|
763
|
-
value = !
|
|
765
|
+
value = !lodashEs.isUndefined(value) ? value : obj.value;
|
|
764
766
|
/* sanity check, user can bind parent nodes to non-object values, so child node bindings may fail */
|
|
765
767
|
if (targetObj) {
|
|
766
768
|
targetObj[targetNodeKey] = value;
|
|
@@ -802,18 +804,18 @@
|
|
|
802
804
|
* @param variable
|
|
803
805
|
*/
|
|
804
806
|
const updateInternalNodes = (target, root, variable) => {
|
|
805
|
-
const boundInternalNodes =
|
|
807
|
+
const boundInternalNodes = lodashEs.keys(lodashEs.get(internalBoundNodeMap.get(variable), [variable.name, root])), targetNodeKey = getTargetNodeKey(target);
|
|
806
808
|
let internalNodes;
|
|
807
809
|
function findInternalNodeBound() {
|
|
808
|
-
return
|
|
810
|
+
return lodashEs.filter(boundInternalNodes, function (node) {
|
|
809
811
|
// the later condition in check (targetNodeKey === root || targetNodeKey === 'dataBinding') is specifically for live variable of insert/update types
|
|
810
|
-
return (node !== targetNodeKey &&
|
|
812
|
+
return (node !== targetNodeKey && lodashEs.includes(node, targetNodeKey)) || ((targetNodeKey === root || targetNodeKey === 'dataBinding') && node !== targetNodeKey);
|
|
811
813
|
});
|
|
812
814
|
}
|
|
813
815
|
internalNodes = findInternalNodeBound();
|
|
814
816
|
if ((internalNodes.length)) {
|
|
815
|
-
|
|
816
|
-
setValueToNode(node, { target: node }, root, variable,
|
|
817
|
+
lodashEs.forEach(internalNodes, function (node) {
|
|
818
|
+
setValueToNode(node, { target: node }, root, variable, lodashEs.get(internalBoundNodeMap.get(variable), [variable.name, root, node]));
|
|
817
819
|
});
|
|
818
820
|
}
|
|
819
821
|
};
|
|
@@ -827,14 +829,14 @@
|
|
|
827
829
|
*/
|
|
828
830
|
const processBindObject = (obj, scope, root, variable) => {
|
|
829
831
|
const target = obj.target, targetObj = getTargetObj(obj, root, variable), targetNodeKey = getTargetNodeKey(target);
|
|
830
|
-
const destroyFn = scope.registerDestroyListener ? scope.registerDestroyListener.bind(scope) :
|
|
832
|
+
const destroyFn = scope.registerDestroyListener ? scope.registerDestroyListener.bind(scope) : lodashEs.noop;
|
|
831
833
|
if (i1.stringStartsWith(obj.value, 'bind:')) {
|
|
832
834
|
const listener = (newVal, oldVal) => {
|
|
833
|
-
if ((newVal === oldVal &&
|
|
835
|
+
if ((newVal === oldVal && lodashEs.isUndefined(newVal)) || (lodashEs.isUndefined(newVal) && (!lodashEs.isUndefined(oldVal) || !lodashEs.isUndefined(targetObj[targetNodeKey])))) {
|
|
834
836
|
return;
|
|
835
837
|
}
|
|
836
838
|
// Skip cloning for blob column
|
|
837
|
-
if (!
|
|
839
|
+
if (!lodashEs.includes(['blob', 'file'], obj.type)) {
|
|
838
840
|
newVal = i1.getClonedObject(newVal);
|
|
839
841
|
}
|
|
840
842
|
setValueToNode(target, obj, root, variable, newVal); // cloning newVal to keep the source clean
|
|
@@ -843,22 +845,22 @@
|
|
|
843
845
|
if (!internalBoundNodeMap.has(variable)) {
|
|
844
846
|
internalBoundNodeMap.set(variable, {});
|
|
845
847
|
}
|
|
846
|
-
|
|
848
|
+
lodashEs.set(internalBoundNodeMap.get(variable), [variable.name, root, target], newVal);
|
|
847
849
|
/*update the internal nodes after internal node map is set*/
|
|
848
|
-
if (
|
|
850
|
+
if (lodashEs.isObject(newVal)) {
|
|
849
851
|
updateInternalNodes(target, root, variable);
|
|
850
852
|
}
|
|
851
853
|
}
|
|
852
854
|
};
|
|
853
855
|
destroyFn(i1.$watch(obj.value.replace('bind:', ''), scope, {}, listener, undefined, undefined, undefined, () => variable.isMuted));
|
|
854
856
|
}
|
|
855
|
-
else if (!
|
|
857
|
+
else if (!lodashEs.isUndefined(obj.value)) {
|
|
856
858
|
setValueToNode(target, obj, root, variable, obj.value, true);
|
|
857
859
|
if (root !== targetNodeKey) {
|
|
858
860
|
if (!internalBoundNodeMap.has(variable)) {
|
|
859
861
|
internalBoundNodeMap.set(variable, {});
|
|
860
862
|
}
|
|
861
|
-
|
|
863
|
+
lodashEs.set(internalBoundNodeMap.get(variable), [variable.name, root, target], obj.value);
|
|
862
864
|
}
|
|
863
865
|
}
|
|
864
866
|
};
|
|
@@ -878,7 +880,7 @@
|
|
|
878
880
|
const bindMap = variable[bindSource];
|
|
879
881
|
variable[bindSource] = {};
|
|
880
882
|
variable['_bind' + bindSource] = bindMap;
|
|
881
|
-
if (!bindMap || !
|
|
883
|
+
if (!bindMap || !lodashEs.isArray(bindMap)) {
|
|
882
884
|
return;
|
|
883
885
|
}
|
|
884
886
|
bindMap.forEach(function (node) {
|
|
@@ -916,7 +918,7 @@
|
|
|
916
918
|
}
|
|
917
919
|
exports.appManager.notify('device-file-download', { url: requestParams.url, name: fileName, extension: fileExtension, headers: requestParams.headers, successCb: success, errorCb: error });
|
|
918
920
|
}
|
|
919
|
-
else if (!
|
|
921
|
+
else if (!lodashEs.isEmpty(requestParams.headers) || isXsrfEnabled()) {
|
|
920
922
|
downloadThroughAnchor(requestParams, success, error);
|
|
921
923
|
}
|
|
922
924
|
else {
|
|
@@ -940,17 +942,19 @@
|
|
|
940
942
|
targetObj = targetObj || {};
|
|
941
943
|
let keys, lastKey, paramObj = {};
|
|
942
944
|
// content type check
|
|
943
|
-
if (
|
|
945
|
+
if (lodashEs.isObject(options)) {
|
|
946
|
+
// @ts-ignore
|
|
944
947
|
switch (options.type) {
|
|
945
948
|
case 'file':
|
|
949
|
+
// @ts-ignore
|
|
946
950
|
val = i1.getBlob(val, options.contentType);
|
|
947
951
|
break;
|
|
948
952
|
case 'number':
|
|
949
|
-
val =
|
|
953
|
+
val = lodashEs.isNumber(val) ? val : parseInt(val, 10);
|
|
950
954
|
break;
|
|
951
955
|
}
|
|
952
956
|
}
|
|
953
|
-
if (
|
|
957
|
+
if (lodashEs.isObject(key)) {
|
|
954
958
|
// check if the passed parameter is an object itself
|
|
955
959
|
paramObj = key;
|
|
956
960
|
}
|
|
@@ -966,7 +970,7 @@
|
|
|
966
970
|
else {
|
|
967
971
|
paramObj[key] = val;
|
|
968
972
|
}
|
|
969
|
-
|
|
973
|
+
lodashEs.forEach(paramObj, function (paramVal, paramKey) {
|
|
970
974
|
targetObj[paramKey] = paramVal;
|
|
971
975
|
});
|
|
972
976
|
return targetObj;
|
|
@@ -987,7 +991,7 @@
|
|
|
987
991
|
const getEvaluatedOrderBy = (varOrder, optionsOrder) => {
|
|
988
992
|
let optionFields, varOrderBy;
|
|
989
993
|
// If options order by is not defined, return variable order
|
|
990
|
-
if (!optionsOrder ||
|
|
994
|
+
if (!optionsOrder || lodashEs.isEmpty(optionsOrder)) {
|
|
991
995
|
return varOrder;
|
|
992
996
|
}
|
|
993
997
|
// If variable order by is not defined, return options order
|
|
@@ -995,17 +999,17 @@
|
|
|
995
999
|
return optionsOrder;
|
|
996
1000
|
}
|
|
997
1001
|
// If both are present, combine the options order and variable order, with options order as precedence
|
|
998
|
-
varOrder =
|
|
999
|
-
optionsOrder =
|
|
1000
|
-
optionFields =
|
|
1001
|
-
return
|
|
1002
|
+
varOrder = lodashEs.split(varOrder, ',');
|
|
1003
|
+
optionsOrder = lodashEs.split(optionsOrder, ',');
|
|
1004
|
+
optionFields = lodashEs.map(optionsOrder, function (order) {
|
|
1005
|
+
return lodashEs.split(lodashEs.trim(order), ' ')[0];
|
|
1002
1006
|
});
|
|
1003
1007
|
// If a field is present in both options and variable, remove the variable orderby
|
|
1004
|
-
|
|
1005
|
-
return
|
|
1008
|
+
lodashEs.remove(varOrder, function (orderBy) {
|
|
1009
|
+
return lodashEs.includes(optionFields, lodashEs.split(lodashEs.trim(orderBy), ' ')[0]);
|
|
1006
1010
|
});
|
|
1007
|
-
varOrderBy = varOrder.length ? ',' +
|
|
1008
|
-
return
|
|
1011
|
+
varOrderBy = varOrder.length ? ',' + lodashEs.join(varOrder, ',') : '';
|
|
1012
|
+
return lodashEs.join(optionsOrder, ',') + varOrderBy;
|
|
1009
1013
|
};
|
|
1010
1014
|
/**
|
|
1011
1015
|
* formatting the expression as required by backend which was enclosed by ${<expression>}.
|
|
@@ -1013,7 +1017,7 @@
|
|
|
1013
1017
|
* returns fieldDefs
|
|
1014
1018
|
*/
|
|
1015
1019
|
const formatExportExpression = fieldDefs => {
|
|
1016
|
-
|
|
1020
|
+
lodashEs.forEach(fieldDefs, function (fieldDef) {
|
|
1017
1021
|
if (fieldDef.expression) {
|
|
1018
1022
|
fieldDef.expression = '${' + fieldDef.expression + '}';
|
|
1019
1023
|
}
|
|
@@ -1022,12 +1026,12 @@
|
|
|
1022
1026
|
};
|
|
1023
1027
|
const debounceVariableCall = _invoke;
|
|
1024
1028
|
const getDateTimeFormatForType = (type) => {
|
|
1025
|
-
return i1.DEFAULT_FORMATS[
|
|
1029
|
+
return i1.DEFAULT_FORMATS[lodashEs.toUpper(type)];
|
|
1026
1030
|
};
|
|
1027
1031
|
// Format value for datetime types
|
|
1028
1032
|
const _formatDate = (dateValue, type) => {
|
|
1029
1033
|
let epoch;
|
|
1030
|
-
if (
|
|
1034
|
+
if (lodashEs.isDate(dateValue)) {
|
|
1031
1035
|
epoch = dateValue.getTime();
|
|
1032
1036
|
}
|
|
1033
1037
|
else {
|
|
@@ -1049,11 +1053,11 @@
|
|
|
1049
1053
|
};
|
|
1050
1054
|
// Function to convert values of date time types into default formats
|
|
1051
1055
|
const formatDate = (value, type) => {
|
|
1052
|
-
if (
|
|
1053
|
-
type =
|
|
1056
|
+
if (lodashEs.includes(type, '.')) {
|
|
1057
|
+
type = lodashEs.toLower(i1.extractType(type));
|
|
1054
1058
|
}
|
|
1055
|
-
if (
|
|
1056
|
-
return
|
|
1059
|
+
if (lodashEs.isArray(value)) {
|
|
1060
|
+
return lodashEs.map(value, function (val) {
|
|
1057
1061
|
return _formatDate(val, type);
|
|
1058
1062
|
});
|
|
1059
1063
|
}
|
|
@@ -1068,9 +1072,9 @@
|
|
|
1068
1072
|
const navigate = (variable, options) => {
|
|
1069
1073
|
variable.dataSet = (options && options.data) || variable.dataSet;
|
|
1070
1074
|
let viewName;
|
|
1071
|
-
const pageName = variable.dataBinding.pageName || variable.pageName, operation = variable.operation, urlParams =
|
|
1075
|
+
const pageName = variable.dataBinding.pageName || variable.pageName, operation = variable.operation, urlParams = lodashEs.clone(variable.dataSet), cacheable = lodashEs.isNil(options?.cacheable) ? variable.cacheable : options.cacheable;
|
|
1072
1076
|
options = options || {};
|
|
1073
|
-
if (!
|
|
1077
|
+
if (!lodashEs.isNil(cacheable) && (!lodashEs.isString(cacheable) || cacheable.trim() !== '')) {
|
|
1074
1078
|
urlParams['_cache_page'] = cacheable;
|
|
1075
1079
|
}
|
|
1076
1080
|
/* if operation is goToPage, navigate to the pageName */
|
|
@@ -1182,7 +1186,7 @@
|
|
|
1182
1186
|
notifyViaDialog(variable, options) {
|
|
1183
1187
|
const isPrefabType = i1.getWmProjectProperties().type === 'PREFAB';
|
|
1184
1188
|
const dialogPrefix = isPrefabType ? 'Prefab' : 'Common';
|
|
1185
|
-
const dialogId = dialogPrefix +
|
|
1189
|
+
const dialogId = dialogPrefix + lodashEs.capitalize(variable.operation) + 'Dialog';
|
|
1186
1190
|
const closeCallBackFn = () => initiateCallback('onOk', variable, options.data);
|
|
1187
1191
|
let dialogConfig = this.getDialogConfig(variable, options, dialogId, closeCallBackFn);
|
|
1188
1192
|
dialogConfig = isPrefabType ? dialogConfig : { notification: dialogConfig };
|
|
@@ -1203,7 +1207,7 @@
|
|
|
1203
1207
|
return variable.dataBinding.text;
|
|
1204
1208
|
}
|
|
1205
1209
|
setMessage(variable, text) {
|
|
1206
|
-
if (
|
|
1210
|
+
if (lodashEs.isString(text)) {
|
|
1207
1211
|
variable.dataBinding.text = text;
|
|
1208
1212
|
}
|
|
1209
1213
|
return variable.dataBinding.text;
|
|
@@ -1212,7 +1216,7 @@
|
|
|
1212
1216
|
return variable.dataBinding.okButtonText;
|
|
1213
1217
|
}
|
|
1214
1218
|
setOkButtonText(variable, text) {
|
|
1215
|
-
if (
|
|
1219
|
+
if (lodashEs.isString(text)) {
|
|
1216
1220
|
variable.dataBinding.okButtonText = text;
|
|
1217
1221
|
}
|
|
1218
1222
|
return variable.dataBinding.okButtonText;
|
|
@@ -1228,7 +1232,7 @@
|
|
|
1228
1232
|
return variable.dataBinding.class;
|
|
1229
1233
|
}
|
|
1230
1234
|
setToasterClass(variable, type) {
|
|
1231
|
-
if (
|
|
1235
|
+
if (lodashEs.isString(type)) {
|
|
1232
1236
|
variable.dataBinding.class = type;
|
|
1233
1237
|
}
|
|
1234
1238
|
return variable.dataBinding.class;
|
|
@@ -1237,7 +1241,7 @@
|
|
|
1237
1241
|
return variable.dataBinding.class;
|
|
1238
1242
|
}
|
|
1239
1243
|
setToasterPosition(variable, position) {
|
|
1240
|
-
if (
|
|
1244
|
+
if (lodashEs.isString(position)) {
|
|
1241
1245
|
variable.dataBinding.position = position;
|
|
1242
1246
|
}
|
|
1243
1247
|
return variable.dataBinding.position;
|
|
@@ -1246,7 +1250,7 @@
|
|
|
1246
1250
|
return variable.dataBinding.alerttype;
|
|
1247
1251
|
}
|
|
1248
1252
|
setAlertType(variable, alerttype) {
|
|
1249
|
-
if (
|
|
1253
|
+
if (lodashEs.isString(alerttype)) {
|
|
1250
1254
|
variable.dataBinding.alerttype = alerttype;
|
|
1251
1255
|
}
|
|
1252
1256
|
return variable.dataBinding.alerttype;
|
|
@@ -1255,7 +1259,7 @@
|
|
|
1255
1259
|
return variable.dataBinding.cancelButtonText;
|
|
1256
1260
|
}
|
|
1257
1261
|
setCancelButtonText(variable, text) {
|
|
1258
|
-
if (
|
|
1262
|
+
if (lodashEs.isString(text)) {
|
|
1259
1263
|
variable.dataBinding.cancelButtonText = text;
|
|
1260
1264
|
}
|
|
1261
1265
|
return variable.dataBinding.cancelButtonText;
|
|
@@ -1321,7 +1325,7 @@
|
|
|
1321
1325
|
let options = {};
|
|
1322
1326
|
options['xhrObj'] = xhrObj;
|
|
1323
1327
|
if (moreOptions) {
|
|
1324
|
-
|
|
1328
|
+
lodashEs.extend(options, moreOptions);
|
|
1325
1329
|
}
|
|
1326
1330
|
return options;
|
|
1327
1331
|
}
|
|
@@ -1334,13 +1338,13 @@
|
|
|
1334
1338
|
const LOGIN_PARAM_REMEMBER_ME_OLD = ['rememberme', 'remembermecheck'];
|
|
1335
1339
|
// for older projects
|
|
1336
1340
|
LOGIN_PARAM_REMEMBER_ME_OLD.forEach((old_key) => {
|
|
1337
|
-
if (
|
|
1341
|
+
if (lodashEs.isBoolean(params[old_key])) {
|
|
1338
1342
|
remembermeKey = old_key;
|
|
1339
1343
|
}
|
|
1340
1344
|
});
|
|
1341
1345
|
remembermeKey = remembermeKey || LOGIN_PARAM_REMEMBER_ME;
|
|
1342
1346
|
// check remember me
|
|
1343
|
-
params[remembermeKey] =
|
|
1347
|
+
params[remembermeKey] = lodashEs.isBoolean(params[remembermeKey]) ? params[remembermeKey] : false;
|
|
1344
1348
|
for (paramKey in params) {
|
|
1345
1349
|
if (params.hasOwnProperty(paramKey) &&
|
|
1346
1350
|
(params[paramKey] === '' || params[paramKey] === undefined)) {
|
|
@@ -1359,7 +1363,7 @@
|
|
|
1359
1363
|
'remembermecheck': 'j_rememberme',
|
|
1360
1364
|
'rememberme': 'j_rememberme'
|
|
1361
1365
|
};
|
|
1362
|
-
|
|
1366
|
+
lodashEs.each(params, function (value, key) {
|
|
1363
1367
|
if (paramMigrationMap[key]) {
|
|
1364
1368
|
loginParams[paramMigrationMap[key]] = value;
|
|
1365
1369
|
}
|
|
@@ -1396,7 +1400,7 @@
|
|
|
1396
1400
|
// Triggering 'onBeforeUpdate' and considering
|
|
1397
1401
|
let params = i1.getClonedObject(loginInfo);
|
|
1398
1402
|
const output = initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE, variable, params);
|
|
1399
|
-
if (
|
|
1403
|
+
if (lodashEs.isObject(output)) {
|
|
1400
1404
|
params = output;
|
|
1401
1405
|
}
|
|
1402
1406
|
else if (output === false) {
|
|
@@ -1406,7 +1410,7 @@
|
|
|
1406
1410
|
// migrate old params to new
|
|
1407
1411
|
params = this.migrateOldParams(params);
|
|
1408
1412
|
// get previously loggedInUser name (if any)
|
|
1409
|
-
const lastLoggedInUsername =
|
|
1413
|
+
const lastLoggedInUsername = lodashEs.get(exports.securityService.get(), 'userInfo.userName');
|
|
1410
1414
|
this.notifyInflight(variable, true);
|
|
1411
1415
|
variable.promise = exports.securityService.appLogin(params, (response) => {
|
|
1412
1416
|
// Closing login dialog after successful login
|
|
@@ -1419,19 +1423,19 @@
|
|
|
1419
1423
|
exports.appManager.reloadAppData().
|
|
1420
1424
|
then((config) => {
|
|
1421
1425
|
// EVENT: ON_RESULT
|
|
1422
|
-
initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable,
|
|
1426
|
+
initiateCallback(VARIABLE_CONSTANTS.EVENT.RESULT, variable, lodashEs.get(config, 'userInfo'));
|
|
1423
1427
|
// EVENT: ON_PREPARESETDATA
|
|
1424
|
-
newDataSet = initiateCallback(VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA, variable,
|
|
1428
|
+
newDataSet = initiateCallback(VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA, variable, lodashEs.get(config, 'userInfo'));
|
|
1425
1429
|
if (newDataSet) {
|
|
1426
1430
|
// setting newDataSet as the response to service variable onPrepareSetData
|
|
1427
|
-
|
|
1431
|
+
lodashEs.set(config, 'userInfo', newDataSet);
|
|
1428
1432
|
}
|
|
1429
1433
|
// hide the spinner after all the n/w calls are completed
|
|
1430
1434
|
this.notifyInflight(variable, false, response);
|
|
1431
1435
|
i1.triggerFn(success);
|
|
1432
1436
|
setTimeout(() => {
|
|
1433
1437
|
// EVENT: ON_SUCCESS
|
|
1434
|
-
initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable,
|
|
1438
|
+
initiateCallback(VARIABLE_CONSTANTS.EVENT.SUCCESS, variable, lodashEs.get(config, 'userInfo'));
|
|
1435
1439
|
/* handle navigation if defaultSuccessHandler on variable is true */
|
|
1436
1440
|
if (variable.useDefaultSuccessHandler) {
|
|
1437
1441
|
const isSameUserReloggedIn = lastLoggedInUsername === params['j_username'];
|
|
@@ -1451,7 +1455,7 @@
|
|
|
1451
1455
|
// first time login
|
|
1452
1456
|
if (!lastLoggedInUsername) {
|
|
1453
1457
|
// if redirect page found, navigate to it.
|
|
1454
|
-
if (!
|
|
1458
|
+
if (!lodashEs.isEmpty(redirectPage)) {
|
|
1455
1459
|
exports.routerService.navigate([`/${redirectPage}`], { queryParams: queryParamsObj });
|
|
1456
1460
|
}
|
|
1457
1461
|
else if (!noRedirect) {
|
|
@@ -1462,7 +1466,7 @@
|
|
|
1462
1466
|
else {
|
|
1463
1467
|
// login after a session timeout
|
|
1464
1468
|
// if redirect page found and same user logs in again, just navigate to redirect page
|
|
1465
|
-
if (!
|
|
1469
|
+
if (!lodashEs.isEmpty(redirectPage)) {
|
|
1466
1470
|
// same user logs in again, just redirect to the redirectPage
|
|
1467
1471
|
if (lastLoggedInUsername === params['j_username']) {
|
|
1468
1472
|
exports.routerService.navigate([`/${redirectPage}`], { queryParams: queryParamsObj });
|
|
@@ -1473,7 +1477,7 @@
|
|
|
1473
1477
|
}
|
|
1474
1478
|
}
|
|
1475
1479
|
else {
|
|
1476
|
-
const securityConfig = exports.securityService.get(), sessionTimeoutLoginMode =
|
|
1480
|
+
const securityConfig = exports.securityService.get(), sessionTimeoutLoginMode = lodashEs.get(securityConfig, 'loginConfig.sessionTimeout.type') || 'PAGE';
|
|
1477
1481
|
// if in dialog mode and a new user logs in OR login happening through page, reload the app
|
|
1478
1482
|
if (!isSameUserReloggedIn || sessionTimeoutLoginMode !== 'DIALOG') {
|
|
1479
1483
|
this.redirectToAppBasePath();
|
|
@@ -1482,7 +1486,7 @@
|
|
|
1482
1486
|
}
|
|
1483
1487
|
}
|
|
1484
1488
|
// EVENT: ON_CAN_UPDATE
|
|
1485
|
-
initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable,
|
|
1489
|
+
initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, lodashEs.get(config, 'userInfo'));
|
|
1486
1490
|
});
|
|
1487
1491
|
});
|
|
1488
1492
|
}, (e) => {
|
|
@@ -1707,7 +1711,7 @@
|
|
|
1707
1711
|
*/
|
|
1708
1712
|
static setPaginationItems(item, response, res, key, resHeaders) {
|
|
1709
1713
|
// if the item has body, resolve the expression against the response
|
|
1710
|
-
if (
|
|
1714
|
+
if (lodashEs.startsWith(item, '$body')) {
|
|
1711
1715
|
const bodyKey = item.replace('$body.', '');
|
|
1712
1716
|
try {
|
|
1713
1717
|
res[key] = jmespath.jmespath.search(response, bodyKey);
|
|
@@ -1716,7 +1720,7 @@
|
|
|
1716
1720
|
console.warn(`${item} expression needs to be corrected as per JMES guidelines`);
|
|
1717
1721
|
}
|
|
1718
1722
|
}
|
|
1719
|
-
else if (
|
|
1723
|
+
else if (lodashEs.startsWith(item, '$header')) { // if the item has header, resolve the expression against the response headers
|
|
1720
1724
|
const headerKey = item.replace('$header.', '');
|
|
1721
1725
|
const headers = Object.fromEntries(resHeaders.headers);
|
|
1722
1726
|
const headerParams = headerKey.split('.');
|
|
@@ -1743,7 +1747,7 @@
|
|
|
1743
1747
|
const headerResp = JSON.parse(headerVal);
|
|
1744
1748
|
const specialChar = /[!@#$%^&*()+\=\[\]{};':"\\|,<>\/?]+/;
|
|
1745
1749
|
if (specialChar.test(keyName)) {
|
|
1746
|
-
// If key name has expression (ex: comparission expression)
|
|
1750
|
+
// If key name has expression (ex: comparission expression)
|
|
1747
1751
|
// add root key name to keyName for JMES to resolve the expression
|
|
1748
1752
|
keyName = 'headerResp.' + keyName;
|
|
1749
1753
|
}
|
|
@@ -1794,9 +1798,11 @@
|
|
|
1794
1798
|
inputParam = 'page';
|
|
1795
1799
|
}
|
|
1796
1800
|
const paramName = paginationInfo.input[inputParam].split('.')[0];
|
|
1797
|
-
const paramObj =
|
|
1801
|
+
const paramObj = lodashEs.find(operationInfo.parameters, function (obj) {
|
|
1802
|
+
return obj.name === paramName;
|
|
1803
|
+
});
|
|
1798
1804
|
// check if the variable has query params and they are not empty
|
|
1799
|
-
if (!
|
|
1805
|
+
if (!lodashEs.isEmpty(variable.dataBinding) && paramObj && paramObj.parameterType === 'query') {
|
|
1800
1806
|
/**
|
|
1801
1807
|
* For pagination type other than offset, assign page which is recieved from options
|
|
1802
1808
|
* For offset type, calculate page from size and options[page]
|
|
@@ -1842,29 +1848,31 @@
|
|
|
1842
1848
|
inputParam = 'page';
|
|
1843
1849
|
}
|
|
1844
1850
|
const paramName = paginationInfo.input[inputParam].split('.')[0];
|
|
1845
|
-
// check if paramName is present in parameters of operation info
|
|
1846
|
-
const paramObj =
|
|
1847
|
-
|
|
1851
|
+
// check if paramName is present in parameters of operation info
|
|
1852
|
+
const paramObj = lodashEs.find(operationInfo.parameters, function (obj) {
|
|
1853
|
+
return obj.name === paramName;
|
|
1854
|
+
});
|
|
1855
|
+
// set page/offset and size from pagination if matched parameter's type is header
|
|
1848
1856
|
if (paramObj?.parameterType === 'header') {
|
|
1849
|
-
|
|
1850
|
-
|
|
1857
|
+
lodashEs.set(reqObj, paginationInfo.input[inputParam], variable.pagination['page']);
|
|
1858
|
+
lodashEs.set(reqObj, paginationInfo.input.size, variable.pagination['size']);
|
|
1851
1859
|
headers[paramName] = JSON.stringify(reqObj[paramName]);
|
|
1852
1860
|
resObj['headers'] = headers;
|
|
1853
1861
|
}
|
|
1854
1862
|
else if (paramObj?.parameterType === 'body') {
|
|
1855
|
-
// set page/offset and size from pagination if matched parameter's type is body
|
|
1863
|
+
// set page/offset and size from pagination if matched parameter's type is body
|
|
1856
1864
|
// assign bodyVal to updated pagination info object
|
|
1857
1865
|
const bodyVal = JSON.parse(paramObj.sampleValue);
|
|
1858
1866
|
const bodyParam = paginationInfo.input[inputParam].split('.')[1];
|
|
1859
1867
|
if (bodyVal && bodyVal[bodyParam]) {
|
|
1860
1868
|
const inputBodyParam = paginationInfo.input[inputParam].split('.').splice(1).join('.');
|
|
1861
1869
|
if (inputParam !== 'offset') {
|
|
1862
|
-
|
|
1870
|
+
lodashEs.set(reqObj, inputBodyParam, variable.pagination['page']);
|
|
1863
1871
|
}
|
|
1864
1872
|
else {
|
|
1865
|
-
|
|
1873
|
+
lodashEs.set(reqObj, inputBodyParam, this.getOffsetInfo(variable, options));
|
|
1866
1874
|
}
|
|
1867
|
-
|
|
1875
|
+
lodashEs.set(reqObj, paginationInfo.input.size.split('.').splice(1).join('.'), variable.pagination['size']);
|
|
1868
1876
|
bodyVal[bodyParam] = reqObj[bodyParam];
|
|
1869
1877
|
requestBody = JSON.stringify(bodyVal);
|
|
1870
1878
|
resObj['requestBody'] = requestBody;
|
|
@@ -1932,8 +1940,10 @@
|
|
|
1932
1940
|
static setParameterVal(paramName, res, operationInfo, variable) {
|
|
1933
1941
|
const paginationInfo = this.getPaginationInfo(operationInfo, variable);
|
|
1934
1942
|
const param = paginationInfo.input[paramName].split('.')[0];
|
|
1935
|
-
const sizeObj =
|
|
1936
|
-
|
|
1943
|
+
const sizeObj = lodashEs.find(operationInfo.parameters, function (obj) {
|
|
1944
|
+
return obj.name === param;
|
|
1945
|
+
});
|
|
1946
|
+
res[paramName] = lodashEs.result(sizeObj, 'sampleValue');
|
|
1937
1947
|
}
|
|
1938
1948
|
/**
|
|
1939
1949
|
* Creates res object from the response recieved from the api triggered
|
|
@@ -1948,7 +1958,7 @@
|
|
|
1948
1958
|
static generatePaginationRes(operationInfo, paginationInfo, response, resHeaders, options, variable) {
|
|
1949
1959
|
let res = {};
|
|
1950
1960
|
const resOutput = paginationInfo.output;
|
|
1951
|
-
// If pagination type is not cursor, create the following metadata
|
|
1961
|
+
// If pagination type is not cursor, create the following metadata
|
|
1952
1962
|
if (!resOutput?.next) {
|
|
1953
1963
|
/**
|
|
1954
1964
|
* If size is present in the pagination's output metadata deduce size from api's response
|
|
@@ -1973,12 +1983,12 @@
|
|
|
1973
1983
|
/**
|
|
1974
1984
|
* If totalElements has $minValue in it, set totalElements as $minValue
|
|
1975
1985
|
* If the rendered elements are greater than $minValue, set totalElements as Number of elements rendered + 1
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1986
|
+
|
|
1987
|
+
* If totalElements is present in the pagination's output metadata deduce totalElements from api's response
|
|
1988
|
+
|
|
1989
|
+
* If Pagination type is offset, deduce totalElements from size and options[page] else deduce from size and res[page]
|
|
1980
1990
|
*/
|
|
1981
|
-
if (
|
|
1991
|
+
if (lodashEs.startsWith(resOutput?.totalElements, '$minValue')) {
|
|
1982
1992
|
const totalEl = resOutput.totalElements.replace('$minValue=', '');
|
|
1983
1993
|
const pageParam = res['page'] ? res['page'] : options['page'];
|
|
1984
1994
|
const elRendered = res['size'] * pageParam;
|
|
@@ -2027,7 +2037,7 @@
|
|
|
2027
2037
|
* @returns {any}
|
|
2028
2038
|
*/
|
|
2029
2039
|
const isBodyTypeQueryOrProcedure = (variable) => {
|
|
2030
|
-
return (
|
|
2040
|
+
return (lodashEs.includes(['QueryExecution', 'ProcedureExecution'], variable.controller)) && (lodashEs.includes(['put', 'post'], variable.operationType));
|
|
2031
2041
|
};
|
|
2032
2042
|
/**
|
|
2033
2043
|
* returns true if the variable is a Query service variable
|
|
@@ -2045,17 +2055,17 @@
|
|
|
2045
2055
|
* @param paramValue - Value which is to be appended to formdata
|
|
2046
2056
|
*/
|
|
2047
2057
|
const getFormData = (formData, param, paramValue) => {
|
|
2048
|
-
const paramType =
|
|
2058
|
+
const paramType = lodashEs.toLower(i1.extractType(lodashEs.get(param, 'items.type') || param.type)), paramContentType = CONSTANTS.isStudioMode ? param['x-WM-CONTENT_TYPE'] : param.contentType;
|
|
2049
2059
|
if (isFileUploadSupported()) {
|
|
2050
2060
|
if ((paramType !== 'file') && (paramContentType === 'string' || !paramContentType)) {
|
|
2051
|
-
if (
|
|
2061
|
+
if (lodashEs.isObject(paramValue)) {
|
|
2052
2062
|
paramValue = JSON.stringify(paramValue);
|
|
2053
2063
|
}
|
|
2054
2064
|
formData.append(param.name, paramValue);
|
|
2055
2065
|
}
|
|
2056
2066
|
else {
|
|
2057
|
-
if (
|
|
2058
|
-
|
|
2067
|
+
if (lodashEs.isArray(paramValue) && paramType === 'file') {
|
|
2068
|
+
lodashEs.forEach(paramValue, function (fileObject) {
|
|
2059
2069
|
formData.append(param.name, (fileObject && fileObject.content) || i1.getBlob(fileObject), fileObject.name);
|
|
2060
2070
|
});
|
|
2061
2071
|
}
|
|
@@ -2075,13 +2085,13 @@
|
|
|
2075
2085
|
const processRequestBody = (inputData, params) => {
|
|
2076
2086
|
const requestBody = {}, missingParams = [];
|
|
2077
2087
|
let paramValue;
|
|
2078
|
-
|
|
2079
|
-
paramValue =
|
|
2080
|
-
if (!
|
|
2088
|
+
lodashEs.forEach(params, function (param) {
|
|
2089
|
+
paramValue = lodashEs.get(inputData, param.name);
|
|
2090
|
+
if (!lodashEs.isUndefined(paramValue) && paramValue !== '' && paramValue !== null && !param.readOnly) {
|
|
2081
2091
|
paramValue = i1.isDateTimeType(param.type) ? formatDate(paramValue, param.type) : paramValue;
|
|
2082
2092
|
// Construct ',' separated string if param is not array type but value is an array
|
|
2083
|
-
if (
|
|
2084
|
-
paramValue =
|
|
2093
|
+
if (lodashEs.isArray(paramValue) && lodashEs.toLower(i1.extractType(param.type)) === 'string') {
|
|
2094
|
+
paramValue = lodashEs.join(paramValue, ',');
|
|
2085
2095
|
}
|
|
2086
2096
|
requestBody[param.name] = paramValue;
|
|
2087
2097
|
}
|
|
@@ -2104,8 +2114,8 @@
|
|
|
2104
2114
|
*/
|
|
2105
2115
|
const cloakHeadersForProxy = (headers) => {
|
|
2106
2116
|
const _headers = {}, UNCLOAKED_HEADERS = VARIABLE_CONSTANTS.REST_SERVICE.UNCLOAKED_HEADERS, CLOAK_PREFIX = VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;
|
|
2107
|
-
|
|
2108
|
-
if (
|
|
2117
|
+
lodashEs.forEach(headers, function (val, key) {
|
|
2118
|
+
if (lodashEs.includes(UNCLOAKED_HEADERS, key.toUpperCase())) {
|
|
2109
2119
|
_headers[key] = val;
|
|
2110
2120
|
}
|
|
2111
2121
|
else {
|
|
@@ -2134,7 +2144,7 @@
|
|
|
2134
2144
|
}
|
|
2135
2145
|
};
|
|
2136
2146
|
}
|
|
2137
|
-
else if (
|
|
2147
|
+
else if (lodashEs.isEmpty(operationInfo)) {
|
|
2138
2148
|
return {
|
|
2139
2149
|
'error': {
|
|
2140
2150
|
'type': VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.METADATA_MISSING,
|
|
@@ -2161,7 +2171,7 @@
|
|
|
2161
2171
|
formData = new FormData();
|
|
2162
2172
|
return formData;
|
|
2163
2173
|
}
|
|
2164
|
-
securityDefnObj =
|
|
2174
|
+
securityDefnObj = lodashEs.get(operationInfo.securityDefinitions, '0');
|
|
2165
2175
|
if (securityDefnObj) {
|
|
2166
2176
|
switch (securityDefnObj.type) {
|
|
2167
2177
|
case VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.OAUTH2:
|
|
@@ -2214,18 +2224,18 @@
|
|
|
2214
2224
|
withCredentials = operationInfo.proxySettings.withCredentials;
|
|
2215
2225
|
url = isProxyCall ? relativePath : directPath;
|
|
2216
2226
|
/* loop through all the parameters */
|
|
2217
|
-
|
|
2227
|
+
lodashEs.forEach(operationInfo.parameters, function (param) {
|
|
2218
2228
|
// Set params based on current workspace
|
|
2219
2229
|
function setParamsOfChildNode() {
|
|
2220
2230
|
if (inputFields) {
|
|
2221
2231
|
// specific case for body type query/procedure variable with query params
|
|
2222
|
-
if (inputFields[param.name] &&
|
|
2232
|
+
if (inputFields[param.name] && lodashEs.isObject(inputFields[param.name])) {
|
|
2223
2233
|
paramValueInfo = inputFields[param.name];
|
|
2224
2234
|
}
|
|
2225
2235
|
else {
|
|
2226
2236
|
paramValueInfo = inputFields;
|
|
2227
2237
|
}
|
|
2228
|
-
params =
|
|
2238
|
+
params = lodashEs.get(operationInfo, ['definitions', param.type]);
|
|
2229
2239
|
}
|
|
2230
2240
|
else {
|
|
2231
2241
|
// For Api Designer
|
|
@@ -2240,13 +2250,13 @@
|
|
|
2240
2250
|
paramValue = formatDate(paramValue, param.type);
|
|
2241
2251
|
}
|
|
2242
2252
|
// Construct ',' separated string if param is not array type but value is an array
|
|
2243
|
-
if (
|
|
2244
|
-
paramValue =
|
|
2253
|
+
if (lodashEs.isArray(paramValue) && lodashEs.toLower(i1.extractType(param.type)) === 'string' && variable.serviceType === VARIABLE_CONSTANTS.SERVICE_TYPE.DATA) {
|
|
2254
|
+
paramValue = lodashEs.join(paramValue, ',');
|
|
2245
2255
|
}
|
|
2246
2256
|
switch (param.parameterType.toUpperCase()) {
|
|
2247
2257
|
case 'QUERY':
|
|
2248
2258
|
// Ignore null valued query params for queryService variable
|
|
2249
|
-
if (
|
|
2259
|
+
if (lodashEs.isNull(paramValue) && isQueryServiceVar(variable.controller, variable.serviceType)) {
|
|
2250
2260
|
break;
|
|
2251
2261
|
}
|
|
2252
2262
|
if (!queryParams) {
|
|
@@ -2270,7 +2280,7 @@
|
|
|
2270
2280
|
setParamsOfChildNode();
|
|
2271
2281
|
bodyInfo = processRequestBody(paramValueInfo, params);
|
|
2272
2282
|
requestBody = bodyInfo.requestBody;
|
|
2273
|
-
requiredParamMissing =
|
|
2283
|
+
requiredParamMissing = lodashEs.concat(requiredParamMissing, bodyInfo.missingParams);
|
|
2274
2284
|
}
|
|
2275
2285
|
else {
|
|
2276
2286
|
requestBody = paramValue;
|
|
@@ -2282,7 +2292,7 @@
|
|
|
2282
2292
|
// Process query/procedure formData non-file params params
|
|
2283
2293
|
bodyInfo = processRequestBody(paramValueInfo, params);
|
|
2284
2294
|
requestBody = getFormData(getFormDataObj(), param, bodyInfo.requestBody);
|
|
2285
|
-
requiredParamMissing =
|
|
2295
|
+
requiredParamMissing = lodashEs.concat(requiredParamMissing, bodyInfo.missingParams);
|
|
2286
2296
|
}
|
|
2287
2297
|
else {
|
|
2288
2298
|
requestBody = getFormData(getFormDataObj(), param, paramValue);
|
|
@@ -2306,7 +2316,7 @@
|
|
|
2306
2316
|
};
|
|
2307
2317
|
}
|
|
2308
2318
|
// Setting appropriate content-Type for request accepting request body like POST, PUT, etc
|
|
2309
|
-
if (!
|
|
2319
|
+
if (!lodashEs.includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, lodashEs.toUpper(method))) {
|
|
2310
2320
|
/*Based on the formData browser will automatically set the content type to 'multipart/form-data' and webkit boundary*/
|
|
2311
2321
|
if (!(operationInfo.consumes && (operationInfo.consumes[0] === WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA))) {
|
|
2312
2322
|
headers['Content-Type'] = (operationInfo.consumes && operationInfo.consumes[0]) || 'application/json';
|
|
@@ -2314,8 +2324,8 @@
|
|
|
2314
2324
|
}
|
|
2315
2325
|
// if the consumes has application/x-www-form-urlencoded and
|
|
2316
2326
|
// if the http request of given method type can have body send the queryParams as Form Data
|
|
2317
|
-
if (
|
|
2318
|
-
&& !
|
|
2327
|
+
if (lodashEs.includes(operationInfo.consumes, WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED)
|
|
2328
|
+
&& !lodashEs.includes(WS_CONSTANTS.NON_BODY_HTTP_METHODS, (method || '').toUpperCase())) {
|
|
2319
2329
|
// remove the '?' at the start of the queryParams
|
|
2320
2330
|
if (queryParams) {
|
|
2321
2331
|
requestBody = (requestBody ? requestBody + '&' : '') + queryParams.substring(1);
|
|
@@ -2383,8 +2393,8 @@
|
|
|
2383
2393
|
* @params {params} params of the variable
|
|
2384
2394
|
*/
|
|
2385
2395
|
static excludePaginationParams(params) {
|
|
2386
|
-
return
|
|
2387
|
-
return
|
|
2396
|
+
return lodashEs.map(lodashEs.reject(params, (param) => {
|
|
2397
|
+
return lodashEs.includes(VARIABLE_CONSTANTS.PAGINATION_PARAMS, param.name);
|
|
2388
2398
|
}), function (param) {
|
|
2389
2399
|
return param.name;
|
|
2390
2400
|
});
|
|
@@ -2439,11 +2449,11 @@
|
|
|
2439
2449
|
*/
|
|
2440
2450
|
getURL(variable) {
|
|
2441
2451
|
const prefabName = variable.getPrefabName();
|
|
2442
|
-
const opInfo = prefabName ?
|
|
2452
|
+
const opInfo = prefabName ? lodashEs.get(exports.metadataService.getByOperationId(variable.operationId, prefabName), 'wmServiceOperationInfo') : lodashEs.get(exports.metadataService.getByOperationId(variable.operationId), 'wmServiceOperationInfo');
|
|
2443
2453
|
const inputFields = variable.dataBinding;
|
|
2444
2454
|
let config;
|
|
2445
2455
|
// add sample values to the params (url and path)
|
|
2446
|
-
|
|
2456
|
+
lodashEs.forEach(opInfo.parameters, function (param) {
|
|
2447
2457
|
param.sampleValue = inputFields[param.name];
|
|
2448
2458
|
});
|
|
2449
2459
|
// although, no header params will be present, keeping 'skipCloakHeaders' flag if support provided later
|
|
@@ -2469,7 +2479,7 @@
|
|
|
2469
2479
|
* @private
|
|
2470
2480
|
*/
|
|
2471
2481
|
_onSocketMessage(variable, evt) {
|
|
2472
|
-
let data =
|
|
2482
|
+
let data = lodashEs.get(evt, 'data'), value, dataLength, dataLimit, shouldAddToLast, insertIdx;
|
|
2473
2483
|
data = i1.getValidJSON(data) || i1.xmlToJson(data) || data;
|
|
2474
2484
|
// EVENT: ON_MESSAGE
|
|
2475
2485
|
value = initiateCallback(VARIABLE_CONSTANTS.EVENT.MESSAGE_RECEIVE, variable, data, evt);
|
|
@@ -2514,7 +2524,7 @@
|
|
|
2514
2524
|
*/
|
|
2515
2525
|
_onBeforeSocketClose(variable, evt) {
|
|
2516
2526
|
// EVENT: ON_BEFORE_CLOSE
|
|
2517
|
-
return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_CLOSE, variable,
|
|
2527
|
+
return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_CLOSE, variable, lodashEs.get(evt, 'data'), evt);
|
|
2518
2528
|
}
|
|
2519
2529
|
/**
|
|
2520
2530
|
* calls the ON_BEFORE_OPEN callback assigned
|
|
@@ -2526,7 +2536,7 @@
|
|
|
2526
2536
|
*/
|
|
2527
2537
|
_onBeforeSocketOpen(variable, evt) {
|
|
2528
2538
|
// EVENT: ON_BEFORE_OPEN
|
|
2529
|
-
return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_OPEN, variable,
|
|
2539
|
+
return initiateCallback(VARIABLE_CONSTANTS.EVENT.BEFORE_OPEN, variable, lodashEs.get(evt, 'data'), evt);
|
|
2530
2540
|
}
|
|
2531
2541
|
/**
|
|
2532
2542
|
* calls the ON_OPEN event on the variable
|
|
@@ -2538,7 +2548,7 @@
|
|
|
2538
2548
|
_onSocketOpen(variable, evt) {
|
|
2539
2549
|
variable._socketConnected = true;
|
|
2540
2550
|
// EVENT: ON_OPEN
|
|
2541
|
-
initiateCallback(VARIABLE_CONSTANTS.EVENT.OPEN, variable,
|
|
2551
|
+
initiateCallback(VARIABLE_CONSTANTS.EVENT.OPEN, variable, lodashEs.get(evt, 'data'), evt);
|
|
2542
2552
|
}
|
|
2543
2553
|
/**
|
|
2544
2554
|
* clears the socket variable against the variable in a scope
|
|
@@ -2558,7 +2568,7 @@
|
|
|
2558
2568
|
variable._socketConnected = false;
|
|
2559
2569
|
this.freeSocket(variable);
|
|
2560
2570
|
// EVENT: ON_CLOSE
|
|
2561
|
-
initiateCallback(VARIABLE_CONSTANTS.EVENT.CLOSE, variable,
|
|
2571
|
+
initiateCallback(VARIABLE_CONSTANTS.EVENT.CLOSE, variable, lodashEs.get(evt, 'data'), evt);
|
|
2562
2572
|
}
|
|
2563
2573
|
/**
|
|
2564
2574
|
* calls the ON_ERROR event on the variable
|
|
@@ -2571,7 +2581,7 @@
|
|
|
2571
2581
|
variable._socketConnected = false;
|
|
2572
2582
|
this.freeSocket(variable);
|
|
2573
2583
|
// EVENT: ON_ERROR
|
|
2574
|
-
initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable,
|
|
2584
|
+
initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, lodashEs.get(evt, 'data') || 'Error while connecting with ' + variable.service, evt);
|
|
2575
2585
|
}
|
|
2576
2586
|
/**
|
|
2577
2587
|
* returns an existing socket connection on the variable
|
|
@@ -2634,7 +2644,7 @@
|
|
|
2634
2644
|
send(variable, message) {
|
|
2635
2645
|
const socket = this.getSocket(variable);
|
|
2636
2646
|
let response;
|
|
2637
|
-
message = message ||
|
|
2647
|
+
message = message || lodashEs.get(variable, 'dataBinding.RequestBody');
|
|
2638
2648
|
response = this._onBeforeSend(variable, message);
|
|
2639
2649
|
if (response === false) {
|
|
2640
2650
|
return;
|
|
@@ -3041,7 +3051,7 @@
|
|
|
3041
3051
|
bulkCancel(collection) {
|
|
3042
3052
|
Object.keys(collection).forEach(name => {
|
|
3043
3053
|
const variable = collection[name];
|
|
3044
|
-
if (
|
|
3054
|
+
if (lodashEs.isFunction(variable.cancel)) {
|
|
3045
3055
|
variable.cancel();
|
|
3046
3056
|
}
|
|
3047
3057
|
});
|
|
@@ -3058,19 +3068,19 @@
|
|
|
3058
3068
|
}
|
|
3059
3069
|
processBindExp(d, scope, variable) {
|
|
3060
3070
|
const root = variables.getTarget(variable), targetNodeKey = variables.getTargetNodeKey(d.target);
|
|
3061
|
-
let v =
|
|
3071
|
+
let v = lodashEs.isArray(d.value) ? d.value[0] : d.value;
|
|
3062
3072
|
if (v) {
|
|
3063
3073
|
if (v.startsWith && v.startsWith('bind:')) {
|
|
3064
3074
|
const watchExpression = i1.$watch(v.replace('bind:', ''), scope, {}, variable.invokeOnParamChange.bind(variable, d), undefined, undefined, d, () => variable.isMuted);
|
|
3065
3075
|
v = scope.registerDestroyListener ? scope.registerDestroyListener(watchExpression) : watchExpression;
|
|
3066
3076
|
}
|
|
3067
|
-
else if (!
|
|
3077
|
+
else if (!lodashEs.isUndefined(d.value)) {
|
|
3068
3078
|
variables.setValueToNode(d.target, d, root, variable, d.value, true);
|
|
3069
3079
|
if (root !== targetNodeKey) {
|
|
3070
3080
|
if (!variables.internalBoundNodeMap.has(variable)) {
|
|
3071
3081
|
variables.internalBoundNodeMap.set(variable, {});
|
|
3072
3082
|
}
|
|
3073
|
-
|
|
3083
|
+
lodashEs.set(variables.internalBoundNodeMap.get(variable), [variable.name, root, d.target], d.value);
|
|
3074
3084
|
}
|
|
3075
3085
|
}
|
|
3076
3086
|
}
|
|
@@ -3084,7 +3094,7 @@
|
|
|
3084
3094
|
const bindMap = variable[bindSource];
|
|
3085
3095
|
variable[bindSource] = {};
|
|
3086
3096
|
variable['_bind' + bindSource] = bindMap;
|
|
3087
|
-
if (!bindMap || !
|
|
3097
|
+
if (!bindMap || !lodashEs.isArray(bindMap)) {
|
|
3088
3098
|
return;
|
|
3089
3099
|
}
|
|
3090
3100
|
bindMap.forEach((node) => {
|