├── .editorconfig ├── .gitignore ├── .npmignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── angular.json ├── build ├── mock.server.js └── new-cmp-template │ ├── demo │ ├── $template$-demo.component.html │ ├── $template$-demo.component.ts │ ├── $template$-demo.module.ts │ ├── README.md │ └── index.ts │ └── exports │ ├── $template$.component.html │ ├── $template$.component.scss │ ├── $template$.component.spec.ts │ ├── $template$.component.ts │ └── $template$.module.ts ├── e2e ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.e2e.json ├── gulpfile.js ├── ngsw-config.json ├── package-lock.json ├── package.json ├── projects └── rebirth-ng │ ├── karma.conf.js │ ├── ng-package.json │ ├── ng-package.prod.json │ ├── package.json │ ├── src │ ├── lib │ │ ├── accordion │ │ │ ├── accordion.component.html │ │ │ ├── accordion.component.ts │ │ │ └── accordion.module.ts │ │ ├── action-button │ │ │ ├── action-button.component.html │ │ │ ├── action-button.component.ts │ │ │ ├── action-button.module.ts │ │ │ └── action-item.model.ts │ │ ├── alert-box │ │ │ ├── alert-box.component.html │ │ │ ├── alert-box.component.scss │ │ │ ├── alert-box.component.spec.ts │ │ │ ├── alert-box.component.ts │ │ │ └── alert-box.module.ts │ │ ├── auto-complete │ │ │ ├── alert-component.component.spec.ts │ │ │ ├── auto-complete-popup.component.html │ │ │ ├── auto-complete-popup.component.scss │ │ │ ├── auto-complete-popup.component.ts │ │ │ ├── auto-complete.directive.ts │ │ │ ├── auto-complete.module.ts │ │ │ ├── hightlight.component.ts │ │ │ ├── mutiple-auto-complete.component.html │ │ │ ├── mutiple-auto-complete.component.scss │ │ │ └── mutiple-auto-complete.component.ts │ │ ├── badge │ │ │ ├── badge.component.ts │ │ │ └── badge.module.ts │ │ ├── breadcrumbs │ │ │ ├── breadcrumbs.component.html │ │ │ ├── breadcrumbs.component.scss │ │ │ ├── breadcrumbs.component.ts │ │ │ ├── breadcrumbs.model.ts │ │ │ └── breadcrumbs.module.ts │ │ ├── carousel │ │ │ ├── carousel.component.html │ │ │ ├── carousel.component.ts │ │ │ ├── carousel.module.ts │ │ │ └── slide.directive.ts │ │ ├── checkbox-group │ │ │ ├── checkbox-group.component.html │ │ │ ├── checkbox-group.component.scss │ │ │ ├── checkbox-group.component.spec.ts │ │ │ ├── checkbox-group.component.ts │ │ │ ├── checkbox-group.module.ts │ │ │ ├── checkbox.component.html │ │ │ ├── checkbox.component.scss │ │ │ └── checkbox.component.ts │ │ ├── common │ │ │ ├── assets-loader.service.ts │ │ │ ├── auto-focus.directive.ts │ │ │ ├── common.module.ts │ │ │ ├── component.deactivate.ts │ │ │ ├── date.pipe.ts │ │ │ ├── dropdown.directive.ts │ │ │ ├── resizeable.directive.ts │ │ │ ├── router-reuse-strategy.ts │ │ │ ├── template-loader.component.ts │ │ │ └── trust-html.pipe.ts │ │ ├── date-picker │ │ │ ├── date-change-event-args.model.ts │ │ │ ├── date-picker-popup.component.html │ │ │ ├── date-picker-popup.component.scss │ │ │ ├── date-picker-popup.component.ts │ │ │ ├── date-picker.directive.ts │ │ │ └── date-picker.module.ts │ │ ├── dialog │ │ │ ├── alert-dialog.component.html │ │ │ ├── alert-dialog.component.ts │ │ │ ├── confirm-dialog.component.html │ │ │ ├── confirm-dialog.component.ts │ │ │ ├── dialog-options.model.ts │ │ │ ├── dialog.module.ts │ │ │ ├── dialog.scss │ │ │ ├── dialog.service.ts │ │ │ ├── prompt-dialog.component.html │ │ │ └── prompt-dialog.component.ts │ │ ├── draggable │ │ │ ├── draggable.directive.ts │ │ │ ├── draggable.module.ts │ │ │ └── droppable.directive.ts │ │ ├── ellipsis │ │ │ ├── ellipsis.component.html │ │ │ ├── ellipsis.component.scss │ │ │ ├── ellipsis.component.spec.ts │ │ │ ├── ellipsis.component.ts │ │ │ └── ellipsis.module.ts │ │ ├── file-upload │ │ │ ├── file-upload-preview.component.html │ │ │ ├── file-upload-preview.component.ts │ │ │ ├── file-upload.component.html │ │ │ ├── file-upload.component.scss │ │ │ ├── file-upload.component.spec.ts │ │ │ ├── file-upload.component.ts │ │ │ ├── file-upload.model.ts │ │ │ ├── file-upload.module.ts │ │ │ └── file-upload.ts │ │ ├── flow-step │ │ │ ├── flow-step.component.html │ │ │ ├── flow-step.component.scss │ │ │ ├── flow-step.component.ts │ │ │ ├── flow-step.model.ts │ │ │ └── flow-step.module.ts │ │ ├── image-upload │ │ │ ├── image-upload.component.html │ │ │ ├── image-upload.component.scss │ │ │ ├── image-upload.component.spec.ts │ │ │ ├── image-upload.component.ts │ │ │ ├── image-upload.module.ts │ │ │ ├── view-image-modal.component.html │ │ │ ├── view-image-modal.component.scss │ │ │ └── view-image-modal.component.ts │ │ ├── infinite-scroll │ │ │ ├── infinite-scroll.component.html │ │ │ ├── infinite-scroll.component.scss │ │ │ ├── infinite-scroll.component.ts │ │ │ └── infinite-scroll.module.ts │ │ ├── menu-bar │ │ │ ├── menu-bar.component.html │ │ │ ├── menu-bar.component.scss │ │ │ ├── menu-bar.component.ts │ │ │ ├── menu-bar.model.ts │ │ │ ├── menu-bar.module.ts │ │ │ ├── nav-item.component.html │ │ │ ├── nav-item.component.scss │ │ │ └── nav-item.component.ts │ │ ├── modal │ │ │ ├── modal-backdrop.component.ts │ │ │ ├── modal-content.component.ts │ │ │ ├── modal-dismiss-reasons.model.ts │ │ │ ├── modal-options.model.ts │ │ │ ├── modal-window.component.html │ │ │ ├── modal-window.component.ts │ │ │ ├── modal.component.html │ │ │ ├── modal.component.ts │ │ │ ├── modal.model.ts │ │ │ ├── modal.module.ts │ │ │ └── modal.service.ts │ │ ├── notify │ │ │ ├── notify.component.html │ │ │ ├── notify.component.scss │ │ │ ├── notify.component.ts │ │ │ ├── notify.model.ts │ │ │ ├── notify.module.ts │ │ │ └── notify.service.ts │ │ ├── overlay │ │ │ ├── overlay-content.component.ts │ │ │ ├── overlay-options.model.ts │ │ │ ├── overlay.component.html │ │ │ ├── overlay.component.scss │ │ │ ├── overlay.component.ts │ │ │ ├── overlay.module.ts │ │ │ └── overlay.service.ts │ │ ├── pager │ │ │ ├── pager.component.scss │ │ │ ├── pager.component.ts │ │ │ ├── pager.module.ts │ │ │ └── re-pager.component.html │ │ ├── pagination │ │ │ ├── pagination.component.html │ │ │ ├── pagination.component.scss │ │ │ ├── pagination.component.ts │ │ │ └── pagination.module.ts │ │ ├── panel │ │ │ ├── panel-body.component.ts │ │ │ ├── panel-footer.component.ts │ │ │ ├── panel-group.model.ts │ │ │ ├── panel-header.component.ts │ │ │ ├── panel.component.html │ │ │ ├── panel.component.ts │ │ │ └── panel.module.ts │ │ ├── popover │ │ │ ├── popover-popup.component.html │ │ │ ├── popover-popup.component.ts │ │ │ ├── popover.directive.ts │ │ │ └── popover.module.ts │ │ ├── position │ │ │ └── positioning.service.ts │ │ ├── progress-bar │ │ │ ├── progress-bar.component.html │ │ │ ├── progress-bar.component.scss │ │ │ ├── progress-bar.component.ts │ │ │ └── progress-bar.module.ts │ │ ├── radio-group │ │ │ ├── radio-group.component.html │ │ │ ├── radio-group.component.scss │ │ │ ├── radio-group.component.spec.ts │ │ │ ├── radio-group.component.ts │ │ │ └── radio-group.module.ts │ │ ├── rating │ │ │ ├── rating.component.html │ │ │ ├── rating.component.scss │ │ │ ├── rating.component.ts │ │ │ └── rating.module.ts │ │ ├── rebirth-ng.config.ts │ │ ├── rebirth-ng.i18n.zh-cn.ts │ │ ├── rebirth-ng.module.ts │ │ ├── select-button │ │ │ ├── select-button-item.model.ts │ │ │ ├── select-button.component.html │ │ │ ├── select-button.component.ts │ │ │ └── select-button.module.ts │ │ ├── select │ │ │ ├── select.component.html │ │ │ ├── select.component.scss │ │ │ ├── select.component.spec.ts │ │ │ ├── select.component.ts │ │ │ ├── select.model.ts │ │ │ └── select.module.ts │ │ ├── slider │ │ │ ├── slider.component.html │ │ │ ├── slider.component.scss │ │ │ ├── slider.component.spec.ts │ │ │ ├── slider.component.ts │ │ │ └── slider.module.ts │ │ ├── switch │ │ │ ├── switch.component.html │ │ │ ├── switch.component.scss │ │ │ ├── switch.component.ts │ │ │ └── switch.module.ts │ │ ├── tabs │ │ │ ├── tab-content.directive.ts │ │ │ ├── tab-title.directive.ts │ │ │ ├── tab.component.ts │ │ │ ├── tabs.component.html │ │ │ ├── tabs.component.ts │ │ │ └── tabs.module.ts │ │ ├── tags │ │ │ ├── tags.component.html │ │ │ ├── tags.component.scss │ │ │ ├── tags.component.spec.ts │ │ │ ├── tags.component.ts │ │ │ └── tags.module.ts │ │ ├── time-picker │ │ │ ├── time-picker.component.html │ │ │ ├── time-picker.component.scss │ │ │ ├── time-picker.component.ts │ │ │ └── time-picker.module.ts │ │ ├── tooltip │ │ │ ├── tooltip-popup.component.html │ │ │ ├── tooltip-popup.component.scss │ │ │ ├── tooltip-popup.component.ts │ │ │ ├── tooltip-popup.ts │ │ │ ├── tooltip.directive.ts │ │ │ ├── tooltip.module.ts │ │ │ └── tooltip.ts │ │ ├── tree-view │ │ │ ├── tee-node.component.html │ │ │ ├── tee-node.component.scss │ │ │ ├── tree-node.component.ts │ │ │ ├── tree-panel.component.html │ │ │ ├── tree-panel.component.ts │ │ │ ├── tree-view.component.html │ │ │ ├── tree-view.component.scss │ │ │ ├── tree-view.component.spec.ts │ │ │ ├── tree-view.component.ts │ │ │ ├── tree-view.model.ts │ │ │ ├── tree-view.module.ts │ │ │ └── tree-view.service.ts │ │ ├── utils │ │ │ ├── animation-utils.ts │ │ │ ├── date-converter.ts │ │ │ ├── date-utils.ts │ │ │ ├── default-date-converter.ts │ │ │ ├── dom-utils.ts │ │ │ ├── keyboard-utils.ts │ │ │ └── lange-utils.ts │ │ ├── validators │ │ │ ├── rebirth-validators.directive.ts │ │ │ ├── rebirth-validators.module.ts │ │ │ └── rebirth-validators.ts │ │ └── window-ref │ │ │ ├── document-ref.service.ts │ │ │ └── window-ref.service.ts │ ├── public_api.ts │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ └── tslint.json ├── src ├── app │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.ts │ ├── app.module.ts │ ├── app.route.ts │ ├── demo │ │ ├── README.md │ │ ├── accordion │ │ │ ├── README.md │ │ │ ├── accordion-demo.component.html │ │ │ ├── accordion-demo.component.ts │ │ │ ├── accordion-demo.module.ts │ │ │ └── index.ts │ │ ├── action-button │ │ │ ├── README.md │ │ │ ├── action-button-demo.component.html │ │ │ ├── action-button-demo.component.ts │ │ │ ├── action-button-demo.module.ts │ │ │ └── index.ts │ │ ├── alert-box │ │ │ ├── README.md │ │ │ ├── alert-box-demo.component.html │ │ │ ├── alert-box-demo.component.ts │ │ │ ├── alert-box-demo.module.ts │ │ │ └── index.ts │ │ ├── auto-complete │ │ │ ├── README.md │ │ │ ├── auto-complete-demo.component.html │ │ │ ├── auto-complete-demo.component.scss │ │ │ ├── auto-complete-demo.component.ts │ │ │ ├── auto-complete-demo.mdoule.ts │ │ │ └── index.ts │ │ ├── badge │ │ │ ├── README.md │ │ │ ├── badge-demo.component.html │ │ │ ├── badge-demo.component.ts │ │ │ ├── badge-demo.module.ts │ │ │ └── index.ts │ │ ├── breadcrumbs │ │ │ ├── README.md │ │ │ ├── breadcrumbs-demo.component.html │ │ │ ├── breadcrumbs-demo.component.ts │ │ │ ├── breadcrumbs-demo.module.ts │ │ │ └── index.ts │ │ ├── carousel │ │ │ ├── README.md │ │ │ ├── carousel-demo.component.html │ │ │ ├── carousel-demo.component.ts │ │ │ ├── carousel-demo.module.ts │ │ │ └── index.ts │ │ ├── checkbox-group │ │ │ ├── README.md │ │ │ ├── checkbox-group-demo.component.html │ │ │ ├── checkbox-group-demo.component.ts │ │ │ ├── checkbox-group-demo.module.ts │ │ │ └── index.ts │ │ ├── common │ │ │ └── README.md │ │ ├── data-table │ │ │ ├── data-table-demo.component.html │ │ │ ├── data-table-demo.component.ts │ │ │ ├── data-table-demo.module.ts │ │ │ └── index.ts │ │ ├── date-picker │ │ │ ├── README.md │ │ │ ├── date-picker-demo.component.html │ │ │ ├── date-picker-demo.component.ts │ │ │ ├── date-picker-demo.module.ts │ │ │ └── index.ts │ │ ├── dialog │ │ │ ├── README.md │ │ │ ├── dialog-demo.component.html │ │ │ ├── dialog-demo.component.scss │ │ │ ├── dialog-demo.component.ts │ │ │ ├── dialog-demo.module.ts │ │ │ └── index.ts │ │ ├── draggable │ │ │ ├── README.md │ │ │ ├── draggable-demo.component.html │ │ │ ├── draggable-demo.component.ts │ │ │ ├── draggable-demo.module.ts │ │ │ └── index.ts │ │ ├── ellipsis │ │ │ ├── README.md │ │ │ ├── ellipsis-demo.component.html │ │ │ ├── ellipsis-demo.component.ts │ │ │ ├── ellipsis-demo.module.ts │ │ │ └── index.ts │ │ ├── file-upload │ │ │ ├── README.md │ │ │ ├── file-upload-demo.component.html │ │ │ ├── file-upload-demo.component.ts │ │ │ ├── file-upload-demo.module.ts │ │ │ └── index.ts │ │ ├── flow-step │ │ │ ├── README.md │ │ │ ├── flow-step-demo.component.html │ │ │ ├── flow-step-demo.component.ts │ │ │ ├── flow-step-demo.module.ts │ │ │ └── index.ts │ │ ├── image-upload │ │ │ ├── README.md │ │ │ ├── image-upload-demo.component.html │ │ │ ├── image-upload-demo.component.ts │ │ │ ├── image-upload-demo.module.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── infinite-scroll │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── infinite-scroll-demo.component.html │ │ │ ├── infinite-scroll-demo.component.ts │ │ │ └── infinite-scroll-demo.module.ts │ │ ├── menu-bar │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── menu-bar-demo.component.html │ │ │ ├── menu-bar-demo.component.ts │ │ │ └── menu-bar-demo.module.ts │ │ ├── modal │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── modal-demo.component.html │ │ │ ├── modal-demo.component.ts │ │ │ └── modal-demo.module.ts │ │ ├── notify │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── notify-demo.component.html │ │ │ ├── notify-demo.component.ts │ │ │ └── notify-demo.module.ts │ │ ├── overlay │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── overlay-demo.component.html │ │ │ ├── overlay-demo.component.ts │ │ │ └── overlay-demo.module.ts │ │ ├── pager │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── pager-demo.component.html │ │ │ ├── pager-demo.component.ts │ │ │ └── pager-demo.module.ts │ │ ├── pagination │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── pagination-demo.component.html │ │ │ ├── pagination-demo.component.scss │ │ │ ├── pagination-demo.component.ts │ │ │ └── pagination-demo.module.ts │ │ ├── panel │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── panel-demo.component.html │ │ │ ├── panel-demo.component.ts │ │ │ └── panel-demo.module.ts │ │ ├── popover │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── popover-demo.component.html │ │ │ ├── popover-demo.component.ts │ │ │ └── popover-demo.module.ts │ │ ├── position │ │ │ └── README.md │ │ ├── progress-bar │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── progress-bar-demo.component.html │ │ │ ├── progress-bar-demo.component.ts │ │ │ └── progress-bar-demo.module.ts │ │ ├── radio-group │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── radio-group-demo.component.html │ │ │ ├── radio-group-demo.component.ts │ │ │ └── radio-group-demo.module.ts │ │ ├── rating │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── rating-demo.component.html │ │ │ ├── rating-demo.component.ts │ │ │ └── rating-demo.module.ts │ │ ├── select-button │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── select-button-demo.component.html │ │ │ ├── select-button-demo.component.ts │ │ │ └── select-button-demo.module.ts │ │ ├── select │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── select-demo.component.html │ │ │ ├── select-demo.component.ts │ │ │ └── select-demo.module.ts │ │ ├── slider │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── slider-demo.component.html │ │ │ ├── slider-demo.component.ts │ │ │ └── slider-demo.module.ts │ │ ├── switch │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── switch-demo.component.html │ │ │ ├── switch-demo.component.ts │ │ │ └── switch-demo.module.ts │ │ ├── tabs │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── tabs-demo.component.html │ │ │ ├── tabs-demo.component.ts │ │ │ └── tabs-demo.module.ts │ │ ├── tags │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── tags-demo.component.html │ │ │ ├── tags-demo.component.ts │ │ │ └── tags-demo.module.ts │ │ ├── time-picker │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── time-picker-demo.component.html │ │ │ ├── time-picker-demo.component.ts │ │ │ └── time-picker-demo.module.ts │ │ ├── tooltip │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── tooltip-demo.component.html │ │ │ ├── tooltip-demo.component.ts │ │ │ └── tooltip.module.ts │ │ ├── tree-view │ │ │ ├── README.md │ │ │ ├── data.json │ │ │ ├── index.ts │ │ │ ├── tree-view-demo.component.html │ │ │ ├── tree-view-demo.component.ts │ │ │ └── tree-view-demo.module.ts │ │ ├── validators │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ ├── validators-demo.component.html │ │ │ ├── validators-demo.component.scss │ │ │ ├── validators-demo.component.ts │ │ │ └── validators-demo.module.ts │ │ └── window-ref │ │ │ └── README.md │ ├── feature │ │ ├── getting-started.component.html │ │ ├── getting-started.component.scss │ │ ├── getting-started.component.ts │ │ ├── index.ts │ │ ├── show-case.component.html │ │ └── show-case.component.ts │ └── shared │ │ ├── demo │ │ ├── demo-config.service.ts │ │ └── index.ts │ │ ├── doc │ │ ├── doc-content.component.ts │ │ ├── doc.component.html │ │ ├── doc.component.scss │ │ ├── doc.component.ts │ │ ├── hightlight.ts │ │ └── index.ts │ │ ├── index.ts │ │ ├── shared.module.ts │ │ └── theme │ │ ├── index.ts │ │ └── theme.service.ts ├── assets │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── images │ │ ├── loading.gif │ │ └── rebirth-home.jpg │ └── themes │ │ ├── bootstrap.cosmo.css │ │ ├── bootstrap.dark.css │ │ ├── bootstrap.default.css │ │ ├── bootstrap.journal.css │ │ ├── bootstrap.material-design.css │ │ ├── bootstrap.paper.css │ │ ├── bootstrap.readable.css │ │ ├── bootstrap.sandstone.css │ │ └── bootstrap.united.css ├── browserslist ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── karma.conf.js ├── main.ts ├── polyfills.ts ├── styles.scss ├── styles │ ├── bootstrap.scss │ ├── common.scss │ ├── mixins.scss │ ├── modules │ │ └── overlay.scss │ └── variables.scss ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json ├── tslint.json └── typing.d.ts ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | .tmp 5 | /dist 6 | /doc 7 | /typedocs 8 | /tmp 9 | /lib 10 | /aot 11 | rebirth-ng-**.tgz 12 | # dependencies 13 | /node_modules 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | 23 | # IDE - VSCode 24 | .vscode/ 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | 30 | # misc 31 | /.sass-cache 32 | /connect.lock 33 | /coverage/* 34 | /libpeerconnection.log 35 | npm-debug.log 36 | testem.log 37 | /typings 38 | 39 | # e2e 40 | /e2e/*.js 41 | /e2e/*.map 42 | 43 | #System Files 44 | .DS_Store 45 | Thumbs.db 46 | yarn.lock 47 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Node generated files 2 | node_modules 3 | npm-debug.log 4 | 5 | # OS generated files 6 | Thumbs.db 7 | .DS_Store 8 | 9 | e2e 10 | gulpfile.js 11 | protractor.conf.js 12 | karma.conf.js 13 | tslint.json 14 | typedoc.json 15 | rebirth-ng-**.tgz 16 | angular-cli.json 17 | .editorconfig 18 | build 19 | .idea 20 | yarn.lock 21 | # ngc generated files 22 | aot 23 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | addons: 4 | apt: 5 | sources: 6 | - google-chrome 7 | packages: 8 | - google-chrome-stable 9 | language: node_js 10 | node_js: 11 | - "10" 12 | matrix: 13 | fast_finish: true 14 | before_install: 15 | - npm i npm@^4 -g 16 | - npm install -g @angular/cli@latest 17 | install: 18 | - npm install 19 | before_script: 20 | - export DISPLAY=:99.0 21 | - sh -e /etc/init.d/xvfb start 22 | - sleep 3 23 | script: 24 | - npm test 25 | cache: 26 | directories: 27 | - node_modules 28 | -------------------------------------------------------------------------------- /build/new-cmp-template/demo/$template$-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Demo:

5 | >> 6 |
7 | 8 |
9 | -------------------------------------------------------------------------------- /build/new-cmp-template/demo/$template$-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-<%= componentSelector %>-demo', 5 | templateUrl: './<%= componentSelector %>-demo.component.html' 6 | }) 7 | export class <%= componentName %>DemoComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /build/new-cmp-template/demo/$template$-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { <%= componentName %>DemoComponent } from './<%= componentSelector %>-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [ 13 | <%= componentName %>DemoComponent 14 | ], 15 | declarations: [<%= componentName %>DemoComponent], 16 | providers: [], 17 | entryComponents: [<%= componentName %>DemoComponent] 18 | }) 19 | export class <%= componentName %>DemoModule { 20 | } 21 | -------------------------------------------------------------------------------- /build/new-cmp-template/demo/README.md: -------------------------------------------------------------------------------- 1 | #### <%= componentName %> 2 | 3 | -------------------------------------------------------------------------------- /build/new-cmp-template/demo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './<%= componentSelector %>-demo.component'; 2 | export * from './<%= componentSelector %>-demo.module'; 3 | -------------------------------------------------------------------------------- /build/new-cmp-template/exports/$template$.component.html: -------------------------------------------------------------------------------- 1 |
2 | hello <%= componentName %> 3 |
4 | -------------------------------------------------------------------------------- /build/new-cmp-template/exports/$template$.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/build/new-cmp-template/exports/$template$.component.scss -------------------------------------------------------------------------------- /build/new-cmp-template/exports/$template$.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { <%= componentName %>Module } from './<%= componentSelector %>.module'; 5 | 6 | describe('<%= componentName %>', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | imports: [ 10 | <%= componentName %>Module 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('mcok test', async(() => { 17 | expect(true).toBeTruthy(); 18 | })); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /build/new-cmp-template/exports/$template$.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-<%= componentSelector %>', 5 | templateUrl: './<%= componentSelector %>.component.html', 6 | styleUrls: ['./<%= componentSelector %>.component.scss'], 7 | changeDetection: ChangeDetectionStrategy.OnPush, 8 | exportAs: '<%= componentName %>' 9 | }) 10 | export class <%= componentName %>Component { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /build/new-cmp-template/exports/$template$.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { <%= componentName %>Component } from './<%= componentSelector %>.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | providers: [], 11 | declarations: [ 12 | <%= componentName %>Component 13 | ], 14 | exports: [ 15 | <%= componentName %>Component 16 | ], 17 | }) 18 | export class <%= componentName %>Module { 19 | } 20 | -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /ngsw-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": "/index.html", 3 | "assetGroups": [ 4 | { 5 | "name": "app", 6 | "installMode": "prefetch", 7 | "resources": { 8 | "files": [ 9 | "/favicon.ico", 10 | "/index.html" 11 | ], 12 | "versionedFiles": [ 13 | "/*.bundle.css", 14 | "/*.bundle.js", 15 | "/*.chunk.js" 16 | ] 17 | } 18 | }, 19 | { 20 | "name": "assets", 21 | "installMode": "lazy", 22 | "updateMode": "prefetch", 23 | "resources": { 24 | "files": [ 25 | "/assets/**" 26 | ], 27 | "urls": [ 28 | "https://fonts.googleapis.com/**", 29 | "https://fonts.gstatic.com/**", 30 | "https://greengerong.github.io/rebirth/assets/**" 31 | ] 32 | } 33 | }, 34 | { 35 | "name": "compodocs", 36 | "installMode": "lazy", 37 | "updateMode": "prefetch", 38 | "resources": { 39 | "urls": [ 40 | "https://greengerong.github.io/rebirth-ng/compodocs/**" 41 | ] 42 | } 43 | } 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /projects/rebirth-ng/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /projects/rebirth-ng/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/rebirth-ng", 4 | "deleteDestPath": false, 5 | "lib": { 6 | "entryFile": "src/public_api.ts" 7 | } 8 | } -------------------------------------------------------------------------------- /projects/rebirth-ng/ng-package.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/rebirth-ng", 4 | "lib": { 5 | "entryFile": "src/public_api.ts" 6 | } 7 | } -------------------------------------------------------------------------------- /projects/rebirth-ng/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rebirth-ng", 3 | "version": "6.0.3", 4 | "license": "MIT", 5 | "private": false, 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/greengerong/rebirth-ng.git" 9 | }, 10 | "dependencies": { 11 | }, 12 | "peerDependencies": { 13 | "date-fns": "^1.29.0", 14 | "@angular/animations": "^6.1.0-beta.1", 15 | "@angular/common": "^6.1.0-beta.1", 16 | "@angular/core": "^6.1.0-beta.1", 17 | "@angular/forms": "^6.1.0-beta.1", 18 | "@angular/router": "^6.1.0-beta.1" 19 | }, 20 | "description": "> Angular UI plugin with bootstrap;", 21 | "bugs": { 22 | "url": "https://github.com/greengerong/rebirth-ng/issues" 23 | }, 24 | "homepage": "https://github.com/greengerong/rebirth-ng#readme", 25 | "author": "" 26 | } 27 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/accordion/accordion.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/accordion/accordion.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AccordionComponent } from './accordion.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | exports: [AccordionComponent], 11 | declarations: [AccordionComponent], 12 | providers: [], 13 | }) 14 | export class AccordionModule { 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/action-button/action-button.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { ActionButtonComponent } from './action-button.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [ActionButtonComponent], 9 | declarations: [ActionButtonComponent], 10 | providers: [], 11 | }) 12 | export class ActionButtonModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/action-button/action-item.model.ts: -------------------------------------------------------------------------------- 1 | export interface ActionItem { 2 | id?: string | number; 3 | text?: string; 4 | icon?: string; 5 | divider?: boolean; 6 | header?: boolean; 7 | disabled?: boolean; 8 | } 9 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/alert-box/alert-box.component.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/alert-box/alert-box.component.scss: -------------------------------------------------------------------------------- 1 | .alert-remove-icon { 2 | font-size: 14px; 3 | } 4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/alert-box/alert-box.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; 2 | import { RebirthNGConfig } from '../rebirth-ng.config'; 3 | 4 | @Component({ 5 | selector: 're-alert-box', 6 | templateUrl: './alert-box.component.html', 7 | styleUrls: ['./alert-box.component.scss'], 8 | exportAs: 'alertBox', 9 | changeDetection: ChangeDetectionStrategy.OnPush 10 | }) 11 | export class AlertBoxComponent { 12 | @Input() removeIcon: string; 13 | @Input() type: 'success' | 'info' | 'warning' | 'danger' = 'info'; 14 | @Input() cssClass: string; 15 | @Input() closable: boolean; 16 | @Output() close = new EventEmitter(); 17 | 18 | constructor(rebirthNGConfig: RebirthNGConfig) { 19 | this.type = rebirthNGConfig.alertBox.type; 20 | this.closable = rebirthNGConfig.alertBox.closable; 21 | this.removeIcon = rebirthNGConfig.alertBox.removeIcon; 22 | } 23 | 24 | closeBox() { 25 | this.onCloseBox(); 26 | } 27 | 28 | private onCloseBox() { 29 | this.close.emit(this); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/alert-box/alert-box.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AlertBoxComponent } from './alert-box.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | providers: [], 11 | declarations: [ 12 | AlertBoxComponent, 13 | ], 14 | exports: [ 15 | AlertBoxComponent, 16 | ], 17 | }) 18 | export class AlertBoxModule { 19 | } 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/auto-complete/auto-complete-popup.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/auto-complete/auto-complete-popup.component.scss: -------------------------------------------------------------------------------- 1 | .dropdown-item { 2 | display: block; 3 | width: 100%; 4 | padding: 8px 1rem; 5 | clear: both; 6 | white-space: nowrap; 7 | border: 0; 8 | } 9 | 10 | .popup-list { 11 | max-height: 250px; 12 | overflow: auto; 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/auto-complete/auto-complete.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { AutoCompleteDirective } from './auto-complete.directive'; 5 | import { AutoCompletePopupComponent } from './auto-complete-popup.component'; 6 | import { HightlightComponent } from './hightlight.component'; 7 | import { MutipleAutoCompleteComponent } from './mutiple-auto-complete.component'; 8 | import { FormsModule } from '@angular/forms'; 9 | 10 | @NgModule({ 11 | imports: [CommonModule, FormsModule], 12 | exports: [AutoCompleteDirective, AutoCompletePopupComponent, HightlightComponent, MutipleAutoCompleteComponent], 13 | declarations: [AutoCompleteDirective, AutoCompletePopupComponent, HightlightComponent, MutipleAutoCompleteComponent], 14 | providers: [], 15 | entryComponents: [AutoCompletePopupComponent] 16 | }) 17 | export class AutoCompleteModule { 18 | } 19 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/auto-complete/hightlight.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-hightlight', 5 | template: ``, 6 | host: { 7 | '[innerHTML]': 'hightlightHtml', 8 | 'display': 'inline' 9 | }, 10 | changeDetection: ChangeDetectionStrategy.OnPush 11 | }) 12 | export class HightlightComponent implements OnChanges { 13 | @Input() value: string; 14 | @Input() term: string; 15 | hightlightHtml: string; 16 | 17 | ngOnChanges(): void { 18 | this.hightlightHtml = this.transform(this.value, this.term); 19 | } 20 | 21 | 22 | transform(value: string, term: string): any { 23 | return value && term ? this.hightlight(value, term) : value; 24 | } 25 | 26 | hightlight(value: string, term: string) { 27 | const termValue = term || ''; 28 | if (termValue.replace) { 29 | const regExp = new RegExp(termValue.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'gi'); 30 | return value.replace(regExp, function (match) { 31 | return `${match}`; 32 | }); 33 | } 34 | return value; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/auto-complete/mutiple-auto-complete.component.scss: -------------------------------------------------------------------------------- 1 | .mutiple-label-auto-complete { 2 | padding: 0px; 3 | font-weight: normal; 4 | 5 | .form-control { 6 | height: auto; 7 | } 8 | 9 | ul { 10 | padding: 0; 11 | margin: 0; 12 | 13 | &:focus { 14 | border-color: #66afe9; 15 | outline: 1px; 16 | } 17 | 18 | &::-ms-expand { 19 | border: 0; 20 | background-color: transparent; 21 | } 22 | 23 | li{ 24 | display: inline-block; 25 | 26 | &:not(:nth-last-of-type(1)) { 27 | margin-right: 8px; 28 | } 29 | 30 | .label-close { 31 | cursor: pointer; 32 | margin-right: 5px; 33 | font-weight: bold; 34 | font-size: 1.5rem; 35 | } 36 | } 37 | 38 | .auto-complete-control { 39 | height: 100%; 40 | border: none; 41 | outline: none; 42 | :focus { 43 | border: none; 44 | outline: none; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/badge/badge.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-badge', 5 | template: '', 6 | host: { 7 | '[class]': '"badge " + (cssClass ? cssClass : "")', 8 | '[innerText]': 'text' 9 | }, 10 | changeDetection: ChangeDetectionStrategy.OnPush 11 | }) 12 | export class BadgeComponent { 13 | @Input() cssClass: string; 14 | @Input() text: string; 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/badge/badge.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { BadgeComponent } from './badge.component'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | exports: [BadgeComponent], 11 | declarations: [BadgeComponent], 12 | providers: [], 13 | }) 14 | export class BadgeModule { 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/breadcrumbs/breadcrumbs.component.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/breadcrumbs/breadcrumbs.component.scss: -------------------------------------------------------------------------------- 1 | 2 | .breadcrumb { 3 | a { 4 | cursor: pointer; 5 | } 6 | 7 | .breadcrumb-icon { 8 | margin-right: 2px; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/breadcrumbs/breadcrumbs.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy, Input } from '@angular/core'; 2 | import { Breadcrumb } from './breadcrumbs.model'; 3 | 4 | @Component({ 5 | selector: 're-breadcrumbs', 6 | templateUrl: './breadcrumbs.component.html', 7 | styleUrls: ['./breadcrumbs.component.scss'], 8 | changeDetection: ChangeDetectionStrategy.OnPush 9 | }) 10 | export class BreadcrumbsComponent { 11 | @Input() items: Breadcrumb[] = []; 12 | @Input() cssClass: string; 13 | 14 | itemClick(item: Breadcrumb) { 15 | if (item.handle) { 16 | item.handle(item); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/breadcrumbs/breadcrumbs.model.ts: -------------------------------------------------------------------------------- 1 | export interface Breadcrumb { 2 | text: string; 3 | icon?: string; 4 | url?: string; 5 | router?: any[]; 6 | queryParams?: any; 7 | target?: '_blank' | '_self' | '_parent' | '_top' | any; 8 | data?: any; 9 | handle?: (item: Breadcrumb) => void; 10 | } 11 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/breadcrumbs/breadcrumbs.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { BreadcrumbsComponent } from './breadcrumbs.component'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RouterModule], 9 | exports: [BreadcrumbsComponent], 10 | declarations: [BreadcrumbsComponent], 11 | providers: [], 12 | }) 13 | export class BreadcrumbsModule { 14 | } 15 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/carousel/carousel.component.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/carousel/carousel.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { CarouselComponent } from './carousel.component'; 5 | import { SlideDirective } from './slide.directive'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule], 9 | exports: [CarouselComponent, SlideDirective], 10 | declarations: [CarouselComponent, SlideDirective], 11 | providers: [], 12 | }) 13 | export class CarouselModule { 14 | } 15 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/carousel/slide.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, TemplateRef } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ng-template[reSlide]', 5 | }) 6 | export class SlideDirective { 7 | constructor(public templateRef: TemplateRef) { 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/checkbox-group/checkbox-group.component.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/checkbox-group/checkbox-group.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .checkbox-inline label { 6 | font-weight: normal; 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/checkbox-group/checkbox-group.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { CheckboxGroupComponent } from './checkbox-group.component'; 5 | 6 | describe('CheckboxGroup', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | declarations: [ 10 | CheckboxGroupComponent 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('mcok test', async(() => { 17 | expect(true).toBeTruthy(); 18 | })); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/checkbox-group/checkbox-group.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { CheckboxGroupComponent } from './checkbox-group.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { CheckboxComponent } from './checkbox.component'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule 10 | ], 11 | providers: [], 12 | declarations: [ 13 | CheckboxGroupComponent, 14 | CheckboxComponent 15 | ], 16 | exports: [ 17 | CheckboxGroupComponent, 18 | CheckboxComponent 19 | ], 20 | }) 21 | export class CheckboxGroupModule { 22 | } 23 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/checkbox-group/checkbox.component.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/checkbox-group/checkbox.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/projects/rebirth-ng/src/lib/checkbox-group/checkbox.component.scss -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/common/auto-focus.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input, ElementRef, AfterViewInit } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[reAutoFocus]', 5 | }) 6 | export class AutoFocusDirective implements AfterViewInit { 7 | 8 | @Input('reAutoFocus') autoFocus: boolean; 9 | 10 | constructor(private elementRef: ElementRef) { 11 | } 12 | 13 | ngAfterViewInit(): void { 14 | if (this.autoFocus && this.elementRef.nativeElement.focus) { 15 | this.elementRef.nativeElement.focus(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/common/common.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AutoFocusDirective } from './auto-focus.directive'; 4 | import { CommonModule } from '@angular/common'; 5 | import { TemplateLoaderComponent } from './template-loader.component'; 6 | import { TrustHtmlPipe } from './trust-html.pipe'; 7 | import { ResizeableDirective } from './resizeable.directive'; 8 | import { DropdownDirective } from './dropdown.directive'; 9 | import { DatePipe } from './date.pipe'; 10 | 11 | @NgModule({ 12 | imports: [CommonModule], 13 | exports: [ 14 | AutoFocusDirective, 15 | TemplateLoaderComponent, 16 | TrustHtmlPipe, 17 | ResizeableDirective, 18 | DropdownDirective, 19 | DatePipe 20 | ], 21 | declarations: [ 22 | AutoFocusDirective, 23 | TemplateLoaderComponent, 24 | TrustHtmlPipe, 25 | ResizeableDirective, 26 | DropdownDirective, 27 | DatePipe 28 | ], 29 | providers: [], 30 | }) 31 | export class RebirthCommonModule { 32 | } 33 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/common/component.deactivate.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router'; 4 | 5 | export interface ComponentDeactivate { 6 | canDeactivate: (currentRoute?: ActivatedRouteSnapshot, 7 | currentState?: RouterStateSnapshot, 8 | nextState?: RouterStateSnapshot) => Observable | Promise | boolean; 9 | } 10 | 11 | @Injectable({ providedIn: 'root' }) 12 | export class ComponentDeactivateGuard implements CanDeactivate { 13 | 14 | canDeactivate(component: ComponentDeactivate, 15 | currentRoute: ActivatedRouteSnapshot, 16 | currentState: RouterStateSnapshot, 17 | nextState?: RouterStateSnapshot): Observable | Promise | boolean { 18 | return component.canDeactivate ? component.canDeactivate(currentRoute, currentState, nextState) : true; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/common/date.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { formatDate, parseDate } from '../utils/date-utils'; 3 | 4 | // date pipe for ie 11 ng DatePipe issue. 5 | 6 | @Pipe({ 7 | name: 'reDate' 8 | }) 9 | export class DatePipe implements PipeTransform { 10 | 11 | transform(value: any, ...args: any[]): any { 12 | if (value) { 13 | const date = parseDate(value); 14 | const format = args && args[0] ? args[0] : 'YYYY-MM-DD HH:mm:ss'; 15 | return formatDate(date, format); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/common/template-loader.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy, TemplateRef, Input, EmbeddedViewRef, ViewContainerRef } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-template-loader', 5 | template: `` 6 | }) 7 | export class TemplateLoaderComponent implements OnInit, OnDestroy { 8 | 9 | @Input() template: TemplateRef; 10 | @Input() data: any; 11 | @Input() $implicit: any = {}; 12 | 13 | view: EmbeddedViewRef; 14 | 15 | constructor(public viewContainer: ViewContainerRef) { 16 | 17 | } 18 | 19 | ngOnInit() { 20 | if (this.template) { 21 | const context = Object.assign({}, { '$implicit': this.data }, this.data); 22 | this.view = this.viewContainer.createEmbeddedView(this.template, context); 23 | } 24 | } 25 | 26 | ngOnDestroy() { 27 | if (this.view) { 28 | this.view.destroy(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/common/trust-html.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { DomSanitizer } from '@angular/platform-browser'; 3 | 4 | @Pipe({ 5 | name: 'trustHtml' 6 | }) 7 | 8 | export class TrustHtmlPipe implements PipeTransform { 9 | 10 | constructor(private domSanitizer: DomSanitizer) { 11 | 12 | } 13 | 14 | transform(value: any, args: any[]): any { 15 | return value ? this.domSanitizer.bypassSecurityTrustHtml(value) : ''; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/date-picker/date-change-event-args.model.ts: -------------------------------------------------------------------------------- 1 | export enum SelectDateChangeReason { 2 | date, 3 | time 4 | } 5 | 6 | export interface SelectDateChangeEventArgs { 7 | reason: SelectDateChangeReason; 8 | date: Date; 9 | } 10 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/date-picker/date-picker.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DatePickerDirective } from './date-picker.directive'; 4 | import { DatePickerPopupComponent } from './date-picker-popup.component'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, FormsModule], 9 | exports: [DatePickerDirective, DatePickerPopupComponent], 10 | declarations: [DatePickerDirective, DatePickerPopupComponent], 11 | providers: [], 12 | entryComponents: [DatePickerPopupComponent] 13 | }) 14 | export class DatePickerModule { 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/dialog/alert-dialog.component.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 19 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/dialog/alert-dialog.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter } from '@angular/core'; 2 | import { Modal } from '../modal/modal.model'; 3 | import { DialogOptions } from './dialog-options.model'; 4 | import { RebirthNGConfig } from '../rebirth-ng.config'; 5 | import { ModalDismissReasons } from '../modal/modal-dismiss-reasons.model'; 6 | 7 | @Component({ 8 | selector: 're-alert-dialog', 9 | templateUrl: './alert-dialog.component.html', 10 | styleUrls: ['./dialog.scss'], 11 | }) 12 | export class AlertDialogComponent implements Modal { 13 | context: DialogOptions; 14 | dismiss: EventEmitter; 15 | btnYes: string; 16 | btnYesType: string; 17 | 18 | constructor(private rebirthNGConfig: RebirthNGConfig) { 19 | this.btnYes = rebirthNGConfig.dialog.button.yes; 20 | this.btnYesType = rebirthNGConfig.dialog.button.btnYesType; 21 | } 22 | 23 | yes() { 24 | this.dismiss.emit(ModalDismissReasons.YES); 25 | } 26 | 27 | no() { 28 | this.dismiss.error(ModalDismissReasons.NO); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/dialog/confirm-dialog.component.html: -------------------------------------------------------------------------------- 1 | 6 | 16 | 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/dialog/dialog-options.model.ts: -------------------------------------------------------------------------------- 1 | import { ViewContainerRef, Injector, ComponentFactoryResolver, TemplateRef } from '@angular/core'; 2 | import { SafeHtml } from '@angular/platform-browser'; 3 | import { ValidatorFn } from '@angular/forms'; 4 | 5 | export interface PromptContent { 6 | label: string; 7 | defaultValue?: string; 8 | placeholder?: string; 9 | template?: TemplateRef; 10 | validators?: { [key: string]: { validator: ValidatorFn, message: string } }; 11 | } 12 | 13 | export interface DialogOptions { 14 | title: string; 15 | content: string | SafeHtml | PromptContent; 16 | html?: boolean; 17 | yes?: string; 18 | no?: string; 19 | icon?: string; 20 | cssClass?: string; 21 | backdrop?: boolean; 22 | backdropClass?: string; 23 | keyboard?: boolean; 24 | modal?: boolean; 25 | animation?: boolean; 26 | componentFactoryResolver?: ComponentFactoryResolver; 27 | injector?: Injector; 28 | rootContainer?: ViewContainerRef; 29 | } 30 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/dialog/dialog.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ReactiveFormsModule } from '@angular/forms'; 3 | import { AlertDialogComponent } from './alert-dialog.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { ConfirmDialogComponent } from './confirm-dialog.component'; 6 | import { RebirthCommonModule } from '../common/common.module'; 7 | import { PromptDialogComponent } from './prompt-dialog.component'; 8 | 9 | 10 | @NgModule({ 11 | imports: [ 12 | CommonModule, 13 | RebirthCommonModule, 14 | ReactiveFormsModule 15 | ], 16 | exports: [], 17 | declarations: [ 18 | AlertDialogComponent, 19 | ConfirmDialogComponent, 20 | PromptDialogComponent 21 | ], 22 | providers: [], 23 | entryComponents: [ 24 | AlertDialogComponent, 25 | ConfirmDialogComponent, 26 | PromptDialogComponent 27 | ] 28 | }) 29 | export class DialogModule { 30 | } 31 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/dialog/dialog.scss: -------------------------------------------------------------------------------- 1 | 2 | .dialog-icon { 3 | display: table-cell; 4 | vertical-align: middle; 5 | padding: 1rem; 6 | } 7 | 8 | .dialog-content { 9 | display: table-cell; 10 | vertical-align: middle; 11 | } 12 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/draggable/draggable.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { DroppableDirective } from './droppable.directive'; 4 | import { DraggableDirective, DraggableHandleDirective } from './draggable.directive'; 5 | 6 | @NgModule({ 7 | imports: [], 8 | exports: [DraggableDirective, DraggableHandleDirective, DroppableDirective], 9 | declarations: [DraggableDirective, DraggableHandleDirective, DroppableDirective], 10 | providers: [], 11 | }) 12 | export class DraggableModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/ellipsis/ellipsis.component.html: -------------------------------------------------------------------------------- 1 | {{ellipsisText}}... 2 | {{fullText}} 3 | 4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/ellipsis/ellipsis.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: inline-block; 3 | cursor: default; 4 | } 5 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/ellipsis/ellipsis.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { EllipsisComponent } from './ellipsis.component'; 5 | import { EllipsisModule } from './ellipsis.module'; 6 | 7 | describe('ellipsis', () => { 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({ 10 | imports: [ 11 | EllipsisModule 12 | ], 13 | }); 14 | TestBed.compileComponents(); 15 | }); 16 | 17 | it('mcok test', async(() => { 18 | expect(true).toBeTruthy(); 19 | })); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/ellipsis/ellipsis.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { EllipsisComponent } from './ellipsis.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { TooltipModule } from '../tooltip/tooltip.module'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | TooltipModule 11 | ], 12 | providers: [], 13 | declarations: [ 14 | EllipsisComponent 15 | ], 16 | exports: [ 17 | EllipsisComponent 18 | ], 19 | }) 20 | export class EllipsisModule { 21 | } 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/file-upload/file-upload-preview.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 12 | 15 | 18 | 22 | 23 | 24 |
6 | 7 | 10 | 11 | 13 | {{fileItem.name}} 14 | 16 | {{fileItem.displaySize}} 17 | 19 | 21 |
25 |
26 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/file-upload/file-upload-preview.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core'; 2 | import { SelectFileModel } from './file-upload.model'; 3 | 4 | @Component({ 5 | selector: 're-file-upload-preview', 6 | templateUrl: './file-upload-preview.component.html', 7 | changeDetection: ChangeDetectionStrategy.OnPush, 8 | exportAs: 'fileUploadPreview' 9 | }) 10 | export class FileUploadPreviewComponent { 11 | 12 | @Input() imgPreview: boolean; 13 | @Input() previewWidth: string; 14 | @Input() uploaded: boolean; 15 | @Input() disabled: boolean; 16 | @Input() selectFiles: SelectFileModel[] = []; 17 | @Output() removeFile = new EventEmitter(); 18 | 19 | onRemoveFile(fileItem) { 20 | if (!this.disabled) { 21 | this.removeFile.emit(fileItem); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/file-upload/file-upload.component.scss: -------------------------------------------------------------------------------- 1 | .file-upload-toolbar { 2 | display: block; 3 | margin: 1rem 0px; 4 | .btn { 5 | margin: 0.5rem; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/file-upload/file-upload.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { FileUploadComponent } from './file-upload.component'; 5 | import { CommonModule } from '@angular/common'; 6 | import { AlertBoxModule } from '../alert-box/alert-box.module'; 7 | import { DraggableModule } from '../draggable/draggable.module'; 8 | import { FileUploadPreviewComponent } from './file-upload-preview.component'; 9 | import { HttpClientModule } from '@angular/common/http'; 10 | 11 | describe('FileUpload', () => { 12 | beforeEach(() => { 13 | TestBed.configureTestingModule({ 14 | imports: [ 15 | CommonModule, 16 | HttpClientModule, 17 | AlertBoxModule, 18 | DraggableModule 19 | ], 20 | providers: [], 21 | declarations: [ 22 | FileUploadComponent, 23 | FileUploadPreviewComponent, 24 | ], 25 | }); 26 | TestBed.compileComponents(); 27 | }); 28 | 29 | it('mock test', async(() => { 30 | expect(true).toBeTruthy(); 31 | })); 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/file-upload/file-upload.model.ts: -------------------------------------------------------------------------------- 1 | export interface SelectFileModel { 2 | name: string; 3 | displaySize?: string; 4 | url?: string; 5 | file?: File; 6 | uploadResponse?: any; 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/file-upload/file-upload.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { FileUploadComponent } from './file-upload.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { FileUploadPreviewComponent } from './file-upload-preview.component'; 6 | import { AlertBoxModule } from '../alert-box/alert-box.module'; 7 | import { DraggableModule } from '../draggable/draggable.module'; 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule, 12 | AlertBoxModule, 13 | DraggableModule 14 | ], 15 | providers: [], 16 | declarations: [ 17 | FileUploadComponent, 18 | FileUploadPreviewComponent 19 | ], 20 | exports: [ 21 | FileUploadComponent, 22 | FileUploadPreviewComponent 23 | ], 24 | }) 25 | export class FileUploadModule { 26 | } 27 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/flow-step/flow-step.component.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/flow-step/flow-step.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output } from '@angular/core'; 2 | import { FlowStep } from './flow-step.model'; 3 | 4 | @Component({ 5 | selector: 're-flow-step', 6 | templateUrl: './flow-step.component.html', 7 | styleUrls: ['./flow-step.component.scss'], 8 | changeDetection: ChangeDetectionStrategy.OnPush 9 | }) 10 | export class FlowStepComponent { 11 | @Input() type: 'dot' | 'arrow' = 'arrow'; 12 | @Input() steps: FlowStep[]; 13 | @Input() active: number; 14 | @Output() activeChange = new EventEmitter(); 15 | @Input() cssClass: string; 16 | 17 | stepClick(step, $index) { 18 | if ($index < this.active) { 19 | this.activeChange.emit($index); 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/flow-step/flow-step.model.ts: -------------------------------------------------------------------------------- 1 | export interface FlowStep { 2 | title: string; 3 | icon?: string; 4 | description?: string; 5 | } 6 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/flow-step/flow-step.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { FlowStepComponent } from './flow-step.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [FlowStepComponent], 9 | declarations: [FlowStepComponent], 10 | providers: [], 11 | }) 12 | export class FlowStepModule { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/image-upload/image-upload.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { ImageUploadModule } from './image-upload.module'; 5 | import { HttpClientModule } from '@angular/common/http'; 6 | 7 | describe('ImageUpload', () => { 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({ 10 | imports: [ 11 | HttpClientModule, 12 | ImageUploadModule 13 | ], 14 | }); 15 | TestBed.compileComponents(); 16 | }); 17 | 18 | it('mcok test', async(() => { 19 | expect(true).toBeTruthy(); 20 | })); 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/image-upload/image-upload.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { ImageUploadComponent } from './image-upload.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { AlertBoxModule } from '../alert-box/alert-box.module'; 6 | import { DraggableModule } from '../draggable/draggable.module'; 7 | import { ViewImageModalComponent } from './view-image-modal.component'; 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule, 12 | AlertBoxModule, 13 | DraggableModule 14 | ], 15 | providers: [], 16 | declarations: [ 17 | ImageUploadComponent, 18 | ViewImageModalComponent 19 | ], 20 | exports: [ 21 | ImageUploadComponent, 22 | ViewImageModalComponent 23 | ], 24 | entryComponents: [ViewImageModalComponent] 25 | }) 26 | export class ImageUploadModule { 27 | } 28 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/image-upload/view-image-modal.component.html: -------------------------------------------------------------------------------- 1 |
2 | 7 | 10 |
11 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/image-upload/view-image-modal.component.scss: -------------------------------------------------------------------------------- 1 | .preview-image { 2 | width: 100%; 3 | } 4 | 5 | .modal-title .title-text{ 6 | max-width: 20em; 7 | white-space: nowrap; 8 | text-overflow: ellipsis; 9 | overflow: hidden; 10 | } 11 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/image-upload/view-image-modal.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter } from '@angular/core'; 2 | import { Modal } from '../modal/modal.model'; 3 | 4 | @Component({ 5 | selector: './re-view-image-modal', 6 | styleUrls: ['./view-image-modal.component.scss'], 7 | templateUrl: './view-image-modal.component.html' 8 | }) 9 | 10 | export class ViewImageModalComponent implements Modal { 11 | context: any; 12 | dismiss: EventEmitter; 13 | 14 | close() { 15 | this.dismiss.next(null); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/infinite-scroll/infinite-scroll.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/infinite-scroll/infinite-scroll.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { InfiniteScrollComponent } from './infinite-scroll.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [InfiniteScrollComponent], 9 | declarations: [InfiniteScrollComponent], 10 | providers: [], 11 | }) 12 | export class InfiniteScrollModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/menu-bar/menu-bar.model.ts: -------------------------------------------------------------------------------- 1 | import { TemplateRef } from '@angular/core'; 2 | export interface MenuItem { 3 | id?: string | number; 4 | text?: string; 5 | icon?: string; 6 | url?: string; 7 | router?: any[]; 8 | queryParams?: any; 9 | handler?: (item: MenuItem) => void; 10 | itemTemplate?: TemplateRef; 11 | target?: '_blank' | '_self' | '_parent' | '_top' | any; 12 | divider?: boolean; 13 | header?: boolean; 14 | cssClass?: string; 15 | children?: MenuItem[]; 16 | } 17 | 18 | export interface MenuBar { 19 | logo?: string; 20 | title?: string; 21 | home?: string | any[]; 22 | homeQueryParams?: any; 23 | menus?: MenuItem[]; 24 | rightMenus?: MenuItem[]; 25 | } 26 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/menu-bar/menu-bar.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { MenuBarComponent } from './menu-bar.component'; 5 | import { RouterModule } from '@angular/router'; 6 | import { NavItemComponent } from './nav-item.component'; 7 | import { RebirthCommonModule } from '../common/common.module'; 8 | 9 | @NgModule({ 10 | imports: [CommonModule, RouterModule, RebirthCommonModule], 11 | exports: [MenuBarComponent], 12 | declarations: [MenuBarComponent, NavItemComponent], 13 | providers: [], 14 | }) 15 | export class MenuBarModule { 16 | } 17 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/menu-bar/nav-item.component.scss: -------------------------------------------------------------------------------- 1 | .dropdown-menu { 2 | max-height: 600px; 3 | overflow: auto; 4 | } 5 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/menu-bar/nav-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { MenuItem } from './menu-bar.model'; 3 | 4 | @Component({ 5 | selector: 're-nav-item', 6 | styleUrls: ['./nav-item.component.scss'], 7 | templateUrl: './nav-item.component.html', 8 | }) 9 | export class NavItemComponent { 10 | 11 | @Input() menus: MenuItem[] = []; 12 | @Input() right: boolean; 13 | @Input() direction: 'down' | 'up'; 14 | } 15 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/modal/modal-backdrop.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; 2 | import { ModalOptions } from './modal-options.model'; 3 | 4 | @Component({ 5 | selector: 're-modal-backdrop', 6 | /* tslint:disable */ 7 | template: ``, 10 | /* tslint:enable */ 11 | changeDetection: ChangeDetectionStrategy.OnPush 12 | }) 13 | export class ModalBackdropComponent { 14 | @Input() isOpen: boolean; 15 | @Input() modalOptions: ModalOptions; 16 | @Input() instanceCount = 0; 17 | } 18 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/modal/modal-dismiss-reasons.model.ts: -------------------------------------------------------------------------------- 1 | export enum ModalDismissReasons { 2 | CUSTOMISE, 3 | BACKDROP_CLICK, 4 | ESC_KEY, 5 | YES, 6 | NO 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/modal/modal-options.model.ts: -------------------------------------------------------------------------------- 1 | import { Type, ComponentFactoryResolver, Injector, ViewContainerRef } from '@angular/core'; 2 | 3 | export interface ModalOptions { 4 | component: Type; 5 | componentFactoryResolver?: ComponentFactoryResolver; 6 | injector?: Injector; 7 | resolve?: any; 8 | backdrop?: boolean; 9 | backdropClass?: string; 10 | keyboard?: boolean; 11 | modal?: boolean; 12 | modalClass?: string; 13 | animation?: boolean; 14 | size?: 'lg' | 'sm'; 15 | rootContainer?: ViewContainerRef; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/modal/modal-window.component.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/modal/modal.component.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/modal/modal.model.ts: -------------------------------------------------------------------------------- 1 | import { EventEmitter } from '@angular/core'; 2 | 3 | export interface Modal { 4 | context: any; 5 | dismiss: EventEmitter; 6 | } 7 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/notify/notify.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 7 | 8 |
9 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/notify/notify.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | width: 100%; 4 | position: fixed; 5 | z-index: 9999; 6 | 7 | &.alert-top { 8 | left: 0px; 9 | top: 0px; 10 | } 11 | 12 | &.alert-top-right { 13 | width: 40%; 14 | min-width: 200px; 15 | right: 10px; 16 | top: 10px; 17 | } 18 | 19 | &.alert-bottom { 20 | left: 0px; 21 | bottom: 0px; 22 | } 23 | 24 | &.alert-bottom-right { 25 | width: 40%; 26 | min-width: 200px; 27 | right: 10px; 28 | bottom: 10px; 29 | } 30 | 31 | &.alert-center { 32 | width: 40%; 33 | min-width: 200px; 34 | left: 30%; 35 | top: 20%; 36 | } 37 | } 38 | 39 | :host { 40 | ::ng-deep .alert { 41 | margin: 0px 0px 5px 0px; 42 | } 43 | } 44 | 45 | :host.alert-top, :host.alert-bottom { 46 | ::ng-deep .alert { 47 | border-radius: 0px; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/notify/notify.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { NotifyModel } from './notify.model'; 3 | import { RebirthNGConfig } from '../rebirth-ng.config'; 4 | 5 | @Component({ 6 | selector: 're-notify', 7 | templateUrl: './notify.component.html', 8 | styleUrls: ['./notify.component.scss'], 9 | host: { 10 | '[style.width]': 'width', 11 | '[class]': '(placement ? "alert-" + placement : "") + " " + (cssClass || "")', 12 | } 13 | }) 14 | export class NotifyComponent { 15 | @Input() notifies: NotifyModel[] = []; 16 | @Input() width: string; 17 | @Input() cssClass: string; 18 | @Input() placement: 'top' | 'top-right' | 'bottom' | 'bottom-right' | 'center'; 19 | 20 | constructor(private rebirthNGConfig: RebirthNGConfig) { 21 | this.placement = rebirthNGConfig.alertBoxPanel.placement; 22 | this.cssClass = rebirthNGConfig.alertBoxPanel.cssClass; 23 | this.width = rebirthNGConfig.alertBoxPanel.width; 24 | } 25 | 26 | close(item) { 27 | this.notifies = this.notifies.filter((box) => box !== item); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/notify/notify.model.ts: -------------------------------------------------------------------------------- 1 | import { TemplateRef } from '@angular/core'; 2 | export interface NotifyModel { 3 | type: 'success' | 'info' | 'warning' | 'danger'; 4 | html?: string; 5 | template?: TemplateRef; 6 | } 7 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/notify/notify.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { NotifyComponent } from './notify.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { AlertBoxModule } from '../alert-box/alert-box.module'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | AlertBoxModule 11 | ], 12 | providers: [], 13 | declarations: [ 14 | NotifyComponent 15 | ], 16 | exports: [ 17 | NotifyComponent 18 | ], 19 | entryComponents: [NotifyComponent] 20 | }) 21 | export class NotifyModule { 22 | } 23 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/overlay/overlay-options.model.ts: -------------------------------------------------------------------------------- 1 | import { Type, ComponentFactoryResolver, Injector, ViewContainerRef } from '@angular/core'; 2 | import { SafeHtml } from '@angular/platform-browser'; 3 | 4 | export interface OverlayOptions { 5 | component?: Type; 6 | html?: string | SafeHtml; 7 | componentFactoryResolver?: ComponentFactoryResolver; 8 | injector?: Injector; 9 | backdropClass?: string; 10 | rootContainer?: ViewContainerRef; 11 | } 12 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/overlay/overlay.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/overlay/overlay.component.scss: -------------------------------------------------------------------------------- 1 | .overlay-body { 2 | position: fixed; 3 | } 4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/overlay/overlay.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { OverlayComponent } from './overlay.component'; 5 | import { OverlayContentComponent } from './overlay-content.component'; 6 | import { ModalModule } from '../modal/modal.module'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, ModalModule], 10 | exports: [OverlayComponent], 11 | declarations: [OverlayComponent, OverlayContentComponent], 12 | providers: [], 13 | entryComponents: [OverlayComponent] 14 | }) 15 | export class OverlayModule { 16 | } 17 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/pager/pager.component.scss: -------------------------------------------------------------------------------- 1 | .pager { 2 | li { 3 | & > a { 4 | cursor: pointer; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/pager/pager.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { PagerComponent } from './pager.component'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | declarations: [ 11 | PagerComponent 12 | ], 13 | exports: [ 14 | PagerComponent 15 | ], 16 | providers: [], 17 | }) 18 | export class PagerModule { 19 | } 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/pager/re-pager.component.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/pagination/pagination.component.scss: -------------------------------------------------------------------------------- 1 | .pagination { 2 | li { 3 | & > a { 4 | cursor: pointer; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/pagination/pagination.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { PaginationComponent } from './pagination.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | declarations: [PaginationComponent], 11 | exports: [PaginationComponent], 12 | providers: [], 13 | }) 14 | export class PaginationModule { 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/panel/panel-body.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-panel-body,[re-panel-body],re-accordion-body,[re-accordion-body]', 5 | template: '', 6 | host: { 7 | '[style.display]': '"block"' 8 | } 9 | }) 10 | export class PanelBodyComponent { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/panel/panel-footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-panel-footer,[re-panel-footer],re-accordion-footer,[re-accordion-footer]', 5 | template: '' 6 | }) 7 | export class PanelFooterComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/panel/panel-group.model.ts: -------------------------------------------------------------------------------- 1 | import { PanelComponent } from './panel.component'; 2 | import { Input } from '@angular/core'; 3 | 4 | export abstract class PanelGroup { 5 | @Input() type: 'default' | 'primary' | 'success' | 'info' | 'warning' | 'danger'; 6 | @Input() cssClass: string; 7 | panels: PanelComponent[] = []; 8 | 9 | $addItem(panel: PanelComponent) { 10 | this.$removeItem(panel); 11 | if (this.type) { 12 | panel.type = this.type; 13 | } 14 | panel.cssClass = this.cssClass; 15 | this.initPanel(panel); 16 | this.panels.push(panel); 17 | } 18 | 19 | $removeItemById(id) { 20 | const index = this.panels.findIndex(item => item.id === id); 21 | this.removeItemByIndex(index); 22 | } 23 | 24 | $removeItem(panel: PanelComponent) { 25 | if (panel) { 26 | const index = this.panels.findIndex(item => item === panel); 27 | this.removeItemByIndex(index); 28 | } 29 | } 30 | 31 | private removeItemByIndex(index: number) { 32 | if (index !== -1) { 33 | this.panels.splice(index, 1); 34 | } 35 | } 36 | 37 | protected abstract initPanel(panel: PanelComponent) ; 38 | } 39 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/panel/panel-header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-panel-header,[re-panel-header],re-accordion-header,[re-accordion-header]', 5 | template: '', 6 | host: { 7 | '[style.display]': '"block"' 8 | } 9 | }) 10 | export class PanelHeaderComponent { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/panel/panel.component.html: -------------------------------------------------------------------------------- 1 |
2 |
4 | 7 | 8 |
9 |
10 | 11 |
12 | 15 |
16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/panel/panel.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { PanelComponent } from './panel.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { PanelHeaderComponent } from './panel-header.component'; 6 | import { PanelBodyComponent } from './panel-body.component'; 7 | import { PanelFooterComponent } from './panel-footer.component'; 8 | 9 | @NgModule({ 10 | imports: [ 11 | CommonModule 12 | ], 13 | exports: [ 14 | PanelComponent, 15 | PanelHeaderComponent, 16 | PanelBodyComponent, 17 | PanelFooterComponent 18 | ], 19 | declarations: [ 20 | PanelComponent, 21 | PanelHeaderComponent, 22 | PanelBodyComponent, 23 | PanelFooterComponent 24 | ], 25 | providers: [], 26 | }) 27 | export class PanelModule { 28 | } 29 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/popover/popover-popup.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 4 | 6 |

7 |
8 | 9 | 11 |
12 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/popover/popover.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { PopoverDirective } from './popover.directive'; 5 | import { PopoverPopupComponent } from './popover-popup.component'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule], 9 | exports: [PopoverDirective], 10 | declarations: [PopoverDirective, PopoverPopupComponent], 11 | providers: [], 12 | entryComponents: [PopoverPopupComponent] 13 | }) 14 | export class PopoverModule { 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/progress-bar/progress-bar.component.html: -------------------------------------------------------------------------------- 1 |
2 |
{{text}} 7 |
8 |
9 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/progress-bar/progress-bar.component.scss: -------------------------------------------------------------------------------- 1 | .thin { 2 | height: 2px; 3 | } 4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/progress-bar/progress-bar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy, Input } from '@angular/core'; 2 | import { RebirthNGConfig } from '../rebirth-ng.config'; 3 | 4 | @Component({ 5 | selector: 're-progress-bar', 6 | templateUrl: './progress-bar.component.html', 7 | styleUrls: ['./progress-bar.component.scss'], 8 | changeDetection: ChangeDetectionStrategy.OnPush 9 | }) 10 | export class ProgressBarComponent { 11 | @Input() type: '' | 'success' | 'info' | 'warning' | 'danger' = ''; 12 | @Input() text: string; 13 | @Input() thin: boolean; 14 | @Input() max: number; 15 | @Input() animate: boolean; 16 | @Input() striped: boolean; 17 | @Input() value: number; 18 | @Input() cssClass: string; 19 | 20 | constructor(rebirthNGConfig: RebirthNGConfig) { 21 | this.type = rebirthNGConfig.progressBar.type; 22 | this.animate = rebirthNGConfig.progressBar.animate; 23 | this.striped = rebirthNGConfig.progressBar.striped; 24 | this.max = rebirthNGConfig.progressBar.max; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/progress-bar/progress-bar.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { ProgressBarComponent } from './progress-bar.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [ProgressBarComponent], 9 | declarations: [ProgressBarComponent], 10 | providers: [], 11 | }) 12 | export class ProgressBarModule { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/radio-group/radio-group.component.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/radio-group/radio-group.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .radio-inline label { 6 | font-weight: normal; 7 | } 8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/radio-group/radio-group.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { RadioGroupComponent } from './radio-group.component'; 5 | 6 | describe('RadioGroup', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | declarations: [ 10 | RadioGroupComponent 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('mcok test', async(() => { 17 | expect(true).toBeTruthy(); 18 | })); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/radio-group/radio-group.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { RadioGroupComponent } from './radio-group.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | providers: [], 11 | declarations: [ 12 | RadioGroupComponent 13 | ], 14 | exports: [ 15 | RadioGroupComponent 16 | ], 17 | }) 18 | export class RadioGroupModule { 19 | } 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/rating/rating.component.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ({{statValue >= item? "*": ""}} ) 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/rating/rating.component.scss: -------------------------------------------------------------------------------- 1 | .slider, .slider:focus { 2 | outline: 0; 3 | } 4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/rating/rating.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { RatingComponent } from './rating.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [RatingComponent], 9 | declarations: [RatingComponent], 10 | providers: [], 11 | }) 12 | export class RatingModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select-button/select-button-item.model.ts: -------------------------------------------------------------------------------- 1 | export interface SelectButtonItem { 2 | text: string; 3 | icon?: string; 4 | value?: any; 5 | } 6 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select-button/select-button.component.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select-button/select-button.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { SelectButtonComponent } from './select-button.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [SelectButtonComponent], 9 | declarations: [SelectButtonComponent], 10 | providers: [], 11 | }) 12 | export class SelectButtonModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select/select.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .select-container { 6 | position: relative; 7 | border-bottom: 1px solid #ddd; 8 | } 9 | 10 | .select-panel, 11 | .select-control:not([disabled]) { 12 | cursor: pointer; 13 | background: #fff; 14 | } 15 | 16 | .select-panel.disabled { 17 | background: #eee; 18 | } 19 | 20 | .input-group { 21 | .select-control { 22 | border: none; 23 | } 24 | } 25 | 26 | .input-group-addon { 27 | &:not(.disabled) { 28 | background: #fff; 29 | } 30 | border: none; 31 | 32 | .select-down-icon { 33 | display: block; 34 | } 35 | } 36 | 37 | ::ng-deep .dropdown-menu { 38 | border: none; 39 | padding: 0; 40 | width: 100%; 41 | 42 | .popup-list { 43 | margin-bottom: 0; 44 | max-height: 250px; 45 | overflow: auto; 46 | } 47 | .dropdown-header { 48 | padding: 3px 0.5rem; 49 | } 50 | 51 | .dropdown-item { 52 | cursor: pointer; 53 | padding: 8px 1rem; 54 | white-space: normal !important; 55 | 56 | &.selected { 57 | font-weight: bold; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select/select.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { SelectModule } from './select.module'; 5 | 6 | describe('Select', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | imports: [ 10 | SelectModule 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('mcok test', async(() => { 17 | expect(true).toBeTruthy(); 18 | })); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select/select.model.ts: -------------------------------------------------------------------------------- 1 | export interface GroupOption { 2 | group: string; 3 | options: any[]; 4 | } 5 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/select/select.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { SelectComponent } from './select.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | FormsModule 11 | ], 12 | providers: [], 13 | declarations: [ 14 | SelectComponent 15 | ], 16 | exports: [ 17 | SelectComponent 18 | ], 19 | }) 20 | export class SelectModule { 21 | } 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/slider/slider.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/slider/slider.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { SliderModule } from './slider.module'; 5 | 6 | describe('Slider', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | imports: [ 10 | SliderModule 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('mcok test', async(() => { 17 | expect(true).toBeTruthy(); 18 | })); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/slider/slider.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { SliderComponent } from './slider.component'; 4 | import { CommonModule } from '@angular/common'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | providers: [], 11 | declarations: [ 12 | SliderComponent 13 | ], 14 | exports: [ 15 | SliderComponent 16 | ], 17 | }) 18 | export class SliderModule { 19 | } 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/switch/switch.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{onText}} 4 | 5 | {{offText}} 6 | 7 |
8 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/switch/switch.component.scss: -------------------------------------------------------------------------------- 1 | .switch { 2 | display: inline-block; 3 | cursor: pointer; 4 | -webkit-border-radius: 5px; 5 | -moz-border-radius: 5px; 6 | border-radius: 5px; 7 | border: 1px solid #ccc; 8 | position: relative; 9 | text-align: left; 10 | overflow: hidden; 11 | -webkit-user-select: none; 12 | -moz-user-select: none; 13 | -ms-user-select: none; 14 | user-select: none; 15 | width: 100px; 16 | white-space: nowrap; 17 | padding: 0; 18 | text-overflow: ellipsis; 19 | .switch-left, .switch-right { 20 | box-sizing: border-box; 21 | cursor: pointer; 22 | position: relative; 23 | display: inline-block; 24 | width: 50%; 25 | line-height: 2; 26 | text-align: center; 27 | } 28 | 29 | &.disabled { 30 | .switch-left, .switch-right { 31 | cursor: not-allowed; 32 | opacity: 0.65; 33 | filter: alpha(opacity=65); 34 | box-shadow: none; 35 | } 36 | } 37 | 38 | &.btn-lg { 39 | width: 120px; 40 | } 41 | 42 | &.btn-sm { 43 | width: 100px; 44 | } 45 | &.btn-xs { 46 | width: 80px; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/switch/switch.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { SwitchComponent } from './switch.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [SwitchComponent], 9 | declarations: [SwitchComponent], 10 | providers: [], 11 | }) 12 | export class SwitchModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tabs/tab-content.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, TemplateRef } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ng-template[reTabContent]', 5 | }) 6 | export class TabContentDirective { 7 | constructor(public templateRef: TemplateRef) { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tabs/tab-title.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, TemplateRef } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: 'ng-template[reTabTitle]', 5 | }) 6 | export class TabTitleDirective { 7 | constructor(public templateRef: TemplateRef) { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tabs/tab.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ContentChild } from '@angular/core'; 2 | import { TabContentDirective } from './tab-content.directive'; 3 | import { TabTitleDirective } from './tab-title.directive'; 4 | 5 | @Component({ 6 | selector: 're-tab', 7 | template: '' 8 | }) 9 | export class TabComponent { 10 | @Input() id: number |string; 11 | @Input() title: string; 12 | @Input() disabled = false; 13 | @ContentChild(TabContentDirective) contentTpl: TabContentDirective; 14 | @ContentChild(TabTitleDirective) titleTpl: TabTitleDirective; 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tabs/tabs.component.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tabs/tabs.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { TabsComponent } from './tabs.component'; 5 | import { TabTitleDirective } from './tab-title.directive'; 6 | import { TabContentDirective } from './tab-content.directive'; 7 | import { TabComponent } from './tab.component'; 8 | 9 | @NgModule({ 10 | imports: [CommonModule], 11 | exports: [TabsComponent, TabComponent, TabTitleDirective, TabContentDirective], 12 | declarations: [TabsComponent, TabComponent, TabTitleDirective, TabContentDirective], 13 | providers: [], 14 | }) 15 | export class TabsModule { 16 | } 17 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tags/tags.component.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • 3 | {{item}} 6 | 7 |
  • 8 |
  • 9 | 12 |
  • 13 |
  • 14 | 17 |
  • 18 |
19 | 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tags/tags.component.scss: -------------------------------------------------------------------------------- 1 | .tags { 2 | display: block; 3 | list-style: none; 4 | width: 100%; 5 | padding: 0px; 6 | 7 | li { 8 | display: inline-block; 9 | margin: 8px 8px 0px 0px; 10 | .label-btn { 11 | cursor: pointer; 12 | margin-left: 8px; 13 | } 14 | } 15 | .tag-input-control { 16 | max-width: 10em; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tags/tags.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { TagsModule } from './tags.module'; 5 | 6 | describe('Tags', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | imports: [ 10 | TagsModule 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('mcok test', async(() => { 17 | expect(true).toBeTruthy(); 18 | })); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tags/tags.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { TagsComponent } from './tags.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { RebirthCommonModule } from '../common/common.module'; 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthCommonModule 13 | ], 14 | providers: [], 15 | declarations: [ 16 | TagsComponent 17 | ], 18 | exports: [ 19 | TagsComponent 20 | ], 21 | }) 22 | export class TagsModule { 23 | } 24 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/time-picker/time-picker.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: inline-block; 3 | } 4 | 5 | .time-picker { 6 | .form-group { 7 | display: inline-block; 8 | } 9 | .form-control { 10 | width: 4em; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/time-picker/time-picker.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { TimePickerComponent } from './time-picker.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule, FormsModule], 8 | exports: [TimePickerComponent], 9 | declarations: [TimePickerComponent], 10 | providers: [], 11 | }) 12 | export class TimePickerModule { 13 | } 14 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tooltip/tooltip-popup.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 6 |
7 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tooltip/tooltip-popup.component.scss: -------------------------------------------------------------------------------- 1 | .tooltip-inner { 2 | word-break: break-all; 3 | word-wrap: break-word; 4 | } -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tooltip/tooltip.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { TooltipDirective } from './tooltip.directive'; 4 | import { TooltipPopupComponent } from './tooltip-popup.component'; 5 | import { CommonModule } from '@angular/common'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule], 9 | exports: [TooltipDirective, TooltipPopupComponent], 10 | declarations: [TooltipDirective, TooltipPopupComponent], 11 | providers: [], 12 | entryComponents: [TooltipPopupComponent] 13 | }) 14 | export class TooltipModule { 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-panel.component.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • 21 |
  • 22 |
23 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-panel.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, TemplateRef, Output, EventEmitter } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | 4 | @Component({ 5 | selector: 're-tree-panel', 6 | templateUrl: './tree-panel.component.html' 7 | }) 8 | export class TreePanelComponent { 9 | @Input() treeData: any[]; 10 | @Input() parentNode: any; 11 | @Input() valueField; 12 | @Input() textField; 13 | @Input() nodeCssClass: string; 14 | @Input() iconField: string; 15 | @Input() checkable = false; 16 | @Input() lazyLoad = false; 17 | @Input() loadingIcon: string; 18 | @Input() loadChildren: (parent: any) => Observable; 19 | @Input() allowDraggable = false; 20 | @Input() allowMutipleSelected = false; 21 | @Input() nodeItemTemplate: TemplateRef; 22 | @Input() nodeItemToolbarTemplate: TemplateRef; 23 | @Input() leafIcon; 24 | @Input() expendIcon; 25 | @Input() collapseIcon; 26 | @Output() nodeItemCheckedChanged = new EventEmitter(); 27 | 28 | 29 | onNodeItemCheckedChanged(node) { 30 | this.nodeItemCheckedChanged.emit(node); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-view.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-view.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-view.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { TreeViewComponent } from './tree-view.component'; 5 | import { TreeViewModule } from './tree-view.module'; 6 | 7 | describe('TreeView', () => { 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({ 10 | imports: [ 11 | TreeViewModule 12 | ], 13 | }); 14 | TestBed.compileComponents(); 15 | }); 16 | 17 | it('mcok test', async(() => { 18 | expect(true).toBeTruthy(); 19 | })); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-view.model.ts: -------------------------------------------------------------------------------- 1 | export interface TreeViewModel { 2 | id: string | number; 3 | name: string; 4 | icon?: string; 5 | children?: TreeViewModel[]; 6 | } 7 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/tree-view/tree-view.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { TreeViewComponent } from './tree-view.component'; 5 | import { TreeNodeComponent } from './tree-node.component'; 6 | import { FormsModule } from '@angular/forms'; 7 | import { TreePanelComponent } from './tree-panel.component'; 8 | import { CheckboxGroupModule } from '../checkbox-group/checkbox-group.module'; 9 | import { DraggableModule } from '../draggable/draggable.module'; 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | FormsModule, 15 | CheckboxGroupModule, 16 | DraggableModule 17 | ], 18 | providers: [], 19 | declarations: [ 20 | TreeViewComponent, 21 | TreeNodeComponent, 22 | TreePanelComponent 23 | ], 24 | exports: [ 25 | TreeViewComponent, 26 | TreeNodeComponent, 27 | TreePanelComponent 28 | ], 29 | }) 30 | export class TreeViewModule { 31 | } 32 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/utils/date-converter.ts: -------------------------------------------------------------------------------- 1 | export interface DateConverter { 2 | parse(date: any, pattern?: string, locale?: string): Date ; 3 | format(date: Date, pattern?: string, locale?: string): string ; 4 | } 5 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/utils/date-utils.ts: -------------------------------------------------------------------------------- 1 | import { isDate, parse, format } from 'date-fns'; 2 | 3 | export function isValidDate(date: Date): boolean { 4 | return isDate(date) && !isNaN(date.getTime()); 5 | } 6 | 7 | export function parseDate(date: any): Date { 8 | if (!date) { 9 | return null; 10 | } 11 | 12 | if (isDate(date)) { 13 | return date; 14 | } 15 | const parsedDate = parse(date); 16 | return isValidDate(parsedDate) ? parsedDate : null; 17 | } 18 | 19 | export function formatDate(date: Date, pattern = 'YYYY-MM-DD HH:mm:ss'): string { 20 | return isValidDate(date) ? format(date, pattern) : ''; 21 | } 22 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/utils/default-date-converter.ts: -------------------------------------------------------------------------------- 1 | import { DateConverter } from './date-converter'; 2 | import { formatDate, parseDate } from './date-utils'; 3 | 4 | export class DefaultDateConverter implements DateConverter { 5 | 6 | parse(date: any, pattern?: string, locale?: string): Date { 7 | return parseDate(date); 8 | } 9 | 10 | format(date: Date, pattern?: string, locale?: string): string { 11 | return formatDate(date, pattern); 12 | } 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/window-ref/document-ref.service.ts: -------------------------------------------------------------------------------- 1 | import { Inject, Injectable } from '@angular/core'; 2 | import { DOCUMENT } from '@angular/common'; 3 | 4 | @Injectable( 5 | { providedIn: 'root' } 6 | ) 7 | export class DocumentRef { 8 | 9 | constructor(@Inject(DOCUMENT) public document: any) { 10 | 11 | } 12 | 13 | get body(): any { 14 | return this.document.body; 15 | } 16 | 17 | get documentElement(): any { 18 | return this.document.documentElement; 19 | } 20 | 21 | createElement(tag) { 22 | return this.document.createElement(tag); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/lib/window-ref/window-ref.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, ElementRef } from '@angular/core'; 2 | import { DocumentRef } from './document-ref.service'; 3 | 4 | @Injectable({ providedIn: 'root' }) 5 | export class WindowRef { 6 | 7 | constructor(private documentRef: DocumentRef) { 8 | } 9 | 10 | get document(): any { 11 | return this.documentRef; 12 | } 13 | 14 | get pageXOffset() { 15 | return window.pageXOffset; 16 | } 17 | 18 | 19 | get pageYOffset() { 20 | return window.pageYOffset; 21 | } 22 | 23 | get innerHeight() { 24 | return window.innerHeight; 25 | } 26 | 27 | get innerWidth() { 28 | return window.innerWidth; 29 | } 30 | 31 | getComputedStyle(element) { 32 | return window.getComputedStyle(element); 33 | } 34 | 35 | getOffsetWidth(elementRef: ElementRef) { 36 | return elementRef.nativeElement && elementRef.nativeElement.offsetWidth; 37 | } 38 | 39 | getBoundingClientRect(elementRef: ElementRef) { 40 | return elementRef.nativeElement && elementRef.nativeElement.getBoundingClientRect(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /projects/rebirth-ng/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'core-js/es7/reflect'; 4 | import 'zone.js/dist/zone'; 5 | import 'zone.js/dist/zone-testing'; 6 | import { getTestBed } from '@angular/core/testing'; 7 | import { 8 | BrowserDynamicTestingModule, 9 | platformBrowserDynamicTesting 10 | } from '@angular/platform-browser-dynamic/testing'; 11 | 12 | declare const require: any; 13 | 14 | // First, initialize the Angular testing environment. 15 | getTestBed().initTestEnvironment( 16 | BrowserDynamicTestingModule, 17 | platformBrowserDynamicTesting() 18 | ); 19 | // Then we find all the tests. 20 | const context = require.context('./', true, /\.spec\.ts$/); 21 | // And load the modules. 22 | context.keys().map(context); 23 | -------------------------------------------------------------------------------- /projects/rebirth-ng/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/lib", 5 | "target": "es2015", 6 | "module": "es2015", 7 | "moduleResolution": "node", 8 | "declaration": true, 9 | "sourceMap": true, 10 | "inlineSources": true, 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "types": [], 15 | "lib": [ 16 | "dom", 17 | "es2015" 18 | ] 19 | }, 20 | "angularCompilerOptions": { 21 | "annotateForClosureCompiler": true, 22 | "skipTemplateCodegen": true, 23 | "strictMetadataEmit": true, 24 | "fullTemplateTypeCheck": true, 25 | "strictInjectionParameters": true, 26 | "flatModuleId": "AUTOGENERATED", 27 | "flatModuleOutFile": "AUTOGENERATED" 28 | }, 29 | "exclude": [ 30 | "src/test.ts", 31 | "**/*.spec.ts" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /projects/rebirth-ng/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts" 12 | ], 13 | "include": [ 14 | "**/*.spec.ts", 15 | "**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /projects/rebirth-ng/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "re", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "re", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 | 7 |
8 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | :host ::ng-deep .main { 2 | margin-top: 80px; 3 | } 4 | 5 | ::ng-deep { 6 | 7 | .button-panel { 8 | button { 9 | margin: 1rem; 10 | } 11 | } 12 | re-action-button, re-select-button, re-switch { 13 | padding: 1rem; 14 | } 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/app/app.route.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | import { GettingStartedComponent, ShowcaseComponent } from './feature'; 3 | 4 | 5 | export const ROUTER_CONFIG: Routes = [ 6 | { path: '', pathMatch: 'full', redirectTo: '/gettingStarted' }, 7 | { path: 'gettingStarted', component: GettingStartedComponent, data: { reusable: true } }, 8 | { path: 'component/:name', component: ShowcaseComponent, data: { reusable: true } }, 9 | ]; 10 | -------------------------------------------------------------------------------- /src/app/demo/accordion/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/accordion/README.md -------------------------------------------------------------------------------- /src/app/demo/accordion/accordion-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { PanelComponent } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-accordion-demo', 6 | templateUrl: './accordion-demo.component.html' 7 | }) 8 | export class AccordionDemoComponent { 9 | items = [ 10 | { id: 1, title: 'Panel header 1', content: 'Panel header 1' }, 11 | { id: 2, title: 'Panel header 2', content: 'Panel header 2' } 12 | ]; 13 | 14 | onClose(panel: PanelComponent) { 15 | console.log(`Panel ${panel.id} will close!`, panel); 16 | } 17 | 18 | appendItems() { 19 | const len = this.items.length + 1; 20 | this.items.push({ id: len, title: `Panel header ${len}`, content: `Panel header ${len}` }); 21 | } 22 | 23 | removeLastItem() { 24 | const len = this.items.length; 25 | this.items.splice(len - 1, 1); 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /src/app/demo/accordion/accordion-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AccordionDemoComponent } from './accordion-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [ 13 | AccordionDemoComponent 14 | ], 15 | declarations: [AccordionDemoComponent], 16 | providers: [], 17 | entryComponents: [AccordionDemoComponent] 18 | }) 19 | export class AccordionDemoModule { 20 | } 21 | -------------------------------------------------------------------------------- /src/app/demo/accordion/index.ts: -------------------------------------------------------------------------------- 1 | export * from './accordion-demo.component'; 2 | export * from './accordion-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/action-button/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/action-button/README.md -------------------------------------------------------------------------------- /src/app/demo/action-button/action-button-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { ActionItem } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-action-button-demo', 6 | templateUrl: './action-button-demo.component.html' 7 | }) 8 | export class ActionButtonDemoComponent { 9 | isActionOpen: boolean; 10 | disabledActionOpen = true; 11 | actions: ActionItem[] = [ 12 | { 13 | text: 'Action Header', 14 | header: true 15 | }, 16 | { 17 | id: 1, 18 | text: 'Save', 19 | icon: 'glyphicon glyphicon-floppy-save' 20 | }, { 21 | id: 2, 22 | text: 'Refresh', 23 | icon: 'glyphicon glyphicon-refresh' 24 | }, 25 | { 26 | divider: true 27 | }, 28 | { 29 | id: 3, 30 | text: 'Remove', 31 | icon: 'glyphicon glyphicon-remove' 32 | }]; 33 | 34 | onActionClick(item: ActionItem) { 35 | console.log(`Action item ${item.id} clicked`, item); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/app/demo/action-button/action-button-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { ActionButtonDemoComponent } from './action-button-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [ActionButtonDemoComponent], 13 | declarations: [ActionButtonDemoComponent], 14 | providers: [], 15 | entryComponents: [ActionButtonDemoComponent] 16 | }) 17 | export class ActionButtonDemoModule { 18 | } 19 | -------------------------------------------------------------------------------- /src/app/demo/action-button/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action-button-demo.component'; 2 | export * from './action-button-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/alert-box/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/alert-box/README.md -------------------------------------------------------------------------------- /src/app/demo/alert-box/alert-box-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-alert-box-demo', 5 | templateUrl: './alert-box-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | 8 | }) 9 | export class AlertBoxDemoComponent { 10 | 11 | closed = false; 12 | autoDisappear = false; 13 | 14 | constructor(private changeDetectorRef: ChangeDetectorRef) { 15 | } 16 | 17 | close() { 18 | console.log('close'); 19 | this.closed = true; 20 | } 21 | 22 | autoDisappearChange() { 23 | this.closed = false; 24 | if (this.autoDisappear) { 25 | setTimeout(() => { 26 | this.autoDisappear = false; 27 | this.close(); 28 | this.changeDetectorRef.markForCheck(); 29 | }, 2 * 1000); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/demo/alert-box/alert-box-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { AlertBoxDemoComponent } from './alert-box-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { CommonModule } from '@angular/common'; 6 | import { FormsModule } from '@angular/forms'; 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthNGModule 13 | ], 14 | declarations: [ 15 | AlertBoxDemoComponent 16 | ], 17 | exports: [ 18 | AlertBoxDemoComponent 19 | ], 20 | providers: [], 21 | entryComponents: [AlertBoxDemoComponent] 22 | 23 | }) 24 | export class AlertBoxDemoModule { 25 | } 26 | -------------------------------------------------------------------------------- /src/app/demo/alert-box/index.ts: -------------------------------------------------------------------------------- 1 | export * from './alert-box-demo.component'; 2 | export * from './alert-box-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/auto-complete/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/auto-complete/README.md -------------------------------------------------------------------------------- /src/app/demo/auto-complete/auto-complete-demo.component.scss: -------------------------------------------------------------------------------- 1 | 2 | :host ::ng-deep { 3 | .full-item { 4 | width: 95%; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/app/demo/auto-complete/auto-complete-demo.mdoule.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule } from '@angular/forms'; 4 | 5 | import { AutoCompleteDemoComponent } from './auto-complete-demo.component'; 6 | import { RebirthNGModule } from 'rebirth-ng'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, RebirthNGModule, FormsModule], 10 | exports: [AutoCompleteDemoComponent], 11 | declarations: [AutoCompleteDemoComponent], 12 | providers: [], 13 | entryComponents: [AutoCompleteDemoComponent] 14 | }) 15 | export class AutoCompleteDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/auto-complete/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auto-complete-demo.component'; 2 | export * from './auto-complete-demo.mdoule'; 3 | -------------------------------------------------------------------------------- /src/app/demo/badge/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/badge/README.md -------------------------------------------------------------------------------- /src/app/demo/badge/badge-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | Inbox 3 | 4 | 5 | 6 | 9 | 10 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /src/app/demo/badge/badge-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-badge-demo', 5 | templateUrl: './badge-demo.component.html' 6 | }) 7 | export class BadgeDemoComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/app/demo/badge/badge-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { BadgeDemoComponent } from './badge-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [BadgeDemoComponent], 13 | declarations: [BadgeDemoComponent], 14 | providers: [], 15 | entryComponents: [BadgeDemoComponent] 16 | }) 17 | export class BadgeDemoModule { 18 | } 19 | -------------------------------------------------------------------------------- /src/app/demo/badge/index.ts: -------------------------------------------------------------------------------- 1 | export * from './badge-demo.component'; 2 | export * from './badge-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/breadcrumbs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/breadcrumbs/README.md -------------------------------------------------------------------------------- /src/app/demo/breadcrumbs/breadcrumbs-demo.component.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /src/app/demo/breadcrumbs/breadcrumbs-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { BreadcrumbsDemoComponent } from './breadcrumbs-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [BreadcrumbsDemoComponent], 10 | declarations: [BreadcrumbsDemoComponent], 11 | providers: [], 12 | entryComponents: [BreadcrumbsDemoComponent] 13 | }) 14 | export class BreadcrumbsDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/breadcrumbs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './breadcrumbs-demo.component'; 2 | export * from './breadcrumbs-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/carousel/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/carousel/README.md -------------------------------------------------------------------------------- /src/app/demo/carousel/carousel-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-carousel-demo', 5 | templateUrl: './carousel-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class CarouselDemoComponent { 9 | activeSlide = 0; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/demo/carousel/carousel-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { CarouselDemoComponent } from './carousel-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [CarouselDemoComponent], 10 | declarations: [CarouselDemoComponent], 11 | providers: [], 12 | entryComponents: [CarouselDemoComponent] 13 | }) 14 | export class CarouselDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/carousel/index.ts: -------------------------------------------------------------------------------- 1 | export * from './carousel-demo.component'; 2 | export * from './carousel-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/checkbox-group/README.md: -------------------------------------------------------------------------------- 1 | #### CheckboxGroup 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/checkbox-group/checkbox-group-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { CheckboxGroupComponent } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-checkbox-group-demo', 6 | templateUrl: './checkbox-group-demo.component.html' 7 | }) 8 | export class CheckboxGroupDemoComponent { 9 | 10 | checked; 11 | yesno = 'YES'; 12 | seasonLabelOptions = ['Spring', 'Summer', 'Autumn', 'Winter']; 13 | seasonLabel: string; 14 | 15 | seasonOptions = [ 16 | { label: 'Spring', value: 'SPRING' }, 17 | { label: 'Summer', value: 'SUMMER' }, 18 | { label: 'Autumn', value: 'AUTUMN' }, 19 | { label: 'Winter', value: 'WINTER' } 20 | ]; 21 | 22 | season = [this.seasonOptions[1]]; 23 | seasonValue = ['SUMMER']; 24 | valueParser = (item) => item && item.value; 25 | 26 | selectAll(checkboxGroup: CheckboxGroupComponent, selectAll) { 27 | if (selectAll) { 28 | return checkboxGroup.selectAll(); 29 | } 30 | checkboxGroup.unselectAll(); 31 | } 32 | 33 | invertAll(checkboxgroup) { 34 | checkboxgroup.invertSelect(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/app/demo/checkbox-group/checkbox-group-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { CheckboxGroupDemoComponent } from './checkbox-group-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthNGModule 13 | ], 14 | exports: [ 15 | CheckboxGroupDemoComponent 16 | ], 17 | declarations: [CheckboxGroupDemoComponent], 18 | providers: [], 19 | entryComponents: [CheckboxGroupDemoComponent] 20 | }) 21 | export class CheckboxGroupDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/checkbox-group/index.ts: -------------------------------------------------------------------------------- 1 | export * from './checkbox-group-demo.component'; 2 | export * from './checkbox-group-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/common/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Common 3 | 4 | -------------------------------------------------------------------------------- /src/app/demo/data-table/data-table-demo.component.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /src/app/demo/data-table/data-table-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | ChangeDetectionStrategy, 4 | Pipe, 5 | PipeTransform, 6 | ComponentFactoryResolver, 7 | EventEmitter 8 | } from '@angular/core'; 9 | 10 | @Component({ 11 | selector: 're-data-table-demo', 12 | templateUrl: './data-table-demo.component.html', 13 | changeDetection: ChangeDetectionStrategy.OnPush 14 | }) 15 | export class DataTableDemoComponent { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/app/demo/data-table/data-table-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { DataTableDemoComponent } from './data-table-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | import { FormsModule } from '@angular/forms'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, RebirthNGModule, FormsModule], 10 | exports: [DataTableDemoComponent], 11 | declarations: [DataTableDemoComponent], 12 | providers: [], 13 | entryComponents: [DataTableDemoComponent] 14 | }) 15 | export class DataTableDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/data-table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './data-table-demo.component'; 2 | export * from './data-table-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/date-picker/date-picker-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-date-picker-demo', 5 | templateUrl: './date-picker-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class DatePickerDemoComponent implements OnInit { 9 | dateFormatOptions = ['YYYY-MM-DD HH:mm:ss', 'YY-MM-DD HH:mm:ss', 'MM/DD/YYYY HH:mm:ss', 'MM/DD/YY HH:mm:ss']; 10 | dateFormat: string; 11 | selectedDate1 = new Date('01/02/2017 09:11'); 12 | selectedDate2: Date; 13 | selectedDate3 = new Date('01/02/2017 09:11'); 14 | 15 | ngOnInit() { 16 | this.dateFormat = this.dateFormatOptions[0]; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/app/demo/date-picker/date-picker-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { DatePickerDemoComponent } from './date-picker-demo.component'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { RebirthNGModule } from 'rebirth-ng'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [DatePickerDemoComponent], 11 | declarations: [DatePickerDemoComponent], 12 | providers: [], 13 | entryComponents: [DatePickerDemoComponent] 14 | }) 15 | export class DatePickerDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/date-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from './date-picker-demo.component'; 2 | export * from './date-picker-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/dialog/README.md: -------------------------------------------------------------------------------- 1 | ## Dialog 2 | 3 | * Shoulde pass `RebirthNGConfig.rootContainer` in your `AppComponent` when you did not pass `rootContainer` parameters to `DialogService`. 4 | 5 | 6 | export class AppComponent implements OnInit { 7 | constructor(private rebirthNGConfig: RebirthNGConfig, 8 | private viewContainerRef: ViewContainerRef) { 9 | 10 | this.rebirthNGConfig.rootContainer = this.viewContainerRef; // default container for append body component(Modal, DatePicker...) 11 | // this.rebirthNGConfig.extend(REBIRTH_UI_I18N_ZHCN); i18n 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/app/demo/dialog/dialog-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
7 | 8 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/app/demo/dialog/dialog-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ReactiveFormsModule } from '@angular/forms'; 3 | 4 | import { DialogDemoComponent } from './dialog-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | RebirthNGModule, 10 | ReactiveFormsModule 11 | ], 12 | declarations: [ 13 | DialogDemoComponent 14 | ] 15 | , 16 | exports: [ 17 | DialogDemoComponent 18 | ], 19 | providers: [], 20 | entryComponents: [ 21 | DialogDemoComponent 22 | ] 23 | }) 24 | export class DialogDemoModule { 25 | } 26 | -------------------------------------------------------------------------------- /src/app/demo/dialog/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dialog-demo.component'; 2 | export * from './dialog-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/draggable/README.md: -------------------------------------------------------------------------------- 1 | #### Draggable 2 | 3 | * Unknown element(like ng component) should set to `display:block`; 4 | 5 | * It should setup `drag-drop-webkit-mobile` when you want to run `HTML5 draggable` on ios. 6 | 7 | 8 | import * as iosDragDropShim from 'drag-drop-webkit-mobile'; 9 | 10 | iosDragDropShim({ 11 | enableEnterLeave: true, 12 | holdToDrag: 300, 13 | simulateAnchorClick: false, 14 | requireExplicitDraggable: true 15 | }); 16 | 17 | [https://github.com/timruffles/ios-html5-drag-drop-shim](https://github.com/timruffles/ios-html5-drag-drop-shim) 18 | -------------------------------------------------------------------------------- /src/app/demo/draggable/draggable-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { DraggableDirective } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-draggable-demo', 6 | templateUrl: './draggable-demo.component.html' 7 | }) 8 | export class DraggableDemoComponent { 9 | source = new Array(10).fill(0).map((_, index) => index + 1); 10 | target = []; 11 | 12 | onDrop2Right($event) { 13 | const contextData = $event.dataTransfer.getData(DraggableDirective.DRAGGABLE_DATA_KEY); 14 | const data = JSON.parse(contextData); 15 | console.log('drag data to right', data); 16 | this.source = this.source.filter(item => item !== data.data); 17 | this.target = [...this.target, data.data]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/app/demo/draggable/draggable-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { DraggableDemoComponent } from './draggable-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { CommonModule } from '@angular/common'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [DraggableDemoComponent], 10 | declarations: [DraggableDemoComponent], 11 | providers: [], 12 | entryComponents: [DraggableDemoComponent] 13 | }) 14 | export class DraggableDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/draggable/index.ts: -------------------------------------------------------------------------------- 1 | export * from './draggable-demo.component'; 2 | export * from './draggable-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/ellipsis/README.md: -------------------------------------------------------------------------------- 1 | #### ellipsis 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/ellipsis/ellipsis-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Text ellipsis:

5 | 6 |
7 | 8 |
9 |

Html ellipsis:

10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /src/app/demo/ellipsis/ellipsis-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-ellipsis-demo', 5 | templateUrl: './ellipsis-demo.component.html' 6 | }) 7 | export class EllipsisDemoComponent { 8 | /* tslint:disable */ 9 | text = `Welcome to @Rebirth/NG. This repo is Angular ui library for Bootstrap. And it is being built from scratch in Typescript.`; 10 | html = `

Arch Linux users can install autoenv or autoenv-git with their favorite AUR helper.

`; 11 | /* tslint:enable */ 12 | } 13 | -------------------------------------------------------------------------------- /src/app/demo/ellipsis/ellipsis-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { EllipsisDemoComponent } from './ellipsis-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [ 13 | EllipsisDemoComponent 14 | ], 15 | declarations: [EllipsisDemoComponent], 16 | providers: [], 17 | entryComponents: [EllipsisDemoComponent] 18 | }) 19 | export class EllipsisDemoModule { 20 | } 21 | -------------------------------------------------------------------------------- /src/app/demo/ellipsis/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ellipsis-demo.component'; 2 | export * from './ellipsis-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/file-upload/README.md: -------------------------------------------------------------------------------- 1 | #### FileUpload 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/file-upload/file-upload-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-file-upload-demo', 5 | templateUrl: './file-upload-demo.component.html' 6 | }) 7 | export class FileUploadDemoComponent { 8 | 9 | uploadFiles: any[]; 10 | 11 | onRemoveDone(files) { 12 | console.log('files', files); 13 | } 14 | 15 | uploadFilesChange($event) { 16 | this.uploadFiles = $event.map(item => item.uploadResponse.path); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/app/demo/file-upload/file-upload-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FileUploadDemoComponent } from './file-upload-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthNGModule 13 | ], 14 | exports: [ 15 | FileUploadDemoComponent 16 | ], 17 | declarations: [FileUploadDemoComponent], 18 | providers: [], 19 | entryComponents: [FileUploadDemoComponent] 20 | }) 21 | export class FileUploadDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/file-upload/index.ts: -------------------------------------------------------------------------------- 1 | export * from './file-upload-demo.component'; 2 | export * from './file-upload-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/flow-step/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/flow-step/README.md -------------------------------------------------------------------------------- /src/app/demo/flow-step/flow-step-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Arrow:

4 | 5 |
6 | 7 | 8 |
9 |

Dot:

10 | 11 |
12 | 13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 | -------------------------------------------------------------------------------- /src/app/demo/flow-step/flow-step-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | import { FlowStep } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-flow-step-demo', 6 | templateUrl: './flow-step-demo.component.html', 7 | changeDetection: ChangeDetectionStrategy.OnPush 8 | }) 9 | export class FlowStepDemoComponent { 10 | active = 0; 11 | steps: FlowStep[] = [ 12 | { 13 | title: 'Submit order', 14 | icon: 'glyphicon glyphicon-shopping-cart', 15 | description: 'Step 1 description' 16 | }, 17 | { 18 | title: 'Payment', 19 | icon: 'glyphicon glyphicon-yen', 20 | description: 'Step 2 description' 21 | }, 22 | { 23 | title: 'Posting', 24 | icon: 'glyphicon glyphicon-plane', 25 | description: 'Posting ....' 26 | }, 27 | { 28 | title: 'Sign', 29 | icon: 'glyphicon glyphicon-list-alt', 30 | description: 'Step 4 description' 31 | }, 32 | { 33 | title: 'Completed', 34 | icon: 'glyphicon glyphicon-ok', 35 | description: 'Step 5 description' 36 | } 37 | ]; 38 | } 39 | -------------------------------------------------------------------------------- /src/app/demo/flow-step/flow-step-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { FlowStepDemoComponent } from './flow-step-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [FlowStepDemoComponent], 10 | declarations: [FlowStepDemoComponent], 11 | providers: [], 12 | entryComponents: [FlowStepDemoComponent] 13 | }) 14 | export class FlowStepDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/flow-step/index.ts: -------------------------------------------------------------------------------- 1 | export * from './flow-step-demo.component'; 2 | export * from './flow-step-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/image-upload/README.md: -------------------------------------------------------------------------------- 1 | #### ImageUpload 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/image-upload/image-upload-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Multiple - 3:

5 | 7 |
8 | 9 |
10 |

Single:

11 | 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /src/app/demo/image-upload/image-upload-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-image-upload-demo', 5 | templateUrl: './image-upload-demo.component.html' 6 | }) 7 | export class ImageUploadDemoComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/app/demo/image-upload/image-upload-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ImageUploadDemoComponent } from './image-upload-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [ 13 | ImageUploadDemoComponent 14 | ], 15 | declarations: [ImageUploadDemoComponent], 16 | providers: [], 17 | entryComponents: [ImageUploadDemoComponent] 18 | }) 19 | export class ImageUploadDemoModule { 20 | } 21 | -------------------------------------------------------------------------------- /src/app/demo/image-upload/index.ts: -------------------------------------------------------------------------------- 1 | export * from './image-upload-demo.component'; 2 | export * from './image-upload-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/infinite-scroll/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/infinite-scroll/README.md -------------------------------------------------------------------------------- /src/app/demo/infinite-scroll/index.ts: -------------------------------------------------------------------------------- 1 | export * from './infinite-scroll-demo.component'; 2 | export * from './infinite-scroll-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/infinite-scroll/infinite-scroll-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
{{item.id}}{{item.name}}{{item.age}}
12 | 14 |
Load completed!
15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /src/app/demo/infinite-scroll/infinite-scroll-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { InfiniteScrollComponent } from 'rebirth-ng'; 3 | import * as Immutable from 'immutable'; 4 | 5 | @Component({ 6 | selector: 're-infinite-scroll-demo', 7 | templateUrl: './infinite-scroll-demo.component.html' 8 | }) 9 | export class InfiniteScrollDemoComponent { 10 | dataSource = Immutable.List([]); 11 | total = 500; 12 | complete = false; 13 | next = 1; 14 | 15 | loadMore(infiniteScroll: InfiniteScrollComponent) { 16 | if (this.next > this.total) { 17 | return; 18 | } 19 | 20 | 21 | const end = this.next + 100; 22 | const dataSource = []; 23 | for (; this.next < end; this.next++) { 24 | dataSource.push({ id: this.next, name: `Name ${this.next}`, age: 10 }); 25 | } 26 | 27 | this.dataSource = this.dataSource.push(...dataSource); 28 | this.complete = this.next > this.total; 29 | infiniteScroll.loadFinish(this.complete); 30 | console.log(`load more`, this.next, this.complete); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/demo/infinite-scroll/infinite-scroll-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { InfiniteScrollDemoComponent } from './infinite-scroll-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [InfiniteScrollDemoComponent], 10 | declarations: [InfiniteScrollDemoComponent], 11 | providers: [], 12 | entryComponents: [InfiniteScrollDemoComponent] 13 | }) 14 | export class InfiniteScrollDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/menu-bar/README.md: -------------------------------------------------------------------------------- 1 | 2 | **Notices** 3 | 4 | * `MenuBar` current only support **2 level** dropdown menu; 5 | 6 | * `RouterLink` and `external url` are both supported; 7 | 8 | * Navbar type support: `navbar-fixed-top`, `navbar-fixed-bottom`, `container-fluid`, `navbar-static-top`, `navbar-static-bottom`, `navbar-form`, `sidebar` 9 | 10 | * Sidebar shoulde use type with `sidebar` and in the header page; 11 | 12 | * `MenuBar` include normal menus(`menus`) and right side menus(`rightMenus`); 13 | -------------------------------------------------------------------------------- /src/app/demo/menu-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './menu-bar-demo.component'; 2 | export * from './menu-bar-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/menu-bar/menu-bar-demo.component.html: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /src/app/demo/menu-bar/menu-bar-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { MenuBarDemoComponent } from './menu-bar-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | import { FormsModule } from '@angular/forms'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, RebirthNGModule, FormsModule], 10 | exports: [MenuBarDemoComponent], 11 | declarations: [MenuBarDemoComponent], 12 | providers: [], 13 | entryComponents: [MenuBarDemoComponent] 14 | }) 15 | export class MenuBarDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/modal/README.md: -------------------------------------------------------------------------------- 1 | 2 | #### Notices 3 | 4 | * Shoulde pass `RebirthNGConfig.rootContainer` in your `AppComponent` when you did not pass `rootContainer` parameters to `ModalService`. 5 | 6 | 7 | export class AppComponent implements OnInit { 8 | constructor(private rebirthNGConfig: RebirthNGConfig, 9 | private viewContainerRef: ViewContainerRef) { 10 | 11 | this.rebirthNGConfig.rootContainer = this.viewContainerRef; // default container for append body component(Modal, DatePicker...) 12 | // this.rebirthNGConfig.extend(REBIRTH_UI_I18N_ZHCN); i18n 13 | } 14 | 15 | * Make sure put your modal component to `entryComponents` of your module! Example with `ModalTestComponent`: 16 | 17 | 18 | @NgModule({ 19 | ... 20 | declarations: [ 21 | ModalTestComponent 22 | ], 23 | entryComponents: [ 24 | ModalTestComponent 25 | ] 26 | }) 27 | export class ModalDemoModule { 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/app/demo/modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './modal-demo.component'; 2 | export * from './modal-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/modal/modal-demo.component.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/app/demo/modal/modal-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { ModalDemoComponent, ModalTestComponent } from './modal-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | FormsModule 11 | ], 12 | exports: [ 13 | ModalDemoComponent 14 | ], 15 | declarations: [ 16 | ModalDemoComponent, 17 | ModalTestComponent 18 | ], 19 | entryComponents: [ 20 | ModalTestComponent, 21 | ModalDemoComponent 22 | ] 23 | }) 24 | export class ModalDemoModule { 25 | } 26 | -------------------------------------------------------------------------------- /src/app/demo/notify/README.md: -------------------------------------------------------------------------------- 1 | #### Notify 2 | 3 | * You should setup `this.rebirthConfig.rootContainer = this.viewContainerRef;` in your `Root component` first. 4 | -------------------------------------------------------------------------------- /src/app/demo/notify/index.ts: -------------------------------------------------------------------------------- 1 | export * from './notify-demo.component'; 2 | export * from './notify-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/notify/notify-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Alert message:

5 | 6 | {{alert.html}} 7 | 8 | 9 |
10 |
11 | 12 | 20 |
21 |
22 | 23 | 24 |
25 |
26 | -------------------------------------------------------------------------------- /src/app/demo/notify/notify-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ViewChild, TemplateRef, OnInit } from '@angular/core'; 2 | import { NotifyModel, NotifyService } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-notify-demo', 6 | templateUrl: './notify-demo.component.html' 7 | }) 8 | export class NotifyDemoComponent implements OnInit { 9 | 10 | @ViewChild('notifyTemplate') notifyTemplate: TemplateRef; 11 | notifyIndex = 0; 12 | notifies: NotifyModel[] = [ 13 | { 14 | type: 'success', 15 | html: 'Save order success!' 16 | }, 17 | { 18 | type: 'danger', 19 | html: 'Get error: babababababa!' 20 | } 21 | ]; 22 | 23 | constructor(private alertBoxService: NotifyService) { 24 | } 25 | 26 | ngOnInit(): void { 27 | this.notifies[1].template = this.notifyTemplate; 28 | } 29 | 30 | 31 | placementChange(placement) { 32 | this.alertBoxService.placement(placement); 33 | } 34 | 35 | showAlertMessage() { 36 | const index = this.notifyIndex++ % 2; 37 | this.alertBoxService.open({ ...this.notifies[index] }, index === 1 ? 2 * 1000 : 0); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/app/demo/notify/notify-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { NotifyDemoComponent } from './notify-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [ 13 | NotifyDemoComponent 14 | ], 15 | declarations: [NotifyDemoComponent], 16 | providers: [], 17 | entryComponents: [NotifyDemoComponent] 18 | }) 19 | export class NotifyDemoModule { 20 | } 21 | -------------------------------------------------------------------------------- /src/app/demo/overlay/README.md: -------------------------------------------------------------------------------- 1 | #### Notices 2 | 3 | * We can open & close overlay many times, but overlay will show only one instance at same time; and it will close when all closed. 4 | This feature will help to loading feature that we open overlay before location to next page and open overlay for data request on next page. 5 | It will be more fluency for user experience. 6 | 7 | * Please make sure to put your component to your module's `entryComponents` when you use component. 8 | -------------------------------------------------------------------------------- /src/app/demo/overlay/index.ts: -------------------------------------------------------------------------------- 1 | export * from './overlay-demo.component'; 2 | export * from './overlay-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/overlay/overlay-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 5 |
6 | -------------------------------------------------------------------------------- /src/app/demo/overlay/overlay-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | import { OverlayService } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-overlay-body-demo', 6 | template: ` 7 |
8 | 9 |
Rebirth NG overlay!
10 |
11 | `, 12 | changeDetection: ChangeDetectionStrategy.OnPush 13 | }) 14 | export class OverlayBodyDemoComponent { 15 | 16 | } 17 | 18 | @Component({ 19 | selector: 're-overlay-demo', 20 | templateUrl: './overlay-demo.component.html', 21 | changeDetection: ChangeDetectionStrategy.OnPush 22 | }) 23 | export class OverlayDemoComponent { 24 | 25 | constructor(private overlayService: OverlayService) { 26 | } 27 | 28 | openOverlay() { 29 | this.overlayService.open({ html: `` }); 30 | setTimeout(() => this.overlayService.close(), 5 * 1000); 31 | } 32 | 33 | openComponentOverlay() { 34 | this.overlayService.open({ component: OverlayBodyDemoComponent }); 35 | setTimeout(() => this.overlayService.close(), 5 * 1000); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/app/demo/overlay/overlay-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { OverlayDemoComponent, OverlayBodyDemoComponent } from './overlay-demo.component'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule], 8 | exports: [OverlayDemoComponent], 9 | declarations: [OverlayDemoComponent, OverlayBodyDemoComponent], 10 | providers: [], 11 | entryComponents: [OverlayDemoComponent, OverlayBodyDemoComponent] 12 | }) 13 | export class OverlayDemoModule { 14 | } 15 | -------------------------------------------------------------------------------- /src/app/demo/pager/README.md: -------------------------------------------------------------------------------- 1 | 2 | #### Notices 3 | 4 | * Pager start with **1 (not 0)**. 5 | 6 | * Important @Input & @Output 7 | * `[pageSize]="pager.pageSize"` 8 | * `(pageIndexChange)="pageChange($event)"`. 9 | -------------------------------------------------------------------------------- /src/app/demo/pager/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pager-demo.component'; 2 | export * from './pager-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/pager/pager-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

aligned pager:

4 | 6 | 7 |
8 | 9 |
10 |

No aligned pager:

11 | 13 | 14 |
15 | 16 |
17 |
{{pager | json}}
18 |
19 |
20 | -------------------------------------------------------------------------------- /src/app/demo/pager/pager-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-pager-demo', 5 | templateUrl: './pager-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class PagerDemoComponent { 9 | pager = { 10 | total: 106, 11 | pageIndex: 5, 12 | pageSize: 10 13 | }; 14 | 15 | pageChange(pageIndex) { 16 | console.log(`Rebirth pager change to: ${pageIndex}`, this.pager); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/app/demo/pager/pager-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { PagerDemoComponent } from './pager-demo.component'; 5 | import { PagerModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | PagerModule 11 | ], 12 | declarations: [ 13 | PagerDemoComponent 14 | ], 15 | exports: [ 16 | PagerDemoComponent 17 | ], 18 | providers: [], 19 | entryComponents: [PagerDemoComponent] 20 | 21 | }) 22 | export class PagerDemoModule { 23 | } 24 | -------------------------------------------------------------------------------- /src/app/demo/pagination/README.md: -------------------------------------------------------------------------------- 1 | #### Notices 2 | 3 | * Pagination is same as pager, they both start with **1 (not 0)**. 4 | 5 | * Important @Input & @Output 6 | * `[pageSize]="pager.pageSize"` 7 | * `(pageIndexChange)="pageChange($event)"`. 8 | -------------------------------------------------------------------------------- /src/app/demo/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pagination-demo.component'; 2 | export * from './pagination-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/pagination/pagination-demo.component.scss: -------------------------------------------------------------------------------- 1 | .goto-input { 2 | max-width: 2.5em; 3 | } 4 | 5 | .head { 6 | margin-right: 1rem; 7 | } 8 | 9 | .tail { 10 | margin-left: 1rem; 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | .form-control { 15 | text-align: center; 16 | } 17 | } 18 | 19 | :host ::ng-deep { 20 | nav { 21 | display: flex; 22 | justify-content: center; 23 | align-items: center; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/app/demo/pagination/pagination-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-pagination-demo', 5 | templateUrl: './pagination-demo.component.html', 6 | styleUrls: ['./pagination-demo.component.scss'], 7 | changeDetection: ChangeDetectionStrategy.OnPush 8 | 9 | }) 10 | export class PaginationDemoComponent { 11 | 12 | pager = { 13 | total: 306, 14 | pageIndex: 5, 15 | pageSize: 10 16 | }; 17 | gotoPage: number; 18 | 19 | pageChange(pageIndex) { 20 | console.log(`Rebirth pager change to: ${pageIndex}`, this.pager); 21 | } 22 | 23 | totalPage(): number { 24 | return Math.ceil(this.pager.total / this.pager.pageSize); 25 | } 26 | 27 | goto() { 28 | this.gotoPage = Math.max(1, this.gotoPage); 29 | this.gotoPage = Math.min(this.totalPage(), this.gotoPage); 30 | this.pager.pageIndex = this.gotoPage; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/demo/pagination/pagination-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { PaginationDemoComponent } from './pagination-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { CommonModule } from '@angular/common'; 6 | import { FormsModule } from '@angular/forms'; 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthNGModule 13 | ], 14 | declarations: [ 15 | PaginationDemoComponent 16 | ], 17 | exports: [ 18 | PaginationDemoComponent 19 | ], 20 | entryComponents: [PaginationDemoComponent], 21 | providers: [] 22 | }) 23 | export class PaginationDemoModule { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/app/demo/panel/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/panel/README.md -------------------------------------------------------------------------------- /src/app/demo/panel/index.ts: -------------------------------------------------------------------------------- 1 | export * from './panel-demo.component'; 2 | export * from './panel-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/panel/panel-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-panel-demo', 5 | templateUrl: './panel-demo.component.html' 6 | }) 7 | export class PanelDemoComponent { 8 | 9 | close(type) { 10 | console.log(`Panel ${type} closing!`); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/app/demo/panel/panel-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { PanelDemoComponent } from './panel-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | RebirthNGModule 11 | ], 12 | exports: [PanelDemoComponent], 13 | declarations: [PanelDemoComponent], 14 | providers: [], 15 | entryComponents: [PanelDemoComponent] 16 | }) 17 | export class PanelDemoModule { 18 | } 19 | -------------------------------------------------------------------------------- /src/app/demo/popover/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/popover/README.md -------------------------------------------------------------------------------- /src/app/demo/popover/index.ts: -------------------------------------------------------------------------------- 1 | export * from './popover-demo.component'; 2 | export * from './popover-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/popover/popover-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-popover-demo', 5 | templateUrl: './popover-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class PopoverDemoComponent { 9 | name = 'greengerong'; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/app/demo/popover/popover-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { PopoverDemoComponent } from './popover-demo.component'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | import { FormsModule } from '@angular/forms'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [PopoverDemoComponent], 11 | declarations: [PopoverDemoComponent], 12 | providers: [], 13 | entryComponents: [PopoverDemoComponent] 14 | }) 15 | export class PopoverDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/position/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/position/README.md -------------------------------------------------------------------------------- /src/app/demo/progress-bar/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/progress-bar/README.md -------------------------------------------------------------------------------- /src/app/demo/progress-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './progress-bar-demo.component'; 2 | export * from './progress-bar-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/progress-bar/progress-bar-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /src/app/demo/progress-bar/progress-bar-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-progress-bar-demo', 5 | templateUrl: './progress-bar-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class ProgressBarDemoComponent { 9 | value = 45; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/demo/progress-bar/progress-bar-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { ProgressBarDemoComponent } from './progress-bar-demo.component'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { RebirthNGModule } from 'rebirth-ng'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [ProgressBarDemoComponent], 11 | declarations: [ProgressBarDemoComponent], 12 | providers: [], 13 | entryComponents: [ProgressBarDemoComponent] 14 | }) 15 | export class ProgressBarDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/radio-group/README.md: -------------------------------------------------------------------------------- 1 | #### RadioGroup 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/radio-group/index.ts: -------------------------------------------------------------------------------- 1 | export * from './radio-group-demo.component'; 2 | export * from './radio-group-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/radio-group/radio-group-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Sex:

5 | 6 |
{{sex | json}}
7 |
8 | 9 |
10 |

Season:

11 | 13 |
{{season | json}}
14 |
15 | 16 |
17 |

Season with customise value:

18 | 20 |
{{seasonValue | json}}
21 |
22 | 23 | 24 |
25 | -------------------------------------------------------------------------------- /src/app/demo/radio-group/radio-group-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-radio-group-demo', 5 | templateUrl: './radio-group-demo.component.html' 6 | }) 7 | export class RadioGroupDemoComponent { 8 | 9 | sexOptions = ['male', 'female']; 10 | sex: string; 11 | 12 | seasonOptions = [ 13 | { label: 'Spring', value: 'SPRING' }, 14 | { label: 'Summer', value: 'SUMMER' }, 15 | { label: 'Autumn', value: 'AUTUMN' }, 16 | { label: 'Winter', value: 'WINTER' } 17 | ]; 18 | 19 | season = this.seasonOptions[1]; 20 | seasonValue: string; 21 | valueParser = (item) => item.value; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/app/demo/radio-group/radio-group-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RadioGroupDemoComponent } from './radio-group-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule, Validators } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthNGModule 13 | ], 14 | exports: [ 15 | RadioGroupDemoComponent 16 | ], 17 | declarations: [RadioGroupDemoComponent], 18 | providers: [], 19 | entryComponents: [RadioGroupDemoComponent] 20 | }) 21 | export class RadioGroupDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/rating/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/rating/README.md -------------------------------------------------------------------------------- /src/app/demo/rating/index.ts: -------------------------------------------------------------------------------- 1 | export * from './rating-demo.component'; 2 | export * from './rating-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/rating/rating-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

default rating:

4 | 5 |
6 | 7 |
8 |

Customise icons rating:

9 | 10 | 11 |
12 | 13 |
14 |
15 |
16 |
{{rating | json}}
17 |
18 | -------------------------------------------------------------------------------- /src/app/demo/rating/rating-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-rating-demo', 5 | templateUrl: './rating-demo.component.html' 6 | }) 7 | export class RatingDemoComponent { 8 | disabled = false; 9 | rating: any = { 10 | value: 3, 11 | max: 10 12 | }; 13 | icons = { stateOn: 'glyphicon glyphicon-heart', stateOff: 'glyphicon glyphicon-ban-circle' }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/rating/rating-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { RatingDemoComponent } from './rating-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | import { FormsModule } from '@angular/forms'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [RatingDemoComponent], 11 | declarations: [RatingDemoComponent], 12 | providers: [], 13 | entryComponents: [RatingDemoComponent] 14 | }) 15 | export class RatingDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/select-button/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/select-button/README.md -------------------------------------------------------------------------------- /src/app/demo/select-button/index.ts: -------------------------------------------------------------------------------- 1 | export * from './select-button-demo.component'; 2 | export * from './select-button-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/select-button/select-button-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | import { SelectButtonItem } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-select-button-demo', 6 | templateUrl: './select-button-demo.component.html', 7 | changeDetection: ChangeDetectionStrategy.OnPush 8 | }) 9 | export class SelectButtonDemoComponent { 10 | value: string; 11 | multipleValue: string[]; 12 | disabled = true; 13 | items: SelectButtonItem[] = [ 14 | { 15 | text: 'Left' 16 | }, 17 | { 18 | text: 'Middle' 19 | }, 20 | { 21 | text: 'Right' 22 | } 23 | ]; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/app/demo/select-button/select-button-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { SelectButtonDemoComponent } from './select-button-demo.component'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { RebirthNGModule } from 'rebirth-ng'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [SelectButtonDemoComponent], 11 | declarations: [SelectButtonDemoComponent], 12 | providers: [SelectButtonDemoComponent], 13 | entryComponents: [SelectButtonDemoComponent] 14 | }) 15 | export class SelectButtonDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/select/README.md: -------------------------------------------------------------------------------- 1 | #### Select 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/select/index.ts: -------------------------------------------------------------------------------- 1 | export * from './select-demo.component'; 2 | export * from './select-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/select/select-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Demo:

5 | 6 |
7 |
{{selectValue | json}}
8 |
9 | 10 |
11 |

Select Object Demo:

12 | 13 |
14 |
{{selectObjValue | json}}
15 |
16 | 17 |
18 |

Group select:

19 | 21 |
22 |
{{selectGroupValue | json}}
23 |
24 | 25 |
26 | -------------------------------------------------------------------------------- /src/app/demo/select/select-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { GroupOption } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-select-demo', 6 | templateUrl: './select-demo.component.html' 7 | }) 8 | export class SelectDemoComponent { 9 | options = ['Tyler', 'Lucy', 'Jack']; 10 | selectValue = 'Jack'; 11 | objOptions = this.options.map((label, id) => ({ 12 | id, label 13 | })); 14 | selectObjValue = this.objOptions[2]; 15 | selectGroupValue: any; 16 | groupOptions: GroupOption[] = [ 17 | { 18 | group: 'Manager', 19 | options: ['Tyler'] 20 | }, 21 | { 22 | group: 'Engineer', 23 | options: ['Lucy', 'Jack'] 24 | } 25 | ] 26 | ; 27 | } 28 | -------------------------------------------------------------------------------- /src/app/demo/select/select-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { SelectDemoComponent } from './select-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | FormsModule, 12 | RebirthNGModule 13 | ], 14 | exports: [ 15 | SelectDemoComponent 16 | ], 17 | declarations: [SelectDemoComponent], 18 | providers: [], 19 | entryComponents: [SelectDemoComponent] 20 | }) 21 | export class SelectDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/slider/README.md: -------------------------------------------------------------------------------- 1 | #### Slider 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/slider/index.ts: -------------------------------------------------------------------------------- 1 | export * from './slider-demo.component'; 2 | export * from './slider-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/slider/slider-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Demo:

5 | 6 |
{{sliderValue | json}}
7 |
8 | 9 |
10 | -------------------------------------------------------------------------------- /src/app/demo/slider/slider-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-slider-demo', 5 | templateUrl: './slider-demo.component.html' 6 | }) 7 | export class SliderDemoComponent { 8 | sliderValue = 60; 9 | } 10 | -------------------------------------------------------------------------------- /src/app/demo/slider/slider-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { SliderDemoComponent } from './slider-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | RebirthNGModule, 12 | FormsModule 13 | ], 14 | exports: [ 15 | SliderDemoComponent 16 | ], 17 | declarations: [SliderDemoComponent], 18 | providers: [], 19 | entryComponents: [SliderDemoComponent] 20 | }) 21 | export class SliderDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/switch/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/switch/README.md -------------------------------------------------------------------------------- /src/app/demo/switch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './switch-demo.component'; 2 | export * from './switch-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/switch/switch-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
{{checked | json}}
10 | 11 | 12 |
13 | -------------------------------------------------------------------------------- /src/app/demo/switch/switch-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-switch-demo', 5 | templateUrl: './switch-demo.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class SwitchDemoComponent { 9 | checked = true; 10 | disabled = false; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/app/demo/switch/switch-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule } from '@angular/forms'; 4 | 5 | import { SwitchDemoComponent } from './switch-demo.component'; 6 | import { RebirthNGModule } from 'rebirth-ng'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, RebirthNGModule, FormsModule], 10 | exports: [SwitchDemoComponent], 11 | declarations: [SwitchDemoComponent], 12 | providers: [], 13 | entryComponents: [SwitchDemoComponent] 14 | }) 15 | export class SwitchDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/tabs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/tabs/README.md -------------------------------------------------------------------------------- /src/app/demo/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tabs-demo.component'; 2 | export * from './tabs-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/tabs/tabs-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { TabsDemoComponent } from './tabs-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [TabsDemoComponent], 10 | declarations: [TabsDemoComponent], 11 | providers: [], 12 | entryComponents: [TabsDemoComponent] 13 | }) 14 | export class TabsDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/tags/README.md: -------------------------------------------------------------------------------- 1 | #### Tags 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/tags/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tags-demo.component'; 2 | export * from './tags-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/tags/tags-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

Demo:

5 | 6 | 7 |
{{ source | json}}
8 |
9 | 10 |
11 |

Disabled:

12 | 13 | 14 |
15 | 16 | 17 |
18 | -------------------------------------------------------------------------------- /src/app/demo/tags/tags-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-tags-demo', 5 | templateUrl: './tags-demo.component.html' 6 | }) 7 | export class TagsDemoComponent { 8 | source = ['123', '456', '789']; 9 | } 10 | -------------------------------------------------------------------------------- /src/app/demo/tags/tags-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { TagsDemoComponent } from './tags-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | RebirthNGModule, 12 | FormsModule 13 | ], 14 | exports: [ 15 | TagsDemoComponent 16 | ], 17 | declarations: [TagsDemoComponent], 18 | providers: [], 19 | entryComponents: [TagsDemoComponent] 20 | }) 21 | export class TagsDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/time-picker/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/time-picker/README.md -------------------------------------------------------------------------------- /src/app/demo/time-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from './time-picker-demo.component'; 2 | export * from './time-picker-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/time-picker/time-picker-demo.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Normal:

4 | 5 |
6 | 7 |
8 |
{{time1 | json}}
9 | 10 |
11 |

No seconds:

12 | 13 | 14 |
15 | 16 |
17 |
18 | 19 |
20 |
{{time2 | json}}
21 | 22 |
23 |

Min time and max time:

24 | 26 |
27 | 28 |
29 |
{{time3 | json}}
30 | 31 |
32 | -------------------------------------------------------------------------------- /src/app/demo/time-picker/time-picker-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TimePickerModel } from 'rebirth-ng'; 3 | 4 | @Component({ 5 | selector: 're-time-picker-demo', 6 | templateUrl: './time-picker-demo.component.html' 7 | }) 8 | export class TimePickerDemoComponent { 9 | 10 | time1 = new TimePickerModel(13, 30, 30); 11 | time2 = new TimePickerModel(13, 30); 12 | time3 = new TimePickerModel(13, 30, 30); 13 | disabled: boolean; 14 | 15 | timeChange(time) { 16 | console.log('time change:', time, time.toString()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/demo/time-picker/time-picker-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { CommonModule } from '@angular/common'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { TimePickerDemoComponent } from './time-picker-demo.component'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [TimePickerDemoComponent], 11 | declarations: [TimePickerDemoComponent], 12 | providers: [], 13 | entryComponents: [TimePickerDemoComponent] 14 | }) 15 | export class TimePickerDemoModule { 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/app/demo/tooltip/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/tooltip/README.md -------------------------------------------------------------------------------- /src/app/demo/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tooltip-demo.component'; 2 | export * from './tooltip.module'; 3 | 4 | -------------------------------------------------------------------------------- /src/app/demo/tooltip/tooltip-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-tooltip-demo', 5 | templateUrl: './tooltip-demo.component.html' 6 | }) 7 | export class TooltipDemoComponent { 8 | setting = { name: 'rebirth tooltip', placement: 'top', trigger: 'hover' }; 9 | github = 'https://github.com/greengerong/rebirth-ng'; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/app/demo/tooltip/tooltip.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { TooltipDemoComponent } from './tooltip-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { RebirthNGModule } from 'rebirth-ng'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, RebirthNGModule], 9 | exports: [TooltipDemoComponent], 10 | declarations: [TooltipDemoComponent], 11 | providers: [], 12 | entryComponents: [TooltipDemoComponent] 13 | }) 14 | export class TooltipDemoModule { 15 | } 16 | -------------------------------------------------------------------------------- /src/app/demo/tree-view/README.md: -------------------------------------------------------------------------------- 1 | #### TreeView 2 | 3 | -------------------------------------------------------------------------------- /src/app/demo/tree-view/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tree-view-demo.component'; 2 | export * from './tree-view-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/tree-view/tree-view-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { TreeViewDemoComponent } from './tree-view-demo.component'; 4 | import { RebirthNGModule } from 'rebirth-ng'; 5 | import { FormsModule } from '@angular/forms'; 6 | 7 | 8 | @NgModule({ 9 | imports: [ 10 | CommonModule, 11 | RebirthNGModule, 12 | FormsModule 13 | ], 14 | exports: [ 15 | TreeViewDemoComponent 16 | ], 17 | declarations: [TreeViewDemoComponent], 18 | providers: [], 19 | entryComponents: [TreeViewDemoComponent] 20 | }) 21 | export class TreeViewDemoModule { 22 | } 23 | -------------------------------------------------------------------------------- /src/app/demo/validators/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/validators/README.md -------------------------------------------------------------------------------- /src/app/demo/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './validators-demo.component'; 2 | export * from './validators-demo.module'; 3 | -------------------------------------------------------------------------------- /src/app/demo/validators/validators-demo.component.scss: -------------------------------------------------------------------------------- 1 | re-alert-box { 2 | display: block; 3 | padding: 5px 0px; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/demo/validators/validators-demo.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 're-validators-demo', 5 | templateUrl: './validators-demo.component.html', 6 | styleUrls: ['./validators-demo.component.scss'] 7 | }) 8 | export class ValidatorsDemoComponent { 9 | model: any = {}; 10 | date = Date.parse('2017-05-01'); 11 | today = new Date().setHours(0, 0, 0, 0); 12 | } 13 | -------------------------------------------------------------------------------- /src/app/demo/validators/validators-demo.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { ValidatorsDemoComponent } from './validators-demo.component'; 4 | import { CommonModule } from '@angular/common'; 5 | import { FormsModule } from '@angular/forms'; 6 | import { RebirthNGModule } from 'rebirth-ng'; 7 | 8 | @NgModule({ 9 | imports: [CommonModule, FormsModule, RebirthNGModule], 10 | exports: [ValidatorsDemoComponent], 11 | declarations: [ValidatorsDemoComponent], 12 | providers: [ValidatorsDemoComponent], 13 | entryComponents: [ValidatorsDemoComponent] 14 | }) 15 | export class ValidatorsDemoModule { 16 | } 17 | -------------------------------------------------------------------------------- /src/app/demo/window-ref/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/app/demo/window-ref/README.md -------------------------------------------------------------------------------- /src/app/feature/getting-started.component.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /src/app/feature/getting-started.component.scss: -------------------------------------------------------------------------------- 1 | .main-logo { 2 | width: 100%; 3 | margin: 0px 0px 40px 0px; 4 | .images { 5 | margin: auto; 6 | max-width: 100%; 7 | max-height: 400px; 8 | display: block; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/app/feature/getting-started.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { DemoConfigService } from '../shared/demo/demo-config.service'; 3 | import { DomSanitizer } from '@angular/platform-browser'; 4 | 5 | @Component({ 6 | selector: 're-getting-started', 7 | templateUrl: './getting-started.component.html', 8 | styleUrls: ['./getting-started.component.scss'] 9 | }) 10 | export class GettingStartedComponent implements OnInit { 11 | gettingStarted: any; 12 | 13 | constructor(private demoConfigService: DemoConfigService, private domSanitizer: DomSanitizer) { 14 | } 15 | 16 | ngOnInit() { 17 | this.gettingStarted = this.domSanitizer.bypassSecurityTrustHtml(this.demoConfigService.gettingStarted.readMe); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/app/feature/index.ts: -------------------------------------------------------------------------------- 1 | export * from './getting-started.component'; 2 | export * from './show-case.component'; 3 | -------------------------------------------------------------------------------- /src/app/feature/show-case.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /src/app/shared/demo/index.ts: -------------------------------------------------------------------------------- 1 | export * from './demo-config.service'; 2 | -------------------------------------------------------------------------------- /src/app/shared/doc/doc.component.scss: -------------------------------------------------------------------------------- 1 | $grayColor: #999; 2 | 3 | .meta-data { 4 | color: $grayColor; 5 | a { 6 | color: $grayColor; 7 | } 8 | } 9 | 10 | .api-frame { 11 | border: none; 12 | width: 100%; 13 | height: 100%; 14 | min-height: 800px; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/app/shared/doc/doc.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, OnInit } from '@angular/core'; 2 | import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; 3 | 4 | @Component({ 5 | selector: 're-doc', 6 | templateUrl: './doc.component.html', 7 | styleUrls: ['./doc.component.scss'] 8 | }) 9 | export class DocComponent implements OnInit { 10 | 11 | 12 | apiHref: string | SafeUrl; 13 | @Input() component: any; 14 | 15 | constructor(private domSanitizer: DomSanitizer) { 16 | 17 | } 18 | 19 | ngOnInit(): void { 20 | const url = `/rebirth-ng/compodocs/modules/${this.component.name}Module.html`; 21 | this.apiHref = this.domSanitizer.bypassSecurityTrustResourceUrl(url); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/app/shared/doc/hightlight.ts: -------------------------------------------------------------------------------- 1 | import * as hljs from 'highlight.js'; 2 | import { Renderer2 } from '@angular/core'; 3 | 4 | export function highlightCodeBlock(renderer: Renderer2, code): string { 5 | if (code) { 6 | const elm = renderer.createElement('pre'); 7 | renderer.setProperty(elm, 'innerText', code); 8 | hljs.highlightBlock(elm); 9 | return elm.innerHTML; 10 | } 11 | } 12 | 13 | export function fixTSModuleImport(code): string { 14 | return (code || '').replace(/\.\.\/\.\.\/exports(\/.*)?/, 'rebirth-ng'); 15 | } 16 | -------------------------------------------------------------------------------- /src/app/shared/doc/index.ts: -------------------------------------------------------------------------------- 1 | export * from './doc.component'; 2 | -------------------------------------------------------------------------------- /src/app/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './doc'; 2 | export * from './theme'; 3 | export * from './demo'; 4 | export * from './shared.module'; 5 | -------------------------------------------------------------------------------- /src/app/shared/theme/index.ts: -------------------------------------------------------------------------------- 1 | export * from './theme.service'; 2 | -------------------------------------------------------------------------------- /src/app/shared/theme/theme.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, Renderer2, ElementRef } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class ThemeService { 5 | static THEME_KEY = 'rebirth-ng:theme'; 6 | 7 | setupTheme(theme: string, renderer: Renderer2, parentElementRef: ElementRef) { 8 | theme = theme || localStorage.getItem(ThemeService.THEME_KEY); 9 | if (theme) { 10 | const link = renderer.createElement('link'); 11 | link.rel = 'stylesheet'; 12 | link.href = `./assets/themes/bootstrap.${theme.toLowerCase()}.css`; 13 | renderer.appendChild(parentElementRef.nativeElement, link); 14 | localStorage.setItem(ThemeService.THEME_KEY, theme); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/assets/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/assets/images/loading.gif -------------------------------------------------------------------------------- /src/assets/images/rebirth-home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/assets/images/rebirth-home.jpg -------------------------------------------------------------------------------- /src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greengerong/rebirth-ng/135d1f9170acf6b97f5f239d79365a057c7e4143/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Rebirth NG 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Loading... 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | import { enableProdMode } from '@angular/core'; 4 | import { environment } from './environments/environment'; 5 | import { AppModule } from './app/app.module'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule); 12 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import "./styles/bootstrap"; 3 | -------------------------------------------------------------------------------- /src/styles/bootstrap.scss: -------------------------------------------------------------------------------- 1 | @import "common"; 2 | //@import "~bootstrap-sass/assets/stylesheets/_bootstrap"; 3 | @import '~highlight.js/styles/github'; 4 | //@import "../assets/themes/bootstrap.dark.css"; 5 | //@import "../assets/themes/bootstrap.paper.css"; 6 | //@import "../assets/themes/bootstrap.cosmo.css"; 7 | //@import "../assets/themes/bootstrap.readable.css"; 8 | //@import "../assets/themes/bootstrap.united.css"; 9 | //@import "../assets/themes/bootstrap.sandstone.css"; 10 | //@import "../assets/themes/bootstrap.journal.css"; 11 | @import "modules/overlay"; 12 | -------------------------------------------------------------------------------- /src/styles/common.scss: -------------------------------------------------------------------------------- 1 | 2 | @import "variables"; 3 | @import "mixins"; 4 | 5 | *[draggable=true] { 6 | -moz-user-select: none; 7 | -khtml-user-drag: element; 8 | cursor: move; 9 | } 10 | 11 | *:-khtml-drag { 12 | background-color: rgba(238, 238, 238, 0.5); 13 | } 14 | -------------------------------------------------------------------------------- /src/styles/mixins.scss: -------------------------------------------------------------------------------- 1 | // self scss variables or override 3rd variables; 2 | 3 | @import "~bootstrap-sass/assets/stylesheets/bootstrap/mixins"; 4 | -------------------------------------------------------------------------------- /src/styles/modules/overlay.scss: -------------------------------------------------------------------------------- 1 | .overlay-demo-logo { 2 | background: url("./assets/images/loading.gif"); 3 | width: 200px; 4 | height: 200px; 5 | } 6 | -------------------------------------------------------------------------------- /src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | // self scss variables or override 3rd variables; 2 | 3 | $icon-font-path: "../assets/fonts/"; 4 | 5 | 6 | @import "~bootstrap-sass/assets/stylesheets/bootstrap/variables"; 7 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ], 19 | "exclude": [ 20 | "**/typing.d.ts" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "re", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "re", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/typing.d.ts: -------------------------------------------------------------------------------- 1 | declare const require: any; 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ], 19 | "paths": { 20 | "rebirth-ng": [ 21 | "dist/rebirth-ng" 22 | ], 23 | "rebirth-ng/*": [ 24 | "dist/rebirth-ng/*" 25 | ] 26 | } 27 | } 28 | } 29 | --------------------------------------------------------------------------------