react-crud-mobile 1.0.30 → 1.0.32

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,5 +1,6 @@
1
- import React$1, { useState, useRef, useEffect, useLayoutEffect } from 'react';
1
+ import React, { useState, createElement, useRef, useEffect, useLayoutEffect } from 'react';
2
2
  import { Utils, ScopeUtils, Scope, CrudUtils, ComponentUtils, HtmlUtils } from 'react-crud-utils';
3
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
4
  import Ionicons from '@expo/vector-icons/Ionicons';
4
5
  import { TouchableOpacity, Text, Linking } from 'react-native';
5
6
 
@@ -29,32 +30,36 @@ function UIChildren(props) {
29
30
  var validateScope = Utils.nvl(props.validateScope, "global");
30
31
  var name = Utils.nvl(props.part, "child");
31
32
  if (scope.isInput()) {
32
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
33
+ return /*#__PURE__*/jsx(Fragment, {});
33
34
  }
34
35
  var Paint = function Paint(_ref) {
35
36
  var child = _ref.child;
36
37
  if (!child) {
37
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
38
+ return /*#__PURE__*/jsx(Fragment, {});
38
39
  }
39
40
  if (typeof child === "string") {
40
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, child);
41
+ return /*#__PURE__*/jsx(Fragment, {
42
+ children: child
43
+ });
41
44
  }
42
45
  var Custom = child.type;
43
46
  var pps = _extends({}, child.props);
44
47
  delete pps.children;
45
48
  if (typeof Custom === "string") {
46
49
  if (Utils.isEmpty(child.props.children)) {
47
- return /*#__PURE__*/React$1.createElement(Custom, pps);
50
+ return /*#__PURE__*/jsx(Custom, _extends({}, pps));
48
51
  }
49
- return /*#__PURE__*/React$1.createElement(Custom, pps, /*#__PURE__*/React$1.createElement(UIChildren, _extends({
50
- "transient": true,
51
- validateScope: validateScope
52
- }, child.props, {
53
- scope: scope,
54
- crud: crud
55
- })));
52
+ return /*#__PURE__*/jsx(Custom, _extends({}, pps, {
53
+ children: /*#__PURE__*/jsx(UIChildren, _extends({
54
+ "transient": true,
55
+ validateScope: validateScope
56
+ }, child.props, {
57
+ scope: scope,
58
+ crud: crud
59
+ }))
60
+ }));
56
61
  } else if (typeof Custom === "function") {
57
- return /*#__PURE__*/React$1.createElement(Custom, _extends({
62
+ return /*#__PURE__*/jsx(Custom, _extends({
58
63
  validateScope: validateScope
59
64
  }, child.props, {
60
65
  parent: scope,
@@ -62,7 +67,7 @@ function UIChildren(props) {
62
67
  }));
63
68
  }
64
69
  if (!Utils.isEmpty(child.props.children)) {
65
- return /*#__PURE__*/React$1.createElement(UIChildren, _extends({
70
+ return /*#__PURE__*/jsx(UIChildren, _extends({
66
71
  validateScope: validateScope
67
72
  }, child.props, {
68
73
  scope: scope,
@@ -70,32 +75,40 @@ function UIChildren(props) {
70
75
  "transient": true
71
76
  }));
72
77
  }
73
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
78
+ return /*#__PURE__*/jsx(Fragment, {});
74
79
  };
75
80
  var Draw = function Draw() {
76
81
  if (props.elements) {
77
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, Object.entries(props.elements).map(function (t, k) {
78
- return /*#__PURE__*/React$1.createElement(UIElement, _extends({
79
- crud: crud
80
- }, t[1]));
81
- }));
82
- }
83
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, React$1.Children.map(props.children, function (child) {
84
- return /*#__PURE__*/React$1.createElement(Paint, {
85
- child: child
82
+ return /*#__PURE__*/jsx(Fragment, {
83
+ children: Object.entries(props.elements).map(function (t, k) {
84
+ return /*#__PURE__*/jsx(UIElement, _extends({
85
+ crud: crud
86
+ }, t[1]));
87
+ })
86
88
  });
87
- }));
89
+ }
90
+ return /*#__PURE__*/jsx(Fragment, {
91
+ children: React.Children.map(props.children, function (child) {
92
+ return /*#__PURE__*/jsx(Paint, {
93
+ child: child
94
+ });
95
+ })
96
+ });
88
97
  };
89
98
  if (props["transient"]) {
90
- return /*#__PURE__*/React$1.createElement(Draw, null);
99
+ return /*#__PURE__*/jsx(Draw, {});
91
100
  }
92
101
  if (Utils.isEmpty(props.children) && Utils.isEmpty(props.elements)) {
93
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
102
+ return /*#__PURE__*/jsx(Fragment, {});
94
103
  }
95
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", _extends({
96
- className: scope.getStyleClass(name),
97
- style: scope.getStyle(name)
98
- }, props.childProps), /*#__PURE__*/React$1.createElement(Draw, null)));
104
+ return /*#__PURE__*/jsx(Fragment, {
105
+ children: /*#__PURE__*/jsx("div", _extends({
106
+ className: scope.getStyleClass(name),
107
+ style: scope.getStyle(name)
108
+ }, props.childProps, {
109
+ children: /*#__PURE__*/jsx(Draw, {})
110
+ }))
111
+ });
99
112
  }
100
113
 
101
114
  function ElGridColumn(props) {
@@ -108,13 +121,15 @@ function ElGridColumn(props) {
108
121
  var def = Utils.nvl(props.styleClass, "");
109
122
  return "ui-grid-col " + def + " " + colScope.getStyleClass("column");
110
123
  };
111
- return /*#__PURE__*/React$1.createElement("td", {
124
+ return /*#__PURE__*/jsx("td", {
112
125
  className: getStyleClass(),
113
126
  style: colScope.getStyle("column"),
114
- colSpan: props.colspan
115
- }, /*#__PURE__*/React$1.createElement(UIChildren, {
116
- scope: scope
117
- }, props.children));
127
+ colSpan: props.colspan,
128
+ children: /*#__PURE__*/jsx(UIChildren, {
129
+ scope: scope,
130
+ children: props.children
131
+ })
132
+ });
118
133
  }
119
134
 
120
135
  function ElGridCheck(_ref) {
@@ -146,9 +161,9 @@ function ElGridCheck(_ref) {
146
161
  };
147
162
  var getCheckIcon = function getCheckIcon() {
148
163
  if (isChecked()) {
149
- return /*#__PURE__*/React.createElement(Ionicons, null);
164
+ return /*#__PURE__*/jsx(Ionicons, {});
150
165
  }
151
- return /*#__PURE__*/React.createElement(Ionicons, null);
166
+ return /*#__PURE__*/jsx(Ionicons, {});
152
167
  };
153
168
  var isChecked = function isChecked() {
154
169
  var cs = scope.crudSearch;
@@ -166,13 +181,12 @@ function ElGridCheck(_ref) {
166
181
  }
167
182
  return false;
168
183
  };
169
- return /*#__PURE__*/React.createElement(UI.Button, {
170
- key: key,
184
+ return /*#__PURE__*/jsx(UI.Button, {
171
185
  icon: getCheckIcon(),
172
186
  click: {
173
187
  action: check
174
188
  }
175
- });
189
+ }, key);
176
190
  }
177
191
 
178
192
  function ElGridRow(props) {
@@ -206,7 +220,9 @@ function ElGridRow(props) {
206
220
  var cols = ComponentUtils.getChild(props, 'Column');
207
221
  var colspan = cols.length;
208
222
  var ExpansionStatus = function ExpansionStatus() {
209
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, !expanded && /*#__PURE__*/React$1.createElement(Ionicons, null), expanded && /*#__PURE__*/React$1.createElement(Ionicons, null));
223
+ return /*#__PURE__*/jsxs(Fragment, {
224
+ children: [!expanded && /*#__PURE__*/jsx(Ionicons, {}), expanded && /*#__PURE__*/jsx(Ionicons, {})]
225
+ });
210
226
  };
211
227
  var onExpansion = function onExpansion() {
212
228
  setExpanded(!expanded);
@@ -215,41 +231,45 @@ function ElGridRow(props) {
215
231
  var multiple = original.multiple;
216
232
  if (hasExpansion) colspan++;
217
233
  if (multiple) colspan++;
218
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("tr", {
219
- className: getRowStyleClass(),
220
- style: rowScope.getStyle('row')
221
- }, hasExpansion && /*#__PURE__*/React$1.createElement(ElGridColumn, {
222
- key: 'r' + index + 'e',
223
- scope: rowScope,
224
- styleClass: "ui-click ui-icon-only ui-expansion"
225
- }, /*#__PURE__*/React$1.createElement(UI.Button, {
226
- icon: /*#__PURE__*/React$1.createElement(ExpansionStatus, null),
227
- click: onExpansion
228
- })), multiple && /*#__PURE__*/React$1.createElement(ElGridColumn, {
229
- key: 'r' + index + 'c',
230
- scope: rowScope,
231
- styleClass: "ui-click ui-icon-only ui-multiple"
232
- }, /*#__PURE__*/React$1.createElement(ElGridCheck, {
233
- key: 'check-' + index,
234
- scope: scope,
235
- value: value,
236
- rowIndex: index
237
- })), cols.map(function (col, i) {
238
- return /*#__PURE__*/React$1.createElement(ElGridColumn, {
239
- column: col,
240
- key: 'r' + index + 'c' + i,
241
- scope: rowScope
242
- }, col);
243
- })), expanded && /*#__PURE__*/React$1.createElement("tr", {
244
- className: getRowStyleClass(),
245
- style: rowScope.getStyle('row')
246
- }, /*#__PURE__*/React$1.createElement(ElGridColumn, {
247
- key: 'r' + index + '-expanded',
248
- scope: rowScope,
249
- colspan: colspan
250
- }, /*#__PURE__*/React$1.createElement(UIChildren, _extends({}, props, {
251
- crud: row
252
- }), expansion))));
234
+ return /*#__PURE__*/jsxs(Fragment, {
235
+ children: [/*#__PURE__*/jsxs("tr", {
236
+ className: getRowStyleClass(),
237
+ style: rowScope.getStyle('row'),
238
+ children: [hasExpansion && /*#__PURE__*/jsx(ElGridColumn, {
239
+ scope: rowScope,
240
+ styleClass: "ui-click ui-icon-only ui-expansion",
241
+ children: /*#__PURE__*/jsx(UI.Button, {
242
+ icon: /*#__PURE__*/jsx(ExpansionStatus, {}),
243
+ click: onExpansion
244
+ })
245
+ }, 'r' + index + 'e'), multiple && /*#__PURE__*/jsx(ElGridColumn, {
246
+ scope: rowScope,
247
+ styleClass: "ui-click ui-icon-only ui-multiple",
248
+ children: /*#__PURE__*/jsx(ElGridCheck, {
249
+ scope: scope,
250
+ value: value,
251
+ rowIndex: index
252
+ }, 'check-' + index)
253
+ }, 'r' + index + 'c'), cols.map(function (col, i) {
254
+ return /*#__PURE__*/jsx(ElGridColumn, {
255
+ column: col,
256
+ scope: rowScope,
257
+ children: col
258
+ }, 'r' + index + 'c' + i);
259
+ })]
260
+ }), expanded && /*#__PURE__*/jsx("tr", {
261
+ className: getRowStyleClass(),
262
+ style: rowScope.getStyle('row'),
263
+ children: /*#__PURE__*/jsx(ElGridColumn, {
264
+ scope: rowScope,
265
+ colspan: colspan,
266
+ children: /*#__PURE__*/jsx(UIChildren, _extends({}, props, {
267
+ crud: row,
268
+ children: expansion
269
+ }))
270
+ }, 'r' + index + '-expanded')
271
+ })]
272
+ });
253
273
  }
254
274
 
255
275
  function ElGridPaginator(_ref) {
@@ -269,120 +289,134 @@ function ElGridPaginator(_ref) {
269
289
  };
270
290
  var paginatorPosition = Utils.nvl(scope.original.paginatorPosition, 'bottom');
271
291
  if (paginatorPosition !== position) {
272
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
292
+ return /*#__PURE__*/jsx(Fragment, {});
273
293
  }
274
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(UI.Button, _extends({
275
- field: "first",
276
- space: 0,
277
- rendered: first !== false
278
- }, defaults, {
279
- click: "first",
280
- icon: /*#__PURE__*/React$1.createElement(Ionicons, null)
281
- })), /*#__PURE__*/React$1.createElement(UI.Button, _extends({
282
- field: "previous",
283
- space: 0,
284
- rendered: previous !== false,
285
- click: "previous"
286
- }, defaults, {
287
- icon: /*#__PURE__*/React$1.createElement(Ionicons, null)
288
- })), /*#__PURE__*/React$1.createElement(UI.Select, _extends({
289
- field: "size",
290
- space: 0,
291
- rendered: size !== false,
292
- "default": 10
293
- }, defaults, {
294
- data: sizes,
295
- change: "search"
296
- })), /*#__PURE__*/React$1.createElement(UI.Button, _extends({
297
- field: "next",
298
- space: 0,
299
- rendered: next !== false
300
- }, defaults, {
301
- click: "next",
302
- icon: /*#__PURE__*/React$1.createElement(Ionicons, null)
303
- })), /*#__PURE__*/React$1.createElement(UI.Button, _extends({
304
- field: "last",
305
- space: 0,
306
- rendered: last !== false
307
- }, defaults, {
308
- click: "last",
309
- icon: /*#__PURE__*/React$1.createElement(Ionicons, null)
310
- })));
294
+ return /*#__PURE__*/jsxs(Fragment, {
295
+ children: [/*#__PURE__*/jsx(UI.Button, _extends({
296
+ field: "first",
297
+ space: 0,
298
+ rendered: first !== false
299
+ }, defaults, {
300
+ click: "first",
301
+ icon: /*#__PURE__*/jsx(Ionicons, {})
302
+ })), /*#__PURE__*/jsx(UI.Button, _extends({
303
+ field: "previous",
304
+ space: 0,
305
+ rendered: previous !== false,
306
+ click: "previous"
307
+ }, defaults, {
308
+ icon: /*#__PURE__*/jsx(Ionicons, {})
309
+ })), /*#__PURE__*/jsx(UI.Select, _extends({
310
+ field: "size",
311
+ space: 0,
312
+ rendered: size !== false,
313
+ "default": 10
314
+ }, defaults, {
315
+ data: sizes,
316
+ change: "search"
317
+ })), /*#__PURE__*/jsx(UI.Button, _extends({
318
+ field: "next",
319
+ space: 0,
320
+ rendered: next !== false
321
+ }, defaults, {
322
+ click: "next",
323
+ icon: /*#__PURE__*/jsx(Ionicons, {})
324
+ })), /*#__PURE__*/jsx(UI.Button, _extends({
325
+ field: "last",
326
+ space: 0,
327
+ rendered: last !== false
328
+ }, defaults, {
329
+ click: "last",
330
+ icon: /*#__PURE__*/jsx(Ionicons, {})
331
+ }))]
332
+ });
311
333
  }
312
334
 
313
335
  function ElGridTop(props) {
314
336
  var scope = props.scope;
315
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UI.Output, {
316
- styleClass: "ui-grid-top"
317
- }, /*#__PURE__*/React.createElement(UI.Output, {
318
- field: "search",
319
- position: "left",
320
- space: 4
321
- }, /*#__PURE__*/React.createElement(UI.Include, _extends({}, props, {
322
- "transient": true,
323
- name: "top",
324
- position: "left"
325
- })), /*#__PURE__*/React.createElement(UI.Text, {
326
- field: "query",
327
- space: 0,
328
- label: "Pesquisar",
329
- placeholder: scope.attr('placeholder', 'Pesquisar')
330
- }, /*#__PURE__*/React.createElement(UI.Define, {
331
- name: "right"
332
- }, /*#__PURE__*/React.createElement(UI.Button, {
333
- field: "search",
334
- icon: /*#__PURE__*/React.createElement(Ionicons, null),
335
- space: 0,
336
- variant: "text",
337
- owner: scope,
338
- click: 'search'
339
- })))), /*#__PURE__*/React.createElement(UI.Output, {
340
- position: "right",
341
- space: 8
342
- }, /*#__PURE__*/React.createElement(UI.Include, _extends({}, props, {
343
- "transient": true,
344
- name: "top",
345
- position: "right"
346
- })), /*#__PURE__*/React.createElement(ElGridPaginator, {
347
- scope: scope,
348
- last: false,
349
- first: false,
350
- position: "top"
351
- }))));
337
+ return /*#__PURE__*/jsx(Fragment, {
338
+ children: /*#__PURE__*/jsxs(UI.Output, {
339
+ styleClass: "ui-grid-top",
340
+ children: [/*#__PURE__*/jsxs(UI.Output, {
341
+ field: "search",
342
+ position: "left",
343
+ space: 4,
344
+ children: [/*#__PURE__*/jsx(UI.Include, _extends({}, props, {
345
+ "transient": true,
346
+ name: "top",
347
+ position: "left"
348
+ })), /*#__PURE__*/jsx(UI.Text, {
349
+ field: "query",
350
+ space: 0,
351
+ label: "Pesquisar",
352
+ placeholder: scope.attr('placeholder', 'Pesquisar'),
353
+ children: /*#__PURE__*/jsx(UI.Define, {
354
+ name: "right",
355
+ children: /*#__PURE__*/jsx(UI.Button, {
356
+ field: "search",
357
+ icon: /*#__PURE__*/jsx(Ionicons, {}),
358
+ space: 0,
359
+ variant: "text",
360
+ owner: scope,
361
+ click: 'search'
362
+ })
363
+ })
364
+ })]
365
+ }), /*#__PURE__*/jsxs(UI.Output, {
366
+ position: "right",
367
+ space: 8,
368
+ children: [/*#__PURE__*/jsx(UI.Include, _extends({}, props, {
369
+ "transient": true,
370
+ name: "top",
371
+ position: "right"
372
+ })), /*#__PURE__*/jsx(ElGridPaginator, {
373
+ scope: scope,
374
+ last: false,
375
+ first: false,
376
+ position: "top"
377
+ })]
378
+ })]
379
+ })
380
+ });
352
381
  }
353
382
 
354
383
  function ElGridFilter(props) {
355
- return /*#__PURE__*/React.createElement(React.Fragment, null);
384
+ return /*#__PURE__*/jsx(Fragment, {});
356
385
  }
357
386
 
358
387
  function ElGridBotom(props) {
359
388
  var scope = props.scope;
360
389
  var children = props.children;
361
- return /*#__PURE__*/React$1.createElement("div", {
362
- className: "ui-grid-bottom"
363
- }, /*#__PURE__*/React$1.createElement("div", {
364
- className: "ui-grid-bottom-inner"
365
- }, /*#__PURE__*/React$1.createElement(UI.Include, _extends({}, props, {
366
- "transient": true,
367
- name: "bottomLeft"
368
- })), /*#__PURE__*/React$1.createElement(ElGridPaginator, {
369
- scope: scope,
370
- position: "bottom"
371
- }, children), /*#__PURE__*/React$1.createElement(UI.Include, _extends({}, props, {
372
- "transient": true,
373
- name: "bottomRight"
374
- }))));
390
+ return /*#__PURE__*/jsx("div", {
391
+ className: "ui-grid-bottom",
392
+ children: /*#__PURE__*/jsxs("div", {
393
+ className: "ui-grid-bottom-inner",
394
+ children: [/*#__PURE__*/jsx(UI.Include, _extends({}, props, {
395
+ "transient": true,
396
+ name: "bottomLeft"
397
+ })), /*#__PURE__*/jsx(ElGridPaginator, {
398
+ scope: scope,
399
+ position: "bottom",
400
+ children: children
401
+ }), /*#__PURE__*/jsx(UI.Include, _extends({}, props, {
402
+ "transient": true,
403
+ name: "bottomRight"
404
+ }))]
405
+ })
406
+ });
375
407
  }
376
408
 
377
409
  function Icon(props) {
378
410
  var handlePress = function handlePress() {
379
411
  Linking.openURL('https://reactnative.dev/');
380
412
  };
381
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
382
- onPress: handlePress
383
- }, /*#__PURE__*/React.createElement(Text, {
384
- style: styles.link
385
- }, "Clique aqui para acessar o React Native"));
413
+ return /*#__PURE__*/jsx(TouchableOpacity, {
414
+ onPress: handlePress,
415
+ children: /*#__PURE__*/jsx(Text, {
416
+ style: styles.link,
417
+ children: "Clique aqui para acessar o React Native"
418
+ })
419
+ });
386
420
  }
387
421
  var styles = {
388
422
  link: {}
@@ -395,85 +429,98 @@ function ElLabel(props) {
395
429
  var elPos = Utils.nvl(original.labelPos, defaultPos);
396
430
  var lbPos = Utils.nvl(props.position, defaultPos);
397
431
  if (elPos != lbPos) {
398
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
432
+ return /*#__PURE__*/jsx(Fragment, {});
399
433
  }
400
434
  var CustomIcon = function CustomIcon() {
401
435
  if (!scope.is('type', 'list', 'grid')) {
402
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
436
+ return /*#__PURE__*/jsx(Fragment, {});
403
437
  }
404
438
  if (typeof original.icon === 'string') {
405
- return /*#__PURE__*/React$1.createElement("div", {
406
- className: "ui-label-icon"
407
- }, /*#__PURE__*/React$1.createElement(Icon, {
408
- className: scope.getIcon()
409
- }));
439
+ return /*#__PURE__*/jsx("div", {
440
+ className: "ui-label-icon",
441
+ children: /*#__PURE__*/jsx(Icon, {
442
+ className: scope.getIcon()
443
+ })
444
+ });
410
445
  }
411
- return /*#__PURE__*/React$1.createElement("div", {
412
- className: "ui-label-icon"
413
- }, original.icon);
446
+ return /*#__PURE__*/jsx("div", {
447
+ className: "ui-label-icon",
448
+ children: original.icon
449
+ });
414
450
  };
415
451
  var label = scope.getLabel();
416
- return /*#__PURE__*/React$1.createElement("div", {
417
- className: 'ui-label ui-label-' + lbPos
418
- }, /*#__PURE__*/React$1.createElement("div", {
419
- className: "ui-label-left"
420
- }, /*#__PURE__*/React$1.createElement(UI.Include, _extends({}, props, {
421
- "transient": true,
422
- name: "label",
423
- position: "left"
424
- })), /*#__PURE__*/React$1.createElement(CustomIcon, null), label && /*#__PURE__*/React$1.createElement("div", {
425
- className: "ui-label-value"
426
- }, label)), /*#__PURE__*/React$1.createElement("div", {
427
- className: "ui-label-right"
428
- }, /*#__PURE__*/React$1.createElement(UI.Include, _extends({}, props, {
429
- "transient": true,
430
- name: "label",
431
- position: "right"
432
- }))));
452
+ return /*#__PURE__*/jsxs("div", {
453
+ className: 'ui-label ui-label-' + lbPos,
454
+ children: [/*#__PURE__*/jsxs("div", {
455
+ className: "ui-label-left",
456
+ children: [/*#__PURE__*/jsx(UI.Include, _extends({}, props, {
457
+ "transient": true,
458
+ name: "label",
459
+ position: "left"
460
+ })), /*#__PURE__*/jsx(CustomIcon, {}), label && /*#__PURE__*/jsx("div", {
461
+ className: "ui-label-value",
462
+ children: label
463
+ })]
464
+ }), /*#__PURE__*/jsx("div", {
465
+ className: "ui-label-right",
466
+ children: /*#__PURE__*/jsx(UI.Include, _extends({}, props, {
467
+ "transient": true,
468
+ name: "label",
469
+ position: "right"
470
+ }))
471
+ })]
472
+ });
433
473
  }
434
474
 
435
475
  function ElGrid(props) {
436
476
  var scope = props.scope;
437
477
  var items = scope.getItems();
438
478
  var expansion = ComponentUtils.getDefine(props, 'expansion');
439
- return /*#__PURE__*/React.createElement("div", {
479
+ return /*#__PURE__*/jsxs("div", {
440
480
  className: scope.getStyleClass('inner'),
441
- style: scope.getStyle('inner')
442
- }, /*#__PURE__*/React.createElement(ElLabel, _extends({}, props, {
443
- scope: scope,
444
- position: "outside"
445
- })), /*#__PURE__*/React.createElement("div", {
446
- className: scope.getStyleClass('child'),
447
- style: scope.getStyle('child')
448
- }, /*#__PURE__*/React.createElement(ElLabel, _extends({}, props, {
449
- scope: scope,
450
- position: "inside"
451
- })), /*#__PURE__*/React.createElement("div", {
452
- className: "ui-data"
453
- }, /*#__PURE__*/React.createElement(ElGridTop, _extends({}, props, {
454
- scope: scope
455
- })), /*#__PURE__*/React.createElement(ElGridFilter, {
456
- scope: scope
457
- }), /*#__PURE__*/React.createElement("div", {
458
- className: "ui-grid-data"
459
- }, /*#__PURE__*/React.createElement("table", {
460
- className: "ui-grid ui-table"
461
- }, /*#__PURE__*/React.createElement("tbody", null, items.map(function (row, i) {
462
- return /*#__PURE__*/React.createElement(ElGridRow, _extends({}, props, {
463
- expansion: expansion,
464
- key: 'r' + i,
481
+ style: scope.getStyle('inner'),
482
+ children: [/*#__PURE__*/jsx(ElLabel, _extends({}, props, {
465
483
  scope: scope,
466
- value: row,
467
- index: i
468
- }));
469
- }))))), /*#__PURE__*/React.createElement(ElGridBotom, _extends({}, props, {
470
- scope: scope
471
- }))));
484
+ position: "outside"
485
+ })), /*#__PURE__*/jsxs("div", {
486
+ className: scope.getStyleClass('child'),
487
+ style: scope.getStyle('child'),
488
+ children: [/*#__PURE__*/jsx(ElLabel, _extends({}, props, {
489
+ scope: scope,
490
+ position: "inside"
491
+ })), /*#__PURE__*/jsxs("div", {
492
+ className: "ui-data",
493
+ children: [/*#__PURE__*/jsx(ElGridTop, _extends({}, props, {
494
+ scope: scope
495
+ })), /*#__PURE__*/jsx(ElGridFilter, {
496
+ scope: scope
497
+ }), /*#__PURE__*/jsx("div", {
498
+ className: "ui-grid-data",
499
+ children: /*#__PURE__*/jsx("table", {
500
+ className: "ui-grid ui-table",
501
+ children: /*#__PURE__*/jsx("tbody", {
502
+ children: items.map(function (row, i) {
503
+ return /*#__PURE__*/createElement(ElGridRow, _extends({}, props, {
504
+ expansion: expansion,
505
+ key: 'r' + i,
506
+ scope: scope,
507
+ value: row,
508
+ index: i
509
+ }));
510
+ })
511
+ })
512
+ })
513
+ })]
514
+ }), /*#__PURE__*/jsx(ElGridBotom, _extends({}, props, {
515
+ scope: scope
516
+ }))]
517
+ })]
518
+ });
472
519
  }
473
520
 
474
521
  function ElInclude(props) {
475
522
  if (props.rendered === false) {
476
- return /*#__PURE__*/React.createElement(React.Fragment, null);
523
+ return /*#__PURE__*/jsx(Fragment, {});
477
524
  }
478
525
  var includes = ComponentUtils.getDefine(props, props.name, props.position);
479
526
  if (Utils.isEmpty(includes)) {
@@ -483,37 +530,48 @@ function ElInclude(props) {
483
530
  var Aux = function Aux(tagProp) {
484
531
  var Tag = props.tag;
485
532
  if (!Utils.isEmpty(Tag)) {
486
- return /*#__PURE__*/React.createElement(Tag, tagProp, tagProp.children);
533
+ return /*#__PURE__*/jsx(Tag, _extends({}, tagProp, {
534
+ children: tagProp.children
535
+ }));
487
536
  }
488
- return /*#__PURE__*/React.createElement(React.Fragment, null, tagProp.children);
537
+ return /*#__PURE__*/jsx(Fragment, {
538
+ children: tagProp.children
539
+ });
489
540
  };
490
- return /*#__PURE__*/React.createElement(Aux, props.tagProps, /*#__PURE__*/React.createElement(UIChildren, _extends({
491
- "transient": true
492
- }, props, {
493
- scope: props.scope,
494
- crud: props.crud,
495
- part: props.name
496
- }), includes));
541
+ return /*#__PURE__*/jsx(Aux, _extends({}, props.tagProps, {
542
+ children: /*#__PURE__*/jsx(UIChildren, _extends({
543
+ "transient": true
544
+ }, props, {
545
+ scope: props.scope,
546
+ crud: props.crud,
547
+ part: props.name,
548
+ children: includes
549
+ }))
550
+ }));
497
551
  }
498
- return /*#__PURE__*/React.createElement(React.Fragment, null, includes);
552
+ return /*#__PURE__*/jsx(Fragment, {
553
+ children: includes
554
+ });
499
555
  }
500
556
 
501
557
  function ElCard(props) {
502
558
  var scope = props.scope;
503
- return /*#__PURE__*/React.createElement("div", {
559
+ return /*#__PURE__*/jsxs("div", {
504
560
  className: scope.getStyleClass('inner'),
505
- style: scope.getStyle('inner')
506
- }, /*#__PURE__*/React.createElement(ElLabel, _extends({}, props, {
507
- scope: scope
508
- })), /*#__PURE__*/React.createElement(UIChildren, _extends({}, props, {
509
- scope: scope
510
- })), /*#__PURE__*/React.createElement("div", {
511
- className: scope.getStyleClass('bottom'),
512
- style: scope.getStyle('bottom')
513
- }, /*#__PURE__*/React.createElement(ElInclude, _extends({}, props, {
514
- scope: scope,
515
- name: "bottom"
516
- }))));
561
+ style: scope.getStyle('inner'),
562
+ children: [/*#__PURE__*/jsx(ElLabel, _extends({}, props, {
563
+ scope: scope
564
+ })), /*#__PURE__*/jsx(UIChildren, _extends({}, props, {
565
+ scope: scope
566
+ })), /*#__PURE__*/jsx("div", {
567
+ className: scope.getStyleClass('bottom'),
568
+ style: scope.getStyle('bottom'),
569
+ children: /*#__PURE__*/jsx(ElInclude, _extends({}, props, {
570
+ scope: scope,
571
+ name: "bottom"
572
+ }))
573
+ })]
574
+ });
517
575
  }
518
576
 
519
577
  function ElTabs(props) {
@@ -578,7 +636,7 @@ function ElTabs(props) {
578
636
  data: item
579
637
  }));
580
638
  };
581
- React$1.Children.map(props.children, function (child, index) {
639
+ React.Children.map(props.children, function (child, index) {
582
640
  if (Utils.isEmpty(items)) {
583
641
  addTab(child, {});
584
642
  } else {
@@ -602,67 +660,80 @@ function ElTabs(props) {
602
660
  nav(1);
603
661
  };
604
662
  var isStepper = element.layout === 'stepper';
605
- return /*#__PURE__*/React$1.createElement("div", {
663
+ return /*#__PURE__*/jsx("div", {
606
664
  className: scope.getStyleClass('inner'),
607
- style: scope.getStyle('inner')
608
- }, /*#__PURE__*/React$1.createElement("div", {
609
- className: "ui-tabs-content"
610
- }, /*#__PURE__*/React$1.createElement("div", {
611
- className: "ui-tabs-items"
612
- }, tabs.map(function (t, i) {
613
- return /*#__PURE__*/React$1.createElement("div", {
614
- key: Utils.key(element.id, 'tab', i),
615
- className: getStyleClass(t),
616
- onClick: function onClick() {
617
- onChangeTab(t);
618
- }
619
- }, isStepper && /*#__PURE__*/React$1.createElement("div", {
620
- className: "ui-tab-item-divisor"
621
- }), /*#__PURE__*/React$1.createElement("div", {
622
- className: "ui-tab-item-inner"
623
- }, isStepper && /*#__PURE__*/React$1.createElement("div", {
624
- className: "ui-step-line"
625
- }), /*#__PURE__*/React$1.createElement("div", {
626
- className: "ui-tab-item-label"
627
- }, isStepper ? t.index + 1 : t.label)));
628
- })), selected && /*#__PURE__*/React$1.createElement(React$1.Fragment, null, isStepper && /*#__PURE__*/React$1.createElement("div", {
629
- className: "ui-tabs-label"
630
- }, selected.label), /*#__PURE__*/React$1.createElement("div", {
631
- className: "ui-tabs-area"
632
- }, /*#__PURE__*/React$1.createElement(UIChildren, _extends({}, props, {
633
- scope: scope
634
- }), selected.child)), element.layout === 'stepper' && /*#__PURE__*/React$1.createElement("div", {
635
- className: "ui-tabs-actions"
636
- }, /*#__PURE__*/React$1.createElement(UI.Output, {
637
- space: 6,
638
- layout: "left"
639
- }, /*#__PURE__*/React$1.createElement(UI.Include, _extends({}, props, {
640
- "transient": true,
641
- name: "left",
642
- "default": /*#__PURE__*/React$1.createElement(UI.Button, {
643
- rendered: selectedIndex > 0,
644
- icon: /*#__PURE__*/React$1.createElement(Ionicons, null),
645
- click: previous
646
- })
647
- }))), /*#__PURE__*/React$1.createElement(UI.Output, {
648
- space: 6,
649
- layout: "right"
650
- }, /*#__PURE__*/React$1.createElement(UI.Include, _extends({}, props, {
651
- "transient": true,
652
- name: "right",
653
- "default": /*#__PURE__*/React$1.createElement(UI.Button, {
654
- rendered: selectedIndex < tabs.length - 1,
655
- icon: /*#__PURE__*/React$1.createElement(Ionicons, null),
656
- click: next
665
+ style: scope.getStyle('inner'),
666
+ children: /*#__PURE__*/jsxs("div", {
667
+ className: "ui-tabs-content",
668
+ children: [/*#__PURE__*/jsx("div", {
669
+ className: "ui-tabs-items",
670
+ children: tabs.map(function (t, i) {
671
+ return /*#__PURE__*/jsxs("div", {
672
+ className: getStyleClass(t),
673
+ onClick: function onClick() {
674
+ onChangeTab(t);
675
+ },
676
+ children: [isStepper && /*#__PURE__*/jsx("div", {
677
+ className: "ui-tab-item-divisor"
678
+ }), /*#__PURE__*/jsxs("div", {
679
+ className: "ui-tab-item-inner",
680
+ children: [isStepper && /*#__PURE__*/jsx("div", {
681
+ className: "ui-step-line"
682
+ }), /*#__PURE__*/jsx("div", {
683
+ className: "ui-tab-item-label",
684
+ children: isStepper ? t.index + 1 : t.label
685
+ })]
686
+ })]
687
+ }, Utils.key(element.id, 'tab', i));
688
+ })
689
+ }), selected && /*#__PURE__*/jsxs(Fragment, {
690
+ children: [isStepper && /*#__PURE__*/jsx("div", {
691
+ className: "ui-tabs-label",
692
+ children: selected.label
693
+ }), /*#__PURE__*/jsx("div", {
694
+ className: "ui-tabs-area",
695
+ children: /*#__PURE__*/jsx(UIChildren, _extends({}, props, {
696
+ scope: scope,
697
+ children: selected.child
698
+ }))
699
+ }), element.layout === 'stepper' && /*#__PURE__*/jsxs("div", {
700
+ className: "ui-tabs-actions",
701
+ children: [/*#__PURE__*/jsx(UI.Output, {
702
+ space: 6,
703
+ layout: "left",
704
+ children: /*#__PURE__*/jsx(UI.Include, _extends({}, props, {
705
+ "transient": true,
706
+ name: "left",
707
+ "default": /*#__PURE__*/jsx(UI.Button, {
708
+ rendered: selectedIndex > 0,
709
+ icon: /*#__PURE__*/jsx(Ionicons, {}),
710
+ click: previous
711
+ })
712
+ }))
713
+ }), /*#__PURE__*/jsx(UI.Output, {
714
+ space: 6,
715
+ layout: "right",
716
+ children: /*#__PURE__*/jsx(UI.Include, _extends({}, props, {
717
+ "transient": true,
718
+ name: "right",
719
+ "default": /*#__PURE__*/jsx(UI.Button, {
720
+ rendered: selectedIndex < tabs.length - 1,
721
+ icon: /*#__PURE__*/jsx(Ionicons, {}),
722
+ click: next
723
+ })
724
+ }))
725
+ })]
726
+ })]
727
+ })]
657
728
  })
658
- })))))));
729
+ });
659
730
  }
660
731
 
661
732
  function ElChart(props) {
662
733
  var scope = props.scope;
663
734
  var items = scope.getItems();
664
735
  var columns = Utils.asList(scope.original.columns);
665
- return /*#__PURE__*/React$1.createElement("div", {
736
+ return /*#__PURE__*/jsx("div", {
666
737
  className: "ui-chart-data"
667
738
  });
668
739
  }
@@ -671,11 +742,13 @@ function AutoComplete(props) {
671
742
  var handlePress = function handlePress() {
672
743
  Linking.openURL('https://reactnative.dev/');
673
744
  };
674
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
675
- onPress: handlePress
676
- }, /*#__PURE__*/React.createElement(Text, {
677
- style: styles$1.link
678
- }, "Clique aqui para acessar o React Native"));
745
+ return /*#__PURE__*/jsx(TouchableOpacity, {
746
+ onPress: handlePress,
747
+ children: /*#__PURE__*/jsx(Text, {
748
+ style: styles$1.link,
749
+ children: "Clique aqui para acessar o React Native"
750
+ })
751
+ });
679
752
  }
680
753
  var styles$1 = {
681
754
  link: {}
@@ -684,7 +757,9 @@ var styles$1 = {
684
757
  function UIComplete(_ref) {
685
758
  var defaultsInput = _ref.defaultsInput,
686
759
  defaultsUI = _ref.defaultsUI;
687
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AutoComplete, _extends({}, defaultsInput, defaultsUI)));
760
+ return /*#__PURE__*/jsx(Fragment, {
761
+ children: /*#__PURE__*/jsx(AutoComplete, _extends({}, defaultsInput, defaultsUI))
762
+ });
688
763
  }
689
764
 
690
765
  function ElRepeatRow(props) {
@@ -710,41 +785,46 @@ function ElRepeatRow(props) {
710
785
  }
711
786
  return s;
712
787
  };
713
- return /*#__PURE__*/React$1.createElement("div", {
788
+ return /*#__PURE__*/jsx("div", {
714
789
  className: getRowStyleClass(),
715
- style: rowScope.getStyle("row")
716
- }, /*#__PURE__*/React$1.createElement(UIChildren, _extends({
717
- "transient": true
718
- }, props, {
719
- crud: row
720
- }), props.children));
790
+ style: rowScope.getStyle("row"),
791
+ children: /*#__PURE__*/jsx(UIChildren, _extends({
792
+ "transient": true
793
+ }, props, {
794
+ crud: row,
795
+ children: props.children
796
+ }))
797
+ });
721
798
  }
722
799
 
723
800
  function ElRepeat(props) {
724
801
  var scope = props.scope;
725
802
  var items = scope.getItems();
726
- return /*#__PURE__*/React.createElement("div", {
803
+ return /*#__PURE__*/jsx("div", {
727
804
  className: scope.getStyleClass('inner'),
728
- style: scope.getStyle('inner')
729
- }, items.map(function (row, i) {
730
- return /*#__PURE__*/React.createElement(ElRepeatRow, _extends({}, props, {
731
- key: 'r' + i,
732
- scope: scope,
733
- value: row,
734
- index: i
735
- }));
736
- }));
805
+ style: scope.getStyle('inner'),
806
+ children: items.map(function (row, i) {
807
+ return /*#__PURE__*/createElement(ElRepeatRow, _extends({}, props, {
808
+ key: 'r' + i,
809
+ scope: scope,
810
+ value: row,
811
+ index: i
812
+ }));
813
+ })
814
+ });
737
815
  }
738
816
 
739
817
  function Link(props) {
740
818
  var handlePress = function handlePress() {
741
819
  Linking.openURL('https://reactnative.dev/');
742
820
  };
743
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
744
- onPress: handlePress
745
- }, /*#__PURE__*/React.createElement(Text, {
746
- style: styles$2.link
747
- }, "Clique aqui para acessar o React Native"));
821
+ return /*#__PURE__*/jsx(TouchableOpacity, {
822
+ onPress: handlePress,
823
+ children: /*#__PURE__*/jsx(Text, {
824
+ style: styles$2.link,
825
+ children: "Clique aqui para acessar o React Native"
826
+ })
827
+ });
748
828
  }
749
829
  var styles$2 = {
750
830
  link: {}
@@ -754,11 +834,13 @@ function Button(props) {
754
834
  var handlePress = function handlePress() {
755
835
  Linking.openURL('https://reactnative.dev/');
756
836
  };
757
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
758
- onPress: handlePress
759
- }, /*#__PURE__*/React.createElement(Text, {
760
- style: styles$3.link
761
- }, "Clique aqui para acessar o React Native"));
837
+ return /*#__PURE__*/jsx(TouchableOpacity, {
838
+ onPress: handlePress,
839
+ children: /*#__PURE__*/jsx(Text, {
840
+ style: styles$3.link,
841
+ children: "Clique aqui para acessar o React Native"
842
+ })
843
+ });
762
844
  }
763
845
  var styles$3 = {
764
846
  link: {}
@@ -768,11 +850,13 @@ function Select(props) {
768
850
  var handlePress = function handlePress() {
769
851
  Linking.openURL('https://reactnative.dev/');
770
852
  };
771
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
772
- onPress: handlePress
773
- }, /*#__PURE__*/React.createElement(Text, {
774
- style: styles$4.link
775
- }, "Clique aqui para acessar o React Native"));
853
+ return /*#__PURE__*/jsx(TouchableOpacity, {
854
+ onPress: handlePress,
855
+ children: /*#__PURE__*/jsx(Text, {
856
+ style: styles$4.link,
857
+ children: "Clique aqui para acessar o React Native"
858
+ })
859
+ });
776
860
  }
777
861
  var styles$4 = {
778
862
  link: {}
@@ -782,11 +866,13 @@ function Switch(props) {
782
866
  var handlePress = function handlePress() {
783
867
  Linking.openURL('https://reactnative.dev/');
784
868
  };
785
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
786
- onPress: handlePress
787
- }, /*#__PURE__*/React.createElement(Text, {
788
- style: styles$5.link
789
- }, "Clique aqui para acessar o React Native"));
869
+ return /*#__PURE__*/jsx(TouchableOpacity, {
870
+ onPress: handlePress,
871
+ children: /*#__PURE__*/jsx(Text, {
872
+ style: styles$5.link,
873
+ children: "Clique aqui para acessar o React Native"
874
+ })
875
+ });
790
876
  }
791
877
  var styles$5 = {
792
878
  link: {}
@@ -796,11 +882,13 @@ function Option(props) {
796
882
  var handlePress = function handlePress() {
797
883
  Linking.openURL('https://reactnative.dev/');
798
884
  };
799
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
800
- onPress: handlePress
801
- }, /*#__PURE__*/React.createElement(Text, {
802
- style: styles$6.link
803
- }, "Clique aqui para acessar o React Native"));
885
+ return /*#__PURE__*/jsx(TouchableOpacity, {
886
+ onPress: handlePress,
887
+ children: /*#__PURE__*/jsx(Text, {
888
+ style: styles$6.link,
889
+ children: "Clique aqui para acessar o React Native"
890
+ })
891
+ });
804
892
  }
805
893
  var styles$6 = {
806
894
  link: {}
@@ -810,11 +898,13 @@ function Radio(props) {
810
898
  var handlePress = function handlePress() {
811
899
  Linking.openURL('https://reactnative.dev/');
812
900
  };
813
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
814
- onPress: handlePress
815
- }, /*#__PURE__*/React.createElement(Text, {
816
- style: styles$7.link
817
- }, "Clique aqui para acessar o React Native"));
901
+ return /*#__PURE__*/jsx(TouchableOpacity, {
902
+ onPress: handlePress,
903
+ children: /*#__PURE__*/jsx(Text, {
904
+ style: styles$7.link,
905
+ children: "Clique aqui para acessar o React Native"
906
+ })
907
+ });
818
908
  }
819
909
  var styles$7 = {
820
910
  link: {}
@@ -824,11 +914,13 @@ function Input(props) {
824
914
  var handlePress = function handlePress() {
825
915
  Linking.openURL('https://reactnative.dev/');
826
916
  };
827
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
828
- onPress: handlePress
829
- }, /*#__PURE__*/React.createElement(Text, {
830
- style: styles$8.link
831
- }, "Clique aqui para acessar o React Native"));
917
+ return /*#__PURE__*/jsx(TouchableOpacity, {
918
+ onPress: handlePress,
919
+ children: /*#__PURE__*/jsx(Text, {
920
+ style: styles$8.link,
921
+ children: "Clique aqui para acessar o React Native"
922
+ })
923
+ });
832
924
  }
833
925
  var styles$8 = {
834
926
  link: {}
@@ -863,19 +955,19 @@ function UIElement(props) {
863
955
  var CurrentRouter = function CurrentRouter() {
864
956
  if (router[type]) {
865
957
  var Aux = router[type];
866
- return /*#__PURE__*/React$1.createElement(Aux, _extends({
958
+ return /*#__PURE__*/jsx(Aux, _extends({
867
959
  crud: crud
868
960
  }, props, {
869
961
  scope: scope
870
962
  }));
871
963
  }
872
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
964
+ return /*#__PURE__*/jsx(Fragment, {});
873
965
  };
874
966
  var Custom = function Custom() {
875
967
  var c = original.custom;
876
968
  if (c) {
877
969
  if (typeof c === 'string') {
878
- return /*#__PURE__*/React$1.createElement(UIElement, {
970
+ return /*#__PURE__*/jsx(UIElement, {
879
971
  element: {
880
972
  value: c,
881
973
  type: 'dummy'
@@ -883,17 +975,19 @@ function UIElement(props) {
883
975
  crud: crud
884
976
  });
885
977
  }
886
- return /*#__PURE__*/React$1.createElement(UIElement, _extends({
978
+ return /*#__PURE__*/jsx(UIElement, _extends({
887
979
  type: c.type,
888
980
  tag: c.type
889
981
  }, c.props, {
890
982
  crud: crud
891
983
  }));
892
984
  }
893
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
985
+ return /*#__PURE__*/jsx(Fragment, {});
894
986
  };
895
987
  if (scope.is('type', 'dummy')) {
896
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, scope.getDisplayValue());
988
+ return /*#__PURE__*/jsx(Fragment, {
989
+ children: scope.getDisplayValue()
990
+ });
897
991
  }
898
992
  var onCheck = function onCheck() {
899
993
  var v = scope.getValue();
@@ -946,7 +1040,7 @@ function UIElement(props) {
946
1040
  return !Utils.isEmpty(props.children) || !Utils.isEmpty(props.elements);
947
1041
  };
948
1042
  if (!scope.isRendered() || scope.is('type', 'define')) {
949
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
1043
+ return /*#__PURE__*/jsx(Fragment, {});
950
1044
  }
951
1045
  scope.error = function (msg) {
952
1046
  error = msg;
@@ -966,9 +1060,13 @@ function UIElement(props) {
966
1060
  });
967
1061
  var CustomIcon = function CustomIcon() {
968
1062
  if (typeof original.icon === 'string') {
969
- return /*#__PURE__*/React$1.createElement(Icon, null, scope.getIcon());
1063
+ return /*#__PURE__*/jsx(Icon, {
1064
+ children: scope.getIcon()
1065
+ });
970
1066
  }
971
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, original.icon);
1067
+ return /*#__PURE__*/jsx(Fragment, {
1068
+ children: original.icon
1069
+ });
972
1070
  };
973
1071
  var getLabelClass = function getLabelClass(type) {
974
1072
  var clss = "ui-text ui-" + type + "-text";
@@ -992,14 +1090,14 @@ function UIElement(props) {
992
1090
  config: _extends({}, original)
993
1091
  };
994
1092
  dlg.component = function (args) {
995
- return /*#__PURE__*/React$1.createElement(UIChildren, _extends({}, props, {
1093
+ return /*#__PURE__*/jsx(UIChildren, _extends({}, props, {
996
1094
  scope: scope,
997
1095
  crud: crud
998
1096
  }));
999
1097
  };
1000
1098
  crud.dialogs[name] = dlg;
1001
1099
  }
1002
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
1100
+ return /*#__PURE__*/jsx(Fragment, {});
1003
1101
  }
1004
1102
  useLayoutEffect(function () {
1005
1103
  if (ref != null && ref.current && scope.is('type', 'card', 'list', 'tabs', 'stepper')) {
@@ -1020,230 +1118,250 @@ function UIElement(props) {
1020
1118
  }
1021
1119
  return true;
1022
1120
  };
1023
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
1024
- className: 'ui-el ' + scope.getStyleClass(),
1025
- ref: ref,
1026
- style: scope.getStyle()
1027
- }, isShowInner() && /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
1028
- className: scope.getStyleClass('inner'),
1029
- style: scope.getStyle('inner')
1030
- }, scope.is('type', 'button') && /*#__PURE__*/React$1.createElement(Button, _extends({}, defaultsUI, {
1031
- onClick: onClick,
1032
- variant: scope.attr('variant', 'outlined')
1033
- }), original.icon && /*#__PURE__*/React$1.createElement(CustomIcon, null), original.label && /*#__PURE__*/React$1.createElement("span", {
1034
- className: getLabelClass('button')
1035
- }, scope.getLabel())), scope.is('type', 'icon') && /*#__PURE__*/React$1.createElement(Icon, _extends({}, defaultsUI, {
1036
- onClick: onClick,
1037
- variant: scope.attr('variant', 'outlined')
1038
- }), scope.getDisplayValue()), scope.is('type', 'link') && /*#__PURE__*/React$1.createElement(Link, _extends({}, defaultsUI, {
1039
- onClick: onClick,
1040
- variant: scope.attr('variant', 'outlined')
1041
- }), original.icon && /*#__PURE__*/React$1.createElement(CustomIcon, null), original.label && /*#__PURE__*/React$1.createElement("span", {
1042
- className: getLabelClass('link')
1043
- }, scope.getLabel())), scope.is('type', 'text', 'number', 'phone', 'postalCode', 'money', 'password', 'email') && /*#__PURE__*/React$1.createElement(Input, _extends({}, defaultsInput, defaultsUI, {
1044
- InputProps: _extends({}, original.inputProps)
1045
- })), scope.is('type', 'complete', 'autocomplete') && /*#__PURE__*/React$1.createElement(UIComplete, {
1046
- scope: scope,
1047
- defaultsInput: defaultsInput,
1048
- defaultsUI: defaultsUI
1049
- }), scope.is('type', 'checkbox', 'boolean', 'switch') && /*#__PURE__*/React$1.createElement(Switch, _extends({
1050
- checked: isChecked()
1051
- }, defaultsInput, {
1052
- onChange: onCheck
1053
- })), scope.is('type', 'select') && /*#__PURE__*/React$1.createElement(Select, _extends({}, defaultsInput, defaultsUI, {
1054
- value: scope.getSelectedValue()
1055
- }), /*#__PURE__*/React$1.createElement(Option, {
1056
- value: ''
1057
- }, "Selecione"), options.map(function (row, i) {
1058
- return /*#__PURE__*/React$1.createElement(Option, {
1059
- key: 'i' + i,
1060
- value: row.value
1061
- }, row.label);
1062
- })), scope.is('type', 'radio') && /*#__PURE__*/React$1.createElement(Radio, _extends({}, defaultsInput, defaultsUI, {
1063
- row: true
1064
- }), options.map(function (row, i) {
1065
- return /*#__PURE__*/React$1.createElement(Option, {
1066
- key: 'i' + i,
1067
- control: /*#__PURE__*/React$1.createElement(Radio, defaultsUI),
1068
- label: row.label,
1069
- value: row.value
1070
- });
1071
- })), scope.is('type', 'custom') && /*#__PURE__*/React$1.createElement(Custom, null), scope.is('type', 'column') && /*#__PURE__*/React$1.createElement(React$1.Fragment, null, scope.is('format', 'img') && /*#__PURE__*/React$1.createElement("img", {
1072
- src: scope.getDisplayValue()
1073
- }), scope.is('format', 'icon') && /*#__PURE__*/React$1.createElement("i", {
1074
- className: scope.getDisplayValue()
1075
- }), !scope.is('format', 'icon', 'img') && /*#__PURE__*/React$1.createElement("span", null, scope.getDisplayValue())), scope.is('type', 'output') && /*#__PURE__*/React$1.createElement("span", null, scope.getDisplayValue())), error && /*#__PURE__*/React$1.createElement("div", {
1076
- className: "ui-error"
1077
- }, error)), /*#__PURE__*/React$1.createElement(CurrentRouter, null), !scope.is('type', 'card', 'tabs', 'grid', 'list', 'define', 'repeat') && /*#__PURE__*/React$1.createElement(UIChildren, _extends({}, props, {
1078
- scope: scope,
1079
- crud: crud
1080
- }))));
1121
+ return /*#__PURE__*/jsx(Fragment, {
1122
+ children: /*#__PURE__*/jsxs("div", {
1123
+ className: 'ui-el ' + scope.getStyleClass(),
1124
+ ref: ref,
1125
+ style: scope.getStyle(),
1126
+ children: [isShowInner() && /*#__PURE__*/jsxs(Fragment, {
1127
+ children: [/*#__PURE__*/jsxs("div", {
1128
+ className: scope.getStyleClass('inner'),
1129
+ style: scope.getStyle('inner'),
1130
+ children: [scope.is('type', 'button') && /*#__PURE__*/jsxs(Button, _extends({}, defaultsUI, {
1131
+ onClick: onClick,
1132
+ variant: scope.attr('variant', 'outlined'),
1133
+ children: [original.icon && /*#__PURE__*/jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsx("span", {
1134
+ className: getLabelClass('button'),
1135
+ children: scope.getLabel()
1136
+ })]
1137
+ })), scope.is('type', 'icon') && /*#__PURE__*/jsx(Icon, _extends({}, defaultsUI, {
1138
+ onClick: onClick,
1139
+ variant: scope.attr('variant', 'outlined'),
1140
+ children: scope.getDisplayValue()
1141
+ })), scope.is('type', 'link') && /*#__PURE__*/jsxs(Link, _extends({}, defaultsUI, {
1142
+ onClick: onClick,
1143
+ variant: scope.attr('variant', 'outlined'),
1144
+ children: [original.icon && /*#__PURE__*/jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsx("span", {
1145
+ className: getLabelClass('link'),
1146
+ children: scope.getLabel()
1147
+ })]
1148
+ })), scope.is('type', 'text', 'number', 'phone', 'postalCode', 'money', 'password', 'email') && /*#__PURE__*/jsx(Input, _extends({}, defaultsInput, defaultsUI, {
1149
+ InputProps: _extends({}, original.inputProps)
1150
+ })), scope.is('type', 'complete', 'autocomplete') && /*#__PURE__*/jsx(UIComplete, {
1151
+ scope: scope,
1152
+ defaultsInput: defaultsInput,
1153
+ defaultsUI: defaultsUI
1154
+ }), scope.is('type', 'checkbox', 'boolean', 'switch') && /*#__PURE__*/jsx(Switch, _extends({
1155
+ checked: isChecked()
1156
+ }, defaultsInput, {
1157
+ onChange: onCheck
1158
+ })), scope.is('type', 'select') && /*#__PURE__*/jsxs(Select, _extends({}, defaultsInput, defaultsUI, {
1159
+ value: scope.getSelectedValue(),
1160
+ children: [/*#__PURE__*/jsx(Option, {
1161
+ value: '',
1162
+ children: "Selecione"
1163
+ }), options.map(function (row, i) {
1164
+ return /*#__PURE__*/jsx(Option, {
1165
+ value: row.value,
1166
+ children: row.label
1167
+ }, 'i' + i);
1168
+ })]
1169
+ })), scope.is('type', 'radio') && /*#__PURE__*/jsx(Radio, _extends({}, defaultsInput, defaultsUI, {
1170
+ row: true,
1171
+ children: options.map(function (row, i) {
1172
+ return /*#__PURE__*/jsx(Option, {
1173
+ control: /*#__PURE__*/jsx(Radio, _extends({}, defaultsUI)),
1174
+ label: row.label,
1175
+ value: row.value
1176
+ }, 'i' + i);
1177
+ })
1178
+ })), scope.is('type', 'custom') && /*#__PURE__*/jsx(Custom, {}), scope.is('type', 'column') && /*#__PURE__*/jsxs(Fragment, {
1179
+ children: [scope.is('format', 'img') && /*#__PURE__*/jsx("img", {
1180
+ src: scope.getDisplayValue()
1181
+ }), scope.is('format', 'icon') && /*#__PURE__*/jsx("i", {
1182
+ className: scope.getDisplayValue()
1183
+ }), !scope.is('format', 'icon', 'img') && /*#__PURE__*/jsx("span", {
1184
+ children: scope.getDisplayValue()
1185
+ })]
1186
+ }), scope.is('type', 'output') && /*#__PURE__*/jsx("span", {
1187
+ children: scope.getDisplayValue()
1188
+ })]
1189
+ }), error && /*#__PURE__*/jsx("div", {
1190
+ className: "ui-error",
1191
+ children: error
1192
+ })]
1193
+ }), /*#__PURE__*/jsx(CurrentRouter, {}), !scope.is('type', 'card', 'tabs', 'grid', 'list', 'define', 'repeat') && /*#__PURE__*/jsx(UIChildren, _extends({}, props, {
1194
+ scope: scope,
1195
+ crud: crud
1196
+ }))]
1197
+ })
1198
+ });
1081
1199
  }
1082
1200
 
1083
1201
  var _excluded = ["type"];
1084
1202
  var UI = {
1085
1203
  Grid: function Grid(props) {
1086
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1204
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1087
1205
  type: "list"
1088
1206
  }));
1089
1207
  },
1090
1208
  Repeat: function Repeat(props) {
1091
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1209
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1092
1210
  type: "repeat"
1093
1211
  }));
1094
1212
  },
1095
1213
  Define: function Define(props) {
1096
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1214
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1097
1215
  type: "define"
1098
1216
  }));
1099
1217
  },
1100
1218
  Include: function Include(props) {
1101
- return /*#__PURE__*/React.createElement(ElInclude, props);
1219
+ return /*#__PURE__*/jsx(ElInclude, _extends({}, props));
1102
1220
  },
1103
1221
  Column: function Column(_ref) {
1104
1222
  var props = _objectWithoutPropertiesLoose(_ref, _excluded);
1105
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1223
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1106
1224
  type: "column"
1107
1225
  }));
1108
1226
  },
1109
1227
  Input: function Input(props) {
1110
- return /*#__PURE__*/React.createElement(UIElement, props);
1228
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props));
1111
1229
  },
1112
1230
  Text: function Text(props) {
1113
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1231
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1114
1232
  type: "text"
1115
1233
  }));
1116
1234
  },
1117
1235
  Email: function Email(props) {
1118
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1236
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1119
1237
  type: "email"
1120
1238
  }));
1121
1239
  },
1122
1240
  Button: function Button(props) {
1123
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1241
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1124
1242
  type: "button"
1125
1243
  }));
1126
1244
  },
1127
1245
  Link: function Link(props) {
1128
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1246
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1129
1247
  type: "link"
1130
1248
  }));
1131
1249
  },
1132
1250
  Icon: function Icon(props) {
1133
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1251
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1134
1252
  type: "icon"
1135
1253
  }));
1136
1254
  },
1137
1255
  Output: function Output(props) {
1138
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1256
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1139
1257
  type: "output"
1140
1258
  }));
1141
1259
  },
1142
1260
  Form: function Form(props) {
1143
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1261
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1144
1262
  type: "form"
1145
1263
  }));
1146
1264
  },
1147
1265
  Crud: function Crud(props) {
1148
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1266
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1149
1267
  type: "crud"
1150
1268
  }));
1151
1269
  },
1152
1270
  View: function View(props) {
1153
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1271
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1154
1272
  type: "view",
1155
1273
  "transient": true
1156
1274
  }));
1157
1275
  },
1158
1276
  Bottom: function Bottom(props) {
1159
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1277
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1160
1278
  type: "bottom"
1161
1279
  }));
1162
1280
  },
1163
1281
  Dialog: function Dialog(props) {
1164
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1282
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1165
1283
  type: "dialog"
1166
1284
  }));
1167
1285
  },
1168
1286
  Content: function Content(props) {
1169
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1287
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1170
1288
  type: "content"
1171
1289
  }));
1172
1290
  },
1173
1291
  Top: function Top(props) {
1174
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1292
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1175
1293
  type: "top"
1176
1294
  }));
1177
1295
  },
1178
1296
  Card: function Card(props) {
1179
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1297
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1180
1298
  type: "card"
1181
1299
  }));
1182
1300
  },
1183
1301
  Tab: function Tab(props) {
1184
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1302
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1185
1303
  type: "tab"
1186
1304
  }));
1187
1305
  },
1188
1306
  Tabs: function Tabs(props) {
1189
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1307
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1190
1308
  type: "tabs"
1191
1309
  }));
1192
1310
  },
1193
1311
  Step: function Step(props) {
1194
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1312
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1195
1313
  type: "tab",
1196
1314
  layout: "step"
1197
1315
  }));
1198
1316
  },
1199
1317
  Stepper: function Stepper(props) {
1200
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1318
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1201
1319
  type: "tabs",
1202
1320
  layout: "stepper"
1203
1321
  }));
1204
1322
  },
1205
1323
  Money: function Money(props) {
1206
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1324
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1207
1325
  type: "money"
1208
1326
  }));
1209
1327
  },
1210
1328
  Chart: function Chart(props) {
1211
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1329
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1212
1330
  type: "chart"
1213
1331
  }));
1214
1332
  },
1215
1333
  Password: function Password(props) {
1216
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1334
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1217
1335
  type: "password"
1218
1336
  }));
1219
1337
  },
1220
1338
  Complete: function Complete(props) {
1221
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1339
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1222
1340
  type: "complete"
1223
1341
  }));
1224
1342
  },
1225
1343
  Checkbox: function Checkbox(props) {
1226
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1344
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1227
1345
  type: "checkbox"
1228
1346
  }));
1229
1347
  },
1230
1348
  Radio: function Radio(props) {
1231
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1349
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1232
1350
  type: "radio"
1233
1351
  }));
1234
1352
  },
1235
1353
  Select: function Select(props) {
1236
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1354
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1237
1355
  type: "select"
1238
1356
  }));
1239
1357
  },
1240
1358
  Entity: function Entity(props) {
1241
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1359
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1242
1360
  type: "entity"
1243
1361
  }));
1244
1362
  },
1245
1363
  Element: function Element(props) {
1246
- return /*#__PURE__*/React.createElement(UIElement, _extends({}, props, {
1364
+ return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1247
1365
  type: "element"
1248
1366
  }));
1249
1367
  }