@updevs/components 1.0.0-alpha.1 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -22
- package/assets/styles/_bootstrap-components.scss +38 -0
- package/assets/styles/_bootstrap-config.scss +7 -0
- package/assets/styles/_bootstrap-override.scss +78 -0
- package/assets/styles/_config.scss +9 -0
- package/assets/styles/_core.scss +71 -0
- package/assets/styles/_mixins.scss +2 -0
- package/assets/styles/_updevs.scss +9 -0
- package/assets/styles/_utilities.scss +98 -0
- package/assets/styles/_variables-dark.scss +17 -0
- package/assets/styles/_variables.scss +934 -0
- package/assets/styles/fonts/_webfonts.scss +15 -0
- package/assets/styles/layout/_animations.scss +62 -0
- package/assets/styles/layout/_core.scss +61 -0
- package/assets/styles/layout/_dark.scss +72 -0
- package/assets/styles/layout/_footer.scss +12 -0
- package/assets/styles/layout/_navbar.scss +380 -0
- package/assets/styles/layout/_page.scss +169 -0
- package/assets/styles/layout/_root.scss +72 -0
- package/assets/styles/mixins/_functions.scss +43 -0
- package/assets/styles/mixins/_mixins.scss +68 -0
- package/assets/styles/ui/_accordion.scss +24 -0
- package/assets/styles/ui/_alerts.scss +59 -0
- package/assets/styles/ui/_avatars.scss +118 -0
- package/assets/styles/ui/_badges.scss +79 -0
- package/assets/styles/ui/_breadcrumbs.scss +50 -0
- package/assets/styles/ui/_button-group.scss +16 -0
- package/assets/styles/ui/_buttons.scss +265 -0
- package/assets/styles/ui/_calendars.scss +104 -0
- package/assets/styles/ui/_cards.scss +586 -0
- package/assets/styles/ui/_carousel.scss +68 -0
- package/assets/styles/ui/_charts.scss +61 -0
- package/assets/styles/ui/_chips.scss +0 -0
- package/assets/styles/ui/_close.scss +7 -0
- package/assets/styles/ui/_datagrid.scss +17 -0
- package/assets/styles/ui/_dropdowns.scss +117 -0
- package/assets/styles/ui/_empty.scss +65 -0
- package/assets/styles/ui/_flags.scss +31 -0
- package/assets/styles/ui/_forms.scss +224 -0
- package/assets/styles/ui/_grid.scss +115 -0
- package/assets/styles/ui/_icons.scss +72 -0
- package/assets/styles/ui/_images.scss +15 -0
- package/assets/styles/ui/_legend.scss +12 -0
- package/assets/styles/ui/_lists.scss +127 -0
- package/assets/styles/ui/_loaders.scss +72 -0
- package/assets/styles/ui/_login.scss +3 -0
- package/assets/styles/ui/_markdown.scss +42 -0
- package/assets/styles/ui/_modals.scss +67 -0
- package/assets/styles/ui/_nav.scss +92 -0
- package/assets/styles/ui/_offcanvas.scss +17 -0
- package/assets/styles/ui/_pagination.scss +56 -0
- package/assets/styles/ui/_payments.scss +28 -0
- package/assets/styles/ui/_placeholder.scss +9 -0
- package/assets/styles/ui/_popovers.scss +2 -0
- package/assets/styles/ui/_progress.scss +107 -0
- package/assets/styles/ui/_ribbons.scss +156 -0
- package/assets/styles/ui/_stars.scss +13 -0
- package/assets/styles/ui/_status.scss +163 -0
- package/assets/styles/ui/_steps.scss +152 -0
- package/assets/styles/ui/_switch-icon.scss +211 -0
- package/assets/styles/ui/_tables.scss +150 -0
- package/assets/styles/ui/_tags.scss +57 -0
- package/assets/styles/ui/_timeline.scss +61 -0
- package/assets/styles/ui/_toasts.scss +19 -0
- package/assets/styles/ui/_toolbar.scss +10 -0
- package/assets/styles/ui/_tracking.scss +29 -0
- package/assets/styles/ui/_type.scss +169 -0
- package/assets/styles/ui/forms/_form-check.scss +91 -0
- package/assets/styles/ui/forms/_form-colorinput.scss +54 -0
- package/assets/styles/ui/forms/_form-custom.scss +28 -0
- package/assets/styles/ui/forms/_form-icon.scss +35 -0
- package/assets/styles/ui/forms/_form-imagecheck.scss +104 -0
- package/assets/styles/ui/forms/_form-selectgroup.scss +153 -0
- package/assets/styles/ui/forms/_validation.scss +13 -0
- package/assets/styles/ui/typo/_hr.scss +74 -0
- package/assets/styles/utils/_background.scss +15 -0
- package/assets/styles/utils/_colors.scss +40 -0
- package/assets/styles/utils/_opacity.scss +7 -0
- package/assets/styles/utils/_scroll.scss +47 -0
- package/assets/styles/utils/_shadow.scss +17 -0
- package/assets/styles/utils/_sizing.scss +10 -0
- package/assets/styles/utils/_text.scss +15 -0
- package/button/ng-package.json +7 -0
- package/button/src/button.component.html +8 -0
- package/button/src/button.component.scss +5 -0
- package/button/src/button.component.spec.ts +23 -0
- package/button/src/button.component.ts +154 -0
- package/button/src/index.ts +1 -0
- package/button/src/public-api.ts +2 -0
- package/button/src/upd-button.module.ts +17 -0
- package/card/ng-package.json +7 -0
- package/card/src/card.component.html +105 -0
- package/card/src/card.component.scss +47 -0
- package/card/src/card.component.spec.ts +23 -0
- package/card/src/card.component.ts +112 -0
- package/card/src/directives/card-actions.directive.spec.ts +8 -0
- package/card/src/directives/card-actions.directive.ts +11 -0
- package/card/src/directives/card-footer.directive.spec.ts +8 -0
- package/card/src/directives/card-footer.directive.ts +11 -0
- package/card/src/directives/card-header.directive.spec.ts +8 -0
- package/card/src/directives/card-header.directive.ts +11 -0
- package/card/src/directives/card-image.directive.spec.ts +8 -0
- package/card/src/directives/card-image.directive.ts +11 -0
- package/card/src/directives/public-api.ts +4 -0
- package/card/src/index.ts +1 -0
- package/card/src/public-api.ts +3 -0
- package/card/src/types/card-state.type.ts +1 -0
- package/card/src/types/card-style.type.ts +1 -0
- package/card/src/types/hover-effect.type.ts +1 -0
- package/card/src/types/public-api.ts +5 -0
- package/card/src/types/ribbon-style.type.ts +1 -0
- package/card/src/types/status-position.type.ts +1 -0
- package/card/src/upd-card.module.ts +32 -0
- package/dropdown/ng-package.json +7 -0
- package/dropdown/src/dropdown.component.html +32 -0
- package/dropdown/src/dropdown.component.scss +19 -0
- package/dropdown/src/dropdown.component.spec.ts +23 -0
- package/dropdown/src/dropdown.component.ts +182 -0
- package/dropdown/src/index.ts +1 -0
- package/dropdown/src/models/dropdown-item.ts +22 -0
- package/dropdown/src/models/dropdown-item.type.ts +1 -0
- package/dropdown/src/models/public-api.ts +2 -0
- package/dropdown/src/public-api.ts +3 -0
- package/dropdown/src/upd-dropdown.module.ts +25 -0
- package/form/ng-package.json +7 -0
- package/form/src/form.module.ts +10 -0
- package/form/src/index.ts +1 -0
- package/form/src/public-api.ts +1 -0
- package/form-controls/checkbox/ng-package.json +7 -0
- package/form-controls/checkbox/src/checkbox.component.html +7 -0
- package/form-controls/checkbox/src/checkbox.component.scss +0 -0
- package/form-controls/checkbox/src/checkbox.component.spec.ts +23 -0
- package/form-controls/checkbox/src/checkbox.component.ts +48 -0
- package/form-controls/checkbox/src/index.ts +1 -0
- package/form-controls/checkbox/src/public-api.ts +3 -0
- package/form-controls/checkbox/src/upd-checkbox.module.ts +19 -0
- package/form-controls/input/ng-package.json +7 -0
- package/form-controls/input/src/directives/input-append.directive.spec.ts +8 -0
- package/form-controls/input/src/directives/input-append.directive.ts +11 -0
- package/form-controls/input/src/directives/input-prepend.directive.spec.ts +8 -0
- package/form-controls/input/src/directives/input-prepend.directive.ts +11 -0
- package/form-controls/input/src/directives/public-api.ts +2 -0
- package/form-controls/input/src/index.ts +1 -0
- package/form-controls/input/src/input.component.html +82 -0
- package/form-controls/input/src/input.component.scss +13 -0
- package/form-controls/input/src/input.component.spec.ts +23 -0
- package/form-controls/input/src/input.component.ts +124 -0
- package/form-controls/input/src/public-api.ts +4 -0
- package/form-controls/input/src/types/input.type.ts +1 -0
- package/form-controls/input/src/types/loader-position.type.ts +1 -0
- package/form-controls/input/src/types/public-api.ts +2 -0
- package/form-controls/input/src/upd-input.module.ts +29 -0
- package/form-controls/radio/ng-package.json +7 -0
- package/form-controls/radio/src/index.ts +1 -0
- package/form-controls/radio/src/public-api.ts +2 -0
- package/form-controls/radio/src/radio.component.html +7 -0
- package/form-controls/radio/src/radio.component.scss +0 -0
- package/form-controls/radio/src/radio.component.spec.ts +23 -0
- package/form-controls/radio/src/radio.component.ts +47 -0
- package/form-controls/radio/src/upd-radio.module.ts +17 -0
- package/form-controls/select/ng-package.json +7 -0
- package/form-controls/select/src/components/multiple/select-multiple.component.html +41 -0
- package/form-controls/select/src/components/multiple/select-multiple.component.scss +6 -0
- package/form-controls/select/src/components/multiple/select-multiple.component.spec.ts +21 -0
- package/form-controls/select/src/components/multiple/select-multiple.component.ts +69 -0
- package/form-controls/select/src/components/shared.scss +40 -0
- package/form-controls/select/src/components/single/select.component.html +53 -0
- package/form-controls/select/src/components/single/select.component.scss +3 -0
- package/form-controls/select/src/components/single/select.component.spec.ts +23 -0
- package/form-controls/select/src/components/single/select.component.ts +58 -0
- package/form-controls/select/src/index.ts +1 -0
- package/form-controls/select/src/models/abstractions/base-select.component.ts +259 -0
- package/form-controls/select/src/models/public-api.ts +1 -0
- package/form-controls/select/src/models/select-item.ts +26 -0
- package/form-controls/select/src/public-api.ts +4 -0
- package/form-controls/select/src/upd-select.module.ts +32 -0
- package/form-controls/textarea/ng-package.json +7 -0
- package/form-controls/textarea/src/index.ts +1 -0
- package/form-controls/textarea/src/public-api.ts +2 -0
- package/form-controls/textarea/src/textarea.component.html +8 -0
- package/form-controls/textarea/src/textarea.component.scss +0 -0
- package/form-controls/textarea/src/textarea.component.spec.ts +23 -0
- package/form-controls/textarea/src/textarea.component.ts +47 -0
- package/form-controls/textarea/src/upd-textarea.module.ts +17 -0
- package/form-controls/time-picker/ng-package.json +7 -0
- package/form-controls/time-picker/src/assets/i18n/en.json +5 -0
- package/form-controls/time-picker/src/assets/i18n/pt.json +5 -0
- package/form-controls/time-picker/src/index.ts +1 -0
- package/form-controls/time-picker/src/public-api.ts +3 -0
- package/form-controls/time-picker/src/time-picker.component.html +17 -0
- package/form-controls/time-picker/src/time-picker.component.scss +10 -0
- package/form-controls/time-picker/src/time-picker.component.spec.ts +21 -0
- package/form-controls/time-picker/src/time-picker.component.ts +110 -0
- package/form-controls/time-picker/src/time-selector/time-selector.component.html +44 -0
- package/form-controls/time-picker/src/time-selector/time-selector.component.scss +47 -0
- package/form-controls/time-picker/src/time-selector/time-selector.component.spec.ts +21 -0
- package/form-controls/time-picker/src/time-selector/time-selector.component.ts +107 -0
- package/form-controls/time-picker/src/upd-time-picker.module.ts +39 -0
- package/layout/ng-package.json +7 -0
- package/layout/src/abstractions/base-page.component.ts +21 -0
- package/layout/src/abstractions/public-api.ts +1 -0
- package/layout/src/assets/i18n/en.json +5 -0
- package/layout/src/assets/i18n/pt.json +5 -0
- package/layout/src/index.ts +1 -0
- package/layout/src/layouts/blank-layout/blank-layout.component.html +1 -0
- package/layout/src/layouts/blank-layout/blank-layout.component.scss +0 -0
- package/layout/src/layouts/blank-layout/blank-layout.component.spec.ts +23 -0
- package/layout/src/layouts/blank-layout/blank-layout.component.ts +10 -0
- package/layout/src/layouts/blank-layout/blank-layout.module.ts +17 -0
- package/layout/src/layouts/public-api.ts +4 -0
- package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.html +14 -0
- package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.scss +0 -0
- package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.spec.ts +23 -0
- package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.ts +31 -0
- package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.ts +52 -0
- package/layout/src/models/public-api.ts +1 -0
- package/layout/src/models/upd-layout-config.model.ts +71 -0
- package/layout/src/models/upd-layout.config.ts +37 -0
- package/layout/src/pages/auth-flow/auth-flow-routing.module.ts +21 -0
- package/layout/src/pages/auth-flow/auth-flow.module.ts +29 -0
- package/layout/src/pages/auth-flow/logged-out/logged-out.component.html +1 -0
- package/layout/src/pages/auth-flow/logged-out/logged-out.component.scss +0 -0
- package/layout/src/pages/auth-flow/logged-out/logged-out.component.spec.ts +23 -0
- package/layout/src/pages/auth-flow/logged-out/logged-out.component.ts +10 -0
- package/layout/src/pages/auth-flow/login/login.component.html +96 -0
- package/layout/src/pages/auth-flow/login/login.component.scss +0 -0
- package/layout/src/pages/auth-flow/login/login.component.spec.ts +23 -0
- package/layout/src/pages/auth-flow/login/login.component.ts +26 -0
- package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.html +1 -0
- package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.scss +0 -0
- package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.spec.ts +23 -0
- package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.ts +10 -0
- package/layout/src/pages/auth-flow/public-api.ts +5 -0
- package/layout/src/pages/public-api.ts +1 -0
- package/layout/src/partials/footer/footer-copyright.directive.spec.ts +8 -0
- package/layout/src/partials/footer/footer-copyright.directive.ts +9 -0
- package/layout/src/partials/footer/footer.component.html +30 -0
- package/layout/src/partials/footer/footer.component.scss +0 -0
- package/{src/lib/components.component.spec.ts → layout/src/partials/footer/footer.component.spec.ts} +6 -6
- package/layout/src/partials/footer/footer.component.ts +73 -0
- package/layout/src/partials/footer/public-api.ts +2 -0
- package/layout/src/partials/header/header-style.type.ts +1 -0
- package/layout/src/partials/header/header.component.html +163 -0
- package/layout/src/partials/header/header.component.scss +0 -0
- package/layout/src/partials/header/header.component.spec.ts +23 -0
- package/layout/src/partials/header/header.component.ts +86 -0
- package/layout/src/partials/header/public-api.ts +2 -0
- package/layout/src/partials/page-header/page-header.component.html +19 -0
- package/layout/src/partials/page-header/page-header.component.scss +0 -0
- package/layout/src/partials/page-header/page-header.component.spec.ts +23 -0
- package/layout/src/partials/page-header/page-header.component.ts +11 -0
- package/layout/src/partials/page-header/public-api.ts +1 -0
- package/layout/src/partials/public-api.ts +4 -0
- package/layout/src/partials/sidebar/public-api.ts +1 -0
- package/layout/src/partials/sidebar/sidebar.component.html +62 -0
- package/layout/src/partials/sidebar/sidebar.component.scss +0 -0
- package/layout/src/partials/sidebar/sidebar.component.spec.ts +23 -0
- package/layout/src/partials/sidebar/sidebar.component.ts +161 -0
- package/layout/src/public-api.ts +7 -0
- package/layout/src/services/public-api.ts +1 -0
- package/{src/lib/components.service.spec.ts → layout/src/services/upd-layout-config.service.spec.ts} +4 -4
- package/layout/src/services/upd-layout-config.service.ts +20 -0
- package/layout/src/tools/layout.constants.ts +18 -0
- package/layout/src/upd-layout.module.ts +34 -0
- package/link/ng-package.json +7 -0
- package/link/src/index.ts +1 -0
- package/link/src/link.component.html +3 -0
- package/link/src/link.component.scss +3 -0
- package/link/src/link.component.spec.ts +23 -0
- package/link/src/link.component.ts +48 -0
- package/link/src/public-api.ts +3 -0
- package/link/src/target.type.ts +1 -0
- package/link/src/upd-link.module.ts +17 -0
- package/list/ng-package.json +7 -0
- package/list/src/assets/i18n/en.json +5 -0
- package/list/src/assets/i18n/pt.json +5 -0
- package/list/src/index.ts +1 -0
- package/list/src/list.component.html +58 -0
- package/list/src/list.component.scss +21 -0
- package/list/src/list.component.spec.ts +23 -0
- package/list/src/list.component.ts +147 -0
- package/list/src/models/badge-position.type.ts +1 -0
- package/list/src/models/list-item.model.ts +35 -0
- package/list/src/models/list-item.ts +21 -0
- package/list/src/models/public-api.ts +2 -0
- package/list/src/public-api.ts +3 -0
- package/list/src/upd-list.module.ts +30 -0
- package/ng-package.json +9 -6
- package/package.json +8 -5
- package/popover/ng-package.json +7 -0
- package/popover/src/index.ts +1 -0
- package/popover/src/popover.component.html +20 -0
- package/popover/src/popover.component.scss +8 -0
- package/popover/src/popover.component.spec.ts +23 -0
- package/popover/src/popover.component.ts +53 -0
- package/popover/src/popover.directive.spec.ts +8 -0
- package/popover/src/popover.directive.ts +128 -0
- package/popover/src/public-api.ts +3 -0
- package/popover/src/upd-popover.module.ts +20 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/public-api.ts +2 -0
- package/src/lib/types/component-size.type.ts +1 -0
- package/src/lib/types/public-api.ts +2 -0
- package/src/lib/types/validation-status.type.ts +1 -0
- package/src/lib/upd-components.module.ts +6 -0
- package/src/public-api.ts +1 -7
- package/tsconfig.lib.json +11 -11
- package/src/lib/components.component.ts +0 -14
- package/src/lib/components.module.ts +0 -17
- package/src/lib/components.service.ts +0 -9
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<h6 *ngIf="!!header" class="dropdown-header">{{header}}</h6>
|
|
2
|
+
|
|
3
|
+
<ng-container *ngFor="let item of items">
|
|
4
|
+
<ng-container [ngSwitch]="item.type">
|
|
5
|
+
<ng-container *ngSwitchCase="'divider'">
|
|
6
|
+
<div class="dropdown-divider"></div>
|
|
7
|
+
</ng-container>
|
|
8
|
+
<ng-container *ngSwitchCase="'default'">
|
|
9
|
+
<upd-button [customClasses]="'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')"
|
|
10
|
+
[shouldIgnoreBtnClass]="true" (clicked)="onSelect(item)">
|
|
11
|
+
<upd-icon *ngIf="!!item.icon" [model]="item.icon" customClasses="dropdown-item-icon"></upd-icon>
|
|
12
|
+
<ng-container *ngIf="!!item.leftBoxText || !!item.leftBoxImage">
|
|
13
|
+
<span style="background-image: url({{item.leftBoxImage}})"
|
|
14
|
+
class="avatar avatar-xs rounded me-2">{{item.leftBoxText}}</span>
|
|
15
|
+
</ng-container>
|
|
16
|
+
{{item.text}}
|
|
17
|
+
<span *ngIf="!!item.badgeColor" class="badge bg-{{item.badgeColor}} ms-auto">{{item.badgeText}}</span>
|
|
18
|
+
</upd-button>
|
|
19
|
+
</ng-container>
|
|
20
|
+
<ng-container *ngSwitchCase="'radio'">
|
|
21
|
+
<upd-radio (selected)="onSelect(item)" [label]="item.text" [isChecked]="item.isChecked || false"
|
|
22
|
+
[wrapperClasses]="'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')"></upd-radio>
|
|
23
|
+
</ng-container>
|
|
24
|
+
<ng-container *ngSwitchCase="'checkbox'">
|
|
25
|
+
<upd-checkbox (changed)="onCheckboxChange(item, $event)" [label]="item.text" [isChecked]="item.isChecked || false"
|
|
26
|
+
[isSwitch]="item.isSwitch || false"
|
|
27
|
+
[wrapperClasses]="'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')"></upd-checkbox>
|
|
28
|
+
</ng-container>
|
|
29
|
+
</ng-container>
|
|
30
|
+
</ng-container>
|
|
31
|
+
|
|
32
|
+
<ng-content></ng-content>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.dropdown-show {
|
|
2
|
+
display: inline-block !important;
|
|
3
|
+
width: 100% !important;
|
|
4
|
+
position: relative;
|
|
5
|
+
top: 0 !important;
|
|
6
|
+
margin-bottom: 1rem !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dropdown-item > .form-check {
|
|
10
|
+
margin-bottom: 0 !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dropdown-item {
|
|
14
|
+
cursor: pointer !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dropdown-overflow {
|
|
18
|
+
overflow-y: auto !important;
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { DropdownComponent } from './dropdown.component';
|
|
4
|
+
|
|
5
|
+
describe('DropdownComponent', () => {
|
|
6
|
+
let component: DropdownComponent;
|
|
7
|
+
let fixture: ComponentFixture<DropdownComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ DropdownComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(DropdownComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
HostBinding,
|
|
4
|
+
ViewEncapsulation,
|
|
5
|
+
Input,
|
|
6
|
+
OnInit,
|
|
7
|
+
OnChanges,
|
|
8
|
+
SimpleChanges,
|
|
9
|
+
Output,
|
|
10
|
+
EventEmitter,
|
|
11
|
+
NgZone,
|
|
12
|
+
ElementRef,
|
|
13
|
+
Renderer2,
|
|
14
|
+
RendererStyleFlags2,
|
|
15
|
+
inject
|
|
16
|
+
} from '@angular/core';
|
|
17
|
+
import { BaseComponent, PositioningService, ComputePositionResult, DomEventsService } from '@updevs/sdk/layout';
|
|
18
|
+
import { TopBottomLeftRightType } from '@updevs/sdk/types';
|
|
19
|
+
|
|
20
|
+
import { DropdownItem } from './models/dropdown-item';
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
selector: 'upd-dropdown',
|
|
24
|
+
templateUrl: './dropdown.component.html',
|
|
25
|
+
styleUrls: ['./dropdown.component.scss'],
|
|
26
|
+
encapsulation: ViewEncapsulation.None
|
|
27
|
+
})
|
|
28
|
+
export class DropdownComponent extends BaseComponent implements OnInit, OnChanges {
|
|
29
|
+
@HostBinding('class') localWrapperClasses = '';
|
|
30
|
+
|
|
31
|
+
@Input() items: DropdownItem[] = [];
|
|
32
|
+
@Input() header?: string;
|
|
33
|
+
@Input()
|
|
34
|
+
set isOpen(value: boolean) {
|
|
35
|
+
this.updateOpenState(value);
|
|
36
|
+
|
|
37
|
+
if (this.shouldCloseOnOutsideClick) {
|
|
38
|
+
this.closeOnOutsideClick();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
@Input() shouldCloseOnOutsideClick = false;
|
|
42
|
+
@Input() arrowType?: 'left' | 'right';
|
|
43
|
+
@Input() wrapperClasses = '';
|
|
44
|
+
/**
|
|
45
|
+
* Elements that won't trigger the close of the dropdown if clicked upon.
|
|
46
|
+
* Only works when `shouldCloseOnOutsideClick` is set to true.
|
|
47
|
+
*/
|
|
48
|
+
@Input() elementsExcludedFromOutsideClick?: HTMLElement[];
|
|
49
|
+
/**
|
|
50
|
+
* Maximum height of the component.
|
|
51
|
+
* If set, scroll bars will be used when the content's size is bigger than the component's.
|
|
52
|
+
*/
|
|
53
|
+
@Input() maxHeight?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Maximum width of the component.
|
|
56
|
+
* If set, scroll bars will be used when the content's size is bigger than the component's.
|
|
57
|
+
*/
|
|
58
|
+
@Input() maxWidth?: number;
|
|
59
|
+
/**
|
|
60
|
+
* If set, the position of the dropdown will be set according to this element.
|
|
61
|
+
*/
|
|
62
|
+
@Input() dropdownReference?: ElementRef;
|
|
63
|
+
/**
|
|
64
|
+
* If a reference is provided, this will be the position of the dropdown in relation to that reference.
|
|
65
|
+
*/
|
|
66
|
+
@Input() dropdownReferencePosition: TopBottomLeftRightType = 'bottom';
|
|
67
|
+
|
|
68
|
+
@Output() readonly isOpenChange = new EventEmitter<boolean>();
|
|
69
|
+
@Output() readonly selectedItem = new EventEmitter<DropdownItem>();
|
|
70
|
+
@Output() readonly checkboxChanged = new EventEmitter<DropdownItem>();
|
|
71
|
+
|
|
72
|
+
get isOpen(): boolean {
|
|
73
|
+
return this._isOpen;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private baseWrapperClasses = 'dropdown-menu';
|
|
77
|
+
private _isOpen = false;
|
|
78
|
+
private readonly dropdownElement: HTMLElement;
|
|
79
|
+
private readonly ngZone = inject(NgZone);
|
|
80
|
+
private readonly elementRef = inject(ElementRef);
|
|
81
|
+
private readonly renderer = inject(Renderer2);
|
|
82
|
+
private readonly positioningService = inject(PositioningService);
|
|
83
|
+
private readonly domEventsService = inject(DomEventsService);
|
|
84
|
+
|
|
85
|
+
constructor() {
|
|
86
|
+
super();
|
|
87
|
+
this.dropdownElement = this.elementRef.nativeElement;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
ngOnInit(): void {
|
|
91
|
+
this.updateStyle();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
95
|
+
this.updateStyle();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
onSelect(item: DropdownItem): void {
|
|
99
|
+
this.selectedItem.emit(item);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
onCheckboxChange(item: DropdownItem, isChecked: boolean): void {
|
|
103
|
+
item.isChecked = isChecked;
|
|
104
|
+
this.checkboxChanged.emit(item);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
private closeOnOutsideClick(): void {
|
|
108
|
+
const excludedElements = [];
|
|
109
|
+
|
|
110
|
+
if (!!this.dropdownReference) {
|
|
111
|
+
excludedElements.push(this.dropdownReference.nativeElement);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const outsideClickSub = this.domEventsService.startOutsideClickListener(
|
|
115
|
+
() => this.ngZone.run(() => {
|
|
116
|
+
this.updateOpenState(false);
|
|
117
|
+
this.ngZone.run(() => this.updateWrapperClasses());
|
|
118
|
+
}),
|
|
119
|
+
this.dropdownElement,
|
|
120
|
+
true,
|
|
121
|
+
...excludedElements
|
|
122
|
+
);
|
|
123
|
+
this.addSubscriptions(outsideClickSub);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private updateStyle(): void {
|
|
127
|
+
this.updateWrapperClasses();
|
|
128
|
+
this.updateMaxHeight();
|
|
129
|
+
this.startPositionUpdate();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private updateWrapperClasses(): void {
|
|
133
|
+
this.localWrapperClasses = this.baseWrapperClasses + ' ' + this.wrapperClasses;
|
|
134
|
+
|
|
135
|
+
if (this.isOpen) {
|
|
136
|
+
this.localWrapperClasses += ' dropdown-show';
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (!!this.arrowType) {
|
|
140
|
+
this.localWrapperClasses += ' dropdown-menu-arrow' + (this.arrowType === 'right' ? ' dropdown-menu-end' : '');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (!!this.maxHeight) {
|
|
144
|
+
this.localWrapperClasses += ' dropdown-overflow';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
private updateOpenState(isOpen: boolean): void {
|
|
149
|
+
this._isOpen = isOpen;
|
|
150
|
+
this.isOpenChange.emit(isOpen);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private updateMaxHeight(): void {
|
|
154
|
+
this.renderer.setStyle(this.dropdownElement, 'max-height', `${this.maxHeight}px`, RendererStyleFlags2.Important);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
private startPositionUpdate(): void {
|
|
158
|
+
if (!this.dropdownReference) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
this.ngZone.runOutsideAngular(() =>
|
|
163
|
+
this.positioningService
|
|
164
|
+
.computePosition(this.dropdownReference!, this.elementRef, { placement: this.dropdownReferencePosition })
|
|
165
|
+
.subscribe(resp => this.updatePosition(resp))
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private updatePosition(result: ComputePositionResult): void {
|
|
170
|
+
const reference = this.dropdownReference!.nativeElement.getBoundingClientRect();
|
|
171
|
+
const ddElement = this.dropdownElement;
|
|
172
|
+
|
|
173
|
+
if (!!this.maxWidth) {
|
|
174
|
+
this.renderer.setStyle(ddElement, 'max-width', `${this.maxWidth}px`, RendererStyleFlags2.Important);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
this.renderer.setStyle(ddElement, 'position', result.strategy, RendererStyleFlags2.Important);
|
|
178
|
+
this.renderer.setStyle(ddElement, 'width', `${Math.abs(reference.width)}px`, RendererStyleFlags2.Important);
|
|
179
|
+
this.renderer.setStyle(ddElement, 'left', `${result.x}px`, RendererStyleFlags2.Important);
|
|
180
|
+
this.renderer.setStyle(ddElement, 'top', `${result.y}px`, RendererStyleFlags2.Important);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BgColorStyleType } from '@updevs/sdk/layout';
|
|
2
|
+
import { IconModel } from '@updevs/icons';
|
|
3
|
+
|
|
4
|
+
import { DropdownItemType } from './dropdown-item.type';
|
|
5
|
+
|
|
6
|
+
export interface DropdownItem {
|
|
7
|
+
id?: any;
|
|
8
|
+
text?: string;
|
|
9
|
+
icon?: IconModel;
|
|
10
|
+
type: DropdownItemType;
|
|
11
|
+
/**
|
|
12
|
+
* If type is checkbox, and this is set, the switch style will be used.
|
|
13
|
+
*/
|
|
14
|
+
isSwitch?: boolean;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
isActive?: boolean;
|
|
17
|
+
leftBoxText?: string;
|
|
18
|
+
leftBoxImage?: string;
|
|
19
|
+
badgeColor?: BgColorStyleType;
|
|
20
|
+
badgeText?: string;
|
|
21
|
+
isChecked?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DropdownItemType = 'default' | 'radio' | 'checkbox' | 'divider';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { UpdIconsModule } from '@updevs/icons';
|
|
4
|
+
import { UpdButtonModule } from '@updevs/components/button';
|
|
5
|
+
import { UpdRadioModule } from '@updevs/components/form-controls/radio';
|
|
6
|
+
import { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';
|
|
7
|
+
|
|
8
|
+
import { DropdownComponent } from './dropdown.component';
|
|
9
|
+
|
|
10
|
+
@NgModule({
|
|
11
|
+
imports: [
|
|
12
|
+
CommonModule,
|
|
13
|
+
UpdIconsModule,
|
|
14
|
+
UpdRadioModule,
|
|
15
|
+
UpdCheckboxModule,
|
|
16
|
+
UpdButtonModule
|
|
17
|
+
],
|
|
18
|
+
declarations: [
|
|
19
|
+
DropdownComponent
|
|
20
|
+
],
|
|
21
|
+
exports: [
|
|
22
|
+
DropdownComponent
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
export class UpdDropdownModule {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './form.module';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<label class="form-check" [class.form-check-inline]="isInline" [class.form-switch]="isSwitch">
|
|
2
|
+
<input type="checkbox" (change)="changed.emit(isChecked)" [disabled]="isDisabled" [ngClass]="classes" [value]="value"
|
|
3
|
+
[attr.name]="name" [attr.readonly]="isReadOnly ? '' : undefined" [(ngModel)]="isChecked">
|
|
4
|
+
<span *ngIf="!!label" class="form-check-label">{{label}}</span>
|
|
5
|
+
<span *ngIf="!!description" class="form-check-description">{{description}}</span>
|
|
6
|
+
<div *ngIf="validationStatus === 'invalid' && !!invalidStatusText" class="invalid-feedback">{{invalidStatusText}}</div>
|
|
7
|
+
</label>
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CheckboxComponent } from './checkbox.component';
|
|
4
|
+
|
|
5
|
+
describe('CheckboxComponent', () => {
|
|
6
|
+
let component: CheckboxComponent;
|
|
7
|
+
let fixture: ComponentFixture<CheckboxComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ CheckboxComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CheckboxComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Component, SimpleChanges, Input, OnInit, OnChanges, ViewEncapsulation, HostBinding, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { ValidationStatusType } from '@updevs/components';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'upd-checkbox',
|
|
6
|
+
templateUrl: './checkbox.component.html',
|
|
7
|
+
styleUrls: ['./checkbox.component.scss'],
|
|
8
|
+
encapsulation: ViewEncapsulation.None
|
|
9
|
+
})
|
|
10
|
+
export class CheckboxComponent implements OnInit, OnChanges {
|
|
11
|
+
@HostBinding('class') @Input() wrapperClasses = '';
|
|
12
|
+
|
|
13
|
+
@Input() label?: string;
|
|
14
|
+
@Input() value?: any;
|
|
15
|
+
@Input() customClasses?: string;
|
|
16
|
+
@Input() name?: string;
|
|
17
|
+
@Input() description?: string;
|
|
18
|
+
@Input() isDisabled = false;
|
|
19
|
+
@Input() isReadOnly = false;
|
|
20
|
+
@Input() isChecked = false;
|
|
21
|
+
@Input() isInline = false;
|
|
22
|
+
@Input() isSwitch = false;
|
|
23
|
+
@Input() validationStatus?: ValidationStatusType;
|
|
24
|
+
@Input() invalidStatusText?: string;
|
|
25
|
+
|
|
26
|
+
@Output() readonly changed = new EventEmitter<boolean>();
|
|
27
|
+
|
|
28
|
+
classes: string[] = [];
|
|
29
|
+
|
|
30
|
+
ngOnInit(): void {
|
|
31
|
+
this.updateClasses();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
35
|
+
this.updateClasses();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private updateClasses(): void {
|
|
39
|
+
const lClasses: string[] = ['form-check-input'];
|
|
40
|
+
|
|
41
|
+
if (!!this.validationStatus) {
|
|
42
|
+
const statusCls = `is-${this.validationStatus}`;
|
|
43
|
+
lClasses.push(statusCls);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
this.classes = [...lClasses, ...(this.customClasses || '').split(' ')];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
import { CheckboxComponent } from './checkbox.component';
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
imports: [
|
|
9
|
+
CommonModule,
|
|
10
|
+
FormsModule
|
|
11
|
+
],
|
|
12
|
+
declarations: [
|
|
13
|
+
CheckboxComponent
|
|
14
|
+
],
|
|
15
|
+
exports: [
|
|
16
|
+
CheckboxComponent
|
|
17
|
+
]
|
|
18
|
+
})
|
|
19
|
+
export class UpdCheckboxModule {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<ng-container *ngIf="!!appendTemplate || !!prependTemplate; else structureTpl">
|
|
2
|
+
<ng-template [ngTemplateOutlet]="labelTpl"></ng-template>
|
|
3
|
+
<div class="input-group" [class.input-group-flat]="isInputGroupFlat">
|
|
4
|
+
<ng-container *ngIf="!!prependTemplate">
|
|
5
|
+
<div *ngIf="!isPrependButton" class="input-group-text">
|
|
6
|
+
<ng-template [ngTemplateOutlet]="prependTemplate.templateRef"></ng-template>
|
|
7
|
+
</div>
|
|
8
|
+
<ng-template *ngIf="isPrependButton" [ngTemplateOutlet]="prependTemplate.templateRef"></ng-template>
|
|
9
|
+
</ng-container>
|
|
10
|
+
<ng-template [ngTemplateOutlet]="inputTpl"></ng-template>
|
|
11
|
+
<ng-container *ngIf="!!appendTemplate">
|
|
12
|
+
<div *ngIf="!isAppendButton" class="input-group-text">
|
|
13
|
+
<ng-template [ngTemplateOutlet]="appendTemplate.templateRef"></ng-template>
|
|
14
|
+
</div>
|
|
15
|
+
<ng-template *ngIf="isAppendButton" [ngTemplateOutlet]="appendTemplate.templateRef"></ng-template>
|
|
16
|
+
</ng-container>
|
|
17
|
+
</div>
|
|
18
|
+
</ng-container>
|
|
19
|
+
|
|
20
|
+
<ng-template #structureTpl>
|
|
21
|
+
<ng-template *ngIf="!!prependIconModel || !!appendIconModel || isLoading; else inputTpl" [ngTemplateOutlet]="inputIconTpl"></ng-template>
|
|
22
|
+
</ng-template>
|
|
23
|
+
|
|
24
|
+
<ng-template #inputTpl>
|
|
25
|
+
<ng-container *ngIf="(!hint && !hintTemplate); else hintTpl">
|
|
26
|
+
<ng-template *ngIf="shouldDisplayInnerLabel && !isFloating" [ngTemplateOutlet]="labelTpl"></ng-template>
|
|
27
|
+
<ng-template [ngTemplateOutlet]="basicInputTpl"></ng-template>
|
|
28
|
+
<ng-template *ngIf="shouldDisplayInnerLabel && isFloating" [ngTemplateOutlet]="labelTpl"></ng-template>
|
|
29
|
+
</ng-container>
|
|
30
|
+
</ng-template>
|
|
31
|
+
|
|
32
|
+
<ng-template #inputIconTpl>
|
|
33
|
+
<ng-template [ngTemplateOutlet]="labelTpl"></ng-template>
|
|
34
|
+
<div class="input-icon">
|
|
35
|
+
<span *ngIf="!!prependIconModel || (isLoading && loaderPosition === 'prepend')" class="input-icon-addon">
|
|
36
|
+
<ng-container *ngIf="!!prependIconModel; else loaderTpl">
|
|
37
|
+
<upd-icon [model]="prependIconModel"></upd-icon>
|
|
38
|
+
</ng-container>
|
|
39
|
+
</span>
|
|
40
|
+
<ng-template [ngTemplateOutlet]="inputTpl"></ng-template>
|
|
41
|
+
<span *ngIf="!!appendIconModel || (isLoading && loaderPosition === 'append')" class="input-icon-addon">
|
|
42
|
+
<ng-container *ngIf="!!appendIconModel; else loaderTpl">
|
|
43
|
+
<upd-icon [model]="appendIconModel"></upd-icon>
|
|
44
|
+
</ng-container>
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
</ng-template>
|
|
48
|
+
|
|
49
|
+
<ng-template #hintTpl>
|
|
50
|
+
<ng-template [ngTemplateOutlet]="labelTpl"></ng-template>
|
|
51
|
+
<div class="row g-2">
|
|
52
|
+
<div class="col">
|
|
53
|
+
<ng-template [ngTemplateOutlet]="basicInputTpl"></ng-template>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="col-auto align-self-center">
|
|
56
|
+
<span class="form-help" [updPopover]="hint" [updPopoverTemplate]="hintTemplate"
|
|
57
|
+
[updPopoverActAsTooltip]="hintAsTooltip">?</span>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</ng-template>
|
|
61
|
+
|
|
62
|
+
<ng-template #loaderTpl>
|
|
63
|
+
<div class="spinner-border spinner-border-sm text-muted" role="status"></div>
|
|
64
|
+
</ng-template>
|
|
65
|
+
|
|
66
|
+
<ng-template #basicInputTpl>
|
|
67
|
+
<ng-container *ngIf="!!mask; else defaultInputTpl">
|
|
68
|
+
<input [updMask]="mask" [updMaskConfig]="maskConfig" [attr.type]="type" [attr.maxlength]="maxLength" [disabled]="isDisabled"
|
|
69
|
+
[ngClass]="classes" [placeholder]="placeholder" [value]="value || ''" [attr.name]="name"
|
|
70
|
+
[attr.readonly]="isReadOnly ? '' : undefined" (input)="onInputChange($event)"/>
|
|
71
|
+
</ng-container>
|
|
72
|
+
<ng-template #defaultInputTpl>
|
|
73
|
+
<input [attr.type]="type" [attr.maxlength]="maxLength" [disabled]="isDisabled" [ngClass]="classes"
|
|
74
|
+
[placeholder]="placeholder" [value]="value || ''" [attr.name]="name" [attr.readonly]="isReadOnly ? '' : undefined"
|
|
75
|
+
(input)="onInputChange($event)"/>
|
|
76
|
+
</ng-template>
|
|
77
|
+
<div *ngIf="validationStatus === 'invalid' && !!invalidStatusText" class="invalid-feedback">{{invalidStatusText}}</div>
|
|
78
|
+
</ng-template>
|
|
79
|
+
|
|
80
|
+
<ng-template #labelTpl>
|
|
81
|
+
<label *ngIf="!!label" class="form-label" [class.required]="isRequired">{{label}}</label>
|
|
82
|
+
</ng-template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.input-group-text .form-check > .form-check-input {
|
|
2
|
+
margin: 0 !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.input-group-text > upd-checkbox {
|
|
6
|
+
height: 16px !important; // TODO: validate if it won't break other sizes.
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.input-group-text .form-check {
|
|
10
|
+
margin: 0 !important;
|
|
11
|
+
padding-left: 0 !important;
|
|
12
|
+
min-height: 16px !important;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { InputComponent } from './input.component';
|
|
4
|
+
|
|
5
|
+
describe('InputComponent', () => {
|
|
6
|
+
let component: InputComponent;
|
|
7
|
+
let fixture: ComponentFixture<InputComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ InputComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(InputComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|