@elliemae/pui-app-sdk 5.3.5 → 5.3.7
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/cjs/utils/window.js +7 -1
- package/dist/cjs/view/fields/combo-box-v3/index.js +5 -1
- package/dist/cjs/view/fields/date-time-picker/index.js +5 -1
- package/dist/esm/utils/window.js +7 -1
- package/dist/esm/view/fields/combo-box-v3/index.js +5 -1
- package/dist/esm/view/fields/date-time-picker/index.js +5 -1
- package/package.json +1 -1
package/dist/cjs/utils/window.js
CHANGED
|
@@ -53,4 +53,10 @@ const getCurrentBreakpoint = () => {
|
|
|
53
53
|
return "medium";
|
|
54
54
|
return "large";
|
|
55
55
|
};
|
|
56
|
-
const getAssetPath = () =>
|
|
56
|
+
const getAssetPath = () => {
|
|
57
|
+
const assetPath = window?.emui?._ASSET_PATH || "latest/";
|
|
58
|
+
if (!window.emui?.version)
|
|
59
|
+
return assetPath;
|
|
60
|
+
const majorMinorVersion = window.emui?.version.match(/^(?:\d+\.\d+)*/g);
|
|
61
|
+
return majorMinorVersion && majorMinorVersion[0] ? assetPath.replace("latest/", `${majorMinorVersion[0]}/`) : assetPath;
|
|
62
|
+
};
|
|
@@ -36,11 +36,15 @@ const ComboBoxV3 = ({
|
|
|
36
36
|
name,
|
|
37
37
|
rules,
|
|
38
38
|
defaultValue,
|
|
39
|
-
render: ({
|
|
39
|
+
render: ({
|
|
40
|
+
field: { onChange, value, ...props },
|
|
41
|
+
fieldState: { error }
|
|
42
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
43
|
import_ds_controlled_form.DSComboBox,
|
|
41
44
|
{
|
|
42
45
|
...props,
|
|
43
46
|
...rest,
|
|
47
|
+
hasError: !!error,
|
|
44
48
|
filteredOptions,
|
|
45
49
|
selectedValues: value,
|
|
46
50
|
onChange
|
|
@@ -90,9 +90,13 @@ const DateTimePicker = ({
|
|
|
90
90
|
name,
|
|
91
91
|
defaultValue,
|
|
92
92
|
rules,
|
|
93
|
-
render: ({
|
|
93
|
+
render: ({
|
|
94
|
+
field: { value, onChange, ...restProps },
|
|
95
|
+
fieldState: { error }
|
|
96
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
97
|
import_ds_controlled_form.DSControlledDateTimePicker,
|
|
95
98
|
{
|
|
99
|
+
hasError: !!error,
|
|
96
100
|
...restProps,
|
|
97
101
|
type,
|
|
98
102
|
...getConfig(value, onChange)[type],
|
package/dist/esm/utils/window.js
CHANGED
|
@@ -27,7 +27,13 @@ const getCurrentBreakpoint = () => {
|
|
|
27
27
|
return "medium";
|
|
28
28
|
return "large";
|
|
29
29
|
};
|
|
30
|
-
const getAssetPath = () =>
|
|
30
|
+
const getAssetPath = () => {
|
|
31
|
+
const assetPath = window?.emui?._ASSET_PATH || "latest/";
|
|
32
|
+
if (!window.emui?.version)
|
|
33
|
+
return assetPath;
|
|
34
|
+
const majorMinorVersion = window.emui?.version.match(/^(?:\d+\.\d+)*/g);
|
|
35
|
+
return majorMinorVersion && majorMinorVersion[0] ? assetPath.replace("latest/", `${majorMinorVersion[0]}/`) : assetPath;
|
|
36
|
+
};
|
|
31
37
|
export {
|
|
32
38
|
getAssetPath,
|
|
33
39
|
getCurrentBreakpoint,
|
|
@@ -15,11 +15,15 @@ const ComboBoxV3 = ({
|
|
|
15
15
|
name,
|
|
16
16
|
rules,
|
|
17
17
|
defaultValue,
|
|
18
|
-
render: ({
|
|
18
|
+
render: ({
|
|
19
|
+
field: { onChange, value, ...props },
|
|
20
|
+
fieldState: { error }
|
|
21
|
+
}) => /* @__PURE__ */ jsx(
|
|
19
22
|
DSComboBox,
|
|
20
23
|
{
|
|
21
24
|
...props,
|
|
22
25
|
...rest,
|
|
26
|
+
hasError: !!error,
|
|
23
27
|
filteredOptions,
|
|
24
28
|
selectedValues: value,
|
|
25
29
|
onChange
|
|
@@ -65,12 +65,16 @@ const DateTimePicker = ({
|
|
|
65
65
|
name,
|
|
66
66
|
defaultValue,
|
|
67
67
|
rules,
|
|
68
|
-
render: ({
|
|
68
|
+
render: ({
|
|
69
|
+
field: { value, onChange, ...restProps },
|
|
70
|
+
fieldState: { error }
|
|
71
|
+
}) => (
|
|
69
72
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
70
73
|
// @ts-ignore
|
|
71
74
|
/* @__PURE__ */ jsx(
|
|
72
75
|
DSControlledDateTimePicker,
|
|
73
76
|
{
|
|
77
|
+
hasError: !!error,
|
|
74
78
|
...restProps,
|
|
75
79
|
type,
|
|
76
80
|
...getConfig(value, onChange)[type],
|