@ng-nest/ui 12.0.5 → 12.0.10
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/auto-complete/auto-complete-portal.component.d.ts +3 -3
- package/auto-complete/auto-complete.component.d.ts +6 -2
- package/auto-complete/auto-complete.property.d.ts +17 -2
- package/back-top/back-top.component.d.ts +1 -2
- package/base-form/base-form.component.d.ts +1 -1
- package/base-form/base-form.property.d.ts +48 -3
- package/bundles/ng-nest-ui-affix.umd.js +25 -21
- package/bundles/ng-nest-ui-affix.umd.js.map +1 -1
- package/bundles/ng-nest-ui-alert.umd.js +25 -21
- package/bundles/ng-nest-ui-alert.umd.js.map +1 -1
- package/bundles/ng-nest-ui-anchor.umd.js +26 -22
- package/bundles/ng-nest-ui-anchor.umd.js.map +1 -1
- package/bundles/ng-nest-ui-api.umd.js +12 -14
- package/bundles/ng-nest-ui-api.umd.js.map +1 -1
- package/bundles/ng-nest-ui-auto-complete.umd.js +74 -36
- package/bundles/ng-nest-ui-auto-complete.umd.js.map +1 -1
- package/bundles/ng-nest-ui-avatar.umd.js +25 -21
- package/bundles/ng-nest-ui-avatar.umd.js.map +1 -1
- package/bundles/ng-nest-ui-back-top.umd.js +27 -23
- package/bundles/ng-nest-ui-back-top.umd.js.map +1 -1
- package/bundles/ng-nest-ui-badge.umd.js +27 -22
- package/bundles/ng-nest-ui-badge.umd.js.map +1 -1
- package/bundles/ng-nest-ui-base-form.umd.js +67 -22
- package/bundles/ng-nest-ui-base-form.umd.js.map +1 -1
- package/bundles/ng-nest-ui-border.umd.js +12 -14
- package/bundles/ng-nest-ui-border.umd.js.map +1 -1
- package/bundles/ng-nest-ui-button.umd.js +36 -29
- package/bundles/ng-nest-ui-button.umd.js.map +1 -1
- package/bundles/ng-nest-ui-calendar.umd.js +29 -24
- package/bundles/ng-nest-ui-calendar.umd.js.map +1 -1
- package/bundles/ng-nest-ui-card.umd.js +25 -21
- package/bundles/ng-nest-ui-card.umd.js.map +1 -1
- package/bundles/ng-nest-ui-carousel.umd.js +35 -30
- package/bundles/ng-nest-ui-carousel.umd.js.map +1 -1
- package/bundles/ng-nest-ui-cascade.umd.js +94 -36
- package/bundles/ng-nest-ui-cascade.umd.js.map +1 -1
- package/bundles/ng-nest-ui-checkbox.umd.js +28 -23
- package/bundles/ng-nest-ui-checkbox.umd.js.map +1 -1
- package/bundles/ng-nest-ui-collapse.umd.js +31 -27
- package/bundles/ng-nest-ui-collapse.umd.js.map +1 -1
- package/bundles/ng-nest-ui-color-picker.umd.js +79 -44
- package/bundles/ng-nest-ui-color-picker.umd.js.map +1 -1
- package/bundles/ng-nest-ui-color.umd.js +26 -22
- package/bundles/ng-nest-ui-color.umd.js.map +1 -1
- package/bundles/ng-nest-ui-comment.umd.js +34 -29
- package/bundles/ng-nest-ui-comment.umd.js.map +1 -1
- package/bundles/ng-nest-ui-container.umd.js +46 -42
- package/bundles/ng-nest-ui-container.umd.js.map +1 -1
- package/bundles/ng-nest-ui-core.umd.js +136 -35
- package/bundles/ng-nest-ui-core.umd.js.map +1 -1
- package/bundles/ng-nest-ui-crumb.umd.js +28 -23
- package/bundles/ng-nest-ui-crumb.umd.js.map +1 -1
- package/bundles/ng-nest-ui-date-picker.umd.js +923 -176
- package/bundles/ng-nest-ui-date-picker.umd.js.map +1 -1
- package/bundles/ng-nest-ui-description.umd.js +35 -32
- package/bundles/ng-nest-ui-description.umd.js.map +1 -1
- package/bundles/ng-nest-ui-dialog.umd.js +27 -22
- package/bundles/ng-nest-ui-dialog.umd.js.map +1 -1
- package/bundles/ng-nest-ui-doc.umd.js +12 -14
- package/bundles/ng-nest-ui-doc.umd.js.map +1 -1
- package/bundles/ng-nest-ui-drawer.umd.js +27 -22
- package/bundles/ng-nest-ui-drawer.umd.js.map +1 -1
- package/bundles/ng-nest-ui-dropdown.umd.js +32 -27
- package/bundles/ng-nest-ui-dropdown.umd.js.map +1 -1
- package/bundles/ng-nest-ui-empty.umd.js +25 -21
- package/bundles/ng-nest-ui-empty.umd.js.map +1 -1
- package/bundles/ng-nest-ui-examples.umd.js +12 -14
- package/bundles/ng-nest-ui-examples.umd.js.map +1 -1
- package/bundles/ng-nest-ui-find.umd.js +45 -27
- package/bundles/ng-nest-ui-find.umd.js.map +1 -1
- package/bundles/ng-nest-ui-form.umd.js +36 -36
- package/bundles/ng-nest-ui-form.umd.js.map +1 -1
- package/bundles/ng-nest-ui-highlight.umd.js +27 -22
- package/bundles/ng-nest-ui-highlight.umd.js.map +1 -1
- package/bundles/ng-nest-ui-i18n.umd.js +545 -140
- package/bundles/ng-nest-ui-i18n.umd.js.map +1 -1
- package/bundles/ng-nest-ui-icon.umd.js +34 -29
- package/bundles/ng-nest-ui-icon.umd.js.map +1 -1
- package/bundles/ng-nest-ui-inner.umd.js +26 -22
- package/bundles/ng-nest-ui-inner.umd.js.map +1 -1
- package/bundles/ng-nest-ui-input-number.umd.js +44 -24
- package/bundles/ng-nest-ui-input-number.umd.js.map +1 -1
- package/bundles/ng-nest-ui-input.umd.js +208 -50
- package/bundles/ng-nest-ui-input.umd.js.map +1 -1
- package/bundles/ng-nest-ui-layout.umd.js +31 -27
- package/bundles/ng-nest-ui-layout.umd.js.map +1 -1
- package/bundles/ng-nest-ui-link.umd.js +25 -21
- package/bundles/ng-nest-ui-link.umd.js.map +1 -1
- package/bundles/ng-nest-ui-list.umd.js +35 -30
- package/bundles/ng-nest-ui-list.umd.js.map +1 -1
- package/bundles/ng-nest-ui-loading.umd.js +27 -22
- package/bundles/ng-nest-ui-loading.umd.js.map +1 -1
- package/bundles/ng-nest-ui-menu.umd.js +38 -31
- package/bundles/ng-nest-ui-menu.umd.js.map +1 -1
- package/bundles/ng-nest-ui-message-box.umd.js +53 -47
- package/bundles/ng-nest-ui-message-box.umd.js.map +1 -1
- package/bundles/ng-nest-ui-message.umd.js +26 -22
- package/bundles/ng-nest-ui-message.umd.js.map +1 -1
- package/bundles/ng-nest-ui-notification.umd.js +26 -22
- package/bundles/ng-nest-ui-notification.umd.js.map +1 -1
- package/bundles/ng-nest-ui-outlet.umd.js +22 -18
- package/bundles/ng-nest-ui-outlet.umd.js.map +1 -1
- package/bundles/ng-nest-ui-page-header.umd.js +25 -21
- package/bundles/ng-nest-ui-page-header.umd.js.map +1 -1
- package/bundles/ng-nest-ui-pagination.umd.js +115 -26
- package/bundles/ng-nest-ui-pagination.umd.js.map +1 -1
- package/bundles/ng-nest-ui-pattern.umd.js +12 -14
- package/bundles/ng-nest-ui-pattern.umd.js.map +1 -1
- package/bundles/ng-nest-ui-popconfirm.umd.js +25 -21
- package/bundles/ng-nest-ui-popconfirm.umd.js.map +1 -1
- package/bundles/ng-nest-ui-popover.umd.js +31 -26
- package/bundles/ng-nest-ui-popover.umd.js.map +1 -1
- package/bundles/ng-nest-ui-portal.umd.js +22 -18
- package/bundles/ng-nest-ui-portal.umd.js.map +1 -1
- package/bundles/ng-nest-ui-progress.umd.js +28 -23
- package/bundles/ng-nest-ui-progress.umd.js.map +1 -1
- package/bundles/ng-nest-ui-radio.umd.js +28 -23
- package/bundles/ng-nest-ui-radio.umd.js.map +1 -1
- package/bundles/ng-nest-ui-rate.umd.js +30 -26
- package/bundles/ng-nest-ui-rate.umd.js.map +1 -1
- package/bundles/ng-nest-ui-result.umd.js +25 -21
- package/bundles/ng-nest-ui-result.umd.js.map +1 -1
- package/bundles/ng-nest-ui-ripple.umd.js +25 -21
- package/bundles/ng-nest-ui-ripple.umd.js.map +1 -1
- package/bundles/ng-nest-ui-select.umd.js +53 -34
- package/bundles/ng-nest-ui-select.umd.js.map +1 -1
- package/bundles/ng-nest-ui-skeleton.umd.js +27 -22
- package/bundles/ng-nest-ui-skeleton.umd.js.map +1 -1
- package/bundles/ng-nest-ui-slider-select.umd.js +25 -21
- package/bundles/ng-nest-ui-slider-select.umd.js.map +1 -1
- package/bundles/ng-nest-ui-slider.umd.js +32 -29
- package/bundles/ng-nest-ui-slider.umd.js.map +1 -1
- package/bundles/ng-nest-ui-statistic.umd.js +37 -31
- package/bundles/ng-nest-ui-statistic.umd.js.map +1 -1
- package/bundles/ng-nest-ui-steps.umd.js +35 -27
- package/bundles/ng-nest-ui-steps.umd.js.map +1 -1
- package/bundles/ng-nest-ui-switch.umd.js +25 -21
- package/bundles/ng-nest-ui-switch.umd.js.map +1 -1
- package/bundles/ng-nest-ui-table.umd.js +58 -51
- package/bundles/ng-nest-ui-table.umd.js.map +1 -1
- package/bundles/ng-nest-ui-tabs.umd.js +39 -34
- package/bundles/ng-nest-ui-tabs.umd.js.map +1 -1
- package/bundles/ng-nest-ui-tag.umd.js +36 -21
- package/bundles/ng-nest-ui-tag.umd.js.map +1 -1
- package/bundles/ng-nest-ui-text-retract.umd.js +27 -22
- package/bundles/ng-nest-ui-text-retract.umd.js.map +1 -1
- package/bundles/ng-nest-ui-textarea.umd.js +27 -32
- package/bundles/ng-nest-ui-textarea.umd.js.map +1 -1
- package/bundles/ng-nest-ui-theme.umd.js +26 -22
- package/bundles/ng-nest-ui-theme.umd.js.map +1 -1
- package/bundles/ng-nest-ui-time-ago.umd.js +12 -14
- package/bundles/ng-nest-ui-time-ago.umd.js.map +1 -1
- package/bundles/ng-nest-ui-time-picker.umd.js +87 -46
- package/bundles/ng-nest-ui-time-picker.umd.js.map +1 -1
- package/bundles/ng-nest-ui-time-range.umd.js +22 -18
- package/bundles/ng-nest-ui-time-range.umd.js.map +1 -1
- package/bundles/ng-nest-ui-timeline.umd.js +28 -23
- package/bundles/ng-nest-ui-timeline.umd.js.map +1 -1
- package/bundles/ng-nest-ui-tooltip.umd.js +31 -26
- package/bundles/ng-nest-ui-tooltip.umd.js.map +1 -1
- package/bundles/ng-nest-ui-transfer.umd.js +28 -23
- package/bundles/ng-nest-ui-transfer.umd.js.map +1 -1
- package/bundles/ng-nest-ui-tree-file.umd.js +25 -21
- package/bundles/ng-nest-ui-tree-file.umd.js.map +1 -1
- package/bundles/ng-nest-ui-tree.umd.js +39 -34
- package/bundles/ng-nest-ui-tree.umd.js.map +1 -1
- package/bundles/ng-nest-ui-typography.umd.js +25 -21
- package/bundles/ng-nest-ui-typography.umd.js.map +1 -1
- package/bundles/ng-nest-ui-upload.umd.js +32 -27
- package/bundles/ng-nest-ui-upload.umd.js.map +1 -1
- package/bundles/ng-nest-ui.umd.js +83 -243
- package/bundles/ng-nest-ui.umd.js.map +1 -1
- package/button/buttons.component.d.ts +1 -1
- package/calendar/calendar.component.d.ts +2 -2
- package/carousel/carousel.component.d.ts +1 -1
- package/cascade/cascade-portal.component.d.ts +13 -7
- package/cascade/cascade.component.d.ts +7 -1
- package/cascade/cascade.property.d.ts +33 -3
- package/checkbox/checkbox.component.d.ts +1 -1
- package/color/color.component.d.ts +2 -2
- package/color-picker/color-picker-portal.component.d.ts +3 -3
- package/color-picker/color-picker.component.d.ts +10 -4
- package/color-picker/color-picker.property.d.ts +12 -2
- package/comment/comment.component.d.ts +1 -1
- package/core/config/config.d.ts +39 -0
- package/core/functions/clone-deep.d.ts +1 -0
- package/core/functions/drop.d.ts +1 -0
- package/core/functions/flex.d.ts +1 -1
- package/core/functions/has-in.d.ts +1 -0
- package/core/functions/order-by.d.ts +1 -0
- package/core/functions/public-api.d.ts +5 -0
- package/core/functions/remove.d.ts +1 -0
- package/core/services/reuse-strategy.service.d.ts +1 -1
- package/crumb/crumb.component.d.ts +1 -1
- package/date-picker/date-picker-portal.component.d.ts +10 -12
- package/date-picker/date-picker.component.d.ts +5 -5
- package/date-picker/date-picker.module.d.ts +12 -10
- package/date-picker/date-picker.property.d.ts +169 -8
- package/date-picker/date-range-portal.component.d.ts +65 -0
- package/date-picker/date-range.component.d.ts +74 -0
- package/date-picker/picker-date.component.d.ts +13 -4
- package/date-picker/picker-month.component.d.ts +6 -3
- package/date-picker/picker-year.component.d.ts +4 -2
- package/date-picker/public-api.d.ts +2 -0
- package/description/description.component.d.ts +2 -4
- package/dropdown/dropdown-portal.component.d.ts +1 -3
- package/dropdown/dropdown.component.d.ts +2 -2
- package/esm2015/affix/affix.component.js +3 -3
- package/esm2015/affix/affix.module.js +4 -4
- package/esm2015/affix/affix.property.js +3 -3
- package/esm2015/alert/alert.component.js +4 -4
- package/esm2015/alert/alert.module.js +4 -4
- package/esm2015/alert/alert.property.js +3 -3
- package/esm2015/anchor/anchor.component.js +5 -5
- package/esm2015/anchor/anchor.module.js +4 -4
- package/esm2015/anchor/anchor.property.js +4 -4
- package/esm2015/api/api.component.js +3 -3
- package/esm2015/api/api.module.js +4 -4
- package/esm2015/auto-complete/auto-complete-portal.component.js +6 -6
- package/esm2015/auto-complete/auto-complete.component.js +29 -12
- package/esm2015/auto-complete/auto-complete.module.js +4 -4
- package/esm2015/auto-complete/auto-complete.property.js +22 -5
- package/esm2015/avatar/avatar.component.js +3 -3
- package/esm2015/avatar/avatar.module.js +4 -4
- package/esm2015/avatar/avatar.property.js +3 -3
- package/esm2015/back-top/back-top.component.js +6 -6
- package/esm2015/back-top/back-top.module.js +4 -4
- package/esm2015/back-top/back-top.property.js +3 -3
- package/esm2015/badge/badge.component.js +6 -5
- package/esm2015/badge/badge.module.js +4 -4
- package/esm2015/badge/badge.property.js +3 -3
- package/esm2015/base-form/base-form.component.js +5 -5
- package/esm2015/base-form/base-form.module.js +4 -4
- package/esm2015/base-form/base-form.property.js +46 -5
- package/esm2015/border/border.component.js +3 -3
- package/esm2015/border/border.module.js +4 -4
- package/esm2015/button/button.component.js +10 -7
- package/esm2015/button/button.module.js +4 -4
- package/esm2015/button/button.property.js +6 -6
- package/esm2015/button/buttons.component.js +4 -4
- package/esm2015/calendar/calendar.component.js +8 -7
- package/esm2015/calendar/calendar.module.js +4 -4
- package/esm2015/calendar/calendar.property.js +3 -3
- package/esm2015/card/card.component.js +3 -3
- package/esm2015/card/card.module.js +4 -4
- package/esm2015/card/card.property.js +3 -3
- package/esm2015/carousel/carousel-panel.component.js +4 -4
- package/esm2015/carousel/carousel.component.js +8 -7
- package/esm2015/carousel/carousel.module.js +4 -4
- package/esm2015/carousel/carousel.property.js +6 -6
- package/esm2015/cascade/cascade-portal.component.js +23 -11
- package/esm2015/cascade/cascade.component.js +25 -9
- package/esm2015/cascade/cascade.module.js +4 -4
- package/esm2015/cascade/cascade.property.js +28 -5
- package/esm2015/checkbox/checkbox.component.js +7 -6
- package/esm2015/checkbox/checkbox.module.js +4 -4
- package/esm2015/checkbox/checkbox.property.js +4 -4
- package/esm2015/collapse/collapse-panel.component.js +4 -4
- package/esm2015/collapse/collapse.component.js +3 -3
- package/esm2015/collapse/collapse.module.js +4 -4
- package/esm2015/collapse/collapse.property.js +6 -6
- package/esm2015/color/color.component.js +5 -5
- package/esm2015/color/color.module.js +4 -4
- package/esm2015/color/color.property.js +3 -3
- package/esm2015/color-picker/color-picker-portal.component.js +5 -5
- package/esm2015/color-picker/color-picker.component.js +33 -14
- package/esm2015/color-picker/color-picker.module.js +4 -4
- package/esm2015/color-picker/color-picker.property.js +16 -5
- package/esm2015/comment/comment-reply.component.js +3 -3
- package/esm2015/comment/comment.component.js +7 -6
- package/esm2015/comment/comment.module.js +4 -4
- package/esm2015/comment/comment.property.js +6 -6
- package/esm2015/container/aside.component.js +3 -3
- package/esm2015/container/container.component.js +5 -5
- package/esm2015/container/container.module.js +4 -4
- package/esm2015/container/container.property.js +12 -12
- package/esm2015/container/footer.component.js +3 -3
- package/esm2015/container/header.component.js +3 -3
- package/esm2015/container/main.component.js +3 -3
- package/esm2015/core/animation/fade.js +1 -1
- package/esm2015/core/config/config.js +1 -1
- package/esm2015/core/config/config.service.js +3 -3
- package/esm2015/core/functions/clone-deep.js +12 -0
- package/esm2015/core/functions/drop.js +8 -0
- package/esm2015/core/functions/flex.js +18 -7
- package/esm2015/core/functions/has-in.js +4 -0
- package/esm2015/core/functions/order-by.js +31 -0
- package/esm2015/core/functions/public-api.js +6 -1
- package/esm2015/core/functions/remove.js +15 -0
- package/esm2015/core/services/http.service.js +5 -5
- package/esm2015/core/services/preloading-strategy.service.js +5 -5
- package/esm2015/core/services/reuse-strategy.service.js +2 -2
- package/esm2015/core/services/storage.service.js +3 -3
- package/esm2015/core/theme/theme.service.js +3 -3
- package/esm2015/crumb/crumb.component.js +7 -6
- package/esm2015/crumb/crumb.module.js +4 -4
- package/esm2015/crumb/crumb.property.js +3 -3
- package/esm2015/date-picker/date-picker-portal.component.js +24 -43
- package/esm2015/date-picker/date-picker.component.js +24 -23
- package/esm2015/date-picker/date-picker.module.js +31 -11
- package/esm2015/date-picker/date-picker.property.js +190 -19
- package/esm2015/date-picker/date-range-portal.component.js +208 -0
- package/esm2015/date-picker/date-range.component.js +307 -0
- package/esm2015/date-picker/picker-date.component.js +50 -15
- package/esm2015/date-picker/picker-month.component.js +25 -9
- package/esm2015/date-picker/picker-year.component.js +21 -9
- package/esm2015/date-picker/public-api.js +3 -1
- package/esm2015/description/description-item.component.js +4 -4
- package/esm2015/description/description.component.js +8 -9
- package/esm2015/description/description.module.js +4 -4
- package/esm2015/description/description.property.js +6 -6
- package/esm2015/dialog/dialog.component.js +6 -5
- package/esm2015/dialog/dialog.module.js +4 -4
- package/esm2015/dialog/dialog.property.js +4 -4
- package/esm2015/doc/doc.component.js +3 -3
- package/esm2015/doc/doc.module.js +4 -4
- package/esm2015/drawer/drawer.component.js +6 -5
- package/esm2015/drawer/drawer.module.js +4 -4
- package/esm2015/drawer/drawer.property.js +3 -3
- package/esm2015/dropdown/dropdown-portal.component.js +5 -5
- package/esm2015/dropdown/dropdown.component.js +7 -6
- package/esm2015/dropdown/dropdown.module.js +4 -4
- package/esm2015/dropdown/dropdown.property.js +3 -3
- package/esm2015/empty/empty.component.js +3 -3
- package/esm2015/empty/empty.module.js +4 -4
- package/esm2015/empty/empty.property.js +3 -3
- package/esm2015/examples/examples.component.js +3 -3
- package/esm2015/examples/examples.module.js +4 -4
- package/esm2015/find/find.component.js +13 -10
- package/esm2015/find/find.module.js +4 -4
- package/esm2015/find/find.property.js +16 -5
- package/esm2015/form/control.component.js +4 -4
- package/esm2015/form/form.component.js +9 -8
- package/esm2015/form/form.module.js +4 -4
- package/esm2015/form/form.property.js +8 -13
- package/esm2015/highlight/highlight.component.js +6 -5
- package/esm2015/highlight/highlight.module.js +4 -4
- package/esm2015/highlight/highlight.property.js +4 -4
- package/esm2015/i18n/i18n.directive.js +6 -5
- package/esm2015/i18n/i18n.module.js +4 -4
- package/esm2015/i18n/i18n.pipe.js +3 -3
- package/esm2015/i18n/i18n.property.js +1 -1
- package/esm2015/i18n/i18n.service.js +3 -3
- package/esm2015/i18n/languages/ar_EG.js +11 -3
- package/esm2015/i18n/languages/bg_BG.js +11 -3
- package/esm2015/i18n/languages/ca_ES.js +11 -3
- package/esm2015/i18n/languages/cs_CZ.js +11 -3
- package/esm2015/i18n/languages/da_DK.js +11 -3
- package/esm2015/i18n/languages/de_DE.js +11 -3
- package/esm2015/i18n/languages/el_GR.js +11 -3
- package/esm2015/i18n/languages/en_GB.js +11 -3
- package/esm2015/i18n/languages/en_US.js +11 -3
- package/esm2015/i18n/languages/es_ES.js +11 -3
- package/esm2015/i18n/languages/et_EE.js +11 -3
- package/esm2015/i18n/languages/fa_IR.js +11 -3
- package/esm2015/i18n/languages/fi_FI.js +11 -3
- package/esm2015/i18n/languages/fr_BE.js +10 -2
- package/esm2015/i18n/languages/fr_FR.js +11 -3
- package/esm2015/i18n/languages/he_IL.js +11 -3
- package/esm2015/i18n/languages/hi_IN.js +11 -3
- package/esm2015/i18n/languages/hr_HR.js +11 -3
- package/esm2015/i18n/languages/hu_HU.js +11 -3
- package/esm2015/i18n/languages/hy_AM.js +11 -3
- package/esm2015/i18n/languages/id_ID.js +11 -3
- package/esm2015/i18n/languages/is_IS.js +11 -3
- package/esm2015/i18n/languages/it_IT.js +11 -3
- package/esm2015/i18n/languages/ja_JP.js +11 -3
- package/esm2015/i18n/languages/ka_GE.js +11 -3
- package/esm2015/i18n/languages/kn_IN.js +11 -3
- package/esm2015/i18n/languages/ko_KR.js +11 -3
- package/esm2015/i18n/languages/ku_IQ.js +11 -3
- package/esm2015/i18n/languages/lv_LV.js +11 -3
- package/esm2015/i18n/languages/mn_MN.js +11 -3
- package/esm2015/i18n/languages/ms_MY.js +11 -3
- package/esm2015/i18n/languages/nb_NO.js +11 -3
- package/esm2015/i18n/languages/ne_NP.js +11 -3
- package/esm2015/i18n/languages/nl_BE.js +11 -3
- package/esm2015/i18n/languages/nl_NL.js +11 -3
- package/esm2015/i18n/languages/pl_PL.js +11 -3
- package/esm2015/i18n/languages/pt_BR.js +11 -3
- package/esm2015/i18n/languages/pt_PT.js +11 -3
- package/esm2015/i18n/languages/ro_RO.js +11 -3
- package/esm2015/i18n/languages/ru_RU.js +11 -3
- package/esm2015/i18n/languages/sk_SK.js +11 -3
- package/esm2015/i18n/languages/sl_SI.js +11 -3
- package/esm2015/i18n/languages/sr_RS.js +11 -3
- package/esm2015/i18n/languages/sv_SE.js +11 -3
- package/esm2015/i18n/languages/ta_IN.js +11 -3
- package/esm2015/i18n/languages/th_TH.js +29 -21
- package/esm2015/i18n/languages/tr_TR.js +11 -3
- package/esm2015/i18n/languages/uk_UA.js +11 -3
- package/esm2015/i18n/languages/vi_VN.js +11 -3
- package/esm2015/i18n/languages/zh_CN.js +10 -3
- package/esm2015/i18n/languages/zh_TW.js +10 -3
- package/esm2015/icon/icon.component.js +7 -6
- package/esm2015/icon/icon.module.js +4 -4
- package/esm2015/icon/icon.property.js +3 -3
- package/esm2015/icon/icon.service.js +6 -6
- package/esm2015/inner/inner.component.js +5 -5
- package/esm2015/inner/inner.module.js +4 -4
- package/esm2015/inner/inner.property.js +3 -3
- package/esm2015/input/input-group.component.js +26 -0
- package/esm2015/input/input.component.js +60 -15
- package/esm2015/input/input.module.js +11 -9
- package/esm2015/input/input.property.js +77 -22
- package/esm2015/input/public-api.js +2 -1
- package/esm2015/input-number/input-number.component.js +9 -5
- package/esm2015/input-number/input-number.module.js +7 -6
- package/esm2015/input-number/input-number.property.js +17 -5
- package/esm2015/layout/col.component.js +3 -3
- package/esm2015/layout/layout.module.js +4 -4
- package/esm2015/layout/layout.property.js +6 -6
- package/esm2015/layout/row.component.js +3 -3
- package/esm2015/link/link.component.js +3 -3
- package/esm2015/link/link.module.js +4 -4
- package/esm2015/link/link.property.js +3 -3
- package/esm2015/list/list-option.component.js +3 -3
- package/esm2015/list/list.component.js +8 -7
- package/esm2015/list/list.module.js +4 -4
- package/esm2015/list/list.property.js +7 -7
- package/esm2015/loading/loading.component.js +6 -5
- package/esm2015/loading/loading.module.js +4 -4
- package/esm2015/loading/loading.property.js +3 -3
- package/esm2015/menu/menu-node.component.js +4 -4
- package/esm2015/menu/menu.component.js +11 -8
- package/esm2015/menu/menu.module.js +4 -4
- package/esm2015/menu/menu.property.js +6 -6
- package/esm2015/message/message.component.js +5 -5
- package/esm2015/message/message.module.js +4 -4
- package/esm2015/message/message.service.js +3 -3
- package/esm2015/message-box/message-box.component.js +20 -24
- package/esm2015/message-box/message-box.module.js +4 -4
- package/esm2015/message-box/message-box.service.js +10 -8
- package/esm2015/notification/notification.component.js +5 -5
- package/esm2015/notification/notification.module.js +4 -4
- package/esm2015/notification/notification.property.js +1 -1
- package/esm2015/notification/notification.service.js +3 -3
- package/esm2015/outlet/outlet.directive.js +3 -3
- package/esm2015/outlet/outlet.module.js +4 -4
- package/esm2015/page-header/page-header.component.js +3 -3
- package/esm2015/page-header/page-header.module.js +4 -4
- package/esm2015/page-header/page-header.property.js +3 -3
- package/esm2015/pagination/pagination.component.js +45 -7
- package/esm2015/pagination/pagination.module.js +10 -6
- package/esm2015/pagination/pagination.property.js +52 -4
- package/esm2015/pattern/pattern.component.js +3 -3
- package/esm2015/pattern/pattern.module.js +4 -4
- package/esm2015/popconfirm/popconfirm.component.js +3 -3
- package/esm2015/popconfirm/popconfirm.module.js +4 -4
- package/esm2015/popconfirm/popconfirm.property.js +3 -3
- package/esm2015/popover/popover-portal.component.js +4 -4
- package/esm2015/popover/popover.directive.js +7 -6
- package/esm2015/popover/popover.module.js +4 -4
- package/esm2015/popover/popover.property.js +3 -3
- package/esm2015/portal/portal.module.js +4 -4
- package/esm2015/portal/portal.service.js +3 -3
- package/esm2015/progress/progress.component.js +7 -6
- package/esm2015/progress/progress.module.js +4 -4
- package/esm2015/progress/progress.property.js +3 -3
- package/esm2015/radio/radio.component.js +7 -6
- package/esm2015/radio/radio.module.js +4 -4
- package/esm2015/radio/radio.property.js +4 -4
- package/esm2015/rate/rate.component.js +9 -9
- package/esm2015/rate/rate.module.js +4 -4
- package/esm2015/rate/rate.property.js +3 -3
- package/esm2015/result/result.component.js +3 -3
- package/esm2015/result/result.module.js +4 -4
- package/esm2015/result/result.property.js +3 -3
- package/esm2015/ripple/ripple.directive.js +4 -4
- package/esm2015/ripple/ripple.module.js +4 -4
- package/esm2015/ripple/ripple.property.js +4 -4
- package/esm2015/select/select-portal.component.js +6 -6
- package/esm2015/select/select.component.js +15 -11
- package/esm2015/select/select.module.js +4 -4
- package/esm2015/select/select.property.js +15 -4
- package/esm2015/skeleton/skeleton.component.js +6 -5
- package/esm2015/skeleton/skeleton.module.js +4 -4
- package/esm2015/skeleton/skeleton.property.js +3 -3
- package/esm2015/slider/slider.component.js +11 -12
- package/esm2015/slider/slider.module.js +4 -4
- package/esm2015/slider/slider.property.js +3 -3
- package/esm2015/slider-select/slider-select.component.js +3 -3
- package/esm2015/slider-select/slider-select.module.js +4 -4
- package/esm2015/slider-select/slider-select.property.js +3 -3
- package/esm2015/statistic/countdown.component.js +8 -7
- package/esm2015/statistic/statistic.component.js +6 -5
- package/esm2015/statistic/statistic.module.js +4 -4
- package/esm2015/statistic/statistic.property.js +6 -6
- package/esm2015/steps/steps.component.js +9 -7
- package/esm2015/steps/steps.module.js +7 -6
- package/esm2015/steps/steps.property.js +6 -4
- package/esm2015/switch/switch.component.js +3 -3
- package/esm2015/switch/switch.module.js +4 -4
- package/esm2015/switch/switch.property.js +3 -3
- package/esm2015/table/drag.directive.js +5 -5
- package/esm2015/table/table-body.component.js +7 -6
- package/esm2015/table/table-foot.component.js +4 -4
- package/esm2015/table/table-head.component.js +7 -6
- package/esm2015/table/table.component.js +9 -8
- package/esm2015/table/table.module.js +4 -4
- package/esm2015/table/table.property.js +13 -13
- package/esm2015/tabs/tab-content.component.js +3 -3
- package/esm2015/tabs/tab.component.js +4 -4
- package/esm2015/tabs/tabs.component.js +9 -8
- package/esm2015/tabs/tabs.module.js +4 -4
- package/esm2015/tabs/tabs.property.js +6 -6
- package/esm2015/tag/tag.component.js +10 -5
- package/esm2015/tag/tag.module.js +4 -4
- package/esm2015/tag/tag.property.js +10 -4
- package/esm2015/text-retract/text-retract.component.js +6 -5
- package/esm2015/text-retract/text-retract.module.js +4 -4
- package/esm2015/text-retract/text-retract.property.js +3 -3
- package/esm2015/textarea/textarea.component.js +6 -5
- package/esm2015/textarea/textarea.module.js +4 -4
- package/esm2015/textarea/textarea.property.js +4 -14
- package/esm2015/theme/theme.component.js +5 -5
- package/esm2015/theme/theme.module.js +4 -4
- package/esm2015/theme/theme.property.js +4 -4
- package/esm2015/time-ago/time-ago.module.js +4 -4
- package/esm2015/time-ago/time-ago.pipe.js +3 -3
- package/esm2015/time-picker/time-picker-frame.component.js +22 -12
- package/esm2015/time-picker/time-picker-portal.component.js +5 -5
- package/esm2015/time-picker/time-picker.component.js +31 -15
- package/esm2015/time-picker/time-picker.module.js +4 -4
- package/esm2015/time-picker/time-picker.property.js +16 -5
- package/esm2015/time-range/time-range.module.js +4 -4
- package/esm2015/time-range/time-range.pipe.js +3 -3
- package/esm2015/timeline/timeline.component.js +7 -6
- package/esm2015/timeline/timeline.module.js +4 -4
- package/esm2015/timeline/timeline.property.js +3 -3
- package/esm2015/tooltip/tooltip-portal.component.js +4 -4
- package/esm2015/tooltip/tooltip.directive.js +7 -6
- package/esm2015/tooltip/tooltip.module.js +4 -4
- package/esm2015/tooltip/tooltip.property.js +4 -4
- package/esm2015/transfer/transfer.component.js +7 -6
- package/esm2015/transfer/transfer.module.js +4 -4
- package/esm2015/transfer/transfer.property.js +3 -3
- package/esm2015/tree/tree-node.component.js +5 -5
- package/esm2015/tree/tree.component.js +11 -10
- package/esm2015/tree/tree.module.js +4 -4
- package/esm2015/tree/tree.property.js +7 -7
- package/esm2015/tree-file/tree-file.component.js +3 -3
- package/esm2015/tree-file/tree-file.module.js +4 -4
- package/esm2015/tree-file/tree-file.property.js +3 -3
- package/esm2015/typography/typography.component.js +3 -3
- package/esm2015/typography/typography.module.js +4 -4
- package/esm2015/typography/typography.property.js +3 -3
- package/esm2015/upload/upload-portal.component.js +5 -5
- package/esm2015/upload/upload.component.js +7 -6
- package/esm2015/upload/upload.module.js +4 -4
- package/esm2015/upload/upload.property.js +3 -3
- package/fesm2015/ng-nest-ui-affix.js +10 -10
- package/fesm2015/ng-nest-ui-alert.js +10 -10
- package/fesm2015/ng-nest-ui-alert.js.map +1 -1
- package/fesm2015/ng-nest-ui-anchor.js +11 -11
- package/fesm2015/ng-nest-ui-anchor.js.map +1 -1
- package/fesm2015/ng-nest-ui-api.js +7 -7
- package/fesm2015/ng-nest-ui-auto-complete.js +59 -25
- package/fesm2015/ng-nest-ui-auto-complete.js.map +1 -1
- package/fesm2015/ng-nest-ui-avatar.js +10 -10
- package/fesm2015/ng-nest-ui-back-top.js +12 -12
- package/fesm2015/ng-nest-ui-back-top.js.map +1 -1
- package/fesm2015/ng-nest-ui-badge.js +12 -11
- package/fesm2015/ng-nest-ui-badge.js.map +1 -1
- package/fesm2015/ng-nest-ui-base-form.js +53 -12
- package/fesm2015/ng-nest-ui-base-form.js.map +1 -1
- package/fesm2015/ng-nest-ui-border.js +7 -7
- package/fesm2015/ng-nest-ui-button.js +22 -19
- package/fesm2015/ng-nest-ui-button.js.map +1 -1
- package/fesm2015/ng-nest-ui-calendar.js +14 -13
- package/fesm2015/ng-nest-ui-calendar.js.map +1 -1
- package/fesm2015/ng-nest-ui-card.js +10 -10
- package/fesm2015/ng-nest-ui-carousel.js +20 -19
- package/fesm2015/ng-nest-ui-carousel.js.map +1 -1
- package/fesm2015/ng-nest-ui-cascade.js +80 -28
- package/fesm2015/ng-nest-ui-cascade.js.map +1 -1
- package/fesm2015/ng-nest-ui-checkbox.js +13 -12
- package/fesm2015/ng-nest-ui-checkbox.js.map +1 -1
- package/fesm2015/ng-nest-ui-collapse.js +16 -16
- package/fesm2015/ng-nest-ui-collapse.js.map +1 -1
- package/fesm2015/ng-nest-ui-color-picker.js +55 -24
- package/fesm2015/ng-nest-ui-color-picker.js.map +1 -1
- package/fesm2015/ng-nest-ui-color.js +11 -11
- package/fesm2015/ng-nest-ui-color.js.map +1 -1
- package/fesm2015/ng-nest-ui-comment.js +19 -18
- package/fesm2015/ng-nest-ui-comment.js.map +1 -1
- package/fesm2015/ng-nest-ui-container.js +32 -32
- package/fesm2015/ng-nest-ui-container.js.map +1 -1
- package/fesm2015/ng-nest-ui-core.js +106 -25
- package/fesm2015/ng-nest-ui-core.js.map +1 -1
- package/fesm2015/ng-nest-ui-crumb.js +13 -12
- package/fesm2015/ng-nest-ui-crumb.js.map +1 -1
- package/fesm2015/ng-nest-ui-date-picker.js +876 -156
- package/fesm2015/ng-nest-ui-date-picker.js.map +1 -1
- package/fesm2015/ng-nest-ui-description.js +21 -22
- package/fesm2015/ng-nest-ui-description.js.map +1 -1
- package/fesm2015/ng-nest-ui-dialog.js +12 -11
- package/fesm2015/ng-nest-ui-dialog.js.map +1 -1
- package/fesm2015/ng-nest-ui-doc.js +7 -7
- package/fesm2015/ng-nest-ui-drawer.js +12 -11
- package/fesm2015/ng-nest-ui-drawer.js.map +1 -1
- package/fesm2015/ng-nest-ui-dropdown.js +17 -16
- package/fesm2015/ng-nest-ui-dropdown.js.map +1 -1
- package/fesm2015/ng-nest-ui-empty.js +10 -10
- package/fesm2015/ng-nest-ui-examples.js +7 -7
- package/fesm2015/ng-nest-ui-find.js +31 -17
- package/fesm2015/ng-nest-ui-find.js.map +1 -1
- package/fesm2015/ng-nest-ui-form.js +22 -26
- package/fesm2015/ng-nest-ui-form.js.map +1 -1
- package/fesm2015/ng-nest-ui-highlight.js +12 -11
- package/fesm2015/ng-nest-ui-highlight.js.map +1 -1
- package/fesm2015/ng-nest-ui-i18n.js +540 -133
- package/fesm2015/ng-nest-ui-i18n.js.map +1 -1
- package/fesm2015/ng-nest-ui-icon.js +18 -18
- package/fesm2015/ng-nest-ui-icon.js.map +1 -1
- package/fesm2015/ng-nest-ui-inner.js +11 -11
- package/fesm2015/ng-nest-ui-inner.js.map +1 -1
- package/fesm2015/ng-nest-ui-input-number.js +31 -14
- package/fesm2015/ng-nest-ui-input-number.js.map +1 -1
- package/fesm2015/ng-nest-ui-input.js +164 -42
- package/fesm2015/ng-nest-ui-input.js.map +1 -1
- package/fesm2015/ng-nest-ui-layout.js +16 -16
- package/fesm2015/ng-nest-ui-link.js +10 -10
- package/fesm2015/ng-nest-ui-list.js +20 -19
- package/fesm2015/ng-nest-ui-list.js.map +1 -1
- package/fesm2015/ng-nest-ui-loading.js +12 -11
- package/fesm2015/ng-nest-ui-loading.js.map +1 -1
- package/fesm2015/ng-nest-ui-menu.js +23 -20
- package/fesm2015/ng-nest-ui-menu.js.map +1 -1
- package/fesm2015/ng-nest-ui-message-box.js +32 -34
- package/fesm2015/ng-nest-ui-message-box.js.map +1 -1
- package/fesm2015/ng-nest-ui-message.js +11 -11
- package/fesm2015/ng-nest-ui-message.js.map +1 -1
- package/fesm2015/ng-nest-ui-notification.js +11 -11
- package/fesm2015/ng-nest-ui-notification.js.map +1 -1
- package/fesm2015/ng-nest-ui-outlet.js +7 -7
- package/fesm2015/ng-nest-ui-page-header.js +10 -10
- package/fesm2015/ng-nest-ui-pagination.js +104 -14
- package/fesm2015/ng-nest-ui-pagination.js.map +1 -1
- package/fesm2015/ng-nest-ui-pattern.js +7 -7
- package/fesm2015/ng-nest-ui-popconfirm.js +10 -10
- package/fesm2015/ng-nest-ui-popover.js +16 -15
- package/fesm2015/ng-nest-ui-popover.js.map +1 -1
- package/fesm2015/ng-nest-ui-portal.js +7 -7
- package/fesm2015/ng-nest-ui-progress.js +13 -12
- package/fesm2015/ng-nest-ui-progress.js.map +1 -1
- package/fesm2015/ng-nest-ui-radio.js +13 -12
- package/fesm2015/ng-nest-ui-radio.js.map +1 -1
- package/fesm2015/ng-nest-ui-rate.js +15 -15
- package/fesm2015/ng-nest-ui-rate.js.map +1 -1
- package/fesm2015/ng-nest-ui-result.js +10 -10
- package/fesm2015/ng-nest-ui-ripple.js +10 -10
- package/fesm2015/ng-nest-ui-ripple.js.map +1 -1
- package/fesm2015/ng-nest-ui-select.js +37 -22
- package/fesm2015/ng-nest-ui-select.js.map +1 -1
- package/fesm2015/ng-nest-ui-skeleton.js +12 -11
- package/fesm2015/ng-nest-ui-skeleton.js.map +1 -1
- package/fesm2015/ng-nest-ui-slider-select.js +10 -10
- package/fesm2015/ng-nest-ui-slider.js +17 -18
- package/fesm2015/ng-nest-ui-slider.js.map +1 -1
- package/fesm2015/ng-nest-ui-statistic.js +22 -20
- package/fesm2015/ng-nest-ui-statistic.js.map +1 -1
- package/fesm2015/ng-nest-ui-steps.js +19 -14
- package/fesm2015/ng-nest-ui-steps.js.map +1 -1
- package/fesm2015/ng-nest-ui-switch.js +10 -10
- package/fesm2015/ng-nest-ui-table.js +43 -40
- package/fesm2015/ng-nest-ui-table.js.map +1 -1
- package/fesm2015/ng-nest-ui-tabs.js +24 -23
- package/fesm2015/ng-nest-ui-tabs.js.map +1 -1
- package/fesm2015/ng-nest-ui-tag.js +22 -11
- package/fesm2015/ng-nest-ui-tag.js.map +1 -1
- package/fesm2015/ng-nest-ui-text-retract.js +12 -11
- package/fesm2015/ng-nest-ui-text-retract.js.map +1 -1
- package/fesm2015/ng-nest-ui-textarea.js +12 -21
- package/fesm2015/ng-nest-ui-textarea.js.map +1 -1
- package/fesm2015/ng-nest-ui-theme.js +11 -11
- package/fesm2015/ng-nest-ui-theme.js.map +1 -1
- package/fesm2015/ng-nest-ui-time-ago.js +7 -7
- package/fesm2015/ng-nest-ui-time-picker.js +73 -36
- package/fesm2015/ng-nest-ui-time-picker.js.map +1 -1
- package/fesm2015/ng-nest-ui-time-range.js +7 -7
- package/fesm2015/ng-nest-ui-timeline.js +13 -12
- package/fesm2015/ng-nest-ui-timeline.js.map +1 -1
- package/fesm2015/ng-nest-ui-tooltip.js +16 -15
- package/fesm2015/ng-nest-ui-tooltip.js.map +1 -1
- package/fesm2015/ng-nest-ui-transfer.js +13 -12
- package/fesm2015/ng-nest-ui-transfer.js.map +1 -1
- package/fesm2015/ng-nest-ui-tree-file.js +10 -10
- package/fesm2015/ng-nest-ui-tree.js +24 -23
- package/fesm2015/ng-nest-ui-tree.js.map +1 -1
- package/fesm2015/ng-nest-ui-typography.js +10 -10
- package/fesm2015/ng-nest-ui-upload.js +17 -16
- package/fesm2015/ng-nest-ui-upload.js.map +1 -1
- package/find/find.component.d.ts +1 -1
- package/find/find.property.d.ts +22 -2
- package/form/control.component.d.ts +1 -1
- package/form/form.component.d.ts +1 -1
- package/form/form.property.d.ts +6 -6
- package/i18n/i18n.property.d.ts +3 -0
- package/i18n/languages/ar_EG.d.ts +8 -0
- package/i18n/languages/bg_BG.d.ts +8 -0
- package/i18n/languages/ca_ES.d.ts +8 -0
- package/i18n/languages/cs_CZ.d.ts +8 -0
- package/i18n/languages/da_DK.d.ts +8 -0
- package/i18n/languages/de_DE.d.ts +8 -0
- package/i18n/languages/el_GR.d.ts +8 -0
- package/i18n/languages/en_GB.d.ts +8 -0
- package/i18n/languages/en_US.d.ts +8 -0
- package/i18n/languages/es_ES.d.ts +8 -0
- package/i18n/languages/et_EE.d.ts +8 -0
- package/i18n/languages/fa_IR.d.ts +8 -0
- package/i18n/languages/fi_FI.d.ts +8 -0
- package/i18n/languages/fr_BE.d.ts +8 -0
- package/i18n/languages/fr_FR.d.ts +8 -0
- package/i18n/languages/he_IL.d.ts +8 -0
- package/i18n/languages/hi_IN.d.ts +8 -0
- package/i18n/languages/hr_HR.d.ts +8 -0
- package/i18n/languages/hu_HU.d.ts +8 -0
- package/i18n/languages/hy_AM.d.ts +8 -0
- package/i18n/languages/id_ID.d.ts +8 -0
- package/i18n/languages/is_IS.d.ts +8 -0
- package/i18n/languages/it_IT.d.ts +8 -0
- package/i18n/languages/ja_JP.d.ts +8 -0
- package/i18n/languages/ka_GE.d.ts +8 -0
- package/i18n/languages/kn_IN.d.ts +8 -0
- package/i18n/languages/ko_KR.d.ts +8 -0
- package/i18n/languages/ku_IQ.d.ts +8 -0
- package/i18n/languages/lv_LV.d.ts +8 -0
- package/i18n/languages/mn_MN.d.ts +8 -0
- package/i18n/languages/ms_MY.d.ts +8 -0
- package/i18n/languages/nb_NO.d.ts +8 -0
- package/i18n/languages/ne_NP.d.ts +8 -0
- package/i18n/languages/nl_BE.d.ts +8 -0
- package/i18n/languages/nl_NL.d.ts +8 -0
- package/i18n/languages/pl_PL.d.ts +8 -0
- package/i18n/languages/pt_BR.d.ts +8 -0
- package/i18n/languages/pt_PT.d.ts +8 -0
- package/i18n/languages/ro_RO.d.ts +8 -0
- package/i18n/languages/ru_RU.d.ts +8 -0
- package/i18n/languages/sk_SK.d.ts +8 -0
- package/i18n/languages/sl_SI.d.ts +8 -0
- package/i18n/languages/sr_RS.d.ts +8 -0
- package/i18n/languages/sv_SE.d.ts +8 -0
- package/i18n/languages/ta_IN.d.ts +8 -0
- package/i18n/languages/th_TH.d.ts +8 -0
- package/i18n/languages/tr_TR.d.ts +8 -0
- package/i18n/languages/uk_UA.d.ts +8 -0
- package/i18n/languages/vi_VN.d.ts +8 -0
- package/i18n/languages/zh_CN.d.ts +7 -0
- package/i18n/languages/zh_TW.d.ts +7 -0
- package/inner/inner.component.d.ts +1 -1
- package/input/input-group.component.d.ts +13 -0
- package/input/input.component.d.ts +10 -3
- package/input/input.module.d.ts +7 -5
- package/input/input.property.d.ts +79 -14
- package/input/public-api.d.ts +1 -0
- package/input-number/input-number.component.d.ts +3 -0
- package/input-number/input-number.module.d.ts +4 -3
- package/input-number/input-number.property.d.ts +12 -2
- package/list/list.component.d.ts +2 -2
- package/menu/menu.component.d.ts +1 -1
- package/message/message.component.d.ts +1 -1
- package/message-box/message-box.component.d.ts +2 -1
- package/notification/notification.component.d.ts +1 -1
- package/package.json +1 -1
- package/pagination/pagination.component.d.ts +5 -1
- package/pagination/pagination.module.d.ts +7 -3
- package/pagination/pagination.property.d.ts +49 -3
- package/radio/radio.component.d.ts +1 -1
- package/rate/rate.component.d.ts +5 -5
- package/select/select-portal.component.d.ts +3 -3
- package/select/select.component.d.ts +1 -1
- package/select/select.property.d.ts +12 -2
- package/slider/slider.component.d.ts +1 -1
- package/steps/steps.component.d.ts +1 -1
- package/steps/steps.module.d.ts +2 -1
- package/steps/steps.property.d.ts +7 -2
- package/table/table-body.component.d.ts +1 -1
- package/table/table-head.component.d.ts +1 -1
- package/table/table.component.d.ts +1 -1
- package/table/table.property.d.ts +10 -0
- package/tag/tag.component.d.ts +2 -1
- package/tag/tag.property.d.ts +6 -1
- package/textarea/textarea.property.d.ts +1 -6
- package/theme/theme.component.d.ts +1 -1
- package/time-picker/time-picker-frame.component.d.ts +4 -0
- package/time-picker/time-picker-portal.component.d.ts +3 -3
- package/time-picker/time-picker.component.d.ts +5 -3
- package/time-picker/time-picker.property.d.ts +12 -2
- package/timeline/timeline.component.d.ts +1 -1
- package/transfer/transfer.component.d.ts +1 -1
- package/tree/tree-node.component.d.ts +1 -1
- package/tree/tree.component.d.ts +1 -1
- package/upload/upload.component.d.ts +3 -3
|
@@ -50,13 +50,13 @@ class XMessageComponent {
|
|
|
50
50
|
.subscribe(() => this.onClose(item));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
trackByNode(
|
|
53
|
+
trackByNode(_index, item) {
|
|
54
54
|
return `${item.title}-${item.content}`;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
/** @nocollapse */ XMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
58
|
-
/** @nocollapse */ XMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
57
|
+
/** @nocollapse */ XMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
+
/** @nocollapse */ XMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XMessageComponent, selector: "x-message", ngImport: i0, template: "<div class=\"x-message\">\r\n <ng-container *ngFor=\"let item of message.list; trackBy: trackByNode\">\r\n <x-alert\r\n [@x-move-animation]=\"item.placement\"\r\n (@x-move-animation.done)=\"moveDone($event)\"\r\n (mouseenter)=\"onEnter(item)\"\r\n (mouseleave)=\"onLeave(item)\"\r\n (close)=\"onClose(item)\"\r\n [hide]=\"item.hide\"\r\n [title]=\"item.title\"\r\n [content]=\"item.content\"\r\n [type]=\"item.type\"\r\n [effect]=\"item.effect\"\r\n [hideClose]=\"item.hideClose\"\r\n [closeText]=\"item.closeText\"\r\n [showIcon]=\"item.showIcon\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </ng-container>\r\n</div>\r\n", styles: [".x-message{margin:0;padding:0}.x-message>x-alert{padding:.25rem 0}.x-message>x-alert>.x-alert{box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color)}.x-message-portal x-message{width:100%}\n"], components: [{ type: i1.XAlertComponent, selector: "x-alert" }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [XMoveAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{
|
|
62
62
|
selector: `${XMessagePrefix}`,
|
|
@@ -177,18 +177,18 @@ class XMessageService {
|
|
|
177
177
|
(_b = (_a = this.messages[option.placement].ref) === null || _a === void 0 ? void 0 : _a.componentRef) === null || _b === void 0 ? void 0 : _b.instance.onClose(option);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
/** @nocollapse */ XMessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
181
|
-
/** @nocollapse */ XMessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
180
|
+
/** @nocollapse */ XMessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageService, deps: [{ token: i1$1.XPortalService }, { token: i2$1.XConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
181
|
+
/** @nocollapse */ XMessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageService });
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageService, decorators: [{
|
|
183
183
|
type: Injectable
|
|
184
184
|
}], ctorParameters: function () { return [{ type: i1$1.XPortalService }, { type: i2$1.XConfigService }]; } });
|
|
185
185
|
|
|
186
186
|
class XMessageModule {
|
|
187
187
|
}
|
|
188
|
-
/** @nocollapse */ XMessageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
189
|
-
/** @nocollapse */ XMessageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.
|
|
190
|
-
/** @nocollapse */ XMessageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
188
|
+
/** @nocollapse */ XMessageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
189
|
+
/** @nocollapse */ XMessageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageModule, declarations: [XMessageComponent], imports: [CommonModule, XPortalModule, XAlertModule], exports: [XMessageComponent] });
|
|
190
|
+
/** @nocollapse */ XMessageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageModule, providers: [XMessageService], imports: [[CommonModule, XPortalModule, XAlertModule]] });
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XMessageModule, decorators: [{
|
|
192
192
|
type: NgModule,
|
|
193
193
|
args: [{
|
|
194
194
|
declarations: [XMessageComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-message.js","sources":["../../../../lib/ng-nest/ui/message/message.property.ts","../../../../lib/ng-nest/ui/message/message.component.ts","../../../../lib/ng-nest/ui/message/message.component.html","../../../../lib/ng-nest/ui/message/message.service.ts","../../../../lib/ng-nest/ui/message/message.module.ts","../../../../lib/ng-nest/ui/message/ng-nest-ui-message.ts"],"sourcesContent":["import { XStatus, XPlace } from '@ng-nest/ui/core';\r\nimport { XAlertOption } from '@ng-nest/ui/alert';\r\nimport { Subscription, Subject } from 'rxjs';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XMessageComponent } from './message.component';\r\n\r\n/**\r\n * Message\r\n * @selector x-message\r\n * @decorator component\r\n */\r\nexport const XMessagePrefix = 'x-message';\r\n\r\nexport const XMessagePortal = 'x-message-portal';\r\nexport const X_CONFIG_NAME = 'message';\r\n\r\n/**\r\n * Message Option\r\n */\r\nexport interface XMessageOption extends XAlertOption {\r\n /**\r\n * @zh_CN 方位,九宫格\r\n * @en_US Direction, nine grid\r\n * @default 'top'\r\n * @withConfig true\r\n */\r\n placement?: XPlace;\r\n /**\r\n * @zh_CN 偏移距离\r\n * @en_US Offset distance\r\n * @default '2rem'\r\n * @withConfig true\r\n */\r\n offset?: string | string[];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n * @default 'info'\r\n * @withConfig true\r\n */\r\n type?: XMessageType;\r\n /**\r\n * @zh_CN 多个消息的时候,显示类型\r\n * @en_US When multiple messages, the display type\r\n * @default 'list'\r\n * @withConfig true\r\n */\r\n displayType?: XMessageDisplayType;\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @default '16rem'\r\n * @withConfig true\r\n */\r\n width?: string;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US Height\r\n */\r\n height?: string;\r\n /**\r\n * @zh_CN 延迟关闭时间\r\n * @en_US Delay off time\r\n * @default 3000\r\n * @withConfig true\r\n */\r\n duration?: number;\r\n /**\r\n * @zh_CN 隐藏关闭按钮\r\n * @en_US Hide close button\r\n * @default true\r\n * @withConfig true\r\n */\r\n hideClose?: boolean;\r\n /**\r\n * @zh_CN 显示图标\r\n * @en_US Show icon\r\n * @default true\r\n * @withConfig true\r\n */\r\n showIcon?: boolean;\r\n /**\r\n * @zh_CN 延迟关闭订阅后的对象,用来释放或取消\r\n * @en_US Delayed closing the subscribed object, used to release or cancel\r\n */\r\n duration$?: Subscription | null;\r\n /**\r\n * @zh_CN 延迟关闭订阅对象\r\n * @en_US Delay in closing the subscription object\r\n */\r\n durationSub?: Subject<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XMessageOverlayRef extends XPortalOverlayRef<XMessageComponent> {}\r\n\r\n/**\r\n * @zh_CN 九宫格中的消息对象\r\n * @en_US Message object in Jiugongge\r\n */\r\nexport interface XMessagePlacement {\r\n [property: string]: XMessageRef;\r\n}\r\n\r\nexport interface XMessageRef {\r\n ref: XMessageOverlayRef;\r\n list: XMessageOption[];\r\n currentClose: () => void;\r\n closeAll: () => void;\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XMessageType = XStatus;\r\n\r\n/**\r\n * @zh_CN 多个消息的时候,显示类型\r\n * @en_US When multiple messages, the display type\r\n */\r\nexport type XMessageDisplayType = 'list' | 'single';\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XMoveAnimation, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XMessagePrefix, XMessageOption, XMessageRef } from './message.property';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: `${XMessagePrefix}`,\r\n templateUrl: './message.component.html',\r\n styleUrls: ['./message.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XMoveAnimation]\r\n})\r\nexport class XMessageComponent {\r\n message: XMessageRef = { ref: {}, list: [], currentClose: () => {}, closeAll: () => {} };\r\n\r\n constructor(public renderer: Renderer2, public elementRef: ElementRef, public cdr: ChangeDetectorRef) {}\r\n\r\n onClose(item: XMessageOption) {\r\n this.message.list?.splice(this.message.list.indexOf(item), 1);\r\n item.duration$?.unsubscribe();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n moveDone($event: { toState: string }) {\r\n if ($event.toState === 'void' && XIsEmpty(this.message.list)) {\r\n this.message.ref?.overlayRef?.detach();\r\n }\r\n }\r\n\r\n onEnter(item: XMessageOption) {\r\n item.duration$?.unsubscribe();\r\n }\r\n\r\n onLeave(item: XMessageOption) {\r\n if (item.duration) {\r\n item.duration$ = of(true)\r\n .pipe(delay(item.duration))\r\n .subscribe(() => this.onClose(item));\r\n }\r\n }\r\n\r\n trackByNode(index: number, item: XMessageOption) {\r\n return `${item.title}-${item.content}`;\r\n }\r\n}\r\n","<div class=\"x-message\">\r\n <ng-container *ngFor=\"let item of message.list; trackBy: trackByNode\">\r\n <x-alert\r\n [@x-move-animation]=\"item.placement\"\r\n (@x-move-animation.done)=\"moveDone($event)\"\r\n (mouseenter)=\"onEnter(item)\"\r\n (mouseleave)=\"onLeave(item)\"\r\n (close)=\"onClose(item)\"\r\n [hide]=\"item.hide\"\r\n [title]=\"item.title\"\r\n [content]=\"item.content\"\r\n [type]=\"item.type\"\r\n [effect]=\"item.effect\"\r\n [hideClose]=\"item.hideClose\"\r\n [closeText]=\"item.closeText\"\r\n [showIcon]=\"item.showIcon\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </ng-container>\r\n</div>\r\n","import { Injectable } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, XIsEmpty, fillDefault, XIsString, XConfigService, XMessageConfig } from '@ng-nest/ui/core';\r\nimport {\r\n XMessageOverlayRef,\r\n XMessageType,\r\n XMessagePlacement,\r\n XMessageRef,\r\n XMessagePortal,\r\n XMessageOption,\r\n X_CONFIG_NAME\r\n} from './message.property';\r\nimport { XMessageComponent } from './message.component';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\n\r\n@Injectable()\r\nexport class XMessageService {\r\n messages: XMessagePlacement = {};\r\n\r\n default: XMessageOption = {\r\n type: 'info',\r\n width: '16rem',\r\n placement: 'top',\r\n offset: '2rem',\r\n effect: 'white',\r\n displayType: 'list',\r\n duration: 3000,\r\n hideClose: true,\r\n showIcon: true,\r\n hide: false\r\n };\r\n\r\n configDefault?: XMessageConfig;\r\n\r\n constructor(public portal: XPortalService, public configService: XConfigService) {\r\n this.configDefault = this.configService.getConfigForComponent(X_CONFIG_NAME);\r\n Object.assign(this.default, this.configDefault);\r\n }\r\n\r\n info(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'info');\r\n }\r\n\r\n success(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'success');\r\n }\r\n\r\n warning(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'warning');\r\n }\r\n\r\n error(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'error');\r\n }\r\n\r\n create(option: XMessageOption): XMessageOverlayRef {\r\n const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n\r\n return this.portal.attach({\r\n content: XMessageComponent,\r\n overlayConfig: {\r\n panelClass: XMessagePortal,\r\n positionStrategy: this.portal.setPlace(option.placement, option.width, option.height, ...offset)\r\n }\r\n });\r\n }\r\n\r\n private createMessage(option: XTemplate | XMessageOption, type: XMessageType): XMessageRef {\r\n let opt: XMessageOption;\r\n if (XIsXTemplate(option)) {\r\n opt = { title: option as XTemplate, type: type };\r\n } else {\r\n opt = option as XMessageOption;\r\n opt.type = type;\r\n }\r\n fillDefault(opt, this.default);\r\n return this.createMessagePlacement(opt);\r\n }\r\n\r\n private closeAll(excludeOption?: XMessageOption) {\r\n for (let key in this.messages) {\r\n for (let option of this.messages[key].list) {\r\n option !== excludeOption && this.removeMessage(option);\r\n }\r\n }\r\n }\r\n\r\n private createMessagePlacement(option: XMessageOption): XMessageRef {\r\n if (typeof option.placement === 'undefined') return { ref: {}, list: [], currentClose: () => {}, closeAll: () => {} };\r\n let msgPlacement = this.messages[option.placement];\r\n this.setDuration(option);\r\n if (XIsEmpty(msgPlacement) || !msgPlacement.ref?.overlayRef?.hasAttached()) {\r\n this.messages[option.placement] = {\r\n ref: this.create(option),\r\n list: [option],\r\n currentClose: () => {\r\n this.removeMessage(option);\r\n },\r\n closeAll: () => {\r\n this.closeAll();\r\n }\r\n };\r\n } else {\r\n this.messages[option.placement].list = [...(this.messages[option.placement].list as XMessageOption[]), option];\r\n }\r\n this.messageChange(this.messages[option.placement]);\r\n\r\n option.displayType === 'single' && this.closeAll(option);\r\n\r\n return this.messages[option.placement];\r\n }\r\n\r\n private messageChange(message: XMessageRef) {\r\n if (!message.ref?.overlayRef?.hasAttached() || !message?.ref?.componentRef?.instance) return;\r\n message.ref.componentRef.instance.message = message;\r\n message.ref.componentRef.instance.cdr.detectChanges();\r\n }\r\n\r\n private setDuration(option: XMessageOption) {\r\n if (option.duration) {\r\n option.duration$ = of(true)\r\n .pipe(delay(option.duration))\r\n .subscribe(() => {\r\n this.removeMessage(option);\r\n });\r\n }\r\n }\r\n\r\n private removeMessage(option: XMessageOption) {\r\n if (typeof option.placement === 'undefined') return;\r\n this.messages[option.placement].ref?.componentRef?.instance.onClose(option);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XMessageComponent } from './message.component';\r\nimport { XAlertModule } from '@ng-nest/ui/alert';\r\nimport { XMessageService } from './message.service';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\n\r\n@NgModule({\r\n declarations: [XMessageComponent],\r\n exports: [XMessageComponent],\r\n imports: [CommonModule, XPortalModule, XAlertModule],\r\n providers: [XMessageService]\r\n})\r\nexport class XMessageModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAMA;;;;;MAKa,cAAc,GAAG,YAAY;MAE7B,cAAc,GAAG,mBAAmB;MACpC,aAAa,GAAG;;MCAhB,iBAAiB;IAG5B,YAAmB,QAAmB,EAAS,UAAsB,EAAS,GAAsB;QAAjF,aAAQ,GAAR,QAAQ,CAAW;QAAS,eAAU,GAAV,UAAU,CAAY;QAAS,QAAG,GAAH,GAAG,CAAmB;QAFpG,YAAO,GAAgB,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,SAAQ,EAAE,QAAQ,EAAE,SAAQ,EAAE,CAAC;KAEe;IAExG,OAAO,CAAC,IAAoB;;QAC1B,M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AC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;KACvD;IAEO,WAAW,CAAC,MAAsB;QACxC,IAAI,MAAM,CAAC,QAAQ,EAAE;YACnB,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,IAAI,CAAC;iBACxB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;iBAC5B,SAAS,CAAC;gBACT,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;aAC5B,CAAC,CAAC;SACN;KACF;IAEO,aAAa,CAAC,MAAsB;;QAC1C,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,WAAW;YAAE,OAAO;QACpD,MAAA,MAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,0CAAE,YAAY,0CAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;KAC7E;;+HAnHU,eAAe;mIAAf,eAAe;2FAAf,eAAe;kBAD3B,UAAU;;;MCHE,cAAc;;8HAAd,cAAc;+HAAd,cAAc,iBALV,iBAAiB,aAEtB,YAAY,EAAE,aAAa,EAAE,YAAY,aADzC,iBAAiB;+HAIhB,cAAc,aAFd,CAAC,eAAe,CAAC,YADnB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;2FAGzC,cAAc;kBAN1B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;oBACpD,SAAS,EAAE,CAAC,eAAe,CAAC;iBAC7B;;;ACZD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-message.js","sources":["../../../../lib/ng-nest/ui/message/message.property.ts","../../../../lib/ng-nest/ui/message/message.component.ts","../../../../lib/ng-nest/ui/message/message.component.html","../../../../lib/ng-nest/ui/message/message.service.ts","../../../../lib/ng-nest/ui/message/message.module.ts","../../../../lib/ng-nest/ui/message/ng-nest-ui-message.ts"],"sourcesContent":["import { XStatus, XPlace } from '@ng-nest/ui/core';\r\nimport { XAlertOption } from '@ng-nest/ui/alert';\r\nimport { Subscription, Subject } from 'rxjs';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XMessageComponent } from './message.component';\r\n\r\n/**\r\n * Message\r\n * @selector x-message\r\n * @decorator component\r\n */\r\nexport const XMessagePrefix = 'x-message';\r\n\r\nexport const XMessagePortal = 'x-message-portal';\r\nexport const X_CONFIG_NAME = 'message';\r\n\r\n/**\r\n * Message Option\r\n */\r\nexport interface XMessageOption extends XAlertOption {\r\n /**\r\n * @zh_CN 方位,九宫格\r\n * @en_US Direction, nine grid\r\n * @default 'top'\r\n * @withConfig true\r\n */\r\n placement?: XPlace;\r\n /**\r\n * @zh_CN 偏移距离\r\n * @en_US Offset distance\r\n * @default '2rem'\r\n * @withConfig true\r\n */\r\n offset?: string | string[];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n * @default 'info'\r\n * @withConfig true\r\n */\r\n type?: XMessageType;\r\n /**\r\n * @zh_CN 多个消息的时候,显示类型\r\n * @en_US When multiple messages, the display type\r\n * @default 'list'\r\n * @withConfig true\r\n */\r\n displayType?: XMessageDisplayType;\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @default '16rem'\r\n * @withConfig true\r\n */\r\n width?: string;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US Height\r\n */\r\n height?: string;\r\n /**\r\n * @zh_CN 延迟关闭时间\r\n * @en_US Delay off time\r\n * @default 3000\r\n * @withConfig true\r\n */\r\n duration?: number;\r\n /**\r\n * @zh_CN 隐藏关闭按钮\r\n * @en_US Hide close button\r\n * @default true\r\n * @withConfig true\r\n */\r\n hideClose?: boolean;\r\n /**\r\n * @zh_CN 显示图标\r\n * @en_US Show icon\r\n * @default true\r\n * @withConfig true\r\n */\r\n showIcon?: boolean;\r\n /**\r\n * @zh_CN 延迟关闭订阅后的对象,用来释放或取消\r\n * @en_US Delayed closing the subscribed object, used to release or cancel\r\n */\r\n duration$?: Subscription | null;\r\n /**\r\n * @zh_CN 延迟关闭订阅对象\r\n * @en_US Delay in closing the subscription object\r\n */\r\n durationSub?: Subject<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XMessageOverlayRef extends XPortalOverlayRef<XMessageComponent> {}\r\n\r\n/**\r\n * @zh_CN 九宫格中的消息对象\r\n * @en_US Message object in Jiugongge\r\n */\r\nexport interface XMessagePlacement {\r\n [property: string]: XMessageRef;\r\n}\r\n\r\nexport interface XMessageRef {\r\n ref: XMessageOverlayRef;\r\n list: XMessageOption[];\r\n currentClose: () => void;\r\n closeAll: () => void;\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XMessageType = XStatus;\r\n\r\n/**\r\n * @zh_CN 多个消息的时候,显示类型\r\n * @en_US When multiple messages, the display type\r\n */\r\nexport type XMessageDisplayType = 'list' | 'single';\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XMoveAnimation, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XMessagePrefix, XMessageOption, XMessageRef } from './message.property';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: `${XMessagePrefix}`,\r\n templateUrl: './message.component.html',\r\n styleUrls: ['./message.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XMoveAnimation]\r\n})\r\nexport class XMessageComponent {\r\n message: XMessageRef = { ref: {}, list: [], currentClose: () => {}, closeAll: () => {} };\r\n\r\n constructor(public renderer: Renderer2, public elementRef: ElementRef, public cdr: ChangeDetectorRef) {}\r\n\r\n onClose(item: XMessageOption) {\r\n this.message.list?.splice(this.message.list.indexOf(item), 1);\r\n item.duration$?.unsubscribe();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n moveDone($event: { toState: string }) {\r\n if ($event.toState === 'void' && XIsEmpty(this.message.list)) {\r\n this.message.ref?.overlayRef?.detach();\r\n }\r\n }\r\n\r\n onEnter(item: XMessageOption) {\r\n item.duration$?.unsubscribe();\r\n }\r\n\r\n onLeave(item: XMessageOption) {\r\n if (item.duration) {\r\n item.duration$ = of(true)\r\n .pipe(delay(item.duration))\r\n .subscribe(() => this.onClose(item));\r\n }\r\n }\r\n\r\n trackByNode(_index: number, item: XMessageOption) {\r\n return `${item.title}-${item.content}`;\r\n }\r\n}\r\n","<div class=\"x-message\">\r\n <ng-container *ngFor=\"let item of message.list; trackBy: trackByNode\">\r\n <x-alert\r\n [@x-move-animation]=\"item.placement\"\r\n (@x-move-animation.done)=\"moveDone($event)\"\r\n (mouseenter)=\"onEnter(item)\"\r\n (mouseleave)=\"onLeave(item)\"\r\n (close)=\"onClose(item)\"\r\n [hide]=\"item.hide\"\r\n [title]=\"item.title\"\r\n [content]=\"item.content\"\r\n [type]=\"item.type\"\r\n [effect]=\"item.effect\"\r\n [hideClose]=\"item.hideClose\"\r\n [closeText]=\"item.closeText\"\r\n [showIcon]=\"item.showIcon\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </ng-container>\r\n</div>\r\n","import { Injectable } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, XIsEmpty, fillDefault, XIsString, XConfigService, XMessageConfig } from '@ng-nest/ui/core';\r\nimport {\r\n XMessageOverlayRef,\r\n XMessageType,\r\n XMessagePlacement,\r\n XMessageRef,\r\n XMessagePortal,\r\n XMessageOption,\r\n X_CONFIG_NAME\r\n} from './message.property';\r\nimport { XMessageComponent } from './message.component';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\n\r\n@Injectable()\r\nexport class XMessageService {\r\n messages: XMessagePlacement = {};\r\n\r\n default: XMessageOption = {\r\n type: 'info',\r\n width: '16rem',\r\n placement: 'top',\r\n offset: '2rem',\r\n effect: 'white',\r\n displayType: 'list',\r\n duration: 3000,\r\n hideClose: true,\r\n showIcon: true,\r\n hide: false\r\n };\r\n\r\n configDefault?: XMessageConfig;\r\n\r\n constructor(public portal: XPortalService, public configService: XConfigService) {\r\n this.configDefault = this.configService.getConfigForComponent(X_CONFIG_NAME);\r\n Object.assign(this.default, this.configDefault);\r\n }\r\n\r\n info(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'info');\r\n }\r\n\r\n success(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'success');\r\n }\r\n\r\n warning(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'warning');\r\n }\r\n\r\n error(option: XTemplate | XMessageOption): XMessageRef {\r\n return this.createMessage(option, 'error');\r\n }\r\n\r\n create(option: XMessageOption): XMessageOverlayRef {\r\n const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n\r\n return this.portal.attach({\r\n content: XMessageComponent,\r\n overlayConfig: {\r\n panelClass: XMessagePortal,\r\n positionStrategy: this.portal.setPlace(option.placement, option.width, option.height, ...offset)\r\n }\r\n });\r\n }\r\n\r\n private createMessage(option: XTemplate | XMessageOption, type: XMessageType): XMessageRef {\r\n let opt: XMessageOption;\r\n if (XIsXTemplate(option)) {\r\n opt = { title: option as XTemplate, type: type };\r\n } else {\r\n opt = option as XMessageOption;\r\n opt.type = type;\r\n }\r\n fillDefault(opt, this.default);\r\n return this.createMessagePlacement(opt);\r\n }\r\n\r\n private closeAll(excludeOption?: XMessageOption) {\r\n for (let key in this.messages) {\r\n for (let option of this.messages[key].list) {\r\n option !== excludeOption && this.removeMessage(option);\r\n }\r\n }\r\n }\r\n\r\n private createMessagePlacement(option: XMessageOption): XMessageRef {\r\n if (typeof option.placement === 'undefined') return { ref: {}, list: [], currentClose: () => {}, closeAll: () => {} };\r\n let msgPlacement = this.messages[option.placement];\r\n this.setDuration(option);\r\n if (XIsEmpty(msgPlacement) || !msgPlacement.ref?.overlayRef?.hasAttached()) {\r\n this.messages[option.placement] = {\r\n ref: this.create(option),\r\n list: [option],\r\n currentClose: () => {\r\n this.removeMessage(option);\r\n },\r\n closeAll: () => {\r\n this.closeAll();\r\n }\r\n };\r\n } else {\r\n this.messages[option.placement].list = [...(this.messages[option.placement].list as XMessageOption[]), option];\r\n }\r\n this.messageChange(this.messages[option.placement]);\r\n\r\n option.displayType === 'single' && this.closeAll(option);\r\n\r\n return this.messages[option.placement];\r\n }\r\n\r\n private messageChange(message: XMessageRef) {\r\n if (!message.ref?.overlayRef?.hasAttached() || !message?.ref?.componentRef?.instance) return;\r\n message.ref.componentRef.instance.message = message;\r\n message.ref.componentRef.instance.cdr.detectChanges();\r\n }\r\n\r\n private setDuration(option: XMessageOption) {\r\n if (option.duration) {\r\n option.duration$ = of(true)\r\n .pipe(delay(option.duration))\r\n .subscribe(() => {\r\n this.removeMessage(option);\r\n });\r\n }\r\n }\r\n\r\n private removeMessage(option: XMessageOption) {\r\n if (typeof option.placement === 'undefined') return;\r\n this.messages[option.placement].ref?.componentRef?.instance.onClose(option);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XMessageComponent } from './message.component';\r\nimport { XAlertModule } from '@ng-nest/ui/alert';\r\nimport { XMessageService } from './message.service';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\n\r\n@NgModule({\r\n declarations: [XMessageComponent],\r\n exports: [XMessageComponent],\r\n imports: [CommonModule, XPortalModule, XAlertModule],\r\n providers: [XMessageService]\r\n})\r\nexport class XMessageModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAMA;;;;;MAKa,cAAc,GAAG,YAAY;M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,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;oBACpD,SAAS,EAAE,CAAC,eAAe,CAAC;iBAC7B;;;ACZD;;;;;;"}
|
|
@@ -49,13 +49,13 @@ class XNotificationComponent {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
trackByItem(
|
|
52
|
+
trackByItem(_index, item) {
|
|
53
53
|
return `${item.title}-${item.content}`;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
/** @nocollapse */ XNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
57
|
-
/** @nocollapse */ XNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
56
|
+
/** @nocollapse */ XNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
/** @nocollapse */ XNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XNotificationComponent, selector: "x-notification", ngImport: i0, template: "<div class=\"x-notification\">\r\n <ng-container *ngFor=\"let item of notification.list; trackBy: trackByItem\">\r\n <x-alert\r\n [@x-move-animation]=\"item.placement\"\r\n (@x-move-animation.done)=\"moveDone($event)\"\r\n (mouseenter)=\"onEnter(item)\"\r\n (mouseleave)=\"onLeave(item)\"\r\n (close)=\"onClose(item)\"\r\n [hide]=\"item.hide\"\r\n [title]=\"item.title\"\r\n [content]=\"item.content\"\r\n [type]=\"item.type\"\r\n [effect]=\"item.effect\"\r\n [hideClose]=\"item.hideClose\"\r\n [closeText]=\"item.closeText\"\r\n [showIcon]=\"item.showIcon\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </ng-container>\r\n</div>\r\n", styles: [".x-notification{margin:0;padding:0}.x-notification>x-alert{padding:.25rem}.x-notification>x-alert>.x-alert{box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color)}.x-notification>x-alert .x-alert-icon.x-icon{margin-top:.125rem;font-size:1.25rem;align-self:flex-start}.x-notification-portal x-notification{width:100%}\n"], components: [{ type: i1.XAlertComponent, selector: "x-alert" }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [XMoveAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationComponent, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
60
|
args: [{
|
|
61
61
|
selector: `${XNotificationPrefix}`,
|
|
@@ -157,18 +157,18 @@ class XNotificationService {
|
|
|
157
157
|
(_b = (_a = this.notifications[option.placement].ref) === null || _a === void 0 ? void 0 : _a.componentRef) === null || _b === void 0 ? void 0 : _b.instance.onClose(option);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
/** @nocollapse */ XNotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
161
|
-
/** @nocollapse */ XNotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
160
|
+
/** @nocollapse */ XNotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationService, deps: [{ token: i1$1.XPortalService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
161
|
+
/** @nocollapse */ XNotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationService });
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationService, decorators: [{
|
|
163
163
|
type: Injectable
|
|
164
164
|
}], ctorParameters: function () { return [{ type: i1$1.XPortalService }]; } });
|
|
165
165
|
|
|
166
166
|
class XNotificationModule {
|
|
167
167
|
}
|
|
168
|
-
/** @nocollapse */ XNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
169
|
-
/** @nocollapse */ XNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.
|
|
170
|
-
/** @nocollapse */ XNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
168
|
+
/** @nocollapse */ XNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
169
|
+
/** @nocollapse */ XNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationModule, declarations: [XNotificationComponent], imports: [CommonModule, XPortalModule, XAlertModule], exports: [XNotificationComponent] });
|
|
170
|
+
/** @nocollapse */ XNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationModule, providers: [XNotificationService], imports: [[CommonModule, XPortalModule, XAlertModule]] });
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XNotificationModule, decorators: [{
|
|
172
172
|
type: NgModule,
|
|
173
173
|
args: [{
|
|
174
174
|
declarations: [XNotificationComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-notification.js","sources":["../../../../lib/ng-nest/ui/notification/notification.property.ts","../../../../lib/ng-nest/ui/notification/notification.component.ts","../../../../lib/ng-nest/ui/notification/notification.component.html","../../../../lib/ng-nest/ui/notification/notification.service.ts","../../../../lib/ng-nest/ui/notification/notification.module.ts","../../../../lib/ng-nest/ui/notification/ng-nest-ui-notification.ts"],"sourcesContent":["import { ComponentRef } from '@angular/core';\r\nimport { XStatus, XCorner } from '@ng-nest/ui/core';\r\nimport { XAlertOption } from '@ng-nest/ui/alert';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { XNotificationComponent } from './notification.component';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { Subscription, Subject } from 'rxjs';\r\n\r\n/**\r\n * Notification\r\n * @selector x-notification\r\n * @decorator component\r\n */\r\nexport const XNotificationPrefix = 'x-notification';\r\n\r\nexport const XNotificationPortal = 'x-notification-portal';\r\n\r\n/**\r\n * Notification Option\r\n */\r\nexport interface XNotificationOption extends XAlertOption {\r\n /**\r\n * @zh_CN 方位\r\n * @en_US Placement\r\n * @default 'top-end'\r\n */\r\n placement?: XCorner;\r\n /**\r\n * @zh_CN 偏移距离\r\n * @en_US Offset distance\r\n * @default '0.5rem'\r\n */\r\n offset?: string | string[];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n * @default 'info'\r\n */\r\n type?: XNotificationType;\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @default '20rem'\r\n */\r\n width?: string;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US Height\r\n */\r\n height?: string;\r\n /**\r\n * @zh_CN 延迟关闭时间\r\n * @en_US Delay off time\r\n * @default 4500\r\n */\r\n duration?: number;\r\n /**\r\n * @zh_CN 隐藏关闭按钮\r\n * @en_US Hide close button\r\n * @default true\r\n */\r\n hideClose?: boolean;\r\n /**\r\n * @zh_CN 显示图标\r\n * @en_US Show icon\r\n * @default true\r\n */\r\n showIcon?: boolean;\r\n /**\r\n * @zh_CN 延迟关闭订阅后的对象,用来释放或取消\r\n * @en_US Delayed closing the subscribed object, used to release or cancel\r\n */\r\n duration$?: Subscription | null;\r\n /**\r\n * @zh_CN 延迟关闭订阅对象\r\n * @en_US Delay in closing the subscription object\r\n */\r\n durationSub?: Subject<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XNotificationOverlayRef extends XPortalOverlayRef<XNotificationComponent> {}\r\n\r\n/**\r\n * @zh_CN 九宫格中的消息对象\r\n * @en_US Message object in nine grid\r\n */\r\nexport interface XNotificationPlacement {\r\n [property: string]: XNotificationRef;\r\n}\r\n\r\nexport interface XNotificationRef {\r\n ref?: XNotificationOverlayRef;\r\n list?: XNotificationOption[];\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XNotificationType = XStatus;\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XMoveAnimation, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XNotificationPrefix, XNotificationOption, XNotificationRef } from './notification.property';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: `${XNotificationPrefix}`,\r\n templateUrl: './notification.component.html',\r\n styleUrls: ['./notification.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XMoveAnimation]\r\n})\r\nexport class XNotificationComponent {\r\n notification: XNotificationRef = { list: [] };\r\n\r\n constructor(public renderer: Renderer2, public elementRef: ElementRef, public cdr: ChangeDetectorRef) {}\r\n\r\n onClose(item: XNotificationOption) {\r\n this.notification.list?.splice(this.notification.list.indexOf(item), 1);\r\n item.duration$ && item.duration$.unsubscribe();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n moveDone($event: { toState: string }) {\r\n if ($event.toState === 'void' && XIsEmpty(this.notification.list)) {\r\n this.notification.ref?.overlayRef?.detach();\r\n }\r\n }\r\n\r\n onEnter(item: XNotificationOption) {\r\n item.duration$ && item.duration$.unsubscribe();\r\n }\r\n\r\n onLeave(item: XNotificationOption) {\r\n if (item.duration) {\r\n item.duration$ = of(true)\r\n .pipe(delay(item.duration))\r\n .subscribe(() => {\r\n this.onClose(item);\r\n });\r\n }\r\n }\r\n\r\n trackByItem(index: number, item: XNotificationOption) {\r\n return `${item.title}-${item.content}`;\r\n }\r\n}\r\n","<div class=\"x-notification\">\r\n <ng-container *ngFor=\"let item of notification.list; trackBy: trackByItem\">\r\n <x-alert\r\n [@x-move-animation]=\"item.placement\"\r\n (@x-move-animation.done)=\"moveDone($event)\"\r\n (mouseenter)=\"onEnter(item)\"\r\n (mouseleave)=\"onLeave(item)\"\r\n (close)=\"onClose(item)\"\r\n [hide]=\"item.hide\"\r\n [title]=\"item.title\"\r\n [content]=\"item.content\"\r\n [type]=\"item.type\"\r\n [effect]=\"item.effect\"\r\n [hideClose]=\"item.hideClose\"\r\n [closeText]=\"item.closeText\"\r\n [showIcon]=\"item.showIcon\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </ng-container>\r\n</div>\r\n","import { Injectable } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, fillDefault, XIsEmpty, XIsString } from '@ng-nest/ui/core';\r\nimport {\r\n XNotificationOption,\r\n XNotificationOverlayRef,\r\n XNotificationType,\r\n XNotificationPlacement,\r\n XNotificationRef,\r\n XNotificationPortal\r\n} from './notification.property';\r\nimport { XNotificationComponent } from './notification.component';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\n\r\n@Injectable()\r\nexport class XNotificationService {\r\n notifications: XNotificationPlacement = {};\r\n\r\n default: XNotificationOption = {\r\n type: 'info',\r\n width: '20rem',\r\n placement: 'top-end',\r\n offset: '0.5rem',\r\n effect: 'white',\r\n duration: 4500,\r\n showIcon: true\r\n };\r\n\r\n constructor(public portal: XPortalService) {}\r\n\r\n info(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'info');\r\n }\r\n\r\n success(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'success');\r\n }\r\n\r\n warning(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'warning');\r\n }\r\n\r\n error(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'error');\r\n }\r\n\r\n create(option: XNotificationOption): XNotificationOverlayRef {\r\n const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n return this.portal.attach({\r\n content: XNotificationComponent,\r\n overlayConfig: {\r\n panelClass: XNotificationPortal,\r\n positionStrategy: this.portal.setPlace(option.placement, option.width, option.height, ...offset)\r\n }\r\n });\r\n }\r\n\r\n private createNotification(option: XTemplate | XNotificationOption, type: XNotificationType): XNotificationRef {\r\n let opt: XNotificationOption;\r\n if (XIsXTemplate(option)) {\r\n opt = { title: option as XTemplate, type: type };\r\n } else {\r\n opt = option as XNotificationOption;\r\n opt.type = type;\r\n }\r\n fillDefault(opt, this.default);\r\n return this.createNotificationPlacement(opt);\r\n }\r\n\r\n private createNotificationPlacement(option: XNotificationOption): XNotificationRef {\r\n if (typeof option.placement === 'undefined') return {};\r\n let msgPlacement = this.notifications[option.placement];\r\n this.setDuration(option);\r\n if (XIsEmpty(msgPlacement) || !msgPlacement.ref?.overlayRef?.hasAttached()) {\r\n this.notifications[option.placement] = {\r\n ref: this.create(option),\r\n list: [option]\r\n };\r\n } else {\r\n this.notifications[option.placement].list = [...(this.notifications[option.placement].list as XNotificationOption[]), option];\r\n }\r\n this.notificationChange(this.notifications[option.placement]);\r\n\r\n return this.notifications[option.placement];\r\n }\r\n\r\n private notificationChange(notification: XNotificationRef) {\r\n if (!notification.ref?.overlayRef?.hasAttached() || !notification?.ref?.componentRef?.instance) return;\r\n notification.ref.componentRef.instance.notification = notification;\r\n notification.ref.componentRef.instance.cdr.detectChanges();\r\n }\r\n\r\n private setDuration(option: XNotificationOption) {\r\n if (option.duration) {\r\n option.duration$ = of(true)\r\n .pipe(delay(option.duration))\r\n .subscribe(() => {\r\n this.removeNotification(option);\r\n option.duration$ && option.duration$.unsubscribe();\r\n });\r\n }\r\n }\r\n\r\n private removeNotification(option: XNotificationOption) {\r\n if (typeof option.placement === 'undefined') return;\r\n this.notifications[option.placement].ref?.componentRef?.instance.onClose(option);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XNotificationComponent } from './notification.component';\r\nimport { XAlertModule } from '@ng-nest/ui/alert';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XNotificationService } from './notification.service';\r\n\r\n@NgModule({\r\n declarations: [XNotificationComponent],\r\n exports: [XNotificationComponent],\r\n imports: [CommonModule, XPortalModule, XAlertModule],\r\n providers: [XNotificationService]\r\n})\r\nexport class XNotificationModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAQA;;;;;MAKa,mBAAmB,GAAG,iBAAiB;MAEvC,mBAAmB,GAAG;;MCDtB,sBAAsB;IAGjC,YAAmB,QAAmB,EAAS,UAAsB,EAAS,GAAsB;QAAjF,aAAQ,GAAR,QAAQ,CAAW;QAAS,eAAU,GAAV,UAAU,CAAY;QAAS,QAAG,GAAH,GAAG,CAAmB;QAFpG,iBAAY,GAAqB,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;KAE0D;IAExG,OAAO,CAAC,IAAyB;;QAC/B,MAAA,I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AAY,aADzC,sBAAsB;oIAIrB,mBAAmB,aAFnB,CAAC,oBAAoB,CAAC,YADxB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;2FAGzC,mBAAmB;kBAN/B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;oBACpD,SAAS,EAAE,CAAC,oBAAoB,CAAC;iBAClC;;;ACZD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-notification.js","sources":["../../../../lib/ng-nest/ui/notification/notification.property.ts","../../../../lib/ng-nest/ui/notification/notification.component.ts","../../../../lib/ng-nest/ui/notification/notification.component.html","../../../../lib/ng-nest/ui/notification/notification.service.ts","../../../../lib/ng-nest/ui/notification/notification.module.ts","../../../../lib/ng-nest/ui/notification/ng-nest-ui-notification.ts"],"sourcesContent":["import { XStatus, XCorner } from '@ng-nest/ui/core';\r\nimport { XAlertOption } from '@ng-nest/ui/alert';\r\nimport { XNotificationComponent } from './notification.component';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { Subscription, Subject } from 'rxjs';\r\n\r\n/**\r\n * Notification\r\n * @selector x-notification\r\n * @decorator component\r\n */\r\nexport const XNotificationPrefix = 'x-notification';\r\n\r\nexport const XNotificationPortal = 'x-notification-portal';\r\n\r\n/**\r\n * Notification Option\r\n */\r\nexport interface XNotificationOption extends XAlertOption {\r\n /**\r\n * @zh_CN 方位\r\n * @en_US Placement\r\n * @default 'top-end'\r\n */\r\n placement?: XCorner;\r\n /**\r\n * @zh_CN 偏移距离\r\n * @en_US Offset distance\r\n * @default '0.5rem'\r\n */\r\n offset?: string | string[];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n * @default 'info'\r\n */\r\n type?: XNotificationType;\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @default '20rem'\r\n */\r\n width?: string;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US Height\r\n */\r\n height?: string;\r\n /**\r\n * @zh_CN 延迟关闭时间\r\n * @en_US Delay off time\r\n * @default 4500\r\n */\r\n duration?: number;\r\n /**\r\n * @zh_CN 隐藏关闭按钮\r\n * @en_US Hide close button\r\n * @default true\r\n */\r\n hideClose?: boolean;\r\n /**\r\n * @zh_CN 显示图标\r\n * @en_US Show icon\r\n * @default true\r\n */\r\n showIcon?: boolean;\r\n /**\r\n * @zh_CN 延迟关闭订阅后的对象,用来释放或取消\r\n * @en_US Delayed closing the subscribed object, used to release or cancel\r\n */\r\n duration$?: Subscription | null;\r\n /**\r\n * @zh_CN 延迟关闭订阅对象\r\n * @en_US Delay in closing the subscription object\r\n */\r\n durationSub?: Subject<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XNotificationOverlayRef extends XPortalOverlayRef<XNotificationComponent> {}\r\n\r\n/**\r\n * @zh_CN 九宫格中的消息对象\r\n * @en_US Message object in nine grid\r\n */\r\nexport interface XNotificationPlacement {\r\n [property: string]: XNotificationRef;\r\n}\r\n\r\nexport interface XNotificationRef {\r\n ref?: XNotificationOverlayRef;\r\n list?: XNotificationOption[];\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XNotificationType = XStatus;\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XMoveAnimation, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XNotificationPrefix, XNotificationOption, XNotificationRef } from './notification.property';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: `${XNotificationPrefix}`,\r\n templateUrl: './notification.component.html',\r\n styleUrls: ['./notification.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XMoveAnimation]\r\n})\r\nexport class XNotificationComponent {\r\n notification: XNotificationRef = { list: [] };\r\n\r\n constructor(public renderer: Renderer2, public elementRef: ElementRef, public cdr: ChangeDetectorRef) {}\r\n\r\n onClose(item: XNotificationOption) {\r\n this.notification.list?.splice(this.notification.list.indexOf(item), 1);\r\n item.duration$ && item.duration$.unsubscribe();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n moveDone($event: { toState: string }) {\r\n if ($event.toState === 'void' && XIsEmpty(this.notification.list)) {\r\n this.notification.ref?.overlayRef?.detach();\r\n }\r\n }\r\n\r\n onEnter(item: XNotificationOption) {\r\n item.duration$ && item.duration$.unsubscribe();\r\n }\r\n\r\n onLeave(item: XNotificationOption) {\r\n if (item.duration) {\r\n item.duration$ = of(true)\r\n .pipe(delay(item.duration))\r\n .subscribe(() => {\r\n this.onClose(item);\r\n });\r\n }\r\n }\r\n\r\n trackByItem(_index: number, item: XNotificationOption) {\r\n return `${item.title}-${item.content}`;\r\n }\r\n}\r\n","<div class=\"x-notification\">\r\n <ng-container *ngFor=\"let item of notification.list; trackBy: trackByItem\">\r\n <x-alert\r\n [@x-move-animation]=\"item.placement\"\r\n (@x-move-animation.done)=\"moveDone($event)\"\r\n (mouseenter)=\"onEnter(item)\"\r\n (mouseleave)=\"onLeave(item)\"\r\n (close)=\"onClose(item)\"\r\n [hide]=\"item.hide\"\r\n [title]=\"item.title\"\r\n [content]=\"item.content\"\r\n [type]=\"item.type\"\r\n [effect]=\"item.effect\"\r\n [hideClose]=\"item.hideClose\"\r\n [closeText]=\"item.closeText\"\r\n [showIcon]=\"item.showIcon\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </ng-container>\r\n</div>\r\n","import { Injectable } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, fillDefault, XIsEmpty, XIsString } from '@ng-nest/ui/core';\r\nimport {\r\n XNotificationOption,\r\n XNotificationOverlayRef,\r\n XNotificationType,\r\n XNotificationPlacement,\r\n XNotificationRef,\r\n XNotificationPortal\r\n} from './notification.property';\r\nimport { XNotificationComponent } from './notification.component';\r\nimport { of } from 'rxjs';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\n\r\n@Injectable()\r\nexport class XNotificationService {\r\n notifications: XNotificationPlacement = {};\r\n\r\n default: XNotificationOption = {\r\n type: 'info',\r\n width: '20rem',\r\n placement: 'top-end',\r\n offset: '0.5rem',\r\n effect: 'white',\r\n duration: 4500,\r\n showIcon: true\r\n };\r\n\r\n constructor(public portal: XPortalService) {}\r\n\r\n info(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'info');\r\n }\r\n\r\n success(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'success');\r\n }\r\n\r\n warning(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'warning');\r\n }\r\n\r\n error(option: XTemplate | XNotificationOption): XNotificationRef {\r\n return this.createNotification(option, 'error');\r\n }\r\n\r\n create(option: XNotificationOption): XNotificationOverlayRef {\r\n const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n return this.portal.attach({\r\n content: XNotificationComponent,\r\n overlayConfig: {\r\n panelClass: XNotificationPortal,\r\n positionStrategy: this.portal.setPlace(option.placement, option.width, option.height, ...offset)\r\n }\r\n });\r\n }\r\n\r\n private createNotification(option: XTemplate | XNotificationOption, type: XNotificationType): XNotificationRef {\r\n let opt: XNotificationOption;\r\n if (XIsXTemplate(option)) {\r\n opt = { title: option as XTemplate, type: type };\r\n } else {\r\n opt = option as XNotificationOption;\r\n opt.type = type;\r\n }\r\n fillDefault(opt, this.default);\r\n return this.createNotificationPlacement(opt);\r\n }\r\n\r\n private createNotificationPlacement(option: XNotificationOption): XNotificationRef {\r\n if (typeof option.placement === 'undefined') return {};\r\n let msgPlacement = this.notifications[option.placement];\r\n this.setDuration(option);\r\n if (XIsEmpty(msgPlacement) || !msgPlacement.ref?.overlayRef?.hasAttached()) {\r\n this.notifications[option.placement] = {\r\n ref: this.create(option),\r\n list: [option]\r\n };\r\n } else {\r\n this.notifications[option.placement].list = [...(this.notifications[option.placement].list as XNotificationOption[]), option];\r\n }\r\n this.notificationChange(this.notifications[option.placement]);\r\n\r\n return this.notifications[option.placement];\r\n }\r\n\r\n private notificationChange(notification: XNotificationRef) {\r\n if (!notification.ref?.overlayRef?.hasAttached() || !notification?.ref?.componentRef?.instance) return;\r\n notification.ref.componentRef.instance.notification = notification;\r\n notification.ref.componentRef.instance.cdr.detectChanges();\r\n }\r\n\r\n private setDuration(option: XNotificationOption) {\r\n if (option.duration) {\r\n option.duration$ = of(true)\r\n .pipe(delay(option.duration))\r\n .subscribe(() => {\r\n this.removeNotification(option);\r\n option.duration$ && option.duration$.unsubscribe();\r\n });\r\n }\r\n }\r\n\r\n private removeNotification(option: XNotificationOption) {\r\n if (typeof option.placement === 'undefined') return;\r\n this.notifications[option.placement].ref?.componentRef?.instance.onClose(option);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XNotificationComponent } from './notification.component';\r\nimport { XAlertModule } from '@ng-nest/ui/alert';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XNotificationService } from './notification.service';\r\n\r\n@NgModule({\r\n declarations: [XNotificationComponent],\r\n exports: [XNotificationComponent],\r\n imports: [CommonModule, XPortalModule, XAlertModule],\r\n providers: [XNotificationService]\r\n})\r\nexport class XNotificationModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA;;;;;MAKa,mBAAmB,GAAG,iBAAiB;MAEvC,mBAAmB,GAAG;;MCCtB,sBAAsB;IAGjC,YAAmB,QAAmB,EAAS,UAAsB,EAAS,GAAsB;QAAjF,aAAQ,GAAR,QAAQ,CAAW;QAAS,eAAU,GAAV,UAAU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B;wIAApB,oBAAoB;2FAApB,oBAAoB;kBADhC,UAAU;;;MCFE,mBAAmB;;mIAAnB,mBAAmB;oIAAnB,mBAAmB,iBALf,sBAAsB,aAE3B,YAAY,EAAE,aAAa,EAAE,YAAY,aADzC,sBAAsB;oIAIrB,mBAAmB,aAFnB,CAAC,oBAAoB,CAAC,YADxB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;2FAGzC,mBAAmB;kBAN/B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;oBACpD,SAAS,EAAE,CAAC,oBAAoB,CAAC;iBAClC;;;ACZD;;;;;;"}
|
|
@@ -63,9 +63,9 @@ class XOutletDirective {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
/** @nocollapse */ XOutletDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
67
|
-
/** @nocollapse */ XOutletDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
66
|
+
/** @nocollapse */ XOutletDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XOutletDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
67
|
+
/** @nocollapse */ XOutletDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.5", type: XOutletDirective, selector: "[xOutlet]", inputs: { xOutletContext: "xOutletContext", xOutlet: "xOutlet" }, usesOnChanges: true, ngImport: i0 });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XOutletDirective, decorators: [{
|
|
69
69
|
type: Directive,
|
|
70
70
|
args: [{ selector: '[xOutlet]' }]
|
|
71
71
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { xOutletContext: [{
|
|
@@ -76,10 +76,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.3", ngImpor
|
|
|
76
76
|
|
|
77
77
|
class XOutletModule {
|
|
78
78
|
}
|
|
79
|
-
/** @nocollapse */ XOutletModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
80
|
-
/** @nocollapse */ XOutletModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.
|
|
81
|
-
/** @nocollapse */ XOutletModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
79
|
+
/** @nocollapse */ XOutletModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XOutletModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
80
|
+
/** @nocollapse */ XOutletModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XOutletModule, declarations: [XOutletDirective], imports: [CommonModule], exports: [XOutletDirective] });
|
|
81
|
+
/** @nocollapse */ XOutletModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XOutletModule, imports: [[CommonModule]] });
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XOutletModule, decorators: [{
|
|
83
83
|
type: NgModule,
|
|
84
84
|
args: [{
|
|
85
85
|
declarations: [XOutletDirective],
|
|
@@ -30,15 +30,15 @@ class XPageHeaderProperty {
|
|
|
30
30
|
this.backClick = new EventEmitter();
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
/** @nocollapse */ XPageHeaderProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
34
|
-
/** @nocollapse */ XPageHeaderProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.
|
|
33
|
+
/** @nocollapse */ XPageHeaderProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderProperty, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
/** @nocollapse */ XPageHeaderProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XPageHeaderProperty, selector: "ng-component", inputs: { backIcon: "backIcon", backText: "backText", title: "title", subTitle: "subTitle" }, outputs: { backClick: "backClick" }, ngImport: i0, template: '', isInline: true });
|
|
35
35
|
__decorate([
|
|
36
36
|
XWithConfig(X_CONFIG_NAME, 'fto-arrow-left')
|
|
37
37
|
], XPageHeaderProperty.prototype, "backIcon", void 0);
|
|
38
38
|
__decorate([
|
|
39
39
|
XWithConfig(X_CONFIG_NAME)
|
|
40
40
|
], XPageHeaderProperty.prototype, "backText", void 0);
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderProperty, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
43
|
args: [{ template: '' }]
|
|
44
44
|
}], propDecorators: { backIcon: [{
|
|
@@ -78,9 +78,9 @@ class XPageHeaderComponent extends XPageHeaderProperty {
|
|
|
78
78
|
this._unSubject.unsubscribe();
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
/** @nocollapse */ XPageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
82
|
-
/** @nocollapse */ XPageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
81
|
+
/** @nocollapse */ XPageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderComponent, deps: [{ token: i1.XConfigService }, { token: i0.ChangeDetectorRef }, { token: i2.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
/** @nocollapse */ XPageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XPageHeaderComponent, selector: "x-page-header", usesInheritance: true, ngImport: i0, template: "<div class=\"x-page-header\">\r\n <x-button class=\"x-page-header-backIcon\" [icon]=\"backIcon\" type=\"text\" (click)=\"backClick.emit()\">{{ getBackText }}</x-button>\r\n <span class=\"x-page-header-divided\"></span>\r\n <span class=\"x-page-header-title\" *ngIf=\"title\">{{ title }}</span>\r\n <span class=\"x-page-header-subTitle\" *ngIf=\"subTitle\">{{ subTitle }}</span>\r\n</div>\r\n", styles: [".x-page-header{margin:0;padding:0;display:inline-flex;align-items:center;height:var(--x-height-large)}.x-page-header-backIcon .x-button{font-size:.875rem}.x-page-header-divided{margin:0 .875rem 0 .25rem;height:1rem;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-page-header-title{font-size:1rem}.x-page-header-subTitle{font-size:.75rem;color:var(--x-text-400);margin-left:.5rem}\n"], components: [{ type: i3.XButtonComponent, selector: "x-button" }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderComponent, decorators: [{
|
|
84
84
|
type: Component,
|
|
85
85
|
args: [{
|
|
86
86
|
selector: `${XPageHeaderPrefix}`,
|
|
@@ -93,10 +93,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.3", ngImpor
|
|
|
93
93
|
|
|
94
94
|
class XPageHeaderModule {
|
|
95
95
|
}
|
|
96
|
-
/** @nocollapse */ XPageHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
97
|
-
/** @nocollapse */ XPageHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.
|
|
98
|
-
/** @nocollapse */ XPageHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.
|
|
99
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
96
|
+
/** @nocollapse */ XPageHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
97
|
+
/** @nocollapse */ XPageHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderModule, declarations: [XPageHeaderComponent, XPageHeaderProperty], imports: [CommonModule, XButtonModule], exports: [XPageHeaderComponent] });
|
|
98
|
+
/** @nocollapse */ XPageHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderModule, imports: [[CommonModule, XButtonModule]] });
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPageHeaderModule, decorators: [{
|
|
100
100
|
type: NgModule,
|
|
101
101
|
args: [{
|
|
102
102
|
declarations: [XPageHeaderComponent, XPageHeaderProperty],
|
|
@@ -5,12 +5,21 @@ import * as i1 from '@ng-nest/ui/core';
|
|
|
5
5
|
import { XProperty, XWithConfig, XInputNumber, XInputBoolean, XIsChange } from '@ng-nest/ui/core';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
7
7
|
import { takeUntil } from 'rxjs/operators';
|
|
8
|
+
import { ENTER } from '@angular/cdk/keycodes';
|
|
8
9
|
import * as i2 from '@ng-nest/ui/i18n';
|
|
9
10
|
import { XI18nModule } from '@ng-nest/ui/i18n';
|
|
10
11
|
import * as i3 from '@ng-nest/ui/button';
|
|
11
12
|
import { XButtonModule } from '@ng-nest/ui/button';
|
|
12
|
-
import * as i4 from '@
|
|
13
|
+
import * as i4 from '@ng-nest/ui/input';
|
|
14
|
+
import { XInputModule } from '@ng-nest/ui/input';
|
|
15
|
+
import * as i5 from '@ng-nest/ui/select';
|
|
16
|
+
import { XSelectModule } from '@ng-nest/ui/select';
|
|
17
|
+
import * as i6 from '@angular/common';
|
|
13
18
|
import { CommonModule } from '@angular/common';
|
|
19
|
+
import * as i7 from '@ng-nest/ui/outlet';
|
|
20
|
+
import { XOutletModule } from '@ng-nest/ui/outlet';
|
|
21
|
+
import * as i8 from '@angular/forms';
|
|
22
|
+
import { FormsModule } from '@angular/forms';
|
|
14
23
|
|
|
15
24
|
/**
|
|
16
25
|
* Pagination
|
|
@@ -52,8 +61,8 @@ class XPaginationProperty extends XProperty {
|
|
|
52
61
|
this.sizeChange = new EventEmitter();
|
|
53
62
|
}
|
|
54
63
|
}
|
|
55
|
-
/** @nocollapse */ XPaginationProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
56
|
-
/** @nocollapse */ XPaginationProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.
|
|
64
|
+
/** @nocollapse */ XPaginationProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
/** @nocollapse */ XPaginationProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XPaginationProperty, selector: "ng-component", inputs: { index: "index", size: "size", total: "total", query: "query", pageLinkSize: "pageLinkSize", showEllipsis: "showEllipsis", showTotal: "showTotal", space: "space", hiddenBorder: "hiddenBorder", showSize: "showSize", sizeWidth: "sizeWidth", sizeData: "sizeData", disabled: "disabled", showJump: "showJump", jumpWidth: "jumpWidth", totalTpl: "totalTpl", simple: "simple", simpleIndexWidth: "simpleIndexWidth" }, outputs: { queryChange: "queryChange", indexChange: "indexChange", sizeChange: "sizeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
57
66
|
__decorate([
|
|
58
67
|
XWithConfig(X_CONFIG_NAME, 1),
|
|
59
68
|
XInputNumber()
|
|
@@ -85,7 +94,37 @@ __decorate([
|
|
|
85
94
|
XWithConfig(X_CONFIG_NAME, false),
|
|
86
95
|
XInputBoolean()
|
|
87
96
|
], XPaginationProperty.prototype, "hiddenBorder", void 0);
|
|
88
|
-
|
|
97
|
+
__decorate([
|
|
98
|
+
XWithConfig(X_CONFIG_NAME, false),
|
|
99
|
+
XInputBoolean()
|
|
100
|
+
], XPaginationProperty.prototype, "showSize", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
XWithConfig(X_CONFIG_NAME, 100),
|
|
103
|
+
XInputNumber()
|
|
104
|
+
], XPaginationProperty.prototype, "sizeWidth", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
XWithConfig(X_CONFIG_NAME, [10, 20, 50, 100])
|
|
107
|
+
], XPaginationProperty.prototype, "sizeData", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
XInputBoolean()
|
|
110
|
+
], XPaginationProperty.prototype, "disabled", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
XWithConfig(X_CONFIG_NAME, false),
|
|
113
|
+
XInputBoolean()
|
|
114
|
+
], XPaginationProperty.prototype, "showJump", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
XWithConfig(X_CONFIG_NAME, 50),
|
|
117
|
+
XInputNumber()
|
|
118
|
+
], XPaginationProperty.prototype, "jumpWidth", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
XWithConfig(X_CONFIG_NAME, false),
|
|
121
|
+
XInputBoolean()
|
|
122
|
+
], XPaginationProperty.prototype, "simple", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
XWithConfig(X_CONFIG_NAME, 130),
|
|
125
|
+
XInputNumber()
|
|
126
|
+
], XPaginationProperty.prototype, "simpleIndexWidth", void 0);
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationProperty, decorators: [{
|
|
89
128
|
type: Component,
|
|
90
129
|
args: [{ template: '' }]
|
|
91
130
|
}], propDecorators: { index: [{
|
|
@@ -106,6 +145,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.3", ngImpor
|
|
|
106
145
|
type: Input
|
|
107
146
|
}], hiddenBorder: [{
|
|
108
147
|
type: Input
|
|
148
|
+
}], showSize: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], sizeWidth: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], sizeData: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}], disabled: [{
|
|
155
|
+
type: Input
|
|
156
|
+
}], showJump: [{
|
|
157
|
+
type: Input
|
|
158
|
+
}], jumpWidth: [{
|
|
159
|
+
type: Input
|
|
160
|
+
}], totalTpl: [{
|
|
161
|
+
type: Input
|
|
162
|
+
}], simple: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], simpleIndexWidth: [{
|
|
165
|
+
type: Input
|
|
109
166
|
}], queryChange: [{
|
|
110
167
|
type: Output
|
|
111
168
|
}], indexChange: [{
|
|
@@ -125,6 +182,7 @@ class XPaginationComponent extends XPaginationProperty {
|
|
|
125
182
|
this.indexes = [];
|
|
126
183
|
this.indexFirst = 1;
|
|
127
184
|
this.indexLast = 1;
|
|
185
|
+
this.jumpPage = null;
|
|
128
186
|
this._unSubject = new Subject();
|
|
129
187
|
this.renderer.addClass(this.elementRef.nativeElement, XPaginationPrefix);
|
|
130
188
|
}
|
|
@@ -144,12 +202,17 @@ class XPaginationComponent extends XPaginationProperty {
|
|
|
144
202
|
this.i18n.localeChange.pipe(takeUntil(this._unSubject)).subscribe(() => this.cdr.markForCheck());
|
|
145
203
|
}
|
|
146
204
|
ngOnChanges(changes) {
|
|
147
|
-
|
|
205
|
+
const { total, size, index } = changes;
|
|
206
|
+
XIsChange(total, size, index) && this.setIndexes();
|
|
148
207
|
}
|
|
149
208
|
ngOnDestory() {
|
|
150
209
|
this._unSubject.next();
|
|
151
210
|
this._unSubject.unsubscribe();
|
|
152
211
|
}
|
|
212
|
+
sizeChanged() {
|
|
213
|
+
this.setIndexes();
|
|
214
|
+
this.sizeChange.emit(this.size);
|
|
215
|
+
}
|
|
153
216
|
setIndexes() {
|
|
154
217
|
this.lastIndex = Math.ceil(Number(this.total) / Number(this.size)) || 1;
|
|
155
218
|
const indexes = [];
|
|
@@ -173,6 +236,33 @@ class XPaginationComponent extends XPaginationProperty {
|
|
|
173
236
|
this.indexChange.emit(this.index);
|
|
174
237
|
}
|
|
175
238
|
}
|
|
239
|
+
onKeydown(event) {
|
|
240
|
+
if (this.jumpPage !== null && event.keyCode === ENTER) {
|
|
241
|
+
if (this.jumpPage <= this.indexFirst) {
|
|
242
|
+
this.jump(this.indexFirst);
|
|
243
|
+
}
|
|
244
|
+
else if (this.jumpPage >= this.lastIndex) {
|
|
245
|
+
this.jump(this.lastIndex);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.jump(this.jumpPage);
|
|
249
|
+
}
|
|
250
|
+
this.jumpPage = null;
|
|
251
|
+
this.cdr.detectChanges();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
onSimpleKeydown(event) {
|
|
255
|
+
if (this.index !== null && event.keyCode === ENTER) {
|
|
256
|
+
if (this.index <= this.indexFirst) {
|
|
257
|
+
this.index = this.indexFirst;
|
|
258
|
+
}
|
|
259
|
+
else if (this.index >= this.lastIndex) {
|
|
260
|
+
this.index = this.lastIndex;
|
|
261
|
+
}
|
|
262
|
+
this.jump(this.index);
|
|
263
|
+
this.cdr.detectChanges();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
176
266
|
validateIndex(value) {
|
|
177
267
|
if (value > this.lastIndex) {
|
|
178
268
|
return this.lastIndex;
|
|
@@ -187,13 +277,13 @@ class XPaginationComponent extends XPaginationProperty {
|
|
|
187
277
|
getActivated(index) {
|
|
188
278
|
return Number(this.index) === index;
|
|
189
279
|
}
|
|
190
|
-
trackByItem(
|
|
280
|
+
trackByItem(_index, item) {
|
|
191
281
|
return item;
|
|
192
282
|
}
|
|
193
283
|
}
|
|
194
|
-
/** @nocollapse */ XPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
195
|
-
/** @nocollapse */ XPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
284
|
+
/** @nocollapse */ XPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationComponent, deps: [{ token: i1.XConfigService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i2.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
285
|
+
/** @nocollapse */ XPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XPaginationComponent, selector: "x-pagination", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<x-buttons *ngIf=\"!simple; else simpleTpl\" [space]=\"space\" [hiddenBorder]=\"hiddenBorder\">\r\n <x-button\r\n *ngIf=\"showEllipsis\"\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled || firstActivated\"\r\n (click)=\"jump(1)\"\r\n ></x-button>\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n <x-button\r\n *ngFor=\"let item of indexes; trackBy: trackByItem\"\r\n [disabled]=\"disabled\"\r\n [activated]=\"getActivated(item)\"\r\n (click)=\"jump(item)\"\r\n >{{ item }}</x-button\r\n >\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n <x-button\r\n *ngIf=\"showEllipsis && !simple\"\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled || lastActivated\"\r\n (click)=\"jump(lastIndex)\"\r\n ></x-button>\r\n</x-buttons>\r\n<ng-template #simpleTpl>\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"!hiddenBorder\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width.px]=\"simpleIndexWidth\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex }}</span>\r\n </div>\r\n</ng-template>\r\n<x-select\r\n *ngIf=\"showSize\"\r\n [style.width.px]=\"sizeWidth\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeData\"\r\n clearable=\"false\"\r\n [disabled]=\"disabled\"\r\n [bordered]=\"!hiddenBorder\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n></x-select>\r\n<div *ngIf=\"showJump && !simple\" class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input [bordered]=\"!hiddenBorder\" [style.width.px]=\"jumpWidth\" [(ngModel)]=\"jumpPage\" (xKeydown)=\"onKeydown($event)\"></x-input>\r\n</div>\r\n<x-button *ngIf=\"showTotal\" [disabled]=\"disabled\" class=\"x-pagination-total\" [type]=\"hiddenBorder === true ? 'text' : 'initial'\"\r\n ><ng-container *xOutlet=\"totalTpl; context: { $total: total }\"\r\n >{{ 'pagination.total' | xI18n }} {{ total }} {{ 'pagination.item' | xI18n }}</ng-container\r\n ></x-button\r\n>\r\n\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled || leftDisabled\"\r\n (click)=\"jump(-1, true)\"\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled || rightDisabled\"\r\n (click)=\"jump(1, true)\"\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n <ng-container *ngIf=\"node\"> {{ node?.label }} {{ 'pagination.sizePage' | xI18n }} </ng-container>\r\n</ng-template>\r\n", styles: [".x-pagination{margin:0;padding:0;display:inline-flex}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button{min-width:1.75rem}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button-activated{background-color:#0000000d}.x-pagination-size{margin-left:.5rem}.x-pagination-total{margin-left:.5rem}.x-pagination-jump{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-jump x-input{margin-left:.5rem}.x-pagination-simple{margin:0 .5rem;display:inline-flex;align-items:center}.x-pagination-simple>x-input input{text-align:center}.x-pagination-simple>span{margin-left:.5rem}\n"], components: [{ type: i3.XButtonsComponent, selector: "x-buttons" }, { type: i3.XButtonComponent, selector: "x-button" }, { type: i4.XInputComponent, selector: "x-input" }, { type: i5.XSelectComponent, selector: "x-select" }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "xI18n": i2.XI18nPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationComponent, decorators: [{
|
|
197
287
|
type: Component,
|
|
198
288
|
args: [{
|
|
199
289
|
selector: `${XPaginationPrefix}`,
|
|
@@ -206,15 +296,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.3", ngImpor
|
|
|
206
296
|
|
|
207
297
|
class XPaginationModule {
|
|
208
298
|
}
|
|
209
|
-
/** @nocollapse */ XPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.
|
|
210
|
-
/** @nocollapse */ XPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.
|
|
211
|
-
/** @nocollapse */ XPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.
|
|
299
|
+
/** @nocollapse */ XPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
300
|
+
/** @nocollapse */ XPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationModule, declarations: [XPaginationComponent, XPaginationProperty], imports: [CommonModule, FormsModule, XButtonModule, XI18nModule, XSelectModule, XInputModule, XOutletModule], exports: [XPaginationComponent] });
|
|
301
|
+
/** @nocollapse */ XPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationModule, imports: [[CommonModule, FormsModule, XButtonModule, XI18nModule, XSelectModule, XInputModule, XOutletModule]] });
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XPaginationModule, decorators: [{
|
|
213
303
|
type: NgModule,
|
|
214
304
|
args: [{
|
|
215
305
|
declarations: [XPaginationComponent, XPaginationProperty],
|
|
216
306
|
exports: [XPaginationComponent],
|
|
217
|
-
imports: [CommonModule, XButtonModule, XI18nModule]
|
|
307
|
+
imports: [CommonModule, FormsModule, XButtonModule, XI18nModule, XSelectModule, XInputModule, XOutletModule]
|
|
218
308
|
}]
|
|
219
309
|
}] });
|
|
220
310
|
|