plataforma-fundacao-componentes 2.23.31 → 2.23.33

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.
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useState, useEffect, memo, useCallback, useLayoutEffect, useRef, cloneElement, Fragment as Fragment$1, forwardRef, useImperativeHandle, createRef } from 'react';
1
+ import React, { useMemo, useState, useEffect, memo, useCallback, useLayoutEffect, useRef, Fragment as Fragment$1, forwardRef, useImperativeHandle, createRef } from 'react';
2
2
  import { CSSTransition, TransitionGroup } from 'react-transition-group';
3
3
  import moment from 'moment';
4
4
  import DOMPurify from 'dompurify';
@@ -115,6 +115,61 @@ var FormacaoIcon = function FormacaoIcon() {
115
115
  }));
116
116
  };
117
117
 
118
+ function _extends() {
119
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
120
+ for (var i = 1; i < arguments.length; i++) {
121
+ var source = arguments[i];
122
+
123
+ for (var key in source) {
124
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
125
+ target[key] = source[key];
126
+ }
127
+ }
128
+ }
129
+
130
+ return target;
131
+ };
132
+ return _extends.apply(this, arguments);
133
+ }
134
+
135
+ function _unsupportedIterableToArray(o, minLen) {
136
+ if (!o) return;
137
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
138
+ var n = Object.prototype.toString.call(o).slice(8, -1);
139
+ if (n === "Object" && o.constructor) n = o.constructor.name;
140
+ if (n === "Map" || n === "Set") return Array.from(o);
141
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
142
+ }
143
+
144
+ function _arrayLikeToArray(arr, len) {
145
+ if (len == null || len > arr.length) len = arr.length;
146
+
147
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
148
+
149
+ return arr2;
150
+ }
151
+
152
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
153
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
154
+ if (it) return (it = it.call(o)).next.bind(it);
155
+
156
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
157
+ if (it) o = it;
158
+ var i = 0;
159
+ return function () {
160
+ if (i >= o.length) return {
161
+ done: true
162
+ };
163
+ return {
164
+ done: false,
165
+ value: o[i++]
166
+ };
167
+ };
168
+ }
169
+
170
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
171
+ }
172
+
118
173
  var getMergedClassNames = function getMergedClassNames(arr) {
119
174
  return arr.filter(function (el) {
120
175
  return Boolean(el);
@@ -202,6 +257,16 @@ var getParents = function getParents(anchor) {
202
257
 
203
258
  return [anchor].concat(getParents(anchor.parentElement));
204
259
  };
260
+ var objectKeysFiltered = function objectKeysFiltered(obj, keysToExclude) {
261
+ var p = _extends({}, obj);
262
+
263
+ for (var _iterator = _createForOfIteratorHelperLoose(keysToExclude), _step; !(_step = _iterator()).done;) {
264
+ var k = _step.value;
265
+ delete p[k];
266
+ }
267
+
268
+ return p;
269
+ };
205
270
 
206
271
  var rootClassName$7 = 'percent-loader-icon';
207
272
  var PercentLoaderIcon = function PercentLoaderIcon(props) {
@@ -4396,61 +4461,6 @@ var QRCodeWhatsapp = function QRCodeWhatsapp(props) {
4396
4461
  }))));
4397
4462
  };
4398
4463
 
4399
- function _extends() {
4400
- _extends = Object.assign ? Object.assign.bind() : function (target) {
4401
- for (var i = 1; i < arguments.length; i++) {
4402
- var source = arguments[i];
4403
-
4404
- for (var key in source) {
4405
- if (Object.prototype.hasOwnProperty.call(source, key)) {
4406
- target[key] = source[key];
4407
- }
4408
- }
4409
- }
4410
-
4411
- return target;
4412
- };
4413
- return _extends.apply(this, arguments);
4414
- }
4415
-
4416
- function _unsupportedIterableToArray(o, minLen) {
4417
- if (!o) return;
4418
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4419
- var n = Object.prototype.toString.call(o).slice(8, -1);
4420
- if (n === "Object" && o.constructor) n = o.constructor.name;
4421
- if (n === "Map" || n === "Set") return Array.from(o);
4422
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
4423
- }
4424
-
4425
- function _arrayLikeToArray(arr, len) {
4426
- if (len == null || len > arr.length) len = arr.length;
4427
-
4428
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4429
-
4430
- return arr2;
4431
- }
4432
-
4433
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
4434
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
4435
- if (it) return (it = it.call(o)).next.bind(it);
4436
-
4437
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
4438
- if (it) o = it;
4439
- var i = 0;
4440
- return function () {
4441
- if (i >= o.length) return {
4442
- done: true
4443
- };
4444
- return {
4445
- done: false,
4446
- value: o[i++]
4447
- };
4448
- };
4449
- }
4450
-
4451
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4452
- }
4453
-
4454
4464
  var rootClassName$1y = 'component-collapse';
4455
4465
 
4456
4466
  function Collapse(props) {
@@ -8194,39 +8204,19 @@ Col.defaultProps = {
8194
8204
  var Col$1 = memo(Col);
8195
8205
 
8196
8206
  var rootClassName$23 = 'component-control-label';
8207
+ var keysToExclude = ['control', 'controlProps', 'labelPosition', 'labelGap', 'label'];
8197
8208
 
8198
8209
  function ControlLabel(props) {
8199
- var ref = useRef();
8200
-
8201
- var getProps = function getProps() {
8202
- var p = _extends({}, props);
8210
+ var _props$control$props;
8203
8211
 
8204
- delete p.control;
8205
- delete p.value;
8206
- delete p.label;
8207
- delete p.labelPosition;
8208
- delete p.labelGap;
8209
- return p;
8210
- };
8211
-
8212
- var disabled = props.disabled;
8213
- var controlProps = {
8214
- disabled: disabled
8215
- };
8216
- ['checked', 'onChange', 'value', 'onClick'].forEach(function (key) {
8217
- var _props$control;
8218
-
8219
- if (typeof ((_props$control = props.control) === null || _props$control === void 0 ? void 0 : _props$control.props[key]) === 'undefined' && typeof props[key] !== 'undefined') {
8220
- controlProps[key] = props[key];
8221
- }
8222
- });
8212
+ var ref = useRef();
8223
8213
  return React.createElement("label", Object.assign({
8224
- className: getMergedClassNames([rootClassName$23, props.labelPosition ? props.labelPosition : '', controlProps.disabled ? 'disabled' : '']),
8214
+ className: getMergedClassNames([rootClassName$23, props.labelPosition ? props.labelPosition : '', (_props$control$props = props.control.props) !== null && _props$control$props !== void 0 && _props$control$props.disabled ? 'disabled' : '']),
8225
8215
  ref: ref,
8226
8216
  style: props.labelGap ? {
8227
8217
  gap: props.labelGap + "px"
8228
8218
  } : {}
8229
- }, getProps()), cloneElement(props.control, controlProps), React.createElement("span", {
8219
+ }, objectKeysFiltered(props, keysToExclude)), props.control, React.createElement("span", {
8230
8220
  className: 'nunito'
8231
8221
  }, props.label));
8232
8222
  }
@@ -40915,6 +40905,7 @@ function usePublicMenuList(props) {
40915
40905
  return true;
40916
40906
  }).map(function (it) {
40917
40907
  return {
40908
+ id: it.id,
40918
40909
  icon: stringToReactElement(it.icon, {
40919
40910
  style: {
40920
40911
  height: '24px',