react-crud-mobile 1.3.66 → 1.3.68
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/react-crud-mobile.cjs.development.js +29 -30
- 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 +29 -30
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +29 -27
package/package.json
CHANGED
|
@@ -333,16 +333,30 @@ export default function UIElement(props: ElementType) {
|
|
|
333
333
|
return true;
|
|
334
334
|
};
|
|
335
335
|
|
|
336
|
-
let
|
|
336
|
+
let isTouch =
|
|
337
|
+
!scope.isType('input', 'grid', 'list', 'order', 'repeat') && original.click;
|
|
337
338
|
let custom: any = {};
|
|
338
339
|
|
|
339
|
-
if (
|
|
340
|
-
Tag = TouchableHighlight;
|
|
341
|
-
|
|
340
|
+
if (isTouch) {
|
|
342
341
|
custom.underlayColor = 'transparent';
|
|
343
342
|
custom.onPress = onClick;
|
|
344
343
|
}
|
|
345
344
|
|
|
345
|
+
let Tag = (props: any) => {
|
|
346
|
+
let Aux: any = View;
|
|
347
|
+
|
|
348
|
+
if (isTouch) {
|
|
349
|
+
Aux = TouchableHighlight;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (scope.isType('dialog', 'order')) {
|
|
353
|
+
console.log('dialogggg');
|
|
354
|
+
return <>{props.children}</>;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return <Aux {...props} />;
|
|
358
|
+
};
|
|
359
|
+
|
|
346
360
|
let Inner = () => {
|
|
347
361
|
return (
|
|
348
362
|
<>
|
|
@@ -509,7 +523,13 @@ export default function UIElement(props: ElementType) {
|
|
|
509
523
|
{scope.isType('list', 'repeat') && (
|
|
510
524
|
<UIList {...props} scope={scope} crud={crud} />
|
|
511
525
|
)}
|
|
526
|
+
{scope.isType('order') && (
|
|
527
|
+
<UIOrder {...props} scope={scope} crud={crud} />
|
|
528
|
+
)}
|
|
512
529
|
|
|
530
|
+
{scope.isType('dialog') && (
|
|
531
|
+
<UIModal {...props} scope={scope} crud={crud} />
|
|
532
|
+
)}
|
|
513
533
|
{scope.isType('chart') && (
|
|
514
534
|
<ElChart {...props} scope={scope} crud={crud} />
|
|
515
535
|
)}
|
|
@@ -521,10 +541,6 @@ export default function UIElement(props: ElementType) {
|
|
|
521
541
|
<UIView {...props} scope={scope} crud={crud} />
|
|
522
542
|
)}
|
|
523
543
|
|
|
524
|
-
{scope.isType('dialog') && (
|
|
525
|
-
<UIModal {...props} scope={scope} crud={crud} />
|
|
526
|
-
)}
|
|
527
|
-
|
|
528
544
|
{isShowChild() && (
|
|
529
545
|
<UIChildren
|
|
530
546
|
{...props}
|
|
@@ -569,27 +585,13 @@ export default function UIElement(props: ElementType) {
|
|
|
569
585
|
return <>{props.children}</>;
|
|
570
586
|
};
|
|
571
587
|
|
|
572
|
-
let Decorate = (props: any) => {
|
|
573
|
-
if (scope.isType('order')) {
|
|
574
|
-
return <UIOrder {...props} scope={scope} crud={crud} />;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
return (
|
|
578
|
-
<Tag ref={ref} style={getStyle()} {...custom}>
|
|
579
|
-
{props.children}
|
|
580
|
-
</Tag>
|
|
581
|
-
);
|
|
582
|
-
};
|
|
583
|
-
|
|
584
588
|
return (
|
|
585
589
|
<CrudContext.Provider value={{ crud, theme }}>
|
|
586
|
-
<
|
|
587
|
-
<
|
|
588
|
-
<
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
</Tag>
|
|
592
|
-
</Decorate>
|
|
590
|
+
<Tag ref={ref} style={getStyle()} {...custom}>
|
|
591
|
+
<Card>
|
|
592
|
+
<Container />
|
|
593
|
+
</Card>
|
|
594
|
+
</Tag>
|
|
593
595
|
</CrudContext.Provider>
|
|
594
596
|
);
|
|
595
597
|
}
|