@elliemae/pui-app-sdk 4.6.0 → 4.7.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/utils/storybook/cjs/vite.js +2 -1
- package/dist/cjs/utils/storybook/cjs/webpack.js +2 -1
- package/dist/cjs/utils/storybook/preview.js +1 -1
- package/dist/cjs/utils/testing/index.js +1 -6
- package/dist/cjs/utils/testing/render-with-redux.js +1 -4
- package/dist/cjs/utils/testing/render-with-router-redux.js +1 -7
- package/dist/cjs/utils/testing/render-with-router.js +1 -4
- package/dist/cjs/utils/testing/render-with-state-addons.js +1 -6
- package/dist/cjs/view/app-root/hosted-app.js +6 -8
- package/dist/cjs/view/app-root/index.js +9 -25
- package/dist/cjs/view/app-root/stand-alone-app.js +8 -12
- package/dist/cjs/view/app-router.js +10 -7
- package/dist/cjs/view/error-boundary/default-error-template.js +4 -10
- package/dist/cjs/view/error-boundary/index.js +1 -4
- package/dist/cjs/view/error-toast/index.js +1 -3
- package/dist/cjs/view/fields/autocomplete/index.js +17 -11
- package/dist/cjs/view/fields/check-box/index.js +15 -9
- package/dist/cjs/view/fields/combo-box/index.js +19 -13
- package/dist/cjs/view/fields/combo-box-v3/index.js +17 -11
- package/dist/cjs/view/fields/date-input/index.js +9 -9
- package/dist/cjs/view/fields/date-picker/index.js +9 -9
- package/dist/cjs/view/fields/date-range-picker/index.js +20 -17
- package/dist/cjs/view/fields/date-time-picker/index.js +17 -11
- package/dist/cjs/view/fields/form-item-layout/index.js +12 -11
- package/dist/cjs/view/fields/form-layout-block-item/index.js +12 -11
- package/dist/cjs/view/fields/input-mask/index.js +25 -19
- package/dist/cjs/view/fields/input-text/index.js +9 -9
- package/dist/cjs/view/fields/large-text-box/index.js +9 -9
- package/dist/cjs/view/fields/radio/index.js +17 -11
- package/dist/cjs/view/fields/radio-group/index.js +8 -9
- package/dist/cjs/view/fields/text-box/index.js +9 -9
- package/dist/cjs/view/fields/toggle/index.js +18 -12
- package/dist/cjs/view/fields/watch-value.js +8 -20
- package/dist/cjs/view/form/index.js +1 -8
- package/dist/cjs/view/form/personal-info-section.js +20 -28
- package/dist/cjs/view/form/submit-button/index.js +8 -5
- package/dist/cjs/view/live-message/index.js +1 -5
- package/dist/cjs/view/loadable/index.js +1 -6
- package/dist/cjs/view/login/index.js +1 -3
- package/dist/cjs/view/micro-app/index.js +1 -3
- package/dist/cjs/view/micro-iframe-app/app.js +9 -6
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +5 -4
- package/dist/cjs/view/micro-iframe-app/index.js +11 -8
- package/dist/cjs/view/modals/error/index.js +5 -22
- package/dist/cjs/view/modals/navigation-prompt/index.js +10 -38
- package/dist/cjs/view/modals/session-expiry/index.js +12 -37
- package/dist/cjs/view/modals/wait-message/index.js +11 -8
- package/dist/cjs/view/page.js +4 -10
- package/dist/cjs/view/render-with-delay/index.js +1 -3
- package/dist/cjs/view/require-auth.js +2 -11
- package/dist/cjs/view/session-timeout/index.js +1 -6
- package/dist/cjs/view/storybook/decorator.js +1 -6
- package/dist/cjs/view/visually-hidden/index.js +1 -4
- package/dist/esm/utils/storybook/preview.js +1 -1
- package/dist/esm/utils/testing/index.js +1 -6
- package/dist/esm/utils/testing/render-with-redux.js +1 -4
- package/dist/esm/utils/testing/render-with-router-redux.js +1 -7
- package/dist/esm/utils/testing/render-with-router.js +1 -4
- package/dist/esm/utils/testing/render-with-state-addons.js +1 -6
- package/dist/esm/view/app-root/hosted-app.js +6 -8
- package/dist/esm/view/app-root/index.js +9 -25
- package/dist/esm/view/app-root/stand-alone-app.js +8 -12
- package/dist/esm/view/app-router.js +10 -7
- package/dist/esm/view/error-boundary/default-error-template.js +4 -10
- package/dist/esm/view/error-boundary/index.js +1 -4
- package/dist/esm/view/error-toast/index.js +1 -3
- package/dist/esm/view/fields/autocomplete/index.js +17 -11
- package/dist/esm/view/fields/check-box/index.js +15 -9
- package/dist/esm/view/fields/combo-box/index.js +19 -13
- package/dist/esm/view/fields/combo-box-v3/index.js +17 -11
- package/dist/esm/view/fields/date-input/index.js +9 -9
- package/dist/esm/view/fields/date-picker/index.js +9 -9
- package/dist/esm/view/fields/date-range-picker/index.js +20 -17
- package/dist/esm/view/fields/date-time-picker/index.js +17 -11
- package/dist/esm/view/fields/form-item-layout/index.js +12 -11
- package/dist/esm/view/fields/form-layout-block-item/index.js +12 -11
- package/dist/esm/view/fields/input-mask/index.js +25 -19
- package/dist/esm/view/fields/input-text/index.js +9 -9
- package/dist/esm/view/fields/large-text-box/index.js +9 -9
- package/dist/esm/view/fields/radio/index.js +17 -11
- package/dist/esm/view/fields/radio-group/index.js +8 -9
- package/dist/esm/view/fields/text-box/index.js +9 -9
- package/dist/esm/view/fields/toggle/index.js +18 -12
- package/dist/esm/view/fields/watch-value.js +8 -20
- package/dist/esm/view/form/index.js +1 -8
- package/dist/esm/view/form/personal-info-section.js +20 -28
- package/dist/esm/view/form/submit-button/index.js +8 -5
- package/dist/esm/view/live-message/index.js +1 -5
- package/dist/esm/view/loadable/index.js +1 -6
- package/dist/esm/view/login/index.js +1 -3
- package/dist/esm/view/micro-app/index.js +1 -3
- package/dist/esm/view/micro-iframe-app/app.js +9 -6
- package/dist/esm/view/micro-iframe-app/iframe/index.js +5 -4
- package/dist/esm/view/micro-iframe-app/index.js +11 -8
- package/dist/esm/view/modals/error/index.js +5 -22
- package/dist/esm/view/modals/navigation-prompt/index.js +10 -38
- package/dist/esm/view/modals/session-expiry/index.js +12 -37
- package/dist/esm/view/modals/wait-message/index.js +11 -8
- package/dist/esm/view/page.js +4 -10
- package/dist/esm/view/render-with-delay/index.js +1 -3
- package/dist/esm/view/require-auth.js +2 -11
- package/dist/esm/view/session-timeout/index.js +1 -6
- package/dist/esm/view/storybook/decorator.js +1 -6
- package/dist/esm/view/visually-hidden/index.js +1 -4
- package/dist/types/lib/utils/storybook/cjs/main.d.ts +2 -0
- package/dist/types/lib/utils/storybook/cjs/vite.d.ts +1 -0
- package/dist/types/lib/utils/storybook/cjs/webpack.d.ts +1 -0
- package/package.json +33 -33
|
@@ -24,9 +24,4 @@ module.exports = __toCommonJS(decorator_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_history = require("../../utils/history.js");
|
|
26
26
|
var import_app_root = require("../app-root/index.js");
|
|
27
|
-
const withAppDecorator = (theme, store, story) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_app_root.AppRoot, {
|
|
28
|
-
store,
|
|
29
|
-
history: import_history.browserHistory,
|
|
30
|
-
theme,
|
|
31
|
-
children: story()
|
|
32
|
-
});
|
|
27
|
+
const withAppDecorator = (theme, store, story) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_app_root.AppRoot, { store, history: import_history.browserHistory, theme, children: story() });
|
|
@@ -43,8 +43,5 @@ const Span = import_styled_components.default.span`
|
|
|
43
43
|
word-wrap: normal;
|
|
44
44
|
`;
|
|
45
45
|
const VisuallyHidden = (0, import_react.forwardRef)(
|
|
46
|
-
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Span, {
|
|
47
|
-
ref,
|
|
48
|
-
...props
|
|
49
|
-
})
|
|
46
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Span, { ref, ...props })
|
|
50
47
|
);
|
|
@@ -10,12 +10,7 @@ const AllTheProviders = ({
|
|
|
10
10
|
store = defaultStore,
|
|
11
11
|
theme = defaultTheme,
|
|
12
12
|
children
|
|
13
|
-
}) => /* @__PURE__ */ jsx(AppRoot, {
|
|
14
|
-
store,
|
|
15
|
-
history: browserHistory,
|
|
16
|
-
theme,
|
|
17
|
-
children
|
|
18
|
-
});
|
|
13
|
+
}) => /* @__PURE__ */ jsx(AppRoot, { store, history: browserHistory, theme, children });
|
|
19
14
|
const customRender = (ui, options) => render(ui, { wrapper: AllTheProviders, ...options });
|
|
20
15
|
export * from "@testing-library/react";
|
|
21
16
|
export {
|
|
@@ -7,10 +7,7 @@ const renderWithRedux = (ui, {
|
|
|
7
7
|
initialState,
|
|
8
8
|
store = createAppStore(initialState, browserHistory)
|
|
9
9
|
} = {}) => ({
|
|
10
|
-
...render(/* @__PURE__ */ jsx(Provider, {
|
|
11
|
-
store,
|
|
12
|
-
children: ui
|
|
13
|
-
})),
|
|
10
|
+
...render(/* @__PURE__ */ jsx(Provider, { store, children: ui })),
|
|
14
11
|
store
|
|
15
12
|
});
|
|
16
13
|
export {
|
|
@@ -12,13 +12,7 @@ const renderWithRouterRedux = (ui, {
|
|
|
12
12
|
store = createAppStore(initialState, browserHistory)
|
|
13
13
|
} = {}) => ({
|
|
14
14
|
...render(
|
|
15
|
-
/* @__PURE__ */ jsx(Provider, {
|
|
16
|
-
store,
|
|
17
|
-
children: /* @__PURE__ */ jsx(AppRouter, {
|
|
18
|
-
history,
|
|
19
|
-
children: ui
|
|
20
|
-
})
|
|
21
|
-
})
|
|
15
|
+
/* @__PURE__ */ jsx(Provider, { store, children: /* @__PURE__ */ jsx(AppRouter, { history, children: ui }) })
|
|
22
16
|
),
|
|
23
17
|
store
|
|
24
18
|
});
|
|
@@ -6,10 +6,7 @@ const renderWithRouter = (ui, {
|
|
|
6
6
|
route = "/",
|
|
7
7
|
history = createMemoryHistory({ initialEntries: [route] })
|
|
8
8
|
} = {}) => {
|
|
9
|
-
const renderResult = render(/* @__PURE__ */ jsx(AppRouter, {
|
|
10
|
-
history,
|
|
11
|
-
children: ui
|
|
12
|
-
}));
|
|
9
|
+
const renderResult = render(/* @__PURE__ */ jsx(AppRouter, { history, children: ui }));
|
|
13
10
|
return {
|
|
14
11
|
...renderResult,
|
|
15
12
|
history
|
|
@@ -27,12 +27,7 @@ const RenderWithStateAddOns = ({
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
setReady(true);
|
|
29
29
|
}, []);
|
|
30
|
-
return ready ? /* @__PURE__ */ jsx(ThemeProvider, {
|
|
31
|
-
theme,
|
|
32
|
-
children: /* @__PURE__ */ jsx(Component, {
|
|
33
|
-
...rest
|
|
34
|
-
})
|
|
35
|
-
}) : null;
|
|
30
|
+
return ready ? /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsx(Component, { ...rest }) }) : null;
|
|
36
31
|
};
|
|
37
32
|
export {
|
|
38
33
|
RenderWithStateAddOns
|
|
@@ -13,14 +13,12 @@ const HostedApp = ({ WaitMessage, children }) => {
|
|
|
13
13
|
useBreakpoint();
|
|
14
14
|
useHTMLWaitMessage(true);
|
|
15
15
|
useWindowSizeChange();
|
|
16
|
-
return /* @__PURE__ */ jsxs(Div, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
]
|
|
23
|
-
});
|
|
16
|
+
return /* @__PURE__ */ jsxs(Div, { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(GlobalStyle, {}),
|
|
18
|
+
WaitMessage || /* @__PURE__ */ jsx(DefaultWaitMessage, {}),
|
|
19
|
+
/* @__PURE__ */ jsx(ErrorToast, {}),
|
|
20
|
+
children
|
|
21
|
+
] });
|
|
24
22
|
};
|
|
25
23
|
export {
|
|
26
24
|
HostedApp
|
|
@@ -10,11 +10,7 @@ import { StandAloneApp } from "./stand-alone-app.js";
|
|
|
10
10
|
import { HostedApp } from "./hosted-app.js";
|
|
11
11
|
const AppToRender = (props) => {
|
|
12
12
|
const isParent = isStandAloneGuest() || isHost();
|
|
13
|
-
return isParent ? /* @__PURE__ */ jsx(StandAloneApp, {
|
|
14
|
-
...props
|
|
15
|
-
}) : /* @__PURE__ */ jsx(HostedApp, {
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
13
|
+
return isParent ? /* @__PURE__ */ jsx(StandAloneApp, { ...props }) : /* @__PURE__ */ jsx(HostedApp, { ...props });
|
|
18
14
|
};
|
|
19
15
|
const AppRoot = ({
|
|
20
16
|
store,
|
|
@@ -25,26 +21,14 @@ const AppRoot = ({
|
|
|
25
21
|
WaitMessage,
|
|
26
22
|
errorTemplate,
|
|
27
23
|
children
|
|
28
|
-
}) => /* @__PURE__ */ jsx(StrictMode, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: /* @__PURE__ */ jsx(ThemeProvider, {
|
|
37
|
-
theme,
|
|
38
|
-
children: /* @__PURE__ */ jsx(AppToRender, {
|
|
39
|
-
manageSession,
|
|
40
|
-
WaitMessage,
|
|
41
|
-
children
|
|
42
|
-
})
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
});
|
|
24
|
+
}) => /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsx(ErrorBoundary, { errorTemplate, children: /* @__PURE__ */ jsx(Provider, { store, children: /* @__PURE__ */ jsx(AppRouter, { history, basename, children: /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsx(
|
|
25
|
+
AppToRender,
|
|
26
|
+
{
|
|
27
|
+
manageSession,
|
|
28
|
+
WaitMessage,
|
|
29
|
+
children
|
|
30
|
+
}
|
|
31
|
+
) }) }) }) }) });
|
|
48
32
|
export {
|
|
49
33
|
AppRoot
|
|
50
34
|
};
|
|
@@ -18,18 +18,14 @@ const StandAloneApp = ({
|
|
|
18
18
|
}) => {
|
|
19
19
|
useBreakpoint();
|
|
20
20
|
useWindowSizeChange();
|
|
21
|
-
return /* @__PURE__ */ jsx(LiveAnnouncer, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
children
|
|
30
|
-
]
|
|
31
|
-
})
|
|
32
|
-
});
|
|
21
|
+
return /* @__PURE__ */ jsx(LiveAnnouncer, { children: /* @__PURE__ */ jsxs(Div, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx(GlobalStyle, {}),
|
|
23
|
+
manageSession && /* @__PURE__ */ jsx(SessionTimeout, {}),
|
|
24
|
+
/* @__PURE__ */ jsx(LiveMessage, {}),
|
|
25
|
+
WaitMessage || /* @__PURE__ */ jsx(DefaultWaitMessage, {}),
|
|
26
|
+
/* @__PURE__ */ jsx(ErrorToast, {}),
|
|
27
|
+
children
|
|
28
|
+
] }) });
|
|
33
29
|
};
|
|
34
30
|
export {
|
|
35
31
|
StandAloneApp
|
|
@@ -21,13 +21,16 @@ const AppRouter = ({ history, basename, ...props }) => {
|
|
|
21
21
|
unlisten();
|
|
22
22
|
};
|
|
23
23
|
}, [history]);
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Router,
|
|
26
|
+
{
|
|
27
|
+
...props,
|
|
28
|
+
basename,
|
|
29
|
+
location: state.location,
|
|
30
|
+
navigationType: state.action,
|
|
31
|
+
navigator: history
|
|
32
|
+
}
|
|
33
|
+
);
|
|
31
34
|
};
|
|
32
35
|
export {
|
|
33
36
|
AppRouter
|
|
@@ -2,16 +2,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
const DefaultErrorTemplate = ({
|
|
3
3
|
error = new Error("We are unable to process your request"),
|
|
4
4
|
errorInfo = { componentStack: "Please close your browser and login again" }
|
|
5
|
-
}) => /* @__PURE__ */ jsxs("div", {
|
|
6
|
-
children:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}),
|
|
10
|
-
/* @__PURE__ */ jsx("section", {
|
|
11
|
-
children: errorInfo?.componentStack
|
|
12
|
-
})
|
|
13
|
-
]
|
|
14
|
-
});
|
|
5
|
+
}) => /* @__PURE__ */ jsxs("div", { children: [
|
|
6
|
+
/* @__PURE__ */ jsx("h2", { children: error?.message }),
|
|
7
|
+
/* @__PURE__ */ jsx("section", { children: errorInfo?.componentStack })
|
|
8
|
+
] });
|
|
15
9
|
export {
|
|
16
10
|
DefaultErrorTemplate
|
|
17
11
|
};
|
|
@@ -26,10 +26,7 @@ class ErrorBoundary extends React.Component {
|
|
|
26
26
|
const { children, errorTemplate } = this.props;
|
|
27
27
|
const ErrorTemplate = errorTemplate || DefaultErrorTemplate;
|
|
28
28
|
const { error, errorInfo } = this.state;
|
|
29
|
-
return errorInfo ? /* @__PURE__ */ jsx(ErrorTemplate, {
|
|
30
|
-
error,
|
|
31
|
-
errorInfo
|
|
32
|
-
}) : children;
|
|
29
|
+
return errorInfo ? /* @__PURE__ */ jsx(ErrorTemplate, { error, errorInfo }) : children;
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
export {
|
|
@@ -11,17 +11,23 @@ const Autocomplete = ({
|
|
|
11
11
|
name,
|
|
12
12
|
children,
|
|
13
13
|
...rest
|
|
14
|
-
}) => /* @__PURE__ */ jsx(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
}) => /* @__PURE__ */ jsx(
|
|
15
|
+
Controller,
|
|
16
|
+
{
|
|
17
|
+
name,
|
|
18
|
+
render: ({ field: { onChange, value, ...props } }) => /* @__PURE__ */ jsx(
|
|
19
|
+
DSAutocomplete,
|
|
20
|
+
{
|
|
21
|
+
...props,
|
|
22
|
+
filter: value ?? "",
|
|
23
|
+
onSelect: onChange,
|
|
24
|
+
...rest,
|
|
25
|
+
options: filterOptions(rest.options, value),
|
|
26
|
+
children
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
);
|
|
25
31
|
export {
|
|
26
32
|
Autocomplete
|
|
27
33
|
};
|
|
@@ -3,15 +3,21 @@ import { DSControlledCheckbox } from "@elliemae/ds-controlled-form";
|
|
|
3
3
|
import {
|
|
4
4
|
Controller
|
|
5
5
|
} from "react-hook-form";
|
|
6
|
-
const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ jsx(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...restProps
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ jsx(
|
|
7
|
+
Controller,
|
|
8
|
+
{
|
|
9
|
+
name,
|
|
10
|
+
rules,
|
|
11
|
+
render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ jsx(
|
|
12
|
+
DSControlledCheckbox,
|
|
13
|
+
{
|
|
14
|
+
...rest,
|
|
15
|
+
...restProps,
|
|
16
|
+
checked: value
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
15
21
|
export {
|
|
16
22
|
CheckBox
|
|
17
23
|
};
|
|
@@ -8,19 +8,25 @@ const ComboBox = ({
|
|
|
8
8
|
defaultValue = "",
|
|
9
9
|
rules = {},
|
|
10
10
|
...rest
|
|
11
|
-
}) => /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...props
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
11
|
+
}) => /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
name,
|
|
15
|
+
rules,
|
|
16
|
+
defaultValue,
|
|
17
|
+
render: ({ field: { onChange, ...props } }) => /* @__PURE__ */ jsx(
|
|
18
|
+
DSComboBox,
|
|
19
|
+
{
|
|
20
|
+
...rest,
|
|
21
|
+
...props,
|
|
22
|
+
onChange: (selected) => {
|
|
23
|
+
const { value = selected } = selected || {};
|
|
24
|
+
onChange(value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
);
|
|
24
30
|
export {
|
|
25
31
|
ComboBox
|
|
26
32
|
};
|
|
@@ -8,17 +8,23 @@ const ComboBoxV3 = ({
|
|
|
8
8
|
defaultValue = null,
|
|
9
9
|
rules = {},
|
|
10
10
|
...rest
|
|
11
|
-
}) => /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
}) => /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
name,
|
|
15
|
+
rules,
|
|
16
|
+
defaultValue,
|
|
17
|
+
render: ({ field: { onChange, value, ...props } }) => /* @__PURE__ */ jsx(
|
|
18
|
+
DSComboBox,
|
|
19
|
+
{
|
|
20
|
+
...props,
|
|
21
|
+
selectedValues: value,
|
|
22
|
+
onChange,
|
|
23
|
+
...rest
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
22
28
|
export {
|
|
23
29
|
ComboBoxV3
|
|
24
30
|
};
|
|
@@ -8,15 +8,15 @@ const DateInput = ({
|
|
|
8
8
|
defaultValue = "",
|
|
9
9
|
rules = {},
|
|
10
10
|
...rest
|
|
11
|
-
}) => /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...field
|
|
18
|
-
}
|
|
19
|
-
|
|
11
|
+
}) => /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
name,
|
|
15
|
+
rules,
|
|
16
|
+
defaultValue,
|
|
17
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSDateInput, { ...rest, ...field })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
20
|
export {
|
|
21
21
|
DateInput
|
|
22
22
|
};
|
|
@@ -8,15 +8,15 @@ const DatePicker = ({
|
|
|
8
8
|
defaultValue = "",
|
|
9
9
|
rules = {},
|
|
10
10
|
...rest
|
|
11
|
-
}) => /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...field
|
|
18
|
-
}
|
|
19
|
-
|
|
11
|
+
}) => /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
name,
|
|
15
|
+
defaultValue,
|
|
16
|
+
rules,
|
|
17
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSDatePicker, { ...rest, ...field })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
20
|
export {
|
|
21
21
|
DatePicker
|
|
22
22
|
};
|
|
@@ -17,29 +17,32 @@ const WrappedDateRangePicker = ({
|
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
onChange([fromDateString, toDateString]);
|
|
19
19
|
}, [fromDateString, toDateString]);
|
|
20
|
-
return /* @__PURE__ */ jsx(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
DSControlledDateRangePicker,
|
|
22
|
+
{
|
|
23
|
+
...restProps,
|
|
24
|
+
fromDate: fromDateString,
|
|
25
|
+
onFromDateChange: setFromDateString,
|
|
26
|
+
toDate: toDateString,
|
|
27
|
+
onToDateChange: setToDateString,
|
|
28
|
+
...rest
|
|
29
|
+
}
|
|
30
|
+
);
|
|
28
31
|
};
|
|
29
32
|
const DateRangePicker = ({
|
|
30
33
|
name,
|
|
31
34
|
defaultValue = ["", ""],
|
|
32
35
|
rules = {},
|
|
33
36
|
...rest
|
|
34
|
-
}) => /* @__PURE__ */ jsx(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
...rest
|
|
41
|
-
}
|
|
42
|
-
|
|
37
|
+
}) => /* @__PURE__ */ jsx(
|
|
38
|
+
Controller,
|
|
39
|
+
{
|
|
40
|
+
name,
|
|
41
|
+
defaultValue,
|
|
42
|
+
rules,
|
|
43
|
+
render: ({ field }) => /* @__PURE__ */ jsx(WrappedDateRangePicker, { field, ...rest })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
43
46
|
export {
|
|
44
47
|
DateRangePicker
|
|
45
48
|
};
|
|
@@ -8,17 +8,23 @@ const DateTimePicker = ({
|
|
|
8
8
|
defaultValue = "",
|
|
9
9
|
rules = {},
|
|
10
10
|
...rest
|
|
11
|
-
}) => /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
}) => /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
name,
|
|
15
|
+
defaultValue,
|
|
16
|
+
rules,
|
|
17
|
+
render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */ jsx(
|
|
18
|
+
DSControlledDateTimePicker,
|
|
19
|
+
{
|
|
20
|
+
...restProps,
|
|
21
|
+
dateTime: value,
|
|
22
|
+
onDateTimeChange: onChange,
|
|
23
|
+
...rest
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
22
28
|
export {
|
|
23
29
|
DateTimePicker
|
|
24
30
|
};
|
|
@@ -2,21 +2,22 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { DSFormItemLayout } from "@elliemae/ds-form";
|
|
3
3
|
import { get } from "react-hook-form";
|
|
4
4
|
import { ConnectForm } from "../connect-form.js";
|
|
5
|
-
const FormItemLayout = ({ name, ...rest }) => /* @__PURE__ */ jsx(ConnectForm, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
const FormItemLayout = ({ name, ...rest }) => /* @__PURE__ */ jsx(ConnectForm, { children: ({
|
|
6
|
+
formState: { errors }
|
|
7
|
+
}) => {
|
|
8
|
+
const errorField = get(errors, name);
|
|
9
|
+
const hasError = !!errorField;
|
|
10
|
+
const validationMessage = errorField?.message;
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
DSFormItemLayout,
|
|
13
|
+
{
|
|
13
14
|
name,
|
|
14
15
|
hasError,
|
|
15
16
|
validationMessage,
|
|
16
17
|
...rest
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
});
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
} });
|
|
20
21
|
export {
|
|
21
22
|
FormItemLayout
|
|
22
23
|
};
|
|
@@ -6,22 +6,23 @@ const FormLayoutBlockItem = ({
|
|
|
6
6
|
inputID,
|
|
7
7
|
label,
|
|
8
8
|
...rest
|
|
9
|
-
}) => /* @__PURE__ */ jsx(ConnectForm, {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
}) => /* @__PURE__ */ jsx(ConnectForm, { children: ({
|
|
10
|
+
formState: { errors }
|
|
11
|
+
}) => {
|
|
12
|
+
const errorField = get(errors, inputID);
|
|
13
|
+
const hasError = !!errorField;
|
|
14
|
+
const validationMessage = errorField?.message;
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
DSFormLayoutBlockItem,
|
|
17
|
+
{
|
|
17
18
|
inputID,
|
|
18
19
|
label,
|
|
19
20
|
hasError,
|
|
20
21
|
validationMessage,
|
|
21
22
|
...rest
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
});
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
} });
|
|
25
26
|
export {
|
|
26
27
|
FormLayoutBlockItem
|
|
27
28
|
};
|