nice-elements 1.8.8 → 1.9.1
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +367 -118
- package/dist/nice.min.js +1 -1
- package/dist/style.css +187 -7
- package/dist/style.css.map +4 -2
- package/dist/style.min.css +2 -2
- package/package.json +3 -2
- package/src/components/nice-calendar/nice-calendar.html +1 -1
- package/src/components/nice-choice/nice-choice.html +1 -1
- package/src/components/nice-comment/nice-comment.html +1 -1
- package/src/components/nice-date/nice-date.html +1 -1
- package/src/components/nice-date-input/nice-date-input.html +1 -1
- package/src/components/nice-date-range/nice-date-range.html +1 -1
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +1 -1
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +1 -1
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +1 -1
- package/src/components/nice-dropdown/nice-dropdown.html +1 -1
- package/src/components/nice-dropdown-date/nice-dropdown-date.html +1 -1
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +1 -1
- package/src/components/nice-input/nice-input.html +12 -5
- package/src/components/nice-input/nice-input.js +46 -1
- package/src/components/nice-input/nice-input.scss +66 -5
- package/src/components/nice-label/nice-label.html +1 -1
- package/src/components/nice-number/nice-number.html +1 -1
- package/src/components/nice-percent/nice-percent.html +1 -1
- package/src/components/nice-progress-bar/nice-progress-bar.html +1 -1
- package/src/components/nice-quantity/nice-quantity.html +1 -1
- package/src/components/nice-search/nice-search.html +1 -1
- package/src/components/nice-search2/nice-search2.html +1 -1
- package/src/components/nice-slot/nice-slot.html +1 -1
- package/src/components/nice-svgs/nice-svgs.html +110 -0
- package/src/components/nice-time-picker/nice-time-picker.html +1 -1
- package/src/components/nice-title/nice-title.html +2 -2
- package/src/components/nice-title/nice-title.js +1 -1
- package/src/components/nice-upload/nice-upload.html +1 -1
- package/src/components/nice-yesno/nice-yesno.html +1 -1
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.html +31 -0
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.js +67 -0
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.scss +20 -0
- package/src/services/nice-service.js +1 -1
- package/src/styles/_nice-common.scss +23 -2
- package/src/styles/_nice-ngdialog.scss +86 -0
- package/src/styles/_nice.scss +9 -3
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
angular.module('niceElements')
|
|
2
|
+
.directive('niceMultilangualModal', function () {
|
|
3
|
+
return {
|
|
4
|
+
templateUrl: 'src/modals/nice-multilangual-modal/nice-multilangual-modal.html',
|
|
5
|
+
restrict: 'E',
|
|
6
|
+
transclude: true,
|
|
7
|
+
scope: {
|
|
8
|
+
model: '=',
|
|
9
|
+
callback: '=',
|
|
10
|
+
dialog: '=',
|
|
11
|
+
multilanguage: '=', // Multiple languages object
|
|
12
|
+
multilanguageField: '@', // Multiple languages field name
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
controller: function ($scope, $timeout) {
|
|
16
|
+
$scope.selector = {
|
|
17
|
+
newLanguage: null
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (!$scope.multilanguage) $scope.multilanguage = {};
|
|
21
|
+
if (!$scope.multilanguage[$scope.multilanguageField]) $scope.multilanguage[$scope.multilanguageField] = {};
|
|
22
|
+
$scope.fields = angular.copy($scope.multilanguage[$scope.multilanguageField]);
|
|
23
|
+
|
|
24
|
+
$scope.languages = [
|
|
25
|
+
{ id: 'sl', value: "Slovenščina" },
|
|
26
|
+
{ id: 'en', value: "English" },
|
|
27
|
+
{ id: 'de', value: "Deutsch" },
|
|
28
|
+
{ id: 'it', value: "Italiano" },
|
|
29
|
+
{ id: 'fr', value: "Français" },
|
|
30
|
+
];
|
|
31
|
+
$scope.languagesMap = {};
|
|
32
|
+
angular.forEach($scope.languages, function (l) { $scope.languagesMap[l.id] = l.value; })
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
$scope.filterLanguages = function (list) {
|
|
36
|
+
return _.filter(list, function (l) { return !Object.keys($scope.fields).includes(l.id); })
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
$scope.addLanguage = function () {
|
|
40
|
+
if (!$scope.selector.newLanguage) return;
|
|
41
|
+
$scope.fields[$scope.selector.newLanguage.id] = "";
|
|
42
|
+
$scope.selector.newLanguage = null;
|
|
43
|
+
$scope.hide = true;
|
|
44
|
+
$timeout(function () {
|
|
45
|
+
$scope.hide = false;
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$scope.removeLanguage = function (key) {
|
|
50
|
+
delete $scope.fields[key];
|
|
51
|
+
$scope.hide = true;
|
|
52
|
+
$timeout(function () {
|
|
53
|
+
$scope.hide = false;
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
$scope.save = function () {
|
|
58
|
+
$scope.callback($scope.fields);
|
|
59
|
+
$scope.dialog.close();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
$scope.close = function () {
|
|
63
|
+
$scope.dialog.close();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.nice-multilangual-modal {
|
|
2
|
+
.nice-multilangual-languages {
|
|
3
|
+
.nice-multilangual-language {
|
|
4
|
+
margin-bottom: 1rem;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: flex-end;
|
|
7
|
+
gap: 1rem;
|
|
8
|
+
|
|
9
|
+
.nice-multilangual-language-flag {
|
|
10
|
+
width: 34px;
|
|
11
|
+
height: 34px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.add-language {
|
|
17
|
+
width: 200px;
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -32,8 +32,22 @@ label.nice {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// .input-group .form-control:not(:first-child):not(:last-child),
|
|
36
|
+
// .input-group-addon:not(:first-child):not(:last-child),
|
|
37
|
+
// .input-group-btn:not(:first-child):not(:last-child) {
|
|
38
|
+
// border-radius: var(--nice-border-radius);
|
|
39
|
+
// }
|
|
40
|
+
|
|
35
41
|
.input-group,
|
|
36
42
|
.form-group {
|
|
43
|
+
display: flex;
|
|
44
|
+
|
|
45
|
+
.input-group-addon,
|
|
46
|
+
.input-group-btn {
|
|
47
|
+
width: auto;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
37
51
|
.form-control {
|
|
38
52
|
z-index: unset;
|
|
39
53
|
}
|
|
@@ -45,6 +59,8 @@ label.nice {
|
|
|
45
59
|
|
|
46
60
|
.form-control:not(:last-child) {
|
|
47
61
|
border-right: 0 none;
|
|
62
|
+
border-top-right-radius: 0 !important;
|
|
63
|
+
border-bottom-right-radius: 0 !important;
|
|
48
64
|
}
|
|
49
65
|
|
|
50
66
|
&:focus-within {
|
|
@@ -129,14 +145,19 @@ label.nice {
|
|
|
129
145
|
}
|
|
130
146
|
|
|
131
147
|
.input-group-addon {
|
|
132
|
-
border-top-
|
|
133
|
-
border-bottom-
|
|
148
|
+
border-top-left-radius: 0 !important;
|
|
149
|
+
border-bottom-left-radius: 0 !important;
|
|
134
150
|
border: 1px solid $nice-border-color;
|
|
135
151
|
border-left: 0 none;
|
|
136
152
|
background: $nice-input-bg;
|
|
137
153
|
padding: 0 9px;
|
|
138
154
|
color: var(--nice-font-color);
|
|
139
155
|
|
|
156
|
+
width: auto;
|
|
157
|
+
display: flex;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
align-items: center;
|
|
160
|
+
|
|
140
161
|
svg {
|
|
141
162
|
height: 16px;
|
|
142
163
|
width: 16px;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.nice-ngdialog-theme {
|
|
2
|
+
user-select: inherit !important;
|
|
3
|
+
padding-bottom: 3rem !important;
|
|
4
|
+
padding-top: 3rem !important;
|
|
5
|
+
|
|
6
|
+
.white-wrapper {
|
|
7
|
+
box-shadow: 0px 0px 0px none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ngdialog-content {
|
|
11
|
+
background: white !important;
|
|
12
|
+
color: var(--nice-font-color);
|
|
13
|
+
line-height: inherit !important;
|
|
14
|
+
padding: 0px !important;
|
|
15
|
+
font-size: inherit !important;
|
|
16
|
+
background: none;
|
|
17
|
+
width: 800px;
|
|
18
|
+
max-width: 90%;
|
|
19
|
+
border-radius: var(--nice-border-radius);
|
|
20
|
+
overflow: visible;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ---------------- Dialog Title ----------------
|
|
24
|
+
.dialog-title {
|
|
25
|
+
padding: 2rem;
|
|
26
|
+
padding-bottom: 1rem;
|
|
27
|
+
font-size: 1.3em;
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
color: var(--nice-primary-color);
|
|
30
|
+
|
|
31
|
+
.sub-title {
|
|
32
|
+
font-size: 0.8em;
|
|
33
|
+
text-transform: uppercase;
|
|
34
|
+
color: var(--nice-font-color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title {
|
|
38
|
+
font-size: 1.5em;
|
|
39
|
+
text-transform: none;
|
|
40
|
+
color: var(--nice-primary-color);
|
|
41
|
+
// font-weight: bold;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
p {
|
|
45
|
+
font-size: 1em;
|
|
46
|
+
text-transform: none;
|
|
47
|
+
color: var(--nice-font-color);
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ---------------- Dialog filters ----------------
|
|
54
|
+
.dialog-filters {
|
|
55
|
+
padding: 2rem;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: flex-end;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ---------------- Dialog Body----------------
|
|
62
|
+
.dialog-body {
|
|
63
|
+
padding: 0 2rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ---------------- Dialog Footer ----------------
|
|
67
|
+
.dialog-footer {
|
|
68
|
+
position: relative;
|
|
69
|
+
padding: 2rem;
|
|
70
|
+
|
|
71
|
+
&:before {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 2rem;
|
|
75
|
+
right: 2rem;
|
|
76
|
+
content: " ";
|
|
77
|
+
border-top: 1px solid var(--nice-hr-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.view-actions {
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: 1rem;
|
|
83
|
+
justify-content: flex-end;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
package/src/styles/_nice.scss
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
user-select: none;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.flex-grow {
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.margin-bottom-0 {
|
|
14
18
|
margin-bottom: 0 !important;
|
|
15
19
|
}
|
|
@@ -23,6 +27,7 @@
|
|
|
23
27
|
@import "nice-common";
|
|
24
28
|
@import "nice-buttons";
|
|
25
29
|
@import "nice-spacing";
|
|
30
|
+
@import "nice-ngdialog";
|
|
26
31
|
@import "../components/nice-dropdown/nice-dropdown";
|
|
27
32
|
@import "../components/nice-dropdown-old/nice-dropdown-old";
|
|
28
33
|
@import "../components/nice-input/nice-input";
|
|
@@ -54,6 +59,7 @@
|
|
|
54
59
|
@import "../components/nice-popup/nice-popup";
|
|
55
60
|
@import "../components/nice-icon/nice-icon";
|
|
56
61
|
@import "../components/nice-toast/nice-toast";
|
|
57
|
-
@import "../components/nice-date-input/nice-date-input
|
|
58
|
-
@import "../components/nice-wrapper/nice-wrapper
|
|
59
|
-
@import "../components/nice-pill/nice-pill
|
|
62
|
+
@import "../components/nice-date-input/nice-date-input";
|
|
63
|
+
@import "../components/nice-wrapper/nice-wrapper";
|
|
64
|
+
@import "../components/nice-pill/nice-pill";
|
|
65
|
+
@import "../modals/nice-multilangual-modal/nice-multilangual-modal";
|