nice-elements 1.12.8 → 1.12.10
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 +7 -3
- package/bower.json +1 -1
- package/dist/nice.js +251 -198
- package/dist/nice.min.js +1 -1
- package/dist/style.css +52 -52
- package/dist/style.css.map +3 -3
- package/dist/style.min.css +1 -1
- package/package.json +1 -1
- package/src/components/nice-svgs/nice-svgs.html +13 -1
- package/src/components/nice-upload/nice-upload.js +2 -1
- package/src/directives/nice-infinite-loader.js +28 -0
- package/src/filters/nice-date.js +1 -1
- package/src/filters/nice-highlight.js +1 -1
- package/src/services/nice-service.js +2 -2
- package/src/styles/_nice.scss +4 -1
- /package/src/{components/nice-click-outside → directives}/nice-click-outside.js +0 -0
- /package/src/{components → directives}/nice-tooltip/_nice-tooltip.scss +0 -0
- /package/src/{components → directives}/nice-tooltip/nice-tooltip.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.12.10 (4.12.2025)
|
|
4
|
+
|
|
5
|
+
- fixed nice tooltip,
|
|
6
|
+
- fixed nice infinite loader disabled attribute,
|
|
7
|
+
- worked on nice upload file fallback,
|
|
8
|
+
- added icon-building, icon-nfc, icon-table icons
|
|
9
|
+
|
|
10
|
+
## v1.12.9 (14.10.2025)
|
|
11
|
+
|
|
12
|
+
- created nice-infinite-loader directive,
|
|
13
|
+
- moved directives to directives folder
|
|
14
|
+
|
|
3
15
|
## v1.12.8 (10.10.2025)
|
|
4
16
|
|
|
5
17
|
- fixed nice view submit
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Nice elements v1.12.
|
|
3
|
+
# Nice elements v1.12.10
|
|
4
4
|
|
|
5
5
|
Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
|
|
6
6
|
|
|
@@ -14,7 +14,6 @@ Nice elements is an AngularJS v1.5.8 module that contains nice form elements lik
|
|
|
14
14
|
- nice-calendar
|
|
15
15
|
- nice-checkbox
|
|
16
16
|
- nice-choice
|
|
17
|
-
- nice-click-outside
|
|
18
17
|
- nice-comment
|
|
19
18
|
- nice-date
|
|
20
19
|
- nice-date-input
|
|
@@ -42,7 +41,6 @@ Nice elements is an AngularJS v1.5.8 module that contains nice form elements lik
|
|
|
42
41
|
- nice-time-picker
|
|
43
42
|
- nice-title
|
|
44
43
|
- nice-toast
|
|
45
|
-
- nice-tooltip
|
|
46
44
|
- nice-upload
|
|
47
45
|
- nice-yesno
|
|
48
46
|
- nice-pill
|
|
@@ -65,6 +63,12 @@ Nice elements is an AngularJS v1.5.8 module that contains nice form elements lik
|
|
|
65
63
|
|
|
66
64
|
- nice-service
|
|
67
65
|
|
|
66
|
+
## Directives
|
|
67
|
+
|
|
68
|
+
- nice-click-outside
|
|
69
|
+
- nice-tooltip
|
|
70
|
+
- nice-infinite-loader
|
|
71
|
+
|
|
68
72
|
## How to build
|
|
69
73
|
|
|
70
74
|
```bash
|
package/bower.json
CHANGED
package/dist/nice.js
CHANGED
|
@@ -819,112 +819,6 @@ angular.module('niceElements')
|
|
|
819
819
|
|
|
820
820
|
'use strict';
|
|
821
821
|
|
|
822
|
-
/**
|
|
823
|
-
* @ngdoc directive
|
|
824
|
-
* @name niceElements.directive:clickOutside
|
|
825
|
-
* @description
|
|
826
|
-
* # clickOutside
|
|
827
|
-
*/
|
|
828
|
-
angular.module('niceElements')
|
|
829
|
-
.directive('clickOutside', function ($document, $parse, $timeout) {
|
|
830
|
-
return {
|
|
831
|
-
restrict: 'A',
|
|
832
|
-
link: function ($scope, elem, attr) {
|
|
833
|
-
$scope.isOpen = false;
|
|
834
|
-
|
|
835
|
-
// watch for is open
|
|
836
|
-
attr.$observe('isOpen', function (value) {
|
|
837
|
-
$scope.isOpen = value == 'true';
|
|
838
|
-
});
|
|
839
|
-
|
|
840
|
-
$timeout(function () {
|
|
841
|
-
// postpone linking to next digest to allow for unique id generation
|
|
842
|
-
const classList = (attr.outsideIfNot !== undefined) ? attr.outsideIfNot.split(/[ ,]+/) : [];
|
|
843
|
-
let fn;
|
|
844
|
-
|
|
845
|
-
function eventHandler(e) {
|
|
846
|
-
if ($scope.isOpen) {
|
|
847
|
-
let i, element, r, id, classNames, l;
|
|
848
|
-
|
|
849
|
-
// if there is no click target, no point going on
|
|
850
|
-
if (!e || !e.target) {
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
// loop through the available elements, looking for classes in the class list that might match and so will eat
|
|
855
|
-
for (element = e.target; element; element = element.parentNode) {
|
|
856
|
-
// check if the element is the same element the directive is attached to and exit if so (props @CosticaPuntaru)
|
|
857
|
-
if (element === elem[0]) {
|
|
858
|
-
return;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
// now we have done the initial checks, start gathering id's and classes
|
|
862
|
-
id = element.id;
|
|
863
|
-
classNames = element.className;
|
|
864
|
-
l = classList.length;
|
|
865
|
-
|
|
866
|
-
// Unwrap SVGAnimatedString classes
|
|
867
|
-
if (classNames && classNames.baseVal !== undefined) {
|
|
868
|
-
classNames = classNames.baseVal;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
// if there are no class names on the element clicked, skip the check
|
|
872
|
-
if (classNames || id) {
|
|
873
|
-
|
|
874
|
-
// loop through the elements id's and classnames looking for exceptions
|
|
875
|
-
for (i = 0; i < l; i++) {
|
|
876
|
-
//prepare regex for class word matching
|
|
877
|
-
r = new RegExp('\\b' + classList[i] + '\\b');
|
|
878
|
-
|
|
879
|
-
// check for exact matches on id's or classes, but only if they exist in the first place
|
|
880
|
-
if ((id !== undefined && id === classList[i]) || (classNames && r.test(classNames))) {
|
|
881
|
-
// now let's exit out as it is an element that has been defined as being ignored for clicking outside
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
// if we have got this far, then we are good to go with processing the command passed in via the click-outside attribute
|
|
889
|
-
$timeout(function () {
|
|
890
|
-
fn = $parse(attr['clickOutside']);
|
|
891
|
-
fn($scope, { event: e });
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
// if the devices has a touchscreen, listen for this event
|
|
898
|
-
if (_hasTouch()) {
|
|
899
|
-
$document.on('touchstart', eventHandler);
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
// still listen for the click event even if there is touch to cater for touchscreen laptops
|
|
903
|
-
$document.on('click', eventHandler);
|
|
904
|
-
|
|
905
|
-
// when the scope is destroyed, clean up the documents event handlers as we don't want it hanging around
|
|
906
|
-
$scope.$on('$destroy', function () {
|
|
907
|
-
if (_hasTouch()) {
|
|
908
|
-
$document.off('touchstart', eventHandler);
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
$document.off('click', eventHandler);
|
|
912
|
-
});
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* @description Private function to attempt to figure out if we are on a touch device
|
|
916
|
-
* @private
|
|
917
|
-
**/
|
|
918
|
-
function _hasTouch() {
|
|
919
|
-
// works on most browsers, IE10/11 and Surface
|
|
920
|
-
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
|
921
|
-
}
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
});
|
|
926
|
-
'use strict';
|
|
927
|
-
|
|
928
822
|
/**
|
|
929
823
|
* @ngdoc directive
|
|
930
824
|
* @name niceElements.directive:niceComment
|
|
@@ -5853,91 +5747,6 @@ angular.module('niceElements')
|
|
|
5853
5747
|
|
|
5854
5748
|
'use strict';
|
|
5855
5749
|
|
|
5856
|
-
/**
|
|
5857
|
-
* @ngdoc directive
|
|
5858
|
-
* @name niceElements.directive:niceTooltip
|
|
5859
|
-
* @description
|
|
5860
|
-
* # niceTooltip
|
|
5861
|
-
*/
|
|
5862
|
-
angular.module('niceElements')
|
|
5863
|
-
.directive('niceTooltip', function () {
|
|
5864
|
-
return {
|
|
5865
|
-
restrict: 'A',
|
|
5866
|
-
controller: function ($scope, $element, $attrs, $compile) {
|
|
5867
|
-
const id = Math.random().toString(36).substring(7);
|
|
5868
|
-
const showEvents = ['mouseenter', 'focus'];
|
|
5869
|
-
const hideEvents = ['mouseleave', 'blur'];
|
|
5870
|
-
const placement = $attrs.niceTooltipPlacement || "top";
|
|
5871
|
-
|
|
5872
|
-
// Create popper window
|
|
5873
|
-
$element.addClass("nice-tooltip");
|
|
5874
|
-
const tooltipWindow = document.createElement('div');
|
|
5875
|
-
tooltipWindow.className = 'nice-tooltip-window';
|
|
5876
|
-
tooltipWindow.id = 'nice-tooltip-window-' + id;
|
|
5877
|
-
|
|
5878
|
-
// Popper body
|
|
5879
|
-
const content = $compile("<div class='nice-tooltip-body'>" + $attrs.niceTooltip + "</div>")($scope);
|
|
5880
|
-
tooltipWindow.append(content[0]);
|
|
5881
|
-
|
|
5882
|
-
// Popper arrow
|
|
5883
|
-
const tooltipWindowArrow = document.createElement('div');
|
|
5884
|
-
tooltipWindowArrow.className = 'nice-tooltip-window-arrow';
|
|
5885
|
-
tooltipWindowArrow.setAttribute("data-popper-arrow", "");
|
|
5886
|
-
tooltipWindow.append(tooltipWindowArrow);
|
|
5887
|
-
|
|
5888
|
-
// Add to body
|
|
5889
|
-
document.body.append(tooltipWindow);
|
|
5890
|
-
|
|
5891
|
-
// Setup popper
|
|
5892
|
-
const popper = Popper.createPopper($element[0], tooltipWindow, {
|
|
5893
|
-
placement: placement,
|
|
5894
|
-
strategy: 'fixed',
|
|
5895
|
-
modifiers: [
|
|
5896
|
-
{
|
|
5897
|
-
name: 'offset',
|
|
5898
|
-
options: {
|
|
5899
|
-
offset: [0, 8],
|
|
5900
|
-
},
|
|
5901
|
-
},
|
|
5902
|
-
{
|
|
5903
|
-
name: 'arrow',
|
|
5904
|
-
options: {
|
|
5905
|
-
element: tooltipWindowArrow,
|
|
5906
|
-
padding: 3
|
|
5907
|
-
},
|
|
5908
|
-
},
|
|
5909
|
-
],
|
|
5910
|
-
});
|
|
5911
|
-
|
|
5912
|
-
function show() {
|
|
5913
|
-
if ($attrs.niceTooltipDisabled == true || $attrs.niceTooltipDisabled == "true") return;
|
|
5914
|
-
tooltipWindow.setAttribute('data-show', '');
|
|
5915
|
-
popper.update();
|
|
5916
|
-
}
|
|
5917
|
-
|
|
5918
|
-
function hide() {
|
|
5919
|
-
tooltipWindow.removeAttribute('data-show');
|
|
5920
|
-
}
|
|
5921
|
-
|
|
5922
|
-
showEvents.forEach((event) => {
|
|
5923
|
-
$element[0].addEventListener(event, show);
|
|
5924
|
-
});
|
|
5925
|
-
|
|
5926
|
-
hideEvents.forEach((event) => {
|
|
5927
|
-
$element[0].addEventListener(event, hide);
|
|
5928
|
-
});
|
|
5929
|
-
|
|
5930
|
-
// On destroy
|
|
5931
|
-
$scope.$on('$destroy', function () {
|
|
5932
|
-
tooltipWindow.remove();
|
|
5933
|
-
if (popper) popper.destroy();
|
|
5934
|
-
});
|
|
5935
|
-
}
|
|
5936
|
-
};
|
|
5937
|
-
});
|
|
5938
|
-
|
|
5939
|
-
'use strict';
|
|
5940
|
-
|
|
5941
5750
|
/**
|
|
5942
5751
|
* @ngdoc directive
|
|
5943
5752
|
* @name niceElements.directive:niceUpload
|
|
@@ -6054,7 +5863,8 @@ angular.module('niceElements')
|
|
|
6054
5863
|
scope.uploadFunction(inputObj.files[0]).then(function (response) {
|
|
6055
5864
|
scope.loading = false;
|
|
6056
5865
|
scope.imageSource = event.target.result;
|
|
6057
|
-
scope.model = response.data.url;
|
|
5866
|
+
if (response.data && response.data.url) scope.model = response.data.url;
|
|
5867
|
+
if (response.file) scope.model = response.data.url;
|
|
6058
5868
|
scope.form.$setDirty();
|
|
6059
5869
|
}, function (error) {
|
|
6060
5870
|
// Handle upload function error
|
|
@@ -6356,7 +6166,7 @@ angular.module('niceElements')
|
|
|
6356
6166
|
});
|
|
6357
6167
|
|
|
6358
6168
|
/**
|
|
6359
|
-
* @ngdoc
|
|
6169
|
+
* @ngdoc filter
|
|
6360
6170
|
* @name niceElements.filter:niceDate
|
|
6361
6171
|
* @function
|
|
6362
6172
|
* @description
|
|
@@ -6374,7 +6184,7 @@ angular.module('niceElements').filter('niceDate', function () {
|
|
|
6374
6184
|
};
|
|
6375
6185
|
});
|
|
6376
6186
|
/**
|
|
6377
|
-
* @ngdoc
|
|
6187
|
+
* @ngdoc filter
|
|
6378
6188
|
* @name niceElements.filter:niceHighlight
|
|
6379
6189
|
* @function
|
|
6380
6190
|
* @description
|
|
@@ -6390,8 +6200,227 @@ angular.module('niceElements').filter('niceHighlight', function () {
|
|
|
6390
6200
|
};
|
|
6391
6201
|
});
|
|
6392
6202
|
|
|
6203
|
+
'use strict';
|
|
6204
|
+
|
|
6205
|
+
/**
|
|
6206
|
+
* @ngdoc directive
|
|
6207
|
+
* @name niceElements.directive:clickOutside
|
|
6208
|
+
* @description
|
|
6209
|
+
* # clickOutside
|
|
6210
|
+
*/
|
|
6211
|
+
angular.module('niceElements')
|
|
6212
|
+
.directive('clickOutside', function ($document, $parse, $timeout) {
|
|
6213
|
+
return {
|
|
6214
|
+
restrict: 'A',
|
|
6215
|
+
link: function ($scope, elem, attr) {
|
|
6216
|
+
$scope.isOpen = false;
|
|
6217
|
+
|
|
6218
|
+
// watch for is open
|
|
6219
|
+
attr.$observe('isOpen', function (value) {
|
|
6220
|
+
$scope.isOpen = value == 'true';
|
|
6221
|
+
});
|
|
6222
|
+
|
|
6223
|
+
$timeout(function () {
|
|
6224
|
+
// postpone linking to next digest to allow for unique id generation
|
|
6225
|
+
const classList = (attr.outsideIfNot !== undefined) ? attr.outsideIfNot.split(/[ ,]+/) : [];
|
|
6226
|
+
let fn;
|
|
6227
|
+
|
|
6228
|
+
function eventHandler(e) {
|
|
6229
|
+
if ($scope.isOpen) {
|
|
6230
|
+
let i, element, r, id, classNames, l;
|
|
6231
|
+
|
|
6232
|
+
// if there is no click target, no point going on
|
|
6233
|
+
if (!e || !e.target) {
|
|
6234
|
+
return;
|
|
6235
|
+
}
|
|
6236
|
+
|
|
6237
|
+
// loop through the available elements, looking for classes in the class list that might match and so will eat
|
|
6238
|
+
for (element = e.target; element; element = element.parentNode) {
|
|
6239
|
+
// check if the element is the same element the directive is attached to and exit if so (props @CosticaPuntaru)
|
|
6240
|
+
if (element === elem[0]) {
|
|
6241
|
+
return;
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
// now we have done the initial checks, start gathering id's and classes
|
|
6245
|
+
id = element.id;
|
|
6246
|
+
classNames = element.className;
|
|
6247
|
+
l = classList.length;
|
|
6248
|
+
|
|
6249
|
+
// Unwrap SVGAnimatedString classes
|
|
6250
|
+
if (classNames && classNames.baseVal !== undefined) {
|
|
6251
|
+
classNames = classNames.baseVal;
|
|
6252
|
+
}
|
|
6253
|
+
|
|
6254
|
+
// if there are no class names on the element clicked, skip the check
|
|
6255
|
+
if (classNames || id) {
|
|
6256
|
+
|
|
6257
|
+
// loop through the elements id's and classnames looking for exceptions
|
|
6258
|
+
for (i = 0; i < l; i++) {
|
|
6259
|
+
//prepare regex for class word matching
|
|
6260
|
+
r = new RegExp('\\b' + classList[i] + '\\b');
|
|
6261
|
+
|
|
6262
|
+
// check for exact matches on id's or classes, but only if they exist in the first place
|
|
6263
|
+
if ((id !== undefined && id === classList[i]) || (classNames && r.test(classNames))) {
|
|
6264
|
+
// now let's exit out as it is an element that has been defined as being ignored for clicking outside
|
|
6265
|
+
return;
|
|
6266
|
+
}
|
|
6267
|
+
}
|
|
6268
|
+
}
|
|
6269
|
+
}
|
|
6270
|
+
|
|
6271
|
+
// if we have got this far, then we are good to go with processing the command passed in via the click-outside attribute
|
|
6272
|
+
$timeout(function () {
|
|
6273
|
+
fn = $parse(attr['clickOutside']);
|
|
6274
|
+
fn($scope, { event: e });
|
|
6275
|
+
});
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6279
|
+
|
|
6280
|
+
// if the devices has a touchscreen, listen for this event
|
|
6281
|
+
if (_hasTouch()) {
|
|
6282
|
+
$document.on('touchstart', eventHandler);
|
|
6283
|
+
}
|
|
6284
|
+
|
|
6285
|
+
// still listen for the click event even if there is touch to cater for touchscreen laptops
|
|
6286
|
+
$document.on('click', eventHandler);
|
|
6287
|
+
|
|
6288
|
+
// when the scope is destroyed, clean up the documents event handlers as we don't want it hanging around
|
|
6289
|
+
$scope.$on('$destroy', function () {
|
|
6290
|
+
if (_hasTouch()) {
|
|
6291
|
+
$document.off('touchstart', eventHandler);
|
|
6292
|
+
}
|
|
6293
|
+
|
|
6294
|
+
$document.off('click', eventHandler);
|
|
6295
|
+
});
|
|
6296
|
+
|
|
6297
|
+
/**
|
|
6298
|
+
* @description Private function to attempt to figure out if we are on a touch device
|
|
6299
|
+
* @private
|
|
6300
|
+
**/
|
|
6301
|
+
function _hasTouch() {
|
|
6302
|
+
// works on most browsers, IE10/11 and Surface
|
|
6303
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
|
6304
|
+
}
|
|
6305
|
+
});
|
|
6306
|
+
}
|
|
6307
|
+
};
|
|
6308
|
+
});
|
|
6309
|
+
/**
|
|
6310
|
+
* @ngdoc directive
|
|
6311
|
+
* @name niceElements.directive:niceInfiniteLoader
|
|
6312
|
+
* @function
|
|
6313
|
+
* @description
|
|
6314
|
+
* # niceInfiniteLoader
|
|
6315
|
+
* Directive in the niceElements.
|
|
6316
|
+
*/
|
|
6317
|
+
angular.module('niceElements')
|
|
6318
|
+
.directive('niceInfiniteLoader', function () {
|
|
6319
|
+
return {
|
|
6320
|
+
restrict: 'A',
|
|
6321
|
+
replace: true,
|
|
6322
|
+
link: function (scope, element, attrs) {
|
|
6323
|
+
const isScrolledToBottom = (el) => {
|
|
6324
|
+
const tolerance = 5;
|
|
6325
|
+
return (el.scrollTop + el.clientHeight) >= (el.scrollHeight - tolerance);
|
|
6326
|
+
};
|
|
6327
|
+
|
|
6328
|
+
// Scroll Event Listener
|
|
6329
|
+
element[0].addEventListener('scroll', () => {
|
|
6330
|
+
if (isScrolledToBottom(element[0]) && !scope.$eval(attrs.niceInfiniteLoaderDisabled)) {
|
|
6331
|
+
scope.$eval(attrs.niceInfiniteLoader);
|
|
6332
|
+
}
|
|
6333
|
+
});
|
|
6334
|
+
}
|
|
6335
|
+
};
|
|
6336
|
+
});
|
|
6337
|
+
'use strict';
|
|
6338
|
+
|
|
6393
6339
|
/**
|
|
6394
|
-
* @ngdoc
|
|
6340
|
+
* @ngdoc directive
|
|
6341
|
+
* @name niceElements.directive:niceTooltip
|
|
6342
|
+
* @description
|
|
6343
|
+
* # niceTooltip
|
|
6344
|
+
*/
|
|
6345
|
+
angular.module('niceElements')
|
|
6346
|
+
.directive('niceTooltip', function () {
|
|
6347
|
+
return {
|
|
6348
|
+
restrict: 'A',
|
|
6349
|
+
controller: function ($scope, $element, $attrs, $compile) {
|
|
6350
|
+
const id = Math.random().toString(36).substring(7);
|
|
6351
|
+
const showEvents = ['mouseenter', 'focus'];
|
|
6352
|
+
const hideEvents = ['mouseleave', 'blur'];
|
|
6353
|
+
const placement = $attrs.niceTooltipPlacement || "top";
|
|
6354
|
+
|
|
6355
|
+
// Create popper window
|
|
6356
|
+
$element.addClass("nice-tooltip");
|
|
6357
|
+
const tooltipWindow = document.createElement('div');
|
|
6358
|
+
tooltipWindow.className = 'nice-tooltip-window';
|
|
6359
|
+
tooltipWindow.id = 'nice-tooltip-window-' + id;
|
|
6360
|
+
|
|
6361
|
+
// Popper body
|
|
6362
|
+
const content = $compile("<div class='nice-tooltip-body'>" + $attrs.niceTooltip + "</div>")($scope);
|
|
6363
|
+
tooltipWindow.append(content[0]);
|
|
6364
|
+
|
|
6365
|
+
// Popper arrow
|
|
6366
|
+
const tooltipWindowArrow = document.createElement('div');
|
|
6367
|
+
tooltipWindowArrow.className = 'nice-tooltip-window-arrow';
|
|
6368
|
+
tooltipWindowArrow.setAttribute("data-popper-arrow", "");
|
|
6369
|
+
tooltipWindow.append(tooltipWindowArrow);
|
|
6370
|
+
|
|
6371
|
+
// Add to body
|
|
6372
|
+
document.body.append(tooltipWindow);
|
|
6373
|
+
|
|
6374
|
+
// Setup popper
|
|
6375
|
+
const popper = Popper.createPopper($element[0], tooltipWindow, {
|
|
6376
|
+
placement: placement,
|
|
6377
|
+
strategy: 'fixed',
|
|
6378
|
+
modifiers: [
|
|
6379
|
+
{
|
|
6380
|
+
name: 'offset',
|
|
6381
|
+
options: {
|
|
6382
|
+
offset: [0, 8],
|
|
6383
|
+
},
|
|
6384
|
+
},
|
|
6385
|
+
{
|
|
6386
|
+
name: 'arrow',
|
|
6387
|
+
options: {
|
|
6388
|
+
element: tooltipWindowArrow,
|
|
6389
|
+
padding: 3
|
|
6390
|
+
},
|
|
6391
|
+
},
|
|
6392
|
+
],
|
|
6393
|
+
});
|
|
6394
|
+
|
|
6395
|
+
function show() {
|
|
6396
|
+
if ($attrs.niceTooltipDisabled == true || $attrs.niceTooltipDisabled == "true") return;
|
|
6397
|
+
tooltipWindow.setAttribute('data-show', '');
|
|
6398
|
+
popper.update();
|
|
6399
|
+
}
|
|
6400
|
+
|
|
6401
|
+
function hide() {
|
|
6402
|
+
tooltipWindow.removeAttribute('data-show');
|
|
6403
|
+
}
|
|
6404
|
+
|
|
6405
|
+
showEvents.forEach((event) => {
|
|
6406
|
+
$element[0].addEventListener(event, show);
|
|
6407
|
+
});
|
|
6408
|
+
|
|
6409
|
+
hideEvents.forEach((event) => {
|
|
6410
|
+
$element[0].addEventListener(event, hide);
|
|
6411
|
+
});
|
|
6412
|
+
|
|
6413
|
+
// On destroy
|
|
6414
|
+
$scope.$on('$destroy', function () {
|
|
6415
|
+
tooltipWindow.remove();
|
|
6416
|
+
if (popper) popper.destroy();
|
|
6417
|
+
});
|
|
6418
|
+
}
|
|
6419
|
+
};
|
|
6420
|
+
});
|
|
6421
|
+
|
|
6422
|
+
/**
|
|
6423
|
+
* @ngdoc service
|
|
6395
6424
|
* @name niceElements.service:NiceService
|
|
6396
6425
|
* @function
|
|
6397
6426
|
* @description
|
|
@@ -6402,7 +6431,7 @@ angular.module('niceElements')
|
|
|
6402
6431
|
.service('NiceService', function ($rootScope) {
|
|
6403
6432
|
const service = {
|
|
6404
6433
|
name: "Nice elements",
|
|
6405
|
-
version: "1.12.
|
|
6434
|
+
version: "1.12.10",
|
|
6406
6435
|
getHeader: function () {
|
|
6407
6436
|
return {};
|
|
6408
6437
|
},
|
|
@@ -9580,6 +9609,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
9580
9609
|
"\n" +
|
|
9581
9610
|
"\r" +
|
|
9582
9611
|
"\n" +
|
|
9612
|
+
" <symbol id=\"icon-building\" viewBox=\"0 0 24 24\">\r" +
|
|
9613
|
+
"\n" +
|
|
9614
|
+
" <path d=\"M2.99966 1.00003C2.44737 1.00002 2 1.44774 2 2.00003V20C2 20.405 2.081 20.793 2.228 21.148C2.38 21.516 2.603 21.846 2.879 22.122C3.155 22.398 3.485 22.621 3.853 22.773C4.207 22.919 4.595 23 5 23H19C19.405 23 19.793 22.919 20.148 22.772C20.516 22.62 20.846 22.397 21.122 22.121C21.398 21.845 21.621 21.515 21.773 21.147C21.919 20.793 22 20.405 22 20V2.00001C22 1.44773 21.5528 1.00002 21.0005 1.00001C17.1935 0.999983 12.8183 1.00002 12 1.00001C11.0909 0.999999 6.46317 1.00004 2.99966 1.00003ZM16 21V12C16 11.448 15.552 11 15 11H9C8.448 11 8 11.448 8 12V21H5C4.863 21 4.734 20.973 4.618 20.925C4.496 20.875 4.386 20.8 4.293 20.707C4.2 20.614 4.126 20.504 4.075 20.382C4.027 20.266 4 20.137 4 20V4C4 3.44771 4.44772 3 5 3H12L18.9294 3C19.48 3 19.927 3.44503 19.9294 3.99558L20 20C20 20.137 19.973 20.266 19.925 20.382C19.875 20.504 19.8 20.614 19.707 20.707C19.614 20.8 19.504 20.874 19.382 20.925C19.266 20.973 19.137 21 19 21H16ZM10 21V13H14V21H10Z\"/>\r" +
|
|
9615
|
+
"\n" +
|
|
9616
|
+
" </symbol>\r" +
|
|
9617
|
+
"\n" +
|
|
9618
|
+
"\r" +
|
|
9619
|
+
"\n" +
|
|
9583
9620
|
" <symbol id=\"icon-image\" viewBox=\"0 0 24 24\">\r" +
|
|
9584
9621
|
"\n" +
|
|
9585
9622
|
" <path d=\"M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM11 8.5c0-0.69-0.281-1.316-0.732-1.768s-1.078-0.732-1.768-0.732-1.316 0.281-1.768 0.732-0.732 1.078-0.732 1.768 0.281 1.316 0.732 1.768 1.078 0.732 1.768 0.732 1.316-0.281 1.768-0.732 0.732-1.078 0.732-1.768zM9 8.5c0 0.138-0.055 0.262-0.146 0.354s-0.216 0.146-0.354 0.146-0.262-0.055-0.354-0.146-0.146-0.216-0.146-0.354 0.055-0.262 0.146-0.354 0.216-0.146 0.354-0.146 0.262 0.055 0.354 0.146 0.146 0.216 0.146 0.354zM7.414 20l8.586-8.586 4 4v3.586c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293zM20 12.586l-3.293-3.293c-0.391-0.391-1.024-0.391-1.414 0l-10.644 10.644c-0.135-0.050-0.255-0.129-0.356-0.23-0.182-0.182-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707z\"></path>\r" +
|
|
@@ -10910,8 +10947,6 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10910
10947
|
"\n" +
|
|
10911
10948
|
"\r" +
|
|
10912
10949
|
"\n" +
|
|
10913
|
-
"\r" +
|
|
10914
|
-
"\n" +
|
|
10915
10950
|
" <symbol id=\"icon-seat\" viewBox=\"0 0 370 370\">\r" +
|
|
10916
10951
|
"\n" +
|
|
10917
10952
|
" <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M31 261H339V300C339 329.823 314.823 354 285 354H85C55.1766 354 31 329.823 31 300V261ZM73.372 321C65.9937 316.906 61 309.036 61 300V291H309V300C309 309.036 304.006 316.906 296.628 321C293.183 322.911 289.219 324 285 324H85C80.7813 324 76.8167 322.911 73.372 321Z\"></path>\r" +
|
|
@@ -10928,6 +10963,24 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10928
10963
|
"\n" +
|
|
10929
10964
|
"\r" +
|
|
10930
10965
|
"\n" +
|
|
10966
|
+
" <symbol id=\"icon-nfc\" viewBox=\"0 0 24 24\">\r" +
|
|
10967
|
+
"\n" +
|
|
10968
|
+
" <path d=\"M18 6v12h-12v-12h3.984v2.016h-1.969v7.969h7.969v-7.969h-3v2.25q1.031 0.563 1.031 1.734 0 0.797-0.609 1.406t-1.406 0.609-1.406-0.609-0.609-1.406q0-1.172 1.031-1.734v-2.25q0-0.797 0.586-1.406t1.383-0.609h5.016zM20.016 20.016v-16.031h-16.031v16.031h16.031zM20.016 2.016q0.797 0 1.383 0.586t0.586 1.383v16.031q0 0.797-0.586 1.383t-1.383 0.586h-16.031q-0.797 0-1.383-0.586t-0.586-1.383v-16.031q0-0.797 0.586-1.383t1.383-0.586h16.031z\"></path>\r" +
|
|
10969
|
+
"\n" +
|
|
10970
|
+
" </symbol>\r" +
|
|
10971
|
+
"\n" +
|
|
10972
|
+
"\r" +
|
|
10973
|
+
"\n" +
|
|
10974
|
+
" <symbol id=\"icon-table\" viewBox=\"0 0 24 24\">\r" +
|
|
10975
|
+
"\n" +
|
|
10976
|
+
" <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M21 6.5C21 6.54552 20.9732 6.74803 20.5559 7.07695C20.1498 7.39698 19.5002 7.72891 18.6084 8.02619C16.8352 8.61726 14.3219 9 11.5 9C8.67808 9 6.16481 8.61726 4.39161 8.02619C3.49978 7.72891 2.8502 7.39698 2.44412 7.07695C2.02676 6.74803 2 6.54552 2 6.5C2 6.45448 2.02676 6.25197 2.44412 5.92305C2.8502 5.60302 3.49978 5.27109 4.39161 4.97381C6.16481 4.38274 8.67808 4 11.5 4C14.3219 4 16.8352 4.38274 18.6084 4.97381C19.5002 5.27109 20.1498 5.60302 20.5559 5.92305C20.9732 6.25197 21 6.45448 21 6.5ZM11.5 3C17.299 3 22 4.567 22 6.5V8.5C22 10.2633 18.0881 11.722 12.9994 11.9646C12.9998 11.9763 13 11.9881 13 12V17C14.7478 17.2826 16 18.0451 16 18.9414C16 20.0783 13.9853 21 11.5 21C9.01472 21 7 20.0783 7 18.9414C7 18.0451 8.25221 17.2826 10 17V12C10 11.9881 10.0002 11.9763 10.0006 11.9646C4.91189 11.722 1.00002 10.2633 1 8.5V8.49999V6.5C1 4.567 5.70101 3 11.5 3ZM10 17.8346C9.47361 17.9287 9.01248 18.0692 8.64293 18.2383C8.29686 18.3966 8.06633 18.5638 7.93315 18.7078C7.80389 18.8476 7.8 18.9251 7.8 18.9414C7.8 18.9577 7.80389 19.0353 7.93315 19.1751C8.06633 19.3191 8.29686 19.4863 8.64293 19.6446C9.33305 19.9603 10.3425 20.1766 11.5 20.1766C12.6575 20.1766 13.667 19.9603 14.3571 19.6446C14.7031 19.4863 14.9337 19.3191 15.0669 19.1751C15.1961 19.0353 15.2 18.9577 15.2 18.9414C15.2 18.9251 15.1961 18.8476 15.0669 18.7078C14.9337 18.5638 14.7031 18.3966 14.3571 18.2383C13.9875 18.0692 13.5264 17.9287 13 17.8346V18C13 18.5523 12.5523 19 12 19H11C10.4477 19 10 18.5523 10 18V17.8346ZM11.5 12C11.2648 12 11.0315 11.9974 10.8001 11.9923L10.8 12V18C10.8 18.1105 10.8895 18.2 11 18.2H12C12.1105 18.2 12.2 18.1105 12.2 18V12L12.1999 11.9923C11.9685 11.9974 11.7352 12 11.5 12ZM2 8.49999V8.5C2 8.54554 2.02679 8.74805 2.44412 9.07693C2.8502 9.39696 3.49978 9.7289 4.39161 10.0262C6.16481 10.6172 8.67808 11 11.5 11C14.3219 11 16.8352 10.6172 18.6084 10.0262C19.5002 9.7289 20.1498 9.39696 20.5559 9.07693C20.9732 8.74802 21 8.54551 21 8.5V7.99265C19.3193 9.17908 15.6973 10 11.5 10C7.30273 10 3.68067 9.17908 2 7.99265V8.49999Z\"/>\r" +
|
|
10977
|
+
"\n" +
|
|
10978
|
+
" <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M21 6.5C21 6.54552 20.9732 6.74803 20.5559 7.07695C20.1498 7.39698 19.5002 7.72891 18.6084 8.02619C16.8352 8.61726 14.3219 9 11.5 9C8.67808 9 6.16481 8.61726 4.39161 8.02619C3.49978 7.72891 2.8502 7.39698 2.44412 7.07695C2.02676 6.74803 2 6.54552 2 6.5C2 6.45448 2.02676 6.25197 2.44412 5.92305C2.8502 5.60302 3.49978 5.27109 4.39161 4.97381C6.16481 4.38274 8.67808 4 11.5 4C14.3219 4 16.8352 4.38274 18.6084 4.97381C19.5002 5.27109 20.1498 5.60302 20.5559 5.92305C20.9732 6.25197 21 6.45448 21 6.5ZM11.5 3C17.299 3 22 4.567 22 6.5V8.5C22 10.2633 18.0881 11.722 12.9994 11.9646C12.9998 11.9763 13 11.9881 13 12V17C14.7478 17.2826 16 18.0451 16 18.9414C16 20.0783 13.9853 21 11.5 21C9.01472 21 7 20.0783 7 18.9414C7 18.0451 8.25221 17.2826 10 17V12C10 11.9881 10.0002 11.9763 10.0006 11.9646C4.91189 11.722 1.00002 10.2633 1 8.5V8.49999V6.5C1 4.567 5.70101 3 11.5 3ZM10 17.8346C9.47361 17.9287 9.01248 18.0692 8.64293 18.2383C8.29686 18.3966 8.06633 18.5638 7.93315 18.7078C7.80389 18.8476 7.8 18.9251 7.8 18.9414C7.8 18.9577 7.80389 19.0353 7.93315 19.1751C8.06633 19.3191 8.29686 19.4863 8.64293 19.6446C9.33305 19.9603 10.3425 20.1766 11.5 20.1766C12.6575 20.1766 13.667 19.9603 14.3571 19.6446C14.7031 19.4863 14.9337 19.3191 15.0669 19.1751C15.1961 19.0353 15.2 18.9577 15.2 18.9414C15.2 18.9251 15.1961 18.8476 15.0669 18.7078C14.9337 18.5638 14.7031 18.3966 14.3571 18.2383C13.9875 18.0692 13.5264 17.9287 13 17.8346V18C13 18.5523 12.5523 19 12 19H11C10.4477 19 10 18.5523 10 18V17.8346ZM11.5 12C11.2648 12 11.0315 11.9974 10.8001 11.9923L10.8 12V18C10.8 18.1105 10.8895 18.2 11 18.2H12C12.1105 18.2 12.2 18.1105 12.2 18V12L12.1999 11.9923C11.9685 11.9974 11.7352 12 11.5 12ZM2 8.49999V8.5C2 8.54554 2.02679 8.74805 2.44412 9.07693C2.8502 9.39696 3.49978 9.7289 4.39161 10.0262C6.16481 10.6172 8.67808 11 11.5 11C14.3219 11 16.8352 10.6172 18.6084 10.0262C19.5002 9.7289 20.1498 9.39696 20.5559 9.07693C20.9732 8.74802 21 8.54551 21 8.5V7.99265C19.3193 9.17908 15.6973 10 11.5 10C7.30273 10 3.68067 9.17908 2 7.99265V8.49999Z\"/>\r" +
|
|
10979
|
+
"\n" +
|
|
10980
|
+
" </symbol>\r" +
|
|
10981
|
+
"\n" +
|
|
10982
|
+
"\r" +
|
|
10983
|
+
"\n" +
|
|
10931
10984
|
" <symbol id=\"flag-sl\" viewBox=\"0 0 640 480\">\r" +
|
|
10932
10985
|
"\n" +
|
|
10933
10986
|
" <path fill=\"#fff\" d=\"M-62 0H962v512H-62z\"/>\r" +
|