@cellarnode/ui 0.17.4 → 0.19.2
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/chat/unified-timeline.d.ts +15 -0
- package/dist/chat/unified-timeline.d.ts.map +1 -1
- package/dist/chat/unified-timeline.js.map +1 -1
- package/dist/components/journey-card.d.ts +9 -1
- package/dist/components/journey-card.d.ts.map +1 -1
- package/dist/components/journey-card.js +13 -6
- package/dist/components/journey-card.js.map +1 -1
- package/dist/components/journey-card.stories.d.ts +2 -0
- package/dist/components/journey-card.stories.d.ts.map +1 -1
- package/dist/components/journey-card.stories.js +43 -0
- package/dist/components/journey-card.stories.js.map +1 -1
- package/dist/components/sortable-card-context.d.ts +18 -0
- package/dist/components/sortable-card-context.d.ts.map +1 -0
- package/dist/components/sortable-card-context.js +18 -0
- package/dist/components/sortable-card-context.js.map +1 -0
- package/dist/components/sortable-card-shell.d.ts +40 -21
- package/dist/components/sortable-card-shell.d.ts.map +1 -1
- package/dist/components/sortable-card-shell.js +46 -39
- package/dist/components/sortable-card-shell.js.map +1 -1
- package/dist/components/sortable-card-shell.stories.d.ts +1 -1
- package/dist/components/sortable-card-shell.stories.d.ts.map +1 -1
- package/dist/components/sortable-card-shell.stories.js +28 -15
- package/dist/components/sortable-card-shell.stories.js.map +1 -1
- package/dist/components/sortable-card-shell.test.js +57 -16
- package/dist/components/sortable-card-shell.test.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/offer/attachments-card.d.ts +9 -0
- package/dist/offer/attachments-card.d.ts.map +1 -0
- package/dist/offer/attachments-card.js +16 -0
- package/dist/offer/attachments-card.js.map +1 -0
- package/dist/offer/attachments-card.stories.d.ts +17 -0
- package/dist/offer/attachments-card.stories.d.ts.map +1 -0
- package/dist/offer/attachments-card.stories.js +24 -0
- package/dist/offer/attachments-card.stories.js.map +1 -0
- package/dist/offer/buyer-notes-card.d.ts +7 -0
- package/dist/offer/buyer-notes-card.d.ts.map +1 -0
- package/dist/offer/buyer-notes-card.js +6 -0
- package/dist/offer/buyer-notes-card.js.map +1 -0
- package/dist/offer/buyer-notes-card.stories.d.ts +16 -0
- package/dist/offer/buyer-notes-card.stories.d.ts.map +1 -0
- package/dist/offer/buyer-notes-card.stories.js +25 -0
- package/dist/offer/buyer-notes-card.stories.js.map +1 -0
- package/dist/offer/counter-slide-over.d.ts +44 -0
- package/dist/offer/counter-slide-over.d.ts.map +1 -0
- package/dist/offer/counter-slide-over.js +81 -0
- package/dist/offer/counter-slide-over.js.map +1 -0
- package/dist/offer/counter-slide-over.stories.d.ts +23 -0
- package/dist/offer/counter-slide-over.stories.d.ts.map +1 -0
- package/dist/offer/counter-slide-over.stories.js +235 -0
- package/dist/offer/counter-slide-over.stories.js.map +1 -0
- package/dist/offer/facts-card.d.ts +32 -0
- package/dist/offer/facts-card.d.ts.map +1 -0
- package/dist/offer/facts-card.js +87 -0
- package/dist/offer/facts-card.js.map +1 -0
- package/dist/offer/facts-card.stories.d.ts +25 -0
- package/dist/offer/facts-card.stories.d.ts.map +1 -0
- package/dist/offer/facts-card.stories.js +177 -0
- package/dist/offer/facts-card.stories.js.map +1 -0
- package/dist/offer/index.d.ts +39 -0
- package/dist/offer/index.d.ts.map +1 -1
- package/dist/offer/index.js +21 -0
- package/dist/offer/index.js.map +1 -1
- package/dist/offer/inline-counter-form.d.ts +16 -0
- package/dist/offer/inline-counter-form.d.ts.map +1 -1
- package/dist/offer/inline-counter-form.js +8 -0
- package/dist/offer/inline-counter-form.js.map +1 -1
- package/dist/offer/match-compatibility-card.d.ts +16 -0
- package/dist/offer/match-compatibility-card.d.ts.map +1 -0
- package/dist/offer/match-compatibility-card.js +27 -0
- package/dist/offer/match-compatibility-card.js.map +1 -0
- package/dist/offer/match-compatibility-card.stories.d.ts +19 -0
- package/dist/offer/match-compatibility-card.stories.d.ts.map +1 -0
- package/dist/offer/match-compatibility-card.stories.js +111 -0
- package/dist/offer/match-compatibility-card.stories.js.map +1 -0
- package/dist/offer/match-glyph.d.ts +14 -0
- package/dist/offer/match-glyph.d.ts.map +1 -0
- package/dist/offer/match-glyph.js +40 -0
- package/dist/offer/match-glyph.js.map +1 -0
- package/dist/offer/match-glyph.stories.d.ts +26 -0
- package/dist/offer/match-glyph.stories.d.ts.map +1 -0
- package/dist/offer/match-glyph.stories.js +26 -0
- package/dist/offer/match-glyph.stories.js.map +1 -0
- package/dist/offer/match-headline-bar.d.ts +11 -0
- package/dist/offer/match-headline-bar.d.ts.map +1 -0
- package/dist/offer/match-headline-bar.js +28 -0
- package/dist/offer/match-headline-bar.js.map +1 -0
- package/dist/offer/match-headline-bar.stories.d.ts +17 -0
- package/dist/offer/match-headline-bar.stories.d.ts.map +1 -0
- package/dist/offer/match-headline-bar.stories.js +39 -0
- package/dist/offer/match-headline-bar.stories.js.map +1 -0
- package/dist/offer/match-preview.d.ts +18 -0
- package/dist/offer/match-preview.d.ts.map +1 -0
- package/dist/offer/match-preview.js +13 -0
- package/dist/offer/match-preview.js.map +1 -0
- package/dist/offer/match-preview.stories.d.ts +18 -0
- package/dist/offer/match-preview.stories.d.ts.map +1 -0
- package/dist/offer/match-preview.stories.js +103 -0
- package/dist/offer/match-preview.stories.js.map +1 -0
- package/dist/offer/negotiation-section.d.ts +11 -0
- package/dist/offer/negotiation-section.d.ts.map +1 -0
- package/dist/offer/negotiation-section.js +99 -0
- package/dist/offer/negotiation-section.js.map +1 -0
- package/dist/offer/negotiation-section.stories.d.ts +18 -0
- package/dist/offer/negotiation-section.stories.d.ts.map +1 -0
- package/dist/offer/negotiation-section.stories.js +156 -0
- package/dist/offer/negotiation-section.stories.js.map +1 -0
- package/dist/offer/new-activity-pill.d.ts +7 -0
- package/dist/offer/new-activity-pill.d.ts.map +1 -0
- package/dist/offer/new-activity-pill.js +8 -0
- package/dist/offer/new-activity-pill.js.map +1 -0
- package/dist/offer/new-activity-pill.stories.d.ts +17 -0
- package/dist/offer/new-activity-pill.stories.d.ts.map +1 -0
- package/dist/offer/new-activity-pill.stories.js +22 -0
- package/dist/offer/new-activity-pill.stories.js.map +1 -0
- package/dist/offer/offer-document.d.ts +33 -0
- package/dist/offer/offer-document.d.ts.map +1 -0
- package/dist/offer/offer-document.js +125 -0
- package/dist/offer/offer-document.js.map +1 -0
- package/dist/offer/offer-document.stories.d.ts +25 -0
- package/dist/offer/offer-document.stories.d.ts.map +1 -0
- package/dist/offer/offer-document.stories.js +168 -0
- package/dist/offer/offer-document.stories.js.map +1 -0
- package/dist/offer/offer-export-button.d.ts +8 -0
- package/dist/offer/offer-export-button.d.ts.map +1 -0
- package/dist/offer/offer-export-button.js +11 -0
- package/dist/offer/offer-export-button.js.map +1 -0
- package/dist/offer/offer-export-button.stories.d.ts +15 -0
- package/dist/offer/offer-export-button.stories.d.ts.map +1 -0
- package/dist/offer/offer-export-button.stories.js +11 -0
- package/dist/offer/offer-export-button.stories.js.map +1 -0
- package/dist/offer/offer-product-card.d.ts +32 -0
- package/dist/offer/offer-product-card.d.ts.map +1 -0
- package/dist/offer/offer-product-card.js +10 -0
- package/dist/offer/offer-product-card.js.map +1 -0
- package/dist/offer/offer-product-card.stories.d.ts +16 -0
- package/dist/offer/offer-product-card.stories.d.ts.map +1 -0
- package/dist/offer/offer-product-card.stories.js +40 -0
- package/dist/offer/offer-product-card.stories.js.map +1 -0
- package/dist/offer/opportunity-card.d.ts +16 -0
- package/dist/offer/opportunity-card.d.ts.map +1 -0
- package/dist/offer/opportunity-card.js +9 -0
- package/dist/offer/opportunity-card.js.map +1 -0
- package/dist/offer/opportunity-card.stories.d.ts +16 -0
- package/dist/offer/opportunity-card.stories.d.ts.map +1 -0
- package/dist/offer/opportunity-card.stories.js +33 -0
- package/dist/offer/opportunity-card.stories.js.map +1 -0
- package/dist/offer/parties-card.d.ts +11 -0
- package/dist/offer/parties-card.d.ts.map +1 -0
- package/dist/offer/parties-card.js +14 -0
- package/dist/offer/parties-card.js.map +1 -0
- package/dist/offer/parties-card.stories.d.ts +17 -0
- package/dist/offer/parties-card.stories.d.ts.map +1 -0
- package/dist/offer/parties-card.stories.js +37 -0
- package/dist/offer/parties-card.stories.js.map +1 -0
- package/dist/offer/terms-card.d.ts +17 -0
- package/dist/offer/terms-card.d.ts.map +1 -0
- package/dist/offer/terms-card.js +50 -0
- package/dist/offer/terms-card.js.map +1 -0
- package/dist/offer/terms-card.stories.d.ts +17 -0
- package/dist/offer/terms-card.stories.d.ts.map +1 -0
- package/dist/offer/terms-card.stories.js +42 -0
- package/dist/offer/terms-card.stories.js.map +1 -0
- package/dist/offer/timeline-event.d.ts +12 -0
- package/dist/offer/timeline-event.d.ts.map +1 -0
- package/dist/offer/timeline-event.js +57 -0
- package/dist/offer/timeline-event.js.map +1 -0
- package/dist/offer/timeline-event.stories.d.ts +21 -0
- package/dist/offer/timeline-event.stories.d.ts.map +1 -0
- package/dist/offer/timeline-event.stories.js +57 -0
- package/dist/offer/timeline-event.stories.js.map +1 -0
- package/dist/offer/types.d.ts +118 -0
- package/dist/offer/types.d.ts.map +1 -1
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js +40 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js +31 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js +42 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js +59 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js +54 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js +40 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js +40 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js +74 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.js +46 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js +77 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.js +107 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.js +29 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.js +29 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js +19 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js +23 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js.map +1 -0
- package/dist/opportunities/index.d.ts +51 -1
- package/dist/opportunities/index.d.ts.map +1 -1
- package/dist/opportunities/index.js +35 -0
- package/dist/opportunities/index.js.map +1 -1
- package/dist/opportunities/opportunities-table.d.ts +4 -0
- package/dist/opportunities/opportunities-table.d.ts.map +1 -1
- package/dist/opportunities/opportunities-table.js +4 -0
- package/dist/opportunities/opportunities-table.js.map +1 -1
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts +12 -0
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-add-to-journey-button.js +42 -0
- package/dist/opportunities/opportunity-add-to-journey-button.js.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.d.ts +9 -0
- package/dist/opportunities/opportunity-card-actions-menu.d.ts.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.js +33 -0
- package/dist/opportunities/opportunity-card-actions-menu.js.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts +14 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.js +12 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.js.map +1 -0
- package/dist/opportunities/opportunity-celebration.d.ts +8 -0
- package/dist/opportunities/opportunity-celebration.d.ts.map +1 -0
- package/dist/opportunities/opportunity-celebration.js +17 -0
- package/dist/opportunities/opportunity-celebration.js.map +1 -0
- package/dist/opportunities/opportunity-celebration.stories.d.ts +17 -0
- package/dist/opportunities/opportunity-celebration.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-celebration.stories.js +30 -0
- package/dist/opportunities/opportunity-celebration.stories.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.d.ts +10 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.js +54 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.d.ts +14 -0
- package/dist/opportunities/opportunity-filter-bar.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.js +65 -0
- package/dist/opportunities/opportunity-filter-bar.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.stories.d.ts +25 -0
- package/dist/opportunities/opportunity-filter-bar.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.stories.js +63 -0
- package/dist/opportunities/opportunity-filter-bar.stories.js.map +1 -0
- package/dist/opportunities/opportunity-reopen-button.d.ts +11 -0
- package/dist/opportunities/opportunity-reopen-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-reopen-button.js +20 -0
- package/dist/opportunities/opportunity-reopen-button.js.map +1 -0
- package/dist/opportunities/opportunity-republish-button.d.ts +7 -0
- package/dist/opportunities/opportunity-republish-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-republish-button.js +14 -0
- package/dist/opportunities/opportunity-republish-button.js.map +1 -0
- package/dist/opportunities/opportunity-resume-draft-button.d.ts +7 -0
- package/dist/opportunities/opportunity-resume-draft-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-resume-draft-button.js +7 -0
- package/dist/opportunities/opportunity-resume-draft-button.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.d.ts.map +1 -1
- package/dist/opportunities/opportunity-stacked-list.js +3 -1
- package/dist/opportunities/opportunity-stacked-list.js.map +1 -1
- package/dist/opportunities/opportunity-view-offers-button.d.ts +7 -0
- package/dist/opportunities/opportunity-view-offers-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-view-offers-button.js +8 -0
- package/dist/opportunities/opportunity-view-offers-button.js.map +1 -0
- package/dist/opportunities/two-column-section.d.ts.map +1 -1
- package/dist/opportunities/two-column-section.js +4 -3
- package/dist/opportunities/two-column-section.js.map +1 -1
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts +2 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js +53 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js.map +1 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts +2 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js +32 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js +127 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.js +93 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js +141 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.js +80 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js +76 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js +192 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js +61 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts +29 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.js +196 -0
- package/dist/opportunities/wizard/opportunity-wizard.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts +12 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.js +49 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.js.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts +9 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.js +80 -0
- package/dist/opportunities/wizard/step-opportunities.js.map +1 -0
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts +9 -0
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-pricing-timeline.js +64 -0
- package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -0
- package/dist/opportunities/wizard/step-review.d.ts +9 -0
- package/dist/opportunities/wizard/step-review.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-review.js +34 -0
- package/dist/opportunities/wizard/step-review.js.map +1 -0
- package/dist/opportunities/wizard/step-tender-basics.d.ts +16 -0
- package/dist/opportunities/wizard/step-tender-basics.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-tender-basics.js +39 -0
- package/dist/opportunities/wizard/step-tender-basics.js.map +1 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts +41 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts.map +1 -0
- package/dist/opportunities/wizard/use-wizard-draft.js +214 -0
- package/dist/opportunities/wizard/use-wizard-draft.js.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts +20 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.js +26 -0
- package/dist/opportunities/wizard/wizard-stepper.js.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.d.ts +22 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.js +47 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.js.map +1 -0
- package/dist/opportunities/wizard/wizard.types.d.ts +176 -0
- package/dist/opportunities/wizard/wizard.types.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard.types.js +62 -0
- package/dist/opportunities/wizard/wizard.types.js.map +1 -0
- package/package.json +13 -4
- package/src/offer/offer-document.print.css +72 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Info, X } from "lucide-react";
|
|
4
|
+
import { WizardStepper } from "./wizard-stepper";
|
|
5
|
+
import { StepTenderBasics } from "./step-tender-basics";
|
|
6
|
+
import { StepOpportunities } from "./step-opportunities";
|
|
7
|
+
import { StepPricingTimeline } from "./step-pricing-timeline";
|
|
8
|
+
import { StepReview } from "./step-review";
|
|
9
|
+
import { useWizardDraft } from "./use-wizard-draft";
|
|
10
|
+
import { tenderPublishSchema, wizardStepIds, } from "./wizard.types";
|
|
11
|
+
import { cn } from "../../lib/utils";
|
|
12
|
+
const stepLabels = {
|
|
13
|
+
tender: "Tender",
|
|
14
|
+
opportunities: "Opportunities",
|
|
15
|
+
pricing: "Pricing",
|
|
16
|
+
review: "Review",
|
|
17
|
+
};
|
|
18
|
+
export function OpportunityWizard(props) {
|
|
19
|
+
const { mode, initialDraft, initialVersion, createDraft, patchDraft, publishDraft, saveEdit, onClose, onPublished, className, } = props;
|
|
20
|
+
const draftHook = useWizardDraft({
|
|
21
|
+
create: createDraft,
|
|
22
|
+
patch: patchDraft,
|
|
23
|
+
initialDraftId: initialDraft?.id,
|
|
24
|
+
initialDraft: initialDraft ?? {},
|
|
25
|
+
initialVersion: initialVersion ?? 1,
|
|
26
|
+
disableAutosave: mode === "edit",
|
|
27
|
+
});
|
|
28
|
+
const [currentStep, setCurrentStep] = React.useState(0);
|
|
29
|
+
const [completedSteps, setCompletedSteps] = React.useState([]);
|
|
30
|
+
const [stepValidity, setStepValidity] = React.useState({
|
|
31
|
+
tender: false,
|
|
32
|
+
opportunities: false,
|
|
33
|
+
pricing: false,
|
|
34
|
+
review: true,
|
|
35
|
+
});
|
|
36
|
+
const [publishError, setPublishError] = React.useState(null);
|
|
37
|
+
const [publishing, setPublishing] = React.useState(false);
|
|
38
|
+
const [idempotencyKey] = React.useState(() => crypto.randomUUID());
|
|
39
|
+
const effectiveDraft = { ...initialDraft, ...draftHook.draft };
|
|
40
|
+
// Stable references so child onChange / onValidityChange effects don't loop.
|
|
41
|
+
const applyChangeRef = React.useRef(draftHook.applyChange);
|
|
42
|
+
React.useEffect(() => { applyChangeRef.current = draftHook.applyChange; }, [draftHook.applyChange]);
|
|
43
|
+
const applyTenderFields = React.useCallback((fields) => {
|
|
44
|
+
applyChangeRef.current(fields);
|
|
45
|
+
}, []);
|
|
46
|
+
const onApplyOpportunities = React.useCallback((next) => {
|
|
47
|
+
applyChangeRef.current({ opportunities: next });
|
|
48
|
+
}, []);
|
|
49
|
+
const onValidityTender = React.useCallback((v) => {
|
|
50
|
+
setStepValidity(s => (s.tender === v ? s : { ...s, tender: v }));
|
|
51
|
+
}, []);
|
|
52
|
+
const onValidityOpportunities = React.useCallback((v) => {
|
|
53
|
+
setStepValidity(s => (s.opportunities === v ? s : { ...s, opportunities: v }));
|
|
54
|
+
}, []);
|
|
55
|
+
const onValidityPricing = React.useCallback((v) => {
|
|
56
|
+
setStepValidity(s => (s.pricing === v ? s : { ...s, pricing: v }));
|
|
57
|
+
}, []);
|
|
58
|
+
const announceRef = React.useRef(null);
|
|
59
|
+
// Focus management: capture the element that opened the wizard, focus first input on mount,
|
|
60
|
+
// restore focus on unmount.
|
|
61
|
+
const triggerElRef = React.useRef(null);
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
triggerElRef.current = document.activeElement ?? null;
|
|
64
|
+
const initialStepId = wizardStepIds[0];
|
|
65
|
+
const first = document.querySelector(`[data-wizard-step="${initialStepId}"] input, [data-wizard-step="${initialStepId}"] textarea, [data-wizard-step="${initialStepId}"] button`);
|
|
66
|
+
first?.focus();
|
|
67
|
+
return () => {
|
|
68
|
+
triggerElRef.current?.focus();
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
// Escape → save-and-exit confirmation (or close directly if nothing unsaved).
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
const onKey = (e) => {
|
|
74
|
+
if (e.key !== "Escape")
|
|
75
|
+
return;
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
const hasUnsaved = draftHook.state.phase === "creating" ||
|
|
78
|
+
(draftHook.state.phase === "created" && draftHook.state.savingPhase !== "idle");
|
|
79
|
+
if (!hasUnsaved) {
|
|
80
|
+
onClose();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (window.confirm("Save and exit? Your changes will be kept as a draft.")) {
|
|
84
|
+
void draftHook.flush().then(onClose);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
document.addEventListener("keydown", onKey);
|
|
88
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
89
|
+
}, [draftHook, onClose]);
|
|
90
|
+
const setStep = (idx) => {
|
|
91
|
+
if (idx === currentStep)
|
|
92
|
+
return;
|
|
93
|
+
setCurrentStep(idx);
|
|
94
|
+
if (announceRef.current) {
|
|
95
|
+
announceRef.current.textContent = `Step ${idx + 1} of 4: ${stepLabels[wizardStepIds[idx]]}`;
|
|
96
|
+
}
|
|
97
|
+
// Focus first input of the new step.
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
const first = document.querySelector(`[data-wizard-step="${wizardStepIds[idx]}"] input, [data-wizard-step="${wizardStepIds[idx]}"] textarea, [data-wizard-step="${wizardStepIds[idx]}"] button`);
|
|
100
|
+
first?.focus();
|
|
101
|
+
}, 0);
|
|
102
|
+
};
|
|
103
|
+
const goBack = (idx) => {
|
|
104
|
+
if (!completedSteps.includes(idx))
|
|
105
|
+
return;
|
|
106
|
+
setStep(idx);
|
|
107
|
+
};
|
|
108
|
+
const goNext = () => {
|
|
109
|
+
const currentId = wizardStepIds[currentStep];
|
|
110
|
+
if (!stepValidity[currentId])
|
|
111
|
+
return;
|
|
112
|
+
setCompletedSteps(prev => Array.from(new Set([...prev, currentStep])));
|
|
113
|
+
setStep(Math.min(currentStep + 1, wizardStepIds.length - 1));
|
|
114
|
+
};
|
|
115
|
+
const doPublish = async () => {
|
|
116
|
+
setPublishError(null);
|
|
117
|
+
setPublishing(true);
|
|
118
|
+
try {
|
|
119
|
+
const parsed = tenderPublishSchema.safeParse(effectiveDraft);
|
|
120
|
+
if (!parsed.success) {
|
|
121
|
+
setPublishError({ code: "VALIDATION", message: parsed.error.issues.map(i => i.message).join("; ") });
|
|
122
|
+
setPublishing(false);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const s = draftHook.state;
|
|
126
|
+
if (s.phase !== "created") {
|
|
127
|
+
setPublishError({ code: "VALIDATION", message: "No draft to publish. Autosave may still be in progress." });
|
|
128
|
+
setPublishing(false);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const { tenderId } = await publishDraft(s.draftId, idempotencyKey);
|
|
132
|
+
onPublished?.(tenderId);
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
const err = e;
|
|
136
|
+
setPublishError({ code: err?.code ?? "SERVER", message: err?.message ?? "Publish failed. Retry." });
|
|
137
|
+
}
|
|
138
|
+
finally {
|
|
139
|
+
setPublishing(false);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
const doSaveEdit = async () => {
|
|
143
|
+
setPublishError(null);
|
|
144
|
+
setPublishing(true);
|
|
145
|
+
try {
|
|
146
|
+
const parsed = tenderPublishSchema.safeParse(effectiveDraft);
|
|
147
|
+
if (!parsed.success) {
|
|
148
|
+
setPublishError({ code: "VALIDATION", message: parsed.error.issues.map(i => i.message).join("; ") });
|
|
149
|
+
setPublishing(false);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const s = draftHook.state;
|
|
153
|
+
if (s.phase !== "created" || !saveEdit) {
|
|
154
|
+
setPublishError({ code: "VALIDATION", message: "Nothing to save." });
|
|
155
|
+
setPublishing(false);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
await saveEdit(s.draftId, effectiveDraft, s.version);
|
|
159
|
+
onClose();
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
const err = e;
|
|
163
|
+
setPublishError({ code: err?.code ?? "SERVER", message: err?.message ?? "Save failed." });
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
setPublishing(false);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
const stepContent = () => {
|
|
170
|
+
switch (wizardStepIds[currentStep]) {
|
|
171
|
+
case "tender":
|
|
172
|
+
return (_jsx("div", { "data-wizard-step": "tender", children: _jsx(StepTenderBasics, { initialValues: {
|
|
173
|
+
name: effectiveDraft.name,
|
|
174
|
+
targetCountry: effectiveDraft.targetCountry,
|
|
175
|
+
instructions: effectiveDraft.instructions,
|
|
176
|
+
}, onChange: applyTenderFields, onValidityChange: onValidityTender }) }));
|
|
177
|
+
case "opportunities":
|
|
178
|
+
return (_jsx("div", { "data-wizard-step": "opportunities", children: _jsx(StepOpportunities, { items: effectiveDraft.opportunities ?? [], onChange: onApplyOpportunities, onValidityChange: onValidityOpportunities }) }));
|
|
179
|
+
case "pricing":
|
|
180
|
+
return (_jsx("div", { "data-wizard-step": "pricing", children: _jsx(StepPricingTimeline, { items: effectiveDraft.opportunities ?? [], onChange: onApplyOpportunities, onValidityChange: onValidityPricing }) }));
|
|
181
|
+
case "review":
|
|
182
|
+
return _jsx("div", { "data-wizard-step": "review", children: _jsx(StepReview, { tender: effectiveDraft }) });
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const isLastStep = currentStep === wizardStepIds.length - 1;
|
|
186
|
+
const currentId = wizardStepIds[currentStep];
|
|
187
|
+
const canContinue = stepValidity[currentId];
|
|
188
|
+
return (_jsxs("div", { className: cn("flex h-full flex-col gap-6 bg-background p-6", className), children: [_jsxs("header", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold", children: mode === "edit" ? "Edit opportunity" : "Create opportunity" }), _jsx("p", { className: "sr-only", children: "Press Escape to save and exit. Tab to navigate fields." })] }), _jsx("button", { type: "button", onClick: onClose, "aria-label": "Close", className: "rounded-sm p-1 hover:bg-accent", children: _jsx(X, { "aria-hidden": true, className: "size-5" }) })] }), mode === "edit" ? (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900", children: [_jsx(Info, { "aria-hidden": true, className: "size-5 mt-0.5 flex-shrink-0" }), _jsx("p", { children: "Editing published opportunity - your changes will be visible to producers as soon as you save." })] })) : null, draftHook.conflictDetected ? (_jsxs("div", { role: "alert", "aria-live": "assertive", className: "flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-900", children: [_jsx(Info, { "aria-hidden": true, className: "size-5 mt-0.5 flex-shrink-0" }), _jsx("p", { className: "flex-1", children: "Your draft was updated in another tab. Accept the server version to continue, or keep your local changes and try again." }), _jsx("button", { type: "button", onClick: () => {
|
|
189
|
+
if (draftHook.state.phase !== "created")
|
|
190
|
+
return;
|
|
191
|
+
draftHook.acceptServerConflict({}, draftHook.state.version + 1);
|
|
192
|
+
}, className: "rounded-md bg-emerald-700 px-3 py-1 text-xs text-white", children: "Accept server version" })] })) : null, draftHook.resumeSuggestion === "local" ? (_jsxs("div", { role: "status", "aria-live": "polite", className: "flex items-start gap-2 rounded-md border border-sky-200 bg-sky-50 p-3 text-sm text-sky-900", children: [_jsx(Info, { "aria-hidden": true, className: "size-5 mt-0.5 flex-shrink-0" }), _jsx("p", { className: "flex-1", children: "Local changes found from your last session." }), _jsx("button", { type: "button", onClick: draftHook.acceptLocalResume, className: "rounded-md bg-emerald-700 px-3 py-1 text-xs text-white", children: "Keep local" }), _jsx("button", { type: "button", onClick: draftHook.dismissLocalResume, className: "rounded-md border border-border bg-background px-3 py-1 text-xs", children: "Use server" })] })) : null, _jsx(WizardStepper, { steps: wizardStepIds.map(id => ({ id, label: stepLabels[id] })), currentIndex: currentStep, completedIndexes: completedSteps, activeSubStatus: mode === "draft" && draftHook.state.phase === "created"
|
|
193
|
+
? draftHook.localOnly ? "Local only" : "Autosaved"
|
|
194
|
+
: null, onJumpBack: goBack }), _jsx("div", { className: "flex-1 overflow-auto", children: stepContent() }), _jsx("div", { ref: announceRef, role: "status", "aria-live": "polite", className: "sr-only" }), publishError ? (_jsxs("div", { role: "alert", "aria-live": "assertive", className: "rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-800", children: [_jsxs("strong", { children: [publishError.code, ":"] }), " ", publishError.message] })) : null, _jsxs("footer", { className: "flex items-center justify-between gap-2 border-t border-border pt-4", children: [_jsx("button", { type: "button", onClick: onClose, className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm", children: "Cancel" }), _jsxs("div", { className: "flex items-center gap-2", children: [currentStep > 0 ? (_jsx("button", { type: "button", onClick: () => setStep(currentStep - 1), className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm", children: "Back" })) : null, mode === "edit" ? (_jsxs(_Fragment, { children: [!isLastStep ? (_jsx("button", { type: "button", onClick: goNext, "aria-disabled": !canContinue || undefined, title: !canContinue ? "Complete required fields to continue" : undefined, className: cn("rounded-md border border-border bg-background px-3 py-1.5 text-sm", canContinue ? "hover:bg-accent" : "opacity-60 cursor-not-allowed"), children: "Continue" })) : null, _jsx("button", { type: "button", onClick: doSaveEdit, disabled: publishing, className: "rounded-md bg-emerald-700 px-3 py-1.5 text-sm text-white", children: publishing ? "Saving..." : "Save changes" })] })) : !isLastStep ? (_jsx("button", { type: "button", onClick: goNext, "aria-disabled": !canContinue || undefined, title: !canContinue ? "Complete required fields to continue" : undefined, className: cn("rounded-md px-3 py-1.5 text-sm text-white", canContinue ? "bg-emerald-700 hover:bg-emerald-800" : "bg-slate-300 cursor-not-allowed"), children: "Continue" })) : (_jsx("button", { type: "button", onClick: doPublish, disabled: publishing, className: "rounded-md bg-emerald-700 px-3 py-1.5 text-sm text-white", children: publishing ? "Publishing..." : "Publish" }))] })] })] }));
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=opportunity-wizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-wizard.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/opportunity-wizard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,eA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I,EACR,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAC,0DAA0D,YAClI,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,GACnC,IACR,CACJ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAChB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAM,mBACA,CAAC,WAAW,IAAI,SAAS,EACxC,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,SAAS,EACxE,SAAS,EAAE,EAAE,CACX,2CAA2C,EAC3C,WAAW,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC,iCAAiC,CACxF,yBAGM,CACV,CAAC,CAAC,CAAC,CACF,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAC,0DAA0D,YACjI,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,GAClC,CACV,IACG,IACC,IACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { OpportunityWizard } from "./opportunity-wizard";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof OpportunityWizard;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const DraftMode: Story;
|
|
11
|
+
export declare const EditMode: Story;
|
|
12
|
+
//# sourceMappingURL=opportunity-wizard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-wizard.stories.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/opportunity-wizard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,IAAI;;;;CAIgC,CAAC;AAC3C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAWnC,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA4BtB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { OpportunityWizard } from "./opportunity-wizard";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Opportunities/Wizard/OpportunityWizard",
|
|
5
|
+
component: OpportunityWizard,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
const mockCallbacks = {
|
|
10
|
+
createDraft: async () => ({ id: "mock-draft", version: 1 }),
|
|
11
|
+
patchDraft: async () => ({ version: 2 }),
|
|
12
|
+
publishDraft: async () => ({ tenderId: "mock-tender" }),
|
|
13
|
+
saveEdit: async () => ({ version: 3 }),
|
|
14
|
+
onClose: () => console.warn("close"),
|
|
15
|
+
onPublished: (id) => console.warn("published", id),
|
|
16
|
+
};
|
|
17
|
+
export const DraftMode = {
|
|
18
|
+
args: {
|
|
19
|
+
mode: "draft",
|
|
20
|
+
...mockCallbacks,
|
|
21
|
+
},
|
|
22
|
+
render: (args) => (_jsx("div", { className: "h-[700px] border border-border", children: _jsx(OpportunityWizard, { ...args }) })),
|
|
23
|
+
};
|
|
24
|
+
export const EditMode = {
|
|
25
|
+
args: {
|
|
26
|
+
mode: "edit",
|
|
27
|
+
initialDraft: {
|
|
28
|
+
id: "existing-1",
|
|
29
|
+
name: "Existing Tender",
|
|
30
|
+
targetCountry: "SE",
|
|
31
|
+
instructions: "Already-published tender being edited.",
|
|
32
|
+
opportunities: [{
|
|
33
|
+
clientId: "c1",
|
|
34
|
+
name: "Existing opportunity",
|
|
35
|
+
category: "wine",
|
|
36
|
+
countryOfOrigin: "FR",
|
|
37
|
+
volume: 5000,
|
|
38
|
+
priceMin: 8,
|
|
39
|
+
priceMax: 12,
|
|
40
|
+
currency: "EUR",
|
|
41
|
+
submissionDeadline: new Date("2026-06-01"),
|
|
42
|
+
}],
|
|
43
|
+
},
|
|
44
|
+
initialVersion: 1,
|
|
45
|
+
...mockCallbacks,
|
|
46
|
+
},
|
|
47
|
+
render: (args) => (_jsx("div", { className: "h-[700px] border border-border", children: _jsx(OpportunityWizard, { ...args }) })),
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=opportunity-wizard.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-wizard.stories.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/opportunity-wizard.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,wCAAwC;IAC/C,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;CACsB,CAAC;AAC3C,eAAe,IAAI,CAAC;AAGpB,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3D,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACxC,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IACvD,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,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
items: OpportunityDraft[];
|
|
4
|
+
onChange: (next: OpportunityDraft[]) => void;
|
|
5
|
+
onValidityChange?: (valid: boolean) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function StepOpportunities({ items, onChange, onValidityChange, className }: StepOpportunitiesProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=step-opportunities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-opportunities.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-opportunities.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,sBAAsB,2CA6EzG"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
4
|
+
import { Plus, Trash2 } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
const VIRTUALIZE_THRESHOLD = 20;
|
|
7
|
+
function makeNewOpportunity() {
|
|
8
|
+
return {
|
|
9
|
+
clientId: crypto.randomUUID(),
|
|
10
|
+
name: "",
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function StepOpportunities({ items, onChange, onValidityChange, className }) {
|
|
14
|
+
const [expandedSet, setExpandedSet] = React.useState(() => new Set(items.map(i => i.clientId)));
|
|
15
|
+
const updateItem = (clientId, patch) => {
|
|
16
|
+
onChange(items.map(it => (it.clientId === clientId ? { ...it, ...patch } : it)));
|
|
17
|
+
};
|
|
18
|
+
const addItem = () => {
|
|
19
|
+
const next = makeNewOpportunity();
|
|
20
|
+
onChange([...items, next]);
|
|
21
|
+
setExpandedSet(prev => new Set([...prev, next.clientId]));
|
|
22
|
+
};
|
|
23
|
+
const removeItem = (clientId) => {
|
|
24
|
+
onChange(items.filter(it => it.clientId !== clientId));
|
|
25
|
+
setExpandedSet(prev => { const s = new Set(prev); s.delete(clientId); return s; });
|
|
26
|
+
};
|
|
27
|
+
const toggle = (clientId) => {
|
|
28
|
+
setExpandedSet(prev => {
|
|
29
|
+
const s = new Set(prev);
|
|
30
|
+
if (s.has(clientId))
|
|
31
|
+
s.delete(clientId);
|
|
32
|
+
else
|
|
33
|
+
s.add(clientId);
|
|
34
|
+
return s;
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
const valid = items.length >= 1 && items.every(i => (i.name ?? "").trim().length > 0);
|
|
39
|
+
onValidityChange?.(valid);
|
|
40
|
+
}, [items, onValidityChange]);
|
|
41
|
+
if (items.length >= VIRTUALIZE_THRESHOLD) {
|
|
42
|
+
return (_jsx(VirtualizedList, { items: items, expandedSet: expandedSet, onToggle: toggle, onUpdateItem: updateItem, onRemoveItem: removeItem, onAddItem: addItem, className: className }));
|
|
43
|
+
}
|
|
44
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-3", className), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "text-xs text-muted-foreground", children: [items.length, " opportunit", items.length === 1 ? "y" : "ies"] }), items.length >= 3 ? (_jsx("button", { type: "button", className: "text-xs underline underline-offset-2 text-muted-foreground", onClick: () => setExpandedSet(new Set(items.map(i => i.clientId))), children: "Expand all" })) : null] }), items.map(it => (_jsx(OpportunityCard, { opp: it, expanded: expandedSet.has(it.clientId), onToggle: () => toggle(it.clientId), onUpdate: (p) => updateItem(it.clientId, p), onRemove: items.length > 1 ? () => removeItem(it.clientId) : undefined }, it.clientId))), _jsxs("button", { type: "button", onClick: addItem, className: "inline-flex items-center gap-1 self-start rounded-md border border-dashed border-border px-3 py-2 text-sm text-muted-foreground hover:bg-accent", children: [_jsx(Plus, { "aria-hidden": true, className: "size-4" }), " Add another opportunity"] })] }));
|
|
45
|
+
}
|
|
46
|
+
function VirtualizedList(props) {
|
|
47
|
+
const parentRef = React.useRef(null);
|
|
48
|
+
// eslint-disable-next-line react-hooks/incompatible-library -- TanStack Virtual's useVirtualizer is a known exception; memoization is handled internally
|
|
49
|
+
const rowVirtualizer = useVirtualizer({
|
|
50
|
+
count: props.items.length,
|
|
51
|
+
getScrollElement: () => parentRef.current,
|
|
52
|
+
estimateSize: (i) => (props.expandedSet.has(props.items[i].clientId) ? 420 : 72),
|
|
53
|
+
overscan: 5,
|
|
54
|
+
});
|
|
55
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-3", props.className), children: [_jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { className: "text-xs text-muted-foreground", children: [props.items.length, " opportunities \u00B7 virtualized"] }) }), _jsx("div", { ref: parentRef, className: "max-h-[60vh] overflow-auto", children: _jsx("div", { style: { height: `${rowVirtualizer.getTotalSize()}px`, position: "relative" }, children: rowVirtualizer.getVirtualItems().map(row => {
|
|
56
|
+
const it = props.items[row.index];
|
|
57
|
+
return (_jsx("div", { style: { position: "absolute", top: 0, left: 0, right: 0, transform: `translateY(${row.start}px)` }, children: _jsx(OpportunityCard, { opp: it, expanded: props.expandedSet.has(it.clientId), onToggle: () => props.onToggle(it.clientId), onUpdate: (p) => props.onUpdateItem(it.clientId, p), onRemove: props.items.length > 1 ? () => props.onRemoveItem(it.clientId) : undefined }) }, it.clientId));
|
|
58
|
+
}) }) }), _jsxs("button", { type: "button", onClick: props.onAddItem, className: "inline-flex items-center gap-1 self-start rounded-md border border-dashed border-border px-3 py-2 text-sm text-muted-foreground hover:bg-accent", children: [_jsx(Plus, { "aria-hidden": true, className: "size-4" }), " Add another opportunity"] })] }));
|
|
59
|
+
}
|
|
60
|
+
function OpportunityCard({ opp, expanded, onToggle, onUpdate, onRemove, }) {
|
|
61
|
+
return (_jsxs("div", { className: "rounded-lg border border-border bg-card p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("button", { type: "button", onClick: onToggle, className: "text-left flex-1", "aria-expanded": expanded, children: [_jsx("div", { className: "text-sm font-semibold", children: opp.name?.trim() || "Untitled opportunity" }), _jsxs("div", { className: "text-xs text-muted-foreground", children: [opp.category ?? "-", " \u00B7 ", opp.countryOfOrigin ?? "-", " \u00B7 ", opp.volume ?? "-", " bottles"] })] }), onRemove ? (_jsx("button", { type: "button", onClick: onRemove, "aria-label": "Remove opportunity", className: "ml-2 rounded-xs p-1 text-muted-foreground hover:bg-red-50 hover:text-red-700", children: _jsx(Trash2, { "aria-hidden": true, className: "size-4" }) })) : null] }), expanded ? (_jsxs("div", { className: "mt-3 grid grid-cols-1 gap-3 md:grid-cols-2", children: [_jsx(LabeledInput, { label: "Name", value: opp.name ?? "", onChange: (v) => onUpdate({ name: v }), required: true }), _jsx(LabeledInput, { label: "Category", value: opp.category ?? "", onChange: (v) => onUpdate({ category: v }) }), _jsx(LabeledInput, { label: "Subtype", value: opp.subtype ?? "", onChange: (v) => onUpdate({ subtype: v }) }), _jsx(LabeledInput, { label: "Country of origin (ISO-2)", value: opp.countryOfOrigin ?? "", onChange: (v) => onUpdate({ countryOfOrigin: v.toUpperCase() }) }), _jsx(LabeledInput, { label: "Packaging", value: opp.packaging ?? "", onChange: (v) => onUpdate({ packaging: v }) }), _jsx(LabeledInput, { label: "Closure", value: opp.closure ?? "", onChange: (v) => onUpdate({ closure: v }) }), _jsx(LabeledInput, { label: "Volume (bottles)", type: "number", value: opp.volume ?? "", onChange: (v) => onUpdate({ volume: v ? Number(v) : undefined }) })] })) : null] }));
|
|
62
|
+
}
|
|
63
|
+
function LabeledInput({ label, value, onChange, type = "text", required, }) {
|
|
64
|
+
const [internal, setInternal] = React.useState(String(value ?? ""));
|
|
65
|
+
// Sync from parent when value changes externally (e.g. item replaced)
|
|
66
|
+
const prevValueRef = React.useRef(String(value ?? ""));
|
|
67
|
+
React.useEffect(() => {
|
|
68
|
+
const next = String(value ?? "");
|
|
69
|
+
if (next !== prevValueRef.current) {
|
|
70
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect -- idempotent: only updates when value differs from previous
|
|
71
|
+
setInternal(next);
|
|
72
|
+
prevValueRef.current = next;
|
|
73
|
+
}
|
|
74
|
+
}, [value]);
|
|
75
|
+
return (_jsxs("label", { className: "block text-sm", children: [_jsxs("span", { className: "block font-medium", children: [label, required ? " *" : ""] }), _jsx("input", { type: type, value: internal, onChange: (e) => {
|
|
76
|
+
setInternal(e.target.value);
|
|
77
|
+
onChange(e.target.value);
|
|
78
|
+
}, required: required, className: "mt-1 w-full rounded-xs border border-border bg-background px-3 py-2 text-sm" })] }));
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=step-opportunities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-opportunities.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-opportunities.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAGrC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAShC,SAAS,kBAAkB;IACzB,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE;QAC7B,IAAI,EAAE,EAAE;KACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,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,EAAE,IAAI,EACV,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAC5B,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,6EAA6E,GACvF,IACI,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OpportunityDraft } from "./wizard.types";
|
|
2
|
+
export interface StepPricingTimelineProps {
|
|
3
|
+
items: OpportunityDraft[];
|
|
4
|
+
onChange: (next: OpportunityDraft[]) => void;
|
|
5
|
+
onValidityChange?: (valid: boolean) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function StepPricingTimeline({ items, onChange, onValidityChange, className }: StepPricingTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=step-pricing-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-pricing-timeline.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-pricing-timeline.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,gBAAgB,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CA8F7G"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as Tabs from "@radix-ui/react-tabs";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
const pricingKeys = ["priceMin", "priceMax", "currency", "targetMargin", "distributionRequirements", "submissionDeadline", "sampleDeadline", "launchDate"];
|
|
6
|
+
function isComplete(it) {
|
|
7
|
+
return (it.priceMin != null &&
|
|
8
|
+
it.priceMax != null &&
|
|
9
|
+
it.priceMin <= it.priceMax &&
|
|
10
|
+
!!it.submissionDeadline &&
|
|
11
|
+
(!it.sampleDeadline || it.sampleDeadline <= it.submissionDeadline) &&
|
|
12
|
+
(!it.launchDate || it.launchDate >= it.submissionDeadline));
|
|
13
|
+
}
|
|
14
|
+
export function StepPricingTimeline({ items, onChange, onValidityChange, className }) {
|
|
15
|
+
const firstId = items[0]?.clientId;
|
|
16
|
+
const [activeId, setActiveId] = React.useState(firstId ?? "");
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (!items.some(i => i.clientId === activeId)) {
|
|
19
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect -- idempotent: only updates when activeId is stale (not in items)
|
|
20
|
+
setActiveId(items[0]?.clientId ?? "");
|
|
21
|
+
}
|
|
22
|
+
}, [items, activeId]);
|
|
23
|
+
const updateItem = (clientId, patch) => {
|
|
24
|
+
onChange(items.map(it => it.clientId === clientId ? { ...it, ...patch } : it));
|
|
25
|
+
};
|
|
26
|
+
const fillFromFirst = () => {
|
|
27
|
+
if (items.length < 2)
|
|
28
|
+
return;
|
|
29
|
+
const src = items[0];
|
|
30
|
+
const confirmed = window.confirm(`Apply opportunity 1's pricing and timeline to all ${items.length - 1} other opportunit${items.length - 1 === 1 ? "y" : "ies"}?`);
|
|
31
|
+
if (!confirmed)
|
|
32
|
+
return;
|
|
33
|
+
const copyFields = {};
|
|
34
|
+
for (const k of pricingKeys) {
|
|
35
|
+
copyFields[k] = src[k];
|
|
36
|
+
}
|
|
37
|
+
onChange(items.map((it, i) => i === 0 ? it : { ...it, ...copyFields }));
|
|
38
|
+
};
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
const allValid = items.length > 0 && items.every(isComplete);
|
|
41
|
+
onValidityChange?.(allValid);
|
|
42
|
+
}, [items, onValidityChange]);
|
|
43
|
+
if (items.length === 0) {
|
|
44
|
+
return _jsx("p", { className: "text-sm text-muted-foreground", children: "Add at least one opportunity in Step 2 to configure pricing." });
|
|
45
|
+
}
|
|
46
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-4", className), children: [items.length > 1 ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "text-xs text-muted-foreground", children: [items.length, " opportunities"] }), _jsx("button", { type: "button", onClick: fillFromFirst, className: "rounded-md border border-border bg-background px-3 py-1.5 text-xs hover:bg-accent", children: "Fill from opportunity 1" })] })) : null, items.length === 1 ? (_jsx(PricingFields, { opp: items[0], onUpdate: (p) => updateItem(items[0].clientId, p) }, items[0].clientId)) : (_jsxs(Tabs.Root, { value: activeId, onValueChange: setActiveId, activationMode: "manual", children: [_jsx(Tabs.List, { className: "flex flex-wrap gap-1 border-b border-border overflow-x-auto", "aria-label": "Opportunities pricing tabs", children: items.map((it, idx) => {
|
|
47
|
+
const complete = isComplete(it);
|
|
48
|
+
const title = it.name?.trim() || `Opportunity ${idx + 1}`;
|
|
49
|
+
return (_jsxs(Tabs.Trigger, { value: it.clientId, className: "inline-flex items-center gap-1 rounded-t-md px-3 py-2 text-xs font-medium data-[state=active]:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-emerald-500", children: [_jsx("span", { "aria-hidden": true, className: cn("size-2 rounded-full", complete ? "bg-emerald-600" : "bg-amber-400") }), title] }, it.clientId));
|
|
50
|
+
}) }), items.map(it => (_jsx(Tabs.Content, { value: it.clientId, className: "pt-4", children: _jsx(PricingFields, { opp: it, onUpdate: (p) => updateItem(it.clientId, p) }, it.clientId) }, it.clientId)))] }))] }));
|
|
51
|
+
}
|
|
52
|
+
function PricingFields({ opp, onUpdate }) {
|
|
53
|
+
// Local state mirrors props so validation errors show immediately on user input
|
|
54
|
+
// even when the parent's onChange is a no-op (e.g., in tests or uncontrolled usage).
|
|
55
|
+
const [local, setLocal] = React.useState({});
|
|
56
|
+
// Merge: props win unless local has an explicit override (tracked by key presence).
|
|
57
|
+
const merged = { ...opp, ...local };
|
|
58
|
+
const update = (patch) => {
|
|
59
|
+
setLocal(prev => ({ ...prev, ...patch }));
|
|
60
|
+
onUpdate(patch);
|
|
61
|
+
};
|
|
62
|
+
return (_jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [_jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Price min" }), _jsx("input", { "aria-label": "Price min", type: "number", min: "0", step: "0.01", value: merged.priceMin ?? "", onChange: (e) => update({ priceMin: e.target.value === "" ? undefined : Number(e.target.value) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Price max" }), _jsx("input", { "aria-label": "Price max", type: "number", min: "0", step: "0.01", value: merged.priceMax ?? "", onChange: (e) => update({ priceMax: e.target.value === "" ? undefined : Number(e.target.value) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" }), merged.priceMin != null && merged.priceMax != null && merged.priceMin > merged.priceMax ? (_jsx("p", { className: "mt-1 text-xs text-red-700", children: "Maximum price must be at least the minimum." })) : null] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Currency" }), _jsxs("select", { "aria-label": "Currency", value: merged.currency ?? "", onChange: (e) => update({ currency: (e.target.value || undefined) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm", children: [_jsx("option", { value: "", children: "Select..." }), ["EUR", "USD", "SEK", "NOK", "DKK", "GBP", "CHF", "JPY"].map(c => _jsx("option", { value: c, children: c }, c))] })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Target margin (0-1)" }), _jsx("input", { "aria-label": "Target margin", type: "number", min: "0", max: "1", step: "0.01", value: merged.targetMargin ?? "", onChange: (e) => update({ targetMargin: e.target.value === "" ? undefined : Number(e.target.value) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm md:col-span-2", children: [_jsx("span", { className: "block font-medium", children: "Distribution requirements (optional)" }), _jsx("textarea", { "aria-label": "Distribution requirements", rows: 3, value: merged.distributionRequirements ?? "", onChange: (e) => update({ distributionRequirements: e.target.value }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Submission deadline *" }), _jsx("input", { "aria-label": "Submission deadline", type: "date", value: merged.submissionDeadline ? merged.submissionDeadline.toISOString().slice(0, 10) : "", onChange: (e) => update({ submissionDeadline: e.target.value ? new Date(e.target.value) : undefined }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Sample deadline (optional)" }), _jsx("input", { "aria-label": "Sample deadline", type: "date", value: merged.sampleDeadline ? merged.sampleDeadline.toISOString().slice(0, 10) : "", onChange: (e) => update({ sampleDeadline: e.target.value ? new Date(e.target.value) : undefined }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" }), merged.sampleDeadline && merged.submissionDeadline && merged.sampleDeadline > merged.submissionDeadline ? (_jsx("p", { className: "mt-1 text-xs text-red-700", children: "Sample deadline must be on or before the submission deadline." })) : null] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Launch date (optional)" }), _jsx("input", { "aria-label": "Launch date", type: "date", value: merged.launchDate ? merged.launchDate.toISOString().slice(0, 10) : "", onChange: (e) => update({ launchDate: e.target.value ? new Date(e.target.value) : undefined }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" }), merged.launchDate && merged.submissionDeadline && merged.launchDate < merged.submissionDeadline ? (_jsx("p", { className: "mt-1 text-xs text-red-700", children: "Launch date must be on or after the submission deadline." })) : null] })] }));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=step-pricing-timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-pricing-timeline.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-pricing-timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAUrC,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,CAAU,CAAC;AAEpK,SAAS,UAAU,CAAC,EAAoB;IACtC,OAAO,CACL,EAAE,CAAC,QAAQ,IAAI,IAAI;QACnB,EAAE,CAAC,QAAQ,IAAI,IAAI;QACnB,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,QAAQ;QAC1B,CAAC,CAAC,EAAE,CAAC,kBAAkB;QACvB,CAAC,CAAC,EAAE,CAAC,cAAc,IAAI,EAAE,CAAC,cAAc,IAAI,EAAE,CAAC,kBAAkB,CAAC;QAClE,CAAC,CAAC,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,kBAAkB,CAAC,CAC3D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAA4B;IAC5G,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,Q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CAAC,CAAC,CAAC,CACjG,YAAG,SAAS,EAAC,2BAA2B,yEAA6D,CACtG,CAAC,CAAC,CAAC,IAAI,IACF,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TenderDraft, OpportunityDraft } from "./wizard.types";
|
|
2
|
+
import type { OpportunityView } from "../types";
|
|
3
|
+
export interface StepReviewProps {
|
|
4
|
+
tender: Partial<TenderDraft>;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function draftToView(tenderName: string, targetCountry: string, opp: OpportunityDraft): OpportunityView;
|
|
8
|
+
export declare function StepReview({ tender, className }: StepReviewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=step-review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-review.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,UAAU,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,eAAe,CAe7G;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,2CAsDhE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { OpportunityStackedCard } from "../opportunity-stacked-card";
|
|
3
|
+
import { ChannelBadge } from "../opportunity-channel-badge";
|
|
4
|
+
import { CountdownPill } from "../../components/countdown-pill";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
export function draftToView(tenderName, targetCountry, opp) {
|
|
7
|
+
const subtitleFacts = [];
|
|
8
|
+
if (opp.category)
|
|
9
|
+
subtitleFacts.push({ type: "text", text: opp.category });
|
|
10
|
+
if (opp.volume != null)
|
|
11
|
+
subtitleFacts.push({ type: "count", value: opp.volume, suffix: "bottles" });
|
|
12
|
+
return {
|
|
13
|
+
id: opp.clientId,
|
|
14
|
+
tenderId: "draft",
|
|
15
|
+
productName: opp.name?.trim() || "Untitled opportunity",
|
|
16
|
+
buyerName: tenderName || "Your tender",
|
|
17
|
+
countryCode: opp.countryOfOrigin ?? targetCountry ?? "",
|
|
18
|
+
subtitleFacts,
|
|
19
|
+
deadline: opp.submissionDeadline ?? null,
|
|
20
|
+
status: "open",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function StepReview({ tender, className }) {
|
|
24
|
+
const opps = tender.opportunities ?? [];
|
|
25
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-5", className), children: [_jsxs("section", { className: "rounded-lg border border-border bg-card p-4", children: [_jsx("h3", { className: "text-sm font-semibold", children: "Tender summary" }), _jsxs("dl", { className: "mt-3 grid grid-cols-1 gap-x-6 gap-y-2 text-sm md:grid-cols-2", children: [_jsxs("div", { children: [_jsx("dt", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Name" }), _jsx("dd", { className: "mt-0.5", children: tender.name || "-" })] }), _jsxs("div", { children: [_jsx("dt", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Target country" }), _jsx("dd", { className: "mt-0.5", children: tender.targetCountry || "-" })] }), tender.instructions ? (_jsxs("div", { className: "md:col-span-2", children: [_jsx("dt", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Instructions" }), _jsx("dd", { className: "mt-0.5 whitespace-pre-wrap", children: tender.instructions })] })) : null] })] }), _jsxs("section", { children: [_jsx("h3", { className: "text-sm font-semibold mb-2", children: "Opportunities producers will see" }), opps.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "No opportunities yet - go back to Step 2." })) : (_jsx("div", { className: "flex flex-col gap-2", children: opps.map(opp => {
|
|
26
|
+
const view = draftToView(tender.name ?? "", tender.targetCountry ?? "", opp);
|
|
27
|
+
return (_jsx(OpportunityStackedCard, { opportunity: view, leftBadge: _jsx(ChannelBadge, { channel: "importer" }), metaRight: _jsx(CountdownPill, { date: view.deadline }), primaryAction: null, readOnly: true, tabs: [{
|
|
28
|
+
id: "overview",
|
|
29
|
+
label: "Overview",
|
|
30
|
+
content: _jsx("div", { className: "p-3 text-xs text-muted-foreground", children: "Producers see the full detail here." }),
|
|
31
|
+
}] }, opp.clientId));
|
|
32
|
+
}) }))] })] }));
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=step-review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-review.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-review.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AASrC,MAAM,UAAU,WAAW,CAAC,UAAkB,EAAE,aAAqB,EAAE,GAAqB;IAC1F,MAAM,aAAa,GAAmB,EAAE,CAAC;IACzC,IAAI,GAAG,CAAC,QAAQ;QAAE,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3E,IAAI,GAAG,CAAC,MAAM,IAAI,IAAI;QAAE,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,MAA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AAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACnB,YAAG,SAAS,EAAC,+BAA+B,0DAA8C,CAC3F,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,qBAAqB,YACjC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;4BACd,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,EAAE,MAAM,CAAC,aAAa,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC;4BAC7E,OAAO,CACL,KAAC,sBAAsB,IAErB,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,KAAC,YAAY,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9C,SAAS,EAAE,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAI,EACjD,aAAa,EAAE,IAAI,EACnB,QAAQ,QACR,IAAI,EAAE,CAAC;wCACL,EAAE,EAAE,UAAU;wCACd,KAAK,EAAE,UAAU;wCACjB,OAAO,EAAE,cAAK,SAAS,EAAC,mCAAmC,oDAA0C;qCACtG,CAAC,IAVG,GAAG,CAAC,QAAQ,CAWjB,CACH,CAAC;wBACJ,CAAC,CAAC,GACE,CACP,IACO,IACN,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const stepSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
targetCountry: z.ZodString;
|
|
5
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type StepTenderBasicsValues = z.infer<typeof stepSchema>;
|
|
8
|
+
export interface StepTenderBasicsProps {
|
|
9
|
+
initialValues?: Partial<StepTenderBasicsValues>;
|
|
10
|
+
onChange: (partial: Partial<StepTenderBasicsValues>) => void;
|
|
11
|
+
onValidityChange?: (valid: boolean) => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function StepTenderBasics({ initialValues, onChange, onValidityChange, className }: StepTenderBasicsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=step-tender-basics.d.ts.map
|