gnui 1.2.16 → 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.
- package/dist/js/gnui.esm.js +48 -19
- package/dist/js/gnui.js +48 -19
- package/dist/js/gnui.min.js +1 -1
- package/dist/styles/default.css +0 -1
- package/dist/styles/gpi.css +0 -1
- package/dist/styles/green24.css +0 -1
- package/dist/styles/insights.css +0 -1
- package/dist/styles/nac.css +0 -1
- package/dist/styles/ztnac.css +0 -1
- package/package.json +2 -2
- package/styleguide/assets/js/gnui.js +48 -19
- package/styleguide/assets/js/gnui.min.js +1 -1
- package/styleguide/assets/styles/default.css +0 -1
- package/styleguide/assets/styles/gpi.css +0 -1
- package/styleguide/assets/styles/green24.css +0 -1
- package/styleguide/assets/styles/insights.css +0 -1
- package/styleguide/assets/styles/nac.css +0 -1
- package/styleguide/assets/styles/ztnac.css +0 -1
- package/styleguide/category/COLOR/index.html +1 -1
- package/styleguide/category/COMPONENT/Alert(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Bignumber/index.html +1 -1
- package/styleguide/category/COMPONENT/Breadcrumb/index.html +1 -1
- package/styleguide/category/COMPONENT/Calendar(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Card/index.html +1 -1
- package/styleguide/category/COMPONENT/Chart(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Datagrid(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Datalist(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Growl(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/JsonView(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Loader(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/MenuButton(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Message(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Modal(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Pagination(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Panel/index.html +1 -1
- package/styleguide/category/COMPONENT/Progressbar(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tab(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tooltip(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tree(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Button(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Checkbox/index.html +1 -1
- package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Datepicker(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Dropdown(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/File/index.html +1 -1
- package/styleguide/category/CONTROLS/Form/Control/index.html +1 -1
- package/styleguide/category/CONTROLS/Form/Field/index.html +1 -1
- package/styleguide/category/CONTROLS/Form/Plain/index.html +1 -1
- package/styleguide/category/CONTROLS/Input/index.html +1 -1
- package/styleguide/category/CONTROLS/MultiText(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Picklist(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Radio/index.html +1 -1
- package/styleguide/category/CONTROLS/Select/index.html +1 -1
- package/styleguide/category/CONTROLS/SelectButton(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Slider/index.html +1 -1
- package/styleguide/category/CONTROLS/Switch(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Textarea/index.html +1 -1
- package/styleguide/category/CONTROLS/Time(js)/index.html +1 -1
- package/styleguide/category/ELEMENTS/Box/index.html +1 -1
- package/styleguide/category/ELEMENTS/Icon/index.html +1 -1
- package/styleguide/category/ELEMENTS/Image/index.html +1 -1
- package/styleguide/category/ELEMENTS/List/index.html +1 -1
- package/styleguide/category/ELEMENTS/Table/index.html +1 -1
- package/styleguide/category/ELEMENTS/Tag/index.html +1 -1
- package/styleguide/category/ELEMENTS/Title/index.html +1 -1
- package/styleguide/category/LAYOUT/Container/index.html +1 -1
- package/styleguide/category/LAYOUT/Grid/index.html +1 -1
- package/styleguide/category/LAYOUT/Splitter(js)/index.html +1 -1
- package/styleguide/category/UTILITY/index.html +1 -1
- package/styleguide/category/Utils/index.html +1 -1
- package/styleguide/color.html +1 -1
- package/styleguide/index.html +1 -1
- package/styleguide/tag/javascript/index.html +1 -1
- package/styleguide/tag/v.0.1.0/index.html +1 -1
package/dist/js/gnui.esm.js
CHANGED
|
@@ -14112,15 +14112,15 @@ function findValue(obj, pathString) {
|
|
|
14112
14112
|
if (!obj || !pathString) {
|
|
14113
14113
|
return "";
|
|
14114
14114
|
}
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
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}[
|
|
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("
|
|
14271
|
+
return new Function("ctx", "const {data, parent, $} = ctx; return " + conditionalOp)(context);
|
|
14271
14272
|
});
|
|
14272
|
-
return dmustach.test(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(
|
|
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({
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
|
|
14127
|
-
|
|
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}[
|
|
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("
|
|
14277
|
+
return new Function("ctx", "const {data, parent, $} = ctx; return " + conditionalOp)(context);
|
|
14277
14278
|
});
|
|
14278
|
-
return dmustach.test(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(
|
|
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({
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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)) {
|