primereact 10.9.1 → 10.9.2
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/autocomplete/autocomplete.cjs.js +4 -4
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +2 -2
- package/autocomplete/autocomplete.esm.js +4 -4
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -4
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +1 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +35 -20
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +15 -61
- package/calendar/calendar.esm.js +35 -20
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +35 -20
- package/calendar/calendar.min.js +1 -1
- package/componentbase/componentbase.cjs.js +1 -1
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +1 -1
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +1 -1
- package/componentbase/componentbase.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +0 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +0 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +0 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +103 -73
- package/core/core.min.js +6 -6
- package/datatable/datatable.cjs.js +15 -7
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +15 -7
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +15 -7
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +6 -2
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +6 -2
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +7 -3
- package/dataview/dataview.min.js +1 -1
- package/dock/dock.cjs.js +0 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +0 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +0 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +24 -22
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +5 -0
- package/dropdown/dropdown.esm.js +25 -23
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +24 -22
- package/dropdown/dropdown.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +1 -1
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +1 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +1 -1
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/megamenu/megamenu.cjs.js +1 -2
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +1 -2
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +1 -2
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +1 -1
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +1 -1
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +1 -1
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +0 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +0 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +0 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +0 -1
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +0 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +0 -1
- package/menubar/menubar.min.js +1 -1
- package/multiselect/multiselect.cjs.js +24 -22
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -1
- package/multiselect/multiselect.esm.js +25 -23
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +24 -22
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/panelmenu/panelmenu.cjs.js +1 -2
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -2
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -2
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +1 -1
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +1 -1
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +1 -1
- package/passthrough/tailwind/index.min.js +1 -1
- package/picklist/picklist.cjs.js +19 -6
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +19 -6
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +19 -6
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +221 -139
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +221 -139
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +221 -139
- package/primereact.all.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +0 -1
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +0 -1
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +0 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +0 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +0 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +0 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +4 -4
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +4 -4
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +4 -4
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.cjs.js +7 -2
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +7 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +7 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +37 -38
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +11 -1
- package/tree/tree.esm.js +38 -39
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +38 -39
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +10 -6
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +6 -1
- package/treeselect/treeselect.esm.js +11 -7
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +10 -6
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +223 -223
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +224 -224
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +224 -224
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +31 -7
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +31 -7
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +31 -7
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +2 -2
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +2 -2
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +2 -2
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +996 -51
package/treetable/treetable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.treetable = (function (exports, React, PrimeReact, componentbase, utils, hooks, arrowdown, arrowup, spinner, paginator, check, chevrondown, chevronright, minus, ripple, overlayservice,
|
|
2
|
+
this.primereact.treetable = (function (exports, React, PrimeReact, componentbase, utils, hooks, arrowdown, arrowup, spinner, paginator, check, tooltip, chevrondown, chevronright, minus, ripple, overlayservice, sortalt, sortamountdown, sortamountupalt, inputtext) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -333,7 +333,7 @@ this.primereact.treetable = (function (exports, React, PrimeReact, componentbase
|
|
|
333
333
|
return {
|
|
334
334
|
'p-highlight': isSelected(),
|
|
335
335
|
'p-highlight-contextmenu': props.contextMenuSelectionKey && props.contextMenuSelectionKey === props.node.key,
|
|
336
|
-
'p-row-odd': props.rowIndex % 2 !== 0
|
|
336
|
+
'p-row-odd': parseInt(String(props.rowIndex).split('_').pop(), 10) % 2 !== 0
|
|
337
337
|
};
|
|
338
338
|
},
|
|
339
339
|
rowCheckbox: function rowCheckbox(_ref6) {
|
|
@@ -461,8 +461,228 @@ this.primereact.treetable = (function (exports, React, PrimeReact, componentbase
|
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
463
|
|
|
464
|
+
var classes = {
|
|
465
|
+
box: 'p-checkbox-box',
|
|
466
|
+
input: 'p-checkbox-input',
|
|
467
|
+
icon: 'p-checkbox-icon',
|
|
468
|
+
root: function root(_ref) {
|
|
469
|
+
var props = _ref.props,
|
|
470
|
+
checked = _ref.checked,
|
|
471
|
+
context = _ref.context;
|
|
472
|
+
return utils.classNames('p-checkbox p-component', {
|
|
473
|
+
'p-highlight': checked,
|
|
474
|
+
'p-disabled': props.disabled,
|
|
475
|
+
'p-invalid': props.invalid,
|
|
476
|
+
'p-variant-filled': props.variant ? props.variant === 'filled' : context && context.inputStyle === 'filled'
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
var CheckboxBase = componentbase.ComponentBase.extend({
|
|
481
|
+
defaultProps: {
|
|
482
|
+
__TYPE: 'Checkbox',
|
|
483
|
+
autoFocus: false,
|
|
484
|
+
checked: false,
|
|
485
|
+
className: null,
|
|
486
|
+
disabled: false,
|
|
487
|
+
falseValue: false,
|
|
488
|
+
icon: null,
|
|
489
|
+
id: null,
|
|
490
|
+
inputId: null,
|
|
491
|
+
inputRef: null,
|
|
492
|
+
invalid: false,
|
|
493
|
+
variant: null,
|
|
494
|
+
name: null,
|
|
495
|
+
onChange: null,
|
|
496
|
+
onContextMenu: null,
|
|
497
|
+
onMouseDown: null,
|
|
498
|
+
readOnly: false,
|
|
499
|
+
required: false,
|
|
500
|
+
style: null,
|
|
501
|
+
tabIndex: null,
|
|
502
|
+
tooltip: null,
|
|
503
|
+
tooltipOptions: null,
|
|
504
|
+
trueValue: true,
|
|
505
|
+
value: null,
|
|
506
|
+
children: undefined
|
|
507
|
+
},
|
|
508
|
+
css: {
|
|
509
|
+
classes: classes
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
|
|
464
513
|
function ownKeys$6(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; }
|
|
465
514
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
515
|
+
var Checkbox = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
516
|
+
var mergeProps = hooks.useMergeProps();
|
|
517
|
+
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
518
|
+
var props = CheckboxBase.getProps(inProps, context);
|
|
519
|
+
var _React$useState = React__namespace.useState(false),
|
|
520
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
521
|
+
focusedState = _React$useState2[0],
|
|
522
|
+
setFocusedState = _React$useState2[1];
|
|
523
|
+
var _CheckboxBase$setMeta = CheckboxBase.setMetaData({
|
|
524
|
+
props: props,
|
|
525
|
+
state: {
|
|
526
|
+
focused: focusedState
|
|
527
|
+
},
|
|
528
|
+
context: {
|
|
529
|
+
checked: props.checked === props.trueValue,
|
|
530
|
+
disabled: props.disabled
|
|
531
|
+
}
|
|
532
|
+
}),
|
|
533
|
+
ptm = _CheckboxBase$setMeta.ptm,
|
|
534
|
+
cx = _CheckboxBase$setMeta.cx,
|
|
535
|
+
isUnstyled = _CheckboxBase$setMeta.isUnstyled;
|
|
536
|
+
componentbase.useHandleStyle(CheckboxBase.css.styles, isUnstyled, {
|
|
537
|
+
name: 'checkbox'
|
|
538
|
+
});
|
|
539
|
+
var elementRef = React__namespace.useRef(null);
|
|
540
|
+
var inputRef = React__namespace.useRef(props.inputRef);
|
|
541
|
+
var isChecked = function isChecked() {
|
|
542
|
+
return props.checked === props.trueValue;
|
|
543
|
+
};
|
|
544
|
+
var _onChange = function onChange(event) {
|
|
545
|
+
if (props.disabled || props.readonly) {
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
if (props.onChange) {
|
|
549
|
+
var _props$onChange;
|
|
550
|
+
var _checked = isChecked();
|
|
551
|
+
var value = _checked ? props.falseValue : props.trueValue;
|
|
552
|
+
var eventData = {
|
|
553
|
+
originalEvent: event,
|
|
554
|
+
value: props.value,
|
|
555
|
+
checked: value,
|
|
556
|
+
stopPropagation: function stopPropagation() {
|
|
557
|
+
event === null || event === void 0 || event.stopPropagation();
|
|
558
|
+
},
|
|
559
|
+
preventDefault: function preventDefault() {
|
|
560
|
+
event === null || event === void 0 || event.preventDefault();
|
|
561
|
+
},
|
|
562
|
+
target: {
|
|
563
|
+
type: 'checkbox',
|
|
564
|
+
name: props.name,
|
|
565
|
+
id: props.id,
|
|
566
|
+
value: props.value,
|
|
567
|
+
checked: value
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
props === null || props === void 0 || (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, eventData);
|
|
571
|
+
|
|
572
|
+
// do not continue if the user defined click wants to prevent
|
|
573
|
+
if (event.defaultPrevented) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
utils.DomHandler.focus(inputRef.current);
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
var _onFocus = function onFocus(event) {
|
|
580
|
+
var _props$onFocus;
|
|
581
|
+
setFocusedState(true);
|
|
582
|
+
props === null || props === void 0 || (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
583
|
+
};
|
|
584
|
+
var _onBlur = function onBlur(event) {
|
|
585
|
+
var _props$onBlur;
|
|
586
|
+
setFocusedState(false);
|
|
587
|
+
props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, event);
|
|
588
|
+
};
|
|
589
|
+
React__namespace.useImperativeHandle(ref, function () {
|
|
590
|
+
return {
|
|
591
|
+
props: props,
|
|
592
|
+
focus: function focus() {
|
|
593
|
+
return utils.DomHandler.focus(inputRef.current);
|
|
594
|
+
},
|
|
595
|
+
getElement: function getElement() {
|
|
596
|
+
return elementRef.current;
|
|
597
|
+
},
|
|
598
|
+
getInput: function getInput() {
|
|
599
|
+
return inputRef.current;
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
});
|
|
603
|
+
React__namespace.useEffect(function () {
|
|
604
|
+
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
605
|
+
}, [inputRef, props.inputRef]);
|
|
606
|
+
hooks.useUpdateEffect(function () {
|
|
607
|
+
inputRef.current.checked = isChecked();
|
|
608
|
+
}, [props.checked, props.trueValue]);
|
|
609
|
+
hooks.useMountEffect(function () {
|
|
610
|
+
if (props.autoFocus) {
|
|
611
|
+
utils.DomHandler.focus(inputRef.current, props.autoFocus);
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
var checked = isChecked();
|
|
615
|
+
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
616
|
+
var otherProps = CheckboxBase.getOtherProps(props);
|
|
617
|
+
var rootProps = mergeProps({
|
|
618
|
+
id: props.id,
|
|
619
|
+
className: utils.classNames(props.className, cx('root', {
|
|
620
|
+
checked: checked,
|
|
621
|
+
context: context
|
|
622
|
+
})),
|
|
623
|
+
style: props.style,
|
|
624
|
+
'data-p-highlight': checked,
|
|
625
|
+
'data-p-disabled': props.disabled,
|
|
626
|
+
onContextMenu: props.onContextMenu,
|
|
627
|
+
onMouseDown: props.onMouseDown
|
|
628
|
+
}, otherProps, ptm('root'));
|
|
629
|
+
var createInputElement = function createInputElement() {
|
|
630
|
+
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
631
|
+
var inputProps = mergeProps(_objectSpread$6({
|
|
632
|
+
id: props.inputId,
|
|
633
|
+
type: 'checkbox',
|
|
634
|
+
className: cx('input'),
|
|
635
|
+
name: props.name,
|
|
636
|
+
tabIndex: props.tabIndex,
|
|
637
|
+
onFocus: function onFocus(e) {
|
|
638
|
+
return _onFocus(e);
|
|
639
|
+
},
|
|
640
|
+
onBlur: function onBlur(e) {
|
|
641
|
+
return _onBlur(e);
|
|
642
|
+
},
|
|
643
|
+
onChange: function onChange(e) {
|
|
644
|
+
return _onChange(e);
|
|
645
|
+
},
|
|
646
|
+
disabled: props.disabled,
|
|
647
|
+
readOnly: props.readOnly,
|
|
648
|
+
required: props.required,
|
|
649
|
+
'aria-invalid': props.invalid,
|
|
650
|
+
checked: checked
|
|
651
|
+
}, ariaProps), ptm('input'));
|
|
652
|
+
return /*#__PURE__*/React__namespace.createElement("input", _extends({
|
|
653
|
+
ref: inputRef
|
|
654
|
+
}, inputProps));
|
|
655
|
+
};
|
|
656
|
+
var createBoxElement = function createBoxElement() {
|
|
657
|
+
var iconProps = mergeProps({
|
|
658
|
+
className: cx('icon')
|
|
659
|
+
}, ptm('icon'));
|
|
660
|
+
var boxProps = mergeProps({
|
|
661
|
+
className: cx('box', {
|
|
662
|
+
checked: checked
|
|
663
|
+
}),
|
|
664
|
+
'data-p-highlight': checked,
|
|
665
|
+
'data-p-disabled': props.disabled
|
|
666
|
+
}, ptm('box'));
|
|
667
|
+
var icon = checked ? props.icon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon, iconProps) : null;
|
|
668
|
+
var checkboxIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$6({}, iconProps), {
|
|
669
|
+
props: props,
|
|
670
|
+
checked: checked
|
|
671
|
+
});
|
|
672
|
+
return /*#__PURE__*/React__namespace.createElement("div", boxProps, checkboxIcon);
|
|
673
|
+
};
|
|
674
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
675
|
+
ref: elementRef
|
|
676
|
+
}, rootProps), createInputElement(), createBoxElement()), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
677
|
+
target: elementRef,
|
|
678
|
+
content: props.tooltip,
|
|
679
|
+
pt: ptm('tooltip')
|
|
680
|
+
}, props.tooltipOptions)));
|
|
681
|
+
}));
|
|
682
|
+
Checkbox.displayName = 'Checkbox';
|
|
683
|
+
|
|
684
|
+
function ownKeys$5(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; }
|
|
685
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
466
686
|
var TreeTableBodyCell = function TreeTableBodyCell(props) {
|
|
467
687
|
var _React$useState = React__namespace.useState(false),
|
|
468
688
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -523,7 +743,7 @@ this.primereact.treetable = (function (exports, React, PrimeReact, componentbase
|
|
|
523
743
|
};
|
|
524
744
|
var getCellCallbackParams = function getCellCallbackParams(event) {
|
|
525
745
|
var params = getCellParams();
|
|
526
|
-
return _objectSpread$
|
|
746
|
+
return _objectSpread$5({
|
|
527
747
|
originalEvent: event
|
|
528
748
|
}, params);
|
|
529
749
|
};
|
|
@@ -705,226 +925,6 @@ this.primereact.treetable = (function (exports, React, PrimeReact, componentbase
|
|
|
705
925
|
};
|
|
706
926
|
TreeTableBodyCell.displayName = 'TreeTableBodyCell';
|
|
707
927
|
|
|
708
|
-
var classes = {
|
|
709
|
-
box: 'p-checkbox-box',
|
|
710
|
-
input: 'p-checkbox-input',
|
|
711
|
-
icon: 'p-checkbox-icon',
|
|
712
|
-
root: function root(_ref) {
|
|
713
|
-
var props = _ref.props,
|
|
714
|
-
checked = _ref.checked,
|
|
715
|
-
context = _ref.context;
|
|
716
|
-
return utils.classNames('p-checkbox p-component', {
|
|
717
|
-
'p-highlight': checked,
|
|
718
|
-
'p-disabled': props.disabled,
|
|
719
|
-
'p-invalid': props.invalid,
|
|
720
|
-
'p-variant-filled': props.variant ? props.variant === 'filled' : context && context.inputStyle === 'filled'
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
var CheckboxBase = componentbase.ComponentBase.extend({
|
|
725
|
-
defaultProps: {
|
|
726
|
-
__TYPE: 'Checkbox',
|
|
727
|
-
autoFocus: false,
|
|
728
|
-
checked: false,
|
|
729
|
-
className: null,
|
|
730
|
-
disabled: false,
|
|
731
|
-
falseValue: false,
|
|
732
|
-
icon: null,
|
|
733
|
-
id: null,
|
|
734
|
-
inputId: null,
|
|
735
|
-
inputRef: null,
|
|
736
|
-
invalid: false,
|
|
737
|
-
variant: null,
|
|
738
|
-
name: null,
|
|
739
|
-
onChange: null,
|
|
740
|
-
onContextMenu: null,
|
|
741
|
-
onMouseDown: null,
|
|
742
|
-
readOnly: false,
|
|
743
|
-
required: false,
|
|
744
|
-
style: null,
|
|
745
|
-
tabIndex: null,
|
|
746
|
-
tooltip: null,
|
|
747
|
-
tooltipOptions: null,
|
|
748
|
-
trueValue: true,
|
|
749
|
-
value: null,
|
|
750
|
-
children: undefined
|
|
751
|
-
},
|
|
752
|
-
css: {
|
|
753
|
-
classes: classes
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
|
|
757
|
-
function ownKeys$5(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; }
|
|
758
|
-
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
759
|
-
var Checkbox = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
760
|
-
var mergeProps = hooks.useMergeProps();
|
|
761
|
-
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
762
|
-
var props = CheckboxBase.getProps(inProps, context);
|
|
763
|
-
var _React$useState = React__namespace.useState(false),
|
|
764
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
765
|
-
focusedState = _React$useState2[0],
|
|
766
|
-
setFocusedState = _React$useState2[1];
|
|
767
|
-
var _CheckboxBase$setMeta = CheckboxBase.setMetaData({
|
|
768
|
-
props: props,
|
|
769
|
-
state: {
|
|
770
|
-
focused: focusedState
|
|
771
|
-
},
|
|
772
|
-
context: {
|
|
773
|
-
checked: props.checked === props.trueValue,
|
|
774
|
-
disabled: props.disabled
|
|
775
|
-
}
|
|
776
|
-
}),
|
|
777
|
-
ptm = _CheckboxBase$setMeta.ptm,
|
|
778
|
-
cx = _CheckboxBase$setMeta.cx,
|
|
779
|
-
isUnstyled = _CheckboxBase$setMeta.isUnstyled;
|
|
780
|
-
componentbase.useHandleStyle(CheckboxBase.css.styles, isUnstyled, {
|
|
781
|
-
name: 'checkbox'
|
|
782
|
-
});
|
|
783
|
-
var elementRef = React__namespace.useRef(null);
|
|
784
|
-
var inputRef = React__namespace.useRef(props.inputRef);
|
|
785
|
-
var isChecked = function isChecked() {
|
|
786
|
-
return props.checked === props.trueValue;
|
|
787
|
-
};
|
|
788
|
-
var _onChange = function onChange(event) {
|
|
789
|
-
if (props.disabled || props.readonly) {
|
|
790
|
-
return;
|
|
791
|
-
}
|
|
792
|
-
if (props.onChange) {
|
|
793
|
-
var _props$onChange;
|
|
794
|
-
var _checked = isChecked();
|
|
795
|
-
var value = _checked ? props.falseValue : props.trueValue;
|
|
796
|
-
var eventData = {
|
|
797
|
-
originalEvent: event,
|
|
798
|
-
value: props.value,
|
|
799
|
-
checked: value,
|
|
800
|
-
stopPropagation: function stopPropagation() {
|
|
801
|
-
event === null || event === void 0 || event.stopPropagation();
|
|
802
|
-
},
|
|
803
|
-
preventDefault: function preventDefault() {
|
|
804
|
-
event === null || event === void 0 || event.preventDefault();
|
|
805
|
-
},
|
|
806
|
-
target: {
|
|
807
|
-
type: 'checkbox',
|
|
808
|
-
name: props.name,
|
|
809
|
-
id: props.id,
|
|
810
|
-
value: props.value,
|
|
811
|
-
checked: value
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
props === null || props === void 0 || (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, eventData);
|
|
815
|
-
|
|
816
|
-
// do not continue if the user defined click wants to prevent
|
|
817
|
-
if (event.defaultPrevented) {
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
utils.DomHandler.focus(inputRef.current);
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
var _onFocus = function onFocus(event) {
|
|
824
|
-
var _props$onFocus;
|
|
825
|
-
setFocusedState(true);
|
|
826
|
-
props === null || props === void 0 || (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
827
|
-
};
|
|
828
|
-
var _onBlur = function onBlur(event) {
|
|
829
|
-
var _props$onBlur;
|
|
830
|
-
setFocusedState(false);
|
|
831
|
-
props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, event);
|
|
832
|
-
};
|
|
833
|
-
React__namespace.useImperativeHandle(ref, function () {
|
|
834
|
-
return {
|
|
835
|
-
props: props,
|
|
836
|
-
focus: function focus() {
|
|
837
|
-
return utils.DomHandler.focus(inputRef.current);
|
|
838
|
-
},
|
|
839
|
-
getElement: function getElement() {
|
|
840
|
-
return elementRef.current;
|
|
841
|
-
},
|
|
842
|
-
getInput: function getInput() {
|
|
843
|
-
return inputRef.current;
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
});
|
|
847
|
-
React__namespace.useEffect(function () {
|
|
848
|
-
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
849
|
-
}, [inputRef, props.inputRef]);
|
|
850
|
-
hooks.useUpdateEffect(function () {
|
|
851
|
-
inputRef.current.checked = isChecked();
|
|
852
|
-
}, [props.checked, props.trueValue]);
|
|
853
|
-
hooks.useMountEffect(function () {
|
|
854
|
-
if (props.autoFocus) {
|
|
855
|
-
utils.DomHandler.focus(inputRef.current, props.autoFocus);
|
|
856
|
-
}
|
|
857
|
-
});
|
|
858
|
-
var checked = isChecked();
|
|
859
|
-
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
860
|
-
var otherProps = CheckboxBase.getOtherProps(props);
|
|
861
|
-
var rootProps = mergeProps({
|
|
862
|
-
id: props.id,
|
|
863
|
-
className: utils.classNames(props.className, cx('root', {
|
|
864
|
-
checked: checked,
|
|
865
|
-
context: context
|
|
866
|
-
})),
|
|
867
|
-
style: props.style,
|
|
868
|
-
'data-p-highlight': checked,
|
|
869
|
-
'data-p-disabled': props.disabled,
|
|
870
|
-
onContextMenu: props.onContextMenu,
|
|
871
|
-
onMouseDown: props.onMouseDown
|
|
872
|
-
}, otherProps, ptm('root'));
|
|
873
|
-
var createInputElement = function createInputElement() {
|
|
874
|
-
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|
|
875
|
-
var inputProps = mergeProps(_objectSpread$5({
|
|
876
|
-
id: props.inputId,
|
|
877
|
-
type: 'checkbox',
|
|
878
|
-
className: cx('input'),
|
|
879
|
-
name: props.name,
|
|
880
|
-
tabIndex: props.tabIndex,
|
|
881
|
-
onFocus: function onFocus(e) {
|
|
882
|
-
return _onFocus(e);
|
|
883
|
-
},
|
|
884
|
-
onBlur: function onBlur(e) {
|
|
885
|
-
return _onBlur(e);
|
|
886
|
-
},
|
|
887
|
-
onChange: function onChange(e) {
|
|
888
|
-
return _onChange(e);
|
|
889
|
-
},
|
|
890
|
-
disabled: props.disabled,
|
|
891
|
-
readOnly: props.readOnly,
|
|
892
|
-
required: props.required,
|
|
893
|
-
'aria-invalid': props.invalid,
|
|
894
|
-
checked: checked
|
|
895
|
-
}, ariaProps), ptm('input'));
|
|
896
|
-
return /*#__PURE__*/React__namespace.createElement("input", _extends({
|
|
897
|
-
ref: inputRef
|
|
898
|
-
}, inputProps));
|
|
899
|
-
};
|
|
900
|
-
var createBoxElement = function createBoxElement() {
|
|
901
|
-
var iconProps = mergeProps({
|
|
902
|
-
className: cx('icon')
|
|
903
|
-
}, ptm('icon'));
|
|
904
|
-
var boxProps = mergeProps({
|
|
905
|
-
className: cx('box', {
|
|
906
|
-
checked: checked
|
|
907
|
-
}),
|
|
908
|
-
'data-p-highlight': checked,
|
|
909
|
-
'data-p-disabled': props.disabled
|
|
910
|
-
}, ptm('box'));
|
|
911
|
-
var icon = checked ? props.icon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon, iconProps) : null;
|
|
912
|
-
var checkboxIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$5({}, iconProps), {
|
|
913
|
-
props: props,
|
|
914
|
-
checked: checked
|
|
915
|
-
});
|
|
916
|
-
return /*#__PURE__*/React__namespace.createElement("div", boxProps, checkboxIcon);
|
|
917
|
-
};
|
|
918
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
919
|
-
ref: elementRef
|
|
920
|
-
}, rootProps), createInputElement(), createBoxElement()), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
|
|
921
|
-
target: elementRef,
|
|
922
|
-
content: props.tooltip,
|
|
923
|
-
pt: ptm('tooltip')
|
|
924
|
-
}, props.tooltipOptions)));
|
|
925
|
-
}));
|
|
926
|
-
Checkbox.displayName = 'Checkbox';
|
|
927
|
-
|
|
928
928
|
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$3(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; } } }; }
|
|
929
929
|
function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(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$3(o, minLen); }
|
|
930
930
|
function _arrayLikeToArray$3(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; }
|
|
@@ -3738,4 +3738,4 @@ this.primereact.treetable = (function (exports, React, PrimeReact, componentbase
|
|
|
3738
3738
|
|
|
3739
3739
|
return exports;
|
|
3740
3740
|
|
|
3741
|
-
})({}, React, primereact.api, primereact.componentbase, primereact.utils, primereact.hooks, primereact.icons.arrowdown, primereact.icons.arrowup, primereact.icons.spinner, primereact.paginator, primereact.icons.check, primereact.icons.chevrondown, primereact.icons.chevronright, primereact.icons.minus, primereact.ripple, primereact.overlayservice, primereact.
|
|
3741
|
+
})({}, React, primereact.api, primereact.componentbase, primereact.utils, primereact.hooks, primereact.icons.arrowdown, primereact.icons.arrowup, primereact.icons.spinner, primereact.paginator, primereact.icons.check, primereact.tooltip, primereact.icons.chevrondown, primereact.icons.chevronright, primereact.icons.minus, primereact.ripple, primereact.overlayservice, primereact.icons.sortalt, primereact.icons.sortamountdown, primereact.icons.sortamountupalt, primereact.inputtext);
|