react-crud-mobile 1.0.104 → 1.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/core/UIInclude.d.ts +3 -0
- package/dist/elements/{grid/ElGrid.d.ts → core/UIList.d.ts} +1 -1
- package/dist/react-crud-mobile.cjs.development.js +59 -465
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +62 -468
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UI.tsx +2 -2
- package/src/elements/UIElement.tsx +2 -7
- package/src/elements/{grid/ElInclude.tsx → core/UIInclude.tsx} +3 -3
- package/src/elements/core/UIList.tsx +38 -0
- package/src/elements/grid/ElInclude +0 -0
- package/dist/elements/grid/ElGridBotom.d.ts +0 -3
- package/dist/elements/grid/ElGridCheck.d.ts +0 -3
- package/dist/elements/grid/ElGridColumn.d.ts +0 -11
- package/dist/elements/grid/ElGridFilter.d.ts +0 -3
- package/dist/elements/grid/ElGridPaginator.d.ts +0 -12
- package/dist/elements/grid/ElGridRow.d.ts +0 -3
- package/dist/elements/grid/ElGridTop.d.ts +0 -3
- package/dist/elements/grid/ElInclude.d.ts +0 -3
- package/dist/elements/grid/ElLabel.d.ts +0 -7
- package/dist/elements/grid/ElRepeat.d.ts +0 -3
- package/dist/elements/grid/ElRepeatRow.d.ts +0 -3
- package/src/elements/grid/ElGrid.tsx +0 -48
- package/src/elements/grid/ElGridBotom.tsx +0 -21
- package/src/elements/grid/ElGridCheck.tsx +0 -67
- package/src/elements/grid/ElGridColumn.tsx +0 -32
- package/src/elements/grid/ElGridFilter.tsx +0 -5
- package/src/elements/grid/ElGridPaginator.tsx +0 -82
- package/src/elements/grid/ElGridRow.tsx +0 -123
- package/src/elements/grid/ElGridTop.tsx +0 -44
- package/src/elements/grid/ElLabel.tsx +0 -50
- package/src/elements/grid/ElRepeat.tsx +0 -24
- package/src/elements/grid/ElRepeatRow.tsx +0 -40
|
@@ -132,413 +132,6 @@ var styles = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
-
function ElGridColumn(props) {
|
|
136
|
-
var _props$column;
|
|
137
|
-
var scope = props.scope;
|
|
138
|
-
var col = reactCrudUtils.Utils.nvl((_props$column = props.column) == null ? void 0 : _props$column.props, {});
|
|
139
|
-
var _useState = React.useState(new reactCrudUtils.Scope(col, scope, scope.crud)),
|
|
140
|
-
colScope = _useState[0];
|
|
141
|
-
var getStyleClass = function getStyleClass() {
|
|
142
|
-
var def = reactCrudUtils.Utils.nvl(props.styleClass, "");
|
|
143
|
-
return "ui-grid-col " + def + " " + colScope.getStyleClass("column");
|
|
144
|
-
};
|
|
145
|
-
return /*#__PURE__*/jsxRuntime.jsx("td", {
|
|
146
|
-
className: getStyleClass(),
|
|
147
|
-
style: colScope.getStyle("column"),
|
|
148
|
-
colSpan: props.colspan,
|
|
149
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
150
|
-
scope: scope,
|
|
151
|
-
children: props.children
|
|
152
|
-
})
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function ElGridCheck(_ref) {
|
|
157
|
-
var scope = _ref.scope,
|
|
158
|
-
value = _ref.value,
|
|
159
|
-
rowIndex = _ref.rowIndex;
|
|
160
|
-
var original = scope.original;
|
|
161
|
-
var _useState = React.useState(0),
|
|
162
|
-
index = _useState[0],
|
|
163
|
-
setIndex = _useState[1];
|
|
164
|
-
var key = scope.key('check', rowIndex, 's', index);
|
|
165
|
-
var check = function check() {
|
|
166
|
-
var cs = scope.crudSearch;
|
|
167
|
-
if (cs) {
|
|
168
|
-
if (!cs.selecteds) {
|
|
169
|
-
cs.selecteds = {};
|
|
170
|
-
}
|
|
171
|
-
var itemValue = reactCrudUtils.Utils.nvl(original.itemValue, 'id');
|
|
172
|
-
var _key = value[itemValue];
|
|
173
|
-
if (typeof _key !== 'undefined') {
|
|
174
|
-
if (typeof cs.selecteds[_key] === 'undefined') {
|
|
175
|
-
cs.selecteds[_key] = value;
|
|
176
|
-
} else {
|
|
177
|
-
delete cs.selecteds[_key];
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
setIndex(++index);
|
|
182
|
-
};
|
|
183
|
-
var getCheckIcon = function getCheckIcon() {
|
|
184
|
-
if (isChecked()) {
|
|
185
|
-
return /*#__PURE__*/jsxRuntime.jsx(Ionicons, {});
|
|
186
|
-
}
|
|
187
|
-
return /*#__PURE__*/jsxRuntime.jsx(Ionicons, {});
|
|
188
|
-
};
|
|
189
|
-
var isChecked = function isChecked() {
|
|
190
|
-
var cs = scope.crudSearch;
|
|
191
|
-
if (cs) {
|
|
192
|
-
if (!cs.selecteds) {
|
|
193
|
-
cs.selecteds = {};
|
|
194
|
-
}
|
|
195
|
-
var itemValue = reactCrudUtils.Utils.nvl(original.itemValue, 'id');
|
|
196
|
-
var _key2 = value[itemValue];
|
|
197
|
-
if (typeof _key2 !== 'undefined') {
|
|
198
|
-
if (typeof cs.selecteds[_key2] !== 'undefined') {
|
|
199
|
-
return true;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return false;
|
|
204
|
-
};
|
|
205
|
-
return /*#__PURE__*/jsxRuntime.jsx(UI.Button, {
|
|
206
|
-
icon: getCheckIcon(),
|
|
207
|
-
click: {
|
|
208
|
-
action: check
|
|
209
|
-
}
|
|
210
|
-
}, key);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
function ElGridRow(props) {
|
|
214
|
-
var expansion = props.expansion;
|
|
215
|
-
var value = props.value;
|
|
216
|
-
var scope = props.scope;
|
|
217
|
-
var index = props.index;
|
|
218
|
-
var original = scope.original;
|
|
219
|
-
var row = reactCrudUtils.CrudUtils.create('row', {
|
|
220
|
-
index: index,
|
|
221
|
-
row: true,
|
|
222
|
-
itemVar: scope.original.itemVar,
|
|
223
|
-
parent: scope.crudSearch,
|
|
224
|
-
data: value
|
|
225
|
-
});
|
|
226
|
-
var _useState = React.useState(false),
|
|
227
|
-
expanded = _useState[0],
|
|
228
|
-
setExpanded = _useState[1];
|
|
229
|
-
var _useState2 = React.useState(new reactCrudUtils.Scope(scope.original, scope, row)),
|
|
230
|
-
rowScope = _useState2[0];
|
|
231
|
-
var getRowStyleClass = function getRowStyleClass() {
|
|
232
|
-
var s = 'ui-grid-row';
|
|
233
|
-
s = s + ' ui-grid-row-';
|
|
234
|
-
if (index % 2 == 0) {
|
|
235
|
-
s = s + 'even';
|
|
236
|
-
} else {
|
|
237
|
-
s = s + 'odd';
|
|
238
|
-
}
|
|
239
|
-
return s;
|
|
240
|
-
};
|
|
241
|
-
var cols = reactCrudUtils.ComponentUtils.getChild(props, 'Column');
|
|
242
|
-
var colspan = cols.length;
|
|
243
|
-
var ExpansionStatus = function ExpansionStatus() {
|
|
244
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
245
|
-
children: [!expanded && /*#__PURE__*/jsxRuntime.jsx(Ionicons, {}), expanded && /*#__PURE__*/jsxRuntime.jsx(Ionicons, {})]
|
|
246
|
-
});
|
|
247
|
-
};
|
|
248
|
-
var onExpansion = function onExpansion() {
|
|
249
|
-
setExpanded(!expanded);
|
|
250
|
-
};
|
|
251
|
-
var hasExpansion = !reactCrudUtils.Utils.isEmpty(expansion);
|
|
252
|
-
var multiple = original.multiple;
|
|
253
|
-
if (hasExpansion) colspan++;
|
|
254
|
-
if (multiple) colspan++;
|
|
255
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
256
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("tr", {
|
|
257
|
-
className: getRowStyleClass(),
|
|
258
|
-
style: rowScope.getStyle('row'),
|
|
259
|
-
children: [hasExpansion && /*#__PURE__*/jsxRuntime.jsx(ElGridColumn, {
|
|
260
|
-
scope: rowScope,
|
|
261
|
-
styleClass: "ui-click ui-icon-only ui-expansion",
|
|
262
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UI.Button, {
|
|
263
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(ExpansionStatus, {}),
|
|
264
|
-
click: onExpansion
|
|
265
|
-
})
|
|
266
|
-
}, 'r' + index + 'e'), multiple && /*#__PURE__*/jsxRuntime.jsx(ElGridColumn, {
|
|
267
|
-
scope: rowScope,
|
|
268
|
-
styleClass: "ui-click ui-icon-only ui-multiple",
|
|
269
|
-
children: /*#__PURE__*/jsxRuntime.jsx(ElGridCheck, {
|
|
270
|
-
scope: scope,
|
|
271
|
-
value: value,
|
|
272
|
-
rowIndex: index
|
|
273
|
-
}, 'check-' + index)
|
|
274
|
-
}, 'r' + index + 'c'), cols.map(function (col, i) {
|
|
275
|
-
return /*#__PURE__*/jsxRuntime.jsx(ElGridColumn, {
|
|
276
|
-
column: col,
|
|
277
|
-
scope: rowScope,
|
|
278
|
-
children: col
|
|
279
|
-
}, 'r' + index + 'c' + i);
|
|
280
|
-
})]
|
|
281
|
-
}), expanded && /*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
282
|
-
className: getRowStyleClass(),
|
|
283
|
-
style: rowScope.getStyle('row'),
|
|
284
|
-
children: /*#__PURE__*/jsxRuntime.jsx(ElGridColumn, {
|
|
285
|
-
scope: rowScope,
|
|
286
|
-
colspan: colspan,
|
|
287
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, _extends({}, props, {
|
|
288
|
-
crud: row,
|
|
289
|
-
children: expansion
|
|
290
|
-
}))
|
|
291
|
-
}, 'r' + index + '-expanded')
|
|
292
|
-
})]
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
function ElGridPaginator(_ref) {
|
|
297
|
-
var scope = _ref.scope,
|
|
298
|
-
next = _ref.next,
|
|
299
|
-
previous = _ref.previous,
|
|
300
|
-
first = _ref.first,
|
|
301
|
-
size = _ref.size,
|
|
302
|
-
last = _ref.last,
|
|
303
|
-
position = _ref.position;
|
|
304
|
-
var _useState = React.useState([10, 20, 30, 50, 100, 200, 500]),
|
|
305
|
-
sizes = _useState[0];
|
|
306
|
-
var defaults = {
|
|
307
|
-
crud: scope.crudSearch,
|
|
308
|
-
owner: scope,
|
|
309
|
-
variant: scope.attr('variant', 'text')
|
|
310
|
-
};
|
|
311
|
-
var paginatorPosition = reactCrudUtils.Utils.nvl(scope.original.paginatorPosition, 'bottom');
|
|
312
|
-
if (paginatorPosition !== position) {
|
|
313
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
314
|
-
}
|
|
315
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
316
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(UI.Button, _extends({
|
|
317
|
-
field: "first",
|
|
318
|
-
space: 0,
|
|
319
|
-
rendered: first !== false
|
|
320
|
-
}, defaults, {
|
|
321
|
-
click: "first",
|
|
322
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(Ionicons, {})
|
|
323
|
-
})), /*#__PURE__*/jsxRuntime.jsx(UI.Button, _extends({
|
|
324
|
-
field: "previous",
|
|
325
|
-
space: 0,
|
|
326
|
-
rendered: previous !== false,
|
|
327
|
-
click: "previous"
|
|
328
|
-
}, defaults, {
|
|
329
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(Ionicons, {})
|
|
330
|
-
})), /*#__PURE__*/jsxRuntime.jsx(UI.Select, _extends({
|
|
331
|
-
field: "size",
|
|
332
|
-
space: 0,
|
|
333
|
-
rendered: size !== false,
|
|
334
|
-
"default": 10
|
|
335
|
-
}, defaults, {
|
|
336
|
-
data: sizes,
|
|
337
|
-
change: "search"
|
|
338
|
-
})), /*#__PURE__*/jsxRuntime.jsx(UI.Button, _extends({
|
|
339
|
-
field: "next",
|
|
340
|
-
space: 0,
|
|
341
|
-
rendered: next !== false
|
|
342
|
-
}, defaults, {
|
|
343
|
-
click: "next",
|
|
344
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(Ionicons, {})
|
|
345
|
-
})), /*#__PURE__*/jsxRuntime.jsx(UI.Button, _extends({
|
|
346
|
-
field: "last",
|
|
347
|
-
space: 0,
|
|
348
|
-
rendered: last !== false
|
|
349
|
-
}, defaults, {
|
|
350
|
-
click: "last",
|
|
351
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(Ionicons, {})
|
|
352
|
-
}))]
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
function ElGridTop(props) {
|
|
357
|
-
var scope = props.scope;
|
|
358
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
359
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(UI.Output, {
|
|
360
|
-
styleClass: "ui-grid-top",
|
|
361
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(UI.Output, {
|
|
362
|
-
field: "search",
|
|
363
|
-
position: "left",
|
|
364
|
-
space: 4,
|
|
365
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(UI.Include, _extends({}, props, {
|
|
366
|
-
"transient": true,
|
|
367
|
-
name: "top",
|
|
368
|
-
position: "left"
|
|
369
|
-
})), /*#__PURE__*/jsxRuntime.jsx(UI.Text, {
|
|
370
|
-
field: "query",
|
|
371
|
-
space: 0,
|
|
372
|
-
label: "Pesquisar",
|
|
373
|
-
placeholder: scope.attr('placeholder', 'Pesquisar'),
|
|
374
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UI.Define, {
|
|
375
|
-
name: "right",
|
|
376
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UI.Button, {
|
|
377
|
-
field: "search",
|
|
378
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(Ionicons, {}),
|
|
379
|
-
space: 0,
|
|
380
|
-
variant: "text",
|
|
381
|
-
owner: scope,
|
|
382
|
-
click: 'search'
|
|
383
|
-
})
|
|
384
|
-
})
|
|
385
|
-
})]
|
|
386
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(UI.Output, {
|
|
387
|
-
position: "right",
|
|
388
|
-
space: 8,
|
|
389
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(UI.Include, _extends({}, props, {
|
|
390
|
-
"transient": true,
|
|
391
|
-
name: "top",
|
|
392
|
-
position: "right"
|
|
393
|
-
})), /*#__PURE__*/jsxRuntime.jsx(ElGridPaginator, {
|
|
394
|
-
scope: scope,
|
|
395
|
-
last: false,
|
|
396
|
-
first: false,
|
|
397
|
-
position: "top"
|
|
398
|
-
})]
|
|
399
|
-
})]
|
|
400
|
-
})
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
function ElGridFilter(props) {
|
|
405
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
function ElGridBotom(props) {
|
|
409
|
-
var scope = props.scope;
|
|
410
|
-
var children = props.children;
|
|
411
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
412
|
-
className: "ui-grid-bottom",
|
|
413
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
414
|
-
className: "ui-grid-bottom-inner",
|
|
415
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(UI.Include, _extends({}, props, {
|
|
416
|
-
"transient": true,
|
|
417
|
-
name: "bottomLeft"
|
|
418
|
-
})), /*#__PURE__*/jsxRuntime.jsx(ElGridPaginator, {
|
|
419
|
-
scope: scope,
|
|
420
|
-
position: "bottom",
|
|
421
|
-
children: children
|
|
422
|
-
}), /*#__PURE__*/jsxRuntime.jsx(UI.Include, _extends({}, props, {
|
|
423
|
-
"transient": true,
|
|
424
|
-
name: "bottomRight"
|
|
425
|
-
}))]
|
|
426
|
-
})
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
function UIIcon(props) {
|
|
431
|
-
var handlePress = function handlePress() {
|
|
432
|
-
reactNative.Linking.openURL('https://reactnative.dev/');
|
|
433
|
-
};
|
|
434
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
435
|
-
onPress: handlePress,
|
|
436
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
437
|
-
style: styles$1.link,
|
|
438
|
-
children: "Clique aqui para acessar o React Native"
|
|
439
|
-
})
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
var styles$1 = {
|
|
443
|
-
link: {}
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
function ElLabel(props) {
|
|
447
|
-
var scope = props.scope;
|
|
448
|
-
var original = scope.original;
|
|
449
|
-
var defaultPos = 'outside';
|
|
450
|
-
var elPos = reactCrudUtils.Utils.nvl(original.labelPos, defaultPos);
|
|
451
|
-
var lbPos = reactCrudUtils.Utils.nvl(props.position, defaultPos);
|
|
452
|
-
if (elPos != lbPos) {
|
|
453
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
454
|
-
}
|
|
455
|
-
var CustomIcon = function CustomIcon() {
|
|
456
|
-
if (!scope.is('type', 'list', 'grid')) {
|
|
457
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
458
|
-
}
|
|
459
|
-
if (typeof original.icon === 'string') {
|
|
460
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
461
|
-
className: "ui-label-icon",
|
|
462
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIIcon, {
|
|
463
|
-
className: scope.getIcon()
|
|
464
|
-
})
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
468
|
-
className: "ui-label-icon",
|
|
469
|
-
children: original.icon
|
|
470
|
-
});
|
|
471
|
-
};
|
|
472
|
-
var label = scope.getLabel();
|
|
473
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
474
|
-
className: 'ui-label ui-label-' + lbPos,
|
|
475
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
476
|
-
className: "ui-label-left",
|
|
477
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(UI.Include, _extends({}, props, {
|
|
478
|
-
"transient": true,
|
|
479
|
-
name: "label",
|
|
480
|
-
position: "left"
|
|
481
|
-
})), /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), label && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
482
|
-
className: "ui-label-value",
|
|
483
|
-
children: label
|
|
484
|
-
})]
|
|
485
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
486
|
-
className: "ui-label-right",
|
|
487
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UI.Include, _extends({}, props, {
|
|
488
|
-
"transient": true,
|
|
489
|
-
name: "label",
|
|
490
|
-
position: "right"
|
|
491
|
-
}))
|
|
492
|
-
})]
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
function ElGrid(props) {
|
|
497
|
-
var scope = props.scope;
|
|
498
|
-
var items = scope.getItems();
|
|
499
|
-
var expansion = reactCrudUtils.ComponentUtils.getDefine(props, 'expansion');
|
|
500
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
501
|
-
className: scope.getStyleClass('inner'),
|
|
502
|
-
style: scope.getStyle('inner'),
|
|
503
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(ElLabel, _extends({}, props, {
|
|
504
|
-
scope: scope,
|
|
505
|
-
position: "outside"
|
|
506
|
-
})), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
507
|
-
className: scope.getStyleClass('child'),
|
|
508
|
-
style: scope.getStyle('child'),
|
|
509
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(ElLabel, _extends({}, props, {
|
|
510
|
-
scope: scope,
|
|
511
|
-
position: "inside"
|
|
512
|
-
})), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
513
|
-
className: "ui-data",
|
|
514
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(ElGridTop, _extends({}, props, {
|
|
515
|
-
scope: scope
|
|
516
|
-
})), /*#__PURE__*/jsxRuntime.jsx(ElGridFilter, {
|
|
517
|
-
scope: scope
|
|
518
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
519
|
-
className: "ui-grid-data",
|
|
520
|
-
children: /*#__PURE__*/jsxRuntime.jsx("table", {
|
|
521
|
-
className: "ui-grid ui-table",
|
|
522
|
-
children: /*#__PURE__*/jsxRuntime.jsx("tbody", {
|
|
523
|
-
children: items.map(function (row, i) {
|
|
524
|
-
return /*#__PURE__*/React.createElement(ElGridRow, _extends({}, props, {
|
|
525
|
-
expansion: expansion,
|
|
526
|
-
key: 'r' + i,
|
|
527
|
-
scope: scope,
|
|
528
|
-
value: row,
|
|
529
|
-
index: i
|
|
530
|
-
}));
|
|
531
|
-
})
|
|
532
|
-
})
|
|
533
|
-
})
|
|
534
|
-
})]
|
|
535
|
-
}), /*#__PURE__*/jsxRuntime.jsx(ElGridBotom, _extends({}, props, {
|
|
536
|
-
scope: scope
|
|
537
|
-
}))]
|
|
538
|
-
})]
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
|
|
542
135
|
function ElTabs(props) {
|
|
543
136
|
var scope = props.scope;
|
|
544
137
|
var _useState = React.useState(0),
|
|
@@ -710,12 +303,12 @@ function UIAutoComplete(props) {
|
|
|
710
303
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
711
304
|
onPress: handlePress,
|
|
712
305
|
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
713
|
-
style: styles$
|
|
306
|
+
style: styles$1.link,
|
|
714
307
|
children: "Clique aqui para acessar o React Native"
|
|
715
308
|
})
|
|
716
309
|
});
|
|
717
310
|
}
|
|
718
|
-
var styles$
|
|
311
|
+
var styles$1 = {
|
|
719
312
|
link: {}
|
|
720
313
|
};
|
|
721
314
|
|
|
@@ -727,59 +320,23 @@ function UIComplete(_ref) {
|
|
|
727
320
|
});
|
|
728
321
|
}
|
|
729
322
|
|
|
730
|
-
function
|
|
731
|
-
var
|
|
732
|
-
|
|
733
|
-
var index = props.index;
|
|
734
|
-
var row = reactCrudUtils.CrudUtils.create("row", {
|
|
735
|
-
index: index,
|
|
736
|
-
row: true,
|
|
737
|
-
itemVar: scope.original.itemVar,
|
|
738
|
-
parent: scope.crudSearch,
|
|
739
|
-
data: value
|
|
740
|
-
});
|
|
741
|
-
var _useState = React.useState(new reactCrudUtils.Scope(scope.original, scope, row)),
|
|
742
|
-
rowScope = _useState[0];
|
|
743
|
-
var getRowStyleClass = function getRowStyleClass() {
|
|
744
|
-
var s = rowScope.getStyleClass("row");
|
|
745
|
-
s = s + " ui-repeat-row-";
|
|
746
|
-
if (index % 2 == 0) {
|
|
747
|
-
s = s + "even";
|
|
748
|
-
} else {
|
|
749
|
-
s = s + "odd";
|
|
750
|
-
}
|
|
751
|
-
return s;
|
|
323
|
+
function UILink(props) {
|
|
324
|
+
var handlePress = function handlePress() {
|
|
325
|
+
reactNative.Linking.openURL('https://reactnative.dev/');
|
|
752
326
|
};
|
|
753
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
"
|
|
758
|
-
}, props, {
|
|
759
|
-
crud: row,
|
|
760
|
-
children: props.children
|
|
761
|
-
}))
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
function ElRepeat(props) {
|
|
766
|
-
var scope = props.scope;
|
|
767
|
-
var items = scope.getItems();
|
|
768
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
769
|
-
className: scope.getStyleClass('inner'),
|
|
770
|
-
style: scope.getStyle('inner'),
|
|
771
|
-
children: items.map(function (row, i) {
|
|
772
|
-
return /*#__PURE__*/React.createElement(ElRepeatRow, _extends({}, props, {
|
|
773
|
-
key: 'r' + i,
|
|
774
|
-
scope: scope,
|
|
775
|
-
value: row,
|
|
776
|
-
index: i
|
|
777
|
-
}));
|
|
327
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
328
|
+
onPress: handlePress,
|
|
329
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
330
|
+
style: styles$2.link,
|
|
331
|
+
children: "Clique aqui para acessar o React Native"
|
|
778
332
|
})
|
|
779
333
|
});
|
|
780
334
|
}
|
|
335
|
+
var styles$2 = {
|
|
336
|
+
link: {}
|
|
337
|
+
};
|
|
781
338
|
|
|
782
|
-
function
|
|
339
|
+
function UIIcon(props) {
|
|
783
340
|
var handlePress = function handlePress() {
|
|
784
341
|
reactNative.Linking.openURL('https://reactnative.dev/');
|
|
785
342
|
};
|
|
@@ -958,6 +515,46 @@ var styles$7 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
958
515
|
}
|
|
959
516
|
});
|
|
960
517
|
|
|
518
|
+
function UIList(props) {
|
|
519
|
+
var scope = props.scope;
|
|
520
|
+
var items = scope.getItems();
|
|
521
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.FlatList, {
|
|
522
|
+
data: items // Dados da lista
|
|
523
|
+
,
|
|
524
|
+
keyExtractor: function keyExtractor(item) {
|
|
525
|
+
return item.id;
|
|
526
|
+
} // Chave única
|
|
527
|
+
,
|
|
528
|
+
renderItem: function renderItem(_ref) {
|
|
529
|
+
var item = _ref.item;
|
|
530
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
531
|
+
style: styles$8.item,
|
|
532
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
533
|
+
style: styles$8.text,
|
|
534
|
+
children: item.name
|
|
535
|
+
})
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
541
|
+
container: {
|
|
542
|
+
flex: 1,
|
|
543
|
+
padding: 20,
|
|
544
|
+
backgroundColor: '#fff'
|
|
545
|
+
},
|
|
546
|
+
item: {
|
|
547
|
+
padding: 15,
|
|
548
|
+
marginVertical: 8,
|
|
549
|
+
backgroundColor: '#f9c2ff',
|
|
550
|
+
borderRadius: 8
|
|
551
|
+
},
|
|
552
|
+
text: {
|
|
553
|
+
fontSize: 18,
|
|
554
|
+
fontWeight: 'bold'
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
|
|
961
558
|
function UIElement(props) {
|
|
962
559
|
var _useState = React.useState(reactCrudUtils.ScopeUtils.create(props)),
|
|
963
560
|
scope = _useState[0];
|
|
@@ -976,10 +573,7 @@ function UIElement(props) {
|
|
|
976
573
|
setIndex(++index);
|
|
977
574
|
};
|
|
978
575
|
var router = {
|
|
979
|
-
list:
|
|
980
|
-
grid: ElGrid,
|
|
981
|
-
label: ElLabel,
|
|
982
|
-
repeat: ElRepeat,
|
|
576
|
+
list: UIList,
|
|
983
577
|
tabs: ElTabs,
|
|
984
578
|
chart: ElChart
|
|
985
579
|
};
|
|
@@ -1067,7 +661,7 @@ function UIElement(props) {
|
|
|
1067
661
|
var _elementStyle$type, _elementStyle$type2;
|
|
1068
662
|
var type = reactCrudUtils.Utils.nvl(original.type, 'none');
|
|
1069
663
|
var key = reactCrudUtils.Utils.nvl(part, 'root');
|
|
1070
|
-
var def = _extends({}, styles$
|
|
664
|
+
var def = _extends({}, styles$9[key], elementStyle == null || (_elementStyle$type = elementStyle[type]) == null ? void 0 : _elementStyle$type[key]);
|
|
1071
665
|
var hasChild = hasChildren();
|
|
1072
666
|
if (!part && !hasChild) {
|
|
1073
667
|
def = _extends({}, def);
|
|
@@ -1267,7 +861,7 @@ elementStyle.card = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1267
861
|
paddingTop: 5
|
|
1268
862
|
}
|
|
1269
863
|
});
|
|
1270
|
-
var styles$
|
|
864
|
+
var styles$9 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
1271
865
|
root: {
|
|
1272
866
|
gap: 5,
|
|
1273
867
|
flexDirection: 'column',
|
|
@@ -1294,7 +888,7 @@ var withChildStyles = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1294
888
|
}
|
|
1295
889
|
});
|
|
1296
890
|
|
|
1297
|
-
function
|
|
891
|
+
function UIInclude(props) {
|
|
1298
892
|
if (props.rendered === false) {
|
|
1299
893
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1300
894
|
}
|
|
@@ -1348,7 +942,7 @@ var UI = {
|
|
|
1348
942
|
}));
|
|
1349
943
|
},
|
|
1350
944
|
Include: function Include(props) {
|
|
1351
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
945
|
+
return /*#__PURE__*/jsxRuntime.jsx(UIInclude, _extends({}, props));
|
|
1352
946
|
},
|
|
1353
947
|
Column: function Column(_ref) {
|
|
1354
948
|
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
|