primereact 7.0.0 → 7.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/button/button.cjs.js +23 -24
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +23 -24
- package/button/button.esm.min.js +1 -1
- package/button/button.js +23 -24
- package/button/button.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +2 -2
- package/core/core.js +25 -26
- package/core/core.min.js +2 -2
- package/multiselect/multiselect.cjs.js +1 -2
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -2
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -2
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/primereact.all.cjs.js +10 -12
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +10 -12
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +10 -12
- package/primereact.all.min.js +1 -1
- package/resources/primereact.css +94 -95
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +2 -2
- package/resources/themes/arya-green/theme.css +2 -2
- package/resources/themes/arya-orange/theme.css +2 -2
- package/resources/themes/arya-purple/theme.css +2 -2
- package/resources/themes/bootstrap4-dark-blue/theme.css +2 -2
- package/resources/themes/bootstrap4-dark-purple/theme.css +2 -2
- package/resources/themes/bootstrap4-light-blue/theme.css +2 -2
- package/resources/themes/bootstrap4-light-purple/theme.css +2 -2
- package/resources/themes/fluent-light/theme.css +2 -2
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5671 -0
- package/resources/themes/lara-dark-indigo/theme.css +2 -2
- package/resources/themes/lara-dark-purple/theme.css +79 -79
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5671 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5671 -0
- package/resources/themes/lara-light-indigo/theme.css +85 -85
- package/resources/themes/lara-light-purple/theme.css +85 -85
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5671 -0
- package/resources/themes/luna-amber/theme.css +2 -2
- package/resources/themes/luna-blue/theme.css +2 -2
- package/resources/themes/luna-green/theme.css +2 -2
- package/resources/themes/luna-pink/theme.css +2 -2
- package/resources/themes/md-dark-deeppurple/theme.css +2 -2
- package/resources/themes/md-dark-indigo/theme.css +2 -2
- package/resources/themes/md-light-deeppurple/theme.css +12 -6
- package/resources/themes/md-light-indigo/theme.css +2 -2
- package/resources/themes/mdc-dark-deeppurple/theme.css +2 -2
- package/resources/themes/mdc-dark-indigo/theme.css +2 -2
- package/resources/themes/mdc-light-deeppurple/theme.css +2 -2
- package/resources/themes/mdc-light-indigo/theme.css +2 -2
- package/resources/themes/nova/theme.css +2 -2
- package/resources/themes/nova-accent/theme.css +2 -2
- package/resources/themes/nova-alt/theme.css +2 -2
- package/resources/themes/rhea/theme.css +2 -2
- package/resources/themes/saga-blue/theme.css +2 -2
- package/resources/themes/saga-green/theme.css +2 -2
- package/resources/themes/saga-orange/theme.css +2 -2
- package/resources/themes/saga-purple/theme.css +2 -2
- package/resources/themes/tailwind-light/theme.css +2 -2
- package/resources/themes/vela-blue/theme.css +2 -2
- package/resources/themes/vela-green/theme.css +2 -2
- package/resources/themes/vela-orange/theme.css +2 -2
- package/resources/themes/vela-purple/theme.css +2 -2
- package/tooltip/tooltip.min.css +1 -1
- package/treetable/treetable.cjs.js +2 -2
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +2 -2
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +2 -2
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +2 -2
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +2 -2
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +2 -2
- package/utils/utils.min.js +1 -1
- package/web-types.json +1 -1
package/button/button.cjs.js
CHANGED
|
@@ -29,22 +29,6 @@ function _extends() {
|
|
|
29
29
|
return _extends.apply(this, arguments);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function _typeof(obj) {
|
|
33
|
-
"@babel/helpers - typeof";
|
|
34
|
-
|
|
35
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
36
|
-
_typeof = function _typeof(obj) {
|
|
37
|
-
return typeof obj;
|
|
38
|
-
};
|
|
39
|
-
} else {
|
|
40
|
-
_typeof = function _typeof(obj) {
|
|
41
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return _typeof(obj);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
32
|
function _classCallCheck(instance, Constructor) {
|
|
49
33
|
if (!(instance instanceof Constructor)) {
|
|
50
34
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -91,6 +75,22 @@ function _inherits(subClass, superClass) {
|
|
|
91
75
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
92
76
|
}
|
|
93
77
|
|
|
78
|
+
function _typeof(obj) {
|
|
79
|
+
"@babel/helpers - typeof";
|
|
80
|
+
|
|
81
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
82
|
+
_typeof = function _typeof(obj) {
|
|
83
|
+
return typeof obj;
|
|
84
|
+
};
|
|
85
|
+
} else {
|
|
86
|
+
_typeof = function _typeof(obj) {
|
|
87
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return _typeof(obj);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
94
|
function _assertThisInitialized(self) {
|
|
95
95
|
if (self === void 0) {
|
|
96
96
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -209,15 +209,14 @@ var ButtonComponent = /*#__PURE__*/function (_Component) {
|
|
|
209
209
|
}, {
|
|
210
210
|
key: "renderIcon",
|
|
211
211
|
value: function renderIcon() {
|
|
212
|
-
var _classNames;
|
|
213
|
-
|
|
214
212
|
var icon = this.props.loading ? this.props.loadingIcon : this.props.icon;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
'p-button-
|
|
220
|
-
|
|
213
|
+
var className = utils.classNames('p-button-icon p-c', {
|
|
214
|
+
'p-button-loading-icon': this.props.loading,
|
|
215
|
+
'p-button-icon-left': this.props.iconPos === 'left' && this.props.label,
|
|
216
|
+
'p-button-icon-right': this.props.iconPos === 'right' && this.props.label,
|
|
217
|
+
'p-button-icon-top': this.props.iconPos === 'top' && this.props.label,
|
|
218
|
+
'p-button-icon-bottom': this.props.iconPos === 'bottom' && this.props.label
|
|
219
|
+
});
|
|
221
220
|
return utils.IconUtils.getJSXIcon(icon, {
|
|
222
221
|
className: className
|
|
223
222
|
}, {
|
package/button/button.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),o=require("primereact/tooltip"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),o=require("primereact/tooltip"),r=require("primereact/ripple");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(t);function p(){return p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},p.apply(this,arguments)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function y(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function m(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?y(Object(o),!0).forEach((function(e){d(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var v=function(n){c(P,t.Component);var a,u,f,y,v,O=(a=P,u=g(),function(){var t,e=h(a);if(u){var o=h(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return b(this,t)});function P(e){var o;return s(this,P),(o=O.call(this,e)).elementRef=t.createRef(o.props.forwardRef),o}return f=P,(y=[{key:"updateForwardRef",value:function(){var t=this.props.forwardRef;t&&("function"==typeof t?t(this.elementRef.current):t.current=this.elementRef.current)}},{key:"isDisabled",value:function(){return this.props.disabled||this.props.loading}},{key:"componentDidMount",value:function(){this.updateForwardRef(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(m({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=o.tip({target:this.elementRef.current,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderIcon",value:function(){var t=this.props.loading?this.props.loadingIcon:this.props.icon,o=e.classNames("p-button-icon p-c",{"p-button-loading-icon":this.props.loading,"p-button-icon-left":"left"===this.props.iconPos&&this.props.label,"p-button-icon-right":"right"===this.props.iconPos&&this.props.label,"p-button-icon-top":"top"===this.props.iconPos&&this.props.label,"p-button-icon-bottom":"bottom"===this.props.iconPos&&this.props.label});return e.IconUtils.getJSXIcon(t,{className:o},{props:this.props})}},{key:"renderLabel",value:function(){return this.props.label?i.default.createElement("span",{className:"p-button-label p-c"},this.props.label):!this.props.children&&!this.props.label&&i.default.createElement("span",{className:"p-button-label p-c",dangerouslySetInnerHTML:{__html:" "}})}},{key:"renderBadge",value:function(){if(this.props.badge){var t=e.classNames("p-badge",this.props.badgeClassName);return i.default.createElement("span",{className:t},this.props.badge)}return null}},{key:"render",value:function(){var t=this.isDisabled(),o=e.classNames("p-button p-component",this.props.className,d({"p-button-icon-only":(this.props.icon||this.props.loading&&this.props.loadingIcon)&&!this.props.label,"p-button-vertical":("top"===this.props.iconPos||"bottom"===this.props.iconPos)&&this.props.label,"p-disabled":t,"p-button-loading":this.props.loading,"p-button-loading-label-only":this.props.loading&&!this.props.icon&&this.props.label},"p-button-loading-".concat(this.props.iconPos),this.props.loading&&this.props.loadingIcon&&this.props.label)),n=this.renderIcon(),s=this.renderLabel(),l=this.renderBadge(),a=e.ObjectUtils.findDiffKeys(this.props,P.defaultProps);return i.default.createElement("button",p({ref:this.elementRef},a,{className:o,disabled:t}),n,s,this.props.children,l,i.default.createElement(r.Ripple,null))}}])&&l(f.prototype,y),v&&l(f,v),P}();d(v,"defaultProps",{label:null,icon:null,iconPos:"left",badge:null,badgeClassName:null,tooltip:null,tooltipOptions:null,forwardRef:null,disabled:!1,loading:!1,loadingIcon:"pi pi-spinner pi-spin"}),exports.Button=i.default.forwardRef((function(t,e){return i.default.createElement(v,p({forwardRef:e},t))})),exports.ButtonComponent=v;
|
package/button/button.esm.js
CHANGED
|
@@ -21,22 +21,6 @@ function _extends() {
|
|
|
21
21
|
return _extends.apply(this, arguments);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
function _typeof(obj) {
|
|
25
|
-
"@babel/helpers - typeof";
|
|
26
|
-
|
|
27
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
28
|
-
_typeof = function _typeof(obj) {
|
|
29
|
-
return typeof obj;
|
|
30
|
-
};
|
|
31
|
-
} else {
|
|
32
|
-
_typeof = function _typeof(obj) {
|
|
33
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return _typeof(obj);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
24
|
function _classCallCheck(instance, Constructor) {
|
|
41
25
|
if (!(instance instanceof Constructor)) {
|
|
42
26
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -83,6 +67,22 @@ function _inherits(subClass, superClass) {
|
|
|
83
67
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
84
68
|
}
|
|
85
69
|
|
|
70
|
+
function _typeof(obj) {
|
|
71
|
+
"@babel/helpers - typeof";
|
|
72
|
+
|
|
73
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
74
|
+
_typeof = function _typeof(obj) {
|
|
75
|
+
return typeof obj;
|
|
76
|
+
};
|
|
77
|
+
} else {
|
|
78
|
+
_typeof = function _typeof(obj) {
|
|
79
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return _typeof(obj);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
86
|
function _assertThisInitialized(self) {
|
|
87
87
|
if (self === void 0) {
|
|
88
88
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -201,15 +201,14 @@ var ButtonComponent = /*#__PURE__*/function (_Component) {
|
|
|
201
201
|
}, {
|
|
202
202
|
key: "renderIcon",
|
|
203
203
|
value: function renderIcon() {
|
|
204
|
-
var _classNames;
|
|
205
|
-
|
|
206
204
|
var icon = this.props.loading ? this.props.loadingIcon : this.props.icon;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
'p-button-
|
|
212
|
-
|
|
205
|
+
var className = classNames('p-button-icon p-c', {
|
|
206
|
+
'p-button-loading-icon': this.props.loading,
|
|
207
|
+
'p-button-icon-left': this.props.iconPos === 'left' && this.props.label,
|
|
208
|
+
'p-button-icon-right': this.props.iconPos === 'right' && this.props.label,
|
|
209
|
+
'p-button-icon-top': this.props.iconPos === 'top' && this.props.label,
|
|
210
|
+
'p-button-icon-bottom': this.props.iconPos === 'bottom' && this.props.label
|
|
211
|
+
});
|
|
213
212
|
return IconUtils.getJSXIcon(icon, {
|
|
214
213
|
className: className
|
|
215
214
|
}, {
|
package/button/button.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{createRef as o,Component as e}from"react";import{classNames as r,IconUtils as n,ObjectUtils as i}from"primereact/utils";import{tip as p}from"primereact/tooltip";import{Ripple as s}from"primereact/ripple";function l(){return l=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},l.apply(this,arguments)}function c(t
|
|
1
|
+
import t,{createRef as o,Component as e}from"react";import{classNames as r,IconUtils as n,ObjectUtils as i}from"primereact/utils";import{tip as p}from"primereact/tooltip";import{Ripple as s}from"primereact/ripple";function l(){return l=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},l.apply(this,arguments)}function c(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function a(t,o){for(var e=0;e<o.length;e++){var r=o[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,o){return u=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t},u(t,o)}function f(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&u(t,o)}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,o){if(o&&("object"===h(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,o,e){return o in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function g(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}function v(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?g(Object(e),!0).forEach((function(o){m(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):g(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var P=function(u){f(R,e);var h,b,g,P,w,j=(h=R,b=O(),function(){var t,o=y(h);if(b){var e=y(this).constructor;t=Reflect.construct(o,arguments,e)}else t=o.apply(this,arguments);return d(this,t)});function R(t){var e;return c(this,R),(e=j.call(this,t)).elementRef=o(e.props.forwardRef),e}return g=R,(P=[{key:"updateForwardRef",value:function(){var t=this.props.forwardRef;t&&("function"==typeof t?t(this.elementRef.current):t.current=this.elementRef.current)}},{key:"isDisabled",value:function(){return this.props.disabled||this.props.loading}},{key:"componentDidMount",value:function(){this.updateForwardRef(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(v({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=p({target:this.elementRef.current,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderIcon",value:function(){var t=this.props.loading?this.props.loadingIcon:this.props.icon,o=r("p-button-icon p-c",{"p-button-loading-icon":this.props.loading,"p-button-icon-left":"left"===this.props.iconPos&&this.props.label,"p-button-icon-right":"right"===this.props.iconPos&&this.props.label,"p-button-icon-top":"top"===this.props.iconPos&&this.props.label,"p-button-icon-bottom":"bottom"===this.props.iconPos&&this.props.label});return n.getJSXIcon(t,{className:o},{props:this.props})}},{key:"renderLabel",value:function(){return this.props.label?t.createElement("span",{className:"p-button-label p-c"},this.props.label):!this.props.children&&!this.props.label&&t.createElement("span",{className:"p-button-label p-c",dangerouslySetInnerHTML:{__html:" "}})}},{key:"renderBadge",value:function(){if(this.props.badge){var o=r("p-badge",this.props.badgeClassName);return t.createElement("span",{className:o},this.props.badge)}return null}},{key:"render",value:function(){var o=this.isDisabled(),e=r("p-button p-component",this.props.className,m({"p-button-icon-only":(this.props.icon||this.props.loading&&this.props.loadingIcon)&&!this.props.label,"p-button-vertical":("top"===this.props.iconPos||"bottom"===this.props.iconPos)&&this.props.label,"p-disabled":o,"p-button-loading":this.props.loading,"p-button-loading-label-only":this.props.loading&&!this.props.icon&&this.props.label},"p-button-loading-".concat(this.props.iconPos),this.props.loading&&this.props.loadingIcon&&this.props.label)),n=this.renderIcon(),p=this.renderLabel(),c=this.renderBadge(),a=i.findDiffKeys(this.props,R.defaultProps);return t.createElement("button",l({ref:this.elementRef},a,{className:e,disabled:o}),n,p,this.props.children,c,t.createElement(s,null))}}])&&a(g.prototype,P),w&&a(g,w),R}();m(P,"defaultProps",{label:null,icon:null,iconPos:"left",badge:null,badgeClassName:null,tooltip:null,tooltipOptions:null,forwardRef:null,disabled:!1,loading:!1,loadingIcon:"pi pi-spinner pi-spin"});var w=t.forwardRef((function(o,e){return t.createElement(P,l({forwardRef:e},o))}));export{w as Button,P as ButtonComponent};
|
package/button/button.js
CHANGED
|
@@ -24,22 +24,6 @@ this.primereact.button = (function (exports, React, utils, tooltip, ripple) {
|
|
|
24
24
|
return _extends.apply(this, arguments);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function _typeof(obj) {
|
|
28
|
-
"@babel/helpers - typeof";
|
|
29
|
-
|
|
30
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
31
|
-
_typeof = function _typeof(obj) {
|
|
32
|
-
return typeof obj;
|
|
33
|
-
};
|
|
34
|
-
} else {
|
|
35
|
-
_typeof = function _typeof(obj) {
|
|
36
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return _typeof(obj);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
27
|
function _classCallCheck(instance, Constructor) {
|
|
44
28
|
if (!(instance instanceof Constructor)) {
|
|
45
29
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -86,6 +70,22 @@ this.primereact.button = (function (exports, React, utils, tooltip, ripple) {
|
|
|
86
70
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
87
71
|
}
|
|
88
72
|
|
|
73
|
+
function _typeof(obj) {
|
|
74
|
+
"@babel/helpers - typeof";
|
|
75
|
+
|
|
76
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
77
|
+
_typeof = function _typeof(obj) {
|
|
78
|
+
return typeof obj;
|
|
79
|
+
};
|
|
80
|
+
} else {
|
|
81
|
+
_typeof = function _typeof(obj) {
|
|
82
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return _typeof(obj);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
89
|
function _assertThisInitialized(self) {
|
|
90
90
|
if (self === void 0) {
|
|
91
91
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -204,15 +204,14 @@ this.primereact.button = (function (exports, React, utils, tooltip, ripple) {
|
|
|
204
204
|
}, {
|
|
205
205
|
key: "renderIcon",
|
|
206
206
|
value: function renderIcon() {
|
|
207
|
-
var _classNames;
|
|
208
|
-
|
|
209
207
|
var icon = this.props.loading ? this.props.loadingIcon : this.props.icon;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
'p-button-
|
|
215
|
-
|
|
208
|
+
var className = utils.classNames('p-button-icon p-c', {
|
|
209
|
+
'p-button-loading-icon': this.props.loading,
|
|
210
|
+
'p-button-icon-left': this.props.iconPos === 'left' && this.props.label,
|
|
211
|
+
'p-button-icon-right': this.props.iconPos === 'right' && this.props.label,
|
|
212
|
+
'p-button-icon-top': this.props.iconPos === 'top' && this.props.label,
|
|
213
|
+
'p-button-icon-bottom': this.props.iconPos === 'bottom' && this.props.label
|
|
214
|
+
});
|
|
216
215
|
return utils.IconUtils.getJSXIcon(icon, {
|
|
217
216
|
className: className
|
|
218
217
|
}, {
|
package/button/button.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.button=function(t,e,o,n,r){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=i(e);function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},s.apply(this,arguments)}function l(t
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.button=function(t,e,o,n,r){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=i(e);function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},s.apply(this,arguments)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function y(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function m(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function g(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?m(Object(o),!0).forEach((function(e){y(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var v=function(t){u(P,t);var i,c,f,b,m,v=(i=P,c=O(),function(){var t,e=d(i);if(c){var o=d(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return h(this,t)});function P(t){var o;return l(this,P),(o=v.call(this,t)).elementRef=e.createRef(o.props.forwardRef),o}return f=P,(b=[{key:"updateForwardRef",value:function(){var t=this.props.forwardRef;t&&("function"==typeof t?t(this.elementRef.current):t.current=this.elementRef.current)}},{key:"isDisabled",value:function(){return this.props.disabled||this.props.loading}},{key:"componentDidMount",value:function(){this.updateForwardRef(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(g({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=n.tip({target:this.elementRef.current,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderIcon",value:function(){var t=this.props.loading?this.props.loadingIcon:this.props.icon,e=o.classNames("p-button-icon p-c",{"p-button-loading-icon":this.props.loading,"p-button-icon-left":"left"===this.props.iconPos&&this.props.label,"p-button-icon-right":"right"===this.props.iconPos&&this.props.label,"p-button-icon-top":"top"===this.props.iconPos&&this.props.label,"p-button-icon-bottom":"bottom"===this.props.iconPos&&this.props.label});return o.IconUtils.getJSXIcon(t,{className:e},{props:this.props})}},{key:"renderLabel",value:function(){return this.props.label?p.default.createElement("span",{className:"p-button-label p-c"},this.props.label):!this.props.children&&!this.props.label&&p.default.createElement("span",{className:"p-button-label p-c",dangerouslySetInnerHTML:{__html:" "}})}},{key:"renderBadge",value:function(){if(this.props.badge){var t=o.classNames("p-badge",this.props.badgeClassName);return p.default.createElement("span",{className:t},this.props.badge)}return null}},{key:"render",value:function(){var t=this.isDisabled(),e=o.classNames("p-button p-component",this.props.className,y({"p-button-icon-only":(this.props.icon||this.props.loading&&this.props.loadingIcon)&&!this.props.label,"p-button-vertical":("top"===this.props.iconPos||"bottom"===this.props.iconPos)&&this.props.label,"p-disabled":t,"p-button-loading":this.props.loading,"p-button-loading-label-only":this.props.loading&&!this.props.icon&&this.props.label},"p-button-loading-".concat(this.props.iconPos),this.props.loading&&this.props.loadingIcon&&this.props.label)),n=this.renderIcon(),i=this.renderLabel(),l=this.renderBadge(),a=o.ObjectUtils.findDiffKeys(this.props,P.defaultProps);return p.default.createElement("button",s({ref:this.elementRef},a,{className:e,disabled:t}),n,i,this.props.children,l,p.default.createElement(r.Ripple,null))}}])&&a(f.prototype,b),m&&a(f,m),P}(e.Component);return y(v,"defaultProps",{label:null,icon:null,iconPos:"left",badge:null,badgeClassName:null,tooltip:null,tooltipOptions:null,forwardRef:null,disabled:!1,loading:!1,loadingIcon:"pi pi-spinner pi-spin"}),t.Button=p.default.forwardRef((function(t,e){return p.default.createElement(v,s({forwardRef:e},t))})),t.ButtonComponent=v,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.utils,primereact.tooltip,primereact.ripple);
|
|
@@ -28,8 +28,8 @@ export interface ConfirmDialogProps extends Omit<DialogProps, 'onHide'> {
|
|
|
28
28
|
rejectLabel?: string;
|
|
29
29
|
acceptLabel?: string;
|
|
30
30
|
icon?: IconType<ConfirmDialogProps>;
|
|
31
|
-
rejectIcon?: IconType<ConfirmDialogProps
|
|
32
|
-
acceptIcon?: IconType<ConfirmDialogProps
|
|
31
|
+
rejectIcon?: IconType<ConfirmDialogProps>;
|
|
32
|
+
acceptIcon?: IconType<ConfirmDialogProps>;
|
|
33
33
|
rejectClassName?: string;
|
|
34
34
|
acceptClassName?: string;
|
|
35
35
|
appendTo?: ConfirmDialogAppendToType;
|
package/core/core.js
CHANGED
|
@@ -193,7 +193,7 @@ this.primereact.utils = (function (exports, React) {
|
|
|
193
193
|
key: "getOuterWidth",
|
|
194
194
|
value: function getOuterWidth(el, margin) {
|
|
195
195
|
if (el) {
|
|
196
|
-
var width = el.offsetWidth;
|
|
196
|
+
var width = el.offsetWidth || el.getBoundingClientRect().width;
|
|
197
197
|
|
|
198
198
|
if (margin) {
|
|
199
199
|
var style = getComputedStyle(el);
|
|
@@ -209,7 +209,7 @@ this.primereact.utils = (function (exports, React) {
|
|
|
209
209
|
key: "getOuterHeight",
|
|
210
210
|
value: function getOuterHeight(el, margin) {
|
|
211
211
|
if (el) {
|
|
212
|
-
var height = el.offsetHeight;
|
|
212
|
+
var height = el.offsetHeight || el.getBoundingClientRect().height;
|
|
213
213
|
|
|
214
214
|
if (margin) {
|
|
215
215
|
var style = getComputedStyle(el);
|
|
@@ -5550,22 +5550,6 @@ this.primereact.button = (function (exports, React, utils, tooltip, ripple) {
|
|
|
5550
5550
|
return _extends.apply(this, arguments);
|
|
5551
5551
|
}
|
|
5552
5552
|
|
|
5553
|
-
function _typeof(obj) {
|
|
5554
|
-
"@babel/helpers - typeof";
|
|
5555
|
-
|
|
5556
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
5557
|
-
_typeof = function _typeof(obj) {
|
|
5558
|
-
return typeof obj;
|
|
5559
|
-
};
|
|
5560
|
-
} else {
|
|
5561
|
-
_typeof = function _typeof(obj) {
|
|
5562
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
5563
|
-
};
|
|
5564
|
-
}
|
|
5565
|
-
|
|
5566
|
-
return _typeof(obj);
|
|
5567
|
-
}
|
|
5568
|
-
|
|
5569
5553
|
function _classCallCheck(instance, Constructor) {
|
|
5570
5554
|
if (!(instance instanceof Constructor)) {
|
|
5571
5555
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -5612,6 +5596,22 @@ this.primereact.button = (function (exports, React, utils, tooltip, ripple) {
|
|
|
5612
5596
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
5613
5597
|
}
|
|
5614
5598
|
|
|
5599
|
+
function _typeof(obj) {
|
|
5600
|
+
"@babel/helpers - typeof";
|
|
5601
|
+
|
|
5602
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
5603
|
+
_typeof = function _typeof(obj) {
|
|
5604
|
+
return typeof obj;
|
|
5605
|
+
};
|
|
5606
|
+
} else {
|
|
5607
|
+
_typeof = function _typeof(obj) {
|
|
5608
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
5609
|
+
};
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
return _typeof(obj);
|
|
5613
|
+
}
|
|
5614
|
+
|
|
5615
5615
|
function _assertThisInitialized(self) {
|
|
5616
5616
|
if (self === void 0) {
|
|
5617
5617
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -5730,15 +5730,14 @@ this.primereact.button = (function (exports, React, utils, tooltip, ripple) {
|
|
|
5730
5730
|
}, {
|
|
5731
5731
|
key: "renderIcon",
|
|
5732
5732
|
value: function renderIcon() {
|
|
5733
|
-
var _classNames;
|
|
5734
|
-
|
|
5735
5733
|
var icon = this.props.loading ? this.props.loadingIcon : this.props.icon;
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
'p-button-
|
|
5741
|
-
|
|
5734
|
+
var className = utils.classNames('p-button-icon p-c', {
|
|
5735
|
+
'p-button-loading-icon': this.props.loading,
|
|
5736
|
+
'p-button-icon-left': this.props.iconPos === 'left' && this.props.label,
|
|
5737
|
+
'p-button-icon-right': this.props.iconPos === 'right' && this.props.label,
|
|
5738
|
+
'p-button-icon-top': this.props.iconPos === 'top' && this.props.label,
|
|
5739
|
+
'p-button-icon-bottom': this.props.iconPos === 'bottom' && this.props.label
|
|
5740
|
+
});
|
|
5742
5741
|
return utils.IconUtils.getJSXIcon(icon, {
|
|
5743
5742
|
className: className
|
|
5744
5743
|
}, {
|