primereact 10.0.2 → 10.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/autocomplete/autocomplete.cjs.js +4 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +4 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +3 -6
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +3 -6
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +3 -6
- package/blockui/blockui.min.js +1 -1
- package/calendar/calendar.cjs.js +11 -11
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +11 -11
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +11 -11
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +3 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +3 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +3 -1
- package/carousel/carousel.min.js +1 -1
- package/checkbox/checkbox.d.ts +5 -5
- package/componentbase/componentbase.d.ts +8 -0
- package/contextmenu/contextmenu.cjs.js +4 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +4 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +4 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +288 -31
- package/core/core.min.js +8 -8
- package/datatable/datatable.cjs.js +92 -41
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +27 -0
- package/datatable/datatable.esm.js +92 -41
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +92 -41
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +24 -22
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +24 -22
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +24 -22
- package/dataview/dataview.min.js +1 -1
- package/dialog/dialog.cjs.js +2 -4
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -4
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -4
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +29 -17
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +29 -17
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +29 -17
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +1 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +1 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +1 -1
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +2 -2
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -2
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- package/fieldset/fieldset.min.js +1 -1
- package/galleria/galleria.cjs.js +3 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +3 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +3 -5
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +2 -1
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +1 -1
- package/hooks/hooks.esm.js +2 -1
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +2 -1
- package/hooks/hooks.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +7 -0
- package/icons/arrowdown/index.esm.js +7 -0
- package/icons/arrowdown/index.js +7 -0
- package/icons/arrowup/index.cjs.js +7 -0
- package/icons/arrowup/index.esm.js +7 -0
- package/icons/arrowup/index.js +7 -0
- package/icons/ban/index.cjs.js +7 -0
- package/icons/ban/index.esm.js +7 -0
- package/icons/ban/index.js +7 -0
- package/icons/download/index.cjs.js +7 -0
- package/icons/download/index.esm.js +7 -0
- package/icons/download/index.js +7 -0
- package/icons/exclamationtriangle/index.cjs.js +7 -0
- package/icons/exclamationtriangle/index.esm.js +7 -0
- package/icons/exclamationtriangle/index.js +7 -0
- package/icons/eyeslash/index.cjs.js +7 -0
- package/icons/eyeslash/index.esm.js +7 -0
- package/icons/eyeslash/index.js +7 -0
- package/icons/filter/index.cjs.js +7 -0
- package/icons/filter/index.esm.js +7 -0
- package/icons/filter/index.js +7 -0
- package/icons/filterslash/index.cjs.js +7 -0
- package/icons/filterslash/index.esm.js +7 -0
- package/icons/filterslash/index.js +7 -0
- package/icons/infocircle/index.cjs.js +7 -0
- package/icons/infocircle/index.esm.js +7 -0
- package/icons/infocircle/index.js +7 -0
- package/icons/pencil/index.cjs.js +7 -0
- package/icons/pencil/index.esm.js +7 -0
- package/icons/pencil/index.js +7 -0
- package/icons/plus/index.cjs.js +7 -0
- package/icons/plus/index.esm.js +7 -0
- package/icons/plus/index.js +7 -0
- package/icons/refresh/index.cjs.js +7 -0
- package/icons/refresh/index.esm.js +7 -0
- package/icons/refresh/index.js +7 -0
- package/icons/search/index.cjs.js +7 -0
- package/icons/search/index.esm.js +7 -0
- package/icons/search/index.js +7 -0
- package/icons/searchminus/index.cjs.js +7 -0
- package/icons/searchminus/index.esm.js +7 -0
- package/icons/searchminus/index.js +7 -0
- package/icons/searchplus/index.cjs.js +7 -0
- package/icons/searchplus/index.esm.js +7 -0
- package/icons/searchplus/index.js +7 -0
- package/icons/sortalt/index.cjs.js +7 -0
- package/icons/sortalt/index.esm.js +7 -0
- package/icons/sortalt/index.js +7 -0
- package/icons/sortamountdown/index.cjs.js +7 -0
- package/icons/sortamountdown/index.esm.js +7 -0
- package/icons/sortamountdown/index.js +7 -0
- package/icons/sortamountupalt/index.cjs.js +7 -0
- package/icons/sortamountupalt/index.esm.js +7 -0
- package/icons/sortamountupalt/index.js +7 -0
- package/icons/spinner/index.cjs.js +7 -0
- package/icons/spinner/index.esm.js +7 -0
- package/icons/spinner/index.js +7 -0
- package/icons/star/index.cjs.js +7 -0
- package/icons/star/index.esm.js +7 -0
- package/icons/star/index.js +7 -0
- package/icons/starfill/index.cjs.js +7 -0
- package/icons/starfill/index.esm.js +7 -0
- package/icons/starfill/index.js +7 -0
- package/icons/thlarge/index.cjs.js +7 -0
- package/icons/thlarge/index.esm.js +7 -0
- package/icons/thlarge/index.js +7 -0
- package/icons/timescircle/index.cjs.js +7 -0
- package/icons/timescircle/index.esm.js +7 -0
- package/icons/timescircle/index.js +7 -0
- package/icons/trash/index.cjs.js +7 -0
- package/icons/trash/index.esm.js +7 -0
- package/icons/trash/index.js +7 -0
- package/icons/undo/index.cjs.js +7 -0
- package/icons/undo/index.esm.js +7 -0
- package/icons/undo/index.js +7 -0
- package/icons/upload/index.cjs.js +7 -0
- package/icons/upload/index.esm.js +7 -0
- package/icons/upload/index.js +7 -0
- package/icons/windowmaximize/index.cjs.js +7 -0
- package/icons/windowmaximize/index.esm.js +7 -0
- package/icons/windowmaximize/index.js +7 -0
- package/icons/windowminimize/index.cjs.js +7 -0
- package/icons/windowminimize/index.esm.js +7 -0
- package/icons/windowminimize/index.js +7 -0
- package/image/image.cjs.js +111 -106
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +111 -106
- package/image/image.esm.min.js +1 -1
- package/image/image.js +112 -107
- package/image/image.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +7 -4
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +7 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +7 -4
- package/inputnumber/inputnumber.min.js +1 -1
- package/menu/menu.cjs.js +105 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +5 -0
- package/menu/menu.esm.js +108 -4
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +105 -1
- package/menu/menu.min.js +1 -1
- package/message/message.cjs.js +1 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +4 -2
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -3
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +4 -2
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +26 -12
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +4 -0
- package/multiselect/multiselect.esm.js +26 -12
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +26 -12
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +32 -34
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +32 -34
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +32 -34
- package/orderlist/orderlist.min.js +1 -1
- package/package.json +1 -1
- package/panel/panel.cjs.js +2 -2
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +2 -2
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -3
- package/panel/panel.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +436 -373
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +436 -373
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +436 -373
- package/passthrough/tailwind/index.min.js +1 -1
- package/primereact.all.cjs.js +330 -191
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +330 -191
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +330 -191
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +1 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressbar/progressbar.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +3 -3
- package/resources/themes/arya-blue/theme.css +397 -518
- package/resources/themes/arya-green/theme.css +397 -518
- package/resources/themes/arya-orange/theme.css +397 -518
- package/resources/themes/arya-purple/theme.css +397 -518
- package/resources/themes/bootstrap4-dark-blue/theme.css +398 -518
- package/resources/themes/bootstrap4-dark-purple/theme.css +398 -518
- package/resources/themes/bootstrap4-light-blue/theme.css +398 -518
- package/resources/themes/bootstrap4-light-purple/theme.css +398 -518
- package/resources/themes/fluent-light/theme.css +424 -529
- package/resources/themes/lara-dark-blue/theme.css +402 -518
- package/resources/themes/lara-dark-indigo/theme.css +402 -518
- package/resources/themes/lara-dark-purple/theme.css +402 -518
- package/resources/themes/lara-dark-teal/theme.css +402 -518
- package/resources/themes/lara-light-blue/theme.css +571 -687
- package/resources/themes/lara-light-indigo/theme.css +409 -525
- package/resources/themes/lara-light-purple/theme.css +409 -525
- package/resources/themes/lara-light-teal/theme.css +409 -525
- package/resources/themes/luna-amber/theme.css +411 -531
- package/resources/themes/luna-blue/theme.css +411 -531
- package/resources/themes/luna-green/theme.css +411 -531
- package/resources/themes/luna-pink/theme.css +411 -531
- package/resources/themes/md-dark-deeppurple/theme.css +669 -739
- package/resources/themes/md-dark-indigo/theme.css +669 -739
- package/resources/themes/md-light-deeppurple/theme.css +574 -644
- package/resources/themes/md-light-indigo/theme.css +574 -644
- package/resources/themes/mdc-dark-deeppurple/theme.css +669 -739
- package/resources/themes/mdc-dark-indigo/theme.css +669 -739
- package/resources/themes/mdc-light-deeppurple/theme.css +574 -644
- package/resources/themes/mdc-light-indigo/theme.css +574 -644
- package/resources/themes/mira/theme.css +435 -525
- package/resources/themes/nano/theme.css +395 -518
- package/resources/themes/nova/theme.css +399 -518
- package/resources/themes/nova-accent/theme.css +396 -518
- package/resources/themes/nova-alt/theme.css +399 -518
- package/resources/themes/rhea/theme.css +396 -518
- package/resources/themes/saga-blue/theme.css +397 -518
- package/resources/themes/saga-green/theme.css +397 -518
- package/resources/themes/saga-orange/theme.css +397 -518
- package/resources/themes/saga-purple/theme.css +397 -518
- package/resources/themes/soho-dark/theme.css +428 -546
- package/resources/themes/soho-light/theme.css +407 -523
- package/resources/themes/tailwind-light/theme.css +432 -547
- package/resources/themes/vela-blue/theme.css +397 -518
- package/resources/themes/vela-green/theme.css +397 -518
- package/resources/themes/vela-orange/theme.css +397 -518
- package/resources/themes/vela-purple/theme.css +397 -518
- package/resources/themes/viva-dark/theme.css +421 -523
- package/resources/themes/viva-light/theme.css +421 -523
- package/scrollpanel/scrollpanel.cjs.js +33 -17
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +19 -3
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +226 -210
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +3 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +6 -0
- package/selectbutton/selectbutton.esm.js +3 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +4 -3
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +87 -89
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +87 -89
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +88 -90
- package/sidebar/sidebar.min.js +1 -1
- package/slider/slider.cjs.js +3 -3
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +3 -3
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +3 -3
- package/slider/slider.min.js +1 -1
- package/toast/toast.cjs.js +7 -5
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +7 -5
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +8 -6
- package/toast/toast.min.js +1 -1
- package/tree/tree.cjs.js +24 -2
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +24 -2
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +24 -2
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.d.ts +54 -4
- package/utils/utils.cjs.js +30 -0
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +3 -0
- package/utils/utils.esm.js +30 -0
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +30 -0
- package/utils/utils.min.js +1 -1
- package/web-types.json +29 -2
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
package/icons/thlarge/index.js
CHANGED
|
@@ -171,6 +171,13 @@ this.primereact.icons.thlarge = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
|
@@ -174,6 +174,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
174
174
|
value: function equals(obj1, obj2, field) {
|
|
175
175
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
180
|
+
* @param {*} a the first JSON object
|
|
181
|
+
* @param {*} b the second JSON object
|
|
182
|
+
* @returns true if equals, false it not
|
|
183
|
+
*/
|
|
177
184
|
}, {
|
|
178
185
|
key: "deepEquals",
|
|
179
186
|
value: function deepEquals(a, b) {
|
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
|
@@ -171,6 +171,13 @@ this.primereact.icons.timescircle = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
package/icons/trash/index.cjs.js
CHANGED
|
@@ -174,6 +174,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
174
174
|
value: function equals(obj1, obj2, field) {
|
|
175
175
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
180
|
+
* @param {*} a the first JSON object
|
|
181
|
+
* @param {*} b the second JSON object
|
|
182
|
+
* @returns true if equals, false it not
|
|
183
|
+
*/
|
|
177
184
|
}, {
|
|
178
185
|
key: "deepEquals",
|
|
179
186
|
value: function deepEquals(a, b) {
|
package/icons/trash/index.esm.js
CHANGED
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
package/icons/trash/index.js
CHANGED
|
@@ -171,6 +171,13 @@ this.primereact.icons.trash = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
package/icons/undo/index.cjs.js
CHANGED
|
@@ -174,6 +174,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
174
174
|
value: function equals(obj1, obj2, field) {
|
|
175
175
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
180
|
+
* @param {*} a the first JSON object
|
|
181
|
+
* @param {*} b the second JSON object
|
|
182
|
+
* @returns true if equals, false it not
|
|
183
|
+
*/
|
|
177
184
|
}, {
|
|
178
185
|
key: "deepEquals",
|
|
179
186
|
value: function deepEquals(a, b) {
|
package/icons/undo/index.esm.js
CHANGED
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
package/icons/undo/index.js
CHANGED
|
@@ -171,6 +171,13 @@ this.primereact.icons.undo = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
|
@@ -174,6 +174,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
174
174
|
value: function equals(obj1, obj2, field) {
|
|
175
175
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
180
|
+
* @param {*} a the first JSON object
|
|
181
|
+
* @param {*} b the second JSON object
|
|
182
|
+
* @returns true if equals, false it not
|
|
183
|
+
*/
|
|
177
184
|
}, {
|
|
178
185
|
key: "deepEquals",
|
|
179
186
|
value: function deepEquals(a, b) {
|
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
package/icons/upload/index.js
CHANGED
|
@@ -171,6 +171,13 @@ this.primereact.icons.upload = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
|
@@ -174,6 +174,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
174
174
|
value: function equals(obj1, obj2, field) {
|
|
175
175
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
180
|
+
* @param {*} a the first JSON object
|
|
181
|
+
* @param {*} b the second JSON object
|
|
182
|
+
* @returns true if equals, false it not
|
|
183
|
+
*/
|
|
177
184
|
}, {
|
|
178
185
|
key: "deepEquals",
|
|
179
186
|
value: function deepEquals(a, b) {
|
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
|
@@ -171,6 +171,13 @@ this.primereact.icons.windowmaximize = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
|
@@ -174,6 +174,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
174
174
|
value: function equals(obj1, obj2, field) {
|
|
175
175
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
180
|
+
* @param {*} a the first JSON object
|
|
181
|
+
* @param {*} b the second JSON object
|
|
182
|
+
* @returns true if equals, false it not
|
|
183
|
+
*/
|
|
177
184
|
}, {
|
|
178
185
|
key: "deepEquals",
|
|
179
186
|
value: function deepEquals(a, b) {
|
|
@@ -150,6 +150,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
150
150
|
value: function equals(obj1, obj2, field) {
|
|
151
151
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
156
|
+
* @param {*} a the first JSON object
|
|
157
|
+
* @param {*} b the second JSON object
|
|
158
|
+
* @returns true if equals, false it not
|
|
159
|
+
*/
|
|
153
160
|
}, {
|
|
154
161
|
key: "deepEquals",
|
|
155
162
|
value: function deepEquals(a, b) {
|
|
@@ -171,6 +171,13 @@ this.primereact.icons.windowminimize = (function (exports, React, iconbase) {
|
|
|
171
171
|
value: function equals(obj1, obj2, field) {
|
|
172
172
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
177
|
+
* @param {*} a the first JSON object
|
|
178
|
+
* @param {*} b the second JSON object
|
|
179
|
+
* @returns true if equals, false it not
|
|
180
|
+
*/
|
|
174
181
|
}, {
|
|
175
182
|
key: "deepEquals",
|
|
176
183
|
value: function deepEquals(a, b) {
|
package/image/image.cjs.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var utils = require('primereact/utils');
|
|
7
8
|
var PrimeReact = require('primereact/api');
|
|
8
9
|
var componentbase = require('primereact/componentbase');
|
|
9
10
|
var csstransition = require('primereact/csstransition');
|
|
@@ -16,7 +17,6 @@ var searchplus = require('primereact/icons/searchplus');
|
|
|
16
17
|
var times = require('primereact/icons/times');
|
|
17
18
|
var undo = require('primereact/icons/undo');
|
|
18
19
|
var portal = require('primereact/portal');
|
|
19
|
-
var utils = require('primereact/utils');
|
|
20
20
|
|
|
21
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
22
|
|
|
@@ -152,6 +152,106 @@ function _slicedToArray(arr, i) {
|
|
|
152
152
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
var usePrevious = function usePrevious(newValue) {
|
|
156
|
+
var ref = React__namespace.useRef(undefined);
|
|
157
|
+
React__namespace.useEffect(function () {
|
|
158
|
+
ref.current = newValue;
|
|
159
|
+
});
|
|
160
|
+
return ref.current;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/* eslint-disable */
|
|
164
|
+
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
165
|
+
return React__namespace.useEffect(function () {
|
|
166
|
+
return fn;
|
|
167
|
+
}, []);
|
|
168
|
+
};
|
|
169
|
+
/* eslint-enable */
|
|
170
|
+
|
|
171
|
+
/* eslint-disable */
|
|
172
|
+
var useEventListener = function useEventListener(_ref) {
|
|
173
|
+
var _ref$target = _ref.target,
|
|
174
|
+
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
175
|
+
type = _ref.type,
|
|
176
|
+
listener = _ref.listener,
|
|
177
|
+
options = _ref.options,
|
|
178
|
+
_ref$when = _ref.when,
|
|
179
|
+
when = _ref$when === void 0 ? true : _ref$when;
|
|
180
|
+
var targetRef = React__namespace.useRef(null);
|
|
181
|
+
var listenerRef = React__namespace.useRef(null);
|
|
182
|
+
var prevListener = usePrevious(listener);
|
|
183
|
+
var prevOptions = usePrevious(options);
|
|
184
|
+
var bind = function bind() {
|
|
185
|
+
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
186
|
+
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
187
|
+
unbind();
|
|
188
|
+
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindOptions.target));
|
|
189
|
+
}
|
|
190
|
+
if (!listenerRef.current && targetRef.current) {
|
|
191
|
+
listenerRef.current = function (event) {
|
|
192
|
+
return listener && listener(event);
|
|
193
|
+
};
|
|
194
|
+
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
var unbind = function unbind() {
|
|
198
|
+
if (listenerRef.current) {
|
|
199
|
+
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
200
|
+
listenerRef.current = null;
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
React__namespace.useEffect(function () {
|
|
204
|
+
if (when) {
|
|
205
|
+
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
206
|
+
} else {
|
|
207
|
+
unbind();
|
|
208
|
+
targetRef.current = null;
|
|
209
|
+
}
|
|
210
|
+
}, [target, when]);
|
|
211
|
+
React__namespace.useEffect(function () {
|
|
212
|
+
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
213
|
+
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
214
|
+
unbind();
|
|
215
|
+
when && bind();
|
|
216
|
+
}
|
|
217
|
+
}, [listener, options, when]);
|
|
218
|
+
useUnmountEffect(function () {
|
|
219
|
+
unbind();
|
|
220
|
+
});
|
|
221
|
+
return [bind, unbind];
|
|
222
|
+
};
|
|
223
|
+
/* eslint-enable */
|
|
224
|
+
|
|
225
|
+
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
226
|
+
var handleEsc = function handleEsc(event) {
|
|
227
|
+
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
228
|
+
event.stopImmediatePropagation();
|
|
229
|
+
callback(event);
|
|
230
|
+
}
|
|
231
|
+
return;
|
|
232
|
+
};
|
|
233
|
+
var _useEventListener = useEventListener({
|
|
234
|
+
type: 'keydown',
|
|
235
|
+
listener: handleEsc
|
|
236
|
+
}),
|
|
237
|
+
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
238
|
+
bindKeyDownListener = _useEventListener2[0],
|
|
239
|
+
unbindKeyDownListener = _useEventListener2[1];
|
|
240
|
+
React__namespace.useEffect(function () {
|
|
241
|
+
if (!condition) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (!ref.current) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
bindKeyDownListener();
|
|
248
|
+
return function () {
|
|
249
|
+
unbindKeyDownListener();
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
return [ref, callback];
|
|
253
|
+
};
|
|
254
|
+
|
|
155
255
|
function _arrayWithoutHoles(arr) {
|
|
156
256
|
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
157
257
|
}
|
|
@@ -204,6 +304,13 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
204
304
|
value: function equals(obj1, obj2, field) {
|
|
205
305
|
if (field && obj1 && _typeof(obj1) === 'object' && obj2 && _typeof(obj2) === 'object') return this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field);else return this.deepEquals(obj1, obj2);
|
|
206
306
|
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Compares two JSON objects for deep equality recursively comparing both objects.
|
|
310
|
+
* @param {*} a the first JSON object
|
|
311
|
+
* @param {*} b the second JSON object
|
|
312
|
+
* @returns true if equals, false it not
|
|
313
|
+
*/
|
|
207
314
|
}, {
|
|
208
315
|
key: "deepEquals",
|
|
209
316
|
value: function deepEquals(a, b) {
|
|
@@ -731,7 +838,7 @@ var classes = {
|
|
|
731
838
|
},
|
|
732
839
|
transition: 'p-image-preview'
|
|
733
840
|
};
|
|
734
|
-
var styles = "\n@layer primereact {\n .p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-image-preview-container {\n position: relative;\n display: inline-block;\n }\n \n .p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity .3s;\n }\n \n .p-image-preview-icon {\n font-size: 1.5rem;\n }\n \n .p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n }\n \n .p-image-preview-container > img {\n cursor: pointer;\n }\n \n .p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n z-index: 1;\n }\n \n .p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n \n .p-image-preview {\n transition: transform .15s;\n max-width: 100vw;\n max-height: 100vh;\n width: 100%;\n height: 100%;\n }\n \n .p-image-preview-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-image-preview-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-image-preview-enter-done {\n transform: none;\n }\n \n .p-image-preview-exit {\n opacity: 1;\n }\n \n .p-image-preview-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);\n }\n}\n";
|
|
841
|
+
var styles = "\n@layer primereact {\n .p-image-mask {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-image-preview-container {\n position: relative;\n display: inline-block;\n line-height: 0;\n }\n \n .p-image-preview-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity .3s;\n border: none;\n padding: 0;\n }\n \n .p-image-preview-icon {\n font-size: 1.5rem;\n }\n \n .p-image-preview-container:hover > .p-image-preview-indicator {\n opacity: 1;\n cursor: pointer;\n }\n \n .p-image-preview-container > img {\n cursor: pointer;\n }\n \n .p-image-toolbar {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n z-index: 1;\n }\n \n .p-image-action.p-link {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n \n .p-image-preview {\n transition: transform .15s;\n max-width: 100vw;\n max-height: 100vh;\n width: 100%;\n height: 100%;\n }\n \n .p-image-preview-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-image-preview-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-image-preview-enter-done {\n transform: none;\n }\n \n .p-image-preview-exit {\n opacity: 1;\n }\n \n .p-image-preview-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);\n }\n}\n";
|
|
735
842
|
var inlineStyles = {
|
|
736
843
|
preview: function preview(_ref2) {
|
|
737
844
|
var rotateState = _ref2.rotateState,
|
|
@@ -780,106 +887,6 @@ var ImageBase = componentbase.ComponentBase.extend({
|
|
|
780
887
|
}
|
|
781
888
|
});
|
|
782
889
|
|
|
783
|
-
var usePrevious = function usePrevious(newValue) {
|
|
784
|
-
var ref = React__namespace.useRef(undefined);
|
|
785
|
-
React__namespace.useEffect(function () {
|
|
786
|
-
ref.current = newValue;
|
|
787
|
-
});
|
|
788
|
-
return ref.current;
|
|
789
|
-
};
|
|
790
|
-
|
|
791
|
-
/* eslint-disable */
|
|
792
|
-
var useUnmountEffect = function useUnmountEffect(fn) {
|
|
793
|
-
return React__namespace.useEffect(function () {
|
|
794
|
-
return fn;
|
|
795
|
-
}, []);
|
|
796
|
-
};
|
|
797
|
-
/* eslint-enable */
|
|
798
|
-
|
|
799
|
-
/* eslint-disable */
|
|
800
|
-
var useEventListener = function useEventListener(_ref) {
|
|
801
|
-
var _ref$target = _ref.target,
|
|
802
|
-
target = _ref$target === void 0 ? 'document' : _ref$target,
|
|
803
|
-
type = _ref.type,
|
|
804
|
-
listener = _ref.listener,
|
|
805
|
-
options = _ref.options,
|
|
806
|
-
_ref$when = _ref.when,
|
|
807
|
-
when = _ref$when === void 0 ? true : _ref$when;
|
|
808
|
-
var targetRef = React__namespace.useRef(null);
|
|
809
|
-
var listenerRef = React__namespace.useRef(null);
|
|
810
|
-
var prevListener = usePrevious(listener);
|
|
811
|
-
var prevOptions = usePrevious(options);
|
|
812
|
-
var bind = function bind() {
|
|
813
|
-
var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
814
|
-
if (utils.ObjectUtils.isNotEmpty(bindOptions.target)) {
|
|
815
|
-
unbind();
|
|
816
|
-
(bindOptions.when || when) && (targetRef.current = utils.DomHandler.getTargetElement(bindOptions.target));
|
|
817
|
-
}
|
|
818
|
-
if (!listenerRef.current && targetRef.current) {
|
|
819
|
-
listenerRef.current = function (event) {
|
|
820
|
-
return listener && listener(event);
|
|
821
|
-
};
|
|
822
|
-
targetRef.current.addEventListener(type, listenerRef.current, options);
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
var unbind = function unbind() {
|
|
826
|
-
if (listenerRef.current) {
|
|
827
|
-
targetRef.current.removeEventListener(type, listenerRef.current, options);
|
|
828
|
-
listenerRef.current = null;
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
React__namespace.useEffect(function () {
|
|
832
|
-
if (when) {
|
|
833
|
-
targetRef.current = utils.DomHandler.getTargetElement(target);
|
|
834
|
-
} else {
|
|
835
|
-
unbind();
|
|
836
|
-
targetRef.current = null;
|
|
837
|
-
}
|
|
838
|
-
}, [target, when]);
|
|
839
|
-
React__namespace.useEffect(function () {
|
|
840
|
-
// to properly compare functions we can implicitly converting the function to it's body's text as a String
|
|
841
|
-
if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
|
|
842
|
-
unbind();
|
|
843
|
-
when && bind();
|
|
844
|
-
}
|
|
845
|
-
}, [listener, options, when]);
|
|
846
|
-
useUnmountEffect(function () {
|
|
847
|
-
unbind();
|
|
848
|
-
});
|
|
849
|
-
return [bind, unbind];
|
|
850
|
-
};
|
|
851
|
-
/* eslint-enable */
|
|
852
|
-
|
|
853
|
-
var useOnEscapeKey = function useOnEscapeKey(ref, condition, callback) {
|
|
854
|
-
var handleEsc = function handleEsc(event) {
|
|
855
|
-
if (event.key === 'Esc' || event.key === 'Escape') {
|
|
856
|
-
event.stopImmediatePropagation();
|
|
857
|
-
callback(event);
|
|
858
|
-
}
|
|
859
|
-
return;
|
|
860
|
-
};
|
|
861
|
-
var _useEventListener = useEventListener({
|
|
862
|
-
type: 'keydown',
|
|
863
|
-
listener: handleEsc
|
|
864
|
-
}),
|
|
865
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
866
|
-
bindKeyDownListener = _useEventListener2[0],
|
|
867
|
-
unbindKeyDownListener = _useEventListener2[1];
|
|
868
|
-
React__namespace.useEffect(function () {
|
|
869
|
-
if (!condition) {
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
if (!ref.current) {
|
|
873
|
-
return;
|
|
874
|
-
}
|
|
875
|
-
bindKeyDownListener();
|
|
876
|
-
return function () {
|
|
877
|
-
unbindKeyDownListener();
|
|
878
|
-
};
|
|
879
|
-
});
|
|
880
|
-
return [ref, callback];
|
|
881
|
-
};
|
|
882
|
-
|
|
883
890
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
884
891
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
885
892
|
var Image = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
@@ -928,8 +935,7 @@ var Image = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
928
935
|
var show = function show() {
|
|
929
936
|
if (props.preview) {
|
|
930
937
|
setMaskVisibleState(true);
|
|
931
|
-
utils.DomHandler.
|
|
932
|
-
document.body.style.setProperty('--scrollbar-width', utils.DomHandler.calculateScrollbarWidth() + 'px');
|
|
938
|
+
utils.DomHandler.blockBodyScroll();
|
|
933
939
|
setTimeout(function () {
|
|
934
940
|
setPreviewVisibleState(true);
|
|
935
941
|
}, 25);
|
|
@@ -938,8 +944,7 @@ var Image = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
938
944
|
var hide = function hide() {
|
|
939
945
|
if (!previewClick.current) {
|
|
940
946
|
setPreviewVisibleState(false);
|
|
941
|
-
utils.DomHandler.
|
|
942
|
-
document.body.style.removeProperty('--scrollbar-width');
|
|
947
|
+
utils.DomHandler.unblockBodyScroll();
|
|
943
948
|
setRotateState(0);
|
|
944
949
|
setScaleState(1);
|
|
945
950
|
}
|