@wavemaker-ai/app-ng-runtime 12.0.0-rc.335 → 12.0.1-rc.338
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-task/bundles/index.umd.js +15 -16
- package/build-task/fesm2022/index.mjs +15 -16
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/bundles/index.umd.js +9 -9
- package/components/advanced/carousel/fesm2022/index.mjs +9 -9
- package/components/advanced/carousel/fesm2022/index.mjs.map +1 -1
- package/components/advanced/carousel/types/index.d.ts +7 -7
- package/components/advanced/custom/bundles/index.umd.js +9 -10
- package/components/advanced/custom/fesm2022/index.mjs +9 -10
- package/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- package/components/advanced/custom/types/index.d.ts +3 -3
- package/components/advanced/login/bundles/index.umd.js +3 -3
- package/components/advanced/login/fesm2022/index.mjs +3 -3
- package/components/advanced/login/fesm2022/index.mjs.map +1 -1
- package/components/advanced/login/types/index.d.ts +1 -1
- package/components/advanced/marquee/bundles/index.umd.js +3 -3
- package/components/advanced/marquee/fesm2022/index.mjs +3 -3
- package/components/advanced/marquee/fesm2022/index.mjs.map +1 -1
- package/components/advanced/marquee/types/index.d.ts +1 -1
- package/components/base/bundles/index.umd.js +40 -46
- package/components/base/fesm2022/index.mjs +40 -46
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/types/index.d.ts +47 -46
- package/components/basic/anchor/bundles/index.umd.js +3 -3
- package/components/basic/anchor/fesm2022/index.mjs +3 -3
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/types/index.d.ts +3 -3
- package/components/basic/audio/bundles/index.umd.js +3 -3
- package/components/basic/audio/fesm2022/index.mjs +3 -3
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/types/index.d.ts +1 -1
- package/components/basic/html/bundles/index.umd.js +10 -11
- package/components/basic/html/fesm2022/index.mjs +10 -11
- package/components/basic/html/fesm2022/index.mjs.map +1 -1
- package/components/basic/html/types/index.d.ts +3 -3
- package/components/basic/icon/bundles/index.umd.js +3 -3
- package/components/basic/icon/fesm2022/index.mjs +3 -3
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/types/index.d.ts +1 -1
- package/components/basic/iframe/bundles/index.umd.js +5 -5
- package/components/basic/iframe/fesm2022/index.mjs +5 -5
- package/components/basic/iframe/fesm2022/index.mjs.map +1 -1
- package/components/basic/iframe/types/index.d.ts +3 -3
- package/components/basic/label/bundles/index.umd.js +10 -11
- package/components/basic/label/fesm2022/index.mjs +10 -11
- package/components/basic/label/fesm2022/index.mjs.map +1 -1
- package/components/basic/label/types/index.d.ts +1 -1
- package/components/basic/picture/bundles/index.umd.js +3 -3
- package/components/basic/picture/fesm2022/index.mjs +3 -3
- package/components/basic/picture/fesm2022/index.mjs.map +1 -1
- package/components/basic/picture/types/index.d.ts +2 -2
- package/components/basic/progress/progress-bar/bundles/index.umd.js +8 -10
- package/components/basic/progress/progress-bar/fesm2022/index.mjs +8 -10
- package/components/basic/progress/progress-bar/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-bar/types/index.d.ts +2 -2
- package/components/basic/progress/progress-circle/bundles/index.umd.js +3 -3
- package/components/basic/progress/progress-circle/fesm2022/index.mjs +3 -3
- package/components/basic/progress/progress-circle/fesm2022/index.mjs.map +1 -1
- package/components/basic/progress/progress-circle/types/index.d.ts +2 -2
- package/components/basic/rich-text-editor/bundles/index.umd.js +3 -3
- package/components/basic/rich-text-editor/fesm2022/index.mjs +3 -3
- package/components/basic/rich-text-editor/fesm2022/index.mjs.map +1 -1
- package/components/basic/rich-text-editor/types/index.d.ts +3 -3
- package/components/basic/search/bundles/index.umd.js +40 -42
- package/components/basic/search/fesm2022/index.mjs +40 -42
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/types/index.d.ts +13 -13
- package/components/basic/spinner/bundles/index.umd.js +3 -3
- package/components/basic/spinner/fesm2022/index.mjs +3 -3
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/types/index.d.ts +3 -3
- package/components/basic/tree/bundles/index.umd.js +9 -9
- package/components/basic/tree/fesm2022/index.mjs +9 -9
- package/components/basic/tree/fesm2022/index.mjs.map +1 -1
- package/components/basic/tree/types/index.d.ts +7 -7
- package/components/basic/video/bundles/index.umd.js +3 -3
- package/components/basic/video/fesm2022/index.mjs +3 -3
- package/components/basic/video/fesm2022/index.mjs.map +1 -1
- package/components/basic/video/types/index.d.ts +2 -2
- package/components/chart/bundles/index.umd.js +19 -22
- package/components/chart/fesm2022/index.mjs +20 -23
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/types/index.d.ts +9 -9
- package/components/containers/accordion/bundles/index.umd.js +10 -12
- package/components/containers/accordion/fesm2022/index.mjs +10 -12
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/types/index.d.ts +9 -9
- package/components/containers/layout-grid/bundles/index.umd.js +9 -9
- package/components/containers/layout-grid/fesm2022/index.mjs +9 -9
- package/components/containers/layout-grid/fesm2022/index.mjs.map +1 -1
- package/components/containers/layout-grid/types/index.d.ts +4 -4
- package/components/containers/linear-layout/bundles/index.umd.js +6 -6
- package/components/containers/linear-layout/fesm2022/index.mjs +6 -6
- package/components/containers/linear-layout/fesm2022/index.mjs.map +1 -1
- package/components/containers/linear-layout/types/index.d.ts +2 -2
- package/components/containers/panel/bundles/index.umd.js +3 -3
- package/components/containers/panel/fesm2022/index.mjs +3 -3
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/types/index.d.ts +3 -3
- package/components/containers/tabs/bundles/index.umd.js +9 -9
- package/components/containers/tabs/fesm2022/index.mjs +9 -9
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/tabs/types/index.d.ts +8 -8
- package/components/containers/tile/bundles/index.umd.js +3 -3
- package/components/containers/tile/fesm2022/index.mjs +3 -3
- package/components/containers/tile/fesm2022/index.mjs.map +1 -1
- package/components/containers/tile/types/index.d.ts +1 -1
- package/components/containers/wizard/bundles/index.umd.js +18 -18
- package/components/containers/wizard/fesm2022/index.mjs +18 -18
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +8 -8
- package/components/data/card/bundles/index.umd.js +12 -12
- package/components/data/card/fesm2022/index.mjs +12 -12
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/card/types/index.d.ts +6 -6
- package/components/data/form/bundles/index.umd.js +72 -75
- package/components/data/form/fesm2022/index.mjs +72 -77
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/types/index.d.ts +29 -29
- package/components/data/list/bundles/index.umd.js +22 -27
- package/components/data/list/fesm2022/index.mjs +22 -27
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +23 -23
- package/components/data/live-table/bundles/index.umd.js +3 -3
- package/components/data/live-table/fesm2022/index.mjs +3 -3
- package/components/data/live-table/fesm2022/index.mjs.map +1 -1
- package/components/data/live-table/types/index.d.ts +5 -5
- package/components/data/pagination/bundles/index.umd.js +27 -28
- package/components/data/pagination/fesm2022/index.mjs +27 -28
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +1 -1
- package/components/data/table/bundles/index.umd.js +131 -142
- package/components/data/table/fesm2022/index.mjs +131 -143
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/types/index.d.ts +20 -20
- package/components/dialogs/alert-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/alert-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/alert-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/alert-dialog/types/index.d.ts +1 -1
- package/components/dialogs/confirm-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/confirm-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/confirm-dialog/types/index.d.ts +1 -1
- package/components/dialogs/default/bundles/index.umd.js +12 -12
- package/components/dialogs/default/fesm2022/index.mjs +12 -12
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/default/types/index.d.ts +3 -3
- package/components/dialogs/design-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/design-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/design-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/design-dialog/types/index.d.ts +1 -1
- package/components/dialogs/iframe-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/iframe-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/iframe-dialog/types/index.d.ts +1 -1
- package/components/dialogs/login-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/login-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/login-dialog/types/index.d.ts +2 -2
- package/components/dialogs/partial-dialog/bundles/index.umd.js +3 -3
- package/components/dialogs/partial-dialog/fesm2022/index.mjs +3 -3
- package/components/dialogs/partial-dialog/fesm2022/index.mjs.map +1 -1
- package/components/dialogs/partial-dialog/types/index.d.ts +1 -1
- package/components/input/base-form/bundles/index.umd.js +4 -4
- package/components/input/base-form/fesm2022/index.mjs +4 -4
- package/components/input/base-form/fesm2022/index.mjs.map +1 -1
- package/components/input/base-form-custom/bundles/index.umd.js +3 -3
- package/components/input/base-form-custom/fesm2022/index.mjs +3 -3
- package/components/input/button/bundles/index.umd.js +3 -3
- package/components/input/button/fesm2022/index.mjs +3 -3
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button/types/index.d.ts +1 -1
- package/components/input/button-group/bundles/index.umd.js +3 -3
- package/components/input/button-group/fesm2022/index.mjs +3 -3
- package/components/input/button-group/fesm2022/index.mjs.map +1 -1
- package/components/input/button-group/types/index.d.ts +1 -1
- package/components/input/calendar/bundles/index.umd.js +4 -4
- package/components/input/calendar/fesm2022/index.mjs +4 -5
- package/components/input/calendar/fesm2022/index.mjs.map +1 -1
- package/components/input/calendar/types/index.d.ts +9 -9
- package/components/input/caption-position/bundles/index.umd.js +5 -5
- package/components/input/caption-position/fesm2022/index.mjs +5 -5
- package/components/input/caption-position/fesm2022/index.mjs.map +1 -1
- package/components/input/caption-position/types/index.d.ts +4 -4
- package/components/input/checkbox/bundles/index.umd.js +3 -3
- package/components/input/checkbox/fesm2022/index.mjs +3 -3
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/types/index.d.ts +2 -2
- package/components/input/checkboxset/bundles/index.umd.js +4 -4
- package/components/input/checkboxset/fesm2022/index.mjs +4 -4
- package/components/input/checkboxset/fesm2022/index.mjs.map +1 -1
- package/components/input/checkboxset/types/index.d.ts +2 -2
- package/components/input/chips/bundles/index.umd.js +5 -5
- package/components/input/chips/fesm2022/index.mjs +5 -5
- package/components/input/chips/fesm2022/index.mjs.map +1 -1
- package/components/input/chips/types/index.d.ts +14 -14
- package/components/input/color-picker/bundles/index.umd.js +3 -3
- package/components/input/color-picker/fesm2022/index.mjs +3 -3
- package/components/input/color-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/color-picker/types/index.d.ts +2 -2
- package/components/input/composite/bundles/index.umd.js +3 -3
- package/components/input/composite/fesm2022/index.mjs +3 -3
- package/components/input/composite/fesm2022/index.mjs.map +1 -1
- package/components/input/composite/types/index.d.ts +1 -1
- package/components/input/currency/bundles/index.umd.js +3 -3
- package/components/input/currency/fesm2022/index.mjs +3 -3
- package/components/input/currency/fesm2022/index.mjs.map +1 -1
- package/components/input/currency/types/index.d.ts +3 -3
- package/components/input/dataset-aware-form/bundles/index.umd.js +7 -7
- package/components/input/dataset-aware-form/fesm2022/index.mjs +7 -7
- package/components/input/dataset-aware-form/fesm2022/index.mjs.map +1 -1
- package/components/input/dataset-aware-form/types/index.d.ts +1 -1
- package/components/input/epoch/base-date-time/bundles/index.umd.js +10 -15
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +10 -15
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/base-date-time/types/index.d.ts +2 -2
- package/components/input/epoch/date/bundles/index.umd.js +5 -5
- package/components/input/epoch/date/fesm2022/index.mjs +5 -5
- package/components/input/epoch/date/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date/types/index.d.ts +4 -4
- package/components/input/epoch/date-time/bundles/index.umd.js +3 -3
- package/components/input/epoch/date-time/fesm2022/index.mjs +3 -3
- package/components/input/epoch/date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time/types/index.d.ts +8 -8
- package/components/input/epoch/date-time-picker/bundles/index.umd.js +8 -8
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs +8 -8
- package/components/input/epoch/date-time-picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/date-time-picker/types/index.d.ts +6 -7
- package/components/input/epoch/picker/bundles/index.umd.js +6 -6
- package/components/input/epoch/picker/fesm2022/index.mjs +6 -6
- package/components/input/epoch/picker/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/bundles/index.umd.js +4 -5
- package/components/input/epoch/time/fesm2022/index.mjs +5 -6
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/types/index.d.ts +4 -4
- package/components/input/file-upload/bundles/index.umd.js +4 -4
- package/components/input/file-upload/fesm2022/index.mjs +4 -4
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/types/index.d.ts +5 -5
- package/components/input/number/bundles/index.umd.js +3 -3
- package/components/input/number/fesm2022/index.mjs +3 -3
- package/components/input/number/fesm2022/index.mjs.map +1 -1
- package/components/input/number/types/index.d.ts +1 -1
- package/components/input/radioset/bundles/index.umd.js +4 -4
- package/components/input/radioset/fesm2022/index.mjs +4 -4
- package/components/input/radioset/fesm2022/index.mjs.map +1 -1
- package/components/input/radioset/types/index.d.ts +2 -2
- package/components/input/rating/bundles/index.umd.js +9 -11
- package/components/input/rating/fesm2022/index.mjs +9 -11
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/types/index.d.ts +2 -2
- package/components/input/select/bundles/index.umd.js +4 -4
- package/components/input/select/fesm2022/index.mjs +4 -4
- package/components/input/select/fesm2022/index.mjs.map +1 -1
- package/components/input/select/types/index.d.ts +1 -1
- package/components/input/slider/bundles/index.umd.js +3 -3
- package/components/input/slider/fesm2022/index.mjs +3 -3
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/types/index.d.ts +1 -1
- package/components/input/switch/bundles/index.umd.js +3 -3
- package/components/input/switch/fesm2022/index.mjs +3 -3
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/types/index.d.ts +1 -1
- package/components/input/text/bundles/index.umd.js +31 -35
- package/components/input/text/fesm2022/index.mjs +31 -35
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/types/index.d.ts +12 -12
- package/components/input/textarea/bundles/index.umd.js +3 -3
- package/components/input/textarea/fesm2022/index.mjs +3 -3
- package/components/input/textarea/fesm2022/index.mjs.map +1 -1
- package/components/input/textarea/types/index.d.ts +2 -2
- package/components/navigation/breadcrumb/bundles/index.umd.js +3 -3
- package/components/navigation/breadcrumb/fesm2022/index.mjs +3 -3
- package/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- package/components/navigation/breadcrumb/types/index.d.ts +4 -4
- package/components/navigation/menu/bundles/index.umd.js +25 -33
- package/components/navigation/menu/fesm2022/index.mjs +25 -33
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/types/index.d.ts +21 -21
- package/components/navigation/navbar/bundles/index.umd.js +3 -3
- package/components/navigation/navbar/fesm2022/index.mjs +3 -3
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/types/index.d.ts +1 -1
- package/components/navigation/popover/bundles/index.umd.js +4 -4
- package/components/navigation/popover/fesm2022/index.mjs +4 -4
- package/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- package/components/navigation/popover/types/index.d.ts +4 -4
- package/components/page/default/bundles/index.umd.js +23 -23
- package/components/page/default/fesm2022/index.mjs +23 -23
- package/components/page/default/fesm2022/index.mjs.map +1 -1
- package/components/page/default/types/index.d.ts +14 -14
- package/components/page/footer/bundles/index.umd.js +3 -3
- package/components/page/footer/fesm2022/index.mjs +3 -3
- package/components/page/footer/fesm2022/index.mjs.map +1 -1
- package/components/page/footer/types/index.d.ts +1 -1
- package/components/page/header/bundles/index.umd.js +3 -3
- package/components/page/header/fesm2022/index.mjs +3 -3
- package/components/page/header/fesm2022/index.mjs.map +1 -1
- package/components/page/header/types/index.d.ts +1 -1
- package/components/page/left-panel/bundles/index.umd.js +5 -5
- package/components/page/left-panel/fesm2022/index.mjs +5 -5
- package/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/left-panel/types/index.d.ts +3 -3
- package/components/page/right-panel/bundles/index.umd.js +3 -3
- package/components/page/right-panel/fesm2022/index.mjs +3 -3
- package/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- package/components/page/right-panel/types/index.d.ts +1 -1
- package/components/page/top-nav/bundles/index.umd.js +3 -3
- package/components/page/top-nav/fesm2022/index.mjs +3 -3
- package/components/page/top-nav/fesm2022/index.mjs.map +1 -1
- package/components/page/top-nav/types/index.d.ts +1 -1
- package/components/prefab/bundles/index.umd.js +7 -7
- package/components/prefab/fesm2022/index.mjs +7 -7
- package/components/prefab/fesm2022/index.mjs.map +1 -1
- package/components/prefab/types/index.d.ts +3 -3
- package/core/bundles/index.umd.js +84 -89
- package/core/fesm2022/index.mjs +84 -89
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +11 -11
- package/http/bundles/index.umd.js +6 -6
- package/http/fesm2022/index.mjs +6 -6
- package/http/fesm2022/index.mjs.map +1 -1
- package/http/types/index.d.ts +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/bundles/index.umd.js +17 -21
- package/oAuth/fesm2022/index.mjs +17 -21
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/oAuth/types/index.d.ts +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +253 -275
- package/runtime/base/fesm2022/index.mjs +253 -275
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +90 -96
- package/runtime/dynamic/bundles/index.umd.js +28 -28
- package/runtime/dynamic/fesm2022/index.mjs +28 -28
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/runtime/dynamic/types/index.d.ts +22 -22
- package/scripts/datatable/datatable.js +293 -271
- package/scripts/tree-keyboard-navigation/keyboard-navigation.js +68 -56
- package/security/bundles/index.umd.js +6 -6
- package/security/fesm2022/index.mjs +6 -6
- package/security/fesm2022/index.mjs.map +1 -1
- package/security/types/index.d.ts +5 -5
- package/transpiler/bundles/index.umd.js +3 -5
- package/transpiler/fesm2022/index.mjs +3 -5
- package/transpiler/fesm2022/index.mjs.map +1 -1
- package/variables/bundles/index.umd.js +69 -71
- package/variables/fesm2022/index.mjs +69 -72
- package/variables/fesm2022/index.mjs.map +1 -1
- package/variables/types/index.d.ts +9 -9
|
@@ -6,8 +6,8 @@ import { Subject, Observable } from 'rxjs';
|
|
|
6
6
|
|
|
7
7
|
declare class ListItemDirective extends StylableComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
8
8
|
app: App;
|
|
9
|
-
private renderer;
|
|
10
|
-
static initializeProps: void;
|
|
9
|
+
private readonly renderer;
|
|
10
|
+
static readonly initializeProps: void;
|
|
11
11
|
item: any;
|
|
12
12
|
context: any;
|
|
13
13
|
destroySub: Subject<any>;
|
|
@@ -15,16 +15,16 @@ declare class ListItemDirective extends StylableComponent implements OnInit, Aft
|
|
|
15
15
|
nativeElement: HTMLElement;
|
|
16
16
|
readonly listComponent: ListComponent;
|
|
17
17
|
private itemClass;
|
|
18
|
-
private _currentItemWidgets;
|
|
18
|
+
private readonly _currentItemWidgets;
|
|
19
19
|
viewContainerRef: ViewContainerRef;
|
|
20
20
|
/**
|
|
21
21
|
* To avoid re-rendering of widget, passing unique id as contextKey to createCustomInjector
|
|
22
22
|
*/
|
|
23
23
|
trackId: string;
|
|
24
|
-
private editClickHandler;
|
|
25
|
-
private deleteClickHandler;
|
|
26
|
-
private mouseEnterHandler;
|
|
27
|
-
private mouseLeaveHandler;
|
|
24
|
+
private readonly editClickHandler;
|
|
25
|
+
private readonly deleteClickHandler;
|
|
26
|
+
private readonly mouseEnterHandler;
|
|
27
|
+
private readonly mouseLeaveHandler;
|
|
28
28
|
isActive: boolean;
|
|
29
29
|
disableItem: boolean;
|
|
30
30
|
onFocus(): void;
|
|
@@ -35,7 +35,7 @@ declare class ListItemDirective extends StylableComponent implements OnInit, Aft
|
|
|
35
35
|
get $last(): any;
|
|
36
36
|
get currentItemWidgets(): {};
|
|
37
37
|
set wmListItem(val: any);
|
|
38
|
-
private _viewParent;
|
|
38
|
+
private readonly _viewParent;
|
|
39
39
|
constructor(inj: Injector, elRef: ElementRef, app: App, renderer: Renderer2, explicitContext: any);
|
|
40
40
|
/**
|
|
41
41
|
* Applies all the list item attributes and adds a watch on postion attribute
|
|
@@ -57,7 +57,7 @@ declare class ListItemDirective extends StylableComponent implements OnInit, Aft
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
declare class ListComponent extends StylableComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
60
|
-
static initializeProps: void;
|
|
60
|
+
static readonly initializeProps: void;
|
|
61
61
|
listTemplate: TemplateRef<ElementRef>;
|
|
62
62
|
listLeftActionTemplate: TemplateRef<ElementRef>;
|
|
63
63
|
listRightActionTemplate: TemplateRef<ElementRef>;
|
|
@@ -116,7 +116,7 @@ declare class ListComponent extends StylableComponent implements OnInit, AfterVi
|
|
|
116
116
|
updatedPageSize: any;
|
|
117
117
|
actualPageSize: any;
|
|
118
118
|
_isDependent: any;
|
|
119
|
-
private itemsPerRowClass;
|
|
119
|
+
private readonly itemsPerRowClass;
|
|
120
120
|
private firstSelectedItem;
|
|
121
121
|
private navigatorMaxResultWatch;
|
|
122
122
|
private navigatorResultWatch;
|
|
@@ -128,19 +128,19 @@ declare class ListComponent extends StylableComponent implements OnInit, AfterVi
|
|
|
128
128
|
private showNavigation;
|
|
129
129
|
private reorderProps;
|
|
130
130
|
private app;
|
|
131
|
-
private appDefaults;
|
|
132
|
-
private ngZone;
|
|
133
|
-
private statePersistence;
|
|
134
|
-
private paginationService;
|
|
135
|
-
private binddatasource;
|
|
136
|
-
private listClickHandler;
|
|
137
|
-
private addItemClickHandler;
|
|
138
|
-
private match;
|
|
139
|
-
private dateformat;
|
|
131
|
+
private readonly appDefaults;
|
|
132
|
+
private readonly ngZone;
|
|
133
|
+
private readonly statePersistence;
|
|
134
|
+
private readonly paginationService;
|
|
135
|
+
private readonly binddatasource;
|
|
136
|
+
private readonly listClickHandler;
|
|
137
|
+
private readonly addItemClickHandler;
|
|
138
|
+
private readonly match;
|
|
139
|
+
private readonly dateformat;
|
|
140
140
|
private groupedData;
|
|
141
141
|
private cdRef;
|
|
142
|
-
private promiseResolverFn;
|
|
143
|
-
private propsInitPromise;
|
|
142
|
+
private readonly promiseResolverFn;
|
|
143
|
+
private readonly propsInitPromise;
|
|
144
144
|
private $ulEle;
|
|
145
145
|
private _listAnimator;
|
|
146
146
|
private _listenerDestroyers;
|
|
@@ -156,8 +156,8 @@ declare class ListComponent extends StylableComponent implements OnInit, AfterVi
|
|
|
156
156
|
[k: string]: string;
|
|
157
157
|
};
|
|
158
158
|
hasAutolayout: boolean;
|
|
159
|
-
private touching;
|
|
160
|
-
private touched;
|
|
159
|
+
private readonly touching;
|
|
160
|
+
private readonly touched;
|
|
161
161
|
constructor(inj: Injector, cdRef: ChangeDetectorRef, datePipe: ToDatePipe, app: App, appDefaults: AppDefaults, ngZone: NgZone, binditemclass: string, binddisableitem: string, binddataset: string, binddatasource: string, mouseEnterCB: string, mouseLeaveCB: string, statePersistence: StatePersistence, paginationService: PaginationService, explicitContext: any);
|
|
162
162
|
get selecteditem(): any;
|
|
163
163
|
set selecteditem(items: any);
|
|
@@ -252,12 +252,12 @@
|
|
|
252
252
|
this.$queue = [];
|
|
253
253
|
super.ngOnDestroy();
|
|
254
254
|
}
|
|
255
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
256
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
255
|
+
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: LiveTableComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.AbstractDialogService }, { token: i1__namespace.App }, { token: 'formlayout', attribute: true }, { token: 'dialogid', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
256
|
+
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: LiveTableComponent, isStandalone: true, selector: "[wmLiveTable]", providers: [
|
|
257
257
|
base.provideAsWidgetRef(LiveTableComponent)
|
|
258
258
|
], queries: [{ propertyName: "table", first: true, predicate: table.TableComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>" }); }
|
|
259
259
|
}
|
|
260
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
260
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: LiveTableComponent, decorators: [{
|
|
261
261
|
type: i0.Component,
|
|
262
262
|
args: [{ standalone: true, selector: '[wmLiveTable]', providers: [
|
|
263
263
|
base.provideAsWidgetRef(LiveTableComponent)
|
|
@@ -234,12 +234,12 @@ class LiveTableComponent extends StylableComponent {
|
|
|
234
234
|
this.$queue = [];
|
|
235
235
|
super.ngOnDestroy();
|
|
236
236
|
}
|
|
237
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
238
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: LiveTableComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.AbstractDialogService }, { token: i1.App }, { token: 'formlayout', attribute: true }, { token: 'dialogid', attribute: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.21", type: LiveTableComponent, isStandalone: true, selector: "[wmLiveTable]", providers: [
|
|
239
239
|
provideAsWidgetRef(LiveTableComponent)
|
|
240
240
|
], queries: [{ propertyName: "table", first: true, predicate: TableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>" }); }
|
|
241
241
|
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: LiveTableComponent, decorators: [{
|
|
243
243
|
type: Component,
|
|
244
244
|
args: [{ standalone: true, selector: '[wmLiveTable]', providers: [
|
|
245
245
|
provideAsWidgetRef(LiveTableComponent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/data/live-table/src/live-table.props.ts","../../../../../projects/components/widgets/data/live-table/src/live-table.component.ts","../../../../../projects/components/widgets/data/live-table/src/live-table.component.html","../../../../../projects/components/widgets/data/live-table/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_STRING, register } from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-livetable',\n new Map(\n [\n ['class', PROP_STRING],\n ['formlayout', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ]\n )\n );\n};\n","import {\n AfterContentInit,\n Attribute,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n Inject,\n Injector,\n OnDestroy,\n Optional\n} from '@angular/core';\n\nimport {debounceTime} from 'rxjs/operators';\nimport {Subscription} from 'rxjs';\n\nimport {$appDigest, AbstractDialogService, App, getClonedObject, isDefined, triggerFn} from '@wm/core';\nimport {provideAsWidgetRef, StylableComponent, styler} from '@wm/components/base';\nimport {TableComponent} from '@wm/components/data/table';\n\nimport {registerProps} from './live-table.props';\n\ndeclare var $: any;\n\nconst DEFAULT_CLS = 'app-livegrid';\nconst WIDGET_CONFIG = {widgetType: 'wm-livetable', hostClass: DEFAULT_CLS};\n\n@Component({\n standalone: true,\n selector: '[wmLiveTable]',\n templateUrl: './live-table.component.html',\n providers: [\n provideAsWidgetRef(LiveTableComponent)\n ]\n})\nexport class LiveTableComponent extends StylableComponent implements AfterContentInit, OnDestroy {\n static initializeProps = registerProps();\n @ContentChild(TableComponent) table: TableComponent;\n\n form;\n isLayoutDialog: boolean;\n\n private dialogId;\n private $queue = [];\n private selectedItemChangeSubscription: Subscription;\n\n private tableOptions: any = {\n 'multiselect': false,\n 'setGridEditMode': ''\n };\n\n constructor(\n inj: Injector,\n elRef: ElementRef,\n cdr: ChangeDetectorRef,\n private dialogService: AbstractDialogService,\n private app: App,\n @Attribute('formlayout') layoutType: string,\n @Attribute('dialogid') dialogId: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n if (layoutType === 'dialog') {\n this.isLayoutDialog = true;\n this.dialogId = dialogId;\n }\n }\n\n ngAfterContentInit() {\n super.ngAfterContentInit();\n if (this.table) {\n this.table._liveTableParent = this;\n \n // Defer live-table configuration to ensure parent table datatable is initialized (Angular 20 timing)\n const configureLiveTable = () => {\n if (typeof this.table.datagridElement.datatable === 'function' && this.table.datagridElement.datatable('instance')) {\n this.table.datagridElement.datatable('option', this.tableOptions);\n\n this.selectedItemChangeSubscription = this.table.selectedItemChange$\n .pipe(debounceTime(250))\n .subscribe(this.onSelectedItemChange.bind(this));\n\n if (!this.isLayoutDialog && !this.form) {\n this.table.datagridElement.datatable('option', {\n 'beforeRowUpdate' : () => {\n this.showErrorMessage();\n },\n 'beforeRowDelete' : () => {\n this.showErrorMessage();\n },\n 'beforeRowInsert' : () => {\n this.showErrorMessage();\n }\n });\n }\n } else {\n // Parent table not initialized yet, retry\n setTimeout(configureLiveTable, 50);\n }\n };\n setTimeout(configureLiveTable, 0);\n }\n }\n\n openDialog() {\n this.dialogService.open(this.dialogId, this.viewParent);\n $appDigest();\n }\n\n closeDialog() {\n this.dialogService.close(this.dialogId, this.viewParent);\n }\n\n focusFirstInput() {\n const $firstInput = $(this.form.$element).find('input').first();\n $firstInput.focus();\n $firstInput.select();\n }\n\n onDialogOpen(action) {\n const attrs: Map<string, string> = this?.form?.formFields?.[0]?.$attrs ?? new Map();\n const hasDefault = [\"defaultvalue\", \"defaultvalue.bind\"].some(key => attrs.has(key));\n if (action == 'update'||!!hasDefault) {\n const firstFormField = $(\"form [wmformfield]\").first();\n if (firstFormField.find(\"div[widget='autocomplete']\").length != 1 && this?.form?.formFields?.[0]?.widgettype != 'autocomplete') { // prevent focusing first form field if widget is autocomplete\n this.focusFirstInput();\n }\n } else {\n this.focusFirstInput();\n }\n }\n\n setFormData(val) {\n if (!this.form.isDestroyed) {\n this.form.getWidget().formdata = val;\n }\n }\n\n private _addNewRow() {\n this.form.isSelected = true;\n this.setFormData('');\n\n this.form.new();\n\n if (this.isLayoutDialog) {\n this.onDialogOpen('add');\n }\n }\n\n addNewRow() {\n if (this.isLayoutDialog) {\n this.openDialog();\n this.$queue.push(this._addNewRow.bind(this));\n return;\n }\n\n this._addNewRow();\n }\n\n private _updateRow(row, eventName) {\n this.setFormData(row);\n this.form.isSelected = true;\n this.form.edit();\n\n if (this.isLayoutDialog) {\n this.form.isUpdateMode = (eventName === 'dblclick') ? this.form.updateMode : true;\n this.onDialogOpen('update');\n }\n }\n\n updateRow(row, eventName) {\n\n if (this.isLayoutDialog) {\n this.openDialog();\n this.$queue.push(this._updateRow.bind(this, row, eventName));\n return;\n }\n\n this._updateRow(row, eventName);\n }\n\n onSelectedItemChange(newValue) {\n let rowData;\n if (!this.form || !this.table) {\n return;\n }\n\n if (newValue && newValue.length > 0 && !this.form.isSelected) {\n this.form.isSelected = true;\n }\n\n /*Update the rowdata of only that grid form that is associated with the specific grid on which row selection is being performed...\n * Since both the grid & gridform are associated with the same \"parentgrid\", match the same*/\n if (newValue && newValue.length > 0) {\n if (this.table.multiselect) {\n rowData = newValue[0];\n } else {\n rowData = newValue[newValue.length - 1];\n }\n\n this.setFormData(getClonedObject(rowData));\n /*If the form is already in update mode, call the form update function*/\n if (this.form.isUpdateMode) {\n this.form.edit();\n }\n } else {\n this.form.isSelected = false;\n this.setFormData('');\n this.form.clearData();\n }\n }\n\n onCancel() {\n this.form.isUpdateMode = false;\n if (this.isLayoutDialog) {\n this.closeDialog();\n }\n }\n\n onResult(operation, response, newForm, updateMode) {\n this.form.isUpdateMode = isDefined(updateMode) ? updateMode : newForm ? true : false;\n switch (operation) {\n case 'insert':\n if (this.table.gridOptions.isNavTypeScrollOrOndemand()) {\n this.table.isNewRowInserted = true;\n }\n if (newForm) {\n /*if new form is to be shown after insert, skip the highlight of the row*/\n this.table.gridfirstrowselect = false;\n this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(), response, true);\n } else {\n /*The new row would always be inserted at the end of all existing records. Hence navigate to the last page and highlight the inserted row.*/\n this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(), response);\n }\n break;\n case 'update':\n /*The updated row would be found in the current page itself. Hence simply highlight the row in the current page.*/\n if (newForm) {\n this.table.gridfirstrowselect = false;\n this.table.initiateSelectItem('current', response, true);\n } else {\n this.table.initiateSelectItem('current', response);\n }\n break;\n case 'delete':\n this.table.onRecordDelete();\n break;\n }\n this.table.updateVariable();\n if (this.isLayoutDialog) {\n /*if new form is to be shown after update or insert, don't close the dialog*/\n if (newForm) {\n if (operation === 'insert') {\n this.form.new();\n } else if (operation === 'update') {\n this.form.edit();\n }\n } else {\n this.closeDialog();\n }\n }\n }\n\n showErrorMessage() {\n this.app.notifyApp(this.appLocale.LABEL_ACCESS_DENIED, 'error');\n }\n\n // In dialog mode, on form render call the queued functions\n onFormReady(form) {\n this.form = form;\n setTimeout(() => {\n triggerFn(this.$queue.pop());\n });\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Unsubscribe from selectedItemChange$\n if (this.selectedItemChangeSubscription) {\n this.selectedItemChangeSubscription.unsubscribe();\n this.selectedItemChangeSubscription = null;\n }\n\n // MEMORY LEAK FIX: Clear ContentChild reference\n this.table = null;\n\n // MEMORY LEAK FIX: Clear queue array\n this.$queue = [];\n\n super.ngOnDestroy();\n }\n}\n","<ng-content></ng-content>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,cAAc,EACd,IAAI,GAAG,CACH;QACI,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;AAC3C,KAAA,CACJ,C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,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAIa,cAAc,uECrChC,2BAAyB,EAAA,CAAA,CAAA;;4FDmCZ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAR9B,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,eAAe,EAAA,SAAA,EAEd;AACP,wBAAA,kBAAkB,CAAA,kBAAA;AACrB,qBAAA,EAAA,QAAA,EAAA,2BAAA,EAAA;;0BAwBI,SAAS;2BAAC,YAAY;;0BACtB,SAAS;2BAAC,UAAU;;0BACpB,MAAM;2BAAC,kBAAkB;;0BAAG;;sBAtBhC,YAAY;uBAAC,cAAc;;;AErChC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/data/live-table/src/live-table.props.ts","../../../../../projects/components/widgets/data/live-table/src/live-table.component.ts","../../../../../projects/components/widgets/data/live-table/src/live-table.component.html","../../../../../projects/components/widgets/data/live-table/src/index.ts"],"sourcesContent":["import { PROP_BOOLEAN, PROP_STRING, register } from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-livetable',\n new Map(\n [\n ['class', PROP_STRING],\n ['formlayout', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ]\n )\n );\n};\n","import {\n AfterContentInit,\n Attribute,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n Inject,\n Injector,\n OnDestroy,\n Optional\n} from '@angular/core';\n\nimport {debounceTime} from 'rxjs/operators';\nimport {Subscription} from 'rxjs';\n\nimport {$appDigest, AbstractDialogService, App, getClonedObject, isDefined, triggerFn} from '@wm/core';\nimport {provideAsWidgetRef, StylableComponent, styler} from '@wm/components/base';\nimport {TableComponent} from '@wm/components/data/table';\n\nimport {registerProps} from './live-table.props';\n\ndeclare const $: any;\n\nconst DEFAULT_CLS = 'app-livegrid';\nconst WIDGET_CONFIG = {widgetType: 'wm-livetable', hostClass: DEFAULT_CLS};\n\n@Component({\n standalone: true,\n selector: '[wmLiveTable]',\n templateUrl: './live-table.component.html',\n providers: [\n provideAsWidgetRef(LiveTableComponent)\n ]\n})\nexport class LiveTableComponent extends StylableComponent implements AfterContentInit, OnDestroy {\n static readonly initializeProps = registerProps();\n @ContentChild(TableComponent) table: TableComponent;\n\n form;\n isLayoutDialog: boolean;\n\n private readonly dialogId;\n private $queue = [];\n private selectedItemChangeSubscription: Subscription;\n\n private readonly tableOptions: any = {\n 'multiselect': false,\n 'setGridEditMode': ''\n };\n\n constructor(\n inj: Injector,\n elRef: ElementRef,\n cdr: ChangeDetectorRef,\n private readonly dialogService: AbstractDialogService,\n private readonly app: App,\n @Attribute('formlayout') layoutType: string,\n @Attribute('dialogid') dialogId: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n if (layoutType === 'dialog') {\n this.isLayoutDialog = true;\n this.dialogId = dialogId;\n }\n }\n\n ngAfterContentInit() {\n super.ngAfterContentInit();\n if (this.table) {\n this.table._liveTableParent = this;\n \n // Defer live-table configuration to ensure parent table datatable is initialized (Angular 20 timing)\n const configureLiveTable = () => {\n if (typeof this.table.datagridElement.datatable === 'function' && this.table.datagridElement.datatable('instance')) {\n this.table.datagridElement.datatable('option', this.tableOptions);\n\n this.selectedItemChangeSubscription = this.table.selectedItemChange$\n .pipe(debounceTime(250))\n .subscribe(this.onSelectedItemChange.bind(this));\n\n if (!this.isLayoutDialog && !this.form) {\n this.table.datagridElement.datatable('option', {\n 'beforeRowUpdate' : () => {\n this.showErrorMessage();\n },\n 'beforeRowDelete' : () => {\n this.showErrorMessage();\n },\n 'beforeRowInsert' : () => {\n this.showErrorMessage();\n }\n });\n }\n } else {\n // Parent table not initialized yet, retry\n setTimeout(configureLiveTable, 50);\n }\n };\n setTimeout(configureLiveTable, 0);\n }\n }\n\n openDialog() {\n this.dialogService.open(this.dialogId, this.viewParent);\n $appDigest();\n }\n\n closeDialog() {\n this.dialogService.close(this.dialogId, this.viewParent);\n }\n\n focusFirstInput() {\n const $firstInput = $(this.form.$element).find('input').first();\n $firstInput.focus();\n $firstInput.select();\n }\n\n onDialogOpen(action) {\n const attrs: Map<string, string> = this?.form?.formFields?.[0]?.$attrs ?? new Map();\n const hasDefault = [\"defaultvalue\", \"defaultvalue.bind\"].some(key => attrs.has(key));\n if (action == 'update'||!!hasDefault) {\n const firstFormField = $(\"form [wmformfield]\").first();\n if (firstFormField.find(\"div[widget='autocomplete']\").length != 1 && this?.form?.formFields?.[0]?.widgettype != 'autocomplete') { // prevent focusing first form field if widget is autocomplete\n this.focusFirstInput();\n }\n } else {\n this.focusFirstInput();\n }\n }\n\n setFormData(val) {\n if (!this.form.isDestroyed) {\n this.form.getWidget().formdata = val;\n }\n }\n\n private _addNewRow() {\n this.form.isSelected = true;\n this.setFormData('');\n\n this.form.new();\n\n if (this.isLayoutDialog) {\n this.onDialogOpen('add');\n }\n }\n\n addNewRow() {\n if (this.isLayoutDialog) {\n this.openDialog();\n this.$queue.push(this._addNewRow.bind(this));\n return;\n }\n\n this._addNewRow();\n }\n\n private _updateRow(row, eventName) {\n this.setFormData(row);\n this.form.isSelected = true;\n this.form.edit();\n\n if (this.isLayoutDialog) {\n this.form.isUpdateMode = (eventName === 'dblclick') ? this.form.updateMode : true;\n this.onDialogOpen('update');\n }\n }\n\n updateRow(row, eventName) {\n\n if (this.isLayoutDialog) {\n this.openDialog();\n this.$queue.push(this._updateRow.bind(this, row, eventName));\n return;\n }\n\n this._updateRow(row, eventName);\n }\n\n onSelectedItemChange(newValue) {\n let rowData;\n if (!this.form || !this.table) {\n return;\n }\n\n if (newValue && newValue.length > 0 && !this.form.isSelected) {\n this.form.isSelected = true;\n }\n\n /*Update the rowdata of only that grid form that is associated with the specific grid on which row selection is being performed...\n * Since both the grid & gridform are associated with the same \"parentgrid\", match the same*/\n if (newValue && newValue.length > 0) {\n if (this.table.multiselect) {\n rowData = newValue[0];\n } else {\n rowData = newValue[newValue.length - 1];\n }\n\n this.setFormData(getClonedObject(rowData));\n /*If the form is already in update mode, call the form update function*/\n if (this.form.isUpdateMode) {\n this.form.edit();\n }\n } else {\n this.form.isSelected = false;\n this.setFormData('');\n this.form.clearData();\n }\n }\n\n onCancel() {\n this.form.isUpdateMode = false;\n if (this.isLayoutDialog) {\n this.closeDialog();\n }\n }\n\n onResult(operation, response, newForm, updateMode) {\n this.form.isUpdateMode = isDefined(updateMode) ? updateMode : newForm ? true : false;\n switch (operation) {\n case 'insert':\n if (this.table.gridOptions.isNavTypeScrollOrOndemand()) {\n this.table.isNewRowInserted = true;\n }\n if (newForm) {\n /*if new form is to be shown after insert, skip the highlight of the row*/\n this.table.gridfirstrowselect = false;\n this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(), response, true);\n } else {\n /*The new row would always be inserted at the end of all existing records. Hence navigate to the last page and highlight the inserted row.*/\n this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(), response);\n }\n break;\n case 'update':\n /*The updated row would be found in the current page itself. Hence simply highlight the row in the current page.*/\n if (newForm) {\n this.table.gridfirstrowselect = false;\n this.table.initiateSelectItem('current', response, true);\n } else {\n this.table.initiateSelectItem('current', response);\n }\n break;\n case 'delete':\n this.table.onRecordDelete();\n break;\n }\n this.table.updateVariable();\n if (this.isLayoutDialog) {\n /*if new form is to be shown after update or insert, don't close the dialog*/\n if (newForm) {\n if (operation === 'insert') {\n this.form.new();\n } else if (operation === 'update') {\n this.form.edit();\n }\n } else {\n this.closeDialog();\n }\n }\n }\n\n showErrorMessage() {\n this.app.notifyApp(this.appLocale.LABEL_ACCESS_DENIED, 'error');\n }\n\n // In dialog mode, on form render call the queued functions\n onFormReady(form) {\n this.form = form;\n setTimeout(() => {\n triggerFn(this.$queue.pop());\n });\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Unsubscribe from selectedItemChange$\n if (this.selectedItemChangeSubscription) {\n this.selectedItemChangeSubscription.unsubscribe();\n this.selectedItemChangeSubscription = null;\n }\n\n // MEMORY LEAK FIX: Clear ContentChild reference\n this.table = null;\n\n // MEMORY LEAK FIX: Clear queue array\n this.$queue = [];\n\n super.ngOnDestroy();\n }\n}\n","<ng-content></ng-content>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,cAAc,EACd,IAAI,GAAG,CACH;QACI,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,YAAY,EAAE,WAAW,CAAC;QAC3B,CAAC,MAAM,EAAE,WAAW,CAAC;QACrB,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;AAC3C,KAAA,CACJ,CACJ;AACL,CAAC;;ACUD,MAAM,WAAW,GAAG,cAAc;AAClC,MAAM,aAAa,GAAG,EAAC,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAC;AAUpE,MAAO,kBAAmB,SAAQ,iBAAiB,CAAA;AACrC,IAAA,SAAA,IAAA,CAAA,eAAe,GAAG,aAAa,EAAhB,CAAmB;AAelD,IAAA,WAAA,CACI,GAAa,EACb,KAAiB,EACjB,GAAsB,EACL,aAAoC,EACpC,GAAQ,EACA,UAAkB,EACpB,QAAgB,EACC,eAAoB,EAAA;AAE5D,QAAA,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,eAAe,CAAC;QANzB,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,GAAG,GAAH,GAAG;QAbhB,IAAA,CAAA,MAAM,GAAG,EAAE;AAGF,QAAA,IAAA,CAAA,YAAY,GAAQ;AACjC,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,iBAAiB,EAAE;SACtB;AAaG,QAAA,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC;AAChC,QAAA,IAA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qBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,GAAA,EAAA,EAAA,EAAA,KAAA,EAsBZ,YAAY,EAAA,SAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EACZ,UAAU,8BACb,kBAAkB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAxBrB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,SAAA,EAJhB;YACP,kBAAkB,CAAC,kBAAkB;SACxC,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAIa,cAAc,uECrChC,2BAAyB,EAAA,CAAA,CAAA;;4FDmCZ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAR9B,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,eAAe,EAAA,SAAA,EAEd;AACP,wBAAA,kBAAkB,CAAA,kBAAA;AACrB,qBAAA,EAAA,QAAA,EAAA,2BAAA,EAAA;;0BAwBI,SAAS;2BAAC,YAAY;;0BACtB,SAAS;2BAAC,UAAU;;0BACpB,MAAM;2BAAC,kBAAkB;;0BAAG;;sBAtBhC,YAAY;uBAAC,cAAc;;;AErChC;;AAEG;;;;"}
|
|
@@ -5,16 +5,16 @@ import { StylableComponent } from '@wm/components/base';
|
|
|
5
5
|
import { TableComponent } from '@wm/components/data/table';
|
|
6
6
|
|
|
7
7
|
declare class LiveTableComponent extends StylableComponent implements AfterContentInit, OnDestroy {
|
|
8
|
-
private dialogService;
|
|
9
|
-
private app;
|
|
10
|
-
static initializeProps: void;
|
|
8
|
+
private readonly dialogService;
|
|
9
|
+
private readonly app;
|
|
10
|
+
static readonly initializeProps: void;
|
|
11
11
|
table: TableComponent;
|
|
12
12
|
form: any;
|
|
13
13
|
isLayoutDialog: boolean;
|
|
14
|
-
private dialogId;
|
|
14
|
+
private readonly dialogId;
|
|
15
15
|
private $queue;
|
|
16
16
|
private selectedItemChangeSubscription;
|
|
17
|
-
private tableOptions;
|
|
17
|
+
private readonly tableOptions;
|
|
18
18
|
constructor(inj: Injector, elRef: ElementRef, cdr: ChangeDetectorRef, dialogService: AbstractDialogService, app: App, layoutType: string, dialogId: string, explicitContext: any);
|
|
19
19
|
ngAfterContentInit(): void;
|
|
20
20
|
openDialog(): void;
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
this.isDisableLast = true;
|
|
100
100
|
this._debouncedApplyDataset = core.debounce(() => this.widget.dataset = this.dataset, base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
101
101
|
this._debouncedPageChanged = core.debounce(event => {
|
|
102
|
-
const currentPage = event
|
|
102
|
+
const currentPage = event?.page;
|
|
103
103
|
const maxResults = event && (event.pagesize || event.itemsPerPage) || this.maxResults;
|
|
104
104
|
// Do not call goToPage if page has not changed
|
|
105
105
|
if (currentPage !== this.dn.currentPage || this.maxResults !== maxResults) {
|
|
@@ -234,13 +234,13 @@
|
|
|
234
234
|
}
|
|
235
235
|
this.isDisableCurrent = isCurrentPageFirst && isCurrentPageLast;
|
|
236
236
|
// In case of client side pagination, when load more reaches last page hide the on-demand grid ele
|
|
237
|
-
if (this.dataset
|
|
237
|
+
if (this.dataset?.length && this.isDisableNext && this.parent.onDemandLoad && this.parent.widgetType === 'wm-table') {
|
|
238
238
|
this.parent.callDataGridMethod('hideLoadingIndicator', this.isDisableNext, this.parent.infScroll);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
/*Function to check if the variable bound to the data-navigator has paging.*/
|
|
242
242
|
isDataSourceHasPaging() {
|
|
243
|
-
return this.datasource
|
|
243
|
+
return this.datasource?.execute(core.DataSource.Operation.IS_PAGEABLE);
|
|
244
244
|
}
|
|
245
245
|
getPaginationStartIndex() {
|
|
246
246
|
const startIndex = this.datasource?._paginationConfig?.paginationStartIndex;
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
setNonPageableData(newVal) {
|
|
259
259
|
let dataSize, maxResults, currentPage, startIndex;
|
|
260
260
|
dataSize = lodashEs.isArray(newVal) ? newVal.length : (lodashEs.isEmpty(newVal) ? 0 : 1);
|
|
261
|
-
maxResults = (this.options
|
|
261
|
+
maxResults = (this.options?.maxResults) || dataSize;
|
|
262
262
|
if (this.allowpagesizechange) { // when default page size is not given then use maxResults instead of options.maxResults
|
|
263
263
|
maxResults = this.maxResults;
|
|
264
264
|
}
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
this.disableNavigation();
|
|
313
313
|
this.checkDataSize(dataSize, this.pagination.numberOfElements, this.pagination.size);
|
|
314
314
|
startIndex = (currentPage - 1) * this.maxResults;
|
|
315
|
-
this.getPageDetails(startIndex + 1, startIndex + Number(this.pagination.numberOfElements), dataSize);
|
|
315
|
+
this.getPageDetails(startIndex + 1, Math.min(startIndex + Number(this.pagination.numberOfElements), dataSize), dataSize);
|
|
316
316
|
this.setResult(newVal);
|
|
317
317
|
}
|
|
318
318
|
else if (!lodashEs.isString(newVal)) {
|
|
@@ -327,10 +327,8 @@
|
|
|
327
327
|
this._setAriaForBasicNavigation();
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
else {
|
|
331
|
-
|
|
332
|
-
this.setNonPageableData(newVal);
|
|
333
|
-
}
|
|
330
|
+
else if (newVal && !lodashEs.isString(newVal)) {
|
|
331
|
+
this.setNonPageableData(newVal);
|
|
334
332
|
}
|
|
335
333
|
}
|
|
336
334
|
/*Function to check if the current page is the first page*/
|
|
@@ -370,17 +368,15 @@
|
|
|
370
368
|
if (this.isFirstPage() && !allowpagesizechange) {
|
|
371
369
|
this.parent.statePersistence.removeWidgetState(this.parent, 'pagination');
|
|
372
370
|
}
|
|
373
|
-
else {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
state.pagesize = this.maxResults;
|
|
378
|
-
}
|
|
379
|
-
this.parent.statePersistence.setWidgetState(this.parent, state);
|
|
380
|
-
}
|
|
381
|
-
else if (this.parent.widgetType === 'wm-list' || this.parent.widgetType === 'wm-table') {
|
|
382
|
-
console.warn('Retain State handling on Widget ' + this.parent.name + ' is not supported for current pagination type.');
|
|
371
|
+
else if (base.unsupportedStatePersistenceTypes.indexOf(this.parent.navigation) < 0) {
|
|
372
|
+
const state = { pagination: this.dn.currentPage };
|
|
373
|
+
if (allowpagesizechange) {
|
|
374
|
+
state.pagesize = this.maxResults;
|
|
383
375
|
}
|
|
376
|
+
this.parent.statePersistence.setWidgetState(this.parent, state);
|
|
377
|
+
}
|
|
378
|
+
else if (this.parent.widgetType === 'wm-list' || this.parent.widgetType === 'wm-table') {
|
|
379
|
+
console.warn('Retain State handling on Widget ' + this.parent.name + ' is not supported for current pagination type.');
|
|
384
380
|
}
|
|
385
381
|
this.parent.currentpage = this.dn.currentPage;
|
|
386
382
|
this.parent.nativeElement?.setAttribute('currentpage', this.dn.currentPage);
|
|
@@ -415,9 +411,9 @@
|
|
|
415
411
|
'logicalOp': this.logicalOp,
|
|
416
412
|
'matchMode': 'anywhereignorecase'
|
|
417
413
|
}).then(response => {
|
|
418
|
-
this.onPageDataReady(event, response
|
|
414
|
+
this.onPageDataReady(event, response?.data, callback);
|
|
419
415
|
startIndex = (this.dn.currentPage - 1) * this.maxResults;
|
|
420
|
-
this.getPageDetails(startIndex + 1, startIndex + Number(this.pagination?.numberOfElements), this.pagination?.totalElements);
|
|
416
|
+
this.getPageDetails(startIndex + 1, Math.min(startIndex + Number(this.pagination?.numberOfElements), this.pagination?.totalElements), this.pagination?.totalElements);
|
|
421
417
|
core.$appDigest();
|
|
422
418
|
}, error => {
|
|
423
419
|
});
|
|
@@ -612,7 +608,7 @@
|
|
|
612
608
|
let pageSize;
|
|
613
609
|
if (key === 'dataset') {
|
|
614
610
|
let data;
|
|
615
|
-
if (this.parent
|
|
611
|
+
if (this.parent?.onDataNavigatorDataSetChange) {
|
|
616
612
|
data = this.parent.onDataNavigatorDataSetChange(nv);
|
|
617
613
|
}
|
|
618
614
|
else {
|
|
@@ -747,12 +743,15 @@
|
|
|
747
743
|
// Function gets called on dropdown open & close
|
|
748
744
|
onOpenChange(isOpen) {
|
|
749
745
|
if (isOpen) {
|
|
750
|
-
|
|
746
|
+
// Focus the currently selected page size option (not always the first one),
|
|
747
|
+
// since the ':focus' state is what visually highlights the item in the dropdown
|
|
748
|
+
const selectedIndex = this.pageSizeOptions?.findIndex(option => option == this.maxResults);
|
|
749
|
+
this.focusedIndex = selectedIndex >= 0 ? selectedIndex : 0;
|
|
751
750
|
setTimeout(() => {
|
|
752
751
|
// manually focus the dropdown as dropdown has container="body"
|
|
753
752
|
const $items = $('ul#dropdown-basic a.dropdown-item');
|
|
754
|
-
const $
|
|
755
|
-
$
|
|
753
|
+
const $selectedItem = $items.eq(this.focusedIndex);
|
|
754
|
+
$selectedItem?.focus();
|
|
756
755
|
}, 0);
|
|
757
756
|
}
|
|
758
757
|
}
|
|
@@ -856,12 +855,12 @@
|
|
|
856
855
|
// Call parent ngOnDestroy (sets isDestroyed = true)
|
|
857
856
|
super.ngOnDestroy();
|
|
858
857
|
}
|
|
859
|
-
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
860
|
-
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
858
|
+
static { this.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: PaginationComponent, deps: [{ token: i0__namespace.Injector }, { token: base.WidgetRef, skipSelf: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component }); }
|
|
859
|
+
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: PaginationComponent, isStandalone: true, selector: "[wmPagination]", outputs: { resultEmitter: "resultEmitter", maxResultsEmitter: "maxResultsEmitter" }, providers: [
|
|
861
860
|
base.provideAsWidgetRef(PaginationComponent)
|
|
862
861
|
], viewQueries: [{ propertyName: "bsDropdown", first: true, predicate: i4.BsDropdownDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n@if (navcontrols === 'Classic') {\n<ul class=\"pagination advanced {{navigationClass}}\">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (onShown)=\"onDropDownShown($event)\" (onHidden)=\"onDropdownHidden()\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableFirst}\">\n <a [title]=\"appLocale.LABEL_FIRST\" name=\"first\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableFirst\"\n (click)=\"navigatePage('first', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-first-page\"></i></span>\n <span class=\"sr-only\">Go to first page {{ isDisableFirst ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a [title]=\"appLocale.LABEL_PREVIOUS\" name=\"prev\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisablePrevious\"\n (click)=\"navigatePage('prev', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n <span class=\"sr-only\">Go to previous page {{ isDisablePrevious ? ', Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"pagecount disabled\">\n <a href=\"javascript:void(0);\" aria-label=\"Change Page Number\">\n <input [(ngModel)]=\"dn.currentPage\" [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount\" [disabled]=\"isDisableCurrent\"\n [ngModelOptions]=\"{standalone: true}\"\n type=\"number\"\n (keydown)=\"onKeyDown($event)\" (change)=\"onModelChange($event)\" class=\"form-control\"/>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"disabled\">\n <a [hidden]=\"isDisableCount\"> / {{pageCount}}</a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableNext}\">\n <a [title]=\"appLocale.LABEL_NEXT\" name=\"next\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableNext\"\n (click)=\"navigatePage('next', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n <span class=\"sr-only\">Go to next page {{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableLast}\">\n <a [title]=\"appLocale.LABEL_LAST\" name=\"last\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableLast\"\n (click)=\"navigatePage('last', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-last-page\"></i></span>\n <span class=\"sr-only\">Go to last page {{ isDisableLast ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (showrecordcount) {\n <li class=\"totalcount disabled\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n }\n</ul>\n}\n@if (navcontrols === 'Pager') {\n <ul class=\"pager {{navigationClass}}\">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (onShown)=\"onDropDownShown($event)\" (onHidden)=\"onDropdownHidden()\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n@if (!(dataSize<=maxResults)) {\n <li class=\"previous\" [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('prev', $event)\"\n [attr.aria-disabled]=\"isDisablePrevious\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class=\"sr-only\">{{ isDisablePrevious ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n <li class=\"next\" [ngClass]=\"{'disabled':isDisableNext}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('next', $event)\"\n [attr.aria-disabled]=\"isDisableNext\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class=\"sr-only\">{{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n </ul>\n}\n\n@if (navcontrols === 'Basic') {\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <div class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE }} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (onShown)=\"onDropDownShown($event)\" (onHidden)=\"onDropdownHidden()\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n @if (rowSummary?.totalRecords) {\n <div class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </div>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <pagination class=\"pagination basic\" [ngClass]=\"navigationClass\" role=\"navigation\"\n [itemsPerPage]=\"maxResults\" [totalItems]=\"dataSize\"\n (pageChanged)=\"pageChanged($event)\" [ngModelOptions]=\"{standalone:true}\" [ngModel]=\"dn.currentPage\"\n [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount + ' pages'\"\n [boundaryLinks]=\"boundarylinks\" [maxSize]=\"maxsize\"\n [directionLinks]=\"directionlinks\"\n firstText=\"Firtst\" lastText=\"Last\"\n [customPreviousTemplate]=\"prevTemplate\"\n [customNextTemplate]=\"nextTemplate\"\n [customPageTemplate]=\"pageTemplate\"></pagination>\n }\n}\n\n@if (navcontrols === 'Basic' && showrecordcount) {\n <ul class=\"pagination\">\n <li class=\"totalcount disabled basiccount\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n </ul>\n}\n\n<ng-template #pageTemplate let-page>\n <span class=\"sr-only\" [attr.data-isacitvepage]=\"page.active\">{{'Page '}}</span>\n {{page.number}}\n @if (page.active) {\n <span class=\"sr-only\"> {{', Showing page ' + page.number + ' of ' + pageCount}}</span>\n }\n</ng-template>\n<ng-template #prevTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Previous page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Next page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: i1.CommonModule }, { kind: "directive", type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: i2.FormsModule }, { kind: "directive", type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: i3.PaginationModule }, { kind: "component", type: i3__namespace.PaginationComponent, selector: "pagination", inputs: ["align", "maxSize", "boundaryLinks", "directionLinks", "firstText", "previousText", "nextText", "lastText", "rotate", "pageBtnClass", "disabled", "customPageTemplate", "customNextTemplate", "customPreviousTemplate", "customFirstTemplate", "customLastTemplate", "itemsPerPage", "totalItems"], outputs: ["numPages", "pageChanged"] }, { kind: "ngmodule", type: i4.BsDropdownModule }, { kind: "directive", type: i4__namespace.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i4__namespace.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i4__namespace.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }] }); }
|
|
863
862
|
}
|
|
864
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
863
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0__namespace, type: PaginationComponent, decorators: [{
|
|
865
864
|
type: i0.Component,
|
|
866
865
|
args: [{ standalone: true, imports: [i1.CommonModule, i2.FormsModule, i3.PaginationModule, i4.BsDropdownModule], selector: '[wmPagination]', providers: [
|
|
867
866
|
base.provideAsWidgetRef(PaginationComponent)
|
|
@@ -84,7 +84,7 @@ class PaginationComponent extends StylableComponent {
|
|
|
84
84
|
this.isDisableLast = true;
|
|
85
85
|
this._debouncedApplyDataset = debounce(() => this.widget.dataset = this.dataset, DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
86
86
|
this._debouncedPageChanged = debounce(event => {
|
|
87
|
-
const currentPage = event
|
|
87
|
+
const currentPage = event?.page;
|
|
88
88
|
const maxResults = event && (event.pagesize || event.itemsPerPage) || this.maxResults;
|
|
89
89
|
// Do not call goToPage if page has not changed
|
|
90
90
|
if (currentPage !== this.dn.currentPage || this.maxResults !== maxResults) {
|
|
@@ -219,13 +219,13 @@ class PaginationComponent extends StylableComponent {
|
|
|
219
219
|
}
|
|
220
220
|
this.isDisableCurrent = isCurrentPageFirst && isCurrentPageLast;
|
|
221
221
|
// In case of client side pagination, when load more reaches last page hide the on-demand grid ele
|
|
222
|
-
if (this.dataset
|
|
222
|
+
if (this.dataset?.length && this.isDisableNext && this.parent.onDemandLoad && this.parent.widgetType === 'wm-table') {
|
|
223
223
|
this.parent.callDataGridMethod('hideLoadingIndicator', this.isDisableNext, this.parent.infScroll);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
/*Function to check if the variable bound to the data-navigator has paging.*/
|
|
227
227
|
isDataSourceHasPaging() {
|
|
228
|
-
return this.datasource
|
|
228
|
+
return this.datasource?.execute(DataSource.Operation.IS_PAGEABLE);
|
|
229
229
|
}
|
|
230
230
|
getPaginationStartIndex() {
|
|
231
231
|
const startIndex = this.datasource?._paginationConfig?.paginationStartIndex;
|
|
@@ -243,7 +243,7 @@ class PaginationComponent extends StylableComponent {
|
|
|
243
243
|
setNonPageableData(newVal) {
|
|
244
244
|
let dataSize, maxResults, currentPage, startIndex;
|
|
245
245
|
dataSize = isArray(newVal) ? newVal.length : (isEmpty(newVal) ? 0 : 1);
|
|
246
|
-
maxResults = (this.options
|
|
246
|
+
maxResults = (this.options?.maxResults) || dataSize;
|
|
247
247
|
if (this.allowpagesizechange) { // when default page size is not given then use maxResults instead of options.maxResults
|
|
248
248
|
maxResults = this.maxResults;
|
|
249
249
|
}
|
|
@@ -297,7 +297,7 @@ class PaginationComponent extends StylableComponent {
|
|
|
297
297
|
this.disableNavigation();
|
|
298
298
|
this.checkDataSize(dataSize, this.pagination.numberOfElements, this.pagination.size);
|
|
299
299
|
startIndex = (currentPage - 1) * this.maxResults;
|
|
300
|
-
this.getPageDetails(startIndex + 1, startIndex + Number(this.pagination.numberOfElements), dataSize);
|
|
300
|
+
this.getPageDetails(startIndex + 1, Math.min(startIndex + Number(this.pagination.numberOfElements), dataSize), dataSize);
|
|
301
301
|
this.setResult(newVal);
|
|
302
302
|
}
|
|
303
303
|
else if (!isString(newVal)) {
|
|
@@ -312,10 +312,8 @@ class PaginationComponent extends StylableComponent {
|
|
|
312
312
|
this._setAriaForBasicNavigation();
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
else {
|
|
316
|
-
|
|
317
|
-
this.setNonPageableData(newVal);
|
|
318
|
-
}
|
|
315
|
+
else if (newVal && !isString(newVal)) {
|
|
316
|
+
this.setNonPageableData(newVal);
|
|
319
317
|
}
|
|
320
318
|
}
|
|
321
319
|
/*Function to check if the current page is the first page*/
|
|
@@ -355,17 +353,15 @@ class PaginationComponent extends StylableComponent {
|
|
|
355
353
|
if (this.isFirstPage() && !allowpagesizechange) {
|
|
356
354
|
this.parent.statePersistence.removeWidgetState(this.parent, 'pagination');
|
|
357
355
|
}
|
|
358
|
-
else {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
state.pagesize = this.maxResults;
|
|
363
|
-
}
|
|
364
|
-
this.parent.statePersistence.setWidgetState(this.parent, state);
|
|
365
|
-
}
|
|
366
|
-
else if (this.parent.widgetType === 'wm-list' || this.parent.widgetType === 'wm-table') {
|
|
367
|
-
console.warn('Retain State handling on Widget ' + this.parent.name + ' is not supported for current pagination type.');
|
|
356
|
+
else if (unsupportedStatePersistenceTypes.indexOf(this.parent.navigation) < 0) {
|
|
357
|
+
const state = { pagination: this.dn.currentPage };
|
|
358
|
+
if (allowpagesizechange) {
|
|
359
|
+
state.pagesize = this.maxResults;
|
|
368
360
|
}
|
|
361
|
+
this.parent.statePersistence.setWidgetState(this.parent, state);
|
|
362
|
+
}
|
|
363
|
+
else if (this.parent.widgetType === 'wm-list' || this.parent.widgetType === 'wm-table') {
|
|
364
|
+
console.warn('Retain State handling on Widget ' + this.parent.name + ' is not supported for current pagination type.');
|
|
369
365
|
}
|
|
370
366
|
this.parent.currentpage = this.dn.currentPage;
|
|
371
367
|
this.parent.nativeElement?.setAttribute('currentpage', this.dn.currentPage);
|
|
@@ -400,9 +396,9 @@ class PaginationComponent extends StylableComponent {
|
|
|
400
396
|
'logicalOp': this.logicalOp,
|
|
401
397
|
'matchMode': 'anywhereignorecase'
|
|
402
398
|
}).then(response => {
|
|
403
|
-
this.onPageDataReady(event, response
|
|
399
|
+
this.onPageDataReady(event, response?.data, callback);
|
|
404
400
|
startIndex = (this.dn.currentPage - 1) * this.maxResults;
|
|
405
|
-
this.getPageDetails(startIndex + 1, startIndex + Number(this.pagination?.numberOfElements), this.pagination?.totalElements);
|
|
401
|
+
this.getPageDetails(startIndex + 1, Math.min(startIndex + Number(this.pagination?.numberOfElements), this.pagination?.totalElements), this.pagination?.totalElements);
|
|
406
402
|
$appDigest();
|
|
407
403
|
}, error => {
|
|
408
404
|
// If error is undefined, do not show any message as this may be discarded request
|
|
@@ -604,7 +600,7 @@ class PaginationComponent extends StylableComponent {
|
|
|
604
600
|
let pageSize, prevPageSize;
|
|
605
601
|
if (key === 'dataset') {
|
|
606
602
|
let data;
|
|
607
|
-
if (this.parent
|
|
603
|
+
if (this.parent?.onDataNavigatorDataSetChange) {
|
|
608
604
|
data = this.parent.onDataNavigatorDataSetChange(nv);
|
|
609
605
|
}
|
|
610
606
|
else {
|
|
@@ -739,12 +735,15 @@ class PaginationComponent extends StylableComponent {
|
|
|
739
735
|
// Function gets called on dropdown open & close
|
|
740
736
|
onOpenChange(isOpen) {
|
|
741
737
|
if (isOpen) {
|
|
742
|
-
|
|
738
|
+
// Focus the currently selected page size option (not always the first one),
|
|
739
|
+
// since the ':focus' state is what visually highlights the item in the dropdown
|
|
740
|
+
const selectedIndex = this.pageSizeOptions?.findIndex(option => option == this.maxResults);
|
|
741
|
+
this.focusedIndex = selectedIndex >= 0 ? selectedIndex : 0;
|
|
743
742
|
setTimeout(() => {
|
|
744
743
|
// manually focus the dropdown as dropdown has container="body"
|
|
745
744
|
const $items = $('ul#dropdown-basic a.dropdown-item');
|
|
746
|
-
const $
|
|
747
|
-
$
|
|
745
|
+
const $selectedItem = $items.eq(this.focusedIndex);
|
|
746
|
+
$selectedItem?.focus();
|
|
748
747
|
}, 0);
|
|
749
748
|
}
|
|
750
749
|
}
|
|
@@ -848,12 +847,12 @@ class PaginationComponent extends StylableComponent {
|
|
|
848
847
|
// Call parent ngOnDestroy (sets isDestroyed = true)
|
|
849
848
|
super.ngOnDestroy();
|
|
850
849
|
}
|
|
851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
850
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: PaginationComponent, deps: [{ token: i0.Injector }, { token: WidgetRef, skipSelf: true }, { token: 'EXPLICIT_CONTEXT', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
851
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: PaginationComponent, isStandalone: true, selector: "[wmPagination]", outputs: { resultEmitter: "resultEmitter", maxResultsEmitter: "maxResultsEmitter" }, providers: [
|
|
853
852
|
provideAsWidgetRef(PaginationComponent)
|
|
854
853
|
], viewQueries: [{ propertyName: "bsDropdown", first: true, predicate: BsDropdownDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "\n@if (navcontrols === 'Classic') {\n<ul class=\"pagination advanced {{navigationClass}}\">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (onShown)=\"onDropDownShown($event)\" (onHidden)=\"onDropdownHidden()\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableFirst}\">\n <a [title]=\"appLocale.LABEL_FIRST\" name=\"first\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableFirst\"\n (click)=\"navigatePage('first', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-first-page\"></i></span>\n <span class=\"sr-only\">Go to first page {{ isDisableFirst ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a [title]=\"appLocale.LABEL_PREVIOUS\" name=\"prev\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisablePrevious\"\n (click)=\"navigatePage('prev', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n <span class=\"sr-only\">Go to previous page {{ isDisablePrevious ? ', Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"pagecount disabled\">\n <a href=\"javascript:void(0);\" aria-label=\"Change Page Number\">\n <input [(ngModel)]=\"dn.currentPage\" [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount\" [disabled]=\"isDisableCurrent\"\n [ngModelOptions]=\"{standalone: true}\"\n type=\"number\"\n (keydown)=\"onKeyDown($event)\" (change)=\"onModelChange($event)\" class=\"form-control\"/>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"disabled\">\n <a [hidden]=\"isDisableCount\"> / {{pageCount}}</a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableNext}\">\n <a [title]=\"appLocale.LABEL_NEXT\" name=\"next\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableNext\"\n (click)=\"navigatePage('next', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n <span class=\"sr-only\">Go to next page {{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableLast}\">\n <a [title]=\"appLocale.LABEL_LAST\" name=\"last\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableLast\"\n (click)=\"navigatePage('last', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-last-page\"></i></span>\n <span class=\"sr-only\">Go to last page {{ isDisableLast ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (showrecordcount) {\n <li class=\"totalcount disabled\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n }\n</ul>\n}\n@if (navcontrols === 'Pager') {\n <ul class=\"pager {{navigationClass}}\">\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <li class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (onShown)=\"onDropDownShown($event)\" (onHidden)=\"onDropdownHidden()\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n@if (!(dataSize<=maxResults)) {\n <li class=\"previous\" [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('prev', $event)\"\n [attr.aria-disabled]=\"isDisablePrevious\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class=\"sr-only\">{{ isDisablePrevious ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n <li class=\"next\" [ngClass]=\"{'disabled':isDisableNext}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('next', $event)\"\n [attr.aria-disabled]=\"isDisableNext\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class=\"sr-only\">{{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n </ul>\n}\n\n@if (navcontrols === 'Basic') {\n @if (allowpagesizechange && pageSizeOptions?.[0]<rowSummary?.totalRecords) {\n <div class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE }} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (onShown)=\"onDropDownShown($event)\" (onHidden)=\"onDropdownHidden()\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n @if (rowSummary?.totalRecords) {\n <div class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </div>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <pagination class=\"pagination basic\" [ngClass]=\"navigationClass\" role=\"navigation\"\n [itemsPerPage]=\"maxResults\" [totalItems]=\"dataSize\"\n (pageChanged)=\"pageChanged($event)\" [ngModelOptions]=\"{standalone:true}\" [ngModel]=\"dn.currentPage\"\n [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount + ' pages'\"\n [boundaryLinks]=\"boundarylinks\" [maxSize]=\"maxsize\"\n [directionLinks]=\"directionlinks\"\n firstText=\"Firtst\" lastText=\"Last\"\n [customPreviousTemplate]=\"prevTemplate\"\n [customNextTemplate]=\"nextTemplate\"\n [customPageTemplate]=\"pageTemplate\"></pagination>\n }\n}\n\n@if (navcontrols === 'Basic' && showrecordcount) {\n <ul class=\"pagination\">\n <li class=\"totalcount disabled basiccount\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n </ul>\n}\n\n<ng-template #pageTemplate let-page>\n <span class=\"sr-only\" [attr.data-isacitvepage]=\"page.active\">{{'Page '}}</span>\n {{page.number}}\n @if (page.active) {\n <span class=\"sr-only\"> {{', Showing page ' + page.number + ' of ' + pageCount}}</span>\n }\n</ng-template>\n<ng-template #prevTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Previous page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Next page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PaginationModule }, { kind: "component", type: i3.PaginationComponent, selector: "pagination", inputs: ["align", "maxSize", "boundaryLinks", "directionLinks", "firstText", "previousText", "nextText", "lastText", "rotate", "pageBtnClass", "disabled", "customPageTemplate", "customNextTemplate", "customPreviousTemplate", "customFirstTemplate", "customLastTemplate", "itemsPerPage", "totalItems"], outputs: ["numPages", "pageChanged"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }] }); }
|
|
855
854
|
}
|
|
856
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
857
856
|
type: Component,
|
|
858
857
|
args: [{ standalone: true, imports: [CommonModule, FormsModule, PaginationModule, BsDropdownModule], selector: '[wmPagination]', providers: [
|
|
859
858
|
provideAsWidgetRef(PaginationComponent)
|