@beda.software/web-item-controls 0.1.16-0 → 0.1.18
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 +19 -26
- package/dist/controls/PhoneInput/index.d.ts.map +1 -1
- package/dist/controls/PhoneInput/index.js +9 -8
- 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;AAI9D,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,52 +1,45 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
1
|
+
import { jsx as o, Fragment as v, 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 s } 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
|
-
|
|
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;
|
|
9
|
+
import { S as w } from "./BaseQuestionnaireResponseForm.styles.js";
|
|
10
|
+
function J(b) {
|
|
11
|
+
var c;
|
|
19
12
|
const {
|
|
20
13
|
readOnly: D,
|
|
21
14
|
onCancel: t,
|
|
22
|
-
FormFooterComponent:
|
|
15
|
+
FormFooterComponent: m,
|
|
23
16
|
saveButtonTitle: h,
|
|
24
17
|
cancelButtonTitle: x,
|
|
25
|
-
submitting:
|
|
18
|
+
submitting: r,
|
|
26
19
|
className: y,
|
|
27
20
|
style: g,
|
|
28
21
|
submitDisabled: B,
|
|
29
|
-
saveDraftButtonTitle:
|
|
30
|
-
onSaveDraft:
|
|
31
|
-
} = b, i = j(q), l = I(),
|
|
22
|
+
saveDraftButtonTitle: F,
|
|
23
|
+
onSaveDraft: e
|
|
24
|
+
} = b, i = j(q), l = I(), T = A(async () => {
|
|
32
25
|
var f;
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
}, [(
|
|
26
|
+
const u = (f = i == null ? void 0 : i.formData) == null ? void 0 : f.context, k = l.getValues(), n = u ? V(u, k) : void 0;
|
|
27
|
+
n != null && n.resource && await (e == null ? void 0 : e(n.resource)), t == null || t();
|
|
28
|
+
}, [(c = i == null ? void 0 : i.formData) == null ? void 0 : c.context, l, e, t]);
|
|
36
29
|
if (D)
|
|
37
30
|
return null;
|
|
38
|
-
const d =
|
|
39
|
-
return /* @__PURE__ */ o(
|
|
40
|
-
t && /* @__PURE__ */ o(
|
|
41
|
-
|
|
31
|
+
const d = r || B, a = r;
|
|
32
|
+
return /* @__PURE__ */ o(v, { children: m ? /* @__PURE__ */ o(m, { submitting: r, submitDisabled: d, onCancel: t }) : /* @__PURE__ */ C(w.Footer, { className: y, style: g, children: [
|
|
33
|
+
t && /* @__PURE__ */ o(s, { type: "default", onClick: t, "data-testid": "cancel-button", disabled: a, children: x ?? /* @__PURE__ */ o(p, { id: "dEgA5A" }) }),
|
|
34
|
+
e && /* @__PURE__ */ o(s, { onClick: T, "data-testid": "save-as-draft-button", disabled: a, children: F || S._(
|
|
42
35
|
/*i18n*/
|
|
43
36
|
{
|
|
44
37
|
id: "8tM8+a"
|
|
45
38
|
}
|
|
46
39
|
) }),
|
|
47
|
-
/* @__PURE__ */ o(
|
|
40
|
+
/* @__PURE__ */ o(s, { type: "primary", htmlType: "submit", "data-testid": "submit-button", loading: r, disabled: d || a, children: h ?? /* @__PURE__ */ o(p, { id: "tfDRzk" }) })
|
|
48
41
|
] }) });
|
|
49
42
|
}
|
|
50
43
|
export {
|
|
51
|
-
|
|
44
|
+
J as FormFooter
|
|
52
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controls/PhoneInput/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAU5C,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,iBAAiB,2CAqC5E"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controls/PhoneInput/index.tsx"],"names":[],"mappings":"AAIA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAU5C,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,iBAAiB,2CAqC5E"}
|
|
@@ -3,29 +3,30 @@ import { Form as C } from "antd";
|
|
|
3
3
|
import h from "classnames";
|
|
4
4
|
import { useContext as I, useState as b } from "react";
|
|
5
5
|
import s from "react-phone-input-2";
|
|
6
|
+
import "react-phone-input-2/lib/style.css";
|
|
6
7
|
import { useFieldController as x } from "../../components/BaseQuestionnaireResponseForm/hooks.js";
|
|
7
8
|
import { PhoneInputCountryContext as F } from "./context.js";
|
|
8
9
|
import { S as P } from "./PhoneInput.styles.js";
|
|
9
10
|
const g = s.default || s;
|
|
10
|
-
function
|
|
11
|
+
function Q({
|
|
11
12
|
parentPath: u,
|
|
12
13
|
questionItem: t
|
|
13
14
|
}) {
|
|
14
15
|
const {
|
|
15
|
-
linkId:
|
|
16
|
-
} = t,
|
|
16
|
+
linkId: i
|
|
17
|
+
} = t, a = [...u, i, 0, "value", "string"], l = I(F), {
|
|
17
18
|
value: m,
|
|
18
19
|
onChange: c,
|
|
19
20
|
disabled: e = !1,
|
|
20
21
|
formItem: f,
|
|
21
|
-
placeholder:
|
|
22
|
-
} = x(
|
|
22
|
+
placeholder: p
|
|
23
|
+
} = x(a, t), [d, n] = b(!1);
|
|
23
24
|
return /* @__PURE__ */ o(C.Item, { ...f, children: /* @__PURE__ */ o(P.Container, { $disabled: e, children: /* @__PURE__ */ o(g, { country: l, value: m, onChange: (r) => {
|
|
24
25
|
r && c(`+${r}`);
|
|
25
26
|
}, disabled: e, inputClass: "react-phone-input", containerClass: h({
|
|
26
|
-
_focused:
|
|
27
|
-
}), buttonClass: "react-phone-input__button", onFocus: () => n(!0), onBlur: () => n(!1), placeholder:
|
|
27
|
+
_focused: d
|
|
28
|
+
}), buttonClass: "react-phone-input__button", onFocus: () => n(!0), onBlur: () => n(!1), placeholder: p }) }) });
|
|
28
29
|
}
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
Q as QuestionPhone
|
|
31
32
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +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}._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%}
|
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.18",
|
|
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.6",
|
|
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.9",
|
|
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:87
|
|
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:106
|
|
1337
1337
|
msgid "Save"
|
|
1338
1338
|
msgstr ""
|
|
1339
1339
|
|
|
1340
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1340
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:96
|
|
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:87
|
|
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:106
|
|
1536
1536
|
msgid "Save"
|
|
1537
1537
|
msgstr ""
|
|
1538
1538
|
|
|
1539
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1539
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:96
|
|
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:87
|
|
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:106
|
|
1520
1520
|
msgid "Save"
|
|
1521
1521
|
msgstr "Guardar"
|
|
1522
1522
|
|
|
1523
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1523
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:96
|
|
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:87
|
|
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:106
|
|
1536
1536
|
msgid "Save"
|
|
1537
1537
|
msgstr "Сохранить"
|
|
1538
1538
|
|
|
1539
|
-
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:
|
|
1539
|
+
#: src/components/BaseQuestionnaireResponseForm/FormFooter.tsx:96
|
|
1540
1540
|
msgid "Save as draft"
|
|
1541
1541
|
msgstr ""
|
|
1542
1542
|
|