primereact 10.0.0 → 10.0.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/README.md +1 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.min.mjs +1 -1
- package/componentbase/componentbase.esm.mjs +12 -7
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/package.json +1 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.min.mjs +1 -1
- package/primereact.all.esm.mjs +12 -7
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.js +0 -421
- package/accordion/accordion.esm.min.js +0 -1
- package/api/api.esm.js +0 -944
- package/api/api.esm.min.js +0 -1
- package/autocomplete/autocomplete.esm.js +0 -1127
- package/autocomplete/autocomplete.esm.min.js +0 -1
- package/avatar/avatar.esm.js +0 -245
- package/avatar/avatar.esm.min.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -55
- package/avatargroup/avatargroup.esm.min.js +0 -1
- package/badge/badge.esm.js +0 -110
- package/badge/badge.esm.min.js +0 -1
- package/blockui/blockui.esm.js +0 -265
- package/blockui/blockui.esm.min.js +0 -1
- package/breadcrumb/breadcrumb.esm.js +0 -351
- package/breadcrumb/breadcrumb.esm.min.js +0 -1
- package/button/button.esm.js +0 -295
- package/button/button.esm.min.js +0 -1
- package/calendar/calendar.esm.js +0 -3473
- package/calendar/calendar.esm.min.js +0 -1
- package/card/card.esm.js +0 -98
- package/card/card.esm.min.js +0 -1
- package/carousel/carousel.esm.js +0 -801
- package/carousel/carousel.esm.min.js +0 -1
- package/cascadeselect/cascadeselect.esm.js +0 -819
- package/cascadeselect/cascadeselect.esm.min.js +0 -1
- package/chart/chart.esm.js +0 -155
- package/chart/chart.esm.min.js +0 -1
- package/checkbox/checkbox.esm.js +0 -357
- package/checkbox/checkbox.esm.min.js +0 -1
- package/chip/chip.esm.js +0 -248
- package/chip/chip.esm.min.js +0 -1
- package/chips/chips.esm.js +0 -501
- package/chips/chips.esm.min.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -788
- package/colorpicker/colorpicker.esm.min.js +0 -1
- package/column/column.esm.js +0 -8
- package/column/column.esm.min.js +0 -1
- package/columngroup/columngroup.esm.js +0 -6
- package/columngroup/columngroup.esm.min.js +0 -1
- package/componentbase/componentbase.esm.js +0 -323
- package/componentbase/componentbase.esm.min.js +0 -1
- package/confirmdialog/confirmdialog.esm.js +0 -376
- package/confirmdialog/confirmdialog.esm.min.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -610
- package/confirmpopup/confirmpopup.esm.min.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -664
- package/contextmenu/contextmenu.esm.min.js +0 -1
- package/csstransition/csstransition.esm.js +0 -138
- package/csstransition/csstransition.esm.min.js +0 -1
- package/datascroller/datascroller.esm.js +0 -320
- package/datascroller/datascroller.esm.min.js +0 -1
- package/datatable/datatable.esm.js +0 -6636
- package/datatable/datatable.esm.min.js +0 -1
- package/dataview/dataview.esm.js +0 -506
- package/dataview/dataview.esm.min.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -133
- package/deferredcontent/deferredcontent.esm.min.js +0 -1
- package/dialog/dialog.esm.js +0 -983
- package/dialog/dialog.esm.min.js +0 -1
- package/divider/divider.esm.js +0 -79
- package/divider/divider.esm.min.js +0 -1
- package/dock/dock.esm.js +0 -348
- package/dock/dock.esm.min.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1380
- package/dropdown/dropdown.esm.min.js +0 -1
- package/editor/editor.esm.js +0 -338
- package/editor/editor.esm.min.js +0 -1
- package/fieldset/fieldset.esm.js +0 -270
- package/fieldset/fieldset.esm.min.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1005
- package/fileupload/fileupload.esm.min.js +0 -1
- package/galleria/galleria.esm.js +0 -1090
- package/galleria/galleria.esm.min.js +0 -1
- package/hooks/hooks.esm.js +0 -1042
- package/hooks/hooks.esm.min.js +0 -1
- package/iconbase/iconbase.esm.js +0 -33
- package/iconbase/iconbase.esm.min.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -39
- package/icons/angledoubledown/index.esm.min.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -39
- package/icons/angledoubleleft/index.esm.min.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -39
- package/icons/angledoubleright/index.esm.min.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -39
- package/icons/angledoubleup/index.esm.min.js +0 -1
- package/icons/angledown/index.esm.js +0 -37
- package/icons/angledown/index.esm.min.js +0 -1
- package/icons/angleleft/index.esm.js +0 -37
- package/icons/angleleft/index.esm.min.js +0 -1
- package/icons/angleright/index.esm.js +0 -37
- package/icons/angleright/index.esm.min.js +0 -1
- package/icons/angleup/index.esm.js +0 -37
- package/icons/angleup/index.esm.min.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -661
- package/icons/arrowdown/index.esm.min.js +0 -1
- package/icons/arrowup/index.esm.js +0 -661
- package/icons/arrowup/index.esm.min.js +0 -1
- package/icons/ban/index.esm.js +0 -659
- package/icons/ban/index.esm.min.js +0 -1
- package/icons/bars/index.esm.js +0 -39
- package/icons/bars/index.esm.min.js +0 -1
- package/icons/calendar/index.esm.js +0 -37
- package/icons/calendar/index.esm.min.js +0 -1
- package/icons/check/index.esm.js +0 -37
- package/icons/check/index.esm.min.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -37
- package/icons/chevrondown/index.esm.min.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -37
- package/icons/chevronleft/index.esm.min.js +0 -1
- package/icons/chevronright/index.esm.js +0 -37
- package/icons/chevronright/index.esm.min.js +0 -1
- package/icons/chevronup/index.esm.js +0 -37
- package/icons/chevronup/index.esm.min.js +0 -1
- package/icons/download/index.esm.js +0 -661
- package/icons/download/index.esm.min.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -665
- package/icons/exclamationtriangle/index.esm.min.js +0 -1
- package/icons/eye/index.esm.js +0 -39
- package/icons/eye/index.esm.min.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -661
- package/icons/eyeslash/index.esm.min.js +0 -1
- package/icons/filter/index.esm.js +0 -659
- package/icons/filter/index.esm.min.js +0 -1
- package/icons/filterslash/index.esm.js +0 -661
- package/icons/filterslash/index.esm.min.js +0 -1
- package/icons/infocircle/index.esm.js +0 -661
- package/icons/infocircle/index.esm.min.js +0 -1
- package/icons/minus/index.esm.js +0 -37
- package/icons/minus/index.esm.min.js +0 -1
- package/icons/pencil/index.esm.js +0 -659
- package/icons/pencil/index.esm.min.js +0 -1
- package/icons/plus/index.esm.js +0 -659
- package/icons/plus/index.esm.min.js +0 -1
- package/icons/refresh/index.esm.js +0 -661
- package/icons/refresh/index.esm.min.js +0 -1
- package/icons/search/index.esm.js +0 -661
- package/icons/search/index.esm.min.js +0 -1
- package/icons/searchminus/index.esm.js +0 -661
- package/icons/searchminus/index.esm.min.js +0 -1
- package/icons/searchplus/index.esm.js +0 -661
- package/icons/searchplus/index.esm.min.js +0 -1
- package/icons/sortalt/index.esm.js +0 -668
- package/icons/sortalt/index.esm.min.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -674
- package/icons/sortamountdown/index.esm.min.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -674
- package/icons/sortamountupalt/index.esm.min.js +0 -1
- package/icons/spinner/index.esm.js +0 -659
- package/icons/spinner/index.esm.min.js +0 -1
- package/icons/star/index.esm.js +0 -659
- package/icons/star/index.esm.min.js +0 -1
- package/icons/starfill/index.esm.js +0 -659
- package/icons/starfill/index.esm.min.js +0 -1
- package/icons/thlarge/index.esm.js +0 -661
- package/icons/thlarge/index.esm.min.js +0 -1
- package/icons/times/index.esm.js +0 -37
- package/icons/times/index.esm.min.js +0 -1
- package/icons/timescircle/index.esm.js +0 -661
- package/icons/timescircle/index.esm.min.js +0 -1
- package/icons/trash/index.esm.js +0 -661
- package/icons/trash/index.esm.min.js +0 -1
- package/icons/undo/index.esm.js +0 -661
- package/icons/undo/index.esm.min.js +0 -1
- package/icons/upload/index.esm.js +0 -661
- package/icons/upload/index.esm.min.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -661
- package/icons/windowmaximize/index.esm.min.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -661
- package/icons/windowminimize/index.esm.min.js +0 -1
- package/image/image.esm.js +0 -1162
- package/image/image.esm.min.js +0 -1
- package/inplace/inplace.esm.js +0 -243
- package/inplace/inplace.esm.min.js +0 -1
- package/inputmask/inputmask.esm.js +0 -560
- package/inputmask/inputmask.esm.min.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1209
- package/inputnumber/inputnumber.esm.min.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -291
- package/inputswitch/inputswitch.esm.min.js +0 -1
- package/inputtext/inputtext.esm.js +0 -171
- package/inputtext/inputtext.esm.min.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -220
- package/inputtextarea/inputtextarea.esm.min.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -108
- package/keyfilter/keyfilter.esm.min.js +0 -1
- package/knob/knob.esm.js +0 -318
- package/knob/knob.esm.min.js +0 -1
- package/listbox/listbox.esm.js +0 -810
- package/listbox/listbox.esm.min.js +0 -1
- package/megamenu/megamenu.esm.js +0 -716
- package/megamenu/megamenu.esm.min.js +0 -1
- package/mention/mention.esm.js +0 -771
- package/mention/mention.esm.min.js +0 -1
- package/menu/menu.esm.js +0 -485
- package/menu/menu.esm.min.js +0 -1
- package/menubar/menubar.esm.js +0 -584
- package/menubar/menubar.esm.min.js +0 -1
- package/message/message.esm.js +0 -169
- package/message/message.esm.min.js +0 -1
- package/messages/messages.esm.js +0 -439
- package/messages/messages.esm.min.js +0 -1
- package/multiselect/multiselect.esm.js +0 -1724
- package/multiselect/multiselect.esm.min.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -352
- package/multistatecheckbox/multistatecheckbox.esm.min.js +0 -1
- package/orderlist/orderlist.esm.js +0 -816
- package/orderlist/orderlist.esm.min.js +0 -1
- package/organizationchart/organizationchart.esm.js +0 -480
- package/organizationchart/organizationchart.esm.min.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -516
- package/overlaypanel/overlaypanel.esm.min.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -7
- package/overlayservice/overlayservice.esm.min.js +0 -1
- package/paginator/paginator.esm.js +0 -933
- package/paginator/paginator.esm.min.js +0 -1
- package/panel/panel.esm.js +0 -316
- package/panel/panel.esm.min.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -645
- package/panelmenu/panelmenu.esm.min.js +0 -1
- package/passthrough/index.esm.js +0 -71
- package/passthrough/index.esm.min.js +0 -1
- package/passthrough/tailwind/index.esm.js +0 -3509
- package/passthrough/tailwind/index.esm.min.js +0 -1
- package/password/password.esm.js +0 -567
- package/password/password.esm.min.js +0 -1
- package/picklist/picklist.esm.js +0 -1119
- package/picklist/picklist.esm.min.js +0 -1
- package/portal/portal.esm.js +0 -110
- package/portal/portal.esm.min.js +0 -1
- package/primereact.all.esm.js +0 -51646
- package/primereact.all.esm.min.js +0 -1
- package/progressbar/progressbar.esm.js +0 -190
- package/progressbar/progressbar.esm.min.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -88
- package/progressspinner/progressspinner.esm.min.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -329
- package/radiobutton/radiobutton.esm.min.js +0 -1
- package/rating/rating.esm.js +0 -273
- package/rating/rating.esm.min.js +0 -1
- package/ripple/ripple.esm.js +0 -100
- package/ripple/ripple.esm.min.js +0 -1
- package/row/row.esm.js +0 -36
- package/row/row.esm.min.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -210
- package/scrollpanel/scrollpanel.esm.min.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -269
- package/scrolltop/scrolltop.esm.min.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -327
- package/selectbutton/selectbutton.esm.min.js +0 -1
- package/sidebar/sidebar.esm.js +0 -543
- package/sidebar/sidebar.esm.min.js +0 -1
- package/skeleton/skeleton.esm.js +0 -125
- package/skeleton/skeleton.esm.min.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -689
- package/slidemenu/slidemenu.esm.min.js +0 -1
- package/slider/slider.esm.js +0 -478
- package/slider/slider.esm.min.js +0 -1
- package/speeddial/speeddial.esm.js +0 -521
- package/speeddial/speeddial.esm.min.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -545
- package/splitbutton/splitbutton.esm.min.js +0 -1
- package/splitter/splitter.esm.js +0 -466
- package/splitter/splitter.esm.min.js +0 -1
- package/steps/steps.esm.js +0 -294
- package/steps/steps.esm.min.js +0 -1
- package/styleclass/styleclass.esm.js +0 -269
- package/styleclass/styleclass.esm.min.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -332
- package/tabmenu/tabmenu.esm.min.js +0 -1
- package/tabview/tabview.esm.js +0 -678
- package/tabview/tabview.esm.min.js +0 -1
- package/tag/tag.esm.js +0 -117
- package/tag/tag.esm.min.js +0 -1
- package/terminal/terminal.esm.js +0 -280
- package/terminal/terminal.esm.min.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -7
- package/terminalservice/terminalservice.esm.min.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -699
- package/tieredmenu/tieredmenu.esm.min.js +0 -1
- package/timeline/timeline.esm.js +0 -164
- package/timeline/timeline.esm.min.js +0 -1
- package/toast/toast.esm.js +0 -739
- package/toast/toast.esm.min.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -217
- package/togglebutton/togglebutton.esm.min.js +0 -1
- package/toolbar/toolbar.esm.js +0 -79
- package/toolbar/toolbar.esm.min.js +0 -1
- package/tooltip/tooltip.esm.js +0 -696
- package/tooltip/tooltip.esm.min.js +0 -1
- package/tree/tree.esm.js +0 -1403
- package/tree/tree.esm.min.js +0 -1
- package/treeselect/treeselect.esm.js +0 -930
- package/treeselect/treeselect.esm.min.js +0 -1
- package/treetable/treetable.esm.js +0 -3094
- package/treetable/treetable.esm.min.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -292
- package/tristatecheckbox/tristatecheckbox.esm.min.js +0 -1
- package/utils/utils.esm.js +0 -2383
- package/utils/utils.esm.min.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -972
- package/virtualscroller/virtualscroller.esm.min.js +0 -1
|
@@ -1,668 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { IconBase } from 'primereact/iconbase';
|
|
5
|
-
|
|
6
|
-
function _extends() {
|
|
7
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
8
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
9
|
-
var source = arguments[i];
|
|
10
|
-
for (var key in source) {
|
|
11
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12
|
-
target[key] = source[key];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function _arrayWithHoles(arr) {
|
|
22
|
-
if (Array.isArray(arr)) return arr;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function _iterableToArrayLimit(r, l) {
|
|
26
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
27
|
-
if (null != t) {
|
|
28
|
-
var e,
|
|
29
|
-
n,
|
|
30
|
-
i,
|
|
31
|
-
u,
|
|
32
|
-
a = [],
|
|
33
|
-
f = !0,
|
|
34
|
-
o = !1;
|
|
35
|
-
try {
|
|
36
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
37
|
-
if (Object(t) !== t) return;
|
|
38
|
-
f = !1;
|
|
39
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
40
|
-
} catch (r) {
|
|
41
|
-
o = !0, n = r;
|
|
42
|
-
} finally {
|
|
43
|
-
try {
|
|
44
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
45
|
-
} finally {
|
|
46
|
-
if (o) throw n;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return a;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _arrayLikeToArray$1(arr, len) {
|
|
54
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
55
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
56
|
-
return arr2;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _unsupportedIterableToArray$1(o, minLen) {
|
|
60
|
-
if (!o) return;
|
|
61
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
62
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
63
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
64
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
65
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _nonIterableRest() {
|
|
69
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _slicedToArray(arr, i) {
|
|
73
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function _typeof(o) {
|
|
77
|
-
"@babel/helpers - typeof";
|
|
78
|
-
|
|
79
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
80
|
-
return typeof o;
|
|
81
|
-
} : function (o) {
|
|
82
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
83
|
-
}, _typeof(o);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function _arrayWithoutHoles(arr) {
|
|
87
|
-
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function _iterableToArray(iter) {
|
|
91
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _nonIterableSpread() {
|
|
95
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _toConsumableArray(arr) {
|
|
99
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _classCallCheck(instance, Constructor) {
|
|
103
|
-
if (!(instance instanceof Constructor)) {
|
|
104
|
-
throw new TypeError("Cannot call a class as a function");
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _toPrimitive(input, hint) {
|
|
109
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
110
|
-
var prim = input[Symbol.toPrimitive];
|
|
111
|
-
if (prim !== undefined) {
|
|
112
|
-
var res = prim.call(input, hint || "default");
|
|
113
|
-
if (_typeof(res) !== "object") return res;
|
|
114
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
115
|
-
}
|
|
116
|
-
return (hint === "string" ? String : Number)(input);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _toPropertyKey(arg) {
|
|
120
|
-
var key = _toPrimitive(arg, "string");
|
|
121
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function _defineProperties(target, props) {
|
|
125
|
-
for (var i = 0; i < props.length; i++) {
|
|
126
|
-
var descriptor = props[i];
|
|
127
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
128
|
-
descriptor.configurable = true;
|
|
129
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
130
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
134
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
135
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
136
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
137
|
-
writable: false
|
|
138
|
-
});
|
|
139
|
-
return Constructor;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
143
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
144
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
145
|
-
var ObjectUtils = /*#__PURE__*/function () {
|
|
146
|
-
function ObjectUtils() {
|
|
147
|
-
_classCallCheck(this, ObjectUtils);
|
|
148
|
-
}
|
|
149
|
-
_createClass(ObjectUtils, null, [{
|
|
150
|
-
key: "equals",
|
|
151
|
-
value: function equals(obj1, obj2, field) {
|
|
152
|
-
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
153
|
-
}
|
|
154
|
-
}, {
|
|
155
|
-
key: "deepEquals",
|
|
156
|
-
value: function deepEquals(a, b) {
|
|
157
|
-
if (a === b) return true;
|
|
158
|
-
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
|
159
|
-
var arrA = Array.isArray(a),
|
|
160
|
-
arrB = Array.isArray(b),
|
|
161
|
-
i,
|
|
162
|
-
length,
|
|
163
|
-
key;
|
|
164
|
-
if (arrA && arrB) {
|
|
165
|
-
length = a.length;
|
|
166
|
-
if (length !== b.length) return false;
|
|
167
|
-
for (i = length; i-- !== 0;) if (!this.deepEquals(a[i], b[i])) return false;
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
if (arrA !== arrB) return false;
|
|
171
|
-
var dateA = a instanceof Date,
|
|
172
|
-
dateB = b instanceof Date;
|
|
173
|
-
if (dateA !== dateB) return false;
|
|
174
|
-
if (dateA && dateB) return a.getTime() === b.getTime();
|
|
175
|
-
var regexpA = a instanceof RegExp,
|
|
176
|
-
regexpB = b instanceof RegExp;
|
|
177
|
-
if (regexpA !== regexpB) return false;
|
|
178
|
-
if (regexpA && regexpB) return a.toString() === b.toString();
|
|
179
|
-
var keys = Object.keys(a);
|
|
180
|
-
length = keys.length;
|
|
181
|
-
if (length !== Object.keys(b).length) return false;
|
|
182
|
-
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
183
|
-
for (i = length; i-- !== 0;) {
|
|
184
|
-
key = keys[i];
|
|
185
|
-
if (!this.deepEquals(a[key], b[key])) return false;
|
|
186
|
-
}
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/*eslint no-self-compare: "off"*/
|
|
191
|
-
return a !== a && b !== b;
|
|
192
|
-
}
|
|
193
|
-
}, {
|
|
194
|
-
key: "resolveFieldData",
|
|
195
|
-
value: function resolveFieldData(data, field) {
|
|
196
|
-
if (!data || !field) {
|
|
197
|
-
// short circuit if there is nothing to resolve
|
|
198
|
-
return null;
|
|
199
|
-
}
|
|
200
|
-
try {
|
|
201
|
-
var value = data[field];
|
|
202
|
-
if (this.isNotEmpty(value)) return value;
|
|
203
|
-
} catch (_unused) {
|
|
204
|
-
// Performance optimization: https://github.com/primefaces/primereact/issues/4797
|
|
205
|
-
// do nothing and continue to other methods to resolve field data
|
|
206
|
-
}
|
|
207
|
-
if (Object.keys(data).length) {
|
|
208
|
-
if (this.isFunction(field)) {
|
|
209
|
-
return field(data);
|
|
210
|
-
} else if (this.isNotEmpty(data[field])) {
|
|
211
|
-
return data[field];
|
|
212
|
-
} else if (field.indexOf('.') === -1) {
|
|
213
|
-
return data[field];
|
|
214
|
-
} else {
|
|
215
|
-
var fields = field.split('.');
|
|
216
|
-
var _value = data;
|
|
217
|
-
for (var i = 0, len = fields.length; i < len; ++i) {
|
|
218
|
-
if (_value == null) {
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
_value = _value[fields[i]];
|
|
222
|
-
}
|
|
223
|
-
return _value;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return null;
|
|
227
|
-
}
|
|
228
|
-
}, {
|
|
229
|
-
key: "findDiffKeys",
|
|
230
|
-
value: function findDiffKeys(obj1, obj2) {
|
|
231
|
-
if (!obj1 || !obj2) {
|
|
232
|
-
return {};
|
|
233
|
-
}
|
|
234
|
-
return Object.keys(obj1).filter(function (key) {
|
|
235
|
-
return !obj2.hasOwnProperty(key);
|
|
236
|
-
}).reduce(function (result, current) {
|
|
237
|
-
result[current] = obj1[current];
|
|
238
|
-
return result;
|
|
239
|
-
}, {});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Removes keys from a JSON object that start with a string such as "data" to get all "data-id" type properties.
|
|
244
|
-
*
|
|
245
|
-
* @param {any} obj the JSON object to reduce
|
|
246
|
-
* @param {string[]} startsWiths the string(s) to check if the property starts with this key
|
|
247
|
-
* @returns the JSON object containing only the key/values that match the startsWith string
|
|
248
|
-
*/
|
|
249
|
-
}, {
|
|
250
|
-
key: "reduceKeys",
|
|
251
|
-
value: function reduceKeys(obj, startsWiths) {
|
|
252
|
-
var result = {};
|
|
253
|
-
if (!obj || !startsWiths || startsWiths.length === 0) {
|
|
254
|
-
return result;
|
|
255
|
-
}
|
|
256
|
-
Object.keys(obj).filter(function (key) {
|
|
257
|
-
return startsWiths.some(function (value) {
|
|
258
|
-
return key.startsWith(value);
|
|
259
|
-
});
|
|
260
|
-
}).forEach(function (key) {
|
|
261
|
-
result[key] = obj[key];
|
|
262
|
-
delete obj[key];
|
|
263
|
-
});
|
|
264
|
-
return result;
|
|
265
|
-
}
|
|
266
|
-
}, {
|
|
267
|
-
key: "reorderArray",
|
|
268
|
-
value: function reorderArray(value, from, to) {
|
|
269
|
-
if (value && from !== to) {
|
|
270
|
-
if (to >= value.length) {
|
|
271
|
-
to %= value.length;
|
|
272
|
-
from %= value.length;
|
|
273
|
-
}
|
|
274
|
-
value.splice(to, 0, value.splice(from, 1)[0]);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}, {
|
|
278
|
-
key: "findIndexInList",
|
|
279
|
-
value: function findIndexInList(value, list, dataKey) {
|
|
280
|
-
var _this = this;
|
|
281
|
-
if (list) {
|
|
282
|
-
return dataKey ? list.findIndex(function (item) {
|
|
283
|
-
return _this.equals(item, value, dataKey);
|
|
284
|
-
}) : list.findIndex(function (item) {
|
|
285
|
-
return item === value;
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
return -1;
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
key: "getJSXElement",
|
|
292
|
-
value: function getJSXElement(obj) {
|
|
293
|
-
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
294
|
-
params[_key - 1] = arguments[_key];
|
|
295
|
-
}
|
|
296
|
-
return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
|
|
297
|
-
}
|
|
298
|
-
}, {
|
|
299
|
-
key: "getItemValue",
|
|
300
|
-
value: function getItemValue(obj) {
|
|
301
|
-
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
302
|
-
params[_key2 - 1] = arguments[_key2];
|
|
303
|
-
}
|
|
304
|
-
return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
|
|
305
|
-
}
|
|
306
|
-
}, {
|
|
307
|
-
key: "getProp",
|
|
308
|
-
value: function getProp(props) {
|
|
309
|
-
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
310
|
-
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
311
|
-
var value = props ? props[prop] : undefined;
|
|
312
|
-
return value === undefined ? defaultProps[prop] : value;
|
|
313
|
-
}
|
|
314
|
-
}, {
|
|
315
|
-
key: "getPropCaseInsensitive",
|
|
316
|
-
value: function getPropCaseInsensitive(props, prop) {
|
|
317
|
-
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
318
|
-
var fkey = this.toFlatCase(prop);
|
|
319
|
-
for (var key in props) {
|
|
320
|
-
if (props.hasOwnProperty(key) && this.toFlatCase(key) === fkey) {
|
|
321
|
-
return props[key];
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
for (var _key3 in defaultProps) {
|
|
325
|
-
if (defaultProps.hasOwnProperty(_key3) && this.toFlatCase(_key3) === fkey) {
|
|
326
|
-
return defaultProps[_key3];
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
return undefined; // Property not found
|
|
330
|
-
}
|
|
331
|
-
}, {
|
|
332
|
-
key: "getMergedProps",
|
|
333
|
-
value: function getMergedProps(props, defaultProps) {
|
|
334
|
-
return Object.assign({}, defaultProps, props);
|
|
335
|
-
}
|
|
336
|
-
}, {
|
|
337
|
-
key: "getDiffProps",
|
|
338
|
-
value: function getDiffProps(props, defaultProps) {
|
|
339
|
-
return this.findDiffKeys(props, defaultProps);
|
|
340
|
-
}
|
|
341
|
-
}, {
|
|
342
|
-
key: "getPropValue",
|
|
343
|
-
value: function getPropValue(obj) {
|
|
344
|
-
for (var _len3 = arguments.length, params = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
|
|
345
|
-
params[_key4 - 1] = arguments[_key4];
|
|
346
|
-
}
|
|
347
|
-
return this.isFunction(obj) ? obj.apply(void 0, params) : obj;
|
|
348
|
-
}
|
|
349
|
-
}, {
|
|
350
|
-
key: "getComponentProp",
|
|
351
|
-
value: function getComponentProp(component) {
|
|
352
|
-
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
353
|
-
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
354
|
-
return this.isNotEmpty(component) ? this.getProp(component.props, prop, defaultProps) : undefined;
|
|
355
|
-
}
|
|
356
|
-
}, {
|
|
357
|
-
key: "getComponentProps",
|
|
358
|
-
value: function getComponentProps(component, defaultProps) {
|
|
359
|
-
return this.isNotEmpty(component) ? this.getMergedProps(component.props, defaultProps) : undefined;
|
|
360
|
-
}
|
|
361
|
-
}, {
|
|
362
|
-
key: "getComponentDiffProps",
|
|
363
|
-
value: function getComponentDiffProps(component, defaultProps) {
|
|
364
|
-
return this.isNotEmpty(component) ? this.getDiffProps(component.props, defaultProps) : undefined;
|
|
365
|
-
}
|
|
366
|
-
}, {
|
|
367
|
-
key: "isValidChild",
|
|
368
|
-
value: function isValidChild(child, type, validTypes) {
|
|
369
|
-
/* eslint-disable */
|
|
370
|
-
if (child) {
|
|
371
|
-
var childType = this.getComponentProp(child, '__TYPE') || (child.type ? child.type.displayName : undefined);
|
|
372
|
-
var isValid = childType === type;
|
|
373
|
-
try {
|
|
374
|
-
var messageTypes; if ("production" !== 'production' && !isValid) ;
|
|
375
|
-
} catch (error) {
|
|
376
|
-
// NOOP
|
|
377
|
-
}
|
|
378
|
-
return isValid;
|
|
379
|
-
}
|
|
380
|
-
return false;
|
|
381
|
-
/* eslint-enable */
|
|
382
|
-
}
|
|
383
|
-
}, {
|
|
384
|
-
key: "getRefElement",
|
|
385
|
-
value: function getRefElement(ref) {
|
|
386
|
-
if (ref) {
|
|
387
|
-
return _typeof(ref) === 'object' && ref.hasOwnProperty('current') ? ref.current : ref;
|
|
388
|
-
}
|
|
389
|
-
return null;
|
|
390
|
-
}
|
|
391
|
-
}, {
|
|
392
|
-
key: "combinedRefs",
|
|
393
|
-
value: function combinedRefs(innerRef, forwardRef) {
|
|
394
|
-
if (innerRef && forwardRef) {
|
|
395
|
-
if (typeof forwardRef === 'function') {
|
|
396
|
-
forwardRef(innerRef.current);
|
|
397
|
-
} else {
|
|
398
|
-
forwardRef.current = innerRef.current;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}, {
|
|
403
|
-
key: "removeAccents",
|
|
404
|
-
value: function removeAccents(str) {
|
|
405
|
-
if (str && str.search(/[\xC0-\xFF]/g) > -1) {
|
|
406
|
-
str = str.replace(/[\xC0-\xC5]/g, 'A').replace(/[\xC6]/g, 'AE').replace(/[\xC7]/g, 'C').replace(/[\xC8-\xCB]/g, 'E').replace(/[\xCC-\xCF]/g, 'I').replace(/[\xD0]/g, 'D').replace(/[\xD1]/g, 'N').replace(/[\xD2-\xD6\xD8]/g, 'O').replace(/[\xD9-\xDC]/g, 'U').replace(/[\xDD]/g, 'Y').replace(/[\xDE]/g, 'P').replace(/[\xE0-\xE5]/g, 'a').replace(/[\xE6]/g, 'ae').replace(/[\xE7]/g, 'c').replace(/[\xE8-\xEB]/g, 'e').replace(/[\xEC-\xEF]/g, 'i').replace(/[\xF1]/g, 'n').replace(/[\xF2-\xF6\xF8]/g, 'o').replace(/[\xF9-\xFC]/g, 'u').replace(/[\xFE]/g, 'p').replace(/[\xFD\xFF]/g, 'y');
|
|
407
|
-
}
|
|
408
|
-
return str;
|
|
409
|
-
}
|
|
410
|
-
}, {
|
|
411
|
-
key: "toFlatCase",
|
|
412
|
-
value: function toFlatCase(str) {
|
|
413
|
-
// convert snake, kebab, camel and pascal cases to flat case
|
|
414
|
-
return this.isNotEmpty(str) && this.isString(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
|
415
|
-
}
|
|
416
|
-
}, {
|
|
417
|
-
key: "toCapitalCase",
|
|
418
|
-
value: function toCapitalCase(str) {
|
|
419
|
-
return this.isNotEmpty(str) && this.isString(str) ? str[0].toUpperCase() + str.slice(1) : str;
|
|
420
|
-
}
|
|
421
|
-
}, {
|
|
422
|
-
key: "trim",
|
|
423
|
-
value: function trim(value) {
|
|
424
|
-
// trim only if the value is actually a string
|
|
425
|
-
return this.isNotEmpty(value) && this.isString(value) ? value.trim() : value;
|
|
426
|
-
}
|
|
427
|
-
}, {
|
|
428
|
-
key: "isEmpty",
|
|
429
|
-
value: function isEmpty(value) {
|
|
430
|
-
return value === null || value === undefined || value === '' || Array.isArray(value) && value.length === 0 || !(value instanceof Date) && _typeof(value) === 'object' && Object.keys(value).length === 0;
|
|
431
|
-
}
|
|
432
|
-
}, {
|
|
433
|
-
key: "isNotEmpty",
|
|
434
|
-
value: function isNotEmpty(value) {
|
|
435
|
-
return !this.isEmpty(value);
|
|
436
|
-
}
|
|
437
|
-
}, {
|
|
438
|
-
key: "isFunction",
|
|
439
|
-
value: function isFunction(value) {
|
|
440
|
-
return !!(value && value.constructor && value.call && value.apply);
|
|
441
|
-
}
|
|
442
|
-
}, {
|
|
443
|
-
key: "isObject",
|
|
444
|
-
value: function isObject(value) {
|
|
445
|
-
return value !== null && value instanceof Object && value.constructor === Object;
|
|
446
|
-
}
|
|
447
|
-
}, {
|
|
448
|
-
key: "isDate",
|
|
449
|
-
value: function isDate(value) {
|
|
450
|
-
return value !== null && value instanceof Date && value.constructor === Date;
|
|
451
|
-
}
|
|
452
|
-
}, {
|
|
453
|
-
key: "isArray",
|
|
454
|
-
value: function isArray(value) {
|
|
455
|
-
return value !== null && Array.isArray(value);
|
|
456
|
-
}
|
|
457
|
-
}, {
|
|
458
|
-
key: "isString",
|
|
459
|
-
value: function isString(value) {
|
|
460
|
-
return value !== null && typeof value === 'string';
|
|
461
|
-
}
|
|
462
|
-
}, {
|
|
463
|
-
key: "isPrintableCharacter",
|
|
464
|
-
value: function isPrintableCharacter() {
|
|
465
|
-
var _char = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
466
|
-
return this.isNotEmpty(_char) && _char.length === 1 && _char.match(/\S| /);
|
|
467
|
-
}
|
|
468
|
-
}, {
|
|
469
|
-
key: "isLetter",
|
|
470
|
-
value: function isLetter(_char2) {
|
|
471
|
-
return _char2 && (_char2.toUpperCase() != _char2.toLowerCase() || _char2.codePointAt(0) > 127);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* Firefox-v103 does not currently support the "findLast" method. It is stated that this method will be supported with Firefox-v104.
|
|
476
|
-
* https://caniuse.com/mdn-javascript_builtins_array_findlast
|
|
477
|
-
*/
|
|
478
|
-
}, {
|
|
479
|
-
key: "findLast",
|
|
480
|
-
value: function findLast(arr, callback) {
|
|
481
|
-
var item;
|
|
482
|
-
if (this.isNotEmpty(arr)) {
|
|
483
|
-
try {
|
|
484
|
-
item = arr.findLast(callback);
|
|
485
|
-
} catch (_unused2) {
|
|
486
|
-
item = _toConsumableArray(arr).reverse().find(callback);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return item;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Firefox-v103 does not currently support the "findLastIndex" method. It is stated that this method will be supported with Firefox-v104.
|
|
494
|
-
* https://caniuse.com/mdn-javascript_builtins_array_findlastindex
|
|
495
|
-
*/
|
|
496
|
-
}, {
|
|
497
|
-
key: "findLastIndex",
|
|
498
|
-
value: function findLastIndex(arr, callback) {
|
|
499
|
-
var index = -1;
|
|
500
|
-
if (this.isNotEmpty(arr)) {
|
|
501
|
-
try {
|
|
502
|
-
index = arr.findLastIndex(callback);
|
|
503
|
-
} catch (_unused3) {
|
|
504
|
-
index = arr.lastIndexOf(_toConsumableArray(arr).reverse().find(callback));
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
return index;
|
|
508
|
-
}
|
|
509
|
-
}, {
|
|
510
|
-
key: "sort",
|
|
511
|
-
value: function sort(value1, value2) {
|
|
512
|
-
var order = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
513
|
-
var comparator = arguments.length > 3 ? arguments[3] : undefined;
|
|
514
|
-
var nullSortOrder = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
515
|
-
var result = this.compare(value1, value2, comparator, order);
|
|
516
|
-
var finalSortOrder = order;
|
|
517
|
-
|
|
518
|
-
// nullSortOrder == 1 means Excel like sort nulls at bottom
|
|
519
|
-
if (this.isEmpty(value1) || this.isEmpty(value2)) {
|
|
520
|
-
finalSortOrder = nullSortOrder === 1 ? order : nullSortOrder;
|
|
521
|
-
}
|
|
522
|
-
return finalSortOrder * result;
|
|
523
|
-
}
|
|
524
|
-
}, {
|
|
525
|
-
key: "compare",
|
|
526
|
-
value: function compare(value1, value2, comparator) {
|
|
527
|
-
var order = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
528
|
-
var result = -1;
|
|
529
|
-
var emptyValue1 = this.isEmpty(value1);
|
|
530
|
-
var emptyValue2 = this.isEmpty(value2);
|
|
531
|
-
if (emptyValue1 && emptyValue2) result = 0;else if (emptyValue1) result = order;else if (emptyValue2) result = -order;else if (typeof value1 === 'string' && typeof value2 === 'string') result = comparator(value1, value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
532
|
-
return result;
|
|
533
|
-
}
|
|
534
|
-
}, {
|
|
535
|
-
key: "localeComparator",
|
|
536
|
-
value: function localeComparator(locale) {
|
|
537
|
-
//performance gain using Int.Collator. It is not recommended to use localeCompare against large arrays.
|
|
538
|
-
return new Intl.Collator(locale, {
|
|
539
|
-
numeric: true
|
|
540
|
-
}).compare;
|
|
541
|
-
}
|
|
542
|
-
}, {
|
|
543
|
-
key: "findChildrenByKey",
|
|
544
|
-
value: function findChildrenByKey(data, key) {
|
|
545
|
-
var _iterator = _createForOfIteratorHelper(data),
|
|
546
|
-
_step;
|
|
547
|
-
try {
|
|
548
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
549
|
-
var item = _step.value;
|
|
550
|
-
if (item.key === key) {
|
|
551
|
-
return item.children || [];
|
|
552
|
-
} else if (item.children) {
|
|
553
|
-
var result = this.findChildrenByKey(item.children, key);
|
|
554
|
-
if (result.length > 0) {
|
|
555
|
-
return result;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
} catch (err) {
|
|
560
|
-
_iterator.e(err);
|
|
561
|
-
} finally {
|
|
562
|
-
_iterator.f();
|
|
563
|
-
}
|
|
564
|
-
return [];
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* This function takes mutates and object with a new value given
|
|
569
|
-
* a specific field. This will handle deeply nested fields that
|
|
570
|
-
* need to be modified or created.
|
|
571
|
-
*
|
|
572
|
-
* e.g:
|
|
573
|
-
* data = {
|
|
574
|
-
* nested: {
|
|
575
|
-
* foo: "bar"
|
|
576
|
-
* }
|
|
577
|
-
* }
|
|
578
|
-
*
|
|
579
|
-
* field = "nested.foo"
|
|
580
|
-
* value = "baz"
|
|
581
|
-
*
|
|
582
|
-
* The function will mutate data to be
|
|
583
|
-
* e.g:
|
|
584
|
-
* data = {
|
|
585
|
-
* nested: {
|
|
586
|
-
* foo: "baz"
|
|
587
|
-
* }
|
|
588
|
-
* }
|
|
589
|
-
*
|
|
590
|
-
* @param {object} data the object to be modified
|
|
591
|
-
* @param {string} field the field in the object to replace
|
|
592
|
-
* @param {any} value the value to have replaced in the field
|
|
593
|
-
*/
|
|
594
|
-
}, {
|
|
595
|
-
key: "mutateFieldData",
|
|
596
|
-
value: function mutateFieldData(data, field, value) {
|
|
597
|
-
if (_typeof(data) !== 'object' || typeof field !== 'string') {
|
|
598
|
-
// short circuit if there is nothing to resolve
|
|
599
|
-
return;
|
|
600
|
-
}
|
|
601
|
-
var fields = field.split('.');
|
|
602
|
-
var obj = data;
|
|
603
|
-
for (var i = 0, len = fields.length; i < len; ++i) {
|
|
604
|
-
// Check if we are on the last field
|
|
605
|
-
if (i + 1 - len === 0) {
|
|
606
|
-
obj[fields[i]] = value;
|
|
607
|
-
break;
|
|
608
|
-
}
|
|
609
|
-
if (!obj[fields[i]]) {
|
|
610
|
-
obj[fields[i]] = {};
|
|
611
|
-
}
|
|
612
|
-
obj = obj[fields[i]];
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}]);
|
|
616
|
-
return ObjectUtils;
|
|
617
|
-
}();
|
|
618
|
-
|
|
619
|
-
var lastId = 0;
|
|
620
|
-
function UniqueComponentId() {
|
|
621
|
-
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pr_id_';
|
|
622
|
-
lastId++;
|
|
623
|
-
return "".concat(prefix).concat(lastId);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
var SortAltIcon = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
627
|
-
var pti = IconBase.getPTI(inProps);
|
|
628
|
-
var _React$useState = React.useState(inProps.id),
|
|
629
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
630
|
-
pathId = _React$useState2[0],
|
|
631
|
-
setPathId = _React$useState2[1];
|
|
632
|
-
React.useEffect(function () {
|
|
633
|
-
if (ObjectUtils.isEmpty(pathId)) {
|
|
634
|
-
setPathId(UniqueComponentId('pr_icon_clip_'));
|
|
635
|
-
}
|
|
636
|
-
}, [pathId]);
|
|
637
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
638
|
-
ref: ref,
|
|
639
|
-
width: "14",
|
|
640
|
-
height: "14",
|
|
641
|
-
viewBox: "0 0 14 14",
|
|
642
|
-
fill: "none",
|
|
643
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
644
|
-
}, pti), /*#__PURE__*/React.createElement("g", {
|
|
645
|
-
clipPath: "url(#".concat(pathId, ")")
|
|
646
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
647
|
-
d: "M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z",
|
|
648
|
-
fill: "currentColor"
|
|
649
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
650
|
-
d: "M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z",
|
|
651
|
-
fill: "currentColor"
|
|
652
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
653
|
-
d: "M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z",
|
|
654
|
-
fill: "currentColor"
|
|
655
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
656
|
-
d: "M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z",
|
|
657
|
-
fill: "currentColor"
|
|
658
|
-
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
659
|
-
id: pathId
|
|
660
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
661
|
-
width: "14",
|
|
662
|
-
height: "14",
|
|
663
|
-
fill: "white"
|
|
664
|
-
}))));
|
|
665
|
-
}));
|
|
666
|
-
SortAltIcon.displayName = 'SortAltIcon';
|
|
667
|
-
|
|
668
|
-
export { SortAltIcon };
|