@cellarnode/ui 0.17.4 → 0.19.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.
- 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/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
package/dist/offer/types.d.ts
CHANGED
|
@@ -40,4 +40,122 @@ export interface AttachmentMetadata {
|
|
|
40
40
|
}
|
|
41
41
|
export type OfferActionType = "accept" | "reject" | "withdraw";
|
|
42
42
|
export type { SemanticTone };
|
|
43
|
+
export type MatchState = "ok" | "partial" | "miss" | "not_specified" | "n_a";
|
|
44
|
+
export type MatchHeadline = "strong" | "partial" | "miss";
|
|
45
|
+
export type ViewerAdvantage = "improved" | "neutral" | "worsened";
|
|
46
|
+
export type CriterionId = "price" | "volume" | "alcoholRange" | "residualSugar" | "vintage" | "beverageCategory" | "beverageSubtype" | "country" | "packaging" | "closure" | "certOrganic" | "certFairtrade" | "certSustainable";
|
|
47
|
+
export interface MatchCriterion {
|
|
48
|
+
id: CriterionId;
|
|
49
|
+
label: string;
|
|
50
|
+
state: MatchState;
|
|
51
|
+
offered: string | number | boolean | null;
|
|
52
|
+
required: string | number | boolean | [number, number] | string[] | null;
|
|
53
|
+
reason?: string;
|
|
54
|
+
viewerAdvantage: ViewerAdvantage;
|
|
55
|
+
}
|
|
56
|
+
export interface HiddenReason {
|
|
57
|
+
id: string;
|
|
58
|
+
reason?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface BuyerNote {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}
|
|
65
|
+
export interface OfferFxInfo {
|
|
66
|
+
rate: number;
|
|
67
|
+
base: string;
|
|
68
|
+
quote: string;
|
|
69
|
+
fetchedAt: string;
|
|
70
|
+
provider: string;
|
|
71
|
+
stale?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface MatchEvaluation {
|
|
74
|
+
headline: MatchHeadline;
|
|
75
|
+
headlineSummary: string;
|
|
76
|
+
criteria: MatchCriterion[];
|
|
77
|
+
freeTextFields: BuyerNote[];
|
|
78
|
+
hiddenReasons: HiddenReason[];
|
|
79
|
+
fx?: OfferFxInfo;
|
|
80
|
+
}
|
|
81
|
+
export type Perspective = "producer" | "importer";
|
|
82
|
+
export interface OfferPresenceEntry {
|
|
83
|
+
orgRole: Perspective;
|
|
84
|
+
state: "active" | "idle" | "offline";
|
|
85
|
+
typing: boolean;
|
|
86
|
+
}
|
|
87
|
+
export type TimelineEventKind = "propose" | "counter" | "accept" | "decline" | "withdraw" | "expire" | "message" | "attachment";
|
|
88
|
+
export interface TimelineEventDataBase {
|
|
89
|
+
id: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
actorOrgId: string;
|
|
92
|
+
actorRole: Perspective;
|
|
93
|
+
round?: number;
|
|
94
|
+
}
|
|
95
|
+
export interface ProposeCounterEventData extends TimelineEventDataBase {
|
|
96
|
+
kind: "propose" | "counter";
|
|
97
|
+
terms: OfferTerms;
|
|
98
|
+
previousTerms?: OfferTerms;
|
|
99
|
+
message?: string;
|
|
100
|
+
attachmentCount?: number;
|
|
101
|
+
firstAttachmentName?: string;
|
|
102
|
+
status?: "pending" | "committed";
|
|
103
|
+
}
|
|
104
|
+
export interface AcceptDeclineWithdrawEventData extends TimelineEventDataBase {
|
|
105
|
+
kind: "accept" | "decline" | "withdraw";
|
|
106
|
+
message?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface ExpireEventData extends TimelineEventDataBase {
|
|
109
|
+
kind: "expire";
|
|
110
|
+
expiredAt: string;
|
|
111
|
+
}
|
|
112
|
+
export interface MessageEventData extends TimelineEventDataBase {
|
|
113
|
+
kind: "message";
|
|
114
|
+
content: string;
|
|
115
|
+
attachmentCount?: number;
|
|
116
|
+
}
|
|
117
|
+
export interface AttachmentEventData extends TimelineEventDataBase {
|
|
118
|
+
kind: "attachment";
|
|
119
|
+
fileName: string;
|
|
120
|
+
mimeType: string;
|
|
121
|
+
sizeBytes: number;
|
|
122
|
+
source: "chat" | "round" | "formal";
|
|
123
|
+
}
|
|
124
|
+
export type TimelineEventData = ProposeCounterEventData | AcceptDeclineWithdrawEventData | ExpireEventData | MessageEventData | AttachmentEventData;
|
|
125
|
+
export interface OfferTerms {
|
|
126
|
+
price: number;
|
|
127
|
+
currency: string;
|
|
128
|
+
volume: number;
|
|
129
|
+
volumeUnit?: string;
|
|
130
|
+
incoterms?: string;
|
|
131
|
+
paymentTerms?: string;
|
|
132
|
+
deliveryDate?: string;
|
|
133
|
+
validUntil?: string;
|
|
134
|
+
minimumOrderQuantity?: number;
|
|
135
|
+
advancePayment?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface OfferPartyInfo {
|
|
138
|
+
orgId: string;
|
|
139
|
+
name: string;
|
|
140
|
+
logoUrl?: string | null;
|
|
141
|
+
location?: string;
|
|
142
|
+
primaryContactName?: string;
|
|
143
|
+
primaryContactEmail?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface OfferAttachmentItem {
|
|
146
|
+
id: string;
|
|
147
|
+
fileName: string;
|
|
148
|
+
mimeType: string;
|
|
149
|
+
sizeBytes: number;
|
|
150
|
+
uploadedAt: string;
|
|
151
|
+
source: "chat" | "round" | "formal";
|
|
152
|
+
sourceLabel?: string;
|
|
153
|
+
downloadUrl?: string;
|
|
154
|
+
}
|
|
155
|
+
export type OfferSectionId = "parties" | "opportunity" | "product" | "terms" | "match" | "notes" | "attachments" | "negotiation";
|
|
156
|
+
export interface SectionOverride {
|
|
157
|
+
hidden?: boolean;
|
|
158
|
+
defaultOpen?: boolean;
|
|
159
|
+
order?: number;
|
|
160
|
+
}
|
|
43
161
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/offer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM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f,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,aAAa,GACb,SAAS,GACT,OAAO,GACP,OAAO,GACP,OAAO,GACP,aAAa,GACb,aAAa,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-card-actions-menu.a11y.test.d.ts","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { axe } from "vitest-axe";
|
|
5
|
+
import { toHaveNoViolations } from "vitest-axe/matchers";
|
|
6
|
+
import { OpportunityCardActionsMenu } from "../opportunity-card-actions-menu";
|
|
7
|
+
// @ts-expect-error vitest-axe types
|
|
8
|
+
expect.extend({ toHaveNoViolations });
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
Element.prototype.hasPointerCapture ??= () => false;
|
|
11
|
+
Element.prototype.setPointerCapture ??= () => { };
|
|
12
|
+
Element.prototype.releasePointerCapture ??= () => { };
|
|
13
|
+
Element.prototype.scrollIntoView ??= () => { };
|
|
14
|
+
vi.stubGlobal("requestAnimationFrame", (cb) => { cb(0); return 0; });
|
|
15
|
+
vi.stubGlobal("cancelAnimationFrame", () => { });
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => { vi.unstubAllGlobals(); });
|
|
18
|
+
describe("a11y: OpportunityCardActionsMenu", () => {
|
|
19
|
+
it("Status open (closed menu) has no violations", async () => {
|
|
20
|
+
const { container } = render(_jsx(OpportunityCardActionsMenu, { status: "open", onSelect: () => { } }));
|
|
21
|
+
// @ts-expect-error vitest-axe types
|
|
22
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
23
|
+
});
|
|
24
|
+
it("Status draft (closed menu) has no violations", async () => {
|
|
25
|
+
const { container } = render(_jsx(OpportunityCardActionsMenu, { status: "draft", onSelect: () => { } }));
|
|
26
|
+
// @ts-expect-error vitest-axe types
|
|
27
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
28
|
+
});
|
|
29
|
+
it("Status closed (closed menu) has no violations", async () => {
|
|
30
|
+
const { container } = render(_jsx(OpportunityCardActionsMenu, { status: "closed", onSelect: () => { } }));
|
|
31
|
+
// @ts-expect-error vitest-axe types
|
|
32
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
33
|
+
});
|
|
34
|
+
it("Status expired (closed menu) has no violations", async () => {
|
|
35
|
+
const { container } = render(_jsx(OpportunityCardActionsMenu, { status: "expired", onSelect: () => { } }));
|
|
36
|
+
// @ts-expect-error vitest-axe types
|
|
37
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=opportunity-card-actions-menu.a11y.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-card-actions-menu.a11y.test.js","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,oCAAoC;AACpC,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAEtC,UAAU,CAAC,GAAG,EAAE;IACd,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IACpD,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IACjD,OAAO,CAAC,SAAS,CAAC,qBAAqB,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IACrD,OAAO,CAAC,SAAS,CAAC,cAAc,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IAC9C,EAAE,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,EA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AC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,KAAC,0BAA0B,IAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAAI,CAAC,CAAC;QAClG,oCAAoC;QACpC,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-celebration.a11y.test.d.ts","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-celebration.a11y.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { axe } from "vitest-axe";
|
|
5
|
+
import { toHaveNoViolations } from "vitest-axe/matchers";
|
|
6
|
+
import { OpportunityCelebration } from "../opportunity-celebration";
|
|
7
|
+
// @ts-expect-error vitest-axe types
|
|
8
|
+
expect.extend({ toHaveNoViolations });
|
|
9
|
+
describe("a11y: OpportunityCelebration", () => {
|
|
10
|
+
it("Success variant has no violations (decorative aria-hidden)", async () => {
|
|
11
|
+
const { container } = render(_jsx("div", { className: "relative border border-border p-4", children: _jsx(OpportunityCelebration, { play: "success" }) }));
|
|
12
|
+
// @ts-expect-error vitest-axe types
|
|
13
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
14
|
+
});
|
|
15
|
+
it("CapacityExceeded variant has no violations", async () => {
|
|
16
|
+
const { container } = render(_jsx("div", { className: "relative border border-border p-4", children: _jsx(OpportunityCelebration, { play: "capacity-exceeded" }) }));
|
|
17
|
+
// @ts-expect-error vitest-axe types
|
|
18
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
19
|
+
});
|
|
20
|
+
it("Error variant has no violations", async () => {
|
|
21
|
+
const { container } = render(_jsx("div", { className: "relative border border-border p-4", children: _jsx(OpportunityCelebration, { play: "error" }) }));
|
|
22
|
+
// @ts-expect-error vitest-axe types
|
|
23
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
24
|
+
});
|
|
25
|
+
it("Null play (no animation) has no violations", async () => {
|
|
26
|
+
const { container } = render(_jsx("div", { className: "relative border border-border p-4", children: _jsx(OpportunityCelebration, { play: null }) }));
|
|
27
|
+
// @ts-expect-error vitest-axe types
|
|
28
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=opportunity-celebration.a11y.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-celebration.a11y.test.js","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-celebration.a11y.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,oCAAoC;AACpC,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAEtC,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;QAC1E,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,cAAK,SAAS,EAAC,mCAAmC,YAChD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","sources":["../../../src/opportunities/__a11y__/opportunity-detail-panel.a11y.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { axe } from "vitest-axe";
|
|
5
|
+
import { toHaveNoViolations } from "vitest-axe/matchers";
|
|
6
|
+
import { OpportunityDetailPanel } from "../opportunity-detail-panel";
|
|
7
|
+
// @ts-expect-error vitest-axe types
|
|
8
|
+
expect.extend({ toHaveNoViolations });
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
Element.prototype.hasPointerCapture ??= () => false;
|
|
11
|
+
Element.prototype.setPointerCapture ??= () => { };
|
|
12
|
+
Element.prototype.releasePointerCapture ??= () => { };
|
|
13
|
+
Element.prototype.scrollIntoView ??= () => { };
|
|
14
|
+
vi.stubGlobal("requestAnimationFrame", (cb) => { cb(0); return 0; });
|
|
15
|
+
vi.stubGlobal("cancelAnimationFrame", () => { });
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => { vi.unstubAllGlobals(); });
|
|
18
|
+
const tabs = [
|
|
19
|
+
{ id: "overview", label: "Overview", content: _jsx("div", { className: "p-3", children: "Overview body with enough text for contrast checks." }) },
|
|
20
|
+
{ id: "timeline", label: "Timeline", content: _jsx("div", { className: "p-3", children: "Timeline body." }) },
|
|
21
|
+
{ id: "compliance", label: "Compliance", content: _jsx("div", { className: "p-3", children: "Compliance body." }) },
|
|
22
|
+
{ id: "buyer", label: "Buyer", content: _jsx("div", { className: "p-3", children: "Buyer body." }) },
|
|
23
|
+
];
|
|
24
|
+
describe("a11y: OpportunityDetailPanel", () => {
|
|
25
|
+
it("All 4 tabs rendered has no violations", async () => {
|
|
26
|
+
const { container } = render(_jsx(OpportunityDetailPanel, { tabs: tabs }));
|
|
27
|
+
// @ts-expect-error vitest-axe types
|
|
28
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
29
|
+
});
|
|
30
|
+
it("ImporterTabsHidden variant has no violations", async () => {
|
|
31
|
+
const withHidden = [
|
|
32
|
+
tabs[0],
|
|
33
|
+
tabs[1],
|
|
34
|
+
{ ...tabs[2], hidden: true },
|
|
35
|
+
{ ...tabs[3], hidden: true },
|
|
36
|
+
];
|
|
37
|
+
const { container } = render(_jsx(OpportunityDetailPanel, { tabs: withHidden }));
|
|
38
|
+
// @ts-expect-error vitest-axe types
|
|
39
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=opportunity-detail-panel.a11y.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-detail-panel.a11y.test.js","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-detail-panel.a11y.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,oCAAoC;AACpC,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAEtC,UAAU,CAAC,GAAG,EAAE;IACd,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IACpD,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IACjD,OAAO,CAAC,SAAS,CAAC,qBAAqB,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IACrD,OAAO,CA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C,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,UAAU,GAAqB;YACnC,IAAI,CAAC,CAAC,CAAC;YACP,IAAI,CAAC,CAAC,CAAC;YACP,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;YAC5B,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;SAC7B,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,KAAC,sBAAsB,IAAC,IAAI,EAAE,UAAU,GAAI,CAAC,CAAC;QAC3E,oCAAoC;QACpC,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar.a11y.test.d.ts","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-filter-bar.a11y.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { axe } from "vitest-axe";
|
|
5
|
+
import { toHaveNoViolations } from "vitest-axe/matchers";
|
|
6
|
+
import { OpportunityFilterBar } from "../opportunity-filter-bar";
|
|
7
|
+
// @ts-expect-error vitest-axe types
|
|
8
|
+
expect.extend({ toHaveNoViolations });
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
Element.prototype.hasPointerCapture ??= () => false;
|
|
11
|
+
Element.prototype.setPointerCapture ??= () => { };
|
|
12
|
+
Element.prototype.releasePointerCapture ??= () => { };
|
|
13
|
+
Element.prototype.scrollIntoView ??= () => { };
|
|
14
|
+
vi.stubGlobal("requestAnimationFrame", (cb) => { cb(0); return 0; });
|
|
15
|
+
vi.stubGlobal("cancelAnimationFrame", () => { });
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => { vi.unstubAllGlobals(); });
|
|
18
|
+
const statusChip = {
|
|
19
|
+
key: "status",
|
|
20
|
+
label: "Status",
|
|
21
|
+
options: [
|
|
22
|
+
{ value: "all", label: "All", count: 24 },
|
|
23
|
+
{ value: "open", label: "Open", count: 12 },
|
|
24
|
+
{ value: "closed", label: "Closed", count: 8 },
|
|
25
|
+
{ value: "expired", label: "Expired", count: 4 },
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
const channelMulti = {
|
|
29
|
+
key: "channel",
|
|
30
|
+
label: "Channel",
|
|
31
|
+
multi: true,
|
|
32
|
+
options: [
|
|
33
|
+
{ value: "monopoly", label: "Monopoly" },
|
|
34
|
+
{ value: "importer", label: "Importer" },
|
|
35
|
+
{ value: "open", label: "Open Market" },
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
const advanced = [
|
|
39
|
+
{ kind: "select", key: "category", label: "Category", options: [{ value: "wine", label: "Wine" }] },
|
|
40
|
+
];
|
|
41
|
+
const sort = [{ key: "newest", label: "Newest" }];
|
|
42
|
+
describe("a11y: OpportunityFilterBar", () => {
|
|
43
|
+
it("Single-select chips has no violations", async () => {
|
|
44
|
+
const { container } = render(_jsx(OpportunityFilterBar, { chipFilters: [statusChip], advancedFilters: [], sortOptions: sort, searchValue: "", onSearchChange: () => { }, activeFilters: { status: "open" }, onFiltersChange: () => { }, totalCount: 12 }));
|
|
45
|
+
// @ts-expect-error vitest-axe types
|
|
46
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
47
|
+
});
|
|
48
|
+
it("Multi-select chips has no violations", async () => {
|
|
49
|
+
const { container } = render(_jsx(OpportunityFilterBar, { chipFilters: [channelMulti], advancedFilters: [], sortOptions: sort, searchValue: "", onSearchChange: () => { }, activeFilters: { channel: ["monopoly"] }, onFiltersChange: () => { }, totalCount: 8 }));
|
|
50
|
+
// @ts-expect-error vitest-axe types
|
|
51
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
52
|
+
});
|
|
53
|
+
it("With advanced trigger + active filters has no violations", async () => {
|
|
54
|
+
const { container } = render(_jsx(OpportunityFilterBar, { chipFilters: [statusChip], advancedFilters: advanced, sortOptions: sort, searchValue: "prosecco", onSearchChange: () => { }, activeFilters: { status: "open", category: "wine" }, onFiltersChange: () => { }, totalCount: 4 }));
|
|
55
|
+
// @ts-expect-error vitest-axe types
|
|
56
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=opportunity-filter-bar.a11y.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar.a11y.test.js","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-filter-bar.a11y.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,oCAAoC;AACpC,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAEtC,UAAU,CAAC,GAAG,EAAE;IACd,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IACpD,OAAO,CAAC,SAAS,CAAC,iBAAiB,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IACjD,OAAO,CAAC,SAAS,CAAC,qBAAqB,KAAK,GAAG,EAAE,GAAE,CAAC,CAAC;IACrD,OAAO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C,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,KAAK,IAAI,EAAE;QACxE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,KAAC,oBAAoB,IACnB,WAAW,EAAE,CAAC,UAAU,CAAC,EACzB,eAAe,EAAE,QAAQ,EACzB,WAAW,EAAE,IAAI,EACjB,WAAW,EAAC,UAAU,EACtB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC,EACxB,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EACnD,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC,EACzB,UAAU,EAAE,CAAC,GACb,CACH,CAAC;QACF,oCAAoC;QACpC,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-stacked-card.a11y.test.d.ts","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-stacked-card.a11y.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { axe } from "vitest-axe";
|
|
5
|
+
import { toHaveNoViolations } from "vitest-axe/matchers";
|
|
6
|
+
import { OpportunityStackedCard } from "../opportunity-stacked-card";
|
|
7
|
+
import { ChannelBadge } from "../opportunity-channel-badge";
|
|
8
|
+
import { StatusPill } from "../../components/status-pill";
|
|
9
|
+
import { CountdownPill } from "../../components/countdown-pill";
|
|
10
|
+
import { OffersCountChip } from "../opportunity-offers-count-chip";
|
|
11
|
+
// @ts-expect-error vitest-axe types
|
|
12
|
+
expect.extend({ toHaveNoViolations });
|
|
13
|
+
const baseOpp = {
|
|
14
|
+
id: "a11y-1",
|
|
15
|
+
tenderId: "t-1",
|
|
16
|
+
productName: "Organic Prosecco",
|
|
17
|
+
buyerName: "Systembolaget",
|
|
18
|
+
countryCode: "SE",
|
|
19
|
+
subtitleFacts: [
|
|
20
|
+
{ type: "text", text: "Monopoly" },
|
|
21
|
+
{ type: "count", value: 12000, suffix: "bottles" },
|
|
22
|
+
],
|
|
23
|
+
deadline: new Date("2026-05-01T12:00:00Z"),
|
|
24
|
+
status: "open",
|
|
25
|
+
};
|
|
26
|
+
const tabs = [{ id: "overview", label: "Overview", content: _jsx("div", { className: "p-2", children: "Overview content." }) }];
|
|
27
|
+
describe("a11y: OpportunityStackedCard", () => {
|
|
28
|
+
it("Producer variant has no violations", async () => {
|
|
29
|
+
const { container } = render(_jsx(OpportunityStackedCard, { opportunity: baseOpp, leftBadge: _jsx(ChannelBadge, { channel: "monopoly" }), metaRight: _jsx(CountdownPill, { date: baseOpp.deadline }), primaryAction: _jsx("button", { className: "rounded-md bg-emerald-700 px-3 py-1.5 text-xs text-white", children: "Add to Journey" }), tabs: tabs }));
|
|
30
|
+
// @ts-expect-error vitest-axe types
|
|
31
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
32
|
+
});
|
|
33
|
+
it("ImporterOpen variant has no violations", async () => {
|
|
34
|
+
const { container } = render(_jsx(OpportunityStackedCard, { opportunity: { ...baseOpp, status: "open" }, leftBadge: _jsx(StatusPill, { status: "open" }), metaRight: _jsx(OffersCountChip, { count: 7 }), primaryAction: _jsx("button", { className: "rounded-md bg-emerald-700 px-3 py-1.5 text-xs text-white", children: "View offers (7)" }), tabs: tabs }));
|
|
35
|
+
// @ts-expect-error vitest-axe types
|
|
36
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
37
|
+
});
|
|
38
|
+
it("ImporterClosed (deEmphasized) variant has no violations (button contrast preserved)", async () => {
|
|
39
|
+
const { container } = render(_jsx(OpportunityStackedCard, { opportunity: { ...baseOpp, status: "closed" }, leftBadge: _jsx(StatusPill, { status: "closed" }), metaRight: _jsx(OffersCountChip, { count: 3 }), primaryAction: _jsx("button", { className: "rounded-md bg-emerald-700 px-3 py-1.5 text-xs text-white", children: "Reopen" }), deEmphasized: true, tabs: tabs }));
|
|
40
|
+
// @ts-expect-error vitest-axe types
|
|
41
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
42
|
+
});
|
|
43
|
+
it("ReadOnlyPreview has no violations", async () => {
|
|
44
|
+
const { container } = render(_jsx(OpportunityStackedCard, { opportunity: baseOpp, leftBadge: _jsx(ChannelBadge, { channel: "monopoly" }), metaRight: _jsx(CountdownPill, { date: baseOpp.deadline }), primaryAction: null, readOnly: true, tabs: tabs }));
|
|
45
|
+
// @ts-expect-error vitest-axe types
|
|
46
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
47
|
+
});
|
|
48
|
+
it("NoDeadline variant has no violations", async () => {
|
|
49
|
+
const { container } = render(_jsx(OpportunityStackedCard, { opportunity: { ...baseOpp, deadline: null }, leftBadge: _jsx(ChannelBadge, { channel: "monopoly" }), metaRight: _jsx(CountdownPill, { date: null }), primaryAction: _jsx("button", { className: "rounded-md bg-emerald-700 px-3 py-1.5 text-xs text-white", children: "Add" }), tabs: tabs }));
|
|
50
|
+
// @ts-expect-error vitest-axe types
|
|
51
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=opportunity-stacked-card.a11y.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-stacked-card.a11y.test.js","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-stacked-card.a11y.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE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"","sources":["../../../src/opportunities/__a11y__/opportunity-stacked-list.a11y.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { axe } from "vitest-axe";
|
|
5
|
+
import { toHaveNoViolations } from "vitest-axe/matchers";
|
|
6
|
+
import { OpportunityStackedList } from "../opportunity-stacked-list";
|
|
7
|
+
import { OpportunityStackedCard } from "../opportunity-stacked-card";
|
|
8
|
+
import { ChannelBadge } from "../opportunity-channel-badge";
|
|
9
|
+
import { CountdownPill } from "../../components/countdown-pill";
|
|
10
|
+
// @ts-expect-error vitest-axe types
|
|
11
|
+
expect.extend({ toHaveNoViolations });
|
|
12
|
+
const makeOpp = (i) => ({
|
|
13
|
+
id: `opp-${i}`,
|
|
14
|
+
tenderId: `t-${i}`,
|
|
15
|
+
productName: `Product ${i}`,
|
|
16
|
+
buyerName: `Buyer ${i}`,
|
|
17
|
+
countryCode: "SE",
|
|
18
|
+
subtitleFacts: [{ type: "text", text: "Monopoly" }],
|
|
19
|
+
deadline: new Date(Date.now() + (i + 1) * 86400_000),
|
|
20
|
+
status: "open",
|
|
21
|
+
});
|
|
22
|
+
const renderCard = (opp, ctx) => (_jsx(OpportunityStackedCard, { opportunity: opp, leftBadge: _jsx(ChannelBadge, { channel: "monopoly" }), metaRight: _jsx(CountdownPill, { date: opp.deadline }), primaryAction: _jsx("button", { className: "rounded-md bg-emerald-700 px-3 py-1.5 text-xs text-white", children: "Add" }), tabs: [{ id: "overview", label: "Overview", content: _jsx("div", { className: "p-2", children: "body" }) }], expanded: ctx.isExpanded, onExpandChange: ctx.onToggleExpand }));
|
|
23
|
+
describe("a11y: OpportunityStackedList", () => {
|
|
24
|
+
it("Loaded (5 items) has no violations", async () => {
|
|
25
|
+
const { container } = render(_jsx(OpportunityStackedList, { opportunities: [0, 1, 2, 3, 4].map(makeOpp), renderCard: renderCard }));
|
|
26
|
+
// @ts-expect-error vitest-axe types
|
|
27
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
28
|
+
});
|
|
29
|
+
it("Loading (skeleton) has no violations", async () => {
|
|
30
|
+
const { container } = render(_jsx(OpportunityStackedList, { opportunities: [], renderCard: () => null, isLoading: true, skeletonCount: 3 }));
|
|
31
|
+
// @ts-expect-error vitest-axe types
|
|
32
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
33
|
+
});
|
|
34
|
+
it("Empty state has no violations", async () => {
|
|
35
|
+
const { container } = render(_jsx(OpportunityStackedList, { opportunities: [], renderCard: () => null }));
|
|
36
|
+
// @ts-expect-error vitest-axe types
|
|
37
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=opportunity-stacked-list.a11y.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-stacked-list.a11y.test.js","sourceRoot":"","sources":["../../../src/opportunities/__a11y__/opportunity-stacked-list.a11y.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAIhE,oCAAoC;AACpC,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAEtC,MAA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C,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,UAAU,GAAI,CAChG,CAAC;QACF,oCAAoC;QACpC,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,KAAC,sBAAsB,IAAC,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,SAAS,QAAC,aAAa,EAAE,CAAC,GAAI,CAClG,CAAC;QACF,oCAAoC;QACpC,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,KAAC,sBAAsB,IAAC,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,GAAI,CACtE,CAAC;QACF,oCAAoC;QACpC,MAAM,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-add-to-journey-button.test.d.ts","sourceRoot":"","sources":["../../../src/opportunities/__tests__/opportunity-add-to-journey-button.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
|
3
|
+
import { render, screen, waitFor } from "@testing-library/react";
|
|
4
|
+
import userEvent from "@testing-library/user-event";
|
|
5
|
+
import { AddToJourneyButton } from "../opportunity-add-to-journey-button";
|
|
6
|
+
describe("AddToJourneyButton", () => {
|
|
7
|
+
beforeEach(() => { vi.useFakeTimers({ shouldAdvanceTime: true }); });
|
|
8
|
+
afterEach(() => { vi.useRealTimers(); });
|
|
9
|
+
it("morphs to 'In Journey' accessible-name after successful onAdd (without consumer flipping inJourney)", async () => {
|
|
10
|
+
const user = userEvent.setup({ advanceTimers: vi.advanceTimersByTime });
|
|
11
|
+
const onAdd = vi.fn().mockResolvedValue(undefined);
|
|
12
|
+
render(_jsx(AddToJourneyButton, { inJourney: false, onAdd: onAdd }));
|
|
13
|
+
await user.click(screen.getByRole("button", { name: /add this opportunity/i }));
|
|
14
|
+
await waitFor(() => expect(onAdd).toHaveBeenCalled());
|
|
15
|
+
// Advance the 700ms latch timer.
|
|
16
|
+
vi.advanceTimersByTime(800);
|
|
17
|
+
await waitFor(() => {
|
|
18
|
+
expect(screen.getByRole("button", { name: /^in journey/i })).toBeInTheDocument();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
it("maps OFFER_CAPACITY_EXCEEDED code to 'capacity-exceeded' celebration variant", async () => {
|
|
22
|
+
const user = userEvent.setup({ advanceTimers: vi.advanceTimersByTime });
|
|
23
|
+
const onAdd = vi.fn().mockRejectedValue(Object.assign(new Error("limit"), { code: "OFFER_CAPACITY_EXCEEDED" }));
|
|
24
|
+
const { container } = render(_jsx(AddToJourneyButton, { inJourney: false, onAdd: onAdd }));
|
|
25
|
+
await user.click(screen.getByRole("button"));
|
|
26
|
+
await waitFor(() => {
|
|
27
|
+
expect(container.querySelector('[data-opportunity-celebration-sweep][data-variant="capacity-exceeded"]')).toBeTruthy();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
it("when inJourney is true, click routes to onClickWhenAdded and does NOT call onAdd", async () => {
|
|
31
|
+
const user = userEvent.setup({ advanceTimers: vi.advanceTimersByTime });
|
|
32
|
+
const onClickWhenAdded = vi.fn();
|
|
33
|
+
const onAdd = vi.fn();
|
|
34
|
+
render(_jsx(AddToJourneyButton, { inJourney: true, onAdd: onAdd, onClickWhenAdded: onClickWhenAdded }));
|
|
35
|
+
await user.click(screen.getByRole("button", { name: /in journey - open/i }));
|
|
36
|
+
expect(onClickWhenAdded).toHaveBeenCalled();
|
|
37
|
+
expect(onAdd).not.toHaveBeenCalled();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=opportunity-add-to-journey-button.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-add-to-journey-button.test.js","sourceRoot":"","sources":["../../../src/opportunities/__tests__/opportunity-add-to-journey-button.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzC,EAAE,CAAC,qGAAqG,EAAE,KAAK,IAAI,EAAE;QACnH,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,EAAE,CAAC,mBAAmB,EAAE,CAAC,CAAC;QACxE,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;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,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QACzH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kFAAkF,EAAE,KAAK,IAAI,EAAE;QAChG,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,EAAE,CAAC,mBAAmB,EAAE,CAAC,CAAC;QACxE,MAAM,gBAAgB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QACtB,MAAM,CAAC,KAAC,kBAAkB,IAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,CAAC,CAAC;QAClG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;QAC7E,MAAM,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAC5C,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-card-actions-menu.test.d.ts","sourceRoot":"","sources":["../../../src/opportunities/__tests__/opportunity-card-actions-menu.test.tsx"],"names":[],"mappings":""}
|