@ng-nest/ui 16.0.11 → 17.0.0
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/README.md +1 -1
- package/date-picker/date-range.component.d.ts +1 -1
- package/dialog/dialog.property.d.ts +1 -1
- package/drawer/drawer.property.d.ts +1 -1
- package/esm2022/affix/affix.component.mjs +6 -7
- package/esm2022/affix/affix.module.mjs +6 -7
- package/esm2022/affix/affix.property.mjs +5 -6
- package/esm2022/alert/alert.component.mjs +6 -7
- package/esm2022/alert/alert.module.mjs +6 -7
- package/esm2022/alert/alert.property.mjs +5 -6
- package/esm2022/anchor/anchor-inner.component.mjs +5 -6
- package/esm2022/anchor/anchor.component.mjs +6 -7
- package/esm2022/anchor/anchor.module.mjs +6 -7
- package/esm2022/anchor/anchor.property.mjs +9 -11
- package/esm2022/api/api.component.mjs +6 -7
- package/esm2022/api/api.module.mjs +6 -7
- package/esm2022/auto-complete/auto-complete-portal.component.mjs +6 -7
- package/esm2022/auto-complete/auto-complete.component.mjs +6 -7
- package/esm2022/auto-complete/auto-complete.module.mjs +6 -7
- package/esm2022/auto-complete/auto-complete.property.mjs +5 -6
- package/esm2022/avatar/avatar-group.component.mjs +6 -7
- package/esm2022/avatar/avatar.component.mjs +6 -7
- package/esm2022/avatar/avatar.module.mjs +6 -7
- package/esm2022/avatar/avatar.property.mjs +9 -11
- package/esm2022/back-top/back-top.component.mjs +6 -7
- package/esm2022/back-top/back-top.module.mjs +6 -7
- package/esm2022/back-top/back-top.property.mjs +5 -6
- package/esm2022/badge/badge.component.mjs +6 -7
- package/esm2022/badge/badge.module.mjs +6 -7
- package/esm2022/badge/badge.property.mjs +5 -6
- package/esm2022/base-form/base-form.component.mjs +5 -6
- package/esm2022/base-form/base-form.module.mjs +6 -7
- package/esm2022/base-form/base-form.property.mjs +5 -6
- package/esm2022/border/border.component.mjs +6 -7
- package/esm2022/border/border.module.mjs +6 -7
- package/esm2022/button/button.component.mjs +7 -8
- package/esm2022/button/button.module.mjs +6 -7
- package/esm2022/button/button.property.mjs +9 -11
- package/esm2022/button/buttons.component.mjs +6 -7
- package/esm2022/calendar/calendar.component.mjs +6 -7
- package/esm2022/calendar/calendar.module.mjs +6 -7
- package/esm2022/calendar/calendar.property.mjs +5 -6
- package/esm2022/card/card.component.mjs +6 -7
- package/esm2022/card/card.module.mjs +6 -7
- package/esm2022/card/card.property.mjs +5 -6
- package/esm2022/carousel/carousel-panel.component.mjs +7 -8
- package/esm2022/carousel/carousel.component.mjs +6 -7
- package/esm2022/carousel/carousel.module.mjs +6 -7
- package/esm2022/carousel/carousel.property.mjs +9 -11
- package/esm2022/cascade/cascade-portal.component.mjs +6 -7
- package/esm2022/cascade/cascade.component.mjs +6 -7
- package/esm2022/cascade/cascade.module.mjs +6 -7
- package/esm2022/cascade/cascade.property.mjs +5 -6
- package/esm2022/checkbox/checkbox.component.mjs +6 -7
- package/esm2022/checkbox/checkbox.module.mjs +6 -7
- package/esm2022/checkbox/checkbox.property.mjs +5 -6
- package/esm2022/collapse/collapse-panel.component.mjs +7 -8
- package/esm2022/collapse/collapse.component.mjs +6 -7
- package/esm2022/collapse/collapse.module.mjs +6 -7
- package/esm2022/collapse/collapse.property.mjs +9 -11
- package/esm2022/color/color.component.mjs +6 -7
- package/esm2022/color/color.module.mjs +6 -7
- package/esm2022/color/color.property.mjs +5 -6
- package/esm2022/color-picker/color-picker-portal.component.mjs +7 -8
- package/esm2022/color-picker/color-picker.component.mjs +6 -7
- package/esm2022/color-picker/color-picker.module.mjs +6 -7
- package/esm2022/color-picker/color-picker.property.mjs +5 -6
- package/esm2022/comment/comment-reply.component.mjs +6 -7
- package/esm2022/comment/comment.component.mjs +6 -7
- package/esm2022/comment/comment.module.mjs +6 -7
- package/esm2022/comment/comment.property.mjs +9 -11
- package/esm2022/container/aside.component.mjs +6 -7
- package/esm2022/container/container.component.mjs +6 -7
- package/esm2022/container/container.module.mjs +6 -7
- package/esm2022/container/container.property.mjs +17 -21
- package/esm2022/container/footer.component.mjs +7 -8
- package/esm2022/container/header.component.mjs +7 -8
- package/esm2022/container/main.component.mjs +6 -7
- package/esm2022/core/config/config.service.mjs +6 -7
- package/esm2022/core/services/http.service.mjs +6 -7
- package/esm2022/core/services/preloading-strategy.service.mjs +5 -6
- package/esm2022/core/services/reuse-strategy.service.mjs +2 -3
- package/esm2022/core/services/storage.service.mjs +6 -7
- package/esm2022/core/theme/theme.service.mjs +6 -7
- package/esm2022/crumb/crumb.component.mjs +6 -7
- package/esm2022/crumb/crumb.module.mjs +6 -7
- package/esm2022/crumb/crumb.property.mjs +5 -6
- package/esm2022/date-picker/date-picker-portal.component.mjs +6 -7
- package/esm2022/date-picker/date-picker.component.mjs +6 -7
- package/esm2022/date-picker/date-picker.module.mjs +6 -7
- package/esm2022/date-picker/date-picker.property.mjs +25 -31
- package/esm2022/date-picker/date-quarter.pipe.mjs +6 -7
- package/esm2022/date-picker/date-range-portal.component.mjs +6 -7
- package/esm2022/date-picker/date-range.component.mjs +6 -7
- package/esm2022/date-picker/picker-date.component.mjs +6 -7
- package/esm2022/date-picker/picker-month.component.mjs +6 -7
- package/esm2022/date-picker/picker-quarter.component.mjs +6 -7
- package/esm2022/date-picker/picker-year.component.mjs +6 -7
- package/esm2022/description/description-item.component.mjs +6 -7
- package/esm2022/description/description.component.mjs +6 -7
- package/esm2022/description/description.module.mjs +6 -7
- package/esm2022/description/description.property.mjs +9 -11
- package/esm2022/dialog/dialog-container.component.mjs +6 -7
- package/esm2022/dialog/dialog-portal.component.mjs +6 -7
- package/esm2022/dialog/dialog-portal.directives.mjs +31 -37
- package/esm2022/dialog/dialog.component.mjs +7 -8
- package/esm2022/dialog/dialog.module.mjs +6 -7
- package/esm2022/dialog/dialog.property.mjs +9 -11
- package/esm2022/dialog/dialog.service.mjs +6 -7
- package/esm2022/doc/doc.component.mjs +6 -7
- package/esm2022/doc/doc.module.mjs +6 -7
- package/esm2022/drag/drag.directive.mjs +6 -7
- package/esm2022/drag/drag.module.mjs +6 -7
- package/esm2022/drag/drag.property.mjs +5 -6
- package/esm2022/drawer/drawer-container.component.mjs +6 -7
- package/esm2022/drawer/drawer-portal.component.mjs +6 -7
- package/esm2022/drawer/drawer-portal.directives.mjs +15 -18
- package/esm2022/drawer/drawer.component.mjs +7 -8
- package/esm2022/drawer/drawer.module.mjs +6 -7
- package/esm2022/drawer/drawer.property.mjs +9 -11
- package/esm2022/drawer/drawer.service.mjs +6 -7
- package/esm2022/dropdown/dropdown-portal.component.mjs +6 -7
- package/esm2022/dropdown/dropdown.component.mjs +6 -7
- package/esm2022/dropdown/dropdown.module.mjs +6 -7
- package/esm2022/dropdown/dropdown.property.mjs +5 -6
- package/esm2022/empty/empty.component.mjs +6 -7
- package/esm2022/empty/empty.module.mjs +6 -7
- package/esm2022/empty/empty.property.mjs +5 -6
- package/esm2022/examples/examples.component.mjs +6 -7
- package/esm2022/examples/examples.module.mjs +6 -7
- package/esm2022/find/find.component.mjs +6 -7
- package/esm2022/find/find.module.mjs +6 -7
- package/esm2022/find/find.property.mjs +5 -6
- package/esm2022/form/control.component.mjs +6 -7
- package/esm2022/form/form.component.mjs +6 -7
- package/esm2022/form/form.module.mjs +6 -7
- package/esm2022/form/form.property.mjs +9 -11
- package/esm2022/highlight/highlight.component.mjs +7 -8
- package/esm2022/highlight/highlight.module.mjs +6 -7
- package/esm2022/highlight/highlight.property.mjs +5 -6
- package/esm2022/i18n/i18n.directive.mjs +6 -7
- package/esm2022/i18n/i18n.module.mjs +6 -7
- package/esm2022/i18n/i18n.pipe.mjs +6 -7
- package/esm2022/i18n/i18n.service.mjs +7 -8
- package/esm2022/icon/icon.component.mjs +6 -7
- package/esm2022/icon/icon.module.mjs +6 -7
- package/esm2022/icon/icon.property.mjs +5 -6
- package/esm2022/icon/icon.service.mjs +7 -8
- package/esm2022/image/image-group.component.mjs +5 -6
- package/esm2022/image/image-preview.component.mjs +7 -8
- package/esm2022/image/image.component.mjs +7 -8
- package/esm2022/image/image.module.mjs +6 -7
- package/esm2022/image/image.property.mjs +9 -11
- package/esm2022/inner/inner.component.mjs +6 -7
- package/esm2022/inner/inner.module.mjs +6 -7
- package/esm2022/inner/inner.property.mjs +5 -6
- package/esm2022/input/input-group.component.mjs +6 -7
- package/esm2022/input/input.component.mjs +7 -8
- package/esm2022/input/input.module.mjs +6 -7
- package/esm2022/input/input.property.mjs +9 -11
- package/esm2022/input-number/input-number.component.mjs +6 -7
- package/esm2022/input-number/input-number.module.mjs +6 -7
- package/esm2022/input-number/input-number.property.mjs +5 -6
- package/esm2022/keyword/keyword.directive.mjs +6 -7
- package/esm2022/keyword/keyword.module.mjs +6 -7
- package/esm2022/keyword/keyword.property.mjs +5 -6
- package/esm2022/layout/col.component.mjs +7 -8
- package/esm2022/layout/layout.module.mjs +6 -7
- package/esm2022/layout/layout.property.mjs +9 -11
- package/esm2022/layout/row.component.mjs +6 -7
- package/esm2022/link/link.component.mjs +6 -7
- package/esm2022/link/link.module.mjs +6 -7
- package/esm2022/link/link.property.mjs +5 -6
- package/esm2022/list/list-drop-group.directive.mjs +5 -6
- package/esm2022/list/list-option.component.mjs +6 -7
- package/esm2022/list/list.component.mjs +7 -8
- package/esm2022/list/list.module.mjs +6 -7
- package/esm2022/list/list.property.mjs +9 -11
- package/esm2022/loading/loading.component.mjs +6 -7
- package/esm2022/loading/loading.module.mjs +6 -7
- package/esm2022/loading/loading.property.mjs +5 -6
- package/esm2022/menu/menu-node.component.mjs +6 -7
- package/esm2022/menu/menu.component.mjs +6 -7
- package/esm2022/menu/menu.module.mjs +6 -7
- package/esm2022/menu/menu.property.mjs +9 -11
- package/esm2022/message/message.component.mjs +6 -7
- package/esm2022/message/message.module.mjs +6 -7
- package/esm2022/message/message.service.mjs +6 -7
- package/esm2022/message-box/message-box.component.mjs +6 -7
- package/esm2022/message-box/message-box.module.mjs +6 -7
- package/esm2022/message-box/message-box.service.mjs +6 -7
- package/esm2022/notification/notification.component.mjs +6 -7
- package/esm2022/notification/notification.module.mjs +6 -7
- package/esm2022/notification/notification.service.mjs +6 -7
- package/esm2022/outlet/outlet.directive.mjs +6 -7
- package/esm2022/outlet/outlet.module.mjs +6 -7
- package/esm2022/page-header/page-header.component.mjs +6 -7
- package/esm2022/page-header/page-header.module.mjs +6 -7
- package/esm2022/page-header/page-header.property.mjs +5 -6
- package/esm2022/pagination/pagination.component.mjs +6 -7
- package/esm2022/pagination/pagination.module.mjs +6 -7
- package/esm2022/pagination/pagination.property.mjs +5 -6
- package/esm2022/pattern/pattern.component.mjs +6 -7
- package/esm2022/pattern/pattern.module.mjs +6 -7
- package/esm2022/popconfirm/popconfirm.component.mjs +6 -7
- package/esm2022/popconfirm/popconfirm.module.mjs +6 -7
- package/esm2022/popconfirm/popconfirm.property.mjs +5 -6
- package/esm2022/popover/popover-portal.component.mjs +6 -7
- package/esm2022/popover/popover.directive.mjs +6 -7
- package/esm2022/popover/popover.module.mjs +6 -7
- package/esm2022/popover/popover.property.mjs +5 -6
- package/esm2022/portal/portal.module.mjs +6 -7
- package/esm2022/portal/portal.service.mjs +6 -7
- package/esm2022/progress/progress.component.mjs +6 -7
- package/esm2022/progress/progress.module.mjs +6 -7
- package/esm2022/progress/progress.property.mjs +5 -6
- package/esm2022/radio/radio.component.mjs +6 -7
- package/esm2022/radio/radio.module.mjs +6 -7
- package/esm2022/radio/radio.property.mjs +5 -6
- package/esm2022/rate/rate.component.mjs +6 -7
- package/esm2022/rate/rate.module.mjs +6 -7
- package/esm2022/rate/rate.property.mjs +5 -6
- package/esm2022/resizable/resizable.directive.mjs +6 -7
- package/esm2022/resizable/resizable.module.mjs +6 -7
- package/esm2022/resizable/resizable.property.mjs +5 -6
- package/esm2022/result/result.component.mjs +6 -7
- package/esm2022/result/result.module.mjs +6 -7
- package/esm2022/result/result.property.mjs +5 -6
- package/esm2022/ripple/ripple.directive.mjs +6 -7
- package/esm2022/ripple/ripple.module.mjs +6 -7
- package/esm2022/ripple/ripple.property.mjs +5 -6
- package/esm2022/select/select-portal.component.mjs +6 -7
- package/esm2022/select/select.component.mjs +6 -7
- package/esm2022/select/select.module.mjs +6 -7
- package/esm2022/select/select.property.mjs +5 -6
- package/esm2022/skeleton/skeleton.component.mjs +6 -7
- package/esm2022/skeleton/skeleton.module.mjs +6 -7
- package/esm2022/skeleton/skeleton.property.mjs +5 -6
- package/esm2022/slider/slider.component.mjs +6 -7
- package/esm2022/slider/slider.module.mjs +6 -7
- package/esm2022/slider/slider.property.mjs +5 -6
- package/esm2022/slider-select/slider-select.component.mjs +6 -7
- package/esm2022/slider-select/slider-select.module.mjs +6 -7
- package/esm2022/slider-select/slider-select.property.mjs +5 -6
- package/esm2022/statistic/countdown.component.mjs +6 -7
- package/esm2022/statistic/statistic.component.mjs +6 -7
- package/esm2022/statistic/statistic.module.mjs +6 -7
- package/esm2022/statistic/statistic.property.mjs +9 -11
- package/esm2022/steps/steps.component.mjs +6 -7
- package/esm2022/steps/steps.module.mjs +6 -7
- package/esm2022/steps/steps.property.mjs +5 -6
- package/esm2022/switch/switch.component.mjs +6 -7
- package/esm2022/switch/switch.module.mjs +6 -7
- package/esm2022/switch/switch.property.mjs +5 -6
- package/esm2022/table/table-body.component.mjs +6 -7
- package/esm2022/table/table-foot.component.mjs +6 -7
- package/esm2022/table/table-head.component.mjs +6 -7
- package/esm2022/table/table.component.mjs +6 -7
- package/esm2022/table/table.module.mjs +6 -7
- package/esm2022/table/table.property.mjs +17 -21
- package/esm2022/tabs/tab-content.component.mjs +6 -7
- package/esm2022/tabs/tab-link.directive.mjs +13 -15
- package/esm2022/tabs/tab.component.mjs +6 -7
- package/esm2022/tabs/tabs.component.mjs +7 -8
- package/esm2022/tabs/tabs.module.mjs +6 -7
- package/esm2022/tabs/tabs.property.mjs +9 -11
- package/esm2022/tag/tag.component.mjs +6 -7
- package/esm2022/tag/tag.module.mjs +6 -7
- package/esm2022/tag/tag.property.mjs +5 -6
- package/esm2022/text-retract/text-retract.component.mjs +6 -7
- package/esm2022/text-retract/text-retract.module.mjs +6 -7
- package/esm2022/text-retract/text-retract.property.mjs +5 -6
- package/esm2022/textarea/textarea.component.mjs +6 -7
- package/esm2022/textarea/textarea.module.mjs +6 -7
- package/esm2022/textarea/textarea.property.mjs +5 -6
- package/esm2022/theme/theme.component.mjs +6 -7
- package/esm2022/theme/theme.module.mjs +6 -7
- package/esm2022/theme/theme.property.mjs +5 -6
- package/esm2022/time-ago/time-ago.module.mjs +6 -7
- package/esm2022/time-ago/time-ago.pipe.mjs +6 -7
- package/esm2022/time-picker/time-picker-frame.component.mjs +6 -7
- package/esm2022/time-picker/time-picker-portal.component.mjs +6 -7
- package/esm2022/time-picker/time-picker.component.mjs +6 -7
- package/esm2022/time-picker/time-picker.module.mjs +6 -7
- package/esm2022/time-picker/time-picker.property.mjs +5 -6
- package/esm2022/time-range/time-range.module.mjs +6 -7
- package/esm2022/time-range/time-range.pipe.mjs +5 -6
- package/esm2022/timeline/timeline.component.mjs +6 -7
- package/esm2022/timeline/timeline.module.mjs +6 -7
- package/esm2022/timeline/timeline.property.mjs +5 -6
- package/esm2022/tooltip/tooltip-portal.component.mjs +6 -7
- package/esm2022/tooltip/tooltip.directive.mjs +6 -7
- package/esm2022/tooltip/tooltip.module.mjs +6 -7
- package/esm2022/tooltip/tooltip.property.mjs +5 -6
- package/esm2022/transfer/transfer.component.mjs +6 -7
- package/esm2022/transfer/transfer.module.mjs +6 -7
- package/esm2022/transfer/transfer.property.mjs +5 -6
- package/esm2022/tree/tree-node.component.mjs +6 -7
- package/esm2022/tree/tree.component.mjs +30 -14
- package/esm2022/tree/tree.module.mjs +6 -7
- package/esm2022/tree/tree.property.mjs +9 -11
- package/esm2022/tree/tree.service.mjs +5 -6
- package/esm2022/tree-file/tree-file.component.mjs +7 -8
- package/esm2022/tree-file/tree-file.module.mjs +6 -7
- package/esm2022/tree-file/tree-file.property.mjs +5 -6
- package/esm2022/tree-select/tree-select-portal.component.mjs +6 -7
- package/esm2022/tree-select/tree-select.component.mjs +6 -7
- package/esm2022/tree-select/tree-select.module.mjs +6 -7
- package/esm2022/tree-select/tree-select.property.mjs +5 -6
- package/esm2022/typography/typography.component.mjs +6 -7
- package/esm2022/typography/typography.module.mjs +6 -7
- package/esm2022/typography/typography.property.mjs +5 -6
- package/esm2022/upload/upload-portal.component.mjs +6 -7
- package/esm2022/upload/upload.component.mjs +7 -8
- package/esm2022/upload/upload.module.mjs +6 -7
- package/esm2022/upload/upload.property.mjs +5 -6
- package/fesm2022/ng-nest-ui-affix.mjs +11 -11
- package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-alert.mjs +11 -11
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +17 -17
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +8 -8
- package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +15 -15
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +18 -18
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +12 -12
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +11 -11
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +11 -11
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-border.mjs +8 -8
- package/fesm2022/ng-nest-ui-border.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +20 -20
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +11 -11
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +11 -11
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +20 -20
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +16 -16
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +11 -11
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +19 -19
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +16 -16
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +12 -12
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +19 -19
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +38 -38
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +20 -20
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +11 -11
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +58 -58
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +18 -18
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +51 -51
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +8 -8
- package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drag.mjs +11 -11
- package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drawer.mjs +38 -38
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +16 -16
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +11 -11
- package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-examples.mjs +8 -8
- package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-find.mjs +11 -11
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +18 -18
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +13 -13
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +17 -17
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +16 -16
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +23 -23
- package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-inner.mjs +11 -11
- package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +11 -11
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +19 -19
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +11 -11
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +19 -19
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +11 -11
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +22 -22
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +11 -11
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +18 -18
- package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +13 -13
- package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message.mjs +12 -12
- package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-notification.mjs +12 -12
- package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-outlet.mjs +8 -8
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +11 -11
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +11 -11
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +8 -8
- package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popconfirm.mjs +11 -11
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +15 -15
- package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-portal.mjs +8 -8
- package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-progress.mjs +11 -11
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +11 -11
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +11 -11
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +11 -11
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +11 -11
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +13 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +15 -15
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +11 -11
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +11 -11
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +11 -11
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +19 -19
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +11 -11
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +11 -11
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +32 -32
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +33 -33
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +11 -11
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +11 -11
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +11 -11
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +11 -11
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +8 -8
- package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-picker.mjs +20 -20
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-timeline.mjs +11 -11
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +15 -15
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +11 -11
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +12 -12
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +15 -15
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +45 -28
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +11 -11
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +17 -17
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/package.json +57 -57
|
@@ -44,8 +44,8 @@ class XRadioProperty extends XControlValueAccessor {
|
|
|
44
44
|
*/
|
|
45
45
|
this.tagBordered = true;
|
|
46
46
|
}
|
|
47
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
48
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
47
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRadioProperty, selector: "x-radio-property", inputs: { data: "data", button: "button", icon: "icon", tag: "tag", size: "size", type: "type", tagBordered: "tagBordered", tagDark: "tagDark", allowCancel: "allowCancel", before: "before", after: "after" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
49
49
|
}
|
|
50
50
|
__decorate([
|
|
51
51
|
XDataConvert()
|
|
@@ -71,7 +71,7 @@ __decorate([
|
|
|
71
71
|
__decorate([
|
|
72
72
|
XInputBoolean()
|
|
73
73
|
], XRadioProperty.prototype, "allowCancel", void 0);
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioProperty, decorators: [{
|
|
75
75
|
type: Component,
|
|
76
76
|
args: [{ selector: `${XRadioPrefix}-property`, template: '' }]
|
|
77
77
|
}], propDecorators: { data: [{
|
|
@@ -179,23 +179,23 @@ class XRadioComponent extends XRadioProperty {
|
|
|
179
179
|
this.ngOnInit();
|
|
180
180
|
this.cdr.detectChanges();
|
|
181
181
|
}
|
|
182
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
183
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: XRadioComponent, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.XButtonComponent, selector: "x-button" }, { kind: "component", type: i3.XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: i4.XTagComponent, selector: "x-tag" }, { kind: "directive", type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
182
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
183
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRadioComponent, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.XButtonComponent, selector: "x-button" }, { kind: "component", type: i3.XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: i4.XTagComponent, selector: "x-tag" }, { kind: "directive", type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
184
184
|
}
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioComponent, decorators: [{
|
|
186
186
|
type: Component,
|
|
187
187
|
args: [{ selector: `${XRadioPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRadioComponent)], template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"] }]
|
|
188
|
-
}], ctorParameters:
|
|
188
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }], propDecorators: { radio: [{
|
|
189
189
|
type: ViewChild,
|
|
190
190
|
args: ['radio', { static: true }]
|
|
191
191
|
}] } });
|
|
192
192
|
|
|
193
193
|
class XRadioModule {
|
|
194
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
195
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
196
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
194
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
195
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, declarations: [XRadioComponent, XRadioProperty], imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule], exports: [XRadioComponent] }); }
|
|
196
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule] }); }
|
|
197
197
|
}
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, decorators: [{
|
|
199
199
|
type: NgModule,
|
|
200
200
|
args: [{
|
|
201
201
|
declarations: [XRadioComponent, XRadioProperty],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XData, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig, XTemplate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ selector: `${XRadioPrefix}-property`, template: '' })\r\nexport class XRadioProperty extends XControlValueAccessor<any> implements XRadioOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n @Input() @XDataConvert() data: XData<XRadioNode> = [];\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n @Input() @XInputBoolean() button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n @Input() @XInputBoolean() icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n @Input() @XInputBoolean() tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n @Input() type: XButtonType = 'initial';\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n @Input() @XInputBoolean() tagBordered: XBoolean = true;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n @Input() @XInputBoolean() tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n @Input() @XInputBoolean() allowCancel?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n @Input() override before!: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n @Input() override after!: XTemplate;\r\n}\r\n\r\n/**\r\n * Radio Option\r\n * @undocument true\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges {\r\n @ViewChild('radio', { static: true }) radio!: ElementRef<HTMLElement>;\r\n nodes: XRadioNode[] = [];\r\n radioType!: 'initial' | 'button' | 'icon' | 'tag';\r\n private _unSubject = new Subject<void>();\r\n\r\n get beforeIsTemplate() {\r\n return this.before instanceof TemplateRef;\r\n }\r\n\r\n get afterIsTemplate() {\r\n return this.after instanceof TemplateRef;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n this.setRadioType();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRadioType() {\r\n if (this.button) {\r\n this.radioType = 'button';\r\n } else if (this.icon) {\r\n this.radioType = 'icon';\r\n } else if (this.tag) {\r\n this.radioType = 'tag';\r\n } else {\r\n this.radioType = 'initial';\r\n }\r\n this.cdr.detectChanges();\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled || (!this.allowCancel && node.id === this.value)) return;\r\n this.formControlValidator();\r\n if (this.allowCancel && node.id === this.value) {\r\n this.value = null;\r\n } else {\r\n this.value = node.id;\r\n }\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XRadioNode) {\r\n return item.id;\r\n }\r\n\r\n formControlChanges() {\r\n this.setData();\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRadioComponent } from './radio.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioProperty } from './radio.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XTagModule } from '@ng-nest/ui/tag';\r\n\r\n@NgModule({\r\n declarations: [XRadioComponent, XRadioProperty],\r\n exports: [XRadioComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AACH,MACa,cAAe,SAAQ,qBAA0B,CAAA;AAD9D,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACsB,IAAI,CAAA,IAAA,GAAsB,EAAE,CAAC;AAqBtD;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAgB,SAAS,CAAC;AACvC;;;AAGG;QACuB,IAAW,CAAA,WAAA,GAAa,IAAI,CAAC;AAqBxD,KAAA;kIAxDY,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,+RADkC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;AAMpC,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;AAA8B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,MAAA,EA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AAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAEnF,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;oBAC/C,OAAO,EAAE,CAAC,eAAe,CAAC;AAC1B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,CAAC;AAChG,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XData, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig, XTemplate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ selector: `${XRadioPrefix}-property`, template: '' })\r\nexport class XRadioProperty extends XControlValueAccessor<any> implements XRadioOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n @Input() @XDataConvert() data: XData<XRadioNode> = [];\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n @Input() @XInputBoolean() button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n @Input() @XInputBoolean() icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n @Input() @XInputBoolean() tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n @Input() type: XButtonType = 'initial';\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n @Input() @XInputBoolean() tagBordered: XBoolean = true;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n @Input() @XInputBoolean() tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n @Input() @XInputBoolean() allowCancel?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n @Input() override before!: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n @Input() override after!: XTemplate;\r\n}\r\n\r\n/**\r\n * Radio Option\r\n * @undocument true\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges {\r\n @ViewChild('radio', { static: true }) radio!: ElementRef<HTMLElement>;\r\n nodes: XRadioNode[] = [];\r\n radioType!: 'initial' | 'button' | 'icon' | 'tag';\r\n private _unSubject = new Subject<void>();\r\n\r\n get beforeIsTemplate() {\r\n return this.before instanceof TemplateRef;\r\n }\r\n\r\n get afterIsTemplate() {\r\n return this.after instanceof TemplateRef;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n this.setRadioType();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRadioType() {\r\n if (this.button) {\r\n this.radioType = 'button';\r\n } else if (this.icon) {\r\n this.radioType = 'icon';\r\n } else if (this.tag) {\r\n this.radioType = 'tag';\r\n } else {\r\n this.radioType = 'initial';\r\n }\r\n this.cdr.detectChanges();\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled || (!this.allowCancel && node.id === this.value)) return;\r\n this.formControlValidator();\r\n if (this.allowCancel && node.id === this.value) {\r\n this.value = null;\r\n } else {\r\n this.value = node.id;\r\n }\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XRadioNode) {\r\n return item.id;\r\n }\r\n\r\n formControlChanges() {\r\n this.setData();\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRadioComponent } from './radio.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioProperty } from './radio.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XTagModule } from '@ng-nest/ui/tag';\r\n\r\n@NgModule({\r\n declarations: [XRadioComponent, XRadioProperty],\r\n exports: [XRadioComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,qBAA0B,CAAA;AAD9D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AAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;MEXzB,YAAY,CAAA;iIAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAZ,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,iBAJR,eAAe,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAEpC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,aADpF,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;kIAGd,YAAY,EAAA,OAAA,EAAA,CAFb,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEnF,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;oBAC/C,OAAO,EAAE,CAAC,eAAe,CAAC;AAC1B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,CAAC;AAChG,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -30,8 +30,8 @@ class XRateProperty extends XControlValueAccessor {
|
|
|
30
30
|
*/
|
|
31
31
|
this.count = 5;
|
|
32
32
|
}
|
|
33
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRateProperty, selector: "x-rate-property", inputs: { count: "count", half: "half", color: "color", customTemp: "customTemp" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
35
35
|
}
|
|
36
36
|
__decorate([
|
|
37
37
|
XInputNumber()
|
|
@@ -42,7 +42,7 @@ __decorate([
|
|
|
42
42
|
__decorate([
|
|
43
43
|
XWithConfig(X_CONFIG_NAME)
|
|
44
44
|
], XRateProperty.prototype, "color", void 0);
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateProperty, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{ selector: `${XRatePrefix}-property`, template: '' }]
|
|
48
48
|
}], propDecorators: { count: [{
|
|
@@ -153,23 +153,23 @@ class XRateComponent extends XRateProperty {
|
|
|
153
153
|
this.ngOnInit();
|
|
154
154
|
this.cdr.detectChanges();
|
|
155
155
|
}
|
|
156
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
157
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRateComponent, selector: "x-rate", providers: [XValueAccessor(XRateComponent)], viewQueries: [{ propertyName: "rate", first: true, predicate: ["rate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0;width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:calc(var(--x-font-size) + .875rem);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateComponent, decorators: [{
|
|
160
160
|
type: Component,
|
|
161
161
|
args: [{ selector: `${XRatePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRateComponent)], template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0;width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:calc(var(--x-font-size) + .875rem);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"] }]
|
|
162
|
-
}], ctorParameters:
|
|
162
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }], propDecorators: { rate: [{
|
|
163
163
|
type: ViewChild,
|
|
164
164
|
args: ['rate', { static: true }]
|
|
165
165
|
}] } });
|
|
166
166
|
|
|
167
167
|
class XRateModule {
|
|
168
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
169
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
170
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
168
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
169
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, declarations: [XRateComponent, XRateProperty], imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule], exports: [XRateComponent] }); }
|
|
170
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule] }); }
|
|
171
171
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, decorators: [{
|
|
173
173
|
type: NgModule,
|
|
174
174
|
args: [{
|
|
175
175
|
declarations: [XRateComponent, XRateProperty],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-rate.mjs","sources":["../../../../lib/ng-nest/ui/rate/rate.property.ts","../../../../lib/ng-nest/ui/rate/rate.component.ts","../../../../lib/ng-nest/ui/rate/rate.component.html","../../../../lib/ng-nest/ui/rate/rate.module.ts","../../../../lib/ng-nest/ui/rate/ng-nest-ui-rate.ts"],"sourcesContent":["import { XInputNumber, XNumber, XInputBoolean, XBoolean, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component, TemplateRef } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Rate\r\n * @selector x-rate\r\n * @decorator component\r\n */\r\nexport const XRatePrefix = 'x-rate';\r\nconst X_CONFIG_NAME = 'rate';\r\n\r\n/**\r\n * Rate Property\r\n */\r\n@Component({ selector: `${XRatePrefix}-property`, template: '' })\r\nexport class XRateProperty extends XControlValueAccessor<any> implements XRateOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputNumber() count: XNumber = 5;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputBoolean() half?: XBoolean;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n @Input() @XWithConfig<XRateColor>(X_CONFIG_NAME) color?: XRateColor;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n @Input() customTemp!: TemplateRef<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 颜色类型\r\n * @en_US Color type\r\n */\r\nexport type XRateColor = string | { [color: string]: (rate: number) => boolean };\r\n\r\n/**\r\n * Rate Option\r\n * @undocument true\r\n */\r\nexport interface XRateOption extends XFormOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n count?: XNumber;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n half?: XBoolean;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n customTemp?: XTemplate;\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Renderer2, ElementRef, ChangeDetectorRef, ViewChild } from '@angular/core';\r\nimport { XIsEmpty, XClearClass, XConfigService, XIsString, XIsObject } from '@ng-nest/ui/core';\r\nimport { XRatePrefix, XRateProperty } from './rate.property';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRatePrefix}`,\r\n templateUrl: './rate.component.html',\r\n styleUrls: ['./rate.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRateComponent)]\r\n})\r\nexport class XRateComponent extends XRateProperty {\r\n @ViewChild('rate', { static: true }) rate!: ElementRef<HTMLElement>;\r\n rates: number[] = [];\r\n\r\n hoverActivated = 0;\r\n hoverHalfActivated = 0;\r\n\r\n get getColor() {\r\n let color = '';\r\n if (XIsString(this.color)) {\r\n color = this.color as string;\r\n } else if (XIsObject(this.color)) {\r\n this.color = this.color as { [color: string]: (rate: number) => boolean };\r\n let val = this.half ? (Math.floor(this.hoverActivated) + this.hoverHalfActivated) * 0.5 : this.hoverActivated;\r\n for (let key in this.color) {\r\n if (this.color[key](val)) {\r\n color = key;\r\n break;\r\n }\r\n }\r\n }\r\n return color;\r\n }\r\n\r\n override get requiredIsEmpty() {\r\n return this.validator && this.required && (XIsEmpty(this.value) || this.value === 0);\r\n }\r\n\r\n override writeValue(value: any) {\r\n if (XIsEmpty(value)) value = 0;\r\n this.value = value;\r\n this.hoverActivated = value;\r\n this.hoverHalfActivated = Math.ceil(value);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateNodes: any = [];\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setRates();\r\n this.setFlex(this.rate.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRates() {\r\n this.rates = Array(this.count)\r\n .fill(0)\r\n .map((_, i) => i + 1);\r\n }\r\n\r\n rateHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.hoverActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n leaveRates() {\r\n if (this.disabled) return;\r\n const activited = this.value;\r\n this.hoverActivated = activited;\r\n this.hoverHalfActivated = Math.ceil(activited);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.value = this.value === rate ? 0 : rate;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n rateHalfHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.hoverActivated = rate - 1;\r\n this.hoverHalfActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateHalfClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.value = rate - 0.5;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n trackByItem(_index: number, item: number) {\r\n return item;\r\n }\r\n\r\n formControlChanges() {\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRateComponent } from './rate.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRateProperty } from './rate.property';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XRateComponent, XRateProperty],\r\n exports: [XRateComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule]\r\n})\r\nexport class XRateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,WAAW,GAAG,SAAS;AACpC,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B;;AAEG;AACH,MACa,aAAc,SAAQ,qBAA0B,CAAA;AAD7D,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACsB,IAAK,CAAA,KAAA,GAAY,CAAC,CAAC;AAgB7C,KAAA;kIArBY,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,kKADkC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;AAMnC,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;AAAoB,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKlB,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAAiB,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKO,UAAA,CAA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A,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;AELrC,MAKa,WAAW,CAAA;kIAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAX,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAJP,YAAA,EAAA,CAAA,cAAc,EAAE,aAAa,aAElC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,aADtE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;mIAGb,WAAW,EAAA,OAAA,EAAA,CAFZ,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAErE,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;oBAC7C,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC;AAClF,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-rate.mjs","sources":["../../../../lib/ng-nest/ui/rate/rate.property.ts","../../../../lib/ng-nest/ui/rate/rate.component.ts","../../../../lib/ng-nest/ui/rate/rate.component.html","../../../../lib/ng-nest/ui/rate/rate.module.ts","../../../../lib/ng-nest/ui/rate/ng-nest-ui-rate.ts"],"sourcesContent":["import { XInputNumber, XNumber, XInputBoolean, XBoolean, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component, TemplateRef } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Rate\r\n * @selector x-rate\r\n * @decorator component\r\n */\r\nexport const XRatePrefix = 'x-rate';\r\nconst X_CONFIG_NAME = 'rate';\r\n\r\n/**\r\n * Rate Property\r\n */\r\n@Component({ selector: `${XRatePrefix}-property`, template: '' })\r\nexport class XRateProperty extends XControlValueAccessor<any> implements XRateOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputNumber() count: XNumber = 5;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputBoolean() half?: XBoolean;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n @Input() @XWithConfig<XRateColor>(X_CONFIG_NAME) color?: XRateColor;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n @Input() customTemp!: TemplateRef<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 颜色类型\r\n * @en_US Color type\r\n */\r\nexport type XRateColor = string | { [color: string]: (rate: number) => boolean };\r\n\r\n/**\r\n * Rate Option\r\n * @undocument true\r\n */\r\nexport interface XRateOption extends XFormOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n count?: XNumber;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n half?: XBoolean;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n customTemp?: XTemplate;\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Renderer2, ElementRef, ChangeDetectorRef, ViewChild } from '@angular/core';\r\nimport { XIsEmpty, XClearClass, XConfigService, XIsString, XIsObject } from '@ng-nest/ui/core';\r\nimport { XRatePrefix, XRateProperty } from './rate.property';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRatePrefix}`,\r\n templateUrl: './rate.component.html',\r\n styleUrls: ['./rate.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRateComponent)]\r\n})\r\nexport class XRateComponent extends XRateProperty {\r\n @ViewChild('rate', { static: true }) rate!: ElementRef<HTMLElement>;\r\n rates: number[] = [];\r\n\r\n hoverActivated = 0;\r\n hoverHalfActivated = 0;\r\n\r\n get getColor() {\r\n let color = '';\r\n if (XIsString(this.color)) {\r\n color = this.color as string;\r\n } else if (XIsObject(this.color)) {\r\n this.color = this.color as { [color: string]: (rate: number) => boolean };\r\n let val = this.half ? (Math.floor(this.hoverActivated) + this.hoverHalfActivated) * 0.5 : this.hoverActivated;\r\n for (let key in this.color) {\r\n if (this.color[key](val)) {\r\n color = key;\r\n break;\r\n }\r\n }\r\n }\r\n return color;\r\n }\r\n\r\n override get requiredIsEmpty() {\r\n return this.validator && this.required && (XIsEmpty(this.value) || this.value === 0);\r\n }\r\n\r\n override writeValue(value: any) {\r\n if (XIsEmpty(value)) value = 0;\r\n this.value = value;\r\n this.hoverActivated = value;\r\n this.hoverHalfActivated = Math.ceil(value);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateNodes: any = [];\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setRates();\r\n this.setFlex(this.rate.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRates() {\r\n this.rates = Array(this.count)\r\n .fill(0)\r\n .map((_, i) => i + 1);\r\n }\r\n\r\n rateHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.hoverActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n leaveRates() {\r\n if (this.disabled) return;\r\n const activited = this.value;\r\n this.hoverActivated = activited;\r\n this.hoverHalfActivated = Math.ceil(activited);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.value = this.value === rate ? 0 : rate;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n rateHalfHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.hoverActivated = rate - 1;\r\n this.hoverHalfActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateHalfClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.value = rate - 0.5;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n trackByItem(_index: number, item: number) {\r\n return item;\r\n }\r\n\r\n formControlChanges() {\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRateComponent } from './rate.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRateProperty } from './rate.property';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XRateComponent, XRateProperty],\r\n exports: [XRateComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule]\r\n})\r\nexport class XRateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,WAAW,GAAG,SAAS;AACpC,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B;;AAEG;AAEG,MAAO,aAAc,SAAQ,qBAA0B,CAAA;AAD7D,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACsB,IAAK,CAAA,KAAA,GAAY,CAAC,CAAC;AAgB7C,KAAA;iIArBY,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAb,uBAAA,SAAA,IAAA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BACzB,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC;AAClF,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -59,8 +59,8 @@ class XResizableProperty extends XProperty {
|
|
|
59
59
|
*/
|
|
60
60
|
this.resizeEnd = new EventEmitter();
|
|
61
61
|
}
|
|
62
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
63
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
62
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableProperty, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: XResizableProperty, selector: "[xResizable]", inputs: { xResizable: "xResizable", position: "position", ghost: "ghost", offsetLeft: "offsetLeft", offsetTop: "offsetTop" }, outputs: { resizeBegin: "resizeBegin", resizing: "resizing", resizeEnd: "resizeEnd" }, usesInheritance: true, ngImport: i0 }); }
|
|
64
64
|
}
|
|
65
65
|
__decorate([
|
|
66
66
|
XInputBoolean()
|
|
@@ -74,7 +74,7 @@ __decorate([
|
|
|
74
74
|
__decorate([
|
|
75
75
|
XInputNumber()
|
|
76
76
|
], XResizableProperty.prototype, "offsetTop", void 0);
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableProperty, decorators: [{
|
|
78
78
|
type: Directive,
|
|
79
79
|
args: [{ selector: '[xResizable]' }]
|
|
80
80
|
}], propDecorators: { xResizable: [{
|
|
@@ -339,13 +339,13 @@ class XResizableDirective extends XResizableProperty {
|
|
|
339
339
|
this.mouseUpSub = undefined;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
343
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
342
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
343
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: XResizableDirective, selector: "[xResizable]", host: { listeners: { "mousedown": "mousedown($event)", "touchstart": "mousedown($event)" }, properties: { "class.x-resizable-disabled": "this.getDisabled" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
344
344
|
}
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableDirective, decorators: [{
|
|
346
346
|
type: Directive,
|
|
347
347
|
args: [{ selector: '[xResizable]' }]
|
|
348
|
-
}], ctorParameters:
|
|
348
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { getDisabled: [{
|
|
349
349
|
type: HostBinding,
|
|
350
350
|
args: ['class.x-resizable-disabled']
|
|
351
351
|
}], mousedown: [{
|
|
@@ -357,11 +357,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
357
357
|
}] } });
|
|
358
358
|
|
|
359
359
|
class XResizableModule {
|
|
360
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
361
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
362
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
360
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
361
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XResizableModule, declarations: [XResizableDirective], imports: [CommonModule], exports: [XResizableDirective] }); }
|
|
362
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableModule, imports: [CommonModule] }); }
|
|
363
363
|
}
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XResizableModule, decorators: [{
|
|
365
365
|
type: NgModule,
|
|
366
366
|
args: [{
|
|
367
367
|
declarations: [XResizableDirective],
|