gnui 1.2.15 → 1.2.17

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.
Files changed (76) hide show
  1. package/dist/js/gnui.esm.js +48 -19
  2. package/dist/js/gnui.js +48 -19
  3. package/dist/js/gnui.min.js +1 -1
  4. package/dist/styles/default.css +21693 -1
  5. package/dist/styles/gpi.css +21724 -1
  6. package/dist/styles/green24.css +22449 -1
  7. package/dist/styles/insights.css +21715 -1
  8. package/dist/styles/nac.css +21732 -1
  9. package/dist/styles/ztnac.css +22450 -1
  10. package/package.json +3 -3
  11. package/styleguide/assets/js/gnui.js +48 -19
  12. package/styleguide/assets/js/gnui.min.js +1 -1
  13. package/styleguide/assets/styles/default.css +21693 -1
  14. package/styleguide/assets/styles/gpi.css +21724 -1
  15. package/styleguide/assets/styles/green24.css +22449 -1
  16. package/styleguide/assets/styles/insights.css +21715 -1
  17. package/styleguide/assets/styles/nac.css +21732 -1
  18. package/styleguide/assets/styles/ztnac.css +22450 -1
  19. package/styleguide/category/COLOR/index.html +1 -1
  20. package/styleguide/category/COMPONENT/Alert(js)/index.html +1 -1
  21. package/styleguide/category/COMPONENT/Bignumber/index.html +1 -1
  22. package/styleguide/category/COMPONENT/Breadcrumb/index.html +1 -1
  23. package/styleguide/category/COMPONENT/Calendar(js)/index.html +1 -1
  24. package/styleguide/category/COMPONENT/Card/index.html +1 -1
  25. package/styleguide/category/COMPONENT/Chart(js)/index.html +1 -1
  26. package/styleguide/category/COMPONENT/Datagrid(js)/index.html +1 -1
  27. package/styleguide/category/COMPONENT/Datalist(js)/index.html +1 -1
  28. package/styleguide/category/COMPONENT/Growl(js)/index.html +1 -1
  29. package/styleguide/category/COMPONENT/JsonView(js)/index.html +1 -1
  30. package/styleguide/category/COMPONENT/Loader(js)/index.html +1 -1
  31. package/styleguide/category/COMPONENT/MenuButton(js)/index.html +1 -1
  32. package/styleguide/category/COMPONENT/Message(js)/index.html +1 -1
  33. package/styleguide/category/COMPONENT/Modal(js)/index.html +1 -1
  34. package/styleguide/category/COMPONENT/Pagination(js)/index.html +1 -1
  35. package/styleguide/category/COMPONENT/Panel/index.html +1 -1
  36. package/styleguide/category/COMPONENT/Progressbar(js)/index.html +1 -1
  37. package/styleguide/category/COMPONENT/Tab(js)/index.html +1 -1
  38. package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +1 -1
  39. package/styleguide/category/COMPONENT/Tooltip(js)/index.html +1 -1
  40. package/styleguide/category/COMPONENT/Tree(js)/index.html +1 -1
  41. package/styleguide/category/CONTROLS/Button(js)/index.html +1 -1
  42. package/styleguide/category/CONTROLS/Checkbox/index.html +1 -1
  43. package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +1 -1
  44. package/styleguide/category/CONTROLS/Datepicker(js)/index.html +1 -1
  45. package/styleguide/category/CONTROLS/Dropdown(js)/index.html +1 -1
  46. package/styleguide/category/CONTROLS/File/index.html +1 -1
  47. package/styleguide/category/CONTROLS/Form/Control/index.html +1 -1
  48. package/styleguide/category/CONTROLS/Form/Field/index.html +1 -1
  49. package/styleguide/category/CONTROLS/Form/Plain/index.html +1 -1
  50. package/styleguide/category/CONTROLS/Input/index.html +1 -1
  51. package/styleguide/category/CONTROLS/MultiText(js)/index.html +1 -1
  52. package/styleguide/category/CONTROLS/Picklist(js)/index.html +1 -1
  53. package/styleguide/category/CONTROLS/Radio/index.html +1 -1
  54. package/styleguide/category/CONTROLS/Select/index.html +1 -1
  55. package/styleguide/category/CONTROLS/SelectButton(js)/index.html +1 -1
  56. package/styleguide/category/CONTROLS/Slider/index.html +1 -1
  57. package/styleguide/category/CONTROLS/Switch(js)/index.html +1 -1
  58. package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +1 -1
  59. package/styleguide/category/CONTROLS/Textarea/index.html +1 -1
  60. package/styleguide/category/CONTROLS/Time(js)/index.html +1 -1
  61. package/styleguide/category/ELEMENTS/Box/index.html +1 -1
  62. package/styleguide/category/ELEMENTS/Icon/index.html +1 -1
  63. package/styleguide/category/ELEMENTS/Image/index.html +1 -1
  64. package/styleguide/category/ELEMENTS/List/index.html +1 -1
  65. package/styleguide/category/ELEMENTS/Table/index.html +1 -1
  66. package/styleguide/category/ELEMENTS/Tag/index.html +1 -1
  67. package/styleguide/category/ELEMENTS/Title/index.html +1 -1
  68. package/styleguide/category/LAYOUT/Container/index.html +1 -1
  69. package/styleguide/category/LAYOUT/Grid/index.html +1 -1
  70. package/styleguide/category/LAYOUT/Splitter(js)/index.html +1 -1
  71. package/styleguide/category/UTILITY/index.html +1 -1
  72. package/styleguide/category/Utils/index.html +1 -1
  73. package/styleguide/color.html +1 -1
  74. package/styleguide/index.html +1 -1
  75. package/styleguide/tag/javascript/index.html +1 -1
  76. package/styleguide/tag/v.0.1.0/index.html +1 -1
@@ -14112,15 +14112,15 @@ function findValue(obj, pathString) {
14112
14112
  if (!obj || !pathString) {
14113
14113
  return "";
14114
14114
  }
14115
- if (isString(pathString)) {
14116
- pathString = pathString.split(".");
14117
- }
14118
- const currentPath = pathString.splice(0, 1)[0];
14119
- if (obj[currentPath] !== void 0) {
14120
- return pathString.length ? findValue(obj[currentPath], pathString) : obj[currentPath];
14121
- } else {
14122
- return "";
14115
+ const keys = isString(pathString) ? pathString.split(".") : pathString;
14116
+ let current = obj;
14117
+ for (const key of keys) {
14118
+ if (current === void 0 || current === null) {
14119
+ return "";
14120
+ }
14121
+ current = current[key];
14123
14122
  }
14123
+ return current !== void 0 ? current : "";
14124
14124
  }
14125
14125
  function findProperty(obj, predicate) {
14126
14126
  let result = [];
@@ -14259,17 +14259,18 @@ function interpolateURL(url, source) {
14259
14259
  return dmustach.test(result) ? interpolateURL(result, source) : result;
14260
14260
  }
14261
14261
  function interpolateCop(textCondition, data2, parent2, $2) {
14262
- const onlymustach = /^\{{2}[^{}]*\}{2}$/;
14262
+ const onlymustach = /^\{{2}[\w.$\[\]]+\}{2}$/;
14263
14263
  if (onlymustach.test(textCondition)) {
14264
14264
  const path = textCondition.replace("{{", "").replace("}}", "");
14265
14265
  return findValue({ data: data2, parent: parent2, $: $2 }, path);
14266
14266
  }
14267
14267
  const dmustach = new RegExp(/\{{([^{}]*)}}/gm);
14268
+ const context = { data: data2, parent: parent2, $: $2 };
14268
14269
  const result = textCondition.replace(dmustach, (match) => {
14269
14270
  const conditionalOp = match.replace(/\{{|\}}/gm, "");
14270
- return new Function("data", "parent", "$", "return " + conditionalOp)(data2, parent2, $2);
14271
+ return new Function("ctx", "const {data, parent, $} = ctx; return " + conditionalOp)(context);
14271
14272
  });
14272
- return dmustach.test(result) ? this.interpolateCop(result, data2, parent2, $2) : result;
14273
+ return dmustach.test(result) ? interpolateCop(result, context.data, context.parent, context.$) : result;
14273
14274
  }
14274
14275
  function parseBundle(text2, locale) {
14275
14276
  let _value = text2;
@@ -14703,7 +14704,10 @@ function apply(element, args, fn) {
14703
14704
  });
14704
14705
  }
14705
14706
  function getArgs(args) {
14706
- return args.reduce((args2, arg) => args2.concat.call(args2, isString(arg) && includes(arg, " ") ? arg.trim().split(" ") : arg), []);
14707
+ return args.reduce(
14708
+ (args2, arg) => args2.concat.call(args2, isString(arg) && includes(arg, " ") ? arg.trim().split(" ") : arg),
14709
+ []
14710
+ );
14707
14711
  }
14708
14712
  var supports = {
14709
14713
  get Multiple() {
@@ -14729,7 +14733,7 @@ function hslToRgb([h, s, l]) {
14729
14733
  s = s / 100;
14730
14734
  l = l / 100;
14731
14735
  const c = (1 - Math.abs(2 * l - 1)) * s, x = c * (1 - Math.abs(h / 60 % 2 - 1)), m = l - c / 2;
14732
- let r, g, b;
14736
+ let r = 0, g = 0, b = 0;
14733
14737
  switch (true) {
14734
14738
  case (h > -1 && h < 60):
14735
14739
  r = c;
@@ -15008,7 +15012,14 @@ function monthData(locale) {
15008
15012
  function dateData(locale) {
15009
15013
  return ["S", "M", "T", "W", "T", "F", "S"];
15010
15014
  }
15011
- function objToDate({ year, month, day, hour, minute, second }) {
15015
+ function objToDate({
15016
+ year,
15017
+ month,
15018
+ day,
15019
+ hour,
15020
+ minute,
15021
+ second
15022
+ }) {
15012
15023
  if (hour === void 0) {
15013
15024
  hour = "00";
15014
15025
  }
@@ -15237,7 +15248,11 @@ function offset(element, coordinates) {
15237
15248
  ["left", "top"].forEach((prop) => {
15238
15249
  if (prop in coordinates) {
15239
15250
  const value = css$1(element, prop);
15240
- css$1(element, prop, coordinates[prop] - (currentOffset == null ? void 0 : currentOffset[prop]) + toFloat(pos === "absolute" && value === "auto" ? position(element)[prop] : value));
15251
+ css$1(
15252
+ element,
15253
+ prop,
15254
+ coordinates[prop] - (currentOffset == null ? void 0 : currentOffset[prop]) + toFloat(pos === "absolute" && value === "auto" ? position(element)[prop] : value)
15255
+ );
15241
15256
  }
15242
15257
  });
15243
15258
  }
@@ -15360,7 +15375,10 @@ function before(ref, element) {
15360
15375
  }
15361
15376
  function after(ref, element) {
15362
15377
  ref = $(ref);
15363
- return insertNodes(element, (element2) => ref.nextSibling ? before(ref.nextSibling, element2) : append(ref.parentNode, element2));
15378
+ return insertNodes(
15379
+ element,
15380
+ (element2) => ref.nextSibling ? before(ref.nextSibling, element2) : append(ref.parentNode, element2)
15381
+ );
15364
15382
  }
15365
15383
  function insertNodes(element, fn) {
15366
15384
  element = isString(element) ? fragment(element) : element;
@@ -15384,13 +15402,21 @@ function on(...args) {
15384
15402
  listener = delegate(targets, selector, listener);
15385
15403
  }
15386
15404
  useCapture = useCaptureFilter(useCapture);
15387
- type.split(" ").forEach((type2) => targets.forEach((target) => target.addEventListener(type2, listener, useCapture)));
15405
+ type.split(" ").forEach(
15406
+ (type2) => targets.forEach(
15407
+ (target) => target.addEventListener(type2, listener, useCapture)
15408
+ )
15409
+ );
15388
15410
  return () => off(targets, type, listener, useCapture);
15389
15411
  }
15390
15412
  function off(targets, type, listener, useCapture = false) {
15391
15413
  useCapture = useCaptureFilter(useCapture);
15392
15414
  targets = toEventTargets(targets);
15393
- type.split(" ").forEach((type2) => targets.forEach((target) => target.removeEventListener(type2, listener, useCapture)));
15415
+ type.split(" ").forEach(
15416
+ (type2) => targets.forEach(
15417
+ (target) => target.removeEventListener(type2, listener, useCapture)
15418
+ )
15419
+ );
15394
15420
  }
15395
15421
  function once(...args) {
15396
15422
  const [element, type, selector, listener, useCapture, condition] = getArgs2(args);
@@ -15410,7 +15436,10 @@ function once(...args) {
15410
15436
  return off2;
15411
15437
  }
15412
15438
  function trigger(targets, event, detail2) {
15413
- return toEventTargets(targets).reduce((notCanceled, target) => notCanceled && target.dispatchEvent(createEvent(event, true, true, detail2)), true);
15439
+ return toEventTargets(targets).reduce(
15440
+ (notCanceled, target) => notCanceled && target.dispatchEvent(createEvent(event, true, true, detail2)),
15441
+ true
15442
+ );
15414
15443
  }
15415
15444
  function createEvent(e, bubbles = true, cancelable = false, detail2) {
15416
15445
  if (isString(e)) {
package/dist/js/gnui.js CHANGED
@@ -14118,15 +14118,15 @@
14118
14118
  if (!obj || !pathString) {
14119
14119
  return "";
14120
14120
  }
14121
- if (isString(pathString)) {
14122
- pathString = pathString.split(".");
14123
- }
14124
- const currentPath = pathString.splice(0, 1)[0];
14125
- if (obj[currentPath] !== void 0) {
14126
- return pathString.length ? findValue(obj[currentPath], pathString) : obj[currentPath];
14127
- } else {
14128
- return "";
14121
+ const keys = isString(pathString) ? pathString.split(".") : pathString;
14122
+ let current = obj;
14123
+ for (const key of keys) {
14124
+ if (current === void 0 || current === null) {
14125
+ return "";
14126
+ }
14127
+ current = current[key];
14129
14128
  }
14129
+ return current !== void 0 ? current : "";
14130
14130
  }
14131
14131
  function findProperty(obj, predicate) {
14132
14132
  let result = [];
@@ -14265,17 +14265,18 @@
14265
14265
  return dmustach.test(result) ? interpolateURL(result, source) : result;
14266
14266
  }
14267
14267
  function interpolateCop(textCondition, data2, parent2, $2) {
14268
- const onlymustach = /^\{{2}[^{}]*\}{2}$/;
14268
+ const onlymustach = /^\{{2}[\w.$\[\]]+\}{2}$/;
14269
14269
  if (onlymustach.test(textCondition)) {
14270
14270
  const path = textCondition.replace("{{", "").replace("}}", "");
14271
14271
  return findValue({ data: data2, parent: parent2, $: $2 }, path);
14272
14272
  }
14273
14273
  const dmustach = new RegExp(/\{{([^{}]*)}}/gm);
14274
+ const context = { data: data2, parent: parent2, $: $2 };
14274
14275
  const result = textCondition.replace(dmustach, (match) => {
14275
14276
  const conditionalOp = match.replace(/\{{|\}}/gm, "");
14276
- return new Function("data", "parent", "$", "return " + conditionalOp)(data2, parent2, $2);
14277
+ return new Function("ctx", "const {data, parent, $} = ctx; return " + conditionalOp)(context);
14277
14278
  });
14278
- return dmustach.test(result) ? this.interpolateCop(result, data2, parent2, $2) : result;
14279
+ return dmustach.test(result) ? interpolateCop(result, context.data, context.parent, context.$) : result;
14279
14280
  }
14280
14281
  function parseBundle(text2, locale) {
14281
14282
  let _value = text2;
@@ -14709,7 +14710,10 @@
14709
14710
  });
14710
14711
  }
14711
14712
  function getArgs(args) {
14712
- return args.reduce((args2, arg) => args2.concat.call(args2, isString(arg) && includes(arg, " ") ? arg.trim().split(" ") : arg), []);
14713
+ return args.reduce(
14714
+ (args2, arg) => args2.concat.call(args2, isString(arg) && includes(arg, " ") ? arg.trim().split(" ") : arg),
14715
+ []
14716
+ );
14713
14717
  }
14714
14718
  var supports = {
14715
14719
  get Multiple() {
@@ -14735,7 +14739,7 @@
14735
14739
  s = s / 100;
14736
14740
  l = l / 100;
14737
14741
  const c = (1 - Math.abs(2 * l - 1)) * s, x = c * (1 - Math.abs(h / 60 % 2 - 1)), m = l - c / 2;
14738
- let r, g, b;
14742
+ let r = 0, g = 0, b = 0;
14739
14743
  switch (true) {
14740
14744
  case (h > -1 && h < 60):
14741
14745
  r = c;
@@ -15014,7 +15018,14 @@
15014
15018
  function dateData(locale) {
15015
15019
  return ["S", "M", "T", "W", "T", "F", "S"];
15016
15020
  }
15017
- function objToDate({ year, month, day, hour, minute, second }) {
15021
+ function objToDate({
15022
+ year,
15023
+ month,
15024
+ day,
15025
+ hour,
15026
+ minute,
15027
+ second
15028
+ }) {
15018
15029
  if (hour === void 0) {
15019
15030
  hour = "00";
15020
15031
  }
@@ -15243,7 +15254,11 @@
15243
15254
  ["left", "top"].forEach((prop) => {
15244
15255
  if (prop in coordinates) {
15245
15256
  const value = css$1(element, prop);
15246
- css$1(element, prop, coordinates[prop] - (currentOffset == null ? void 0 : currentOffset[prop]) + toFloat(pos === "absolute" && value === "auto" ? position(element)[prop] : value));
15257
+ css$1(
15258
+ element,
15259
+ prop,
15260
+ coordinates[prop] - (currentOffset == null ? void 0 : currentOffset[prop]) + toFloat(pos === "absolute" && value === "auto" ? position(element)[prop] : value)
15261
+ );
15247
15262
  }
15248
15263
  });
15249
15264
  }
@@ -15366,7 +15381,10 @@
15366
15381
  }
15367
15382
  function after(ref, element) {
15368
15383
  ref = $(ref);
15369
- return insertNodes(element, (element2) => ref.nextSibling ? before(ref.nextSibling, element2) : append(ref.parentNode, element2));
15384
+ return insertNodes(
15385
+ element,
15386
+ (element2) => ref.nextSibling ? before(ref.nextSibling, element2) : append(ref.parentNode, element2)
15387
+ );
15370
15388
  }
15371
15389
  function insertNodes(element, fn) {
15372
15390
  element = isString(element) ? fragment(element) : element;
@@ -15390,13 +15408,21 @@
15390
15408
  listener = delegate(targets, selector, listener);
15391
15409
  }
15392
15410
  useCapture = useCaptureFilter(useCapture);
15393
- type.split(" ").forEach((type2) => targets.forEach((target) => target.addEventListener(type2, listener, useCapture)));
15411
+ type.split(" ").forEach(
15412
+ (type2) => targets.forEach(
15413
+ (target) => target.addEventListener(type2, listener, useCapture)
15414
+ )
15415
+ );
15394
15416
  return () => off(targets, type, listener, useCapture);
15395
15417
  }
15396
15418
  function off(targets, type, listener, useCapture = false) {
15397
15419
  useCapture = useCaptureFilter(useCapture);
15398
15420
  targets = toEventTargets(targets);
15399
- type.split(" ").forEach((type2) => targets.forEach((target) => target.removeEventListener(type2, listener, useCapture)));
15421
+ type.split(" ").forEach(
15422
+ (type2) => targets.forEach(
15423
+ (target) => target.removeEventListener(type2, listener, useCapture)
15424
+ )
15425
+ );
15400
15426
  }
15401
15427
  function once(...args) {
15402
15428
  const [element, type, selector, listener, useCapture, condition] = getArgs2(args);
@@ -15416,7 +15442,10 @@
15416
15442
  return off2;
15417
15443
  }
15418
15444
  function trigger(targets, event, detail2) {
15419
- return toEventTargets(targets).reduce((notCanceled, target) => notCanceled && target.dispatchEvent(createEvent(event, true, true, detail2)), true);
15445
+ return toEventTargets(targets).reduce(
15446
+ (notCanceled, target) => notCanceled && target.dispatchEvent(createEvent(event, true, true, detail2)),
15447
+ true
15448
+ );
15420
15449
  }
15421
15450
  function createEvent(e, bubbles = true, cancelable = false, detail2) {
15422
15451
  if (isString(e)) {