@fuego-systems/react 0.1.4

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.
Files changed (46) hide show
  1. package/dist/Logo/FuegoLogo.d.ts +4 -0
  2. package/dist/Logo/FuegoLogo.d.ts.map +1 -0
  3. package/dist/Logo/FuegoLogo.js +8 -0
  4. package/dist/Logo/FuegoLogo.js.map +1 -0
  5. package/dist/Logo/LogoProps.d.ts +5 -0
  6. package/dist/Logo/LogoProps.d.ts.map +1 -0
  7. package/dist/Logo/LogoProps.js +2 -0
  8. package/dist/Logo/LogoProps.js.map +1 -0
  9. package/dist/Logo/RossiLogo.d.ts +4 -0
  10. package/dist/Logo/RossiLogo.d.ts.map +1 -0
  11. package/dist/Logo/RossiLogo.js +5 -0
  12. package/dist/Logo/RossiLogo.js.map +1 -0
  13. package/dist/OtpInput/OtpInput.d.ts +18 -0
  14. package/dist/OtpInput/OtpInput.d.ts.map +1 -0
  15. package/dist/OtpInput/OtpInput.js +76 -0
  16. package/dist/OtpInput/OtpInput.js.map +1 -0
  17. package/dist/WizardStepper/WizardStepper.d.ts +35 -0
  18. package/dist/WizardStepper/WizardStepper.d.ts.map +1 -0
  19. package/dist/WizardStepper/WizardStepper.js +9 -0
  20. package/dist/WizardStepper/WizardStepper.js.map +1 -0
  21. package/dist/index.d.ts +9 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +6 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/medplum.d.ts +7 -0
  26. package/dist/medplum.d.ts.map +1 -0
  27. package/dist/medplum.js +4 -0
  28. package/dist/medplum.js.map +1 -0
  29. package/dist/search/FuegoSearchControl.d.ts +41 -0
  30. package/dist/search/FuegoSearchControl.d.ts.map +1 -0
  31. package/dist/search/FuegoSearchControl.js +314 -0
  32. package/dist/search/FuegoSearchControl.js.map +1 -0
  33. package/dist/search/HealthcareServiceAutocomplete.d.ts +12 -0
  34. package/dist/search/HealthcareServiceAutocomplete.d.ts.map +1 -0
  35. package/dist/search/HealthcareServiceAutocomplete.js +43 -0
  36. package/dist/search/HealthcareServiceAutocomplete.js.map +1 -0
  37. package/dist/search/PlanDefinitionAutocomplete.d.ts +12 -0
  38. package/dist/search/PlanDefinitionAutocomplete.d.ts.map +1 -0
  39. package/dist/search/PlanDefinitionAutocomplete.js +130 -0
  40. package/dist/search/PlanDefinitionAutocomplete.js.map +1 -0
  41. package/dist/search/ServiceAutocomplete.d.ts +25 -0
  42. package/dist/search/ServiceAutocomplete.d.ts.map +1 -0
  43. package/dist/search/ServiceAutocomplete.js +103 -0
  44. package/dist/search/ServiceAutocomplete.js.map +1 -0
  45. package/dist/tsconfig.tsbuildinfo +1 -0
  46. package/package.json +59 -0
@@ -0,0 +1,4 @@
1
+ import { LogoProps } from './LogoProps';
2
+ import { JSX } from 'react';
3
+ export declare function FuegoLogo(props: LogoProps): JSX.Element;
4
+ //# sourceMappingURL=FuegoLogo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FuegoLogo.d.ts","sourceRoot":"","sources":["../../src/Logo/FuegoLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAWvD"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function FuegoLogo(props) {
3
+ return (_jsxs("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0", y: "0", viewBox: "0 0 100 100", style: {
4
+ width: props.size,
5
+ height: props.size
6
+ }, children: [_jsx("path", { d: "M58.5 7.5c-18.3 9.6-35.4 28.2-35.4 49.3 0 5.4.7 10.7 2.1 15.6 7.2 26.8 42.5 26.8 49.7 0 1.3-5 2-10.2 2.1-15.6.2-20.2-20.1-32-18.5-49.3z", fill: "#c33737" }), _jsx("path", { d: "M50 32.7c-11.3 6-18.9 17.5-18.9 30.7 0 3.4.5 6.7 1.4 9.8 5.1 16.8 29.8 16.8 34.9 0 .9-3.1 1.4-6.4 1.4-9.8.1-13.2-7.5-24.7-18.8-30.7z", fill: "#f47e60" }), _jsx("path", { d: "M50 47.5C43.2 51.2 38.6 58.1 38.6 66c0 2 .3 4 .9 5.9 3.1 10.1 17.9 10.1 21 0 .6-1.9.9-3.8.9-5.9 0-7.9-4.6-14.8-11.4-18.5z", fill: "#f8b26a" })] }));
7
+ }
8
+ //# sourceMappingURL=FuegoLogo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FuegoLogo.js","sourceRoot":"","sources":["../../src/Logo/FuegoLogo.tsx"],"names":[],"mappings":";AAGA,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,OAAO,CACL,eAAK,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,4BAA4B,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE;YAC7F,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,MAAM,EAAE,KAAK,CAAC,IAAI;SACnB,aACC,eAAM,CAAC,EAAC,yIAAyI,EAAC,IAAI,EAAC,SAAS,GAAE,EAClK,eAAM,CAAC,EAAC,sIAAsI,EAAC,IAAI,EAAC,SAAS,GAAE,EAC/J,eAAM,CAAC,EAAC,2HAA2H,EAAC,IAAI,EAAC,SAAS,GAAE,IAChJ,CACP,CAAA;AACH,CAAC","sourcesContent":["import { LogoProps } from './LogoProps'\nimport { JSX } from 'react'\n\nexport function FuegoLogo(props: LogoProps): JSX.Element {\n return (\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0\" y=\"0\" viewBox=\"0 0 100 100\" style={{\n width: props.size,\n height: props.size\n }}>\n <path d=\"M58.5 7.5c-18.3 9.6-35.4 28.2-35.4 49.3 0 5.4.7 10.7 2.1 15.6 7.2 26.8 42.5 26.8 49.7 0 1.3-5 2-10.2 2.1-15.6.2-20.2-20.1-32-18.5-49.3z\" fill=\"#c33737\"/>\n <path d=\"M50 32.7c-11.3 6-18.9 17.5-18.9 30.7 0 3.4.5 6.7 1.4 9.8 5.1 16.8 29.8 16.8 34.9 0 .9-3.1 1.4-6.4 1.4-9.8.1-13.2-7.5-24.7-18.8-30.7z\" fill=\"#f47e60\"/>\n <path d=\"M50 47.5C43.2 51.2 38.6 58.1 38.6 66c0 2 .3 4 .9 5.9 3.1 10.1 17.9 10.1 21 0 .6-1.9.9-3.8.9-5.9 0-7.9-4.6-14.8-11.4-18.5z\" fill=\"#f8b26a\"/>\n </svg>\n )\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export interface LogoProps {
2
+ readonly size: number;
3
+ readonly fill?: string;
4
+ }
5
+ //# sourceMappingURL=LogoProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoProps.d.ts","sourceRoot":"","sources":["../../src/Logo/LogoProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LogoProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoProps.js","sourceRoot":"","sources":["../../src/Logo/LogoProps.ts"],"names":[],"mappings":"","sourcesContent":["export interface LogoProps {\n readonly size: number;\n readonly fill?: string;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import { LogoProps } from './LogoProps';
2
+ import { JSX } from 'react';
3
+ export declare function RossiLogo(props: LogoProps): JSX.Element;
4
+ //# sourceMappingURL=RossiLogo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RossiLogo.d.ts","sourceRoot":"","sources":["../../src/Logo/RossiLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAsCvD"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function RossiLogo(props) {
3
+ return (_jsx("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0", y: "0", viewBox: "0 0 302.93332 363.16", style: { width: props.size, height: props.size }, children: _jsxs("g", { id: "group-R5", children: [_jsx("path", { d: "m 1947.78,794.852 c -206.17,209.908 -492.92,340.498 -809.71,340.498 h -1.59 c 249.69,0 452.86,203.07 452.86,452.89 0,249.79 -203.17,452.83 -452.86,452.83 H 823.23 300.965 56.9609 c -31.25,0 -56.9609,25.68 -56.9609,57 v 568.75 c 0,31.23 25.7109,56.85 56.9609,56.85 H 300.965 823.23 1136.48 c 626.09,0 1135.52,-509.29 1135.52,-1135.43 0,-308.51 -123.85,-588.529 -324.22,-793.388", fill: "#2c77ab", fillOpacity: "1", fillRule: "nonzero", stroke: "none", transform: "matrix(0.13333333,0,0,-0.13333333,0,363.16)" }), _jsx("path", { d: "m 2213.82,0 h -568.67 c -31.34,0 -57,25.6094 -57,56.8984 v 3.3399 h -1.27 C 1557.24,281.48 1367.28,452.66 1138.07,452.66 h -1.59 c 317.61,0 605.02,131.238 811.3,342.192 v 0 0 C 2135.93,603.262 2256.99,345.621 2272,60.2383 h -1.33 V 56.8984 C 2270.67,25.6094 2245.13,0 2213.82,0", fill: "#2c77ab", fillOpacity: "1", fillRule: "nonzero", stroke: "none", transform: "matrix(0.13333333,0,0,-0.13333333,0,363.16)" }), _jsx("path", { d: "M 1136.48,452.66 H 626.934 c -31.426,0 -57.051,25.711 -57.051,57.07 v 568.59 c 0,31.29 25.625,57.03 57.051,57.03 h 1.504 186.406 5.554 2.832 1.672 311.578 1.59 c 316.79,0 603.54,-130.59 809.71,-340.498 C 1741.5,583.898 1454.09,452.66 1136.48,452.66 v 0 0", fill: "#1c4b6d", fillOpacity: "1", fillRule: "nonzero", stroke: "none", transform: "matrix(0.13333333,0,0,-0.13333333,0,363.16)" })] }) }));
4
+ }
5
+ //# sourceMappingURL=RossiLogo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RossiLogo.js","sourceRoot":"","sources":["../../src/Logo/RossiLogo.tsx"],"names":[],"mappings":";AAGA,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,OAAO,CACL,cACE,OAAO,EAAC,KAAK,EACb,KAAK,EAAC,4BAA4B,EAClC,CAAC,EAAC,GAAG,EACL,CAAC,EAAC,GAAG,EACL,OAAO,EAAC,sBAAsB,EAC9B,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,YAEhD,aAAG,EAAE,EAAC,UAAU,aACd,eACE,CAAC,EAAC,0XAA0X,EAC5X,IAAI,EAAC,SAAS,EACd,WAAW,EAAC,GAAG,EACf,QAAQ,EAAC,SAAS,EAClB,MAAM,EAAC,MAAM,EACb,SAAS,EAAC,6CAA6C,GACvD,EACF,eACE,CAAC,EAAC,uRAAuR,EACzR,IAAI,EAAC,SAAS,EACd,WAAW,EAAC,GAAG,EACf,QAAQ,EAAC,SAAS,EAClB,MAAM,EAAC,MAAM,EACb,SAAS,EAAC,6CAA6C,GACvD,EACF,eACE,CAAC,EAAC,gQAAgQ,EAClQ,IAAI,EAAC,SAAS,EACd,WAAW,EAAC,GAAG,EACf,QAAQ,EAAC,SAAS,EAClB,MAAM,EAAC,MAAM,EACb,SAAS,EAAC,6CAA6C,GACvD,IACA,GACA,CACP,CAAA;AACH,CAAC","sourcesContent":["import { LogoProps } from './LogoProps'\nimport { JSX } from 'react'\n\nexport function RossiLogo(props: LogoProps): JSX.Element {\n return (\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n x=\"0\"\n y=\"0\"\n viewBox=\"0 0 302.93332 363.16\"\n style={{ width: props.size, height: props.size }}\n >\n <g id=\"group-R5\">\n <path\n d=\"m 1947.78,794.852 c -206.17,209.908 -492.92,340.498 -809.71,340.498 h -1.59 c 249.69,0 452.86,203.07 452.86,452.89 0,249.79 -203.17,452.83 -452.86,452.83 H 823.23 300.965 56.9609 c -31.25,0 -56.9609,25.68 -56.9609,57 v 568.75 c 0,31.23 25.7109,56.85 56.9609,56.85 H 300.965 823.23 1136.48 c 626.09,0 1135.52,-509.29 1135.52,-1135.43 0,-308.51 -123.85,-588.529 -324.22,-793.388\"\n fill=\"#2c77ab\"\n fillOpacity=\"1\"\n fillRule=\"nonzero\"\n stroke=\"none\"\n transform=\"matrix(0.13333333,0,0,-0.13333333,0,363.16)\"\n />\n <path\n d=\"m 2213.82,0 h -568.67 c -31.34,0 -57,25.6094 -57,56.8984 v 3.3399 h -1.27 C 1557.24,281.48 1367.28,452.66 1138.07,452.66 h -1.59 c 317.61,0 605.02,131.238 811.3,342.192 v 0 0 C 2135.93,603.262 2256.99,345.621 2272,60.2383 h -1.33 V 56.8984 C 2270.67,25.6094 2245.13,0 2213.82,0\"\n fill=\"#2c77ab\"\n fillOpacity=\"1\"\n fillRule=\"nonzero\"\n stroke=\"none\"\n transform=\"matrix(0.13333333,0,0,-0.13333333,0,363.16)\"\n />\n <path\n d=\"M 1136.48,452.66 H 626.934 c -31.426,0 -57.051,25.711 -57.051,57.07 v 568.59 c 0,31.29 25.625,57.03 57.051,57.03 h 1.504 186.406 5.554 2.832 1.672 311.578 1.59 c 316.79,0 603.54,-130.59 809.71,-340.498 C 1741.5,583.898 1454.09,452.66 1136.48,452.66 v 0 0\"\n fill=\"#1c4b6d\"\n fillOpacity=\"1\"\n fillRule=\"nonzero\"\n stroke=\"none\"\n transform=\"matrix(0.13333333,0,0,-0.13333333,0,363.16)\"\n />\n </g>\n </svg>\n )\n}\n"]}
@@ -0,0 +1,18 @@
1
+ export interface OtpInputProps {
2
+ /** Number of digits in the OTP code */
3
+ length?: number;
4
+ /** Called when all digits are entered */
5
+ onComplete: (code: string) => void;
6
+ /** Whether the input is in a loading/verifying state */
7
+ loading?: boolean;
8
+ /** Error message to display */
9
+ error?: string;
10
+ /** Label above the input */
11
+ label?: string;
12
+ /** Called when the user clicks "Resend" */
13
+ onResend?: () => void;
14
+ /** Cooldown in seconds before resend is available again */
15
+ resendCooldown?: number;
16
+ }
17
+ export declare function OtpInput({ length, onComplete, loading, error, label, onResend, resendCooldown, }: OtpInputProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=OtpInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpInput.d.ts","sourceRoot":"","sources":["../../src/OtpInput/OtpInput.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,QAAQ,CAAC,EACvB,MAAU,EACV,UAAU,EACV,OAAe,EACf,KAAK,EACL,KAAK,EACL,QAAQ,EACR,cAAmB,GACpB,EAAE,aAAa,2CAoHf"}
@@ -0,0 +1,76 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Group, TextInput, Text, Stack, Button } from '@mantine/core';
3
+ import { useCallback, useEffect, useRef, useState } from 'react';
4
+ export function OtpInput({ length = 6, onComplete, loading = false, error, label, onResend, resendCooldown = 60, }) {
5
+ const [values, setValues] = useState(Array(length).fill(''));
6
+ const [cooldown, setCooldown] = useState(resendCooldown);
7
+ const inputRefs = useRef([]);
8
+ useEffect(() => {
9
+ var _a;
10
+ (_a = inputRefs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
11
+ }, []);
12
+ useEffect(() => {
13
+ if (cooldown <= 0)
14
+ return;
15
+ const timer = setInterval(() => setCooldown((c) => c - 1), 1000);
16
+ return () => clearInterval(timer);
17
+ }, [cooldown]);
18
+ const handleChange = useCallback((index, value) => {
19
+ var _a;
20
+ if (!/^\d*$/.test(value))
21
+ return;
22
+ const digit = value.slice(-1);
23
+ const next = [...values];
24
+ next[index] = digit;
25
+ setValues(next);
26
+ if (digit && index < length - 1) {
27
+ (_a = inputRefs.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
28
+ }
29
+ if (next.every((v) => v !== '')) {
30
+ onComplete(next.join(''));
31
+ }
32
+ }, [values, length, onComplete]);
33
+ const handleKeyDown = useCallback((index, e) => {
34
+ var _a;
35
+ if (e.key === 'Backspace' && !values[index] && index > 0) {
36
+ (_a = inputRefs.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
37
+ }
38
+ }, [values]);
39
+ const handlePaste = useCallback((e) => {
40
+ var _a;
41
+ e.preventDefault();
42
+ const pasted = e.clipboardData.getData('text').replace(/\D/g, '').slice(0, length);
43
+ if (!pasted)
44
+ return;
45
+ const next = [...values];
46
+ for (let i = 0; i < pasted.length; i++) {
47
+ next[i] = pasted[i];
48
+ }
49
+ setValues(next);
50
+ const focusIdx = Math.min(pasted.length, length - 1);
51
+ (_a = inputRefs.current[focusIdx]) === null || _a === void 0 ? void 0 : _a.focus();
52
+ if (next.every((v) => v !== '')) {
53
+ onComplete(next.join(''));
54
+ }
55
+ }, [values, length, onComplete]);
56
+ const handleResend = useCallback(() => {
57
+ var _a;
58
+ setCooldown(resendCooldown);
59
+ setValues(Array(length).fill(''));
60
+ (_a = inputRefs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
61
+ onResend === null || onResend === void 0 ? void 0 : onResend();
62
+ }, [resendCooldown, length, onResend]);
63
+ return (_jsxs(Stack, { align: "center", gap: "md", children: [label && (_jsx(Text, { fw: 500, size: "sm", children: label })), _jsx(Group, { gap: "xs", justify: "center", onPaste: handlePaste, children: values.map((val, i) => (_jsx(TextInput, { ref: (el) => {
64
+ inputRefs.current[i] = el;
65
+ }, value: val, onChange: (e) => handleChange(i, e.currentTarget.value), onKeyDown: (e) => handleKeyDown(i, e), disabled: loading, error: !!error, maxLength: 1, styles: {
66
+ input: {
67
+ width: 48,
68
+ height: 56,
69
+ textAlign: 'center',
70
+ fontSize: '1.5rem',
71
+ fontWeight: 600,
72
+ padding: 0,
73
+ },
74
+ }, inputMode: "numeric", autoComplete: "one-time-code" }, i))) }), error && (_jsx(Text, { c: "red", size: "sm", children: error })), onResend && (_jsx(Button, { variant: "subtle", size: "sm", onClick: handleResend, disabled: cooldown > 0 || loading, children: cooldown > 0 ? `Reenviar codigo en ${cooldown}s` : 'Reenviar codigo' }))] }));
75
+ }
76
+ //# sourceMappingURL=OtpInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpInput.js","sourceRoot":"","sources":["../../src/OtpInput/OtpInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAmBjE,MAAM,UAAU,QAAQ,CAAC,EACvB,MAAM,GAAG,CAAC,EACV,UAAU,EACV,OAAO,GAAG,KAAK,EACf,KAAK,EACL,KAAK,EACL,QAAQ,EACR,cAAc,GAAG,EAAE,GACL;IACd,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAA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AE,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EACvD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACrC,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,SAAS,EAAE,CAAC,EACZ,MAAM,EAAE;wBACN,KAAK,EAAE;4BACL,KAAK,EAAE,EAAE;4BACT,MAAM,EAAE,EAAE;4BACV,SAAS,EAAE,QAAQ;4BACnB,QAAQ,EAAE,QAAQ;4BAClB,UAAU,EAAE,GAAG;4BACf,OAAO,EAAE,CAAC;yBACX;qBACF,EACD,SAAS,EAAC,SAAS,EACnB,YAAY,EAAC,eAAe,IArBvB,CAAC,CAsBN,CACH,CAAC,GACI,EACP,KAAK,IAAI,CACR,KAAC,IAAI,IAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,YACpB,KAAK,GACD,CACR,EACA,QAAQ,IAAI,CACX,KAAC,MAAM,IAAC,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,IAAI,OAAO,YACxF,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,QAAQ,GAAG,CAAC,CAAC,CAAC,iBAAiB,GAC9D,CACV,IACK,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { Group, TextInput, Text, Stack, Button } from '@mantine/core';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface OtpInputProps {\n /** Number of digits in the OTP code */\n length?: number;\n /** Called when all digits are entered */\n onComplete: (code: string) => void;\n /** Whether the input is in a loading/verifying state */\n loading?: boolean;\n /** Error message to display */\n error?: string;\n /** Label above the input */\n label?: string;\n /** Called when the user clicks \"Resend\" */\n onResend?: () => void;\n /** Cooldown in seconds before resend is available again */\n resendCooldown?: number;\n}\n\nexport function OtpInput({\n length = 6,\n onComplete,\n loading = false,\n error,\n label,\n onResend,\n resendCooldown = 60,\n}: OtpInputProps) {\n const [values, setValues] = useState<string[]>(Array(length).fill(''));\n const [cooldown, setCooldown] = useState(resendCooldown);\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n useEffect(() => {\n inputRefs.current[0]?.focus();\n }, []);\n\n useEffect(() => {\n if (cooldown <= 0) return;\n const timer = setInterval(() => setCooldown((c) => c - 1), 1000);\n return () => clearInterval(timer);\n }, [cooldown]);\n\n const handleChange = useCallback(\n (index: number, value: string) => {\n if (!/^\\d*$/.test(value)) return;\n const digit = value.slice(-1);\n const next = [...values];\n next[index] = digit;\n setValues(next);\n\n if (digit && index < length - 1) {\n inputRefs.current[index + 1]?.focus();\n }\n\n if (next.every((v) => v !== '')) {\n onComplete(next.join(''));\n }\n },\n [values, length, onComplete]\n );\n\n const handleKeyDown = useCallback(\n (index: number, e: React.KeyboardEvent) => {\n if (e.key === 'Backspace' && !values[index] && index > 0) {\n inputRefs.current[index - 1]?.focus();\n }\n },\n [values]\n );\n\n const handlePaste = useCallback(\n (e: React.ClipboardEvent) => {\n e.preventDefault();\n const pasted = e.clipboardData.getData('text').replace(/\\D/g, '').slice(0, length);\n if (!pasted) return;\n const next = [...values];\n for (let i = 0; i < pasted.length; i++) {\n next[i] = pasted[i];\n }\n setValues(next);\n const focusIdx = Math.min(pasted.length, length - 1);\n inputRefs.current[focusIdx]?.focus();\n if (next.every((v) => v !== '')) {\n onComplete(next.join(''));\n }\n },\n [values, length, onComplete]\n );\n\n const handleResend = useCallback(() => {\n setCooldown(resendCooldown);\n setValues(Array(length).fill(''));\n inputRefs.current[0]?.focus();\n onResend?.();\n }, [resendCooldown, length, onResend]);\n\n return (\n <Stack align=\"center\" gap=\"md\">\n {label && (\n <Text fw={500} size=\"sm\">\n {label}\n </Text>\n )}\n <Group gap=\"xs\" justify=\"center\" onPaste={handlePaste}>\n {values.map((val, i) => (\n <TextInput\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el as unknown as HTMLInputElement;\n }}\n value={val}\n onChange={(e) => handleChange(i, e.currentTarget.value)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n disabled={loading}\n error={!!error}\n maxLength={1}\n styles={{\n input: {\n width: 48,\n height: 56,\n textAlign: 'center',\n fontSize: '1.5rem',\n fontWeight: 600,\n padding: 0,\n },\n }}\n inputMode=\"numeric\"\n autoComplete=\"one-time-code\"\n />\n ))}\n </Group>\n {error && (\n <Text c=\"red\" size=\"sm\">\n {error}\n </Text>\n )}\n {onResend && (\n <Button variant=\"subtle\" size=\"sm\" onClick={handleResend} disabled={cooldown > 0 || loading}>\n {cooldown > 0 ? `Reenviar codigo en ${cooldown}s` : 'Reenviar codigo'}\n </Button>\n )}\n </Stack>\n );\n}\n"]}
@@ -0,0 +1,35 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface WizardStep {
3
+ label: string;
4
+ description?: string;
5
+ icon?: ReactNode;
6
+ content: ReactNode;
7
+ }
8
+ export interface WizardStepperProps {
9
+ /** Current active step (0-indexed) */
10
+ active: number;
11
+ /** List of steps */
12
+ steps: WizardStep[];
13
+ /** Called when user navigates to a different step */
14
+ onStepChange?: (step: number) => void;
15
+ /** Whether back navigation between steps is allowed */
16
+ allowStepClick?: boolean;
17
+ /** Show next/back buttons */
18
+ showNavigation?: boolean;
19
+ /** Label for the next button */
20
+ nextLabel?: string;
21
+ /** Label for the back button */
22
+ backLabel?: string;
23
+ /** Whether the next button is disabled */
24
+ nextDisabled?: boolean;
25
+ /** Whether the next button shows a loading state */
26
+ nextLoading?: boolean;
27
+ /** Called when next is clicked */
28
+ onNext?: () => void;
29
+ /** Called when back is clicked */
30
+ onBack?: () => void;
31
+ /** Custom element to render in place of the default next button */
32
+ nextButton?: ReactNode;
33
+ }
34
+ export declare function WizardStepper({ active, steps, onStepChange, allowStepClick, showNavigation, nextLabel, backLabel, nextDisabled, nextLoading, onNext, onBack, nextButton, }: WizardStepperProps): import("react/jsx-runtime").JSX.Element;
35
+ //# sourceMappingURL=WizardStepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardStepper.d.ts","sourceRoot":"","sources":["../../src/WizardStepper/WizardStepper.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,uDAAuD;IACvD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mEAAmE;IACnE,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,YAAY,EACZ,cAAsB,EACtB,cAAqB,EACrB,SAAuB,EACvB,SAAmB,EACnB,YAAoB,EACpB,WAAmB,EACnB,MAAM,EACN,MAAM,EACN,UAAU,GACX,EAAE,kBAAkB,2CAiCpB"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stepper, Box, Group, Button } from '@mantine/core';
3
+ export function WizardStepper({ active, steps, onStepChange, allowStepClick = false, showNavigation = true, nextLabel = 'Siguiente', backLabel = 'Atras', nextDisabled = false, nextLoading = false, onNext, onBack, nextButton, }) {
4
+ return (_jsxs(Box, { children: [_jsx(Stepper, { active: active, onStepClick: allowStepClick ? onStepChange : undefined, size: "sm", styles: {
5
+ root: { padding: '0 0 16px 0' },
6
+ separator: { marginLeft: 4, marginRight: 4 },
7
+ }, children: steps.map((step, i) => (_jsx(Stepper.Step, { label: step.label, description: step.description, icon: step.icon, children: _jsx(Box, { pt: "md", children: step.content }) }, i))) }), showNavigation && (_jsxs(Group, { justify: "space-between", mt: "lg", children: [_jsx(Button, { variant: "default", onClick: onBack, disabled: active === 0, children: backLabel }), nextButton !== null && nextButton !== void 0 ? nextButton : (_jsx(Button, { onClick: onNext, disabled: nextDisabled, loading: nextLoading, children: nextLabel }))] }))] }));
8
+ }
9
+ //# sourceMappingURL=WizardStepper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardStepper.js","sourceRoot":"","sources":["../../src/WizardStepper/WizardStepper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAqC5D,MAAM,UAAU,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,YAAY,EACZ,cAAc,GAAG,KAAK,EACtB,cAAc,GAAG,IAAI,EACrB,SAAS,GAAG,WAAW,EACvB,SAAS,GAAG,OAAO,EACnB,YAAY,GAAG,KAAK,EACpB,WAAW,GAAG,KAAK,EACnB,MAAM,EACN,MAAM,EACN,UAAU,GACS;IACnB,OAAO,CACL,MAAC,GAAG,eACF,KAAC,OAAO,IACN,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACtD,IAAI,EAAC,IAAI,EACT,MAAM,EAAE;oBACN,IAAI,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;oBAC/B,SAAS,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE;iBAC7C,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,KAAC,OAAO,CAAC,IAAI,IAAS,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,YACrF,KAAC,GAAG,IAAC,EAAE,EAAC,IAAI,YAAE,IAAI,CAAC,OAAO,GAAO,IADhB,CAAC,CAEL,CAChB,CAAC,GACM,EAET,cAAc,IAAI,CACjB,MAAC,KAAK,IAAC,OAAO,EAAC,eAAe,EAAC,EAAE,EAAC,IAAI,aACpC,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC,YAC9D,SAAS,GACH,EACR,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,CACb,KAAC,MAAM,IAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,YAClE,SAAS,GACH,CACV,IACK,CACT,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Stepper, Box, Group, Button } from '@mantine/core';\nimport { type ReactNode } from 'react';\n\nexport interface WizardStep {\n label: string;\n description?: string;\n icon?: ReactNode;\n content: ReactNode;\n}\n\nexport interface WizardStepperProps {\n /** Current active step (0-indexed) */\n active: number;\n /** List of steps */\n steps: WizardStep[];\n /** Called when user navigates to a different step */\n onStepChange?: (step: number) => void;\n /** Whether back navigation between steps is allowed */\n allowStepClick?: boolean;\n /** Show next/back buttons */\n showNavigation?: boolean;\n /** Label for the next button */\n nextLabel?: string;\n /** Label for the back button */\n backLabel?: string;\n /** Whether the next button is disabled */\n nextDisabled?: boolean;\n /** Whether the next button shows a loading state */\n nextLoading?: boolean;\n /** Called when next is clicked */\n onNext?: () => void;\n /** Called when back is clicked */\n onBack?: () => void;\n /** Custom element to render in place of the default next button */\n nextButton?: ReactNode;\n}\n\nexport function WizardStepper({\n active,\n steps,\n onStepChange,\n allowStepClick = false,\n showNavigation = true,\n nextLabel = 'Siguiente',\n backLabel = 'Atras',\n nextDisabled = false,\n nextLoading = false,\n onNext,\n onBack,\n nextButton,\n}: WizardStepperProps) {\n return (\n <Box>\n <Stepper\n active={active}\n onStepClick={allowStepClick ? onStepChange : undefined}\n size=\"sm\"\n styles={{\n root: { padding: '0 0 16px 0' },\n separator: { marginLeft: 4, marginRight: 4 },\n }}\n >\n {steps.map((step, i) => (\n <Stepper.Step key={i} label={step.label} description={step.description} icon={step.icon}>\n <Box pt=\"md\">{step.content}</Box>\n </Stepper.Step>\n ))}\n </Stepper>\n\n {showNavigation && (\n <Group justify=\"space-between\" mt=\"lg\">\n <Button variant=\"default\" onClick={onBack} disabled={active === 0}>\n {backLabel}\n </Button>\n {nextButton ?? (\n <Button onClick={onNext} disabled={nextDisabled} loading={nextLoading}>\n {nextLabel}\n </Button>\n )}\n </Group>\n )}\n </Box>\n );\n}\n"]}
@@ -0,0 +1,9 @@
1
+ export { FuegoLogo } from './Logo/FuegoLogo';
2
+ export { RossiLogo } from './Logo/RossiLogo';
3
+ export { ServiceAutocomplete } from './search/ServiceAutocomplete';
4
+ export type { ServiceAutocompleteProps } from './search/ServiceAutocomplete';
5
+ export { OtpInput } from './OtpInput/OtpInput';
6
+ export type { OtpInputProps } from './OtpInput/OtpInput';
7
+ export { WizardStepper } from './WizardStepper/WizardStepper';
8
+ export type { WizardStepperProps, WizardStep } from './WizardStepper/WizardStepper';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAClE,YAAY,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ export { FuegoLogo } from './Logo/FuegoLogo';
2
+ export { RossiLogo } from './Logo/RossiLogo';
3
+ export { ServiceAutocomplete } from './search/ServiceAutocomplete';
4
+ export { OtpInput } from './OtpInput/OtpInput';
5
+ export { WizardStepper } from './WizardStepper/WizardStepper';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAGlE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA","sourcesContent":["export { FuegoLogo } from './Logo/FuegoLogo'\nexport { RossiLogo } from './Logo/RossiLogo'\nexport { ServiceAutocomplete } from './search/ServiceAutocomplete'\nexport type { ServiceAutocompleteProps } from './search/ServiceAutocomplete'\n\nexport { OtpInput } from './OtpInput/OtpInput'\nexport type { OtpInputProps } from './OtpInput/OtpInput'\nexport { WizardStepper } from './WizardStepper/WizardStepper'\nexport type { WizardStepperProps, WizardStep } from './WizardStepper/WizardStepper'\n"]}
@@ -0,0 +1,7 @@
1
+ export { FuegoSearchControl } from './search/FuegoSearchControl';
2
+ export { PlanDefinitionAutocomplete } from './search/PlanDefinitionAutocomplete';
3
+ export { HealthcareServiceAutocomplete } from './search/HealthcareServiceAutocomplete';
4
+ export type { FuegoSearchControlProps, ColumnDef } from './search/FuegoSearchControl';
5
+ export type { PlanDefinitionAutocompleteProps } from './search/PlanDefinitionAutocomplete';
6
+ export type { HealthcareServiceAutocompleteProps } from './search/HealthcareServiceAutocomplete';
7
+ //# sourceMappingURL=medplum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medplum.d.ts","sourceRoot":"","sources":["../src/medplum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAA;AACtF,YAAY,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AACrF,YAAY,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAA;AAC1F,YAAY,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { FuegoSearchControl } from './search/FuegoSearchControl';
2
+ export { PlanDefinitionAutocomplete } from './search/PlanDefinitionAutocomplete';
3
+ export { HealthcareServiceAutocomplete } from './search/HealthcareServiceAutocomplete';
4
+ //# sourceMappingURL=medplum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medplum.js","sourceRoot":"","sources":["../src/medplum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAA","sourcesContent":["export { FuegoSearchControl } from './search/FuegoSearchControl'\nexport { PlanDefinitionAutocomplete } from './search/PlanDefinitionAutocomplete'\nexport { HealthcareServiceAutocomplete } from './search/HealthcareServiceAutocomplete'\nexport type { FuegoSearchControlProps, ColumnDef } from './search/FuegoSearchControl'\nexport type { PlanDefinitionAutocompleteProps } from './search/PlanDefinitionAutocomplete'\nexport type { HealthcareServiceAutocompleteProps } from './search/HealthcareServiceAutocomplete'\n"]}
@@ -0,0 +1,41 @@
1
+ import type { Filter } from '@medplum/core';
2
+ import { Resource } from '@medplum/fhirtypes';
3
+ import type { SearchControlProps } from '@medplum/react';
4
+ import { JSX, ReactNode } from 'react';
5
+ export interface ColumnDef<T extends Resource = Resource> {
6
+ readonly id: string;
7
+ readonly header: ReactNode;
8
+ readonly width?: number | string;
9
+ readonly align?: 'left' | 'center' | 'right';
10
+ readonly textAlign?: 'left' | 'center' | 'right';
11
+ readonly sortable?: boolean;
12
+ readonly sortCode?: string;
13
+ readonly truncate?: boolean;
14
+ readonly tooltip?: (resource: T) => ReactNode;
15
+ readonly render: (resource: T) => ReactNode;
16
+ }
17
+ export interface RowEvent<T extends Resource = Resource> {
18
+ readonly resource: T;
19
+ }
20
+ export interface FuegoSearchControlProps<T extends Resource = Resource> extends Pick<SearchControlProps<T>, 'search' | 'onClick' | 'onAuxClick' | 'onChange' | 'checkboxesEnabled'> {
21
+ readonly columns: ColumnDef<T>[];
22
+ readonly bulkActions?: (selected: T[]) => ReactNode;
23
+ readonly getRowId?: (r: T) => string;
24
+ readonly toolbarParam?: {
25
+ code: string;
26
+ placeholder: string;
27
+ toFilterValue?: (query: string) => string;
28
+ extractQuery?: (filters: Filter[]) => string;
29
+ clearCodes?: string[];
30
+ };
31
+ readonly toolbarControls?: ReactNode;
32
+ readonly toolbarActions?: ReactNode;
33
+ readonly medplum: {
34
+ search: (rt: any, query?: any) => Promise<any>;
35
+ searchResources: (rt: any, params?: any) => Promise<any[]>;
36
+ };
37
+ /** Optional identifier system used for PlanDefinition identifier search in toolbar */
38
+ readonly identifierSystem?: string;
39
+ }
40
+ export declare function FuegoSearchControl<T extends Resource = Resource>({ search, columns, checkboxesEnabled, bulkActions, onClick, onAuxClick, onChange, getRowId, toolbarParam, toolbarControls, toolbarActions, medplum, identifierSystem: _identifierSystem, }: FuegoSearchControlProps<T>): JSX.Element;
41
+ //# sourceMappingURL=FuegoSearchControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FuegoSearchControl.d.ts","sourceRoot":"","sources":["../../src/search/FuegoSearchControl.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,MAAM,EAAY,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,GAAG,EAAE,SAAS,EAAqD,MAAM,OAAO,CAAA;AAIzF,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IACtD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAE3B,QAAQ,CAAC,OAAO,C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