react-crud-mobile 1.0.91 → 1.0.92

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.
Files changed (40) hide show
  1. package/dist/elements/UI.d.ts +11 -10
  2. package/dist/elements/core/UIAutoComplete.d.ts +2 -0
  3. package/dist/elements/core/UIButton.d.ts +3 -0
  4. package/dist/elements/core/UIIcon.d.ts +2 -0
  5. package/dist/elements/core/UIInput.d.ts +3 -0
  6. package/dist/elements/core/UILink.d.ts +2 -0
  7. package/dist/elements/core/UIOption.d.ts +2 -0
  8. package/dist/elements/core/UIRadio.d.ts +2 -0
  9. package/dist/elements/core/UISelect.d.ts +2 -0
  10. package/dist/elements/core/UISwitch.d.ts +3 -0
  11. package/dist/react-crud-mobile.cjs.development.js +30 -25
  12. package/dist/react-crud-mobile.cjs.development.js.map +1 -1
  13. package/dist/react-crud-mobile.cjs.production.min.js +1 -1
  14. package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
  15. package/dist/react-crud-mobile.esm.js +32 -27
  16. package/dist/react-crud-mobile.esm.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/elements/UI.tsx +16 -14
  19. package/src/elements/UIComplete.tsx +1 -1
  20. package/src/elements/UIElement.tsx +27 -27
  21. package/src/elements/core/{AutoComplete.tsx → UIAutoComplete.tsx} +1 -1
  22. package/src/elements/core/{Button.tsx → UIButton.tsx} +1 -1
  23. package/src/elements/core/{Radio.tsx → UIIcon.tsx} +1 -1
  24. package/src/elements/core/{Input.tsx → UIInput.tsx} +1 -1
  25. package/src/elements/core/{Icon.tsx → UILink.tsx} +1 -1
  26. package/src/elements/core/{Option.tsx → UIOption.tsx} +1 -1
  27. package/src/elements/core/{Link.tsx → UIRadio.tsx} +1 -1
  28. package/src/elements/core/UISelect.tsx +17 -0
  29. package/src/elements/core/{Switch.tsx → UISwitch.tsx} +1 -1
  30. package/src/elements/grid/ElLabel.tsx +1 -1
  31. package/dist/elements/core/AutoComplete.d.ts +0 -2
  32. package/dist/elements/core/Button.d.ts +0 -3
  33. package/dist/elements/core/Icon.d.ts +0 -2
  34. package/dist/elements/core/Input.d.ts +0 -3
  35. package/dist/elements/core/Link.d.ts +0 -2
  36. package/dist/elements/core/Option.d.ts +0 -2
  37. package/dist/elements/core/Radio.d.ts +0 -2
  38. package/dist/elements/core/Select.d.ts +0 -2
  39. package/dist/elements/core/Switch.d.ts +0 -3
  40. package/src/elements/core/Select.tsx +0 -17
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
- import { ListType } from "react-crud-utils";
3
- import { UserType } from "react-crud-utils";
4
- import { InputType } from "react-crud-utils";
5
- import { ChartType } from "react-crud-utils";
6
- import { ContainerType } from "react-crud-utils";
7
- import { ListInputType } from "react-crud-utils";
8
- import { TabsType } from "react-crud-utils";
9
- import { DefineType } from "react-crud-utils";
10
- import { ButtonType } from "react-crud-utils";
11
- import { LinkType } from "react-crud-utils";
2
+ import { ListType } from 'react-crud-utils';
3
+ import { UserType } from 'react-crud-utils';
4
+ import { InputType } from 'react-crud-utils';
5
+ import { ChartType } from 'react-crud-utils';
6
+ import { ContainerType } from 'react-crud-utils';
7
+ import { ListInputType } from 'react-crud-utils';
8
+ import { TabsType } from 'react-crud-utils';
9
+ import { DefineType } from 'react-crud-utils';
10
+ import { ButtonType } from 'react-crud-utils';
11
+ import { LinkType } from 'react-crud-utils';
12
12
  declare const UI: {
13
13
  Grid: (props: ListType) => import("react").JSX.Element;
14
14
  Repeat: (props: ListType) => import("react").JSX.Element;
@@ -39,6 +39,7 @@ declare const UI: {
39
39
  Password: (props: InputType) => import("react").JSX.Element;
40
40
  Complete: (props: InputType) => import("react").JSX.Element;
41
41
  Checkbox: (props: InputType) => import("react").JSX.Element;
42
+ Switch: (props: InputType) => import("react").JSX.Element;
42
43
  Radio: (props: ListInputType) => import("react").JSX.Element;
43
44
  Select: (props: ListInputType) => import("react").JSX.Element;
44
45
  Entity: (props: ListInputType) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function UIAutoComplete(props: any): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ChildType } from 'react-crud-utils';
3
+ export default function UIButton(props: ChildType): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function UIIcon(props: any): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ChildType } from 'react-crud-utils';
3
+ export default function UIInput(props: ChildType): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function UILink(props: any): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function UIOption(props: any): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function UIRadio(props: any): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function UISelect(props: any): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ChildType } from 'react-crud-utils';
3
+ export default function UISwitch(props: ChildType): import("react").JSX.Element;
@@ -425,7 +425,7 @@ function ElGridBotom(props) {
425
425
  });
426
426
  }
427
427
 
428
- function Icon(props) {
428
+ function UIIcon(props) {
429
429
  var handlePress = function handlePress() {
430
430
  reactNative.Linking.openURL('https://reactnative.dev/');
431
431
  };
@@ -457,7 +457,7 @@ function ElLabel(props) {
457
457
  if (typeof original.icon === 'string') {
458
458
  return /*#__PURE__*/jsxRuntime.jsx("div", {
459
459
  className: "ui-label-icon",
460
- children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
460
+ children: /*#__PURE__*/jsxRuntime.jsx(UIIcon, {
461
461
  className: scope.getIcon()
462
462
  })
463
463
  });
@@ -701,7 +701,7 @@ function ElChart(props) {
701
701
  });
702
702
  }
703
703
 
704
- function AutoComplete(props) {
704
+ function UIAutoComplete(props) {
705
705
  var handlePress = function handlePress() {
706
706
  reactNative.Linking.openURL('https://reactnative.dev/');
707
707
  };
@@ -721,7 +721,7 @@ function UIComplete(_ref) {
721
721
  var defaultsInput = _ref.defaultsInput,
722
722
  defaultsUI = _ref.defaultsUI;
723
723
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
724
- children: /*#__PURE__*/jsxRuntime.jsx(AutoComplete, _extends({}, defaultsInput, defaultsUI))
724
+ children: /*#__PURE__*/jsxRuntime.jsx(UIAutoComplete, _extends({}, defaultsInput, defaultsUI))
725
725
  });
726
726
  }
727
727
 
@@ -777,7 +777,7 @@ function ElRepeat(props) {
777
777
  });
778
778
  }
779
779
 
780
- function Link(props) {
780
+ function UILink(props) {
781
781
  var handlePress = function handlePress() {
782
782
  reactNative.Linking.openURL('https://reactnative.dev/');
783
783
  };
@@ -793,7 +793,7 @@ var styles$3 = {
793
793
  link: {}
794
794
  };
795
795
 
796
- function Button(props) {
796
+ function UIButton(props) {
797
797
  var scope = props.scope;
798
798
  var element = scope.original;
799
799
  var color = element.color;
@@ -860,7 +860,7 @@ function Button(props) {
860
860
  });
861
861
  }
862
862
 
863
- function Select(props) {
863
+ function UISelect(props) {
864
864
  var handlePress = function handlePress() {
865
865
  reactNative.Linking.openURL('https://reactnative.dev/');
866
866
  };
@@ -876,7 +876,7 @@ var styles$4 = {
876
876
  link: {}
877
877
  };
878
878
 
879
- function Switch(props) {
879
+ function UISwitch(props) {
880
880
  var scope = props.scope;
881
881
  var initial = reactCrudUtils.Utils.nvl(scope.getValue(), false);
882
882
  var _useState = React.useState(initial),
@@ -892,7 +892,7 @@ function Switch(props) {
892
892
  });
893
893
  }
894
894
 
895
- function Option(props) {
895
+ function UIOption(props) {
896
896
  var handlePress = function handlePress() {
897
897
  reactNative.Linking.openURL('https://reactnative.dev/');
898
898
  };
@@ -908,7 +908,7 @@ var styles$5 = {
908
908
  link: {}
909
909
  };
910
910
 
911
- function Radio(props) {
911
+ function UIRadio(props) {
912
912
  var handlePress = function handlePress() {
913
913
  reactNative.Linking.openURL('https://reactnative.dev/');
914
914
  };
@@ -924,7 +924,7 @@ var styles$6 = {
924
924
  link: {}
925
925
  };
926
926
 
927
- function Input(props) {
927
+ function UIInput(props) {
928
928
  var scope = props.scope;
929
929
  var initial = reactCrudUtils.Utils.nvl(scope.getValue(), '');
930
930
  var label = scope.getLabel();
@@ -1108,7 +1108,7 @@ function UIElement(props) {
1108
1108
  });
1109
1109
  var CustomIcon = function CustomIcon() {
1110
1110
  if (typeof original.icon === 'string') {
1111
- return /*#__PURE__*/jsxRuntime.jsx(Icon, {
1111
+ return /*#__PURE__*/jsxRuntime.jsx(UIIcon, {
1112
1112
  children: scope.getIcon()
1113
1113
  });
1114
1114
  }
@@ -1175,50 +1175,50 @@ function UIElement(props) {
1175
1175
  }), isShowInner() && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1176
1176
  children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
1177
1177
  style: getStyle('inner'),
1178
- children: [scope.is('type', 'button') && /*#__PURE__*/jsxRuntime.jsxs(Button, _extends({}, defaultsUI, {
1178
+ children: [scope.is('type', 'button') && /*#__PURE__*/jsxRuntime.jsxs(UIButton, _extends({}, defaultsUI, {
1179
1179
  onClick: onClick,
1180
1180
  variant: scope.attr('variant', 'outlined'),
1181
1181
  children: [original.icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
1182
1182
  style: scope.getPart('label', 'button'),
1183
1183
  children: scope.getLabel()
1184
1184
  })]
1185
- })), scope.is('type', 'icon') && /*#__PURE__*/jsxRuntime.jsx(Icon, _extends({}, defaultsUI, {
1185
+ })), scope.is('type', 'icon') && /*#__PURE__*/jsxRuntime.jsx(UIIcon, _extends({}, defaultsUI, {
1186
1186
  onClick: onClick,
1187
1187
  variant: scope.attr('variant', 'outlined'),
1188
1188
  children: scope.getDisplayValue()
1189
- })), scope.is('type', 'link') && /*#__PURE__*/jsxRuntime.jsxs(Link, _extends({}, defaultsUI, {
1189
+ })), scope.is('type', 'link') && /*#__PURE__*/jsxRuntime.jsxs(UILink, _extends({}, defaultsUI, {
1190
1190
  onClick: onClick,
1191
1191
  variant: scope.attr('variant', 'outlined'),
1192
1192
  children: [original.icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
1193
1193
  style: scope.getPart('label', 'link'),
1194
1194
  children: scope.getLabel()
1195
1195
  })]
1196
- })), scope.is('type', 'text', 'number', 'phone', 'postalCode', 'money', 'password', 'email') && /*#__PURE__*/jsxRuntime.jsx(Input, _extends({}, defaultsInput, defaultsUI, {
1196
+ })), scope.is('type', 'text', 'number', 'phone', 'postalCode', 'money', 'password', 'email') && /*#__PURE__*/jsxRuntime.jsx(UIInput, _extends({}, defaultsInput, defaultsUI, {
1197
1197
  InputProps: _extends({}, original.inputProps)
1198
1198
  })), scope.is('type', 'complete', 'autocomplete') && /*#__PURE__*/jsxRuntime.jsx(UIComplete, {
1199
1199
  scope: scope,
1200
1200
  defaultsInput: defaultsInput,
1201
1201
  defaultsUI: defaultsUI
1202
- }), scope.is('type', 'checkbox', 'boolean', 'switch') && /*#__PURE__*/jsxRuntime.jsx(Switch, _extends({
1202
+ }), scope.is('type', 'checkbox', 'boolean', 'switch') && /*#__PURE__*/jsxRuntime.jsx(UISwitch, _extends({
1203
1203
  checked: isChecked()
1204
1204
  }, defaultsInput, {
1205
1205
  onChange: onCheck
1206
- })), scope.is('type', 'select') && /*#__PURE__*/jsxRuntime.jsxs(Select, _extends({}, defaultsInput, defaultsUI, {
1206
+ })), scope.is('type', 'select') && /*#__PURE__*/jsxRuntime.jsxs(UISelect, _extends({}, defaultsInput, defaultsUI, {
1207
1207
  value: scope.getSelectedValue(),
1208
- children: [/*#__PURE__*/jsxRuntime.jsx(Option, {
1208
+ children: [/*#__PURE__*/jsxRuntime.jsx(UIOption, {
1209
1209
  value: '',
1210
1210
  children: "Selecione"
1211
1211
  }), options.map(function (row, i) {
1212
- return /*#__PURE__*/jsxRuntime.jsx(Option, {
1212
+ return /*#__PURE__*/jsxRuntime.jsx(UIOption, {
1213
1213
  value: row.value,
1214
1214
  children: row.label
1215
1215
  }, 'i' + i);
1216
1216
  })]
1217
- })), scope.is('type', 'radio') && /*#__PURE__*/jsxRuntime.jsx(Radio, _extends({}, defaultsInput, defaultsUI, {
1217
+ })), scope.is('type', 'radio') && /*#__PURE__*/jsxRuntime.jsx(UIRadio, _extends({}, defaultsInput, defaultsUI, {
1218
1218
  row: true,
1219
1219
  children: options.map(function (row, i) {
1220
- return /*#__PURE__*/jsxRuntime.jsx(Option, {
1221
- control: /*#__PURE__*/jsxRuntime.jsx(Radio, _extends({}, defaultsUI)),
1220
+ return /*#__PURE__*/jsxRuntime.jsx(UIOption, {
1221
+ control: /*#__PURE__*/jsxRuntime.jsx(UIRadio, _extends({}, defaultsUI)),
1222
1222
  label: row.label,
1223
1223
  value: row.value
1224
1224
  }, 'i' + i);
@@ -1226,7 +1226,7 @@ function UIElement(props) {
1226
1226
  })), scope.is('type', 'custom') && /*#__PURE__*/jsxRuntime.jsx(Custom, {}), scope.is('type', 'column') && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1227
1227
  children: [scope.is('format', 'img') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
1228
1228
  source: scope.getDisplayValue()
1229
- }), scope.is('format', 'icon') && /*#__PURE__*/jsxRuntime.jsx(Icon, {
1229
+ }), scope.is('format', 'icon') && /*#__PURE__*/jsxRuntime.jsx(UIIcon, {
1230
1230
  className: scope.getDisplayValue()
1231
1231
  }), !scope.is('format', 'icon', 'img') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
1232
1232
  children: scope.getDisplayValue()
@@ -1474,7 +1474,12 @@ var UI = {
1474
1474
  },
1475
1475
  Checkbox: function Checkbox(props) {
1476
1476
  return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
1477
- type: "checkbox"
1477
+ type: "switch"
1478
+ }));
1479
+ },
1480
+ Switch: function Switch(props) {
1481
+ return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
1482
+ type: "switch"
1478
1483
  }));
1479
1484
  },
1480
1485
  Radio: function Radio(props) {