nice-elements 1.12.7 → 1.12.9
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/.vscode/settings.json +18 -18
- package/CHANGELOG.md +573 -564
- package/LICENSE.md +21 -21
- package/README.md +102 -98
- package/bower.json +17 -17
- package/dist/nice.js +11528 -9150
- package/dist/nice.min.js +1 -1
- package/dist/style.css +59 -59
- package/dist/style.css.map +3 -3
- package/dist/style.min.css +8 -8
- package/eslint.config.mjs +32 -32
- package/package.json +44 -44
- package/src/components/nice-alert/nice-alert.html +6 -6
- package/src/components/nice-alert/nice-alert.js +29 -29
- package/src/components/nice-alert/nice-alert.scss +59 -59
- package/src/components/nice-avatar/nice-avatar.js +122 -122
- package/src/components/nice-avatar/nice-avatar.scss +4 -4
- package/src/components/nice-button/nice-button.html +4 -4
- package/src/components/nice-button/nice-button.js +41 -41
- package/src/components/nice-button/nice-button.scss +16 -16
- package/src/components/nice-button-toggle/nice-button-toggle.html +9 -9
- package/src/components/nice-button-toggle/nice-button-toggle.js +23 -23
- package/src/components/nice-button-toggle/nice-button-toggle.scss +2 -2
- package/src/components/nice-calendar/nice-calendar.html +91 -91
- package/src/components/nice-calendar/nice-calendar.js +346 -346
- package/src/components/nice-calendar/nice-calendar.scss +288 -288
- package/src/components/nice-checkbox/nice-checkbox.html +9 -9
- package/src/components/nice-checkbox/nice-checkbox.js +37 -37
- package/src/components/nice-checkbox/nice-checkbox.scss +120 -120
- package/src/components/nice-choice/nice-choice.html +18 -18
- package/src/components/nice-choice/nice-choice.js +211 -211
- package/src/components/nice-choice/nice-choice.scss +110 -110
- package/src/components/nice-comment/nice-comment.html +10 -10
- package/src/components/nice-comment/nice-comment.js +71 -71
- package/src/components/nice-comment/nice-comment.scss +39 -39
- package/src/components/nice-date/nice-date.html +82 -82
- package/src/components/nice-date/nice-date.js +350 -350
- package/src/components/nice-date/nice-date.scss +305 -305
- package/src/components/nice-date-input/nice-date-input.html +56 -56
- package/src/components/nice-date-input/nice-date-input.js +143 -143
- package/src/components/nice-date-input/nice-date-input.scss +55 -55
- package/src/components/nice-date-range/nice-date-range.html +15 -15
- package/src/components/nice-date-range/nice-date-range.js +78 -78
- package/src/components/nice-date-range/nice-date-range.scss +390 -390
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +29 -29
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +89 -89
- package/src/components/nice-datetime-picker/nice-datetime-picker.scss +428 -428
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +55 -55
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +248 -248
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.scss +73 -73
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +44 -44
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +175 -175
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +127 -127
- package/src/components/nice-dropdown/nice-dropdown.html +61 -61
- package/src/components/nice-dropdown/nice-dropdown.js +517 -517
- package/src/components/nice-dropdown/nice-dropdown.scss +262 -262
- package/src/components/nice-dropdown-date/nice-dropdown-date.html +28 -28
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +132 -132
- package/src/components/nice-dropdown-date/nice-dropdown-date.scss +87 -87
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +44 -44
- package/src/components/nice-dropdown-old/nice-dropdown-old.js +330 -330
- package/src/components/nice-dropdown-old/nice-dropdown-old.scss +129 -129
- package/src/components/nice-dtp/nice-dtp.html +91 -91
- package/src/components/nice-dtp/nice-dtp.js +835 -835
- package/src/components/nice-help/nice-help.html +6 -6
- package/src/components/nice-help/nice-help.js +58 -58
- package/src/components/nice-help/nice-help.scss +78 -78
- package/src/components/nice-input/nice-input.html +47 -47
- package/src/components/nice-input/nice-input.js +251 -251
- package/src/components/nice-input/nice-input.scss +130 -130
- package/src/components/nice-label/nice-label.html +10 -10
- package/src/components/nice-label/nice-label.js +32 -32
- package/src/components/nice-loader/nice-loader.html +6 -6
- package/src/components/nice-loader/nice-loader.js +28 -28
- package/src/components/nice-loader/nice-loader.scss +47 -47
- package/src/components/nice-no-data/nice-no-data.html +3 -3
- package/src/components/nice-no-data/nice-no-data.js +27 -27
- package/src/components/nice-no-data/nice-no-data.scss +26 -26
- package/src/components/nice-notification/nice-notification.html +3 -3
- package/src/components/nice-notification/nice-notification.js +124 -124
- package/src/components/nice-notification/nice-notification.scss +66 -66
- package/src/components/nice-number/nice-number.html +40 -40
- package/src/components/nice-number/nice-number.js +172 -172
- package/src/components/nice-number/nice-number.scss +18 -18
- package/src/components/nice-on-scroll/nice-on-scroll.js +17 -17
- package/src/components/nice-percent/nice-percent.html +24 -24
- package/src/components/nice-percent/nice-percent.js +95 -95
- package/src/components/nice-pill/nice-pill.html +3 -3
- package/src/components/nice-pill/nice-pill.js +29 -29
- package/src/components/nice-pill/nice-pill.scss +25 -25
- package/src/components/nice-popup/nice-popup.html +6 -6
- package/src/components/nice-popup/nice-popup.js +122 -122
- package/src/components/nice-popup/nice-popup.scss +43 -43
- package/src/components/nice-progress-bar/nice-progress-bar.html +15 -15
- package/src/components/nice-progress-bar/nice-progress-bar.js +55 -55
- package/src/components/nice-progress-bar/nice-progress-bar.scss +47 -47
- package/src/components/nice-quantity/nice-quantity.html +22 -22
- package/src/components/nice-quantity/nice-quantity.js +57 -57
- package/src/components/nice-quantity/nice-quantity.scss +51 -51
- package/src/components/nice-search/nice-search.html +44 -44
- package/src/components/nice-search/nice-search.js +243 -243
- package/src/components/nice-search/nice-search.scss +90 -90
- package/src/components/nice-search2/nice-search2.html +32 -32
- package/src/components/nice-search2/nice-search2.js +267 -267
- package/src/components/nice-search2/nice-search2.scss +80 -80
- package/src/components/nice-slot/nice-slot.html +10 -10
- package/src/components/nice-slot/nice-slot.js +31 -31
- package/src/components/nice-steps/nice-steps.scss +81 -81
- package/src/components/nice-svgs/nice-svgs.html +1320 -1320
- package/src/components/nice-svgs/nice-svgs.js +19 -19
- package/src/components/nice-table/nice-table.html +38 -38
- package/src/components/nice-table/nice-table.js +60 -60
- package/src/components/nice-table/nice-table.scss +112 -112
- package/src/components/nice-time-picker/nice-time-picker.html +43 -43
- package/src/components/nice-time-picker/nice-time-picker.js +85 -85
- package/src/components/nice-time-picker/nice-time-picker.scss +37 -37
- package/src/components/nice-title/nice-title.html +6 -6
- package/src/components/nice-title/nice-title.js +22 -22
- package/src/components/nice-toast/nice-toast.html +2 -2
- package/src/components/nice-toast/nice-toast.js +56 -56
- package/src/components/nice-toast/nice-toast.scss +74 -74
- package/src/components/nice-toggle/nice-toggle.html +12 -12
- package/src/components/nice-toggle/nice-toggle.js +57 -57
- package/src/components/nice-toggle/nice-toggle.scss +131 -131
- package/src/components/nice-upload/nice-upload.html +22 -22
- package/src/components/nice-upload/nice-upload.js +159 -159
- package/src/components/nice-upload/nice-upload.scss +85 -85
- package/src/components/nice-view/_nice-view.scss +63 -63
- package/src/components/nice-view/nice-view.html +12 -12
- package/src/components/nice-view/nice-view.js +30 -30
- package/src/components/nice-virtual-scroll/_nice-virtual-scroll.scss +17 -17
- package/src/components/nice-virtual-scroll/nice-virtual-scroll.html +12 -12
- package/src/components/nice-virtual-scroll/nice-virtual-scroll.js +70 -70
- package/src/components/nice-wrapper/_nice-wrapper.scss +87 -87
- package/src/components/nice-wrapper/nice-wrapper.html +12 -12
- package/src/components/nice-wrapper/nice-wrapper.js +44 -44
- package/src/components/nice-yesno/nice-yesno.html +14 -14
- package/src/components/nice-yesno/nice-yesno.js +111 -111
- package/src/components/nice-yesno/nice-yesno.scss +95 -95
- package/src/{components/nice-click-outside → directives}/nice-click-outside.js +105 -105
- package/src/directives/nice-infinite-loader.js +28 -0
- package/src/{components → directives}/nice-tooltip/_nice-tooltip.scss +55 -55
- package/src/{components → directives}/nice-tooltip/nice-tooltip.js +84 -84
- package/src/filters/nice-date.js +17 -17
- package/src/filters/nice-highlight.js +16 -16
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.html +30 -30
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.js +67 -67
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.scss +19 -19
- package/src/nice.js +2 -2
- package/src/services/nice-service.js +22 -22
- package/src/styles/_bootstrap-variables.scss +178 -178
- package/src/styles/_nice-buttons.scss +612 -612
- package/src/styles/_nice-common.scss +479 -479
- package/src/styles/_nice-ngdialog.scss +85 -85
- package/src/styles/_nice-spacing.scss +283 -283
- package/src/styles/_nice.scss +75 -72
- package/src/styles/_variables.scss +194 -194
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
.nice-datetimerange-picker-2 {
|
|
2
|
-
display: block;
|
|
3
|
-
|
|
4
|
-
.input-group {
|
|
5
|
-
.form-control {
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
text-overflow: ellipsis;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&.open {}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.nice-daterange-picker-wrapper {
|
|
14
|
-
z-index: 900;
|
|
15
|
-
width: 700px;
|
|
16
|
-
max-width: 80%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.dtp-wrapper {
|
|
20
|
-
border-radius: $nice-border-radius;
|
|
21
|
-
box-shadow: $nice-box-shadow;
|
|
22
|
-
|
|
23
|
-
padding: 15px;
|
|
24
|
-
background-color: white;
|
|
25
|
-
border: 1px solid $nice-border-color;
|
|
26
|
-
display: flex;
|
|
27
|
-
|
|
28
|
-
max-height: 450px;
|
|
29
|
-
overflow: auto;
|
|
30
|
-
|
|
31
|
-
.dtp-buttons-left {
|
|
32
|
-
width: 110px;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
|
|
36
|
-
@media (max-width: $screen-md-min) {
|
|
37
|
-
width: auto;
|
|
38
|
-
|
|
39
|
-
.btn-primary {
|
|
40
|
-
min-width: auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.dtp-buttons-top,
|
|
44
|
-
.dtp-buttons-bottom {
|
|
45
|
-
display: grid;
|
|
46
|
-
grid-template-columns: repeat(2, minmax(100px, 1fr));
|
|
47
|
-
gap: 0.5rem;
|
|
48
|
-
|
|
49
|
-
.btn-block+.btn-block {
|
|
50
|
-
margin-top: 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.dtp-buttons-top {
|
|
56
|
-
flex-grow: 1;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.dtp-buttons-bottom {
|
|
60
|
-
margin-top: 5px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.dtp-left,
|
|
65
|
-
.dtp-right {
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
flex-grow: 1;
|
|
69
|
-
margin-left: 15px;
|
|
70
|
-
width: 50%;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.nice-dtp-background {
|
|
76
|
-
position: fixed;
|
|
77
|
-
top: 0;
|
|
78
|
-
left: 0;
|
|
79
|
-
width: 100%;
|
|
80
|
-
z-index: 800;
|
|
81
|
-
height: 100%;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.btn {
|
|
85
|
-
border-radius: $nice-border-radius;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.btn-primary {
|
|
89
|
-
background: $nice-base-color;
|
|
90
|
-
border-color: darken($nice-base-color, 5%);
|
|
91
|
-
|
|
92
|
-
&:hover {
|
|
93
|
-
background: darken($nice-base-color, 5%);
|
|
94
|
-
border-color: darken($nice-base-color, 5%);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&:active {
|
|
98
|
-
background: darken($nice-base-color, 10%);
|
|
99
|
-
border-color: darken($nice-base-color, 10%);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
@media (max-width: $screen-xs-max) {
|
|
105
|
-
.dtp-wrapper {
|
|
106
|
-
width: auto;
|
|
107
|
-
flex-direction: column;
|
|
108
|
-
|
|
109
|
-
.dtp-left {
|
|
110
|
-
margin-bottom: 15px;
|
|
111
|
-
margin-top: 15px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.dtp-left,
|
|
115
|
-
.dtp-right {
|
|
116
|
-
margin-left: 0;
|
|
117
|
-
width: 100%;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.btn-primary {
|
|
122
|
-
padding: 5px;
|
|
123
|
-
line-height: 1;
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
min-width: 300px;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
1
|
+
.nice-datetimerange-picker-2 {
|
|
2
|
+
display: block;
|
|
3
|
+
|
|
4
|
+
.input-group {
|
|
5
|
+
.form-control {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
text-overflow: ellipsis;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.open {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.nice-daterange-picker-wrapper {
|
|
14
|
+
z-index: 900;
|
|
15
|
+
width: 700px;
|
|
16
|
+
max-width: 80%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dtp-wrapper {
|
|
20
|
+
border-radius: $nice-border-radius;
|
|
21
|
+
box-shadow: $nice-box-shadow;
|
|
22
|
+
|
|
23
|
+
padding: 15px;
|
|
24
|
+
background-color: white;
|
|
25
|
+
border: 1px solid $nice-border-color;
|
|
26
|
+
display: flex;
|
|
27
|
+
|
|
28
|
+
max-height: 450px;
|
|
29
|
+
overflow: auto;
|
|
30
|
+
|
|
31
|
+
.dtp-buttons-left {
|
|
32
|
+
width: 110px;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
|
|
36
|
+
@media (max-width: $screen-md-min) {
|
|
37
|
+
width: auto;
|
|
38
|
+
|
|
39
|
+
.btn-primary {
|
|
40
|
+
min-width: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dtp-buttons-top,
|
|
44
|
+
.dtp-buttons-bottom {
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-template-columns: repeat(2, minmax(100px, 1fr));
|
|
47
|
+
gap: 0.5rem;
|
|
48
|
+
|
|
49
|
+
.btn-block+.btn-block {
|
|
50
|
+
margin-top: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dtp-buttons-top {
|
|
56
|
+
flex-grow: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dtp-buttons-bottom {
|
|
60
|
+
margin-top: 5px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dtp-left,
|
|
65
|
+
.dtp-right {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
flex-grow: 1;
|
|
69
|
+
margin-left: 15px;
|
|
70
|
+
width: 50%;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
.nice-dtp-background {
|
|
76
|
+
position: fixed;
|
|
77
|
+
top: 0;
|
|
78
|
+
left: 0;
|
|
79
|
+
width: 100%;
|
|
80
|
+
z-index: 800;
|
|
81
|
+
height: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.btn {
|
|
85
|
+
border-radius: $nice-border-radius;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.btn-primary {
|
|
89
|
+
background: $nice-base-color;
|
|
90
|
+
border-color: darken($nice-base-color, 5%);
|
|
91
|
+
|
|
92
|
+
&:hover {
|
|
93
|
+
background: darken($nice-base-color, 5%);
|
|
94
|
+
border-color: darken($nice-base-color, 5%);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:active {
|
|
98
|
+
background: darken($nice-base-color, 10%);
|
|
99
|
+
border-color: darken($nice-base-color, 10%);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@media (max-width: $screen-xs-max) {
|
|
105
|
+
.dtp-wrapper {
|
|
106
|
+
width: auto;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
|
|
109
|
+
.dtp-left {
|
|
110
|
+
margin-bottom: 15px;
|
|
111
|
+
margin-top: 15px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.dtp-left,
|
|
115
|
+
.dtp-right {
|
|
116
|
+
margin-left: 0;
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.btn-primary {
|
|
122
|
+
padding: 5px;
|
|
123
|
+
line-height: 1;
|
|
124
|
+
font-size: 12px;
|
|
125
|
+
min-width: 300px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
128
|
}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
<div class="nice-component nice-dropdown" ng-class="{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }" ng-form="formDropdown">
|
|
2
|
-
<div class="row">
|
|
3
|
-
<!------------------------- Title ------------------------->
|
|
4
|
-
<nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
|
|
5
|
-
|
|
6
|
-
<!------------------------- Field ------------------------->
|
|
7
|
-
<div class="nice-field col-xs-12" ng-class="[ fieldWidth ? fieldWidth : 'col-sm-8', { 'open': isOpen, 'nice-disabled': isDisabled || emptyList } ]" click-outside="close()" is-open="{{ isOpen }}">
|
|
8
|
-
<div class="nice-field-wrapper">
|
|
9
|
-
<!------------------------- Button ------------------------->
|
|
10
|
-
<button type="button" class="btn btn-dropdown" type="button" ng-ref="dropdown-button" ng-click="toggle()" ng-disabled="isDisabled || emptyList" aria-expanded="{{ isOpen }}" aria-haspopup="true" aria-controls="menu" id="nice-dropdown-{{ id }}">
|
|
11
|
-
<input class="hidden-input" ng-model="model" ng-required="required" ng-disabled="disabled" tabindex="-1" />
|
|
12
|
-
<div class="btn-dropdown-inside" ng-transclude="button" ng-if="selected != null">
|
|
13
|
-
<span ng-if="!multiple">{{ selected[objValue] }}</span>
|
|
14
|
-
<span ng-if="multiple">
|
|
15
|
-
<span ng-if="selected.length > 1">{{ selected.length }} {{ selectedText }}</span>
|
|
16
|
-
<span ng-if="selected.length == 1">{{ selected[0][objValue] }}</span>
|
|
17
|
-
<span ng-if="selected.length == 0" class="not-selected">{{ nullableText }}</span>
|
|
18
|
-
</span>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="not-selected" ng-if="selected == null">{{ selectText }}</div>
|
|
22
|
-
|
|
23
|
-
<span class="caret" ng-show="!loading"></span>
|
|
24
|
-
<nice-loader ng-if="loading"></nice-loader>
|
|
25
|
-
</button>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<!------------------------- Dropdown menu ------------------------->
|
|
29
|
-
<div class="nice-dropdown-menu-wrapper">
|
|
30
|
-
<div class="nice-dropdown-menu" ng-if="isOpen">
|
|
31
|
-
<div class="search-bar" ng-if="!noSearch && searchFunction">
|
|
32
|
-
<input class="search-bar-input" ng-model="internal.search" ng-model-options="{ debounce: 500 }" ng-change="handleSearch()" placeholder="{{ searchText }}" />
|
|
33
|
-
<div class="count" ng-if="internalList && internalList._metadata && enableLoadMore">{{ internalList.length }}/{{ internalList._metadata.count }}</div>
|
|
34
|
-
<nice-icon ng-if="!internal.search" class="icon" icon="icon-search"></nice-icon>
|
|
35
|
-
<nice-icon ng-if="internal.search" class="icon" icon="icon-x" ng-click="clearSearch()"></nice-icon>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="nice-dropdown-actions" ng-if="multiple">
|
|
38
|
-
<button type="button" class="btn btn-default btn-sm" ng-click="selectAll()" translate translate-context="Nice">All</button>
|
|
39
|
-
<button type="button" class="btn btn-default btn-sm" ng-click="selectNone()">{{ nullableText }}</button>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="nice-dropdown-items" aria-labelledby="nice-dropdown-{{ id }}" role="listbox">
|
|
42
|
-
<div role="none" type="button" class="nice-no-data" ng-if="internalList && internalList.length == 0">{{ noDataText }}</div>
|
|
43
|
-
<button type="button" role="option" class="nice-dropdown-item null-item" ng-if="!multiple && nullable && internalList.length != 0" ng-click="handleSelected(null, -1)" ng-disabled="isDisabled">
|
|
44
|
-
{{ nullableText }}
|
|
45
|
-
</button>
|
|
46
|
-
<button type="button" role="option" class="nice-dropdown-item" ng-repeat="item in internalList" ng-click="handleSelected(item, $index)" ng-class="{ 'selected': item._selected }" ng-disabled="isDisabled">
|
|
47
|
-
<div class="choice-checkbox" ng-if="multiple" role="menuitemcheckbox"><i class="fa fa-check"></i></div>
|
|
48
|
-
<div class="choice-option" ng-transclude="option" ng-class="{ 'multiple-item': multiple }">{{ item[objValue] }}</div>
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<!------------------------- Add button ------------------------->
|
|
56
|
-
<button type="button" class="btn btn-primary btn-icon add-btn" ng-if="addButtonFunction && !isDisabled" ng-click="handleAddButton($event)" ng-disabled="isDisabled">
|
|
57
|
-
<nice-icon icon="icon-plus"></nice-icon>
|
|
58
|
-
</button>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
1
|
+
<div class="nice-component nice-dropdown" ng-class="{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline }" ng-form="formDropdown">
|
|
2
|
+
<div class="row">
|
|
3
|
+
<!------------------------- Title ------------------------->
|
|
4
|
+
<nice-title text="title || niceTitle" help="help" required="required" label-width="labelWidth"></nice-title>
|
|
5
|
+
|
|
6
|
+
<!------------------------- Field ------------------------->
|
|
7
|
+
<div class="nice-field col-xs-12" ng-class="[ fieldWidth ? fieldWidth : 'col-sm-8', { 'open': isOpen, 'nice-disabled': isDisabled || emptyList } ]" click-outside="close()" is-open="{{ isOpen }}">
|
|
8
|
+
<div class="nice-field-wrapper">
|
|
9
|
+
<!------------------------- Button ------------------------->
|
|
10
|
+
<button type="button" class="btn btn-dropdown" type="button" ng-ref="dropdown-button" ng-click="toggle()" ng-disabled="isDisabled || emptyList" aria-expanded="{{ isOpen }}" aria-haspopup="true" aria-controls="menu" id="nice-dropdown-{{ id }}">
|
|
11
|
+
<input class="hidden-input" ng-model="model" ng-required="required" ng-disabled="disabled" tabindex="-1" />
|
|
12
|
+
<div class="btn-dropdown-inside" ng-transclude="button" ng-if="selected != null">
|
|
13
|
+
<span ng-if="!multiple">{{ selected[objValue] }}</span>
|
|
14
|
+
<span ng-if="multiple">
|
|
15
|
+
<span ng-if="selected.length > 1">{{ selected.length }} {{ selectedText }}</span>
|
|
16
|
+
<span ng-if="selected.length == 1">{{ selected[0][objValue] }}</span>
|
|
17
|
+
<span ng-if="selected.length == 0" class="not-selected">{{ nullableText }}</span>
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="not-selected" ng-if="selected == null">{{ selectText }}</div>
|
|
22
|
+
|
|
23
|
+
<span class="caret" ng-show="!loading"></span>
|
|
24
|
+
<nice-loader ng-if="loading"></nice-loader>
|
|
25
|
+
</button>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<!------------------------- Dropdown menu ------------------------->
|
|
29
|
+
<div class="nice-dropdown-menu-wrapper">
|
|
30
|
+
<div class="nice-dropdown-menu" ng-if="isOpen">
|
|
31
|
+
<div class="search-bar" ng-if="!noSearch && searchFunction">
|
|
32
|
+
<input class="search-bar-input" ng-model="internal.search" ng-model-options="{ debounce: 500 }" ng-change="handleSearch()" placeholder="{{ searchText }}" />
|
|
33
|
+
<div class="count" ng-if="internalList && internalList._metadata && enableLoadMore">{{ internalList.length }}/{{ internalList._metadata.count }}</div>
|
|
34
|
+
<nice-icon ng-if="!internal.search" class="icon" icon="icon-search"></nice-icon>
|
|
35
|
+
<nice-icon ng-if="internal.search" class="icon" icon="icon-x" ng-click="clearSearch()"></nice-icon>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="nice-dropdown-actions" ng-if="multiple">
|
|
38
|
+
<button type="button" class="btn btn-default btn-sm" ng-click="selectAll()" translate translate-context="Nice">All</button>
|
|
39
|
+
<button type="button" class="btn btn-default btn-sm" ng-click="selectNone()">{{ nullableText }}</button>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="nice-dropdown-items" aria-labelledby="nice-dropdown-{{ id }}" role="listbox">
|
|
42
|
+
<div role="none" type="button" class="nice-no-data" ng-if="internalList && internalList.length == 0">{{ noDataText }}</div>
|
|
43
|
+
<button type="button" role="option" class="nice-dropdown-item null-item" ng-if="!multiple && nullable && internalList.length != 0" ng-click="handleSelected(null, -1)" ng-disabled="isDisabled">
|
|
44
|
+
{{ nullableText }}
|
|
45
|
+
</button>
|
|
46
|
+
<button type="button" role="option" class="nice-dropdown-item" ng-repeat="item in internalList" ng-click="handleSelected(item, $index)" ng-class="{ 'selected': item._selected }" ng-disabled="isDisabled">
|
|
47
|
+
<div class="choice-checkbox" ng-if="multiple" role="menuitemcheckbox"><i class="fa fa-check"></i></div>
|
|
48
|
+
<div class="choice-option" ng-transclude="option" ng-class="{ 'multiple-item': multiple }">{{ item[objValue] }}</div>
|
|
49
|
+
</button>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<!------------------------- Add button ------------------------->
|
|
56
|
+
<button type="button" class="btn btn-primary btn-icon add-btn" ng-if="addButtonFunction && !isDisabled" ng-click="handleAddButton($event)" ng-disabled="isDisabled">
|
|
57
|
+
<nice-icon icon="icon-plus"></nice-icon>
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
62
|
</div>
|