@beda.software/web-item-controls 0.1.14 → 0.1.16-0
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/components/BaseQuestionnaireResponseForm/FormFooter.d.ts.map +1 -1
- package/dist/components/BaseQuestionnaireResponseForm/FormFooter.js +26 -19
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/locale/de/messages.po +3 -3
- package/src/locale/en/messages.po +3 -3
- package/src/locale/es/messages.po +3 -3
- package/src/locale/ru/messages.po +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFooter.d.ts","sourceRoot":"","sources":["../../../src/components/BaseQuestionnaireResponseForm/FormFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,aAAa,EAA2B,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAElG,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"FormFooter.d.ts","sourceRoot":"","sources":["../../../src/components/BaseQuestionnaireResponseForm/FormFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,aAAa,EAA2B,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAElG,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAM9D,MAAM,WAAW,wBAAwB;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,KAAK,OAAO,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,CAAC;CACpH;AAED,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,kCAAkC,EAAE,UAAU,CAAC;IAC/E,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;IAClE,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,KAAK,OAAO,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,CAAC;CACpH;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,kDA8EtC"}
|
|
@@ -1,45 +1,52 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
1
|
+
import { jsx as o, Fragment as k, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import { Trans as p } from "@lingui/react";
|
|
3
3
|
import { i18n as S } from "@lingui/core";
|
|
4
|
-
import { Button as
|
|
4
|
+
import { Button as n } from "antd";
|
|
5
5
|
import { useContext as j, useCallback as A } from "react";
|
|
6
6
|
import { useFormContext as I } from "react-hook-form";
|
|
7
7
|
import { calcInitialContext as V } from "sdc-qrf";
|
|
8
8
|
import { BaseQuestionnaireResponseFormPropsContext as q } from "@beda.software/fhir-questionnaire/contexts";
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import "lodash";
|
|
10
|
+
import "@beda.software/fhir-react";
|
|
11
|
+
import "fhirpath/fhir-context/r4";
|
|
12
|
+
import { evaluate as w } from "../../utils/fhirpath.js";
|
|
13
|
+
import "yup";
|
|
14
|
+
import "../../utils/yup-locale.js";
|
|
15
|
+
import "../../sharedState/index.js";
|
|
16
|
+
import { S as z } from "./BaseQuestionnaireResponseForm.styles.js";
|
|
17
|
+
function R(b) {
|
|
18
|
+
var u;
|
|
12
19
|
const {
|
|
13
20
|
readOnly: D,
|
|
14
21
|
onCancel: t,
|
|
15
|
-
FormFooterComponent:
|
|
22
|
+
FormFooterComponent: s,
|
|
16
23
|
saveButtonTitle: h,
|
|
17
24
|
cancelButtonTitle: x,
|
|
18
|
-
submitting:
|
|
25
|
+
submitting: e,
|
|
19
26
|
className: y,
|
|
20
27
|
style: g,
|
|
21
28
|
submitDisabled: B,
|
|
22
|
-
saveDraftButtonTitle:
|
|
23
|
-
onSaveDraft:
|
|
24
|
-
} = b, i = j(q), l = I(),
|
|
29
|
+
saveDraftButtonTitle: v,
|
|
30
|
+
onSaveDraft: r
|
|
31
|
+
} = b, i = j(q), l = I(), F = A(async () => {
|
|
25
32
|
var f;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
}, [(
|
|
33
|
+
const c = (f = i == null ? void 0 : i.formData) == null ? void 0 : f.context, T = l.getValues(), m = c ? V(c, T, w) : void 0;
|
|
34
|
+
m != null && m.resource && await (r == null ? void 0 : r(m.resource)), t == null || t();
|
|
35
|
+
}, [(u = i == null ? void 0 : i.formData) == null ? void 0 : u.context, l, r, t]);
|
|
29
36
|
if (D)
|
|
30
37
|
return null;
|
|
31
|
-
const d =
|
|
32
|
-
return /* @__PURE__ */ o(
|
|
33
|
-
t && /* @__PURE__ */ o(
|
|
34
|
-
|
|
38
|
+
const d = e || B, a = e;
|
|
39
|
+
return /* @__PURE__ */ o(k, { children: s ? /* @__PURE__ */ o(s, { submitting: e, submitDisabled: d, onCancel: t }) : /* @__PURE__ */ C(z.Footer, { className: y, style: g, children: [
|
|
40
|
+
t && /* @__PURE__ */ o(n, { type: "default", onClick: t, "data-testid": "cancel-button", disabled: a, children: x ?? /* @__PURE__ */ o(p, { id: "dEgA5A" }) }),
|
|
41
|
+
r && /* @__PURE__ */ o(n, { onClick: F, "data-testid": "save-as-draft-button", disabled: a, children: v || S._(
|
|
35
42
|
/*i18n*/
|
|
36
43
|
{
|
|
37
44
|
id: "8tM8+a"
|
|
38
45
|
}
|
|
39
46
|
) }),
|
|
40
|
-
/* @__PURE__ */ o(
|
|
47
|
+
/* @__PURE__ */ o(n, { type: "primary", htmlType: "submit", "data-testid": "submit-button", loading: e, disabled: d || a, children: h ?? /* @__PURE__ */ o(p, { id: "tfDRzk" }) })
|
|
41
48
|
] }) });
|
|
42
49
|
}
|
|
43
50
|
export {
|
|
44
|
-
|
|
51
|
+
R as FormFooter
|
|
45
52
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._row_dy31e_1{display:flex}._inputWrapper_dy31e_5{flex:auto}._splitterWrapper_dy31e_9{display:flex;flex-direction:column;justify-content:flex-end}._splitter_dy31e_9{position:relative;bottom:22px;margin:0 8px;font-weight:400;font-size:20px;line-height:22px}._group_1ndd9_1{display:flex;flex-direction:column;gap:16px;width:100%}._groupTitle_1ndd9_8{font-weight:700;font-size:16px;line-height:24px}._row_1ndd9_14{display:flex;flex-direction:row;justify-content:space-between;gap:16px;width:100%}._col_1ndd9_22{display:flex;flex-direction:column;gap:16px}._form_1v4sy_1 .ant-form-item-label{font-weight:700}._form_1v4sy_1 .ant-form-item-row{flex:1;flex-direction:column;justify-content:space-between;gap:12px}._form_1v4sy_1 .ant-form-item-label{text-align:start;white-space:normal}._form_1v4sy_1 .ant-form-item-label label{display:flex;height:auto}._form_1v4sy_1 .ant-form-item-label label:after{display:none}._form_1v4sy_1 .ant-form-item-control{flex-grow:0}._content_1v4sy_25{display:flex;flex-direction:column;gap:24px}._field_1v4sy_31{width:100%;margin-bottom:0;display:flex}._field_1v4sy_31.__hidden_1v4sy_36{display:none}._inputContainer_gs0vq_1{display:flex;flex-direction:column}._inputHeader_gs0vq_6{display:flex;margin-bottom:12px;align-items:center;justify-content:space-between}._label_gs0vq_13{font-weight:700;font-size:14px;line-height:22px}.ant-dropdown .ant-table-filter-dropdown{border:0;background:none;box-shadow:none;position:relative;overflow:visible}
|
|
1
|
+
._column_14bfg_1{display:flex;flex-direction:column}._row_14bfg_6{display:flex;flex-direction:row;justify-content:space-between;align-items:center}._questionText_14bfg_13{font-weight:700;margin:0}._answer_14bfg_18{display:block;min-width:40%;max-width:40%}._row_dy31e_1{display:flex}._inputWrapper_dy31e_5{flex:auto}._splitterWrapper_dy31e_9{display:flex;flex-direction:column;justify-content:flex-end}._splitter_dy31e_9{position:relative;bottom:22px;margin:0 8px;font-weight:400;font-size:20px;line-height:22px}._group_1ndd9_1{display:flex;flex-direction:column;gap:16px;width:100%}._groupTitle_1ndd9_8{font-weight:700;font-size:16px;line-height:24px}._row_1ndd9_14{display:flex;flex-direction:row;justify-content:space-between;gap:16px;width:100%}._col_1ndd9_22{display:flex;flex-direction:column;gap:16px}._form_1v4sy_1 .ant-form-item-label{font-weight:700}._form_1v4sy_1 .ant-form-item-row{flex:1;flex-direction:column;justify-content:space-between;gap:12px}._form_1v4sy_1 .ant-form-item-label{text-align:start;white-space:normal}._form_1v4sy_1 .ant-form-item-label label{display:flex;height:auto}._form_1v4sy_1 .ant-form-item-label label:after{display:none}._form_1v4sy_1 .ant-form-item-control{flex-grow:0}._content_1v4sy_25{display:flex;flex-direction:column;gap:24px}._field_1v4sy_31{width:100%;margin-bottom:0;display:flex}._field_1v4sy_31.__hidden_1v4sy_36{display:none}._inputContainer_gs0vq_1{display:flex;flex-direction:column}._inputHeader_gs0vq_6{display:flex;margin-bottom:12px;align-items:center;justify-content:space-between}._label_gs0vq_13{font-weight:700;font-size:14px;line-height:22px}.ant-dropdown .ant-table-filter-dropdown{border:0;background:none;box-shadow:none;position:relative;overflow:visible}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beda.software/web-item-controls",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16-0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@babel/preset-typescript": "^7.26.0",
|
|
73
|
-
"@beda.software/fhir-questionnaire": "^0.1.0-alpha.
|
|
73
|
+
"@beda.software/fhir-questionnaire": "^0.1.0-alpha.5",
|
|
74
74
|
"@beda.software/fhir-react": "^1.11.1",
|
|
75
75
|
"@beda.software/vite-plugin-dts": "4.0.0-beta.1",
|
|
76
76
|
"@chromatic-com/storybook": "^3.2.2",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"react-hook-form": "^7.53.2",
|
|
129
129
|
"sass": "^1.63.6",
|
|
130
130
|
"sass-loader": "^13.3.2",
|
|
131
|
-
"sdc-qrf": "^1.1.0-alpha.
|
|
131
|
+
"sdc-qrf": "^1.1.0-alpha.7",
|
|
132
132
|
"storybook": "^8.6.18",
|
|
133
133
|
"style-loader": "^3.3.3",
|
|
134
134
|
"styled-components": "^6.1.11",
|
|
@@ -396,7 +396,7 @@ msgstr ""
|
|
|
396
396
|
#~ msgid "Calories"
|
|
397
397
|
#~ msgstr ""
|
|
398
398
|
|
|
399
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
399
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:89
|
|
400
400
|
msgid "Cancel"
|
|
401
401
|
msgstr ""
|
|
402
402
|
|
|
@@ -1333,11 +1333,11 @@ msgstr ""
|
|
|
1333
1333
|
#~ msgid "Saturday"
|
|
1334
1334
|
#~ msgstr ""
|
|
1335
1335
|
|
|
1336
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1336
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:108
|
|
1337
1337
|
msgid "Save"
|
|
1338
1338
|
msgstr ""
|
|
1339
1339
|
|
|
1340
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1340
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:98
|
|
1341
1341
|
msgid "Save as draft"
|
|
1342
1342
|
msgstr ""
|
|
1343
1343
|
|
|
@@ -417,7 +417,7 @@ msgstr ""
|
|
|
417
417
|
#~ msgid "Calories"
|
|
418
418
|
#~ msgstr ""
|
|
419
419
|
|
|
420
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
420
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:89
|
|
421
421
|
msgid "Cancel"
|
|
422
422
|
msgstr ""
|
|
423
423
|
|
|
@@ -1532,11 +1532,11 @@ msgstr ""
|
|
|
1532
1532
|
#~ msgid "Saturday"
|
|
1533
1533
|
#~ msgstr ""
|
|
1534
1534
|
|
|
1535
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1535
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:108
|
|
1536
1536
|
msgid "Save"
|
|
1537
1537
|
msgstr ""
|
|
1538
1538
|
|
|
1539
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1539
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:98
|
|
1540
1540
|
msgid "Save as draft"
|
|
1541
1541
|
msgstr ""
|
|
1542
1542
|
|
|
@@ -417,7 +417,7 @@ msgstr "Fecha de nacimiento"
|
|
|
417
417
|
#~ msgid "Calories"
|
|
418
418
|
#~ msgstr "Calorías"
|
|
419
419
|
|
|
420
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
420
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:89
|
|
421
421
|
msgid "Cancel"
|
|
422
422
|
msgstr "Cancelar"
|
|
423
423
|
|
|
@@ -1516,11 +1516,11 @@ msgstr "Eliminar"
|
|
|
1516
1516
|
#~ msgid "Saturday"
|
|
1517
1517
|
#~ msgstr "Sábado"
|
|
1518
1518
|
|
|
1519
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1519
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:108
|
|
1520
1520
|
msgid "Save"
|
|
1521
1521
|
msgstr "Guardar"
|
|
1522
1522
|
|
|
1523
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1523
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:98
|
|
1524
1524
|
msgid "Save as draft"
|
|
1525
1525
|
msgstr "Guardar borrador"
|
|
1526
1526
|
|
|
@@ -417,7 +417,7 @@ msgstr "Дата рождения"
|
|
|
417
417
|
#~ msgid "Calories"
|
|
418
418
|
#~ msgstr ""
|
|
419
419
|
|
|
420
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
420
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:89
|
|
421
421
|
msgid "Cancel"
|
|
422
422
|
msgstr ""
|
|
423
423
|
|
|
@@ -1532,11 +1532,11 @@ msgstr ""
|
|
|
1532
1532
|
#~ msgid "Saturday"
|
|
1533
1533
|
#~ msgstr ""
|
|
1534
1534
|
|
|
1535
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1535
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:108
|
|
1536
1536
|
msgid "Save"
|
|
1537
1537
|
msgstr "Сохранить"
|
|
1538
1538
|
|
|
1539
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1539
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:98
|
|
1540
1540
|
msgid "Save as draft"
|
|
1541
1541
|
msgstr ""
|
|
1542
1542
|
|