@opendoor/partner-sdk-client-react 0.0.1-alpha.28.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.
Files changed (90) hide show
  1. package/README.md +46 -0
  2. package/dist/OpendoorContext.d.ts +4 -0
  3. package/dist/OpendoorContext.d.ts.map +1 -0
  4. package/dist/components/AddressEntry/index.d.ts +45 -0
  5. package/dist/components/AddressEntry/index.d.ts.map +1 -0
  6. package/dist/components/QualificationQuestions/QQContext.d.ts +30 -0
  7. package/dist/components/QualificationQuestions/QQContext.d.ts.map +1 -0
  8. package/dist/components/QualificationQuestions/QQLayout.d.ts +12 -0
  9. package/dist/components/QualificationQuestions/QQLayout.d.ts.map +1 -0
  10. package/dist/components/QualificationQuestions/QQNavigation.d.ts +4 -0
  11. package/dist/components/QualificationQuestions/QQNavigation.d.ts.map +1 -0
  12. package/dist/components/QualificationQuestions/QQPage.d.ts +4 -0
  13. package/dist/components/QualificationQuestions/QQPage.d.ts.map +1 -0
  14. package/dist/components/QualificationQuestions/QQProvider.d.ts +30 -0
  15. package/dist/components/QualificationQuestions/QQProvider.d.ts.map +1 -0
  16. package/dist/components/QualificationQuestions/QQReviewCard.d.ts +11 -0
  17. package/dist/components/QualificationQuestions/QQReviewCard.d.ts.map +1 -0
  18. package/dist/components/QualificationQuestions/QQSidebar.d.ts +8 -0
  19. package/dist/components/QualificationQuestions/QQSidebar.d.ts.map +1 -0
  20. package/dist/components/QualificationQuestions/QualificationQuestions.d.ts +35 -0
  21. package/dist/components/QualificationQuestions/QualificationQuestions.d.ts.map +1 -0
  22. package/dist/components/QualificationQuestions/fields/CardSelectField.d.ts +5 -0
  23. package/dist/components/QualificationQuestions/fields/CardSelectField.d.ts.map +1 -0
  24. package/dist/components/QualificationQuestions/fields/CheckboxField.d.ts +5 -0
  25. package/dist/components/QualificationQuestions/fields/CheckboxField.d.ts.map +1 -0
  26. package/dist/components/QualificationQuestions/fields/CurrencyField.d.ts +5 -0
  27. package/dist/components/QualificationQuestions/fields/CurrencyField.d.ts.map +1 -0
  28. package/dist/components/QualificationQuestions/fields/DropdownField.d.ts +5 -0
  29. package/dist/components/QualificationQuestions/fields/DropdownField.d.ts.map +1 -0
  30. package/dist/components/QualificationQuestions/fields/FieldRenderer.d.ts +6 -0
  31. package/dist/components/QualificationQuestions/fields/FieldRenderer.d.ts.map +1 -0
  32. package/dist/components/QualificationQuestions/fields/FieldWrapper.d.ts +10 -0
  33. package/dist/components/QualificationQuestions/fields/FieldWrapper.d.ts.map +1 -0
  34. package/dist/components/QualificationQuestions/fields/InputField.d.ts +5 -0
  35. package/dist/components/QualificationQuestions/fields/InputField.d.ts.map +1 -0
  36. package/dist/components/QualificationQuestions/fields/RadioField.d.ts +5 -0
  37. package/dist/components/QualificationQuestions/fields/RadioField.d.ts.map +1 -0
  38. package/dist/components/QualificationQuestions/fields/ToggleField.d.ts +6 -0
  39. package/dist/components/QualificationQuestions/fields/ToggleField.d.ts.map +1 -0
  40. package/dist/components/QualificationQuestions/fields/index.d.ts +11 -0
  41. package/dist/components/QualificationQuestions/fields/index.d.ts.map +1 -0
  42. package/dist/components/QualificationQuestions/fields/types.d.ts +7 -0
  43. package/dist/components/QualificationQuestions/fields/types.d.ts.map +1 -0
  44. package/dist/components/QualificationQuestions/icons.d.ts +7 -0
  45. package/dist/components/QualificationQuestions/icons.d.ts.map +1 -0
  46. package/dist/components/QualificationQuestions/index.d.ts +3 -0
  47. package/dist/components/QualificationQuestions/index.d.ts.map +1 -0
  48. package/dist/components/QualificationQuestions/pages/additionalDetailsPage.d.ts +4 -0
  49. package/dist/components/QualificationQuestions/pages/additionalDetailsPage.d.ts.map +1 -0
  50. package/dist/components/QualificationQuestions/pages/conditionPage.d.ts +4 -0
  51. package/dist/components/QualificationQuestions/pages/conditionPage.d.ts.map +1 -0
  52. package/dist/components/QualificationQuestions/pages/contactInfoPage.d.ts +4 -0
  53. package/dist/components/QualificationQuestions/pages/contactInfoPage.d.ts.map +1 -0
  54. package/dist/components/QualificationQuestions/pages/featuresPage.d.ts +4 -0
  55. package/dist/components/QualificationQuestions/pages/featuresPage.d.ts.map +1 -0
  56. package/dist/components/QualificationQuestions/pages/homeDetailsPage.d.ts +4 -0
  57. package/dist/components/QualificationQuestions/pages/homeDetailsPage.d.ts.map +1 -0
  58. package/dist/components/QualificationQuestions/pages/index.d.ts +6 -0
  59. package/dist/components/QualificationQuestions/pages/index.d.ts.map +1 -0
  60. package/dist/components/questionnaire/formLogic.d.ts +45 -0
  61. package/dist/components/questionnaire/formLogic.d.ts.map +1 -0
  62. package/dist/components/questionnaire/formatters.d.ts +11 -0
  63. package/dist/components/questionnaire/formatters.d.ts.map +1 -0
  64. package/dist/components/questionnaire/types.d.ts +240 -0
  65. package/dist/components/questionnaire/types.d.ts.map +1 -0
  66. package/dist/components/questionnaire/utils.d.ts +7 -0
  67. package/dist/components/questionnaire/utils.d.ts.map +1 -0
  68. package/dist/components/shared/PoweredByOpendoor.d.ts +12 -0
  69. package/dist/components/shared/PoweredByOpendoor.d.ts.map +1 -0
  70. package/dist/index.d.ts +15 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +4620 -0
  73. package/dist/provider.d.ts +9 -0
  74. package/dist/provider.d.ts.map +1 -0
  75. package/dist/services/partnerApi.d.ts +96 -0
  76. package/dist/services/partnerApi.d.ts.map +1 -0
  77. package/dist/store/config.d.ts +15 -0
  78. package/dist/store/config.d.ts.map +1 -0
  79. package/dist/store/index.d.ts +133 -0
  80. package/dist/store/index.d.ts.map +1 -0
  81. package/dist/style.css +1 -0
  82. package/dist/types/index.d.ts +121 -0
  83. package/dist/types/index.d.ts.map +1 -0
  84. package/dist/types/questionnaire.d.ts +105 -0
  85. package/dist/types/questionnaire.d.ts.map +1 -0
  86. package/dist/useOpendoorClient.d.ts +4 -0
  87. package/dist/useOpendoorClient.d.ts.map +1 -0
  88. package/dist/utils/applyAppearance.d.ts +8 -0
  89. package/dist/utils/applyAppearance.d.ts.map +1 -0
  90. package/package.json +68 -0
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @opendoor/partner-sdk-client-react
2
+
3
+ React components for Opendoor partner integrations. Prebuilt address entry and qualification questions flow with theming support.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @opendoor/partner-sdk-client-react @opendoor/partner-sdk-client-js-core
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```tsx
14
+ import {
15
+ OpendoorProvider,
16
+ AddressEntry,
17
+ QualificationQuestions,
18
+ } from '@opendoor/partner-sdk-client-react';
19
+ import { OpendoorClient } from '@opendoor/partner-sdk-client-js-core';
20
+
21
+ const client = new OpendoorClient({ baseURL: '/api/opendoor/v1' });
22
+
23
+ function App() {
24
+ return (
25
+ <OpendoorProvider client={client}>
26
+ <AddressEntry
27
+ onAddressSelect={(address) => {
28
+ /* create offer */
29
+ }}
30
+ />
31
+ {/* After offer created: */}
32
+ <QualificationQuestions
33
+ offerId={offerId}
34
+ address={address}
35
+ onSubmit={(answers) => {
36
+ /* submit answers */
37
+ }}
38
+ />
39
+ </OpendoorProvider>
40
+ );
41
+ }
42
+ ```
43
+
44
+ ## Documentation
45
+
46
+ Full guides, API reference, and examples: **https://partner-sdk.opendoor.com**
@@ -0,0 +1,4 @@
1
+ import { OpendoorClient } from '@opendoor/partner-sdk-client-js-core';
2
+
3
+ export declare const OpendoorContext: import('react').Context<OpendoorClient | null>;
4
+ //# sourceMappingURL=OpendoorContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpendoorContext.d.ts","sourceRoot":"","sources":["../src/OpendoorContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAE3E,eAAO,MAAM,eAAe,gDAA6C,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { Address, OpendoorAppearance } from '@opendoor/partner-sdk-client-js-core';
2
+
3
+ export interface AddressEntryProps {
4
+ /** Callback when user selects a valid address (suggestions or manual) */
5
+ onAddressSelect: (address: Address) => void | Promise<void>;
6
+ /** Enable address suggestions (default: true) */
7
+ enableAddressSuggestions?: boolean;
8
+ /** Debounce delay for address suggestions in ms (default: 300) */
9
+ debounceMs?: number;
10
+ /** Show "Powered by Opendoor" attribution below the component (default: false) */
11
+ showAttribution?: boolean;
12
+ /** Disable all interaction */
13
+ disabled?: boolean;
14
+ /** Placeholder text (default: "Enter your home address") */
15
+ placeholderText?: string;
16
+ /** Submit button text (default: "Get cash offer") */
17
+ buttonText?: string;
18
+ /** Show the submit button integrated in the input (default: true) */
19
+ showButton?: boolean;
20
+ /** Custom icon for the submit button */
21
+ buttonIcon?: React.ReactNode;
22
+ /** Custom icon to display inside the input */
23
+ inputIcon?: React.ReactNode;
24
+ /** Text for manual entry link (default: "Enter address manually instead") */
25
+ manualEntryText?: string;
26
+ /**
27
+ * Cross-platform appearance configuration.
28
+ * Select a prebuilt theme and/or override individual design tokens.
29
+ */
30
+ appearance?: OpendoorAppearance;
31
+ /** Called when the component mounts and is ready for interaction */
32
+ onReady?: () => void;
33
+ /** Called when any address field changes (suggestions input or manual form) */
34
+ onChange?: (address: Partial<Address>) => void;
35
+ /** Called when address validation fails on manual submit */
36
+ onValidationError?: (error: string) => void;
37
+ /** Called when an address suggestions API request starts */
38
+ onAddressSuggestionsStart?: (query: string) => void;
39
+ /** Called when address suggestions results are received */
40
+ onAddressSuggestionsComplete?: (suggestions: Address[]) => void;
41
+ /** Called when any error occurs (API errors, validation, etc.) */
42
+ onError?: (error: Error) => void;
43
+ }
44
+ export declare function AddressEntry({ onAddressSelect, enableAddressSuggestions, debounceMs, showAttribution, disabled, placeholderText, buttonText, showButton, buttonIcon, inputIcon, manualEntryText, appearance, onReady, onChange, onValidationError, onAddressSuggestionsStart, onAddressSuggestionsComplete, onError, }: AddressEntryProps): import("react/jsx-runtime").JSX.Element;
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddressEntry/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,OAAO,EACP,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAU9C,MAAM,WAAW,iBAAiB;IAEhC,yEAAyE;IACzE,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAG5D,iDAAiD;IACjD,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,kFAAkF;IAClF,eAAe,CAAC,EAAE,OAAO,CAAC;IAG1B,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB;;;OAGG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAGhC,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC/C,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,4DAA4D;IAC5D,yBAAyB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,2DAA2D;IAC3D,4BAA4B,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAChE,kEAAkE;IAClE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAyDD,wBAAgB,YAAY,CAAC,EAC3B,eAAe,EACf,wBAA+B,EAC/B,UAAgB,EAChB,eAAuB,EACvB,QAAgB,EAChB,eAA2C,EAC3C,UAA6B,EAC7B,UAAiB,EACjB,UAAU,EACV,SAAS,EACT,eAAkD,EAClD,UAAU,EACV,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,yBAAyB,EACzB,4BAA4B,EAC5B,OAAO,GACR,EAAE,iBAAiB,2CAwanB"}
@@ -0,0 +1,30 @@
1
+ import { AnswerValue, PageConfig, StepperStep } from '../questionnaire/types';
2
+
3
+ /** Values provided by QQProvider via React Context */
4
+ export interface QQContextValue {
5
+ /** All page configurations in order */
6
+ pages: PageConfig[];
7
+ /** Index of the currently displayed page */
8
+ currentPageIndex: number;
9
+ /** Read an answer by dot-notation key */
10
+ getAnswer: (key: string) => AnswerValue;
11
+ /** Write an answer to the store by dot-notation key */
12
+ setAnswer: (key: string, value: AnswerValue) => void;
13
+ /** Validate the current page and advance (or call onSubmit on last page) */
14
+ goToNext: () => void;
15
+ /** Go back to the previous page */
16
+ goToPrev: () => void;
17
+ /** Navigate directly to a specific page by index */
18
+ goToPage: (index: number) => void;
19
+ /** Current field-level validation errors keyed by question key */
20
+ validationErrors: Record<string, string>;
21
+ /** Derived stepper steps for the vertical sidebar */
22
+ stepperSteps: StepperStep[];
23
+ }
24
+ export declare const QQContext: import('react').Context<QQContextValue | null>;
25
+ /**
26
+ * Access QualificationQuestions context within any component under QQProvider.
27
+ * Throws if used outside the provider tree.
28
+ */
29
+ export declare function useQQ(): QQContextValue;
30
+ //# sourceMappingURL=QQContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQContext.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAEhC,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,WAAW,CAAC;IACxC,uDAAuD;IACvD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACrD,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oDAAoD;IACpD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kEAAkE;IAClE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,qDAAqD;IACrD,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,gDAA6C,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,KAAK,IAAI,cAAc,CAMtC"}
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { Address } from '@opendoor/partner-sdk-client-js-core';
3
+
4
+ interface QQLayoutProps {
5
+ address: Address;
6
+ mapImageUrl?: string;
7
+ showAttribution?: boolean;
8
+ onEditAddress?: () => void;
9
+ }
10
+ export declare const QQLayout: React.FC<QQLayoutProps>;
11
+ export {};
12
+ //# sourceMappingURL=QQLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQLayout.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAMpE,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyB5C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const QQNavigation: React.FC;
4
+ //# sourceMappingURL=QQNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQNavigation.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAyBhC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const QQPage: React.FC;
4
+ //# sourceMappingURL=QQPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQPage.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAO1D,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAgG1B,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { default as React } from 'react';
2
+ import { AnswerValue, PageConfig } from '../questionnaire/types';
3
+
4
+ export interface QQProviderProps {
5
+ /** Ordered page configurations for the flow */
6
+ pages: PageConfig[];
7
+ /** Pre-filled answers (e.g., from getHomeDetail) */
8
+ initialAnswers?: Record<string, AnswerValue>;
9
+ /** Called when the user completes the last page */
10
+ onSubmit?: (answers: Record<string, AnswerValue>) => void;
11
+ /** Called when the active page changes */
12
+ onPageChange?: (pageIndex: number, pageId: string) => void;
13
+ /** Called when any answer changes */
14
+ onAnswerChange?: (key: string, value: AnswerValue, allAnswers: Record<string, AnswerValue>) => void;
15
+ /** Called when the component mounts and is ready for interaction */
16
+ onReady?: () => void;
17
+ /** Called when any error occurs */
18
+ onError?: (error: Error) => void;
19
+ children: React.ReactNode;
20
+ }
21
+ /**
22
+ * Provider that manages the QualificationQuestions flow with local state.
23
+ * No Zustand dependency — answers live in component-local state.
24
+ * Handles navigation, validation, side effects, and derived values.
25
+ *
26
+ * All callback props are stored in refs to prevent infinite re-render loops
27
+ * when callers pass inline arrow functions.
28
+ */
29
+ export declare const QQProvider: React.FC<QQProviderProps>;
30
+ //# sourceMappingURL=QQProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQProvider.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EAEX,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC7C,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,IAAI,CAAC;IAC1D,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,qCAAqC;IACrC,cAAc,CAAC,EAAE,CACf,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KACpC,IAAI,CAAC;IACV,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqOhD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { Address } from '@opendoor/partner-sdk-client-js-core';
3
+
4
+ interface QQReviewCardProps {
5
+ address: Address;
6
+ mapImageUrl?: string;
7
+ onEditAddress?: () => void;
8
+ }
9
+ export declare const QQReviewCard: React.FC<QQReviewCardProps>;
10
+ export {};
11
+ //# sourceMappingURL=QQReviewCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQReviewCard.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQReviewCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAQpE,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAmID,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsHpD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface QQSidebarProps {
4
+ showAttribution?: boolean;
5
+ }
6
+ export declare const QQSidebar: React.FC<QQSidebarProps>;
7
+ export {};
8
+ //# sourceMappingURL=QQSidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QQSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QQSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,cAAc;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAsBD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkD9C,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { OpendoorAppearance, Address } from '@opendoor/partner-sdk-client-js-core';
2
+ import { AnswerValue } from '../questionnaire/types';
3
+
4
+ export interface QualificationQuestionsProps {
5
+ /** Opendoor offer request ID */
6
+ offerId: string;
7
+ /** Address of the home being evaluated */
8
+ address: Address;
9
+ /** Optional sales associate name */
10
+ salesAssociateName?: string;
11
+ /** Optional sales associate email */
12
+ salesAssociateEmail?: string;
13
+ /** Pre-filled answers (e.g., from getHomeDetail) */
14
+ initialAnswers?: Record<string, AnswerValue>;
15
+ /** Visual appearance configuration */
16
+ appearance?: OpendoorAppearance;
17
+ /** Show "Powered by Opendoor" attribution (default: true) */
18
+ showAttribution?: boolean;
19
+ /** Optional static map image URL for the ReviewCard */
20
+ mapImageUrl?: string;
21
+ /** Called when the component mounts and is ready */
22
+ onReady?: () => void;
23
+ /** Called when navigating between pages */
24
+ onPageChange?: (pageIndex: number, pageId: string) => void;
25
+ /** Called when any answer changes */
26
+ onAnswerChange?: (key: string, value: AnswerValue, allAnswers: Record<string, AnswerValue>) => void;
27
+ /** Called when the user completes all pages */
28
+ onSubmit?: (answers: Record<string, AnswerValue>) => void;
29
+ /** Called on validation errors or internal errors */
30
+ onError?: (error: Error) => void;
31
+ /** Called when user clicks "Edit" on the address in ReviewCard */
32
+ onEditAddress?: () => void;
33
+ }
34
+ export declare function QualificationQuestions({ offerId: _offerId, address, salesAssociateName: _salesAssociateName, salesAssociateEmail: _salesAssociateEmail, initialAnswers, appearance, showAttribution, mapImageUrl, onReady, onPageChange, onAnswerChange, onSubmit, onError, onEditAddress, }: QualificationQuestionsProps): import("react/jsx-runtime").JSX.Element;
35
+ //# sourceMappingURL=QualificationQuestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QualificationQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/QualificationQuestions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,OAAO,EACR,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAU1D,MAAM,WAAW,2BAA2B;IAC1C,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC7C,sCAAsC;IACtC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,6DAA6D;IAC7D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,qCAAqC;IACrC,cAAc,CAAC,EAAE,CACf,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KACpC,IAAI,CAAC;IACV,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,IAAI,CAAC;IAC1D,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EAAE,QAAQ,EACjB,OAAO,EACP,kBAAkB,EAAE,mBAAmB,EACvC,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,EACd,UAAU,EACV,eAAsB,EACtB,WAAW,EACX,OAAO,EACP,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,OAAO,EACP,aAAa,GACd,EAAE,2BAA2B,2CAqC7B"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ export declare const CardSelectField: React.FC<FieldProps>;
5
+ //# sourceMappingURL=CardSelectField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardSelectField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/CardSelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA+ChD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ export declare const CheckboxField: React.FC<FieldProps>;
5
+ //# sourceMappingURL=CheckboxField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/CheckboxField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA6D9C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ export declare const CurrencyField: React.FC<FieldProps>;
5
+ //# sourceMappingURL=CurrencyField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurrencyField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/CurrencyField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAMrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAqC9C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ export declare const DropdownField: React.FC<FieldProps>;
5
+ //# sourceMappingURL=DropdownField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/DropdownField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA6B9C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ /** Dispatches to the correct field primitive based on question.style */
5
+ export declare const FieldRenderer: React.FC<FieldProps>;
6
+ //# sourceMappingURL=FieldRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/FieldRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAS1C,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAiC9C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { QuestionConfig } from '../../questionnaire/types';
3
+
4
+ interface FieldWrapperProps {
5
+ question: QuestionConfig;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const FieldWrapper: React.FC<FieldWrapperProps>;
9
+ export {};
10
+ //# sourceMappingURL=FieldWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/FieldWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,UAAU,iBAAiB;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiBpD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ export declare const InputField: React.FC<FieldProps>;
5
+ //# sourceMappingURL=InputField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/InputField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA+B3C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ export declare const RadioField: React.FC<FieldProps>;
5
+ //# sourceMappingURL=RadioField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/RadioField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAoC3C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { FieldProps } from './types';
3
+
4
+ /** Simple boolean checkbox toggle — bare circle + text label, no bordered container. */
5
+ export declare const ToggleField: React.FC<FieldProps>;
6
+ //# sourceMappingURL=ToggleField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleField.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/ToggleField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,wFAAwF;AACxF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwB5C,CAAC"}
@@ -0,0 +1,11 @@
1
+ export { FieldRenderer } from './FieldRenderer';
2
+ export { FieldWrapper } from './FieldWrapper';
3
+ export { DropdownField } from './DropdownField';
4
+ export { InputField } from './InputField';
5
+ export { CurrencyField } from './CurrencyField';
6
+ export { CheckboxField } from './CheckboxField';
7
+ export { RadioField } from './RadioField';
8
+ export { CardSelectField } from './CardSelectField';
9
+ export { ToggleField } from './ToggleField';
10
+ export type { FieldProps } from './types';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { QuestionConfig } from '../../questionnaire/types';
2
+
3
+ /** Shared props interface for all field components that receive a single question. */
4
+ export interface FieldProps {
5
+ question: QuestionConfig;
6
+ }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/fields/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,sFAAsF;AACtF,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,cAAc,CAAC;CAC1B"}
@@ -0,0 +1,7 @@
1
+ /** Shared inline SVG icons for section headers in page configs. */
2
+ export declare const KitchenIcon: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const BedIcon: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const HomeIcon: () => import("react/jsx-runtime").JSX.Element;
5
+ export declare const GearIcon: () => import("react/jsx-runtime").JSX.Element;
6
+ export declare const StarIcon: () => import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/icons.tsx"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,eAAO,MAAM,WAAW,+CAevB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAgBnB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAcpB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAcpB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAapB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { QualificationQuestions } from './QualificationQuestions';
2
+ export type { QualificationQuestionsProps } from './QualificationQuestions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QualificationQuestions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PageConfig } from '../../questionnaire/types';
2
+
3
+ export declare const additionalDetailsPage: PageConfig;
4
+ //# sourceMappingURL=additionalDetailsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"additionalDetailsPage.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/pages/additionalDetailsPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAY5D,eAAO,MAAM,qBAAqB,EAAE,UAkGnC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PageConfig } from '../../questionnaire/types';
2
+
3
+ export declare const conditionPage: PageConfig;
4
+ //# sourceMappingURL=conditionPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/pages/conditionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAmK5D,eAAO,MAAM,aAAa,EAAE,UAqZ3B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PageConfig } from '../../questionnaire/types';
2
+
3
+ export declare const contactInfoPage: PageConfig;
4
+ //# sourceMappingURL=contactInfoPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contactInfoPage.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/pages/contactInfoPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,eAAe,EAAE,UAyD7B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PageConfig } from '../../questionnaire/types';
2
+
3
+ export declare const featuresPage: PageConfig;
4
+ //# sourceMappingURL=featuresPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"featuresPage.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/pages/featuresPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,eAAO,MAAM,YAAY,EAAE,UA0iB1B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PageConfig } from '../../questionnaire/types';
2
+
3
+ export declare const homeDetailsPage: PageConfig;
4
+ //# sourceMappingURL=homeDetailsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"homeDetailsPage.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/pages/homeDetailsPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAyC5D,eAAO,MAAM,eAAe,EAAE,UAoG7B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { homeDetailsPage } from './homeDetailsPage';
2
+ export { featuresPage } from './featuresPage';
3
+ export { conditionPage } from './conditionPage';
4
+ export { additionalDetailsPage } from './additionalDetailsPage';
5
+ export { contactInfoPage } from './contactInfoPage';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/QualificationQuestions/pages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { AnswerValue, Condition, DerivedAnswer, PageConfig, SectionConfig, QuestionConfig } from './types';
2
+
3
+ /**
4
+ * Recursively evaluate a declarative Condition tree against current answers.
5
+ * @param condition - The condition tree to evaluate
6
+ * @param getAnswer - Accessor for the current answer store
7
+ * @returns Whether the condition is satisfied
8
+ */
9
+ export declare function evaluateCondition(condition: Condition, getAnswer: (key: string) => AnswerValue): boolean;
10
+ /** A page with sections filtered by visibility. */
11
+ export interface FilteredPage extends Omit<PageConfig, 'sections'> {
12
+ sections: FilteredSection[];
13
+ }
14
+ /** A section with questions filtered by visibility. */
15
+ export interface FilteredSection extends Omit<SectionConfig, 'questions'> {
16
+ questions: QuestionConfig[];
17
+ }
18
+ /**
19
+ * Filter a page's sections and questions by their `showWhen` conditions.
20
+ * Sections whose `showWhen` evaluates to false are dropped entirely.
21
+ * Questions whose `showWhen` evaluates to false are omitted.
22
+ * Sections left with zero visible questions are also dropped.
23
+ */
24
+ export declare function getVisibleQuestions(page: PageConfig, getAnswer: (key: string) => AnswerValue): FilteredPage;
25
+ /**
26
+ * Evaluate all effects on a question and return key-value pairs to write.
27
+ * Pure function — does NOT mutate the store.
28
+ */
29
+ export declare function processEffects(question: QuestionConfig, getAnswer: (key: string) => AnswerValue): Record<string, AnswerValue>;
30
+ /**
31
+ * Evaluate all derived-answer rules and return computed key-value pairs.
32
+ */
33
+ export declare function computeDerived(rules: DerivedAnswer[], getAnswer: (key: string) => AnswerValue): Record<string, AnswerValue>;
34
+ /**
35
+ * Collect all question keys whose `showWhen` evaluates to false,
36
+ * plus all question keys inside hidden sections.
37
+ * Used for clearing stored values and skipping validation.
38
+ */
39
+ export declare function getHiddenKeys(pages: PageConfig[], getAnswer: (key: string) => AnswerValue): Set<string>;
40
+ /**
41
+ * Find a QuestionConfig by its key across all pages.
42
+ * Returns undefined if not found.
43
+ */
44
+ export declare function findQuestion(pages: PageConfig[], key: string): QuestionConfig | undefined;
45
+ //# sourceMappingURL=formLogic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formLogic.d.ts","sourceRoot":"","sources":["../../../src/components/questionnaire/formLogic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAKT,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AA0BjB;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,WAAW,GACtC,OAAO,CAiDT;AAMD,mDAAmD;AACnD,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAChE,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,uDAAuD;AACvD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC;IACvE,SAAS,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,WAAW,GACtC,YAAY,CAkBd;AAMD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,WAAW,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAc7B;AAMD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EAAE,EACtB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,WAAW,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAU7B;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EAAE,EACnB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,WAAW,GACtC,GAAG,CAAC,MAAM,CAAC,CAwBb;AAMD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,UAAU,EAAE,EACnB,GAAG,EAAE,MAAM,GACV,cAAc,GAAG,SAAS,CAS5B"}
@@ -0,0 +1,11 @@
1
+ /** Format a number for display in an input (e.g. `1234` → `"1,234"`). */
2
+ export declare function formatCurrencyInput(value: number | undefined): string;
3
+ /** Parse a formatted currency string back to a number (e.g. `"1,234"` → `1234`). */
4
+ export declare function parseCurrencyInput(formatted: string): number | undefined;
5
+ /** Format a number with K/M abbreviations (e.g. `12500` → `"12.5K"`). */
6
+ export declare function formatNumberAbbrev(n: number): string;
7
+ /** Format a number as an abbreviated currency string (e.g. `12500` → `"$12.5K"`). */
8
+ export declare function formatCurrencyAbbrev(n: number): string;
9
+ /** Combine full and half bathroom counts into a display string (e.g. `2, 1` → `"2.5"`). */
10
+ export declare function combineBathrooms(full: number | undefined, half: number | undefined): string | undefined;
11
+ //# sourceMappingURL=formatters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/components/questionnaire/formatters.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGrE;AAED,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIxE;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAUtD;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAMpB"}