@etsoo/materialui 1.5.86 → 1.5.87

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,11 +1,13 @@
1
- import { DataTypes } from "@etsoo/shared";
1
+ import { IdType } from "@etsoo/shared";
2
2
  import { TypographyProps } from "@mui/material/Typography";
3
3
  import React from "react";
4
4
  import { InputField } from "./InputField";
5
5
  import { EmailInput } from "./EmailInput";
6
6
  import { MobileInput } from "./MobileInput";
7
7
  import { PhoneInput } from "./PhoneInput";
8
- type ItemType = DataTypes.IdLabelItem<string | number>;
8
+ type ItemType = {
9
+ id: IdType;
10
+ };
9
11
  declare const componentMap: {
10
12
  input: typeof InputField;
11
13
  email: typeof EmailInput;
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.InputTipField = InputTipField;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const shared_1 = require("@etsoo/shared");
8
9
  const Typography_1 = __importDefault(require("@mui/material/Typography"));
9
10
  const react_1 = __importDefault(require("react"));
10
11
  const InputField_1 = require("./InputField");
@@ -39,7 +40,7 @@ function InputTipField(props) {
39
40
  const { labelProps = {
40
41
  title: app?.get("clickForDetails"),
41
42
  sx: { color: (theme) => theme.palette.error.main, cursor: "pointer" }
42
- }, loadData, itemLabel = (item) => item.label, renderItem = (item) => (0, jsx_runtime_1.jsx)(ListItem_1.default, { children: itemLabel(item) }, item.id) } = componentProps;
43
+ }, loadData, itemLabel = (item) => shared_1.DataTypes.getObjectItemLabel(item), renderItem = (item) => (0, jsx_runtime_1.jsx)(ListItem_1.default, { children: itemLabel(item) }, item.id) } = componentProps;
43
44
  const { input, ...slotRests } = slotProps;
44
45
  const Component = componentMap[component];
45
46
  const load = (value) => {
@@ -1,11 +1,13 @@
1
- import { DataTypes } from "@etsoo/shared";
1
+ import { IdType } from "@etsoo/shared";
2
2
  import { TypographyProps } from "@mui/material/Typography";
3
3
  import React from "react";
4
4
  import { InputField } from "./InputField";
5
5
  import { EmailInput } from "./EmailInput";
6
6
  import { MobileInput } from "./MobileInput";
7
7
  import { PhoneInput } from "./PhoneInput";
8
- type ItemType = DataTypes.IdLabelItem<string | number>;
8
+ type ItemType = {
9
+ id: IdType;
10
+ };
9
11
  declare const componentMap: {
10
12
  input: typeof InputField;
11
13
  email: typeof EmailInput;
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DataTypes } from "@etsoo/shared";
2
3
  import Typography from "@mui/material/Typography";
3
4
  import React from "react";
4
5
  import { InputField } from "./InputField";
@@ -33,7 +34,7 @@ export function InputTipField(props) {
33
34
  const { labelProps = {
34
35
  title: app?.get("clickForDetails"),
35
36
  sx: { color: (theme) => theme.palette.error.main, cursor: "pointer" }
36
- }, loadData, itemLabel = (item) => item.label, renderItem = (item) => _jsx(ListItem, { children: itemLabel(item) }, item.id) } = componentProps;
37
+ }, loadData, itemLabel = (item) => DataTypes.getObjectItemLabel(item), renderItem = (item) => _jsx(ListItem, { children: itemLabel(item) }, item.id) } = componentProps;
37
38
  const { input, ...slotRests } = slotProps;
38
39
  const Component = componentMap[component];
39
40
  const load = (value) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.5.86",
3
+ "version": "1.5.87",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -42,7 +42,7 @@
42
42
  "@emotion/styled": "^11.14.1",
43
43
  "@etsoo/appscript": "^1.6.48",
44
44
  "@etsoo/notificationbase": "^1.1.66",
45
- "@etsoo/react": "^1.8.62",
45
+ "@etsoo/react": "^1.8.63",
46
46
  "@etsoo/shared": "^1.2.79",
47
47
  "@mui/icons-material": "^7.3.5",
48
48
  "@mui/material": "^7.3.5",
@@ -1,4 +1,4 @@
1
- import { DataTypes } from "@etsoo/shared";
1
+ import { DataTypes, IdType } from "@etsoo/shared";
2
2
  import Typography, { TypographyProps } from "@mui/material/Typography";
3
3
  import React from "react";
4
4
  import { InputField } from "./InputField";
@@ -11,7 +11,9 @@ import { EmailInput } from "./EmailInput";
11
11
  import { MobileInput } from "./MobileInput";
12
12
  import { PhoneInput } from "./PhoneInput";
13
13
 
14
- type ItemType = DataTypes.IdLabelItem<string | number>;
14
+ type ItemType = {
15
+ id: IdType;
16
+ };
15
17
 
16
18
  const componentMap = {
17
19
  input: InputField,
@@ -100,7 +102,7 @@ export function InputTipField<
100
102
  sx: { color: (theme) => theme.palette.error.main, cursor: "pointer" }
101
103
  },
102
104
  loadData,
103
- itemLabel = (item) => item.label,
105
+ itemLabel = (item) => DataTypes.getObjectItemLabel(item),
104
106
  renderItem = (item) => <ListItem key={item.id}>{itemLabel(item)}</ListItem>
105
107
  } = componentProps;
106
108