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
package/blockui/blockui.esm.js
DELETED
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PrimeReact, { PrimeReactContext } from 'primereact/api';
|
|
5
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
|
-
import { useMountEffect, useUpdateEffect, useUnmountEffect } from 'primereact/hooks';
|
|
7
|
-
import { Portal } from 'primereact/portal';
|
|
8
|
-
import { classNames, DomHandler, ZIndexUtils, mergeProps, ObjectUtils } from 'primereact/utils';
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
12
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for (var key in source) {
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16
|
-
target[key] = source[key];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
return _extends.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function _typeof(o) {
|
|
26
|
-
"@babel/helpers - typeof";
|
|
27
|
-
|
|
28
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
29
|
-
return typeof o;
|
|
30
|
-
} : function (o) {
|
|
31
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
32
|
-
}, _typeof(o);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function _toPrimitive(input, hint) {
|
|
36
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
37
|
-
var prim = input[Symbol.toPrimitive];
|
|
38
|
-
if (prim !== undefined) {
|
|
39
|
-
var res = prim.call(input, hint || "default");
|
|
40
|
-
if (_typeof(res) !== "object") return res;
|
|
41
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
42
|
-
}
|
|
43
|
-
return (hint === "string" ? String : Number)(input);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _toPropertyKey(arg) {
|
|
47
|
-
var key = _toPrimitive(arg, "string");
|
|
48
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function _defineProperty(obj, key, value) {
|
|
52
|
-
key = _toPropertyKey(key);
|
|
53
|
-
if (key in obj) {
|
|
54
|
-
Object.defineProperty(obj, key, {
|
|
55
|
-
value: value,
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true
|
|
59
|
-
});
|
|
60
|
-
} else {
|
|
61
|
-
obj[key] = value;
|
|
62
|
-
}
|
|
63
|
-
return obj;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function _arrayWithHoles(arr) {
|
|
67
|
-
if (Array.isArray(arr)) return arr;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _iterableToArrayLimit(r, l) {
|
|
71
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
72
|
-
if (null != t) {
|
|
73
|
-
var e,
|
|
74
|
-
n,
|
|
75
|
-
i,
|
|
76
|
-
u,
|
|
77
|
-
a = [],
|
|
78
|
-
f = !0,
|
|
79
|
-
o = !1;
|
|
80
|
-
try {
|
|
81
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
82
|
-
if (Object(t) !== t) return;
|
|
83
|
-
f = !1;
|
|
84
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
85
|
-
} catch (r) {
|
|
86
|
-
o = !0, n = r;
|
|
87
|
-
} finally {
|
|
88
|
-
try {
|
|
89
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
90
|
-
} finally {
|
|
91
|
-
if (o) throw n;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return a;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _arrayLikeToArray(arr, len) {
|
|
99
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
100
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
101
|
-
return arr2;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
105
|
-
if (!o) return;
|
|
106
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
107
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
108
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
109
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
110
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function _nonIterableRest() {
|
|
114
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function _slicedToArray(arr, i) {
|
|
118
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var classes = {
|
|
122
|
-
root: function root(_ref) {
|
|
123
|
-
var props = _ref.props;
|
|
124
|
-
return classNames('p-blockui-container', props.containerClassName);
|
|
125
|
-
},
|
|
126
|
-
mask: function mask(_ref2) {
|
|
127
|
-
var props = _ref2.props;
|
|
128
|
-
return classNames('p-blockui p-component-overlay p-component-overlay-enter', {
|
|
129
|
-
'p-blockui-document': props.fullScreen
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
var styles = "\n@layer primereact {\n .p-blockui-container {\n position: relative;\n }\n \n .p-blockui {\n opacity: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-blockui.p-component-overlay {\n position: absolute;\n }\n \n .p-blockui-document.p-component-overlay {\n position: fixed;\n }\n}\n";
|
|
134
|
-
var BlockUIBase = ComponentBase.extend({
|
|
135
|
-
defaultProps: {
|
|
136
|
-
__TYPE: 'BlockUI',
|
|
137
|
-
autoZIndex: true,
|
|
138
|
-
baseZIndex: 0,
|
|
139
|
-
blocked: false,
|
|
140
|
-
className: null,
|
|
141
|
-
containerClassName: null,
|
|
142
|
-
containerStyle: null,
|
|
143
|
-
fullScreen: false,
|
|
144
|
-
id: null,
|
|
145
|
-
onBlocked: null,
|
|
146
|
-
onUnblocked: null,
|
|
147
|
-
style: null,
|
|
148
|
-
template: null,
|
|
149
|
-
children: undefined
|
|
150
|
-
},
|
|
151
|
-
css: {
|
|
152
|
-
classes: classes,
|
|
153
|
-
styles: styles
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
158
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
159
|
-
var BlockUI = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
160
|
-
var context = React.useContext(PrimeReactContext);
|
|
161
|
-
var props = BlockUIBase.getProps(inProps, context);
|
|
162
|
-
var _React$useState = React.useState(props.blocked),
|
|
163
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
164
|
-
visibleState = _React$useState2[0],
|
|
165
|
-
setVisibleState = _React$useState2[1];
|
|
166
|
-
var elementRef = React.useRef(null);
|
|
167
|
-
var maskRef = React.useRef(null);
|
|
168
|
-
var _BlockUIBase$setMetaD = BlockUIBase.setMetaData({
|
|
169
|
-
props: props
|
|
170
|
-
}),
|
|
171
|
-
ptm = _BlockUIBase$setMetaD.ptm,
|
|
172
|
-
cx = _BlockUIBase$setMetaD.cx,
|
|
173
|
-
isUnstyled = _BlockUIBase$setMetaD.isUnstyled;
|
|
174
|
-
useHandleStyle(BlockUIBase.css.styles, isUnstyled, {
|
|
175
|
-
name: 'blockui'
|
|
176
|
-
});
|
|
177
|
-
var block = function block() {
|
|
178
|
-
setVisibleState(true);
|
|
179
|
-
};
|
|
180
|
-
var unblock = function unblock() {
|
|
181
|
-
var callback = function callback() {
|
|
182
|
-
setVisibleState(false);
|
|
183
|
-
props.fullScreen && DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
184
|
-
props.onUnblocked && props.onUnblocked();
|
|
185
|
-
};
|
|
186
|
-
if (maskRef.current) {
|
|
187
|
-
DomHandler.addClass(maskRef.current, 'p-component-overlay-leave');
|
|
188
|
-
maskRef.current.addEventListener('animationend', function () {
|
|
189
|
-
ZIndexUtils.clear(maskRef.current);
|
|
190
|
-
callback();
|
|
191
|
-
});
|
|
192
|
-
} else {
|
|
193
|
-
callback();
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
var onPortalMounted = function onPortalMounted() {
|
|
197
|
-
if (props.fullScreen) {
|
|
198
|
-
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
199
|
-
document.activeElement.blur();
|
|
200
|
-
}
|
|
201
|
-
if (props.autoZIndex) {
|
|
202
|
-
var key = props.fullScreen ? 'modal' : 'overlay';
|
|
203
|
-
ZIndexUtils.set(key, maskRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, props.baseZIndex || context && context.zIndex[key] || PrimeReact.zIndex[key]);
|
|
204
|
-
}
|
|
205
|
-
props.onBlocked && props.onBlocked();
|
|
206
|
-
};
|
|
207
|
-
useMountEffect(function () {
|
|
208
|
-
visibleState && block();
|
|
209
|
-
});
|
|
210
|
-
useUpdateEffect(function () {
|
|
211
|
-
props.blocked ? block() : unblock();
|
|
212
|
-
}, [props.blocked]);
|
|
213
|
-
useUnmountEffect(function () {
|
|
214
|
-
if (props.fullScreen) {
|
|
215
|
-
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
216
|
-
}
|
|
217
|
-
ZIndexUtils.clear(maskRef.current);
|
|
218
|
-
});
|
|
219
|
-
React.useImperativeHandle(ref, function () {
|
|
220
|
-
return {
|
|
221
|
-
props: props,
|
|
222
|
-
block: block,
|
|
223
|
-
unblock: unblock,
|
|
224
|
-
getElement: function getElement() {
|
|
225
|
-
return elementRef.current;
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
});
|
|
229
|
-
var createMask = function createMask() {
|
|
230
|
-
if (visibleState) {
|
|
231
|
-
var appendTo = props.fullScreen ? document.body : 'self';
|
|
232
|
-
var maskProps = mergeProps({
|
|
233
|
-
className: classNames(props.className, cx('mask')),
|
|
234
|
-
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
235
|
-
position: props.fullScreen ? 'fixed' : 'absolute',
|
|
236
|
-
top: '0',
|
|
237
|
-
left: '0',
|
|
238
|
-
width: '100%',
|
|
239
|
-
height: '100%'
|
|
240
|
-
})
|
|
241
|
-
}, ptm('mask'));
|
|
242
|
-
var content = props.template ? ObjectUtils.getJSXElement(props.template, props) : null;
|
|
243
|
-
var _mask = /*#__PURE__*/React.createElement("div", _extends({
|
|
244
|
-
ref: maskRef
|
|
245
|
-
}, maskProps), content);
|
|
246
|
-
return /*#__PURE__*/React.createElement(Portal, {
|
|
247
|
-
element: _mask,
|
|
248
|
-
appendTo: appendTo,
|
|
249
|
-
onMounted: onPortalMounted
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
return null;
|
|
253
|
-
};
|
|
254
|
-
var mask = createMask();
|
|
255
|
-
var rootProps = mergeProps({
|
|
256
|
-
id: props.id,
|
|
257
|
-
ref: elementRef,
|
|
258
|
-
style: props.containerStyle,
|
|
259
|
-
className: cx('root')
|
|
260
|
-
}, BlockUIBase.getOtherProps(props), ptm('root'));
|
|
261
|
-
return /*#__PURE__*/React.createElement("div", rootProps, props.children, mask);
|
|
262
|
-
});
|
|
263
|
-
BlockUI.displayName = 'BlockUI';
|
|
264
|
-
|
|
265
|
-
export { BlockUI };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import t,{PrimeReactContext as n}from"primereact/api";import{ComponentBase as r,useHandleStyle as o}from"primereact/componentbase";import{useMountEffect as l,useUpdateEffect as c,useUnmountEffect as i}from"primereact/hooks";import{Portal as a}from"primereact/portal";import{classNames as u,DomHandler as s,ZIndexUtils as f,mergeProps as p,ObjectUtils as m}from"primereact/utils";function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){var t=y(e,"string");return"symbol"===b(t)?t:String(t)}function g(e){if(Array.isArray(e))return e}function h(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,c,i=[],a=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{if(!a&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var j=r.extend({defaultProps:{__TYPE:"BlockUI",autoZIndex:!0,baseZIndex:0,blocked:!1,className:null,containerClassName:null,containerStyle:null,fullScreen:!1,id:null,onBlocked:null,onUnblocked:null,style:null,template:null,children:void 0},css:{classes:{root:function(e){return u("p-blockui-container",e.props.containerClassName)},mask:function(e){return u("p-blockui p-component-overlay p-component-overlay-enter",{"p-blockui-document":e.props.fullScreen})}},styles:"\n@layer primereact {\n .p-blockui-container {\n position: relative;\n }\n \n .p-blockui {\n opacity: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-blockui.p-component-overlay {\n position: absolute;\n }\n \n .p-blockui-document.p-component-overlay {\n position: fixed;\n }\n}\n"}});function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){var r,o,l;r=e,l=n[t],(o=v(o=t))in r?Object.defineProperty(r,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[o]=l})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=e.forwardRef((function(r,b){var y,v,k=e.useContext(n),w=j.getProps(r,k),P=e.useState(w.blocked),I=(v=2,g(y=P)||h(y,v)||O(y,v)||S()),E=I[0],C=I[1],N=e.useRef(null),U=e.useRef(null),A=j.setMetaData({props:w}),Z=A.ptm,B=A.cx;o(j.css.styles,A.isUnstyled,{name:"blockui"});var D=function(){C(!0)},T=function(){var e=function(){C(!1),w.fullScreen&&s.removeClass(document.body,"p-overflow-hidden"),w.onUnblocked&&w.onUnblocked()};U.current?(s.addClass(U.current,"p-component-overlay-leave"),U.current.addEventListener("animationend",(function(){f.clear(U.current),e()}))):e()},M=function(){if(w.fullScreen&&(s.addClass(document.body,"p-overflow-hidden"),document.activeElement.blur()),w.autoZIndex){var e=w.fullScreen?"modal":"overlay";f.set(e,U.current,k&&k.autoZIndex||t.autoZIndex,w.baseZIndex||k&&k.zIndex[e]||t.zIndex[e])}w.onBlocked&&w.onBlocked()};l((function(){E&&D()})),c((function(){w.blocked?D():T()}),[w.blocked]),i((function(){w.fullScreen&&s.removeClass(document.body,"p-overflow-hidden"),f.clear(U.current)})),e.useImperativeHandle(b,(function(){return{props:w,block:D,unblock:T,getElement:function(){return N.current}}}));var R=function(){if(E){var t=w.fullScreen?document.body:"self",n=p({className:u(w.className,B("mask")),style:x(x({},w.style),{},{position:w.fullScreen?"fixed":"absolute",top:"0",left:"0",width:"100%",height:"100%"})},Z("mask")),r=w.template?m.getJSXElement(w.template,w):null,o=e.createElement("div",d({ref:U},n),r);return e.createElement(a,{element:o,appendTo:t,onMounted:M})}return null}(),z=p({id:w.id,ref:N,style:w.containerStyle,className:B("root")},j.getOtherProps(w),Z("root"));return e.createElement("div",z,w.children,R)}));P.displayName="BlockUI";export{P as BlockUI};
|
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { PrimeReactContext } from 'primereact/api';
|
|
5
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
6
|
-
import { useMountEffect } from 'primereact/hooks';
|
|
7
|
-
import { ChevronRightIcon } from 'primereact/icons/chevronright';
|
|
8
|
-
import { classNames, UniqueComponentId, mergeProps, IconUtils, ObjectUtils } from 'primereact/utils';
|
|
9
|
-
|
|
10
|
-
function _typeof(o) {
|
|
11
|
-
"@babel/helpers - typeof";
|
|
12
|
-
|
|
13
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
14
|
-
return typeof o;
|
|
15
|
-
} : function (o) {
|
|
16
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
17
|
-
}, _typeof(o);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _toPrimitive(input, hint) {
|
|
21
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
22
|
-
var prim = input[Symbol.toPrimitive];
|
|
23
|
-
if (prim !== undefined) {
|
|
24
|
-
var res = prim.call(input, hint || "default");
|
|
25
|
-
if (_typeof(res) !== "object") return res;
|
|
26
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
27
|
-
}
|
|
28
|
-
return (hint === "string" ? String : Number)(input);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function _toPropertyKey(arg) {
|
|
32
|
-
var key = _toPrimitive(arg, "string");
|
|
33
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _defineProperty(obj, key, value) {
|
|
37
|
-
key = _toPropertyKey(key);
|
|
38
|
-
if (key in obj) {
|
|
39
|
-
Object.defineProperty(obj, key, {
|
|
40
|
-
value: value,
|
|
41
|
-
enumerable: true,
|
|
42
|
-
configurable: true,
|
|
43
|
-
writable: true
|
|
44
|
-
});
|
|
45
|
-
} else {
|
|
46
|
-
obj[key] = value;
|
|
47
|
-
}
|
|
48
|
-
return obj;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function _arrayWithHoles(arr) {
|
|
52
|
-
if (Array.isArray(arr)) return arr;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function _iterableToArrayLimit(r, l) {
|
|
56
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
57
|
-
if (null != t) {
|
|
58
|
-
var e,
|
|
59
|
-
n,
|
|
60
|
-
i,
|
|
61
|
-
u,
|
|
62
|
-
a = [],
|
|
63
|
-
f = !0,
|
|
64
|
-
o = !1;
|
|
65
|
-
try {
|
|
66
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
67
|
-
if (Object(t) !== t) return;
|
|
68
|
-
f = !1;
|
|
69
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
70
|
-
} catch (r) {
|
|
71
|
-
o = !0, n = r;
|
|
72
|
-
} finally {
|
|
73
|
-
try {
|
|
74
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
75
|
-
} finally {
|
|
76
|
-
if (o) throw n;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return a;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function _arrayLikeToArray(arr, len) {
|
|
84
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
85
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
86
|
-
return arr2;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
90
|
-
if (!o) return;
|
|
91
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
92
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
93
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
94
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
95
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _nonIterableRest() {
|
|
99
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _slicedToArray(arr, i) {
|
|
103
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
var classes = {
|
|
107
|
-
icon: 'p-menuitem-icon',
|
|
108
|
-
action: 'p-menuitem-link',
|
|
109
|
-
label: 'p-menuitem-text',
|
|
110
|
-
home: function home(_ref) {
|
|
111
|
-
var _className = _ref._className,
|
|
112
|
-
disabled = _ref.disabled;
|
|
113
|
-
return classNames('p-breadcrumb-home', {
|
|
114
|
-
'p-disabled': disabled
|
|
115
|
-
}, _className);
|
|
116
|
-
},
|
|
117
|
-
separatorIcon: 'p-breadcrumb-chevron',
|
|
118
|
-
separator: 'p-menuitem-separator',
|
|
119
|
-
menuitem: function menuitem(_ref2) {
|
|
120
|
-
var item = _ref2.item;
|
|
121
|
-
return classNames('p-menuitem', item.className, {
|
|
122
|
-
'p-disabled': item.disabled
|
|
123
|
-
});
|
|
124
|
-
},
|
|
125
|
-
menu: 'p-breadcrumb-list',
|
|
126
|
-
root: function root(_ref3) {
|
|
127
|
-
var props = _ref3.props;
|
|
128
|
-
return classNames('p-breadcrumb p-component', props.className);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
var styles = "\n@layer primereact {\n .p-breadcrumb {\n overflow-x: auto;\n }\n \n .p-breadcrumb ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n }\n \n .p-breadcrumb .p-menuitem-text {\n line-height: 1;\n }\n \n .p-breadcrumb .p-menuitem-link {\n text-decoration: none;\n display: flex;\n align-items: center;\n }\n \n .p-breadcrumb .p-menuitem-separator {\n display: flex;\n align-items: center;\n }\n \n .p-breadcrumb::-webkit-scrollbar {\n display: none;\n }\n}\n";
|
|
132
|
-
var BreadCrumbBase = ComponentBase.extend({
|
|
133
|
-
defaultProps: {
|
|
134
|
-
__TYPE: 'BreadCrumb',
|
|
135
|
-
id: null,
|
|
136
|
-
model: null,
|
|
137
|
-
home: null,
|
|
138
|
-
separatorIcon: null,
|
|
139
|
-
style: null,
|
|
140
|
-
className: null,
|
|
141
|
-
children: undefined
|
|
142
|
-
},
|
|
143
|
-
css: {
|
|
144
|
-
classes: classes,
|
|
145
|
-
styles: styles
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
150
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
151
|
-
var BreadCrumb = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
152
|
-
var context = React.useContext(PrimeReactContext);
|
|
153
|
-
var props = BreadCrumbBase.getProps(inProps, context);
|
|
154
|
-
var _React$useState = React.useState(props.id),
|
|
155
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
156
|
-
idState = _React$useState2[0],
|
|
157
|
-
setIdState = _React$useState2[1];
|
|
158
|
-
var elementRef = React.useRef(null);
|
|
159
|
-
var _BreadCrumbBase$setMe = BreadCrumbBase.setMetaData({
|
|
160
|
-
props: props,
|
|
161
|
-
state: {
|
|
162
|
-
id: idState
|
|
163
|
-
}
|
|
164
|
-
}),
|
|
165
|
-
ptm = _BreadCrumbBase$setMe.ptm,
|
|
166
|
-
cx = _BreadCrumbBase$setMe.cx,
|
|
167
|
-
isUnstyled = _BreadCrumbBase$setMe.isUnstyled;
|
|
168
|
-
useHandleStyle(BreadCrumbBase.css.styles, isUnstyled, {
|
|
169
|
-
name: 'breadcrumb'
|
|
170
|
-
});
|
|
171
|
-
var itemClick = function itemClick(event, item) {
|
|
172
|
-
if (item.disabled) {
|
|
173
|
-
event.preventDefault();
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
if (!item.url) {
|
|
177
|
-
event.preventDefault();
|
|
178
|
-
}
|
|
179
|
-
if (item.command) {
|
|
180
|
-
item.command({
|
|
181
|
-
originalEvent: event,
|
|
182
|
-
item: item
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
var createHome = function createHome(index) {
|
|
187
|
-
var home = props.home;
|
|
188
|
-
if (home) {
|
|
189
|
-
if (home.visible === false) {
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
var _icon = home.icon,
|
|
193
|
-
target = home.target,
|
|
194
|
-
url = home.url,
|
|
195
|
-
disabled = home.disabled,
|
|
196
|
-
style = home.style,
|
|
197
|
-
_className = home.className,
|
|
198
|
-
template = home.template,
|
|
199
|
-
_label = home.label;
|
|
200
|
-
var iconProps = mergeProps({
|
|
201
|
-
className: cx('icon')
|
|
202
|
-
}, ptm('icon'));
|
|
203
|
-
var icon = IconUtils.getJSXIcon(_icon, _objectSpread({}, iconProps), {
|
|
204
|
-
props: props
|
|
205
|
-
});
|
|
206
|
-
var actionProps = mergeProps({
|
|
207
|
-
href: url || '#',
|
|
208
|
-
className: cx('action'),
|
|
209
|
-
'aria-disabled': disabled,
|
|
210
|
-
target: target,
|
|
211
|
-
onClick: function onClick(event) {
|
|
212
|
-
return itemClick(event, home);
|
|
213
|
-
}
|
|
214
|
-
}, ptm('action'));
|
|
215
|
-
var labelProps = mergeProps({
|
|
216
|
-
className: cx('label')
|
|
217
|
-
}, ptm('label'));
|
|
218
|
-
var label = _label && /*#__PURE__*/React.createElement("span", labelProps, _label);
|
|
219
|
-
var content = /*#__PURE__*/React.createElement("a", actionProps, icon, label);
|
|
220
|
-
if (template) {
|
|
221
|
-
var defaultContentOptions = {
|
|
222
|
-
onClick: function onClick(event) {
|
|
223
|
-
return itemClick(event, home);
|
|
224
|
-
},
|
|
225
|
-
className: 'p-menuitem-link',
|
|
226
|
-
labelClassName: 'p-menuitem-text',
|
|
227
|
-
element: content,
|
|
228
|
-
props: props
|
|
229
|
-
};
|
|
230
|
-
content = ObjectUtils.getJSXElement(template, home, defaultContentOptions);
|
|
231
|
-
}
|
|
232
|
-
var key = idState + '_home';
|
|
233
|
-
var menuitemProps = mergeProps({
|
|
234
|
-
id: key,
|
|
235
|
-
key: key,
|
|
236
|
-
className: cx('home', {
|
|
237
|
-
_className: _className,
|
|
238
|
-
disabled: disabled
|
|
239
|
-
}),
|
|
240
|
-
style: style
|
|
241
|
-
}, ptm('home'));
|
|
242
|
-
return /*#__PURE__*/React.createElement("li", menuitemProps, content);
|
|
243
|
-
}
|
|
244
|
-
return null;
|
|
245
|
-
};
|
|
246
|
-
var createSeparator = function createSeparator(index) {
|
|
247
|
-
var key = idState + '_sep_' + index;
|
|
248
|
-
var separatorIconProps = mergeProps({
|
|
249
|
-
className: cx('separatorIcon')
|
|
250
|
-
}, ptm('separatorIcon'));
|
|
251
|
-
var icon = props.separatorIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, separatorIconProps);
|
|
252
|
-
var separatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, separatorIconProps), {
|
|
253
|
-
props: props
|
|
254
|
-
});
|
|
255
|
-
var separatorProps = mergeProps({
|
|
256
|
-
id: key,
|
|
257
|
-
key: key,
|
|
258
|
-
className: cx('separator'),
|
|
259
|
-
role: 'separator'
|
|
260
|
-
}, ptm('separator'));
|
|
261
|
-
return /*#__PURE__*/React.createElement("li", separatorProps, separatorIcon);
|
|
262
|
-
};
|
|
263
|
-
var createMenuitem = function createMenuitem(item, index) {
|
|
264
|
-
if (item.visible === false) {
|
|
265
|
-
return null;
|
|
266
|
-
}
|
|
267
|
-
var labelProps = mergeProps({
|
|
268
|
-
className: cx('label')
|
|
269
|
-
}, ptm('label'));
|
|
270
|
-
var label = item.label && /*#__PURE__*/React.createElement("span", labelProps, item.label);
|
|
271
|
-
var actionProps = mergeProps({
|
|
272
|
-
href: item.url || '#',
|
|
273
|
-
className: cx('action'),
|
|
274
|
-
target: item.target,
|
|
275
|
-
onClick: function onClick(event) {
|
|
276
|
-
return itemClick(event, item);
|
|
277
|
-
},
|
|
278
|
-
'aria-disabled': item.disabled
|
|
279
|
-
}, ptm('action'));
|
|
280
|
-
var content = /*#__PURE__*/React.createElement("a", actionProps, label);
|
|
281
|
-
if (item.template) {
|
|
282
|
-
var defaultContentOptions = {
|
|
283
|
-
onClick: function onClick(event) {
|
|
284
|
-
return itemClick(event, item);
|
|
285
|
-
},
|
|
286
|
-
className: 'p-menuitem-link',
|
|
287
|
-
labelClassName: 'p-menuitem-text',
|
|
288
|
-
element: content,
|
|
289
|
-
props: props
|
|
290
|
-
};
|
|
291
|
-
content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions);
|
|
292
|
-
}
|
|
293
|
-
var key = item.id || idState + '_' + index;
|
|
294
|
-
var menuitemProps = mergeProps({
|
|
295
|
-
id: key,
|
|
296
|
-
key: key,
|
|
297
|
-
className: cx('menuitem', {
|
|
298
|
-
item: item
|
|
299
|
-
}),
|
|
300
|
-
style: item.style
|
|
301
|
-
}, ptm('menuitem'));
|
|
302
|
-
return /*#__PURE__*/React.createElement("li", menuitemProps, content);
|
|
303
|
-
};
|
|
304
|
-
var createMenuitems = function createMenuitems() {
|
|
305
|
-
if (props.model) {
|
|
306
|
-
var _items = props.model.map(function (item, index) {
|
|
307
|
-
if (item.visible === false) {
|
|
308
|
-
return null;
|
|
309
|
-
}
|
|
310
|
-
var menuitem = createMenuitem(item, index);
|
|
311
|
-
var separator = index === props.model.length - 1 ? null : createSeparator(index);
|
|
312
|
-
var key = idState + '_' + index;
|
|
313
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
314
|
-
key: key
|
|
315
|
-
}, menuitem, separator);
|
|
316
|
-
});
|
|
317
|
-
return _items;
|
|
318
|
-
}
|
|
319
|
-
return null;
|
|
320
|
-
};
|
|
321
|
-
useMountEffect(function () {
|
|
322
|
-
if (!idState) {
|
|
323
|
-
setIdState(UniqueComponentId());
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
React.useImperativeHandle(ref, function () {
|
|
327
|
-
return {
|
|
328
|
-
props: props,
|
|
329
|
-
getElement: function getElement() {
|
|
330
|
-
return elementRef.current;
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
});
|
|
334
|
-
var home = createHome();
|
|
335
|
-
var items = createMenuitems();
|
|
336
|
-
var separator = createSeparator('home');
|
|
337
|
-
var menuProps = mergeProps({
|
|
338
|
-
className: cx('menu')
|
|
339
|
-
}, ptm('menu'));
|
|
340
|
-
var rootProps = mergeProps({
|
|
341
|
-
id: props.id,
|
|
342
|
-
ref: elementRef,
|
|
343
|
-
className: cx('root'),
|
|
344
|
-
style: props.style,
|
|
345
|
-
'aria-label': 'Breadcrumb'
|
|
346
|
-
}, BreadCrumbBase.getOtherProps(props), ptm('root'));
|
|
347
|
-
return /*#__PURE__*/React.createElement("nav", rootProps, /*#__PURE__*/React.createElement("ul", menuProps, home, separator, items));
|
|
348
|
-
}));
|
|
349
|
-
BreadCrumb.displayName = 'BreadCrumb';
|
|
350
|
-
|
|
351
|
-
export { BreadCrumb };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{PrimeReactContext as t}from"primereact/api";import{ComponentBase as r,useHandleStyle as n}from"primereact/componentbase";import{useMountEffect as a}from"primereact/hooks";import{ChevronRightIcon as l}from"primereact/icons/chevronright";import{classNames as o,UniqueComponentId as i,mergeProps as m,IconUtils as c,ObjectUtils as u}from"primereact/utils";function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=p(e,"string");return"symbol"===s(t)?t:String(t)}function b(e){if(Array.isArray(e))return e}function d(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],m=!0,c=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;m=!1}else for(;!(m=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);m=!0);}catch(e){c=!0,a=e}finally{try{if(!m&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return i}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=r.extend({defaultProps:{__TYPE:"BreadCrumb",id:null,model:null,home:null,separatorIcon:null,style:null,className:null,children:void 0},css:{classes:{icon:"p-menuitem-icon",action:"p-menuitem-link",label:"p-menuitem-text",home:function(e){return o("p-breadcrumb-home",{"p-disabled":e.disabled},e._className)},separatorIcon:"p-breadcrumb-chevron",separator:"p-menuitem-separator",menuitem:function(e){var t=e.item;return o("p-menuitem",t.className,{"p-disabled":t.disabled})},menu:"p-breadcrumb-list",root:function(e){return o("p-breadcrumb p-component",e.props.className)}},styles:"\n@layer primereact {\n .p-breadcrumb {\n overflow-x: auto;\n }\n \n .p-breadcrumb ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n }\n \n .p-breadcrumb .p-menuitem-text {\n line-height: 1;\n }\n \n .p-breadcrumb .p-menuitem-link {\n text-decoration: none;\n display: flex;\n align-items: center;\n }\n \n .p-breadcrumb .p-menuitem-separator {\n display: flex;\n align-items: center;\n }\n \n .p-breadcrumb::-webkit-scrollbar {\n display: none;\n }\n}\n"}});function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){var n,a,l;n=e,l=r[t],(a=f(a=t))in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=e.memo(e.forwardRef((function(r,o){var s,p,f=e.useContext(t),y=h.getProps(r,f),N=e.useState(y.id),E=(p=2,b(s=N)||d(s,p)||v(s,p)||g()),S=E[0],j=E[1],w=e.useRef(null),k=h.setMetaData({props:y,state:{id:S}}),x=k.ptm,P=k.cx;n(h.css.styles,k.isUnstyled,{name:"breadcrumb"});var I=function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}))},C=function(t){var r=S+"_sep_"+t,n=m({className:P("separatorIcon")},x("separatorIcon")),a=c.getJSXIcon(y.separatorIcon||e.createElement(l,n),O({},n),{props:y}),o=m({id:r,key:r,className:P("separator"),role:"separator"},x("separator"));return e.createElement("li",o,a)},_=function(t,r){if(!1===t.visible)return null;var n=m({className:P("label")},x("label")),a=t.label&&e.createElement("span",n,t.label),l=m({href:t.url||"#",className:P("action"),target:t.target,onClick:function(e){return I(e,t)},"aria-disabled":t.disabled},x("action")),o=e.createElement("a",l,a);t.template&&(o=u.getJSXElement(t.template,t,{onClick:function(e){return I(e,t)},className:"p-menuitem-link",labelClassName:"p-menuitem-text",element:o,props:y}));var i=t.id||S+"_"+r,c=m({id:i,key:i,className:P("menuitem",{item:t}),style:t.style},x("menuitem"));return e.createElement("li",c,o)};a((function(){S||j(i())})),e.useImperativeHandle(o,(function(){return{props:y,getElement:function(){return w.current}}}));var D=function(t){var r=y.home;if(r){if(!1===r.visible)return null;var n=r.icon,a=r.target,l=r.url,o=r.disabled,i=r.style,s=r.className,p=r.template,f=r.label,b=m({className:P("icon")},x("icon")),d=c.getJSXIcon(n,O({},b),{props:y}),v=m({href:l||"#",className:P("action"),"aria-disabled":o,target:a,onClick:function(e){return I(e,r)}},x("action")),g=m({className:P("label")},x("label")),h=e.createElement("a",v,d,f&&e.createElement("span",g,f));if(p)h=u.getJSXElement(p,r,{onClick:function(e){return I(e,r)},className:"p-menuitem-link",labelClassName:"p-menuitem-text",element:h,props:y});var N=S+"_home",E=m({id:N,key:N,className:P("home",{_className:s,disabled:o}),style:i},x("home"));return e.createElement("li",E,h)}return null}(),A=function(){if(y.model){var t=y.model.map((function(t,r){if(!1===t.visible)return null;var n=_(t,r),a=r===y.model.length-1?null:C(r);return e.createElement(e.Fragment,{key:S+"_"+r},n,a)}));return t}return null}(),J=C("home"),X=m({className:P("menu")},x("menu")),B=m({id:y.id,ref:w,className:P("root"),style:y.style,"aria-label":"Breadcrumb"},h.getOtherProps(y),x("root"));return e.createElement("nav",B,e.createElement("ul",X,D,J,A))})));E.displayName="BreadCrumb";export{E as BreadCrumb};
|