@etsoo/materialui 1.5.89 → 1.5.91

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.
@@ -11,6 +11,10 @@ on:
11
11
  # release:
12
12
  # types: [created]
13
13
 
14
+ permissions:
15
+ id-token: write # Required for OIDC
16
+ contents: read
17
+
14
18
  jobs:
15
19
  # Publish to NPM
16
20
  publish-npm:
@@ -44,6 +48,4 @@ jobs:
44
48
 
45
49
  # Publish to npm
46
50
  # For scoped package, make it public for free service
47
- - run: npm publish --access public
48
- env:
49
- NODE_AUTH_TOKEN: ${{ secrets.ETSOONpmToken }}
51
+ - run: npm publish
@@ -191,7 +191,7 @@ class NotificationMU extends react_2.NotificationReact {
191
191
  let value = undefined;
192
192
  if (inputs == null) {
193
193
  if (type === "switch") {
194
- localInputs = ((0, jsx_runtime_1.jsx)(Switch_1.default, { inputRef: inputRef, ...inputProps, value: "true", autoFocus: true, required: true }));
194
+ localInputs = ((0, jsx_runtime_1.jsx)(Switch_1.default, { slotProps: { input: { ref: inputRef } }, ...inputProps, value: "true", autoFocus: true, required: true }));
195
195
  }
196
196
  else if (type === "slider") {
197
197
  localInputs = (0, jsx_runtime_1.jsx)(Slider_1.default, { onChange: (_e, v) => (value = v) });
@@ -58,7 +58,7 @@ export interface ViewPageField<T extends object> extends GridProps {
58
58
  /**
59
59
  * Display as single row
60
60
  */
61
- singleRow?: ViewPageRowType;
61
+ singleRow?: ViewPageRowType | ((item: T) => ViewPageRowType);
62
62
  /**
63
63
  * Render as horizontal or not
64
64
  */
@@ -59,7 +59,7 @@ function getItemField(app, field, data) {
59
59
  // Horizontal or not
60
60
  isHorizontal = horizontal;
61
61
  // Size
62
- size = getResp(singleRow);
62
+ size = getResp(typeof singleRow === "function" ? singleRow(data) : singleRow);
63
63
  gridProps = {
64
64
  ...rest,
65
65
  size
@@ -185,7 +185,7 @@ export class NotificationMU extends NotificationReact {
185
185
  let value = undefined;
186
186
  if (inputs == null) {
187
187
  if (type === "switch") {
188
- localInputs = (_jsx(Switch, { inputRef: inputRef, ...inputProps, value: "true", autoFocus: true, required: true }));
188
+ localInputs = (_jsx(Switch, { slotProps: { input: { ref: inputRef } }, ...inputProps, value: "true", autoFocus: true, required: true }));
189
189
  }
190
190
  else if (type === "slider") {
191
191
  localInputs = _jsx(Slider, { onChange: (_e, v) => (value = v) });
@@ -58,7 +58,7 @@ export interface ViewPageField<T extends object> extends GridProps {
58
58
  /**
59
59
  * Display as single row
60
60
  */
61
- singleRow?: ViewPageRowType;
61
+ singleRow?: ViewPageRowType | ((item: T) => ViewPageRowType);
62
62
  /**
63
63
  * Render as horizontal or not
64
64
  */
@@ -51,7 +51,7 @@ function getItemField(app, field, data) {
51
51
  // Horizontal or not
52
52
  isHorizontal = horizontal;
53
53
  // Size
54
- size = getResp(singleRow);
54
+ size = getResp(typeof singleRow === "function" ? singleRow(data) : singleRow);
55
55
  gridProps = {
56
56
  ...rest,
57
57
  size
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.5.89",
3
+ "version": "1.5.91",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -40,23 +40,23 @@
40
40
  "@dnd-kit/sortable": "^10.0.0",
41
41
  "@emotion/react": "^11.14.0",
42
42
  "@emotion/styled": "^11.14.1",
43
- "@etsoo/appscript": "^1.6.48",
43
+ "@etsoo/appscript": "^1.6.49",
44
44
  "@etsoo/notificationbase": "^1.1.66",
45
- "@etsoo/react": "^1.8.63",
45
+ "@etsoo/react": "^1.8.65",
46
46
  "@etsoo/shared": "^1.2.80",
47
- "@mui/icons-material": "^7.3.5",
48
- "@mui/material": "^7.3.5",
49
- "@mui/x-data-grid": "^8.19.0",
47
+ "@mui/icons-material": "^7.3.6",
48
+ "@mui/material": "^7.3.6",
49
+ "@mui/x-data-grid": "^8.22.1",
50
50
  "chart.js": "^4.5.1",
51
51
  "chartjs-plugin-datalabels": "^2.2.0",
52
- "dompurify": "^3.3.0",
52
+ "dompurify": "^3.3.1",
53
53
  "eventemitter3": "^5.0.1",
54
54
  "pica": "^9.0.1",
55
55
  "pulltorefreshjs": "^0.1.22",
56
- "react": "^19.2.0",
56
+ "react": "^19.2.3",
57
57
  "react-avatar-editor": "^13.0.2",
58
58
  "react-chartjs-2": "^5.3.1",
59
- "react-dom": "^19.2.0",
59
+ "react-dom": "^19.2.3",
60
60
  "react-draggable": "^4.5.0",
61
61
  "react-imask": "7.6.1"
62
62
  },
@@ -73,16 +73,16 @@
73
73
  "@babel/preset-react": "^7.28.5",
74
74
  "@babel/preset-typescript": "^7.28.5",
75
75
  "@babel/runtime-corejs3": "^7.28.4",
76
- "@testing-library/react": "^16.3.0",
76
+ "@testing-library/react": "^16.3.1",
77
77
  "@types/pica": "^9.0.5",
78
78
  "@types/pulltorefreshjs": "^0.1.7",
79
79
  "@types/react": "^19.2.7",
80
80
  "@types/react-avatar-editor": "^13.0.4",
81
81
  "@types/react-dom": "^19.2.3",
82
82
  "@types/react-input-mask": "^3.0.6",
83
- "@vitejs/plugin-react": "^5.1.1",
84
- "jsdom": "^27.2.0",
83
+ "@vitejs/plugin-react": "^5.1.2",
84
+ "jsdom": "^27.3.0",
85
85
  "typescript": "^5.9.3",
86
- "vitest": "^4.0.14"
86
+ "vitest": "^4.0.16"
87
87
  }
88
88
  }
@@ -404,7 +404,7 @@ export class NotificationMU extends NotificationReact {
404
404
  if (type === "switch") {
405
405
  localInputs = (
406
406
  <Switch
407
- inputRef={inputRef}
407
+ slotProps={{ input: { ref: inputRef } }}
408
408
  {...inputProps}
409
409
  value="true"
410
410
  autoFocus
@@ -74,7 +74,9 @@ function getItemField<T extends object>(
74
74
  isHorizontal = horizontal;
75
75
 
76
76
  // Size
77
- size = getResp(singleRow);
77
+ size = getResp(
78
+ typeof singleRow === "function" ? singleRow(data) : singleRow
79
+ );
78
80
 
79
81
  gridProps = {
80
82
  ...rest,
@@ -252,7 +254,7 @@ export interface ViewPageField<T extends object> extends GridProps {
252
254
  /**
253
255
  * Display as single row
254
256
  */
255
- singleRow?: ViewPageRowType;
257
+ singleRow?: ViewPageRowType | ((item: T) => ViewPageRowType);
256
258
 
257
259
  /**
258
260
  * Render as horizontal or not