@elliemae/pui-app-sdk 5.7.1 → 5.8.1
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/view/error-toast/index.js +1 -1
- package/dist/cjs/view/fields/autocomplete/index.js +1 -1
- package/dist/cjs/view/fields/radio/index.js +6 -3
- package/dist/esm/view/error-toast/index.js +1 -1
- package/dist/esm/view/fields/autocomplete/index.js +1 -1
- package/dist/esm/view/fields/radio/index.js +6 -3
- package/dist/types/lib/data/store.d.ts +1 -1
- package/dist/types/lib/utils/testing/render-with-redux.d.ts +1 -1
- package/dist/types/lib/utils/testing/render-with-router-redux.d.ts +1 -1
- package/dist/types/lib/view/error-toast/index.d.ts +1 -1
- package/dist/types/lib/view/fields/input-mask/index.d.ts +1 -1
- package/dist/types/lib/view/fields/radio/index.d.ts +2 -1
- package/package.json +31 -31
|
@@ -40,7 +40,7 @@ const ErrorToast = (0, import_react.memo)((props) => {
|
|
|
40
40
|
};
|
|
41
41
|
const messageText = toastProps.description || toastProps.messageText;
|
|
42
42
|
if (messageText)
|
|
43
|
-
(0, import_ds_toast.toast)({ messageText, ...toastProps });
|
|
43
|
+
(0, import_ds_toast.toast)({ messageText, ...toastProps }, {});
|
|
44
44
|
dispatch(import_error.actions.clear());
|
|
45
45
|
}
|
|
46
46
|
}, [storeError, props, dispatch]);
|
|
@@ -29,7 +29,7 @@ const filterOptions = (allOptions, newFilter) => {
|
|
|
29
29
|
if (!newFilter)
|
|
30
30
|
return allOptions;
|
|
31
31
|
const filtered = allOptions.filter(
|
|
32
|
-
(option) => option.type === "section" || option.
|
|
32
|
+
(option) => option.type === "section" || option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
33
33
|
);
|
|
34
34
|
return filtered.length === 1 && filtered[0].type === "section" ? [] : filtered;
|
|
35
35
|
};
|
|
@@ -22,12 +22,13 @@ __export(radio_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(radio_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var
|
|
25
|
+
var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
|
|
26
26
|
var import_react_hook_form = require("react-hook-form");
|
|
27
27
|
const Radio = ({
|
|
28
28
|
name,
|
|
29
29
|
defaultChecked = false,
|
|
30
30
|
rules = {},
|
|
31
|
+
labelText,
|
|
31
32
|
...rest
|
|
32
33
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
34
|
import_react_hook_form.Controller,
|
|
@@ -36,12 +37,14 @@ const Radio = ({
|
|
|
36
37
|
rules,
|
|
37
38
|
defaultValue: defaultChecked,
|
|
38
39
|
render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
-
|
|
40
|
+
import_ds_controlled_form.DSControlledRadio,
|
|
40
41
|
{
|
|
42
|
+
label: labelText,
|
|
41
43
|
...rest,
|
|
42
44
|
...restProps,
|
|
45
|
+
value: rest.value ?? value.toString(),
|
|
43
46
|
checked: value,
|
|
44
|
-
onChange: (e) => onChange(((e || {}).target || {}).checked)
|
|
47
|
+
onChange: (e) => onChange(!((e || {}).target || {}).checked)
|
|
45
48
|
}
|
|
46
49
|
)
|
|
47
50
|
}
|
|
@@ -17,7 +17,7 @@ const ErrorToast = memo((props) => {
|
|
|
17
17
|
};
|
|
18
18
|
const messageText = toastProps.description || toastProps.messageText;
|
|
19
19
|
if (messageText)
|
|
20
|
-
toast({ messageText, ...toastProps });
|
|
20
|
+
toast({ messageText, ...toastProps }, {});
|
|
21
21
|
dispatch(error.clear());
|
|
22
22
|
}
|
|
23
23
|
}, [storeError, props, dispatch]);
|
|
@@ -6,7 +6,7 @@ const filterOptions = (allOptions, newFilter) => {
|
|
|
6
6
|
if (!newFilter)
|
|
7
7
|
return allOptions;
|
|
8
8
|
const filtered = allOptions.filter(
|
|
9
|
-
(option) => option.type === "section" || option.
|
|
9
|
+
(option) => option.type === "section" || option.label.toLowerCase().includes(newFilter?.toLowerCase())
|
|
10
10
|
);
|
|
11
11
|
return filtered.length === 1 && filtered[0].type === "section" ? [] : filtered;
|
|
12
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { DSControlledRadio } from "@elliemae/ds-controlled-form";
|
|
3
3
|
import {
|
|
4
4
|
Controller
|
|
5
5
|
} from "react-hook-form";
|
|
@@ -7,6 +7,7 @@ const Radio = ({
|
|
|
7
7
|
name,
|
|
8
8
|
defaultChecked = false,
|
|
9
9
|
rules = {},
|
|
10
|
+
labelText,
|
|
10
11
|
...rest
|
|
11
12
|
}) => /* @__PURE__ */ jsx(
|
|
12
13
|
Controller,
|
|
@@ -15,12 +16,14 @@ const Radio = ({
|
|
|
15
16
|
rules,
|
|
16
17
|
defaultValue: defaultChecked,
|
|
17
18
|
render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ jsx(
|
|
18
|
-
|
|
19
|
+
DSControlledRadio,
|
|
19
20
|
{
|
|
21
|
+
label: labelText,
|
|
20
22
|
...rest,
|
|
21
23
|
...restProps,
|
|
24
|
+
value: rest.value ?? value.toString(),
|
|
22
25
|
checked: value,
|
|
23
|
-
onChange: (e) => onChange(((e || {}).target || {}).checked)
|
|
26
|
+
onChange: (e) => onChange(!((e || {}).target || {}).checked)
|
|
24
27
|
}
|
|
25
28
|
)
|
|
26
29
|
}
|
|
@@ -39,6 +39,6 @@ export declare const createAppStore: (initialState: import("redux").CombinedStat
|
|
|
39
39
|
error: import("./error/index.js").ErrorState;
|
|
40
40
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
41
41
|
liveMessage: import("./live-message/index.js").LiveMessageState;
|
|
42
|
-
}>, import("redux").AnyAction>, ...Middleware<any, any, import("redux").Dispatch<import("redux").AnyAction>>[]]>>;
|
|
42
|
+
}>, import("redux").AnyAction>, ...(import("redux-saga").SagaMiddleware<object> | Middleware<any, any, import("redux").Dispatch<import("redux").AnyAction>>)[]]>>;
|
|
43
43
|
export type AppStore = ReturnType<typeof createAppStore>;
|
|
44
44
|
export {};
|
|
@@ -21,7 +21,7 @@ export declare const renderWithRedux: (ui: React.ReactElement, { initialState, s
|
|
|
21
21
|
error: import("../../data/error/index.js").ErrorState;
|
|
22
22
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
23
23
|
liveMessage: import("../../data/live-message/index.js").LiveMessageState;
|
|
24
|
-
}>, import("redux").AnyAction>, ...import("redux").Middleware<any, any, import("redux").Dispatch<import("redux").AnyAction>>[]]>>;
|
|
24
|
+
}>, import("redux").AnyAction>, ...(import("redux-saga").SagaMiddleware<object> | import("redux").Middleware<any, any, import("redux").Dispatch<import("redux").AnyAction>>)[]]>>;
|
|
25
25
|
container: HTMLElement;
|
|
26
26
|
baseElement: HTMLElement;
|
|
27
27
|
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
@@ -24,7 +24,7 @@ export declare const renderWithRouterRedux: (ui: React.ReactElement, { route, hi
|
|
|
24
24
|
error: import("../../data/error/index.js").ErrorState;
|
|
25
25
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
26
26
|
liveMessage: import("../../data/live-message/index.js").LiveMessageState;
|
|
27
|
-
}>, import("redux").AnyAction>, ...import("redux").Middleware<any, any, import("redux").Dispatch<import("redux").AnyAction>>[]]>>;
|
|
27
|
+
}>, import("redux").AnyAction>, ...(import("redux-saga").SagaMiddleware<object> | import("redux").Middleware<any, any, import("redux").Dispatch<import("redux").AnyAction>>)[]]>>;
|
|
28
28
|
container: HTMLElement;
|
|
29
29
|
baseElement: HTMLElement;
|
|
30
30
|
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
@@ -9,7 +9,7 @@ export type InputMaskProps<TFieldValues extends FieldValues = FieldValues, TName
|
|
|
9
9
|
mask: <T>(value: T) => T;
|
|
10
10
|
onChange?: (e: React.BaseSyntheticEvent) => void;
|
|
11
11
|
onBlur?: (e: React.BaseSyntheticEvent) => void;
|
|
12
|
-
[x: string]:
|
|
12
|
+
[x: string]: unknown;
|
|
13
13
|
};
|
|
14
14
|
export declare const InputMask: ({ name, defaultValue, rules, onChange: changeHandler, onBlur: onBlurHandler, ...rest }: InputMaskProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export { MASK_TYPES, MASK_PIPES };
|
|
@@ -4,6 +4,7 @@ export type RadioProps<TFieldValues extends FieldValues = FieldValues, TName ext
|
|
|
4
4
|
labelText: string;
|
|
5
5
|
defaultChecked?: boolean;
|
|
6
6
|
rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs'>;
|
|
7
|
+
value: string;
|
|
7
8
|
[x: string]: any;
|
|
8
9
|
};
|
|
9
|
-
export declare const Radio: ({ name, defaultChecked, rules, ...rest }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Radio: ({ name, defaultChecked, rules, labelText, ...rest }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -112,21 +112,21 @@
|
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"@elliemae/app-react-dependencies": "^4.13.0",
|
|
115
|
-
"@elliemae/ds-backdrop": "^3.
|
|
116
|
-
"@elliemae/ds-basic": "^3.
|
|
117
|
-
"@elliemae/ds-button": "^3.
|
|
118
|
-
"@elliemae/ds-circular-progress-indicator": "^3.
|
|
119
|
-
"@elliemae/ds-controlled-form": "^3.
|
|
120
|
-
"@elliemae/ds-date-picker": "^3.
|
|
121
|
-
"@elliemae/ds-date-range-picker": "^3.
|
|
122
|
-
"@elliemae/ds-dialog": "^3.
|
|
123
|
-
"@elliemae/ds-form": "^3.
|
|
124
|
-
"@elliemae/ds-form-layout-blocks": "^3.
|
|
125
|
-
"@elliemae/ds-grid": "^3.
|
|
126
|
-
"@elliemae/ds-modal": "^3.
|
|
127
|
-
"@elliemae/ds-popperjs": "^3.
|
|
128
|
-
"@elliemae/ds-toast": "^3.
|
|
129
|
-
"@elliemae/ds-utilities": "^3.
|
|
115
|
+
"@elliemae/ds-backdrop": "^3.30.0",
|
|
116
|
+
"@elliemae/ds-basic": "^3.30.0",
|
|
117
|
+
"@elliemae/ds-button": "^3.30.0",
|
|
118
|
+
"@elliemae/ds-circular-progress-indicator": "^3.30.0",
|
|
119
|
+
"@elliemae/ds-controlled-form": "^3.30.0",
|
|
120
|
+
"@elliemae/ds-date-picker": "^3.30.0",
|
|
121
|
+
"@elliemae/ds-date-range-picker": "^3.30.0",
|
|
122
|
+
"@elliemae/ds-dialog": "^3.30.0",
|
|
123
|
+
"@elliemae/ds-form": "^3.30.0",
|
|
124
|
+
"@elliemae/ds-form-layout-blocks": "^3.30.0",
|
|
125
|
+
"@elliemae/ds-grid": "^3.30.0",
|
|
126
|
+
"@elliemae/ds-modal": "^3.30.0",
|
|
127
|
+
"@elliemae/ds-popperjs": "^3.30.0",
|
|
128
|
+
"@elliemae/ds-toast": "^3.30.0",
|
|
129
|
+
"@elliemae/ds-utilities": "^3.30.0",
|
|
130
130
|
"@elliemae/em-ssf-guest": "^1.11.3",
|
|
131
131
|
"@elliemae/pui-diagnostics": "^3.4.1",
|
|
132
132
|
"@elliemae/pui-micro-frontend-base": "^1.14.0",
|
|
@@ -137,21 +137,21 @@
|
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@elliemae/app-react-dependencies": "~4.13.0",
|
|
139
139
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.8.0",
|
|
140
|
-
"@elliemae/ds-backdrop": "~3.
|
|
141
|
-
"@elliemae/ds-basic": "~3.
|
|
142
|
-
"@elliemae/ds-button": "~3.
|
|
143
|
-
"@elliemae/ds-circular-progress-indicator": "~3.
|
|
144
|
-
"@elliemae/ds-controlled-form": "~3.
|
|
145
|
-
"@elliemae/ds-date-picker": "~3.
|
|
146
|
-
"@elliemae/ds-date-range-picker": "~3.
|
|
147
|
-
"@elliemae/ds-dialog": "~3.
|
|
148
|
-
"@elliemae/ds-form": "~3.
|
|
149
|
-
"@elliemae/ds-form-layout-blocks": "~3.
|
|
150
|
-
"@elliemae/ds-grid": "~3.
|
|
151
|
-
"@elliemae/ds-modal": "~3.
|
|
152
|
-
"@elliemae/ds-popperjs": "~3.
|
|
153
|
-
"@elliemae/ds-toast": "~3.
|
|
154
|
-
"@elliemae/ds-utilities": "~3.
|
|
140
|
+
"@elliemae/ds-backdrop": "~3.30.0",
|
|
141
|
+
"@elliemae/ds-basic": "~3.30.0",
|
|
142
|
+
"@elliemae/ds-button": "~3.30.0",
|
|
143
|
+
"@elliemae/ds-circular-progress-indicator": "~3.30.0",
|
|
144
|
+
"@elliemae/ds-controlled-form": "~3.30.0",
|
|
145
|
+
"@elliemae/ds-date-picker": "~3.30.0",
|
|
146
|
+
"@elliemae/ds-date-range-picker": "~3.30.0",
|
|
147
|
+
"@elliemae/ds-dialog": "~3.30.0",
|
|
148
|
+
"@elliemae/ds-form": "~3.30.0",
|
|
149
|
+
"@elliemae/ds-form-layout-blocks": "~3.30.0",
|
|
150
|
+
"@elliemae/ds-grid": "~3.30.0",
|
|
151
|
+
"@elliemae/ds-modal": "~3.30.0",
|
|
152
|
+
"@elliemae/ds-popperjs": "~3.30.0",
|
|
153
|
+
"@elliemae/ds-toast": "~3.30.0",
|
|
154
|
+
"@elliemae/ds-utilities": "~3.30.0",
|
|
155
155
|
"@elliemae/em-ssf-guest": "~1.11.3",
|
|
156
156
|
"@elliemae/pui-cli": "~8.27.0",
|
|
157
157
|
"@elliemae/pui-diagnostics": "~3.4.1",
|