arengibook 2.4.658 → 2.4.661
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +183 -144
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4000,7 +4000,7 @@ function _defineProperty$g(e, r, t) {
|
|
|
4000
4000
|
function ownKeys$t(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; }
|
|
4001
4001
|
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), true).forEach(function (r) { _defineProperty$g(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4002
4002
|
var baseStyle = "\n.p-hidden-accessible {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n opacity: 0;\n overflow: hidden;\n padding: 0;\n pointer-events: none;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.p-overflow-hidden {\n overflow: hidden;\n padding-right: var(--scrollbar-width);\n}\n";
|
|
4003
|
-
var buttonStyles = "\n.p-button {\n margin: 0;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n vertical-align: bottom;\n text-align: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-button-label {\n flex: 1 1 auto;\n}\n\n.p-button-icon
|
|
4003
|
+
var buttonStyles = "\n.p-button {\n margin: 0;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n vertical-align: bottom;\n text-align: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-button-label {\n flex: 1 1 auto;\n}\n\n.p-button-icon-right {\n order: 1;\n}\n\n.p-button:disabled {\n cursor: default;\n}\n\n.p-button-icon-only {\n justify-content: center;\n}\n\n.p-button-icon-only .p-button-label {\n visibility: hidden;\n width: 0;\n flex: 0 0 auto;\n}\n\n.p-button-vertical {\n flex-direction: column;\n}\n\n.p-button-icon-bottom {\n order: 2;\n}\n\n.p-button-group .p-button {\n margin: 0;\n}\n\n.p-button-group .p-button:not(:last-child) {\n border-right: 0 none;\n}\n\n.p-button-group .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-button-group .p-button:first-of-type {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-button-group .p-button:last-of-type {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-button-group .p-button:focus {\n position: relative;\n z-index: 1;\n}\n\n.p-button-group-single .p-button:first-of-type {\n border-top-right-radius: var(--border-radius) !important;\n border-bottom-right-radius: var(--border-radius) !important;\n}\n\n.p-button-group-single .p-button:last-of-type {\n border-top-left-radius: var(--border-radius) !important;\n border-bottom-left-radius: var(--border-radius) !important;\n}\n";
|
|
4004
4004
|
var inputTextStyles = "\n.p-inputtext {\n margin: 0;\n}\n\n.p-fluid .p-inputtext {\n width: 100%;\n}\n\n/* InputGroup */\n.p-inputgroup {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup-addon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-inputgroup .p-float-label {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup .p-inputtext,\n.p-fluid .p-inputgroup .p-inputtext,\n.p-inputgroup .p-inputwrapper,\n.p-fluid .p-inputgroup .p-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n/* Floating Label */\n.p-float-label {\n display: block;\n position: relative;\n}\n\n.p-float-label label {\n position: absolute;\n pointer-events: none;\n top: 50%;\n margin-top: -0.5rem;\n transition-property: all;\n transition-timing-function: ease;\n line-height: 1;\n}\n\n.p-float-label textarea ~ label,\n.p-float-label .p-mention ~ label {\n top: 1rem;\n}\n\n.p-float-label input:focus ~ label,\n.p-float-label input:-webkit-autofill ~ label,\n.p-float-label input.p-filled ~ label,\n.p-float-label textarea:focus ~ label,\n.p-float-label textarea.p-filled ~ label,\n.p-float-label .p-inputwrapper-focus ~ label,\n.p-float-label .p-inputwrapper-filled ~ label,\n.p-float-label .p-tooltip-target-wrapper ~ label {\n top: -0.75rem;\n font-size: 12px;\n}\n\n.p-float-label .p-placeholder,\n.p-float-label input::placeholder,\n.p-float-label .p-inputtext::placeholder {\n opacity: 0;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-float-label .p-focus .p-placeholder,\n.p-float-label input:focus::placeholder,\n.p-float-label .p-inputtext:focus::placeholder {\n opacity: 1;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-input-icon-left,\n.p-input-icon-right {\n position: relative;\n display: inline-block;\n}\n\n.p-input-icon-left > i,\n.p-input-icon-right > i,\n.p-input-icon-left > svg,\n.p-input-icon-right > svg,\n.p-input-icon-left > .p-input-prefix,\n.p-input-icon-right > .p-input-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-fluid .p-input-icon-left,\n.p-fluid .p-input-icon-right {\n display: block;\n width: 100%;\n}\n";
|
|
4005
4005
|
var iconStyles = "\n.p-icon {\n display: inline-block;\n}\n\n.p-icon-spin {\n -webkit-animation: p-icon-spin 2s infinite linear;\n animation: p-icon-spin 2s infinite linear;\n}\n\nsvg.p-icon {\n pointer-events: auto;\n}\n\nsvg.p-icon g,\n.p-disabled svg.p-icon {\n pointer-events: none;\n}\n\n@-webkit-keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n";
|
|
4006
4006
|
var commonStyle = "\n@layer primereact {\n .p-component, .p-component * {\n box-sizing: border-box;\n }\n\n .p-hidden {\n display: none;\n }\n\n .p-hidden-space {\n visibility: hidden;\n }\n\n .p-reset {\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n text-decoration: none;\n font-size: 100%;\n list-style: none;\n }\n\n .p-disabled, .p-disabled * {\n cursor: default;\n pointer-events: none;\n user-select: none;\n }\n\n .p-component-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .p-unselectable-text {\n user-select: none;\n }\n\n .p-scrollbar-measure {\n width: 100px;\n height: 100px;\n overflow: scroll;\n position: absolute;\n top: -9999px;\n }\n\n @-webkit-keyframes p-fadein {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n @keyframes p-fadein {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n\n .p-link {\n text-align: left;\n background-color: transparent;\n margin: 0;\n padding: 0;\n border: none;\n cursor: pointer;\n user-select: none;\n }\n\n .p-link:disabled {\n cursor: default;\n }\n\n /* Non react overlay animations */\n .p-connected-overlay {\n opacity: 0;\n transform: scaleY(0.8);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-connected-overlay-visible {\n opacity: 1;\n transform: scaleY(1);\n }\n\n .p-connected-overlay-hidden {\n opacity: 0;\n transform: scaleY(1);\n transition: opacity .1s linear;\n }\n\n /* React based overlay animations */\n .p-connected-overlay-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n\n .p-connected-overlay-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-connected-overlay-enter-done {\n transform: none;\n }\n\n .p-connected-overlay-exit {\n opacity: 1;\n }\n\n .p-connected-overlay-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n\n /* Toggleable Content */\n .p-toggleable-content-enter {\n max-height: 0;\n }\n\n .p-toggleable-content-enter-active {\n overflow: hidden;\n max-height: 1000px;\n transition: max-height 1s ease-in-out;\n }\n\n .p-toggleable-content-enter-done {\n transform: none;\n }\n\n .p-toggleable-content-exit {\n max-height: 1000px;\n }\n\n .p-toggleable-content-exit-active {\n overflow: hidden;\n max-height: 0;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);\n }\n\n /* @todo Refactor */\n .p-menu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n ".concat(buttonStyles, "\n ").concat(inputTextStyles, "\n ").concat(iconStyles, "\n}\n");
|
|
@@ -5959,17 +5959,19 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
5959
5959
|
i = 0;
|
|
5960
5960
|
}
|
|
5961
5961
|
_regeneratorDefine = function (e, r, n, t) {
|
|
5962
|
-
|
|
5963
|
-
_regeneratorDefine(e, r, function (e) {
|
|
5964
|
-
return this._invoke(r, n, e);
|
|
5965
|
-
});
|
|
5966
|
-
}
|
|
5967
|
-
r ? i ? i(e, r, {
|
|
5962
|
+
if (r) i ? i(e, r, {
|
|
5968
5963
|
value: n,
|
|
5969
5964
|
enumerable: !t,
|
|
5970
5965
|
configurable: !t,
|
|
5971
5966
|
writable: !t
|
|
5972
|
-
}) : e[r] = n
|
|
5967
|
+
}) : e[r] = n;else {
|
|
5968
|
+
function o(r, n) {
|
|
5969
|
+
_regeneratorDefine(e, r, function (e) {
|
|
5970
|
+
return this._invoke(r, n, e);
|
|
5971
|
+
});
|
|
5972
|
+
}
|
|
5973
|
+
o("next", 0), o("throw", 1), o("return", 2);
|
|
5974
|
+
}
|
|
5973
5975
|
}, _regeneratorDefine(e, r, n, t);
|
|
5974
5976
|
}
|
|
5975
5977
|
function _slicedToArray$9(r, e) {
|
|
@@ -9162,8 +9164,7 @@ var CalendarPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
9162
9164
|
'aria-label': localeOption('chooseDate', props.locale),
|
|
9163
9165
|
'aria-modal': props.inline ? null : 'true',
|
|
9164
9166
|
onClick: props.onClick,
|
|
9165
|
-
onMouseUp: props.onMouseUp
|
|
9166
|
-
'data-pr-is-overlay': true
|
|
9167
|
+
onMouseUp: props.onMouseUp
|
|
9167
9168
|
}, props.ptm('panel', {
|
|
9168
9169
|
hostName: props.hostName
|
|
9169
9170
|
}));
|
|
@@ -9563,14 +9564,14 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
9563
9564
|
newViewDate.setMonth(11);
|
|
9564
9565
|
newViewDate.setFullYear(newYear);
|
|
9565
9566
|
props.onMonthChange && props.onMonthChange({
|
|
9566
|
-
month:
|
|
9567
|
+
month: 11,
|
|
9567
9568
|
year: newYear
|
|
9568
9569
|
});
|
|
9569
9570
|
setCurrentMonth(11);
|
|
9570
9571
|
} else {
|
|
9571
9572
|
newViewDate.setMonth(newViewDate.getMonth() - 1);
|
|
9572
9573
|
props.onMonthChange && props.onMonthChange({
|
|
9573
|
-
month: currentMonth,
|
|
9574
|
+
month: currentMonth - 1,
|
|
9574
9575
|
year: currentYear
|
|
9575
9576
|
});
|
|
9576
9577
|
setCurrentMonth(function (prevState) {
|
|
@@ -9608,14 +9609,14 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
9608
9609
|
newViewDate.setMonth(0);
|
|
9609
9610
|
newViewDate.setFullYear(newYear);
|
|
9610
9611
|
props.onMonthChange && props.onMonthChange({
|
|
9611
|
-
month:
|
|
9612
|
+
month: 0,
|
|
9612
9613
|
year: newYear
|
|
9613
9614
|
});
|
|
9614
9615
|
setCurrentMonth(0);
|
|
9615
9616
|
} else {
|
|
9616
9617
|
newViewDate.setMonth(newViewDate.getMonth() + 1);
|
|
9617
9618
|
props.onMonthChange && props.onMonthChange({
|
|
9618
|
-
month: currentMonth +
|
|
9619
|
+
month: currentMonth + 1,
|
|
9619
9620
|
year: currentYear
|
|
9620
9621
|
});
|
|
9621
9622
|
setCurrentMonth(function (prevState) {
|
|
@@ -9692,8 +9693,8 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
9692
9693
|
var timeMeta = {
|
|
9693
9694
|
hours: today.getHours(),
|
|
9694
9695
|
minutes: today.getMinutes(),
|
|
9695
|
-
seconds:
|
|
9696
|
-
milliseconds:
|
|
9696
|
+
seconds: today.getSeconds(),
|
|
9697
|
+
milliseconds: today.getMilliseconds()
|
|
9697
9698
|
};
|
|
9698
9699
|
updateViewDate(event, today);
|
|
9699
9700
|
onDateSelect(event, dateMeta, timeMeta);
|
|
@@ -10678,7 +10679,7 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
10678
10679
|
milliseconds = timeMeta.milliseconds;
|
|
10679
10680
|
} else {
|
|
10680
10681
|
var time = getCurrentDateTime();
|
|
10681
|
-
var _ref5 = [time.getHours(), time.getMinutes(),
|
|
10682
|
+
var _ref5 = [time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()];
|
|
10682
10683
|
hours = _ref5[0];
|
|
10683
10684
|
minutes = _ref5[1];
|
|
10684
10685
|
seconds = _ref5[2];
|
|
@@ -12997,8 +12998,8 @@ function styleInject(css, ref) {
|
|
|
12997
12998
|
}
|
|
12998
12999
|
}
|
|
12999
13000
|
|
|
13000
|
-
var css_248z$
|
|
13001
|
-
styleInject(css_248z$
|
|
13001
|
+
var css_248z$2 = "/* Force une largeur à 100% de l'input Calendar */\n.datepicker-fullwidth {\n width: 100%;\n}\n\n.datepicker-fullwidth > .p-calendar {\n width: 100%;\n}\n\n.datepickerbook .p-datepicker-calendar th {\n text-align: center !important;\n}\n\n/* Neutralise les styles hérités */\n.datepickerbook table,\n.datepickerbook tbody,\n.datepickerbook tr,\n.datepickerbook td,\n.datepickerbook th {\n background-color: unset !important;\n color: inherit !important;\n border: none;\n}\n\n/* Restaure les couleurs et l'entete du calendrier */\n.datepickerbook .p-datepicker {\n background-color: #fff !important;\n color: #333 !important;\n border-radius: 6px;\n box-shadow: 0 0 8px rgba(0,0,0,0.1);\n}\n\n.datepickerbook .p-datepicker-calendar td {\n text-align: center;\n background-color: transparent !important;\n color: #333;\n}\n\n.datepickerbook .p-datepicker-calendar td.p-highlight {\n background-color: #6366f1 !important;\n color: #fff !important;\n}\n\n.datepickerbook .p-datepicker-calendar th {\n text-align: center !important;\n color: #000;\n}\n\nbody .p-datepicker {\n width: 405px !important;\n min-width: 405px !important;\n max-width: 405px !important;\n}\n\n\n";
|
|
13002
|
+
styleInject(css_248z$2);
|
|
13002
13003
|
|
|
13003
13004
|
var _excluded$3 = ["value", "onChange", "placeholder", "dateFormat", "view", "invalid", "errorMessage", "disabled", "locale", "showTime", "showIcon", "icon", "iconBgButton", "iconPos", "name", "id", "fullWidth", "inputProps", "onBlur", "onSelect", "onClick"];
|
|
13004
13005
|
var normalizeDate = function normalizeDate(v) {
|
|
@@ -19708,15 +19709,14 @@ function requireLib$1 () {
|
|
|
19708
19709
|
|
|
19709
19710
|
var utilities$1 = {};
|
|
19710
19711
|
|
|
19711
|
-
var cjs$
|
|
19712
|
-
|
|
19713
|
-
var cjs$1;
|
|
19714
|
-
var hasRequiredCjs$2;
|
|
19712
|
+
var cjs$1 = {};
|
|
19715
19713
|
|
|
19716
|
-
|
|
19717
|
-
|
|
19718
|
-
hasRequiredCjs$2 = 1;
|
|
19714
|
+
var inlineStyleParser;
|
|
19715
|
+
var hasRequiredInlineStyleParser;
|
|
19719
19716
|
|
|
19717
|
+
function requireInlineStyleParser () {
|
|
19718
|
+
if (hasRequiredInlineStyleParser) return inlineStyleParser;
|
|
19719
|
+
hasRequiredInlineStyleParser = 1;
|
|
19720
19720
|
// http://www.w3.org/TR/CSS21/grammar.html
|
|
19721
19721
|
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
|
19722
19722
|
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
@@ -19750,7 +19750,7 @@ function requireCjs$2 () {
|
|
|
19750
19750
|
* @throws {TypeError}
|
|
19751
19751
|
* @throws {Error}
|
|
19752
19752
|
*/
|
|
19753
|
-
function
|
|
19753
|
+
inlineStyleParser = function (style, options) {
|
|
19754
19754
|
if (typeof style !== 'string') {
|
|
19755
19755
|
throw new TypeError('First argument must be a string');
|
|
19756
19756
|
}
|
|
@@ -19963,7 +19963,7 @@ function requireCjs$2 () {
|
|
|
19963
19963
|
|
|
19964
19964
|
whitespace();
|
|
19965
19965
|
return declarations();
|
|
19966
|
-
}
|
|
19966
|
+
};
|
|
19967
19967
|
|
|
19968
19968
|
/**
|
|
19969
19969
|
* Trim `str`.
|
|
@@ -19974,23 +19974,20 @@ function requireCjs$2 () {
|
|
|
19974
19974
|
function trim(str) {
|
|
19975
19975
|
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
|
19976
19976
|
}
|
|
19977
|
-
|
|
19978
|
-
cjs$1 = index;
|
|
19979
|
-
|
|
19980
|
-
return cjs$1;
|
|
19977
|
+
return inlineStyleParser;
|
|
19981
19978
|
}
|
|
19982
19979
|
|
|
19983
19980
|
var hasRequiredCjs$1;
|
|
19984
19981
|
|
|
19985
19982
|
function requireCjs$1 () {
|
|
19986
|
-
if (hasRequiredCjs$1) return cjs$
|
|
19983
|
+
if (hasRequiredCjs$1) return cjs$1;
|
|
19987
19984
|
hasRequiredCjs$1 = 1;
|
|
19988
|
-
var __importDefault = (cjs$
|
|
19985
|
+
var __importDefault = (cjs$1 && cjs$1.__importDefault) || function (mod) {
|
|
19989
19986
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19990
19987
|
};
|
|
19991
|
-
Object.defineProperty(cjs$
|
|
19992
|
-
cjs$
|
|
19993
|
-
|
|
19988
|
+
Object.defineProperty(cjs$1, "__esModule", { value: true });
|
|
19989
|
+
cjs$1.default = StyleToObject;
|
|
19990
|
+
var inline_style_parser_1 = __importDefault(requireInlineStyleParser());
|
|
19994
19991
|
/**
|
|
19995
19992
|
* Parses inline style to object.
|
|
19996
19993
|
*
|
|
@@ -20006,17 +20003,17 @@ function requireCjs$1 () {
|
|
|
20006
20003
|
* ```
|
|
20007
20004
|
*/
|
|
20008
20005
|
function StyleToObject(style, iterator) {
|
|
20009
|
-
|
|
20006
|
+
var styleObject = null;
|
|
20010
20007
|
if (!style || typeof style !== 'string') {
|
|
20011
20008
|
return styleObject;
|
|
20012
20009
|
}
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
declarations.forEach((declaration)
|
|
20010
|
+
var declarations = (0, inline_style_parser_1.default)(style);
|
|
20011
|
+
var hasIterator = typeof iterator === 'function';
|
|
20012
|
+
declarations.forEach(function (declaration) {
|
|
20016
20013
|
if (declaration.type !== 'declaration') {
|
|
20017
20014
|
return;
|
|
20018
20015
|
}
|
|
20019
|
-
|
|
20016
|
+
var property = declaration.property, value = declaration.value;
|
|
20020
20017
|
if (hasIterator) {
|
|
20021
20018
|
iterator(property, value, declaration);
|
|
20022
20019
|
}
|
|
@@ -20028,7 +20025,7 @@ function requireCjs$1 () {
|
|
|
20028
20025
|
return styleObject;
|
|
20029
20026
|
}
|
|
20030
20027
|
|
|
20031
|
-
return cjs$
|
|
20028
|
+
return cjs$1;
|
|
20032
20029
|
}
|
|
20033
20030
|
|
|
20034
20031
|
var utilities = {};
|
|
@@ -20226,7 +20223,7 @@ function requireUtilities () {
|
|
|
20226
20223
|
* @param arg - The argument to be returned.
|
|
20227
20224
|
* @returns - The input argument `arg`.
|
|
20228
20225
|
*/
|
|
20229
|
-
var returnFirstArg = function (arg) { return arg; };
|
|
20226
|
+
var returnFirstArg = function (arg) { return arg; };
|
|
20230
20227
|
exports.returnFirstArg = returnFirstArg;
|
|
20231
20228
|
|
|
20232
20229
|
} (utilities$1));
|
|
@@ -21104,13 +21101,12 @@ var Accordion = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
21104
21101
|
var tabHeader = createTabHeader(tab, selected, index);
|
|
21105
21102
|
var tabContent = createTabContent(tab, selected, index);
|
|
21106
21103
|
var _rootProps = mergeProps({
|
|
21104
|
+
key: key,
|
|
21107
21105
|
className: cx('accordiontab.root', {
|
|
21108
21106
|
selected: selected
|
|
21109
21107
|
})
|
|
21110
21108
|
}, AccordionTabBase.getCOtherProps(tab), getTabPT(tab, 'root', index));
|
|
21111
|
-
return /*#__PURE__*/React.createElement("div",
|
|
21112
|
-
key: key
|
|
21113
|
-
}), tabHeader, tabContent);
|
|
21109
|
+
return /*#__PURE__*/React.createElement("div", _rootProps, tabHeader, tabContent);
|
|
21114
21110
|
}
|
|
21115
21111
|
return null;
|
|
21116
21112
|
};
|
|
@@ -21706,10 +21702,6 @@ var InputNumber = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
21706
21702
|
}
|
|
21707
21703
|
return null;
|
|
21708
21704
|
};
|
|
21709
|
-
var addWithPrecision = function addWithPrecision(base, increment) {
|
|
21710
|
-
var precision = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
21711
|
-
return Math.round((base + increment) * precision) / precision;
|
|
21712
|
-
};
|
|
21713
21705
|
var _repeat = function repeat(event, interval, dir) {
|
|
21714
21706
|
var i = interval || 500;
|
|
21715
21707
|
clearTimer();
|
|
@@ -21722,7 +21714,7 @@ var InputNumber = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
21722
21714
|
if (inputRef.current) {
|
|
21723
21715
|
var step = props.step * dir;
|
|
21724
21716
|
var currentValue = parseValue(inputRef.current.value) || 0;
|
|
21725
|
-
var newValue = validateValue(
|
|
21717
|
+
var newValue = validateValue(currentValue + step);
|
|
21726
21718
|
if (props.maxLength && props.maxLength < formatValue(newValue).length) {
|
|
21727
21719
|
return;
|
|
21728
21720
|
}
|
|
@@ -24397,9 +24389,8 @@ var DropdownPanel = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
24397
24389
|
return item && createItem(item, options.index, options);
|
|
24398
24390
|
},
|
|
24399
24391
|
contentTemplate: function contentTemplate(options) {
|
|
24400
|
-
var children = options.children || [];
|
|
24401
24392
|
var emptyMessage = props.hasFilter ? props.emptyFilterMessage : props.emptyMessage;
|
|
24402
|
-
var content = isEmptyFilter
|
|
24393
|
+
var content = isEmptyFilter ? createEmptyMessage(emptyMessage) : options.children;
|
|
24403
24394
|
var listProps = mergeProps({
|
|
24404
24395
|
ref: options.contentRef,
|
|
24405
24396
|
style: options.style,
|
|
@@ -24439,8 +24430,7 @@ var DropdownPanel = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
24439
24430
|
context: context
|
|
24440
24431
|
})),
|
|
24441
24432
|
style: sx('panel'),
|
|
24442
|
-
onClick: props.onClick
|
|
24443
|
-
'data-pr-is-overlay': true
|
|
24433
|
+
onClick: props.onClick
|
|
24444
24434
|
}, getPTOptions('panel'));
|
|
24445
24435
|
var transitionProps = mergeProps({
|
|
24446
24436
|
classNames: cx('transition'),
|
|
@@ -27393,9 +27383,6 @@ var DataTableBase = ComponentBase.extend({
|
|
|
27393
27383
|
alwaysShowPaginator: true,
|
|
27394
27384
|
breakpoint: '960px',
|
|
27395
27385
|
cellClassName: null,
|
|
27396
|
-
cellMemo: true,
|
|
27397
|
-
cellMemoProps: ['rowData', 'field', 'allowCellSelection', 'isCellSelected', 'editMode', 'index', 'tabIndex', 'editing', 'expanded', 'editingMeta', 'frozenCol', 'alignFrozenCol'],
|
|
27398
|
-
cellMemoPropsDepth: 1,
|
|
27399
27386
|
cellSelection: false,
|
|
27400
27387
|
checkIcon: null,
|
|
27401
27388
|
className: null,
|
|
@@ -28098,6 +28085,8 @@ var Cell = function Cell(props) {
|
|
|
28098
28085
|
setStyleObjectState = _React$useState6[1];
|
|
28099
28086
|
var elementRef = React.useRef(null);
|
|
28100
28087
|
var keyHelperRef = React.useRef(null);
|
|
28088
|
+
var overlayEventListener = React.useRef(null);
|
|
28089
|
+
var selfClick = React.useRef(false);
|
|
28101
28090
|
var focusTimeout = React.useRef(null);
|
|
28102
28091
|
var initFocusTimeout = React.useRef(null);
|
|
28103
28092
|
var editingRowDataStateRef = React.useRef(null);
|
|
@@ -28134,20 +28123,17 @@ var Cell = function Cell(props) {
|
|
|
28134
28123
|
var cellEditValidateOnClose = function cellEditValidateOnClose() {
|
|
28135
28124
|
return getColumnProp('cellEditValidateOnClose');
|
|
28136
28125
|
};
|
|
28137
|
-
var isIgnoredElement = function isIgnoredElement(element) {
|
|
28138
|
-
var isOverlay = function isOverlay(el) {
|
|
28139
|
-
return el.getAttribute && el.getAttribute('data-pr-is-overlay');
|
|
28140
|
-
};
|
|
28141
|
-
return isOverlay(element) || DomHandler.getParents(element).find(function (el) {
|
|
28142
|
-
return isOverlay(el);
|
|
28143
|
-
});
|
|
28144
|
-
};
|
|
28145
28126
|
var _useEventListener = useEventListener({
|
|
28146
28127
|
type: 'click',
|
|
28147
28128
|
listener: function listener(e) {
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28129
|
+
setTimeout(function () {
|
|
28130
|
+
if (!selfClick.current && isOutsideClicked(e.target)) {
|
|
28131
|
+
// #2666 for overlay components and outside is clicked
|
|
28132
|
+
|
|
28133
|
+
switchCellToViewMode(e, true);
|
|
28134
|
+
}
|
|
28135
|
+
}, 0);
|
|
28136
|
+
selfClick.current = false;
|
|
28151
28137
|
},
|
|
28152
28138
|
options: true,
|
|
28153
28139
|
when: isEditable()
|
|
@@ -28192,6 +28178,10 @@ var Cell = function Cell(props) {
|
|
|
28192
28178
|
setTimeout(function () {
|
|
28193
28179
|
setEditingState(false);
|
|
28194
28180
|
unbindDocumentClickListener();
|
|
28181
|
+
OverlayService.off('overlay-click', overlayEventListener.current);
|
|
28182
|
+
overlayEventListener.current = null;
|
|
28183
|
+
editingRowDataStateRef.current = null;
|
|
28184
|
+
selfClick.current = false;
|
|
28195
28185
|
}, 1);
|
|
28196
28186
|
};
|
|
28197
28187
|
var switchCellToViewMode = function switchCellToViewMode(event, submit) {
|
|
@@ -28235,7 +28225,7 @@ var Cell = function Cell(props) {
|
|
|
28235
28225
|
editingRowDataStateRef.current = editingRowData;
|
|
28236
28226
|
};
|
|
28237
28227
|
var _onClick = function onClick(event) {
|
|
28238
|
-
props.onClick(event, getCellCallbackParams(event), isEditable(), editingState, setEditingState, props.column, bindDocumentClickListener);
|
|
28228
|
+
props.onClick(event, getCellCallbackParams(event), isEditable(), editingState, setEditingState, selfClick, props.column, bindDocumentClickListener, overlayEventListener, isOutsideClicked);
|
|
28239
28229
|
};
|
|
28240
28230
|
var _onMouseDown = function onMouseDown(event) {
|
|
28241
28231
|
var params = getCellCallbackParams(event);
|
|
@@ -28307,6 +28297,7 @@ var Cell = function Cell(props) {
|
|
|
28307
28297
|
}
|
|
28308
28298
|
};
|
|
28309
28299
|
var _onBlur = function onBlur(event) {
|
|
28300
|
+
selfClick.current = false;
|
|
28310
28301
|
if (props.editMode !== 'row' && editingState && getColumnProp('cellEditValidatorEvent') === 'blur') {
|
|
28311
28302
|
switchCellToViewMode(event, true);
|
|
28312
28303
|
}
|
|
@@ -28387,8 +28378,9 @@ var Cell = function Cell(props) {
|
|
|
28387
28378
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28388
28379
|
}, [editingState]);
|
|
28389
28380
|
useUnmountEffect(function () {
|
|
28390
|
-
if (
|
|
28391
|
-
|
|
28381
|
+
if (overlayEventListener.current) {
|
|
28382
|
+
OverlayService.off('overlay-click', overlayEventListener.current);
|
|
28383
|
+
overlayEventListener.current = null;
|
|
28392
28384
|
}
|
|
28393
28385
|
});
|
|
28394
28386
|
var createLoading = function createLoading() {
|
|
@@ -28692,7 +28684,6 @@ var Cell = function Cell(props) {
|
|
|
28692
28684
|
var RadioCheckCell = /*#__PURE__*/React.memo(function (props) {
|
|
28693
28685
|
return /*#__PURE__*/React.createElement(Cell, props);
|
|
28694
28686
|
}, function (prevProps, nextProps) {
|
|
28695
|
-
if (nextProps.cellMemo === false) return false;
|
|
28696
28687
|
var keysToCompare = ['isRowSelected', 'field', 'allowCellSelection', 'isCellSelected', 'editMode', 'index', 'tabIndex', 'editing', 'expanded', 'editingMeta', 'rowData'];
|
|
28697
28688
|
return ObjectUtils.selectiveCompare(prevProps, nextProps, keysToCompare);
|
|
28698
28689
|
});
|
|
@@ -29176,13 +29167,8 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
29176
29167
|
} else {
|
|
29177
29168
|
var left = 0;
|
|
29178
29169
|
var prev = elementRef.current && elementRef.current.previousElementSibling;
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
29182
|
-
elementRef.current.style.left = left + 'px';
|
|
29183
|
-
break;
|
|
29184
|
-
}
|
|
29185
|
-
prev = prev.previousElementSibling;
|
|
29170
|
+
if (prev && prev.classList.contains('p-frozen-column')) {
|
|
29171
|
+
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
29186
29172
|
}
|
|
29187
29173
|
styleObject.left = left + 'px';
|
|
29188
29174
|
}
|
|
@@ -29190,8 +29176,9 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
29190
29176
|
!isSameStyle && setStyleObjectState(styleObject);
|
|
29191
29177
|
}
|
|
29192
29178
|
}, []);
|
|
29193
|
-
var onCellClick = function onCellClick(event, params, isEditable, editingState, setEditingState, column, bindDocumentClickListener) {
|
|
29179
|
+
var onCellClick = function onCellClick(event, params, isEditable, editingState, setEditingState, selfClick, column, bindDocumentClickListener, overlayEventListener, isOutsideClicked) {
|
|
29194
29180
|
if (props.editMode !== 'row' && isEditable && !editingState && (props.selectOnEdit || !props.selectOnEdit && props.isRowSelected)) {
|
|
29181
|
+
selfClick.current = true;
|
|
29195
29182
|
var onBeforeCellEditShow = getColumnProp(column, 'onBeforeCellEditShow');
|
|
29196
29183
|
var onCellEditInit = getColumnProp(column, 'onCellEditInit');
|
|
29197
29184
|
var cellEditValidatorEvent = getColumnProp(column, 'cellEditValidatorEvent');
|
|
@@ -29222,6 +29209,12 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
29222
29209
|
}
|
|
29223
29210
|
if (cellEditValidatorEvent === 'click') {
|
|
29224
29211
|
bindDocumentClickListener();
|
|
29212
|
+
overlayEventListener.current = function (e) {
|
|
29213
|
+
if (!isOutsideClicked(e.target)) {
|
|
29214
|
+
selfClick.current = true;
|
|
29215
|
+
}
|
|
29216
|
+
};
|
|
29217
|
+
OverlayService.on('overlay-click', overlayEventListener.current);
|
|
29225
29218
|
}
|
|
29226
29219
|
}, 1);
|
|
29227
29220
|
}
|
|
@@ -30581,21 +30574,16 @@ var FooterCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
30581
30574
|
var _align = getColumnProp('alignFrozen');
|
|
30582
30575
|
if (_align === 'right') {
|
|
30583
30576
|
var right = 0;
|
|
30584
|
-
var next = elementRef.current
|
|
30577
|
+
var next = elementRef.current.nextElementSibling;
|
|
30585
30578
|
if (next && next.classList.contains('p-frozen-column')) {
|
|
30586
30579
|
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
|
30587
30580
|
}
|
|
30588
30581
|
styleObject.right = right + 'px';
|
|
30589
30582
|
} else {
|
|
30590
30583
|
var left = 0;
|
|
30591
|
-
var prev = elementRef.current
|
|
30592
|
-
|
|
30593
|
-
|
|
30594
|
-
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
30595
|
-
elementRef.current.style.left = left + 'px';
|
|
30596
|
-
break;
|
|
30597
|
-
}
|
|
30598
|
-
prev = prev.previousElementSibling;
|
|
30584
|
+
var prev = elementRef.current.previousElementSibling;
|
|
30585
|
+
if (prev && prev.classList.contains('p-frozen-column')) {
|
|
30586
|
+
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
30599
30587
|
}
|
|
30600
30588
|
styleObject.left = left + 'px';
|
|
30601
30589
|
}
|
|
@@ -31271,7 +31259,7 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
31271
31259
|
};
|
|
31272
31260
|
} else {
|
|
31273
31261
|
filters[field].value = null;
|
|
31274
|
-
filters[field].matchMode = defaultConstraint
|
|
31262
|
+
filters[field].matchMode = defaultConstraint.matchMode;
|
|
31275
31263
|
}
|
|
31276
31264
|
filterClearCallback && filterClearCallback();
|
|
31277
31265
|
props.onFilterChange(filters);
|
|
@@ -31338,7 +31326,6 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
31338
31326
|
}
|
|
31339
31327
|
};
|
|
31340
31328
|
var onRowMatchModeChange = function onRowMatchModeChange(matchMode) {
|
|
31341
|
-
var _iconRef$current;
|
|
31342
31329
|
var filterMatchModeChangeCallback = getColumnProp('onFilterMatchModeChange');
|
|
31343
31330
|
var filters = _objectSpread$4$1({}, props.filters);
|
|
31344
31331
|
filters[field].matchMode = matchMode;
|
|
@@ -31349,7 +31336,6 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
31349
31336
|
props.onFilterChange(filters);
|
|
31350
31337
|
props.onFilterApply();
|
|
31351
31338
|
hide();
|
|
31352
|
-
(_iconRef$current = iconRef.current) === null || _iconRef$current === void 0 || _iconRef$current.focus();
|
|
31353
31339
|
};
|
|
31354
31340
|
var onRowMatchModeKeyDown = function onRowMatchModeKeyDown(event, matchMode, clear) {
|
|
31355
31341
|
var item = event.target;
|
|
@@ -32109,21 +32095,16 @@ var HeaderCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
32109
32095
|
var align = getColumnProp('alignFrozen');
|
|
32110
32096
|
if (align === 'right') {
|
|
32111
32097
|
var right = 0;
|
|
32112
|
-
var next = elementRef.current
|
|
32098
|
+
var next = elementRef.current.nextElementSibling;
|
|
32113
32099
|
if (next && next.classList.contains('p-frozen-column')) {
|
|
32114
32100
|
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
|
32115
32101
|
}
|
|
32116
32102
|
styleObject.right = right + 'px';
|
|
32117
32103
|
} else {
|
|
32118
32104
|
var left = 0;
|
|
32119
|
-
var prev = elementRef.current
|
|
32120
|
-
|
|
32121
|
-
|
|
32122
|
-
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
32123
|
-
elementRef.current.style.left = left + 'px';
|
|
32124
|
-
break;
|
|
32125
|
-
}
|
|
32126
|
-
prev = prev.previousElementSibling;
|
|
32105
|
+
var prev = elementRef.current.previousElementSibling;
|
|
32106
|
+
if (prev && prev.classList.contains('p-frozen-column')) {
|
|
32107
|
+
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
32127
32108
|
}
|
|
32128
32109
|
styleObject.left = left + 'px';
|
|
32129
32110
|
}
|
|
@@ -32974,20 +32955,6 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
32974
32955
|
multiSortMeta: restoredState.multiSortMeta
|
|
32975
32956
|
}));
|
|
32976
32957
|
} else {
|
|
32977
|
-
var lastMeta = restoredState.multiSortMeta[restoredState.multiSortMeta.length - 1];
|
|
32978
|
-
var field = lastMeta && lastMeta.field ? lastMeta.field : null;
|
|
32979
|
-
if (field) {
|
|
32980
|
-
var sortColumn = findColumnByKey(getColumns(), field);
|
|
32981
|
-
if (sortColumn) {
|
|
32982
|
-
var sortFunction = getColumnProp(sortColumn, 'sortFunction');
|
|
32983
|
-
var sortable = getColumnProp(sortColumn, 'sortable');
|
|
32984
|
-
if (sortFunction && sortable) {
|
|
32985
|
-
columnSortFunction.current = sortFunction;
|
|
32986
|
-
columnSortable.current = sortable;
|
|
32987
|
-
columnField.current = field;
|
|
32988
|
-
}
|
|
32989
|
-
}
|
|
32990
|
-
}
|
|
32991
32958
|
setMultiSortMetaState(restoredState.multiSortMeta);
|
|
32992
32959
|
}
|
|
32993
32960
|
}
|
|
@@ -34103,9 +34070,6 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
34103
34070
|
},
|
|
34104
34071
|
getVirtualScroller: function getVirtualScroller() {
|
|
34105
34072
|
return virtualScrollerRef.current;
|
|
34106
|
-
},
|
|
34107
|
-
getProcessedData: function getProcessedData() {
|
|
34108
|
-
return processedData();
|
|
34109
34073
|
}
|
|
34110
34074
|
};
|
|
34111
34075
|
});
|
|
@@ -35282,7 +35246,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
35282
35246
|
lastPageX.current = event.pageX;
|
|
35283
35247
|
dialogRef.current.style.left = leftPos - leftMargin + 'px';
|
|
35284
35248
|
}
|
|
35285
|
-
if (topPos >= props.minY &&
|
|
35249
|
+
if (topPos >= props.minY && topPos + height < viewport.height) {
|
|
35286
35250
|
lastPageY.current = event.pageY;
|
|
35287
35251
|
dialogRef.current.style.top = topPos - topMargin + 'px';
|
|
35288
35252
|
}
|
|
@@ -35336,10 +35300,10 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
35336
35300
|
newWidth = newWidth + deltaX;
|
|
35337
35301
|
newHeight = newHeight + deltaY;
|
|
35338
35302
|
}
|
|
35339
|
-
if ((!minWidth || newWidth > minWidth) &&
|
|
35303
|
+
if ((!minWidth || newWidth > minWidth) && offset.left + newWidth < viewport.width) {
|
|
35340
35304
|
dialogRef.current.style.width = newWidth + 'px';
|
|
35341
35305
|
}
|
|
35342
|
-
if ((!minHeight || newHeight > minHeight) &&
|
|
35306
|
+
if ((!minHeight || newHeight > minHeight) && offset.top + newHeight < viewport.height) {
|
|
35343
35307
|
dialogRef.current.style.height = newHeight + 'px';
|
|
35344
35308
|
}
|
|
35345
35309
|
lastPageX.current = event.pageX;
|
|
@@ -37562,7 +37526,6 @@ var MultiSelectHeader = /*#__PURE__*/React.memo(function (props) {
|
|
|
37562
37526
|
element: content,
|
|
37563
37527
|
filterOptions: filterOptions,
|
|
37564
37528
|
onFilter: onFilter,
|
|
37565
|
-
filterInputKeyDown: props.onFilterKeyDown,
|
|
37566
37529
|
filterIconClassName: props.filterIconClassName,
|
|
37567
37530
|
props: props
|
|
37568
37531
|
};
|
|
@@ -37938,8 +37901,7 @@ var MultiSelectPanel = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(fun
|
|
|
37938
37901
|
allowOptionSelect: allowOptionSelect
|
|
37939
37902
|
})),
|
|
37940
37903
|
style: props.panelStyle,
|
|
37941
|
-
onClick: props.onClick
|
|
37942
|
-
'data-pr-is-overlay': true
|
|
37904
|
+
onClick: props.onClick
|
|
37943
37905
|
}, getPTOptions('panel'));
|
|
37944
37906
|
if (props.inline) {
|
|
37945
37907
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -39215,10 +39177,11 @@ var Badge = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPr
|
|
|
39215
39177
|
}));
|
|
39216
39178
|
Badge.displayName = 'Badge';
|
|
39217
39179
|
|
|
39218
|
-
var css_248z = ".multiselect-container {\n position: relative;\n display: inline-block;\n}\n\n.selected-options-tooltip {\n position: absolute;\n background-color: #ffffff;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n width: 400px;\n top: 100%;\n left: 0;\n}\n\n.selected-options-tooltip div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n";
|
|
39219
|
-
styleInject(css_248z);
|
|
39180
|
+
var css_248z$1 = ".multiselect-container {\n position: relative;\n display: inline-block;\n}\n\n.selected-options-tooltip {\n position: absolute;\n background-color: #ffffff;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 8px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n width: 400px;\n top: 100%;\n left: 0;\n}\n\n.selected-options-tooltip div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n";
|
|
39181
|
+
styleInject(css_248z$1);
|
|
39220
39182
|
|
|
39221
39183
|
var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
39184
|
+
var _BADGE_SIZES$badgeSiz;
|
|
39222
39185
|
var _ref$value = _ref.value,
|
|
39223
39186
|
value = _ref$value === void 0 ? [] : _ref$value,
|
|
39224
39187
|
options = _ref.options,
|
|
@@ -39259,7 +39222,8 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39259
39222
|
_ref$classInput = _ref.classInput,
|
|
39260
39223
|
classInput = _ref$classInput === void 0 ? null : _ref$classInput,
|
|
39261
39224
|
_ref$displayNbOption = _ref.displayNbOption,
|
|
39262
|
-
displayNbOption = _ref$displayNbOption === void 0 ? false : _ref$displayNbOption
|
|
39225
|
+
displayNbOption = _ref$displayNbOption === void 0 ? false : _ref$displayNbOption,
|
|
39226
|
+
badgeSize = _ref.badgeSize;
|
|
39263
39227
|
var _useState = useState(null),
|
|
39264
39228
|
_useState2 = _slicedToArray$9(_useState, 2),
|
|
39265
39229
|
selectedOptions = _useState2[0],
|
|
@@ -39297,7 +39261,7 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39297
39261
|
_args = arguments,
|
|
39298
39262
|
_t;
|
|
39299
39263
|
return _regenerator().w(function (_context) {
|
|
39300
|
-
while (1) switch (_context.
|
|
39264
|
+
while (1) switch (_context.n) {
|
|
39301
39265
|
case 0:
|
|
39302
39266
|
search = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
|
|
39303
39267
|
_ref3 = _args.length > 2 ? _args[2] : undefined, _ref3$page = _ref3.page, page = _ref3$page === void 0 ? 1 : _ref3$page;
|
|
@@ -39631,7 +39595,30 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39631
39595
|
}, _callee3);
|
|
39632
39596
|
})), 500);
|
|
39633
39597
|
};
|
|
39634
|
-
selectedOptions ? selectedOptions.length : 0;
|
|
39598
|
+
var selectedOptionsCount = selectedOptions ? selectedOptions.length : 0;
|
|
39599
|
+
var BADGE_SIZES = {
|
|
39600
|
+
small: {
|
|
39601
|
+
fontSize: '10px',
|
|
39602
|
+
size: '18px'
|
|
39603
|
+
},
|
|
39604
|
+
medium: {
|
|
39605
|
+
fontSize: '12px',
|
|
39606
|
+
size: '22px'
|
|
39607
|
+
},
|
|
39608
|
+
large: {
|
|
39609
|
+
fontSize: '14px',
|
|
39610
|
+
size: '26px'
|
|
39611
|
+
},
|
|
39612
|
+
xlarge: {
|
|
39613
|
+
fontSize: '16px',
|
|
39614
|
+
size: '32px'
|
|
39615
|
+
},
|
|
39616
|
+
xxlarge: {
|
|
39617
|
+
fontSize: '18px',
|
|
39618
|
+
size: '38px'
|
|
39619
|
+
}
|
|
39620
|
+
};
|
|
39621
|
+
var badgeStyle = (_BADGE_SIZES$badgeSiz = BADGE_SIZES[badgeSize]) !== null && _BADGE_SIZES$badgeSiz !== void 0 ? _BADGE_SIZES$badgeSiz : BADGE_SIZES.medium;
|
|
39635
39622
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
39636
39623
|
className: "flex flex-col gap-1",
|
|
39637
39624
|
style: {
|
|
@@ -39681,13 +39668,21 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39681
39668
|
loading: loading,
|
|
39682
39669
|
delay: 25
|
|
39683
39670
|
}
|
|
39684
|
-
}), displayNbOption &&
|
|
39685
|
-
value:
|
|
39686
|
-
|
|
39671
|
+
}), displayNbOption && selectedOptionsCount > 1 && /*#__PURE__*/React__default.createElement(Badge, {
|
|
39672
|
+
value: selectedOptionsCount,
|
|
39673
|
+
className: "custom-badge",
|
|
39687
39674
|
style: {
|
|
39688
|
-
position:
|
|
39689
|
-
top:
|
|
39690
|
-
right:
|
|
39675
|
+
position: "absolute",
|
|
39676
|
+
top: "-8px",
|
|
39677
|
+
right: "-8px",
|
|
39678
|
+
backgroundColor: "red",
|
|
39679
|
+
fontSize: badgeStyle.fontSize,
|
|
39680
|
+
height: badgeStyle.size,
|
|
39681
|
+
minWidth: badgeStyle.size,
|
|
39682
|
+
lineHeight: badgeStyle.size,
|
|
39683
|
+
borderRadius: "50%",
|
|
39684
|
+
textAlign: "center",
|
|
39685
|
+
padding: 0
|
|
39691
39686
|
}
|
|
39692
39687
|
}), name && /*#__PURE__*/React__default.createElement("div", null, (Array.isArray(selectedOptions) ? selectedOptions : []).filter(function (opt) {
|
|
39693
39688
|
return opt && (_typeof$c(opt) === 'object' || typeof opt === 'number' || typeof opt === 'string');
|
|
@@ -39712,7 +39707,11 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39712
39707
|
}, errorMessage || 'Sélection invalide'))));
|
|
39713
39708
|
};
|
|
39714
39709
|
|
|
39710
|
+
var css_248z = ".badge-base {\n position: absolute;\n top: -8px;\n right: -8px;\n background: red !important;\n border-radius: 50% !important;\n text-align: center;\n padding: 0 !important;\n}\n\n/* Small */\n.badge-small {\n font-size: 10px !important;\n width: 18px !important;\n height: 18px !important;\n line-height: 18px !important;\n}\n\n/* Medium */\n.badge-medium {\n font-size: 12px !important;\n width: 22px !important;\n height: 22px !important;\n line-height: 22px !important;\n}\n\n/* Large */\n.badge-large {\n font-size: 14px !important;\n width: 26px !important;\n height: 26px !important;\n line-height: 26px !important;\n}\n\n/* XLarge */\n.badge-xlarge {\n font-size: 16px !important;\n width: 32px !important;\n height: 32px !important;\n line-height: 32px !important;\n}\n\n/* XXLarge */\n.badge-xxlarge {\n font-size: 18px !important;\n width: 38px !important;\n height: 38px !important;\n line-height: 38px !important;\n}\n";
|
|
39711
|
+
styleInject(css_248z);
|
|
39712
|
+
|
|
39715
39713
|
var MultiSelect = function MultiSelect(props) {
|
|
39714
|
+
var _BADGE_SIZES$badgeSiz;
|
|
39716
39715
|
var _props$options = props.options,
|
|
39717
39716
|
options = _props$options === void 0 ? [] : _props$options,
|
|
39718
39717
|
_props$isGroupedOptio = props.isGroupedOption,
|
|
@@ -39768,7 +39767,8 @@ var MultiSelect = function MultiSelect(props) {
|
|
|
39768
39767
|
_props$isSelectMeta = props.isSelectMeta,
|
|
39769
39768
|
isSelectMeta = _props$isSelectMeta === void 0 ? false : _props$isSelectMeta,
|
|
39770
39769
|
_props$ongletID = props.ongletID,
|
|
39771
|
-
ongletID = _props$ongletID === void 0 ? null : _props$ongletID
|
|
39770
|
+
ongletID = _props$ongletID === void 0 ? null : _props$ongletID,
|
|
39771
|
+
badgeSize = props.badgeSize;
|
|
39772
39772
|
var isAsyncOptions = typeof options === 'function';
|
|
39773
39773
|
if (isAsyncOptions) {
|
|
39774
39774
|
return /*#__PURE__*/React__default.createElement(MultiSelectMetaAsync, props);
|
|
@@ -39848,6 +39848,13 @@ var MultiSelect = function MultiSelect(props) {
|
|
|
39848
39848
|
setSelectedOptions(e.value);
|
|
39849
39849
|
if (onChange) onChange(e.value);
|
|
39850
39850
|
};
|
|
39851
|
+
|
|
39852
|
+
// const handleChange = (e) => {
|
|
39853
|
+
// const ids = Array.isArray(e.value) ? e.value : [e.value];
|
|
39854
|
+
// setSelectedOptions(ids);
|
|
39855
|
+
// if (onChange) onChange(ids);
|
|
39856
|
+
// };
|
|
39857
|
+
|
|
39851
39858
|
var selectedItemTemplate = function selectedItemTemplate(option) {
|
|
39852
39859
|
if (isSelectMeta) {
|
|
39853
39860
|
var selectedOption = options.find(function (opt) {
|
|
@@ -39970,6 +39977,29 @@ var MultiSelect = function MultiSelect(props) {
|
|
|
39970
39977
|
return opt;
|
|
39971
39978
|
}).join('\n');
|
|
39972
39979
|
};
|
|
39980
|
+
var BADGE_SIZES = {
|
|
39981
|
+
small: {
|
|
39982
|
+
fontSize: '10px',
|
|
39983
|
+
size: '18px'
|
|
39984
|
+
},
|
|
39985
|
+
medium: {
|
|
39986
|
+
fontSize: '12px',
|
|
39987
|
+
size: '22px'
|
|
39988
|
+
},
|
|
39989
|
+
large: {
|
|
39990
|
+
fontSize: '14px',
|
|
39991
|
+
size: '26px'
|
|
39992
|
+
},
|
|
39993
|
+
xlarge: {
|
|
39994
|
+
fontSize: '16px',
|
|
39995
|
+
size: '32px'
|
|
39996
|
+
},
|
|
39997
|
+
xxlarge: {
|
|
39998
|
+
fontSize: '18px',
|
|
39999
|
+
size: '38px'
|
|
40000
|
+
}
|
|
40001
|
+
};
|
|
40002
|
+
var badgeStyle = (_BADGE_SIZES$badgeSiz = BADGE_SIZES[badgeSize]) !== null && _BADGE_SIZES$badgeSiz !== void 0 ? _BADGE_SIZES$badgeSiz : BADGE_SIZES.medium;
|
|
39973
40003
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
39974
40004
|
className: "flex flex-col gap-1",
|
|
39975
40005
|
style: {
|
|
@@ -40021,11 +40051,19 @@ var MultiSelect = function MultiSelect(props) {
|
|
|
40021
40051
|
optionGroupChildren: 'items'
|
|
40022
40052
|
})), displayNbOption && selectedOptions.length > 0 && /*#__PURE__*/React__default.createElement(Badge, {
|
|
40023
40053
|
value: selectedOptions.length,
|
|
40024
|
-
|
|
40054
|
+
className: "custom-badge",
|
|
40025
40055
|
style: {
|
|
40026
|
-
position:
|
|
40027
|
-
top:
|
|
40028
|
-
right:
|
|
40056
|
+
position: "absolute",
|
|
40057
|
+
top: "-8px",
|
|
40058
|
+
right: "-8px",
|
|
40059
|
+
backgroundColor: "red",
|
|
40060
|
+
fontSize: badgeStyle.fontSize,
|
|
40061
|
+
height: badgeStyle.size,
|
|
40062
|
+
minWidth: badgeStyle.size,
|
|
40063
|
+
lineHeight: badgeStyle.size,
|
|
40064
|
+
borderRadius: "50%",
|
|
40065
|
+
textAlign: "center",
|
|
40066
|
+
padding: 0
|
|
40029
40067
|
}
|
|
40030
40068
|
})), name && /*#__PURE__*/React__default.createElement("div", null, (Array.isArray(selectedOptions) ? selectedOptions : []).filter(function (opt) {
|
|
40031
40069
|
return opt && (_typeof$c(opt) === 'object' || typeof opt === 'number' || typeof opt === 'string');
|
|
@@ -40201,7 +40239,8 @@ var MultiSelectPresets = {
|
|
|
40201
40239
|
NbOption: {
|
|
40202
40240
|
placeholder: 'Nombre d\'options sélectionnées',
|
|
40203
40241
|
options: optionsExample,
|
|
40204
|
-
displayNbOption: true
|
|
40242
|
+
displayNbOption: true,
|
|
40243
|
+
badgeSize: 'large'
|
|
40205
40244
|
},
|
|
40206
40245
|
SelectMetaSync: {
|
|
40207
40246
|
isSelectMeta: true,
|
|
@@ -40279,7 +40318,7 @@ var MultiSelectPresets = {
|
|
|
40279
40318
|
return opt.nom.toLowerCase().includes(search.toLowerCase());
|
|
40280
40319
|
});
|
|
40281
40320
|
length = 25;
|
|
40282
|
-
start = (page - 1) * length;
|
|
40321
|
+
start = (page - 1) * length;
|
|
40283
40322
|
paginatedOptions = filtered.slice(start, start + length);
|
|
40284
40323
|
return _context2.a(2, {
|
|
40285
40324
|
options: paginatedOptions,
|