nice-elements 1.12.9 → 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 +7 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +116 -6
- package/dist/nice.min.js +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 +2 -2
- package/src/services/nice-service.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
|
|
3
10
|
## v1.12.9 (14.10.2025)
|
|
4
11
|
|
|
5
12
|
- created nice-infinite-loader directive,
|
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
|
|
package/bower.json
CHANGED
package/dist/nice.js
CHANGED
|
@@ -5863,7 +5863,8 @@ angular.module('niceElements')
|
|
|
5863
5863
|
scope.uploadFunction(inputObj.files[0]).then(function (response) {
|
|
5864
5864
|
scope.loading = false;
|
|
5865
5865
|
scope.imageSource = event.target.result;
|
|
5866
|
-
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;
|
|
5867
5868
|
scope.form.$setDirty();
|
|
5868
5869
|
}, function (error) {
|
|
5869
5870
|
// Handle upload function error
|
|
@@ -6326,13 +6327,98 @@ angular.module('niceElements')
|
|
|
6326
6327
|
|
|
6327
6328
|
// Scroll Event Listener
|
|
6328
6329
|
element[0].addEventListener('scroll', () => {
|
|
6329
|
-
if (isScrolledToBottom(element[0]) && !scope.$eval(attrs.
|
|
6330
|
-
scope.$eval(attrs.
|
|
6330
|
+
if (isScrolledToBottom(element[0]) && !scope.$eval(attrs.niceInfiniteLoaderDisabled)) {
|
|
6331
|
+
scope.$eval(attrs.niceInfiniteLoader);
|
|
6331
6332
|
}
|
|
6332
6333
|
});
|
|
6333
6334
|
}
|
|
6334
6335
|
};
|
|
6335
6336
|
});
|
|
6337
|
+
'use strict';
|
|
6338
|
+
|
|
6339
|
+
/**
|
|
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
|
+
|
|
6336
6422
|
/**
|
|
6337
6423
|
* @ngdoc service
|
|
6338
6424
|
* @name niceElements.service:NiceService
|
|
@@ -6345,7 +6431,7 @@ angular.module('niceElements')
|
|
|
6345
6431
|
.service('NiceService', function ($rootScope) {
|
|
6346
6432
|
const service = {
|
|
6347
6433
|
name: "Nice elements",
|
|
6348
|
-
version: "1.12.
|
|
6434
|
+
version: "1.12.10",
|
|
6349
6435
|
getHeader: function () {
|
|
6350
6436
|
return {};
|
|
6351
6437
|
},
|
|
@@ -9523,6 +9609,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
9523
9609
|
"\n" +
|
|
9524
9610
|
"\r" +
|
|
9525
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" +
|
|
9526
9620
|
" <symbol id=\"icon-image\" viewBox=\"0 0 24 24\">\r" +
|
|
9527
9621
|
"\n" +
|
|
9528
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" +
|
|
@@ -10853,8 +10947,6 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10853
10947
|
"\n" +
|
|
10854
10948
|
"\r" +
|
|
10855
10949
|
"\n" +
|
|
10856
|
-
"\r" +
|
|
10857
|
-
"\n" +
|
|
10858
10950
|
" <symbol id=\"icon-seat\" viewBox=\"0 0 370 370\">\r" +
|
|
10859
10951
|
"\n" +
|
|
10860
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" +
|
|
@@ -10871,6 +10963,24 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
10871
10963
|
"\n" +
|
|
10872
10964
|
"\r" +
|
|
10873
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" +
|
|
10874
10984
|
" <symbol id=\"flag-sl\" viewBox=\"0 0 640 480\">\r" +
|
|
10875
10985
|
"\n" +
|
|
10876
10986
|
" <path fill=\"#fff\" d=\"M-62 0H962v512H-62z\"/>\r" +
|