@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
|
@@ -29,12 +29,12 @@ const LargeTextBox = ({
|
|
|
29
29
|
defaultValue = "",
|
|
30
30
|
rules = {},
|
|
31
31
|
...rest
|
|
32
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...field
|
|
39
|
-
}
|
|
40
|
-
|
|
32
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_react_hook_form.Controller,
|
|
34
|
+
{
|
|
35
|
+
name,
|
|
36
|
+
rules,
|
|
37
|
+
defaultValue,
|
|
38
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSLargeInputText, { ...rest, ...field })
|
|
39
|
+
}
|
|
40
|
+
);
|
|
@@ -29,14 +29,20 @@ const Radio = ({
|
|
|
29
29
|
defaultChecked = false,
|
|
30
30
|
rules = {},
|
|
31
31
|
...rest
|
|
32
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
...restProps,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_react_hook_form.Controller,
|
|
34
|
+
{
|
|
35
|
+
name,
|
|
36
|
+
rules,
|
|
37
|
+
render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
+
import_ds_form.DSRadio,
|
|
39
|
+
{
|
|
40
|
+
...rest,
|
|
41
|
+
...restProps,
|
|
42
|
+
checked: value,
|
|
43
|
+
defaultChecked,
|
|
44
|
+
onChange: (e) => onChange(((e || {}).target || {}).checked)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
);
|
|
@@ -24,12 +24,11 @@ module.exports = __toCommonJS(radio_group_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_ds_form = require("@elliemae/ds-form");
|
|
26
26
|
var import_react_hook_form = require("react-hook-form");
|
|
27
|
-
const RadioGroup = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
...restProps,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
27
|
+
const RadioGroup = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
28
|
+
import_react_hook_form.Controller,
|
|
29
|
+
{
|
|
30
|
+
name,
|
|
31
|
+
rules,
|
|
32
|
+
render: ({ field: { value, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSRadioGroup, { ...rest, ...restProps, activeValue: value })
|
|
33
|
+
}
|
|
34
|
+
);
|
|
@@ -29,12 +29,12 @@ const TextBox = ({
|
|
|
29
29
|
defaultValue = "",
|
|
30
30
|
rules = {},
|
|
31
31
|
...rest
|
|
32
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...field
|
|
39
|
-
}
|
|
40
|
-
|
|
32
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_react_hook_form.Controller,
|
|
34
|
+
{
|
|
35
|
+
name,
|
|
36
|
+
defaultValue,
|
|
37
|
+
rules,
|
|
38
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSTextBox, { ...rest, ...field })
|
|
39
|
+
}
|
|
40
|
+
);
|
|
@@ -29,15 +29,21 @@ const Toggle = ({
|
|
|
29
29
|
defaultValue = false,
|
|
30
30
|
rules = {},
|
|
31
31
|
...rest
|
|
32
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...restProps,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_react_hook_form.Controller,
|
|
34
|
+
{
|
|
35
|
+
name,
|
|
36
|
+
rules,
|
|
37
|
+
defaultValue,
|
|
38
|
+
render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
+
import_ds_controlled_form.DSControlledToggle,
|
|
40
|
+
{
|
|
41
|
+
...rest,
|
|
42
|
+
...restProps,
|
|
43
|
+
checked: value,
|
|
44
|
+
value: value.toString(),
|
|
45
|
+
onChange: () => onChange(!value)
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
);
|
|
@@ -45,24 +45,12 @@ const Div = import_styled_components.default.div`
|
|
|
45
45
|
const WatchValue = ({ name, label }) => {
|
|
46
46
|
const { watch } = (0, import_react_hook_form.useFormContext)();
|
|
47
47
|
const data = watch(name, false) || "";
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
children: [
|
|
57
|
-
label,
|
|
58
|
-
" : ",
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", {
|
|
60
|
-
children: JSON.stringify(data)
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
]
|
|
66
|
-
})
|
|
67
|
-
});
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Section, { children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: "Form Data:" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Div, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
51
|
+
label,
|
|
52
|
+
" : ",
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: JSON.stringify(data) })
|
|
54
|
+
] }) })
|
|
55
|
+
] }) });
|
|
68
56
|
};
|
|
@@ -47,12 +47,5 @@ const Form = ({
|
|
|
47
47
|
const providerProps = Object.assign(methods, {
|
|
48
48
|
formProps: reactHookFormProps
|
|
49
49
|
});
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_hook_form.FormProvider, {
|
|
51
|
-
...providerProps,
|
|
52
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledForm, {
|
|
53
|
-
className: classname,
|
|
54
|
-
...formProps,
|
|
55
|
-
children
|
|
56
|
-
})
|
|
57
|
-
});
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_hook_form.FormProvider, { ...providerProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledForm, { className: classname, ...formProps, children }) });
|
|
58
51
|
};
|
|
@@ -36,11 +36,9 @@ var import_text_box = require("../fields/text-box/index.js");
|
|
|
36
36
|
var import_combo_box = require("../fields/combo-box/index.js");
|
|
37
37
|
var import_date_input = require("../fields/date-input/index.js");
|
|
38
38
|
var import_form_layout_block_item = require("../fields/form-layout-block-item/index.js");
|
|
39
|
-
const FirstName = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
required: true,
|
|
43
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text_box.TextBox, {
|
|
39
|
+
const FirstName = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "First Name", inputID: "firstname", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_text_box.TextBox,
|
|
41
|
+
{
|
|
44
42
|
id: "firstname",
|
|
45
43
|
name: "firstname",
|
|
46
44
|
rules: {
|
|
@@ -48,26 +46,22 @@ const FirstName = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_
|
|
|
48
46
|
minLength: { value: 2, message: "Minimum 2 characters" },
|
|
49
47
|
maxLength: { value: 50, message: "Maximum 50 characters" }
|
|
50
48
|
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const DOB = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
required: true,
|
|
57
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_date_input.DateInput, {
|
|
49
|
+
}
|
|
50
|
+
) });
|
|
51
|
+
const DOB = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "Date of Birth", inputID: "dob", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
+
import_date_input.DateInput,
|
|
53
|
+
{
|
|
58
54
|
id: "dob",
|
|
59
55
|
name: "dob",
|
|
60
56
|
rules: {
|
|
61
57
|
required: { value: true, message: "Date of Birth is required" },
|
|
62
58
|
validate: (value) => (0, import_moment.default)() > value || "Date of Birth can not be greater than current date"
|
|
63
59
|
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
const State = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
required: true,
|
|
70
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_combo_box.ComboBox, {
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
62
|
+
const State = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "State", inputID: "state", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
import_combo_box.ComboBox,
|
|
64
|
+
{
|
|
71
65
|
id: "state",
|
|
72
66
|
name: "state",
|
|
73
67
|
rules: { required: { value: true, message: "State is required" } },
|
|
@@ -75,13 +69,11 @@ const State = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layo
|
|
|
75
69
|
{ value: "ca", label: "California" },
|
|
76
70
|
{ value: "nj", label: "New Jersey" }
|
|
77
71
|
]
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
const MaritalStatus = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
required: true,
|
|
84
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_combo_box.ComboBox, {
|
|
72
|
+
}
|
|
73
|
+
) });
|
|
74
|
+
const MaritalStatus = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, { label: "Marital Status", inputID: "marital_status", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
+
import_combo_box.ComboBox,
|
|
76
|
+
{
|
|
85
77
|
id: "marital_status",
|
|
86
78
|
name: "marital_status",
|
|
87
79
|
rules: {
|
|
@@ -91,5 +83,5 @@ const MaritalStatus = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_f
|
|
|
91
83
|
{ value: "married", label: "Married" },
|
|
92
84
|
{ value: "single", label: "Single" }
|
|
93
85
|
]
|
|
94
|
-
}
|
|
95
|
-
});
|
|
86
|
+
}
|
|
87
|
+
) });
|
|
@@ -29,9 +29,12 @@ const FormSubmitButton = ({ ...rest }) => {
|
|
|
29
29
|
formState,
|
|
30
30
|
formProps: { mode }
|
|
31
31
|
} = (0, import_react_hook_form.useFormContext)();
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_ds_button.DSButtonV2,
|
|
34
|
+
{
|
|
35
|
+
...rest,
|
|
36
|
+
type: "submit",
|
|
37
|
+
disabled: mode !== "onSubmit" && (!formState.isDirty || formState.isDirty && !formState.isValid)
|
|
38
|
+
}
|
|
39
|
+
);
|
|
37
40
|
};
|
|
@@ -28,9 +28,5 @@ const LiveMessage = () => {
|
|
|
28
28
|
const message = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.message);
|
|
29
29
|
const id = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.id);
|
|
30
30
|
const ariaLive = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.ariaLive);
|
|
31
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_live.LiveMessage, {
|
|
32
|
-
message,
|
|
33
|
-
"aria-live": ariaLive,
|
|
34
|
-
id
|
|
35
|
-
});
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_live.LiveMessage, { message, "aria-live": ariaLive, id });
|
|
36
32
|
};
|
|
@@ -26,10 +26,5 @@ var import_react = require("react");
|
|
|
26
26
|
var import_wait_message_launcher = require("../modals/wait-message/wait-message-launcher.js");
|
|
27
27
|
const loadable = (importFunc, fallback = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wait_message_launcher.WaitMessageLauncher, {})) => {
|
|
28
28
|
const LazyComponent = (0, import_react.lazy)(importFunc);
|
|
29
|
-
return (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, {
|
|
30
|
-
fallback,
|
|
31
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LazyComponent, {
|
|
32
|
-
...props
|
|
33
|
-
})
|
|
34
|
-
});
|
|
29
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LazyComponent, { ...props }) });
|
|
35
30
|
};
|
|
@@ -42,7 +42,5 @@ const Login = ({
|
|
|
42
42
|
}).catch(() => {
|
|
43
43
|
});
|
|
44
44
|
}, [dispatch, clientId, scope, responseType]);
|
|
45
|
-
return userAuthorized ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
46
|
-
children
|
|
47
|
-
}) : null;
|
|
45
|
+
return userAuthorized ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }) : null;
|
|
48
46
|
};
|
|
@@ -38,7 +38,5 @@ const Div = import_styled_components.default.div`
|
|
|
38
38
|
`;
|
|
39
39
|
const MicroApp = (0, import_react.memo)((props) => {
|
|
40
40
|
(0, import_use_app_will_render.useAppWillRender)(props);
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Div, {
|
|
42
|
-
id: `${import_const.APP_CONTAINER_ID_PREFIX}${props.id}`
|
|
43
|
-
});
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Div, { id: `${import_const.APP_CONTAINER_ID_PREFIX}${props.id}` });
|
|
44
42
|
});
|
|
@@ -43,11 +43,14 @@ const App = (0, import_react.memo)(
|
|
|
43
43
|
onUnloadComplete,
|
|
44
44
|
...rest
|
|
45
45
|
});
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
+
import_iframe2.IFrame,
|
|
48
|
+
{
|
|
49
|
+
id,
|
|
50
|
+
src: import_iframe.default,
|
|
51
|
+
...rest,
|
|
52
|
+
onFrameReady: setDocumentEle
|
|
53
|
+
}
|
|
54
|
+
);
|
|
52
55
|
}
|
|
53
56
|
);
|
|
@@ -50,8 +50,9 @@ const IFrame = (0, import_react.memo)(
|
|
|
50
50
|
({ id, name: title, src, sandbox, onFrameReady }) => {
|
|
51
51
|
const frameRef = (0, import_react.useRef)(null);
|
|
52
52
|
const sandboxProps = sandbox ? { sandbox } : {};
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Div, {
|
|
54
|
-
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Div, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
Iframe,
|
|
55
|
+
{
|
|
55
56
|
id: `${import_const.IFRAME_CONTAINER_ID_PREFIX}${id}`,
|
|
56
57
|
ref: frameRef,
|
|
57
58
|
title,
|
|
@@ -59,7 +60,7 @@ const IFrame = (0, import_react.memo)(
|
|
|
59
60
|
scrolling: "no",
|
|
60
61
|
...sandboxProps,
|
|
61
62
|
onLoad: () => frameRef?.current?.contentDocument && onFrameReady(frameRef.current.contentDocument)
|
|
62
|
-
}
|
|
63
|
-
});
|
|
63
|
+
}
|
|
64
|
+
) });
|
|
64
65
|
}
|
|
65
66
|
);
|
|
@@ -34,13 +34,16 @@ const MicroIFrameApp = (0, import_react2.memo)(({ entityId = null, ...rest }) =>
|
|
|
34
34
|
setDisposePrevApp(true);
|
|
35
35
|
}
|
|
36
36
|
}, [entityId]);
|
|
37
|
-
return /* @__PURE__ */ (0, import_react.createElement)(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
return /* @__PURE__ */ (0, import_react.createElement)(
|
|
38
|
+
import_app.App,
|
|
39
|
+
{
|
|
40
|
+
...rest,
|
|
41
|
+
key: appKey,
|
|
42
|
+
dispose: disposePrevApp,
|
|
43
|
+
onUnloadComplete: () => {
|
|
44
|
+
setAppKey(Date.now());
|
|
45
|
+
setDisposePrevApp(false);
|
|
46
|
+
}
|
|
44
47
|
}
|
|
45
|
-
|
|
48
|
+
);
|
|
46
49
|
});
|
|
@@ -34,26 +34,9 @@ const Error2 = ({
|
|
|
34
34
|
const handleClick = (0, import_react.useCallback)(() => {
|
|
35
35
|
setOpen((prev) => !prev);
|
|
36
36
|
}, []);
|
|
37
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialog, {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
p: "s",
|
|
43
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogDefaultLayout, {
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ErrorHexegon, {
|
|
46
|
-
size: "xxl",
|
|
47
|
-
color: ["danger", "900"]
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogPrimaryMessage, {
|
|
50
|
-
children: primaryMessage
|
|
51
|
-
}),
|
|
52
|
-
secondaryMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSecondaryMessage, {
|
|
53
|
-
children: secondaryMessage
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
});
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialog, { isOpen, onClickOutside: handleClick, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogBody, { p: "s", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogDefaultLayout, { children: [
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ErrorHexegon, { size: "xxl", color: ["danger", "900"] }),
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogPrimaryMessage, { children: primaryMessage }),
|
|
40
|
+
secondaryMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSecondaryMessage, { children: secondaryMessage })
|
|
41
|
+
] }) }) });
|
|
59
42
|
};
|
|
@@ -33,43 +33,15 @@ const NavigationPrompt = (0, import_react.memo)(
|
|
|
33
33
|
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
34
34
|
const cancelDialog = () => dispatch(import_actions.navigationPrompt.cancel());
|
|
35
35
|
const confirmDialog = () => dispatch(import_actions.navigationPrompt.confirm());
|
|
36
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Close, {
|
|
47
|
-
color: ["neutral", "900"]
|
|
48
|
-
})
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogBody, {
|
|
54
|
-
px: 24,
|
|
55
|
-
mb: 16,
|
|
56
|
-
children: "You currently have unsaved changes. Are you sure you want to proceed without saving?"
|
|
57
|
-
}),
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogFooter, {
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, {
|
|
62
|
-
buttonType: "outline",
|
|
63
|
-
onClick: cancelDialog,
|
|
64
|
-
children: "Continue without saving"
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, {
|
|
67
|
-
onClick: confirmDialog,
|
|
68
|
-
children: "Save & Continue"
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
})
|
|
72
|
-
]
|
|
73
|
-
});
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, { isOpen: open, onClickOutside: cancelDialog, centered: true, children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogAddon, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, { buttonType: "icon", onClick: cancelDialog, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Close, { color: ["neutral", "900"] }) }) }) }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogBody, { px: 24, mb: 16, children: "You currently have unsaved changes. Are you sure you want to proceed without saving?" }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogFooter, { children: [
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, { buttonType: "outline", onClick: cancelDialog, children: "Continue without saving" }),
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, { onClick: confirmDialog, children: "Save & Continue" })
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
74
46
|
}
|
|
75
47
|
);
|
|
@@ -48,42 +48,17 @@ const SessionExpiry = (0, import_react.memo)(
|
|
|
48
48
|
setIsOpen(false);
|
|
49
49
|
dispatch(import_actions.logout.confirm());
|
|
50
50
|
};
|
|
51
|
-
return timeLeft ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogPrimaryMessage, {
|
|
64
|
-
children: `Your session will expire in ${timeLeft}`
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSecondaryMessage, {
|
|
67
|
-
children: "Please logout or reset your session"
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
})
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogFooter, {
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, {
|
|
76
|
-
buttonType: "outline",
|
|
77
|
-
onClick: logoutSession,
|
|
78
|
-
children: "Logout"
|
|
79
|
-
}),
|
|
80
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, {
|
|
81
|
-
onClick: resetSession,
|
|
82
|
-
children: "Reset"
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
}) : null;
|
|
51
|
+
return timeLeft ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialog, { isOpen, size: "small", children: [
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogBody, { p: "s", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogDefaultLayout, { children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningCircle, { size: "xl", color: ["warning", "900"] }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogPrimaryMessage, { children: `Your session will expire in ${timeLeft}` }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSecondaryMessage, { children: "Please logout or reset your session" })
|
|
56
|
+
] }) }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dialog.DSDialogSeparator, {}),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_dialog.DSDialogFooter, { children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, { buttonType: "outline", onClick: logoutSession, children: "Logout" }),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, { onClick: resetSession, children: "Reset" })
|
|
61
|
+
] })
|
|
62
|
+
] }) : null;
|
|
88
63
|
}
|
|
89
64
|
);
|
|
@@ -42,13 +42,16 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
42
42
|
(0, import_user_wait_event.waitEndEvent)();
|
|
43
43
|
}, [isOpen]);
|
|
44
44
|
(0, import_use_html_wait_message.useHTMLWaitMessage)(isOpen !== null);
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
import_ds_loading_indicator.DSLoadingIndicator,
|
|
47
|
+
{
|
|
48
|
+
id: "em-loading",
|
|
49
|
+
size,
|
|
50
|
+
style,
|
|
51
|
+
...rest,
|
|
52
|
+
loading: isOpen,
|
|
53
|
+
message
|
|
54
|
+
}
|
|
55
|
+
);
|
|
53
56
|
}
|
|
54
57
|
);
|
package/dist/cjs/view/page.js
CHANGED
|
@@ -44,14 +44,8 @@ const onPageView = (pageTitle) => {
|
|
|
44
44
|
};
|
|
45
45
|
const Page = ({ pageTitle = "ICE", children }) => {
|
|
46
46
|
onPageView(pageTitle);
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
children: pageTitle
|
|
52
|
-
})
|
|
53
|
-
}),
|
|
54
|
-
children
|
|
55
|
-
]
|
|
56
|
-
});
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_helmet.Helmet, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: pageTitle }) }),
|
|
49
|
+
children
|
|
50
|
+
] });
|
|
57
51
|
};
|
|
@@ -31,7 +31,5 @@ const RenderWithDelay = (0, import_react.memo)(({ render }) => {
|
|
|
31
31
|
clearTimeout(timeoutId);
|
|
32
32
|
};
|
|
33
33
|
}, []);
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
35
|
-
children: show ? render() : ""
|
|
36
|
-
});
|
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: show ? render() : "" });
|
|
37
35
|
});
|
|
@@ -49,16 +49,7 @@ const RequireAuth = ({
|
|
|
49
49
|
});
|
|
50
50
|
const userAuthorized = (0, import_auth2.isUserAuthorized)();
|
|
51
51
|
if (userAuthorized) {
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
53
|
-
children
|
|
54
|
-
});
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
55
53
|
}
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AuthManager, {
|
|
57
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_login.Login, {
|
|
58
|
-
clientId,
|
|
59
|
-
scope,
|
|
60
|
-
responseType,
|
|
61
|
-
children
|
|
62
|
-
})
|
|
63
|
-
});
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AuthManager, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_login.Login, { clientId, scope, responseType, children }) });
|
|
64
55
|
};
|
|
@@ -57,10 +57,5 @@ const SessionTimeout = () => {
|
|
|
57
57
|
(0, import_session.stopSessionMonitoring)();
|
|
58
58
|
};
|
|
59
59
|
}, [dispatch]);
|
|
60
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
61
|
-
children: showSessionExpiryWarning && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_session_expiry.SessionExpiry, {
|
|
62
|
-
open: true,
|
|
63
|
-
warningNotifiedAt
|
|
64
|
-
})
|
|
65
|
-
});
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: showSessionExpiryWarning && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_session_expiry.SessionExpiry, { open: true, warningNotifiedAt }) });
|
|
66
61
|
};
|