@portnet/ui 5.0.28 → 6.0.0
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/CHANGELOG.md +524 -0
- package/README.md +101 -38
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +174 -203
- package/dist/index.js.map +1 -0
- package/dist/v2/__tests__/MobileRowCard.test.js +337 -0
- package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -0
- package/dist/v2/__tests__/apiError.test.js +182 -0
- package/dist/v2/__tests__/apiError.test.js.map +1 -0
- package/dist/v2/__tests__/banned-patterns.test.js +272 -0
- package/dist/v2/__tests__/banned-patterns.test.js.map +1 -0
- package/dist/v2/__tests__/contrast-palette.test.js +225 -0
- package/dist/v2/__tests__/contrast-palette.test.js.map +1 -0
- package/dist/v2/__tests__/cssVariables.test.js +158 -0
- package/dist/v2/__tests__/cssVariables.test.js.map +1 -0
- package/dist/v2/__tests__/labels-merge.test.js +153 -0
- package/dist/v2/__tests__/labels-merge.test.js.map +1 -0
- package/dist/v2/__tests__/locale-fallback.test.js +111 -0
- package/dist/v2/__tests__/locale-fallback.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusTrap.test.js +517 -0
- package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -0
- package/dist/v2/components/Accordion.d.ts +56 -0
- package/dist/v2/components/Accordion.d.ts.map +1 -0
- package/dist/v2/components/Accordion.js +238 -0
- package/dist/v2/components/Accordion.js.map +1 -0
- package/dist/v2/components/ActionStrip.d.ts +67 -0
- package/dist/v2/components/ActionStrip.d.ts.map +1 -0
- package/dist/v2/components/ActionStrip.js +154 -0
- package/dist/v2/components/ActionStrip.js.map +1 -0
- package/dist/v2/components/Banner.d.ts +49 -0
- package/dist/v2/components/Banner.d.ts.map +1 -0
- package/dist/v2/components/Banner.js +183 -0
- package/dist/v2/components/Banner.js.map +1 -0
- package/dist/v2/components/Busy.d.ts +18 -0
- package/dist/v2/components/Busy.d.ts.map +1 -0
- package/dist/v2/components/Busy.js +104 -0
- package/dist/v2/components/Busy.js.map +1 -0
- package/dist/v2/components/Button.d.ts +36 -0
- package/dist/v2/components/Button.d.ts.map +1 -0
- package/dist/v2/components/Button.js +122 -0
- package/dist/v2/components/Button.js.map +1 -0
- package/dist/v2/components/CategoryTag.d.ts +45 -0
- package/dist/v2/components/CategoryTag.d.ts.map +1 -0
- package/dist/v2/components/CategoryTag.js +89 -0
- package/dist/v2/components/CategoryTag.js.map +1 -0
- package/dist/v2/components/Checkbox.d.ts +59 -0
- package/dist/v2/components/Checkbox.d.ts.map +1 -0
- package/dist/v2/components/Checkbox.js +134 -0
- package/dist/v2/components/Checkbox.js.map +1 -0
- package/dist/v2/components/Chip.d.ts +48 -0
- package/dist/v2/components/Chip.d.ts.map +1 -0
- package/dist/v2/components/Chip.js +131 -0
- package/dist/v2/components/Chip.js.map +1 -0
- package/dist/v2/components/Combobox.d.ts +134 -0
- package/dist/v2/components/Combobox.d.ts.map +1 -0
- package/dist/v2/components/Combobox.js +399 -0
- package/dist/v2/components/Combobox.js.map +1 -0
- package/dist/v2/components/CommandPalette.d.ts +36 -0
- package/dist/v2/components/CommandPalette.d.ts.map +1 -0
- package/dist/v2/components/CommandPalette.js +672 -0
- package/dist/v2/components/CommandPalette.js.map +1 -0
- package/dist/v2/components/ConfirmDialog.d.ts +23 -0
- package/dist/v2/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/v2/components/ConfirmDialog.js +150 -0
- package/dist/v2/components/ConfirmDialog.js.map +1 -0
- package/dist/v2/components/DatePicker.d.ts +21 -0
- package/dist/v2/components/DatePicker.d.ts.map +1 -0
- package/dist/v2/components/DatePicker.js +207 -0
- package/dist/v2/components/DatePicker.js.map +1 -0
- package/dist/v2/components/DateRangePicker.d.ts +81 -0
- package/dist/v2/components/DateRangePicker.d.ts.map +1 -0
- package/dist/v2/components/DateRangePicker.js +295 -0
- package/dist/v2/components/DateRangePicker.js.map +1 -0
- package/dist/v2/components/DateTimePicker.d.ts +21 -0
- package/dist/v2/components/DateTimePicker.d.ts.map +1 -0
- package/dist/v2/components/DateTimePicker.js +189 -0
- package/dist/v2/components/DateTimePicker.js.map +1 -0
- package/dist/v2/components/Drawer.d.ts +34 -0
- package/dist/v2/components/Drawer.d.ts.map +1 -0
- package/dist/v2/components/Drawer.js +339 -0
- package/dist/v2/components/Drawer.js.map +1 -0
- package/dist/v2/components/Dropzone.d.ts +150 -0
- package/dist/v2/components/Dropzone.d.ts.map +1 -0
- package/dist/v2/components/Dropzone.js +539 -0
- package/dist/v2/components/Dropzone.js.map +1 -0
- package/dist/v2/components/EmptyState.d.ts +36 -0
- package/dist/v2/components/EmptyState.d.ts.map +1 -0
- package/dist/v2/components/EmptyState.js +112 -0
- package/dist/v2/components/EmptyState.js.map +1 -0
- package/dist/v2/components/FavoriteToggle.d.ts +22 -0
- package/dist/v2/components/FavoriteToggle.d.ts.map +1 -0
- package/dist/v2/components/FavoriteToggle.js +134 -0
- package/dist/v2/components/FavoriteToggle.js.map +1 -0
- package/dist/v2/components/Field.d.ts +58 -0
- package/dist/v2/components/Field.d.ts.map +1 -0
- package/dist/v2/components/Field.js +186 -0
- package/dist/v2/components/Field.js.map +1 -0
- package/dist/v2/components/FieldHelp.d.ts +54 -0
- package/dist/v2/components/FieldHelp.d.ts.map +1 -0
- package/dist/v2/components/FieldHelp.js +209 -0
- package/dist/v2/components/FieldHelp.js.map +1 -0
- package/dist/v2/components/FilterTab.d.ts +35 -0
- package/dist/v2/components/FilterTab.d.ts.map +1 -0
- package/dist/v2/components/FilterTab.js +144 -0
- package/dist/v2/components/FilterTab.js.map +1 -0
- package/dist/v2/components/ForbiddenPage.d.ts +40 -0
- package/dist/v2/components/ForbiddenPage.d.ts.map +1 -0
- package/dist/v2/components/ForbiddenPage.js +81 -0
- package/dist/v2/components/ForbiddenPage.js.map +1 -0
- package/dist/v2/components/FormGrid.d.ts +76 -0
- package/dist/v2/components/FormGrid.d.ts.map +1 -0
- package/dist/v2/components/FormGrid.js +177 -0
- package/dist/v2/components/FormGrid.js.map +1 -0
- package/dist/v2/components/FormikDisplay.d.ts +38 -0
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -0
- package/dist/v2/components/FormikDisplay.js +125 -0
- package/dist/v2/components/FormikDisplay.js.map +1 -0
- package/dist/v2/components/Input.d.ts +62 -0
- package/dist/v2/components/Input.d.ts.map +1 -0
- package/dist/v2/components/Input.js +115 -0
- package/dist/v2/components/Input.js.map +1 -0
- package/dist/v2/components/KPICard.d.ts +22 -0
- package/dist/v2/components/KPICard.d.ts.map +1 -0
- package/dist/v2/components/KPICard.js +205 -0
- package/dist/v2/components/KPICard.js.map +1 -0
- package/dist/v2/components/KV.d.ts +25 -0
- package/dist/v2/components/KV.d.ts.map +1 -0
- package/dist/v2/components/KV.js +82 -0
- package/dist/v2/components/KV.js.map +1 -0
- package/dist/v2/components/KVGrid.d.ts +44 -0
- package/dist/v2/components/KVGrid.d.ts.map +1 -0
- package/dist/v2/components/KVGrid.js +73 -0
- package/dist/v2/components/KVGrid.js.map +1 -0
- package/dist/v2/components/Layout.d.ts +78 -0
- package/dist/v2/components/Layout.d.ts.map +1 -0
- package/dist/v2/components/Layout.js +284 -0
- package/dist/v2/components/Layout.js.map +1 -0
- package/dist/v2/components/MobileRowCard.d.ts +63 -0
- package/dist/v2/components/MobileRowCard.d.ts.map +1 -0
- package/dist/v2/components/MobileRowCard.js +321 -0
- package/dist/v2/components/MobileRowCard.js.map +1 -0
- package/dist/v2/components/Modal.d.ts +21 -0
- package/dist/v2/components/Modal.d.ts.map +1 -0
- package/dist/v2/components/Modal.js +281 -0
- package/dist/v2/components/Modal.js.map +1 -0
- package/dist/v2/components/NetworkErrorPage.d.ts +11 -0
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -0
- package/dist/v2/components/NetworkErrorPage.js +86 -0
- package/dist/v2/components/NetworkErrorPage.js.map +1 -0
- package/dist/v2/components/NotFoundPage.d.ts +9 -0
- package/dist/v2/components/NotFoundPage.d.ts.map +1 -0
- package/dist/v2/components/NotFoundPage.js +66 -0
- package/dist/v2/components/NotFoundPage.js.map +1 -0
- package/dist/v2/components/NumberInput.d.ts +83 -0
- package/dist/v2/components/NumberInput.d.ts.map +1 -0
- package/dist/v2/components/NumberInput.js +316 -0
- package/dist/v2/components/NumberInput.js.map +1 -0
- package/dist/v2/components/OverflowMenu.d.ts +55 -0
- package/dist/v2/components/OverflowMenu.d.ts.map +1 -0
- package/dist/v2/components/OverflowMenu.js +196 -0
- package/dist/v2/components/OverflowMenu.js.map +1 -0
- package/dist/v2/components/PdfViewer.d.ts +56 -0
- package/dist/v2/components/PdfViewer.d.ts.map +1 -0
- package/dist/v2/components/PdfViewer.js +132 -0
- package/dist/v2/components/PdfViewer.js.map +1 -0
- package/dist/v2/components/ProgressBar.d.ts +53 -0
- package/dist/v2/components/ProgressBar.d.ts.map +1 -0
- package/dist/v2/components/ProgressBar.js +209 -0
- package/dist/v2/components/ProgressBar.js.map +1 -0
- package/dist/v2/components/Radio.d.ts +78 -0
- package/dist/v2/components/Radio.d.ts.map +1 -0
- package/dist/v2/components/Radio.js +238 -0
- package/dist/v2/components/Radio.js.map +1 -0
- package/dist/v2/components/SectionHeader.d.ts +53 -0
- package/dist/v2/components/SectionHeader.d.ts.map +1 -0
- package/dist/v2/components/SectionHeader.js +140 -0
- package/dist/v2/components/SectionHeader.js.map +1 -0
- package/dist/v2/components/Segmented.d.ts +61 -0
- package/dist/v2/components/Segmented.d.ts.map +1 -0
- package/dist/v2/components/Segmented.js +261 -0
- package/dist/v2/components/Segmented.js.map +1 -0
- package/dist/v2/components/Select.d.ts +72 -0
- package/dist/v2/components/Select.d.ts.map +1 -0
- package/dist/v2/components/Select.js +382 -0
- package/dist/v2/components/Select.js.map +1 -0
- package/dist/v2/components/ServerErrorPage.d.ts +11 -0
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -0
- package/dist/v2/components/ServerErrorPage.js +82 -0
- package/dist/v2/components/ServerErrorPage.js.map +1 -0
- package/dist/v2/components/Skeleton.d.ts +56 -0
- package/dist/v2/components/Skeleton.d.ts.map +1 -0
- package/dist/v2/components/Skeleton.js +281 -0
- package/dist/v2/components/Skeleton.js.map +1 -0
- package/dist/v2/components/SkipLink.d.ts +30 -0
- package/dist/v2/components/SkipLink.d.ts.map +1 -0
- package/dist/v2/components/SkipLink.js +58 -0
- package/dist/v2/components/SkipLink.js.map +1 -0
- package/dist/v2/components/Spinner.d.ts +40 -0
- package/dist/v2/components/Spinner.d.ts.map +1 -0
- package/dist/v2/components/Spinner.js +76 -0
- package/dist/v2/components/Spinner.js.map +1 -0
- package/dist/v2/components/Status.d.ts +42 -0
- package/dist/v2/components/Status.d.ts.map +1 -0
- package/dist/v2/components/Status.js +71 -0
- package/dist/v2/components/Status.js.map +1 -0
- package/dist/v2/components/Stepper.d.ts +136 -0
- package/dist/v2/components/Stepper.d.ts.map +1 -0
- package/dist/v2/components/Stepper.js +415 -0
- package/dist/v2/components/Stepper.js.map +1 -0
- package/dist/v2/components/Switch.d.ts +30 -0
- package/dist/v2/components/Switch.d.ts.map +1 -0
- package/dist/v2/components/Switch.js +136 -0
- package/dist/v2/components/Switch.js.map +1 -0
- package/dist/v2/components/Tabs.d.ts +49 -0
- package/dist/v2/components/Tabs.d.ts.map +1 -0
- package/dist/v2/components/Tabs.js +160 -0
- package/dist/v2/components/Tabs.js.map +1 -0
- package/dist/v2/components/TelInput.d.ts +33 -0
- package/dist/v2/components/TelInput.d.ts.map +1 -0
- package/dist/v2/components/TelInput.js +282 -0
- package/dist/v2/components/TelInput.js.map +1 -0
- package/dist/v2/components/Textarea.d.ts +23 -0
- package/dist/v2/components/Textarea.d.ts.map +1 -0
- package/dist/v2/components/Textarea.js +80 -0
- package/dist/v2/components/Textarea.js.map +1 -0
- package/dist/v2/components/TimePicker.d.ts +21 -0
- package/dist/v2/components/TimePicker.d.ts.map +1 -0
- package/dist/v2/components/TimePicker.js +141 -0
- package/dist/v2/components/TimePicker.js.map +1 -0
- package/dist/v2/components/Toast.d.ts +32 -0
- package/dist/v2/components/Toast.d.ts.map +1 -0
- package/dist/v2/components/Toast.js +384 -0
- package/dist/v2/components/Toast.js.map +1 -0
- package/dist/v2/components/Tooltip.d.ts +9 -0
- package/dist/v2/components/Tooltip.d.ts.map +1 -0
- package/dist/v2/components/Tooltip.js +169 -0
- package/dist/v2/components/Tooltip.js.map +1 -0
- package/dist/v2/components/_ErrorPageBody.d.ts +48 -0
- package/dist/v2/components/_ErrorPageBody.d.ts.map +1 -0
- package/dist/v2/components/_ErrorPageBody.js +96 -0
- package/dist/v2/components/_ErrorPageBody.js.map +1 -0
- package/dist/v2/components/_pickerShared.d.ts +47 -0
- package/dist/v2/components/_pickerShared.d.ts.map +1 -0
- package/dist/v2/components/_pickerShared.js +68 -0
- package/dist/v2/components/_pickerShared.js.map +1 -0
- package/dist/v2/components/index.d.ts +83 -0
- package/dist/v2/components/index.d.ts.map +1 -0
- package/dist/v2/components/index.js +477 -0
- package/dist/v2/components/index.js.map +1 -0
- package/dist/v2/hooks/index.d.ts +11 -0
- package/dist/v2/hooks/index.d.ts.map +1 -0
- package/dist/v2/hooks/index.js +85 -0
- package/dist/v2/hooks/index.js.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.d.ts +22 -0
- package/dist/v2/hooks/useDelayedFlag.d.ts.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.js +60 -0
- package/dist/v2/hooks/useDelayedFlag.js.map +1 -0
- package/dist/v2/hooks/useDensity.d.ts +23 -0
- package/dist/v2/hooks/useDensity.d.ts.map +1 -0
- package/dist/v2/hooks/useDensity.js +124 -0
- package/dist/v2/hooks/useDensity.js.map +1 -0
- package/dist/v2/hooks/useFocusFirstError.d.ts +121 -0
- package/dist/v2/hooks/useFocusFirstError.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusFirstError.js +203 -0
- package/dist/v2/hooks/useFocusFirstError.js.map +1 -0
- package/dist/v2/hooks/useFocusTrap.d.ts +3 -0
- package/dist/v2/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusTrap.js +207 -0
- package/dist/v2/hooks/useFocusTrap.js.map +1 -0
- package/dist/v2/hooks/useFormAutoSave.d.ts +42 -0
- package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -0
- package/dist/v2/hooks/useFormAutoSave.js +186 -0
- package/dist/v2/hooks/useFormAutoSave.js.map +1 -0
- package/dist/v2/hooks/useFormCompletionProgress.d.ts +52 -0
- package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -0
- package/dist/v2/hooks/useFormCompletionProgress.js +136 -0
- package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.d.ts +31 -0
- package/dist/v2/hooks/useResolvedDensity.d.ts.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.js +50 -0
- package/dist/v2/hooks/useResolvedDensity.js.map +1 -0
- package/dist/v2/hooks/useSortedRows.d.ts +25 -0
- package/dist/v2/hooks/useSortedRows.d.ts.map +1 -0
- package/dist/v2/hooks/useSortedRows.js +38 -0
- package/dist/v2/hooks/useSortedRows.js.map +1 -0
- package/dist/v2/hooks/useTabLoading.d.ts +39 -0
- package/dist/v2/hooks/useTabLoading.d.ts.map +1 -0
- package/dist/v2/hooks/useTabLoading.js +85 -0
- package/dist/v2/hooks/useTabLoading.js.map +1 -0
- package/dist/v2/index.d.ts +115 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +1127 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/modalContext.d.ts +96 -0
- package/dist/v2/modalContext.d.ts.map +1 -0
- package/dist/v2/modalContext.js +113 -0
- package/dist/v2/modalContext.js.map +1 -0
- package/dist/v2/models/favorite.d.ts +14 -0
- package/dist/v2/models/favorite.d.ts.map +1 -0
- package/dist/v2/models/favorite.js +6 -0
- package/dist/v2/models/favorite.js.map +1 -0
- package/dist/v2/models/index.d.ts +11 -0
- package/dist/v2/models/index.d.ts.map +1 -0
- package/dist/v2/models/index.js +50 -0
- package/dist/v2/models/index.js.map +1 -0
- package/dist/v2/models/personalization.d.ts +65 -0
- package/dist/v2/models/personalization.d.ts.map +1 -0
- package/dist/v2/models/personalization.js +6 -0
- package/dist/v2/models/personalization.js.map +1 -0
- package/dist/v2/models/referentiel.d.ts +67 -0
- package/dist/v2/models/referentiel.d.ts.map +1 -0
- package/dist/v2/models/referentiel.js +6 -0
- package/dist/v2/models/referentiel.js.map +1 -0
- package/dist/v2/models/savedFilter.d.ts +22 -0
- package/dist/v2/models/savedFilter.d.ts.map +1 -0
- package/dist/v2/models/savedFilter.js +6 -0
- package/dist/v2/models/savedFilter.js.map +1 -0
- package/dist/v2/patterns/ActionBar.d.ts +137 -0
- package/dist/v2/patterns/ActionBar.d.ts.map +1 -0
- package/dist/v2/patterns/ActionBar.js +601 -0
- package/dist/v2/patterns/ActionBar.js.map +1 -0
- package/dist/v2/patterns/BulkActionBar.d.ts +63 -0
- package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -0
- package/dist/v2/patterns/BulkActionBar.js +153 -0
- package/dist/v2/patterns/BulkActionBar.js.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts +62 -0
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js +306 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -0
- package/dist/v2/patterns/ColumnsToggle.d.ts +55 -0
- package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -0
- package/dist/v2/patterns/ColumnsToggle.js +314 -0
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -0
- package/dist/v2/patterns/DataGrid.d.ts +7 -0
- package/dist/v2/patterns/DataGrid.d.ts.map +1 -0
- package/dist/v2/patterns/DataGrid.js +834 -0
- package/dist/v2/patterns/DataGrid.js.map +1 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +68 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridSettingsMenu.js +381 -0
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -0
- package/dist/v2/patterns/DataGridToolbar.d.ts +81 -0
- package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridToolbar.js +255 -0
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -0
- package/dist/v2/patterns/DataGridVirtualized.d.ts +76 -0
- package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridVirtualized.js +528 -0
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +46 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js +77 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.d.ts +72 -0
- package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.js +171 -0
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -0
- package/dist/v2/patterns/FavoritesFilter.d.ts +51 -0
- package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -0
- package/dist/v2/patterns/FavoritesFilter.js +97 -0
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.d.ts +39 -0
- package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.js +111 -0
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -0
- package/dist/v2/patterns/FormPageShell.d.ts +55 -0
- package/dist/v2/patterns/FormPageShell.d.ts.map +1 -0
- package/dist/v2/patterns/FormPageShell.js +133 -0
- package/dist/v2/patterns/FormPageShell.js.map +1 -0
- package/dist/v2/patterns/FormSection.d.ts +53 -0
- package/dist/v2/patterns/FormSection.d.ts.map +1 -0
- package/dist/v2/patterns/FormSection.js +162 -0
- package/dist/v2/patterns/FormSection.js.map +1 -0
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +51 -0
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCheckboxGroup.js +117 -0
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -0
- package/dist/v2/patterns/FormikCombobox.d.ts +43 -0
- package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCombobox.js +121 -0
- package/dist/v2/patterns/FormikCombobox.js.map +1 -0
- package/dist/v2/patterns/FormikDatePicker.d.ts +87 -0
- package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -0
- package/dist/v2/patterns/FormikDatePicker.js +177 -0
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -0
- package/dist/v2/patterns/FormikErrorFocus.d.ts +59 -0
- package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -0
- package/dist/v2/patterns/FormikErrorFocus.js +83 -0
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -0
- package/dist/v2/patterns/FormikFile.d.ts +43 -0
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -0
- package/dist/v2/patterns/FormikFile.js +156 -0
- package/dist/v2/patterns/FormikFile.js.map +1 -0
- package/dist/v2/patterns/FormikInput.d.ts +37 -0
- package/dist/v2/patterns/FormikInput.d.ts.map +1 -0
- package/dist/v2/patterns/FormikInput.js +87 -0
- package/dist/v2/patterns/FormikInput.js.map +1 -0
- package/dist/v2/patterns/FormikReferentielField.d.ts +33 -0
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -0
- package/dist/v2/patterns/FormikReferentielField.js +124 -0
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -0
- package/dist/v2/patterns/FormikSelect.d.ts +40 -0
- package/dist/v2/patterns/FormikSelect.d.ts.map +1 -0
- package/dist/v2/patterns/FormikSelect.js +139 -0
- package/dist/v2/patterns/FormikSelect.js.map +1 -0
- package/dist/v2/patterns/FormikTextarea.d.ts +31 -0
- package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -0
- package/dist/v2/patterns/FormikTextarea.js +84 -0
- package/dist/v2/patterns/FormikTextarea.js.map +1 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +44 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +207 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
- package/dist/v2/patterns/NetworkErrorBanner.d.ts +26 -0
- package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -0
- package/dist/v2/patterns/NetworkErrorBanner.js +82 -0
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -0
- package/dist/v2/patterns/PageContent.d.ts +40 -0
- package/dist/v2/patterns/PageContent.d.ts.map +1 -0
- package/dist/v2/patterns/PageContent.js +69 -0
- package/dist/v2/patterns/PageContent.js.map +1 -0
- package/dist/v2/patterns/ReferentielField.d.ts +118 -0
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -0
- package/dist/v2/patterns/ReferentielField.js +617 -0
- package/dist/v2/patterns/ReferentielField.js.map +1 -0
- package/dist/v2/patterns/SaveFilterDialog.d.ts +68 -0
- package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -0
- package/dist/v2/patterns/SaveFilterDialog.js +203 -0
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -0
- package/dist/v2/patterns/SavedFiltersMenu.d.ts +74 -0
- package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -0
- package/dist/v2/patterns/SavedFiltersMenu.js +412 -0
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -0
- package/dist/v2/patterns/SkeletonPageShell.d.ts +76 -0
- package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -0
- package/dist/v2/patterns/SkeletonPageShell.js +347 -0
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -0
- package/dist/v2/patterns/SortableHeader.d.ts +47 -0
- package/dist/v2/patterns/SortableHeader.d.ts.map +1 -0
- package/dist/v2/patterns/SortableHeader.js +193 -0
- package/dist/v2/patterns/SortableHeader.js.map +1 -0
- package/dist/v2/patterns/Tour.d.ts +55 -0
- package/dist/v2/patterns/Tour.d.ts.map +1 -0
- package/dist/v2/patterns/Tour.js +473 -0
- package/dist/v2/patterns/Tour.js.map +1 -0
- package/dist/v2/patterns/_dataGridShared.d.ts +125 -0
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -0
- package/dist/v2/patterns/_dataGridShared.js +406 -0
- package/dist/v2/patterns/_dataGridShared.js.map +1 -0
- package/dist/v2/patterns/_sort.d.ts +22 -0
- package/dist/v2/patterns/_sort.d.ts.map +1 -0
- package/dist/v2/patterns/_sort.js +118 -0
- package/dist/v2/patterns/_sort.js.map +1 -0
- package/dist/v2/patterns/_useColumnReorder.d.ts +69 -0
- package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -0
- package/dist/v2/patterns/_useColumnReorder.js +264 -0
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -0
- package/dist/v2/patterns/_useColumnResize.d.ts +49 -0
- package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -0
- package/dist/v2/patterns/_useColumnResize.js +198 -0
- package/dist/v2/patterns/_useColumnResize.js.map +1 -0
- package/dist/v2/patterns/index.d.ts +62 -0
- package/dist/v2/patterns/index.d.ts.map +1 -0
- package/dist/v2/patterns/index.js +246 -0
- package/dist/v2/patterns/index.js.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts +80 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.js +177 -0
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -0
- package/dist/v2/personalization/adapters/_storageKey.d.ts +35 -0
- package/dist/v2/personalization/adapters/_storageKey.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/_storageKey.js +69 -0
- package/dist/v2/personalization/adapters/_storageKey.js.map +1 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +31 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +128 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +25 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.js +76 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
- package/dist/v2/personalization/adapters/index.d.ts +10 -0
- package/dist/v2/personalization/adapters/index.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/index.js +21 -0
- package/dist/v2/personalization/adapters/index.js.map +1 -0
- package/dist/v2/personalization/capabilities/favorites.d.ts +53 -0
- package/dist/v2/personalization/capabilities/favorites.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/favorites.js +223 -0
- package/dist/v2/personalization/capabilities/favorites.js.map +1 -0
- package/dist/v2/personalization/capabilities/favoritesView.d.ts +58 -0
- package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/favoritesView.js +121 -0
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -0
- package/dist/v2/personalization/capabilities/index.d.ts +16 -0
- package/dist/v2/personalization/capabilities/index.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/index.js +69 -0
- package/dist/v2/personalization/capabilities/index.js.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.d.ts +61 -0
- package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.js +297 -0
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -0
- package/dist/v2/personalization/createPersonalizationStore.d.ts +76 -0
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -0
- package/dist/v2/personalization/createPersonalizationStore.js +475 -0
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -0
- package/dist/v2/personalization/index.d.ts +33 -0
- package/dist/v2/personalization/index.d.ts.map +1 -0
- package/dist/v2/personalization/index.js +111 -0
- package/dist/v2/personalization/index.js.map +1 -0
- package/dist/v2/personalization/personalizationContext.d.ts +78 -0
- package/dist/v2/personalization/personalizationContext.d.ts.map +1 -0
- package/dist/v2/personalization/personalizationContext.js +121 -0
- package/dist/v2/personalization/personalizationContext.js.map +1 -0
- package/dist/v2/personalization/schema.d.ts +60 -0
- package/dist/v2/personalization/schema.d.ts.map +1 -0
- package/dist/v2/personalization/schema.js +102 -0
- package/dist/v2/personalization/schema.js.map +1 -0
- package/dist/v2/personalization/types.d.ts +81 -0
- package/dist/v2/personalization/types.d.ts.map +1 -0
- package/dist/v2/personalization/types.js +6 -0
- package/dist/v2/personalization/types.js.map +1 -0
- package/dist/v2/referentiel/ReferentielProvider.d.ts +53 -0
- package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -0
- package/dist/v2/referentiel/ReferentielProvider.js +94 -0
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -0
- package/dist/v2/referentiel/index.d.ts +18 -0
- package/dist/v2/referentiel/index.d.ts.map +1 -0
- package/dist/v2/referentiel/index.js +44 -0
- package/dist/v2/referentiel/index.js.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.d.ts +15 -0
- package/dist/v2/referentiel/useReferentielClient.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.js +46 -0
- package/dist/v2/referentiel/useReferentielClient.js.map +1 -0
- package/dist/v2/referentiel/useReferentielOptions.d.ts +40 -0
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielOptions.js +177 -0
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -0
- package/dist/v2/referentiel/useReferentielSearch.d.ts +76 -0
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielSearch.js +140 -0
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -0
- package/dist/v2/styles/base.css +425 -0
- package/dist/v2/styles/css.d.ts +10 -0
- package/dist/v2/styles/index.d.ts +12 -0
- package/dist/v2/styles/index.d.ts.map +1 -0
- package/dist/v2/styles/index.js +4 -0
- package/dist/v2/styles/index.js.map +1 -0
- package/dist/v2/theme/_brand.d.ts +29 -0
- package/dist/v2/theme/_brand.d.ts.map +1 -0
- package/dist/v2/theme/_brand.js +69 -0
- package/dist/v2/theme/_brand.js.map +1 -0
- package/dist/v2/theme/_brandSecondary.d.ts +26 -0
- package/dist/v2/theme/_brandSecondary.d.ts.map +1 -0
- package/dist/v2/theme/_brandSecondary.js +65 -0
- package/dist/v2/theme/_brandSecondary.js.map +1 -0
- package/dist/v2/theme/createPortnetTheme.d.ts +50 -0
- package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -0
- package/dist/v2/theme/createPortnetTheme.js +529 -0
- package/dist/v2/theme/createPortnetTheme.js.map +1 -0
- package/dist/v2/theme/cssVariables.d.ts +41 -0
- package/dist/v2/theme/cssVariables.d.ts.map +1 -0
- package/dist/v2/theme/cssVariables.js +205 -0
- package/dist/v2/theme/cssVariables.js.map +1 -0
- package/dist/v2/theme/index.d.ts +33 -0
- package/dist/v2/theme/index.d.ts.map +1 -0
- package/dist/v2/theme/index.js +60 -0
- package/dist/v2/theme/index.js.map +1 -0
- package/dist/v2/tokens/breakpoints.d.ts +74 -0
- package/dist/v2/tokens/breakpoints.d.ts.map +1 -0
- package/dist/v2/tokens/breakpoints.js +114 -0
- package/dist/v2/tokens/breakpoints.js.map +1 -0
- package/dist/v2/tokens/colors.d.ts +228 -0
- package/dist/v2/tokens/colors.d.ts.map +1 -0
- package/dist/v2/tokens/colors.js +225 -0
- package/dist/v2/tokens/colors.js.map +1 -0
- package/dist/v2/tokens/density.d.ts +142 -0
- package/dist/v2/tokens/density.d.ts.map +1 -0
- package/dist/v2/tokens/density.js +111 -0
- package/dist/v2/tokens/density.js.map +1 -0
- package/dist/v2/tokens/index.d.ts +556 -0
- package/dist/v2/tokens/index.d.ts.map +1 -0
- package/dist/v2/tokens/index.js +313 -0
- package/dist/v2/tokens/index.js.map +1 -0
- package/dist/v2/tokens/motion.d.ts +85 -0
- package/dist/v2/tokens/motion.d.ts.map +1 -0
- package/dist/v2/tokens/motion.js +94 -0
- package/dist/v2/tokens/motion.js.map +1 -0
- package/dist/v2/tokens/radius.d.ts +18 -0
- package/dist/v2/tokens/radius.d.ts.map +1 -0
- package/dist/v2/tokens/radius.js +28 -0
- package/dist/v2/tokens/radius.js.map +1 -0
- package/dist/v2/tokens/shadows.d.ts +25 -0
- package/dist/v2/tokens/shadows.d.ts.map +1 -0
- package/dist/v2/tokens/shadows.js +46 -0
- package/dist/v2/tokens/shadows.js.map +1 -0
- package/dist/v2/tokens/spacing.d.ts +38 -0
- package/dist/v2/tokens/spacing.d.ts.map +1 -0
- package/dist/v2/tokens/spacing.js +57 -0
- package/dist/v2/tokens/spacing.js.map +1 -0
- package/dist/v2/tokens/state.d.ts +40 -0
- package/dist/v2/tokens/state.d.ts.map +1 -0
- package/dist/v2/tokens/state.js +47 -0
- package/dist/v2/tokens/state.js.map +1 -0
- package/dist/v2/tokens/statusPalette.d.ts +54 -0
- package/dist/v2/tokens/statusPalette.d.ts.map +1 -0
- package/dist/v2/tokens/statusPalette.js +72 -0
- package/dist/v2/tokens/statusPalette.js.map +1 -0
- package/dist/v2/tokens/tokens.json +153 -0
- package/dist/v2/tokens/typography.d.ts +206 -0
- package/dist/v2/tokens/typography.d.ts.map +1 -0
- package/dist/v2/tokens/typography.js +155 -0
- package/dist/v2/tokens/typography.js.map +1 -0
- package/dist/v2/tokens/zIndex.d.ts +33 -0
- package/dist/v2/tokens/zIndex.d.ts.map +1 -0
- package/dist/v2/tokens/zIndex.js +50 -0
- package/dist/v2/tokens/zIndex.js.map +1 -0
- package/dist/v2/types/common.d.ts +24 -0
- package/dist/v2/types/common.d.ts.map +1 -0
- package/dist/v2/types/common.js +6 -0
- package/dist/v2/types/common.js.map +1 -0
- package/dist/v2/types/datagrid.d.ts +131 -0
- package/dist/v2/types/datagrid.d.ts.map +1 -0
- package/dist/v2/types/datagrid.js +6 -0
- package/dist/v2/types/datagrid.js.map +1 -0
- package/dist/v2/types/index.d.ts +11 -0
- package/dist/v2/types/index.d.ts.map +1 -0
- package/dist/v2/types/index.js +28 -0
- package/dist/v2/types/index.js.map +1 -0
- package/dist/v2/utils/apiError.d.ts +90 -0
- package/dist/v2/utils/apiError.d.ts.map +1 -0
- package/dist/v2/utils/apiError.js +227 -0
- package/dist/v2/utils/apiError.js.map +1 -0
- package/dist/v2/utils/contrast.d.ts +68 -0
- package/dist/v2/utils/contrast.d.ts.map +1 -0
- package/dist/v2/utils/contrast.js +167 -0
- package/dist/v2/utils/contrast.js.map +1 -0
- package/dist/v2/utils/cx.d.ts +9 -0
- package/dist/v2/utils/cx.d.ts.map +1 -0
- package/dist/v2/utils/cx.js +45 -0
- package/dist/v2/utils/cx.js.map +1 -0
- package/dist/v2/utils/fileDownload.d.ts +94 -0
- package/dist/v2/utils/fileDownload.d.ts.map +1 -0
- package/dist/v2/utils/fileDownload.js +236 -0
- package/dist/v2/utils/fileDownload.js.map +1 -0
- package/dist/v2/utils/fmtMoney.d.ts +28 -0
- package/dist/v2/utils/fmtMoney.d.ts.map +1 -0
- package/dist/v2/utils/fmtMoney.js +84 -0
- package/dist/v2/utils/fmtMoney.js.map +1 -0
- package/dist/v2/utils/index.d.ts +8 -0
- package/dist/v2/utils/index.d.ts.map +1 -0
- package/dist/v2/utils/index.js +90 -0
- package/dist/v2/utils/index.js.map +1 -0
- package/dist/v2/utils/networkStatus.d.ts +88 -0
- package/dist/v2/utils/networkStatus.d.ts.map +1 -0
- package/dist/v2/utils/networkStatus.js +121 -0
- package/dist/v2/utils/networkStatus.js.map +1 -0
- package/package.json +191 -76
- package/dist/api/guideApi.js +0 -12
- package/dist/api/guideImageService.js +0 -119
- package/dist/api/reclamationApi.js +0 -102
- package/dist/assets/guides/FAQ.json +0 -118
- package/dist/assets/guides/index.js +0 -11
- package/dist/assets/images/tijariaLogo.ico +0 -0
- package/dist/components/buttons/PuiButton.js +0 -217
- package/dist/components/buttons/PuiIconButton.js +0 -98
- package/dist/components/common/PuiAlertContext.js +0 -12
- package/dist/components/common/PuiHelpWidgetContext.js +0 -17
- package/dist/components/common/StyledMuiButton.js +0 -48
- package/dist/components/common/StyledMuiTextField.js +0 -180
- package/dist/components/inputs/PuiAutocomplete.js +0 -352
- package/dist/components/inputs/PuiCheckbox.js +0 -308
- package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
- package/dist/components/inputs/PuiCheckboxItem.js +0 -162
- package/dist/components/inputs/PuiDateField.js +0 -280
- package/dist/components/inputs/PuiDateTimeField.js +0 -276
- package/dist/components/inputs/PuiFileField.js +0 -265
- package/dist/components/inputs/PuiRadioGroup.js +0 -197
- package/dist/components/inputs/PuiRadioItem.js +0 -100
- package/dist/components/inputs/PuiSelect.js +0 -427
- package/dist/components/inputs/PuiTextField.js +0 -263
- package/dist/components/others/PuiBadge.js +0 -58
- package/dist/components/others/PuiChip.js +0 -150
- package/dist/components/others/PuiDialog.js +0 -102
- package/dist/components/others/PuiFormikForm.js +0 -70
- package/dist/components/others/PuiGrid.js +0 -23
- package/dist/components/others/PuiIcon.js +0 -92
- package/dist/components/others/PuiLoadingBackdrop.js +0 -32
- package/dist/components/others/PuiMainContainer.js +0 -41
- package/dist/components/others/PuiNavigation.js +0 -68
- package/dist/components/others/PuiSection.js +0 -187
- package/dist/components/others/PuiTooltip.js +0 -86
- package/dist/components/providers/PuiAlertProvider.js +0 -134
- package/dist/components/providers/PuiHelpWidgetProvider.js +0 -91
- package/dist/components/providers/PuiLocalizationProvider.js +0 -34
- package/dist/components/referentiel/common/ReferetielContext.js +0 -12
- package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
- package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
- package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
- package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
- package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -85
- package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -356
- package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -181
- package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -325
- package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -203
- package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -352
- package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -66
- package/dist/components/tab/PuiTab.js +0 -25
- package/dist/components/tab/PuiTabs.js +0 -148
- package/dist/components/table/PuiTable.js +0 -643
- package/dist/components/table/PuiTableAction.js +0 -75
- package/dist/components/typography/PuiDefinition.js +0 -42
- package/dist/components/typography/PuiIndication.js +0 -80
- package/dist/components/typography/PuiMainTitle.js +0 -144
- package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -106
- package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
- package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
- package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
- package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
- package/dist/components/ui/pages/general/PuiSearchPage.js +0 -203
- package/dist/components/widgets/GuideImage.js +0 -251
- package/dist/components/widgets/PuiHelpWidget.js +0 -4167
- package/dist/config/apperance.js +0 -26
- package/dist/config/mapping.js +0 -26
- package/dist/config/referentiel.js +0 -10
- package/dist/general/yupValidationErrors.js +0 -8
- package/dist/hooks/useAlert.js +0 -19
- package/dist/hooks/useAxios.js +0 -23
- package/dist/hooks/useQuery.js +0 -21
- package/dist/hooks/useReclamation.js +0 -100
- package/dist/styles/ReclamationFormModal.css +0 -629
- package/dist/styles/help-widget.css +0 -621
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import ConfirmDialog from "../components/ConfirmDialog";
|
|
3
|
+
/**
|
|
4
|
+
* DeleteResourceConfirmDialog — Portnet UI v2
|
|
5
|
+
*
|
|
6
|
+
* Opinionated wrapper over v2.ConfirmDialog for irreversible delete actions
|
|
7
|
+
* across the design system. Hard-wires the "danger" variant (Charter §09.3 —
|
|
8
|
+
* the only correct choice for a destructive irreversible action) and sensible
|
|
9
|
+
* FR defaults for the button labels.
|
|
10
|
+
*
|
|
11
|
+
* The prop names `isOpen` / `onDelete` are deliberately chosen over
|
|
12
|
+
* v2.ConfirmDialog's `open` / `onConfirm` because call sites read more
|
|
13
|
+
* naturally with action-specific verbs — every host-module audit converged on
|
|
14
|
+
* this naming and the wrapper formalises it as the destructive-action
|
|
15
|
+
* convention.
|
|
16
|
+
*
|
|
17
|
+
* <DeleteResourceConfirmDialog
|
|
18
|
+
* isOpen // bool, REQUIRED
|
|
19
|
+
* onClose // () => void, REQUIRED
|
|
20
|
+
* onDelete // () => void, REQUIRED — fires on confirm
|
|
21
|
+
* title // node, REQUIRED — surfaces the resource type
|
|
22
|
+
* description? // node — single-sentence consequence
|
|
23
|
+
* impact? // node[] — bullet-list of side effects (Charter R-5.1)
|
|
24
|
+
* confirmLabel? // node, default "Confirmer"
|
|
25
|
+
* cancelLabel? // node, default "Annuler"
|
|
26
|
+
* loading? // bool — disables both buttons + spinner on confirm
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* Charter R-5.1 + §09.3 + R-M.*. WCAG 2.4.7 (focus visible — inherited from Modal).
|
|
30
|
+
*/
|
|
31
|
+
type ConfirmDialogProps = React.ComponentProps<typeof ConfirmDialog>;
|
|
32
|
+
export interface DeleteResourceConfirmDialogProps {
|
|
33
|
+
isOpen: ConfirmDialogProps["open"];
|
|
34
|
+
onClose: ConfirmDialogProps["onClose"];
|
|
35
|
+
/** Fires on confirm (maps to ConfirmDialog's onConfirm). */
|
|
36
|
+
onDelete: ConfirmDialogProps["onConfirm"];
|
|
37
|
+
title: ConfirmDialogProps["title"];
|
|
38
|
+
description?: ConfirmDialogProps["description"];
|
|
39
|
+
impact?: ConfirmDialogProps["impact"];
|
|
40
|
+
confirmLabel?: ConfirmDialogProps["confirmLabel"];
|
|
41
|
+
cancelLabel?: ConfirmDialogProps["cancelLabel"];
|
|
42
|
+
loading?: ConfirmDialogProps["loading"];
|
|
43
|
+
}
|
|
44
|
+
declare function DeleteResourceConfirmDialog({ isOpen, onClose, onDelete, title, description, impact, confirmLabel, cancelLabel, loading, }: DeleteResourceConfirmDialogProps): React.JSX.Element;
|
|
45
|
+
export default DeleteResourceConfirmDialog;
|
|
46
|
+
//# sourceMappingURL=DeleteResourceConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteResourceConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/patterns/DeleteResourceConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,aAAa,MAAM,6BAA6B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,KAAK,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;AAErE,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACnC,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACvC,4DAA4D;IAC5D,QAAQ,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC1C,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,iBAAS,2BAA2B,CAAC,EACnC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,KAAK,EACL,WAAW,EACX,MAAM,EACN,YAA0B,EAC1B,WAAuB,EACvB,OAAe,GAChB,EAAE,gCAAgC,qBAelC;AAED,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ConfirmDialog = _interopRequireDefault(require("../components/ConfirmDialog"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
19
|
+
* DeleteResourceConfirmDialog — Portnet UI v2
|
|
20
|
+
*
|
|
21
|
+
* Opinionated wrapper over v2.ConfirmDialog for irreversible delete actions
|
|
22
|
+
* across the design system. Hard-wires the "danger" variant (Charter §09.3 —
|
|
23
|
+
* the only correct choice for a destructive irreversible action) and sensible
|
|
24
|
+
* FR defaults for the button labels.
|
|
25
|
+
*
|
|
26
|
+
* The prop names `isOpen` / `onDelete` are deliberately chosen over
|
|
27
|
+
* v2.ConfirmDialog's `open` / `onConfirm` because call sites read more
|
|
28
|
+
* naturally with action-specific verbs — every host-module audit converged on
|
|
29
|
+
* this naming and the wrapper formalises it as the destructive-action
|
|
30
|
+
* convention.
|
|
31
|
+
*
|
|
32
|
+
* <DeleteResourceConfirmDialog
|
|
33
|
+
* isOpen // bool, REQUIRED
|
|
34
|
+
* onClose // () => void, REQUIRED
|
|
35
|
+
* onDelete // () => void, REQUIRED — fires on confirm
|
|
36
|
+
* title // node, REQUIRED — surfaces the resource type
|
|
37
|
+
* description? // node — single-sentence consequence
|
|
38
|
+
* impact? // node[] — bullet-list of side effects (Charter R-5.1)
|
|
39
|
+
* confirmLabel? // node, default "Confirmer"
|
|
40
|
+
* cancelLabel? // node, default "Annuler"
|
|
41
|
+
* loading? // bool — disables both buttons + spinner on confirm
|
|
42
|
+
* />
|
|
43
|
+
*
|
|
44
|
+
* Charter R-5.1 + §09.3 + R-M.*. WCAG 2.4.7 (focus visible — inherited from Modal).
|
|
45
|
+
*/
|
|
46
|
+
function DeleteResourceConfirmDialog(_ref) {
|
|
47
|
+
var isOpen = _ref.isOpen,
|
|
48
|
+
onClose = _ref.onClose,
|
|
49
|
+
onDelete = _ref.onDelete,
|
|
50
|
+
title = _ref.title,
|
|
51
|
+
description = _ref.description,
|
|
52
|
+
impact = _ref.impact,
|
|
53
|
+
_ref$confirmLabel = _ref.confirmLabel,
|
|
54
|
+
confirmLabel = _ref$confirmLabel === void 0 ? "Confirmer" : _ref$confirmLabel,
|
|
55
|
+
_ref$cancelLabel = _ref.cancelLabel,
|
|
56
|
+
cancelLabel = _ref$cancelLabel === void 0 ? "Annuler" : _ref$cancelLabel,
|
|
57
|
+
_ref$loading = _ref.loading,
|
|
58
|
+
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfirmDialog["default"], _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
60
|
+
title: title,
|
|
61
|
+
description: description,
|
|
62
|
+
cancelLabel: cancelLabel,
|
|
63
|
+
confirmLabel: confirmLabel,
|
|
64
|
+
confirmVariant: "danger",
|
|
65
|
+
loading: loading
|
|
66
|
+
}, isOpen !== undefined ? {
|
|
67
|
+
open: isOpen
|
|
68
|
+
} : {}), onClose !== undefined ? {
|
|
69
|
+
onClose: onClose
|
|
70
|
+
} : {}), onDelete !== undefined ? {
|
|
71
|
+
onConfirm: onDelete
|
|
72
|
+
} : {}), impact !== undefined ? {
|
|
73
|
+
impact: impact
|
|
74
|
+
} : {}));
|
|
75
|
+
}
|
|
76
|
+
var _default = exports["default"] = DeleteResourceConfirmDialog;
|
|
77
|
+
//# sourceMappingURL=DeleteResourceConfirmDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteResourceConfirmDialog.js","names":["React","_interopRequireWildcard","require","_ConfirmDialog","_interopRequireDefault","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","DeleteResourceConfirmDialog","_ref","isOpen","onClose","onDelete","title","description","impact","_ref$confirmLabel","confirmLabel","_ref$cancelLabel","cancelLabel","_ref$loading","loading","jsx","confirmVariant","open","onConfirm","_default","exports"],"sources":["../../../src/lib/v2/patterns/DeleteResourceConfirmDialog.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport ConfirmDialog from \"../components/ConfirmDialog\";\r\n\r\n/**\r\n * DeleteResourceConfirmDialog — Portnet UI v2\r\n *\r\n * Opinionated wrapper over v2.ConfirmDialog for irreversible delete actions\r\n * across the design system. Hard-wires the \"danger\" variant (Charter §09.3 —\r\n * the only correct choice for a destructive irreversible action) and sensible\r\n * FR defaults for the button labels.\r\n *\r\n * The prop names `isOpen` / `onDelete` are deliberately chosen over\r\n * v2.ConfirmDialog's `open` / `onConfirm` because call sites read more\r\n * naturally with action-specific verbs — every host-module audit converged on\r\n * this naming and the wrapper formalises it as the destructive-action\r\n * convention.\r\n *\r\n * <DeleteResourceConfirmDialog\r\n * isOpen // bool, REQUIRED\r\n * onClose // () => void, REQUIRED\r\n * onDelete // () => void, REQUIRED — fires on confirm\r\n * title // node, REQUIRED — surfaces the resource type\r\n * description? // node — single-sentence consequence\r\n * impact? // node[] — bullet-list of side effects (Charter R-5.1)\r\n * confirmLabel? // node, default \"Confirmer\"\r\n * cancelLabel? // node, default \"Annuler\"\r\n * loading? // bool — disables both buttons + spinner on confirm\r\n * />\r\n *\r\n * Charter R-5.1 + §09.3 + R-M.*. WCAG 2.4.7 (focus visible — inherited from Modal).\r\n */\r\n\r\ntype ConfirmDialogProps = React.ComponentProps<typeof ConfirmDialog>;\r\n\r\nexport interface DeleteResourceConfirmDialogProps {\r\n isOpen: ConfirmDialogProps[\"open\"];\r\n onClose: ConfirmDialogProps[\"onClose\"];\r\n /** Fires on confirm (maps to ConfirmDialog's onConfirm). */\r\n onDelete: ConfirmDialogProps[\"onConfirm\"];\r\n title: ConfirmDialogProps[\"title\"];\r\n description?: ConfirmDialogProps[\"description\"];\r\n impact?: ConfirmDialogProps[\"impact\"];\r\n confirmLabel?: ConfirmDialogProps[\"confirmLabel\"];\r\n cancelLabel?: ConfirmDialogProps[\"cancelLabel\"];\r\n loading?: ConfirmDialogProps[\"loading\"];\r\n}\r\n\r\nfunction DeleteResourceConfirmDialog({\r\n isOpen,\r\n onClose,\r\n onDelete,\r\n title,\r\n description,\r\n impact,\r\n confirmLabel = \"Confirmer\",\r\n cancelLabel = \"Annuler\",\r\n loading = false,\r\n}: DeleteResourceConfirmDialogProps) {\r\n return (\r\n <ConfirmDialog\r\n title={title}\r\n description={description}\r\n cancelLabel={cancelLabel}\r\n confirmLabel={confirmLabel}\r\n confirmVariant=\"danger\"\r\n loading={loading}\r\n {...(isOpen !== undefined ? { open: isOpen } : {})}\r\n {...(onClose !== undefined ? { onClose } : {})}\r\n {...(onDelete !== undefined ? { onConfirm: onDelete } : {})}\r\n {...(impact !== undefined ? { impact } : {})}\r\n />\r\n );\r\n}\r\n\r\nexport default DeleteResourceConfirmDialog;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAK,GAAA,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AA1E,WAAA,CAAA4E,GAAA,EAAC9E,cAAA,WAAa,EAAAuC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA;IACZ8B,KAAK,EAAEA,KAAM;IACbC,WAAW,EAAEA,WAAY;IACzBK,WAAW,EAAEA,WAAY;IACzBF,YAAY,EAAEA,YAAa;IAC3BM,cAAc,EAAC,QAAQ;IACvBF,OAAO,EAAEA;EAAQ,GACZX,MAAM,KAAKN,SAAS,GAAG;IAAEoB,IAAI,EAAEd;EAAO,CAAC,GAAG,CAAC,CAAC,GAC5CC,OAAO,KAAKP,SAAS,GAAG;IAAEO,OAAO,EAAPA;EAAQ,CAAC,GAAG,CAAC,CAAC,GACxCC,QAAQ,KAAKR,SAAS,GAAG;IAAEqB,SAAS,EAAEb;EAAS,CAAC,GAAG,CAAC,CAAC,GACrDG,MAAM,KAAKX,SAAS,GAAG;IAAEW,MAAM,EAANA;EAAO,CAAC,GAAG,CAAC,CAAC,CAC5C,CAAC;AAEN;AAAC,IAAAW,QAAA,GAAAC,OAAA,cAEcnB,2BAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import FavoriteToggle from "../components/FavoriteToggle";
|
|
3
|
+
import type { DataGridColumn } from "../types/datagrid";
|
|
4
|
+
import type { RowId } from "../types/common";
|
|
5
|
+
/**
|
|
6
|
+
* FavoriteColumn - Portnet UI v2 (pattern)
|
|
7
|
+
*
|
|
8
|
+
* `makeFavoriteColumn(options)` builds a v2 DataGrid column definition for
|
|
9
|
+
* a compact "follow" (suivi) star column. Spread it into the grid's
|
|
10
|
+
* `columns` first so it sits at the LEFT of each row:
|
|
11
|
+
*
|
|
12
|
+
* const columns = [
|
|
13
|
+
* makeFavoriteColumn({ resourceKey: "ti:list", getRowId: (r) => r.reference }),
|
|
14
|
+
* { key: "reference", header: "Référence", ... },
|
|
15
|
+
* ...
|
|
16
|
+
* ];
|
|
17
|
+
* <DataGrid columns={columns} rows={rows} getRowId={(r) => r.reference} ... />
|
|
18
|
+
*
|
|
19
|
+
* Behaviour:
|
|
20
|
+
* - ALWAYS VISIBLE: the star is rendered on every row in both states
|
|
21
|
+
* (filled ★ when followed, outline ☆ when not) — it is NOT
|
|
22
|
+
* hover-revealed. It sits at the left of the row.
|
|
23
|
+
* - COMPACT: no visible column header (the header carries only a
|
|
24
|
+
* visually hidden accessible name "Suivis"), and a narrow 44px width,
|
|
25
|
+
* so the column takes minimal space.
|
|
26
|
+
* - STATUS TOOLTIP: hovering or focusing the star shows its current
|
|
27
|
+
* status — "Suivi" when followed, "Non suivi" otherwise. The button's
|
|
28
|
+
* accessible name stays action-oriented ("Suivre" / "Ne plus suivre",
|
|
29
|
+
* optionally enriched with the row label) and aria-pressed conveys the
|
|
30
|
+
* state, so screen-reader semantics are unaffected.
|
|
31
|
+
* - `toggleable: false` keeps the column out of ColumnsToggle (the user
|
|
32
|
+
* can't hide it); not sortable / resizable / reorderable (sorting BY
|
|
33
|
+
* follow status is a separate concern — see useFavoritesView /
|
|
34
|
+
* sortRowsByFavorites).
|
|
35
|
+
* - Each cell reads useIsFavorite (a boolean selector), so toggling one
|
|
36
|
+
* row re-renders only that row's star.
|
|
37
|
+
* - Toggling never triggers the row's onRowClick (click + keydown
|
|
38
|
+
* propagation stopped, mirroring the DataGrid selection checkbox).
|
|
39
|
+
*
|
|
40
|
+
* `getRowId` MUST match the one passed to <DataGrid> so the follow id and
|
|
41
|
+
* the grid row id agree. Requires a <UserPersonalizationProvider>
|
|
42
|
+
* ancestor (useIsFavorite throws otherwise).
|
|
43
|
+
*/
|
|
44
|
+
type FavoriteToggleSize = NonNullable<React.ComponentProps<typeof FavoriteToggle>["size"]>;
|
|
45
|
+
export interface FavoriteColumnLabels {
|
|
46
|
+
columnHeader: string;
|
|
47
|
+
addFavorite: string;
|
|
48
|
+
removeFavorite: string;
|
|
49
|
+
statusFollowed: string;
|
|
50
|
+
statusNotFollowed: string;
|
|
51
|
+
}
|
|
52
|
+
export interface MakeFavoriteColumnOptions<T> {
|
|
53
|
+
/** Required — follow namespace. */
|
|
54
|
+
resourceKey: string;
|
|
55
|
+
/** MUST match the grid's getRowId. Defaults to (r) => r.id. */
|
|
56
|
+
getRowId?: (row: T) => RowId;
|
|
57
|
+
/** Column key. @default "__favorite__" */
|
|
58
|
+
key?: string;
|
|
59
|
+
/** Toggle size (sm fits dense rows). @default "sm" */
|
|
60
|
+
size?: FavoriteToggleSize;
|
|
61
|
+
/** Column width (narrow / compact). @default 44 */
|
|
62
|
+
width?: number | string;
|
|
63
|
+
/** (row) => string, enriches the per-row aria-label. */
|
|
64
|
+
getRowLabel?: (row: T) => string;
|
|
65
|
+
labels?: Partial<FavoriteColumnLabels>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Builds a v2 DataGrid column definition for the compact follow-star column.
|
|
69
|
+
*/
|
|
70
|
+
export default function makeFavoriteColumn<T>(options: MakeFavoriteColumnOptions<T>): DataGridColumn<T>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=FavoriteColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FavoriteColumn.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/patterns/FavoriteColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,KAAK,kBAAkB,GAAG,WAAW,CACnC,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CACpD,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAoFD,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC;IAC7B,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,wDAAwD;IACxD,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,CAAC,EAC1C,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,cAAc,CAAC,CAAC,CAAC,CAqDnB"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = makeFavoriteColumn;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
9
|
+
var _FavoriteToggle = _interopRequireDefault(require("../components/FavoriteToggle"));
|
|
10
|
+
var _Tooltip = _interopRequireDefault(require("../components/Tooltip"));
|
|
11
|
+
var _favorites = require("../personalization/capabilities/favorites");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
22
|
+
* FavoriteColumn - Portnet UI v2 (pattern)
|
|
23
|
+
*
|
|
24
|
+
* `makeFavoriteColumn(options)` builds a v2 DataGrid column definition for
|
|
25
|
+
* a compact "follow" (suivi) star column. Spread it into the grid's
|
|
26
|
+
* `columns` first so it sits at the LEFT of each row:
|
|
27
|
+
*
|
|
28
|
+
* const columns = [
|
|
29
|
+
* makeFavoriteColumn({ resourceKey: "ti:list", getRowId: (r) => r.reference }),
|
|
30
|
+
* { key: "reference", header: "Référence", ... },
|
|
31
|
+
* ...
|
|
32
|
+
* ];
|
|
33
|
+
* <DataGrid columns={columns} rows={rows} getRowId={(r) => r.reference} ... />
|
|
34
|
+
*
|
|
35
|
+
* Behaviour:
|
|
36
|
+
* - ALWAYS VISIBLE: the star is rendered on every row in both states
|
|
37
|
+
* (filled ★ when followed, outline ☆ when not) — it is NOT
|
|
38
|
+
* hover-revealed. It sits at the left of the row.
|
|
39
|
+
* - COMPACT: no visible column header (the header carries only a
|
|
40
|
+
* visually hidden accessible name "Suivis"), and a narrow 44px width,
|
|
41
|
+
* so the column takes minimal space.
|
|
42
|
+
* - STATUS TOOLTIP: hovering or focusing the star shows its current
|
|
43
|
+
* status — "Suivi" when followed, "Non suivi" otherwise. The button's
|
|
44
|
+
* accessible name stays action-oriented ("Suivre" / "Ne plus suivre",
|
|
45
|
+
* optionally enriched with the row label) and aria-pressed conveys the
|
|
46
|
+
* state, so screen-reader semantics are unaffected.
|
|
47
|
+
* - `toggleable: false` keeps the column out of ColumnsToggle (the user
|
|
48
|
+
* can't hide it); not sortable / resizable / reorderable (sorting BY
|
|
49
|
+
* follow status is a separate concern — see useFavoritesView /
|
|
50
|
+
* sortRowsByFavorites).
|
|
51
|
+
* - Each cell reads useIsFavorite (a boolean selector), so toggling one
|
|
52
|
+
* row re-renders only that row's star.
|
|
53
|
+
* - Toggling never triggers the row's onRowClick (click + keydown
|
|
54
|
+
* propagation stopped, mirroring the DataGrid selection checkbox).
|
|
55
|
+
*
|
|
56
|
+
* `getRowId` MUST match the one passed to <DataGrid> so the follow id and
|
|
57
|
+
* the grid row id agree. Requires a <UserPersonalizationProvider>
|
|
58
|
+
* ancestor (useIsFavorite throws otherwise).
|
|
59
|
+
*/
|
|
60
|
+
var DEFAULT_LABELS = Object.freeze({
|
|
61
|
+
columnHeader: "Suivis",
|
|
62
|
+
addFavorite: "Suivre",
|
|
63
|
+
removeFavorite: "Ne plus suivre",
|
|
64
|
+
statusFollowed: "Suivi",
|
|
65
|
+
statusNotFollowed: "Non suivi"
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** Visually hidden, but exposed to assistive tech (the column's accessible name). */
|
|
69
|
+
var SR_ONLY_SX = Object.freeze({
|
|
70
|
+
position: "absolute",
|
|
71
|
+
width: "1px",
|
|
72
|
+
height: "1px",
|
|
73
|
+
padding: 0,
|
|
74
|
+
margin: "-1px",
|
|
75
|
+
overflow: "hidden",
|
|
76
|
+
clip: "rect(0 0 0 0)",
|
|
77
|
+
whiteSpace: "nowrap",
|
|
78
|
+
border: 0
|
|
79
|
+
});
|
|
80
|
+
function FavoriteCell(props) {
|
|
81
|
+
var resourceKey = props.resourceKey,
|
|
82
|
+
id = props.id,
|
|
83
|
+
size = props.size,
|
|
84
|
+
addLabel = props.addLabel,
|
|
85
|
+
removeLabel = props.removeLabel,
|
|
86
|
+
followedLabel = props.followedLabel,
|
|
87
|
+
notFollowedLabel = props.notFollowedLabel,
|
|
88
|
+
rowLabel = props.rowLabel;
|
|
89
|
+
var _useIsFavorite = (0, _favorites.useIsFavorite)(resourceKey, id),
|
|
90
|
+
isFavorite = _useIsFavorite.isFavorite,
|
|
91
|
+
toggle = _useIsFavorite.toggle;
|
|
92
|
+
|
|
93
|
+
// Action-oriented accessible name (toggle convention); aria-pressed (set
|
|
94
|
+
// by FavoriteToggle) carries the state. Always provided, so the Tooltip
|
|
95
|
+
// never mirrors its title onto the trigger.
|
|
96
|
+
var action = isFavorite ? removeLabel : addLabel;
|
|
97
|
+
var ariaLabel = rowLabel ? action + " : " + rowLabel : action;
|
|
98
|
+
// Visible status shown on hover/focus.
|
|
99
|
+
var statusLabel = isFavorite ? followedLabel : notFollowedLabel;
|
|
100
|
+
var handleChange = function handleChange(_next, e) {
|
|
101
|
+
// Don't let the toggle's click bubble to the row's onRowClick.
|
|
102
|
+
if (e && typeof e.stopPropagation === "function") e.stopPropagation();
|
|
103
|
+
toggle();
|
|
104
|
+
};
|
|
105
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
106
|
+
// Prevent row-level Enter/Space (onRowClick) from also firing; the
|
|
107
|
+
// button's own native activation is unaffected.
|
|
108
|
+
e.stopPropagation();
|
|
109
|
+
};
|
|
110
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip["default"], {
|
|
111
|
+
title: statusLabel,
|
|
112
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FavoriteToggle["default"], {
|
|
113
|
+
pressed: isFavorite,
|
|
114
|
+
onChange: handleChange,
|
|
115
|
+
onKeyDown: handleKeyDown,
|
|
116
|
+
size: size,
|
|
117
|
+
labels: {
|
|
118
|
+
addFavorite: addLabel,
|
|
119
|
+
removeFavorite: removeLabel
|
|
120
|
+
},
|
|
121
|
+
"aria-label": ariaLabel
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Builds a v2 DataGrid column definition for the compact follow-star column.
|
|
127
|
+
*/
|
|
128
|
+
function makeFavoriteColumn(options) {
|
|
129
|
+
var opts = options;
|
|
130
|
+
var resourceKey = opts.resourceKey;
|
|
131
|
+
var getRowId = typeof opts.getRowId === "function" ? opts.getRowId : function defaultGetRowId(r) {
|
|
132
|
+
return r.id;
|
|
133
|
+
};
|
|
134
|
+
var key = opts.key || "__favorite__";
|
|
135
|
+
var size = opts.size || "sm";
|
|
136
|
+
var width = opts.width != null ? opts.width : 44;
|
|
137
|
+
var getRowLabel = typeof opts.getRowLabel === "function" ? opts.getRowLabel : null;
|
|
138
|
+
var L = opts.labels ? _objectSpread(_objectSpread({}, DEFAULT_LABELS), opts.labels) : DEFAULT_LABELS;
|
|
139
|
+
if (process.env["NODE_ENV"] !== "production" && !resourceKey) {
|
|
140
|
+
// eslint-disable-next-line no-console
|
|
141
|
+
console.warn("[@portnet/ui v2] makeFavoriteColumn: `resourceKey` is required to scope follows.");
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
key: key,
|
|
145
|
+
header: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
146
|
+
component: "span",
|
|
147
|
+
sx: SR_ONLY_SX,
|
|
148
|
+
children: L.columnHeader
|
|
149
|
+
}),
|
|
150
|
+
align: "center",
|
|
151
|
+
sortable: false,
|
|
152
|
+
toggleable: false,
|
|
153
|
+
// kept out of ColumnsToggle (cannot be hidden)
|
|
154
|
+
resizable: false,
|
|
155
|
+
reorderable: false,
|
|
156
|
+
width: width,
|
|
157
|
+
render: function renderFavorite(row) {
|
|
158
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FavoriteCell, {
|
|
159
|
+
resourceKey: resourceKey,
|
|
160
|
+
id: getRowId(row),
|
|
161
|
+
size: size,
|
|
162
|
+
addLabel: L.addFavorite,
|
|
163
|
+
removeLabel: L.removeFavorite,
|
|
164
|
+
followedLabel: L.statusFollowed,
|
|
165
|
+
notFollowedLabel: L.statusNotFollowed,
|
|
166
|
+
rowLabel: getRowLabel ? getRowLabel(row) : undefined
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=FavoriteColumn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FavoriteColumn.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_FavoriteToggle","_Tooltip","_favorites","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","DEFAULT_LABELS","freeze","columnHeader","addFavorite","removeFavorite","statusFollowed","statusNotFollowed","SR_ONLY_SX","position","width","height","padding","margin","overflow","clip","whiteSpace","border","FavoriteCell","props","resourceKey","id","size","addLabel","removeLabel","followedLabel","notFollowedLabel","rowLabel","_useIsFavorite","useIsFavorite","isFavorite","toggle","action","ariaLabel","statusLabel","handleChange","_next","e","stopPropagation","handleKeyDown","jsx","title","children","pressed","onChange","onKeyDown","labels","makeFavoriteColumn","options","opts","getRowId","defaultGetRowId","r","getRowLabel","L","process","env","console","warn","header","component","sx","align","sortable","toggleable","resizable","reorderable","render","renderFavorite","row"],"sources":["../../../src/lib/v2/patterns/FavoriteColumn.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\n\r\nimport FavoriteToggle from \"../components/FavoriteToggle\";\r\nimport Tooltip from \"../components/Tooltip\";\r\nimport { useIsFavorite } from \"../personalization/capabilities/favorites\";\r\nimport type { DataGridColumn } from \"../types/datagrid\";\r\nimport type { RowId } from \"../types/common\";\r\n\r\n/**\r\n * FavoriteColumn - Portnet UI v2 (pattern)\r\n *\r\n * `makeFavoriteColumn(options)` builds a v2 DataGrid column definition for\r\n * a compact \"follow\" (suivi) star column. Spread it into the grid's\r\n * `columns` first so it sits at the LEFT of each row:\r\n *\r\n * const columns = [\r\n * makeFavoriteColumn({ resourceKey: \"ti:list\", getRowId: (r) => r.reference }),\r\n * { key: \"reference\", header: \"Référence\", ... },\r\n * ...\r\n * ];\r\n * <DataGrid columns={columns} rows={rows} getRowId={(r) => r.reference} ... />\r\n *\r\n * Behaviour:\r\n * - ALWAYS VISIBLE: the star is rendered on every row in both states\r\n * (filled ★ when followed, outline ☆ when not) — it is NOT\r\n * hover-revealed. It sits at the left of the row.\r\n * - COMPACT: no visible column header (the header carries only a\r\n * visually hidden accessible name \"Suivis\"), and a narrow 44px width,\r\n * so the column takes minimal space.\r\n * - STATUS TOOLTIP: hovering or focusing the star shows its current\r\n * status — \"Suivi\" when followed, \"Non suivi\" otherwise. The button's\r\n * accessible name stays action-oriented (\"Suivre\" / \"Ne plus suivre\",\r\n * optionally enriched with the row label) and aria-pressed conveys the\r\n * state, so screen-reader semantics are unaffected.\r\n * - `toggleable: false` keeps the column out of ColumnsToggle (the user\r\n * can't hide it); not sortable / resizable / reorderable (sorting BY\r\n * follow status is a separate concern — see useFavoritesView /\r\n * sortRowsByFavorites).\r\n * - Each cell reads useIsFavorite (a boolean selector), so toggling one\r\n * row re-renders only that row's star.\r\n * - Toggling never triggers the row's onRowClick (click + keydown\r\n * propagation stopped, mirroring the DataGrid selection checkbox).\r\n *\r\n * `getRowId` MUST match the one passed to <DataGrid> so the follow id and\r\n * the grid row id agree. Requires a <UserPersonalizationProvider>\r\n * ancestor (useIsFavorite throws otherwise).\r\n */\r\n\r\ntype FavoriteToggleSize = NonNullable<\r\n React.ComponentProps<typeof FavoriteToggle>[\"size\"]\r\n>;\r\n\r\nexport interface FavoriteColumnLabels {\r\n columnHeader: string;\r\n addFavorite: string;\r\n removeFavorite: string;\r\n statusFollowed: string;\r\n statusNotFollowed: string;\r\n}\r\n\r\nconst DEFAULT_LABELS = Object.freeze({\r\n columnHeader: \"Suivis\",\r\n addFavorite: \"Suivre\",\r\n removeFavorite: \"Ne plus suivre\",\r\n statusFollowed: \"Suivi\",\r\n statusNotFollowed: \"Non suivi\",\r\n} satisfies FavoriteColumnLabels);\r\n\r\n/** Visually hidden, but exposed to assistive tech (the column's accessible name). */\r\nconst SR_ONLY_SX = Object.freeze({\r\n position: \"absolute\",\r\n width: \"1px\",\r\n height: \"1px\",\r\n padding: 0,\r\n margin: \"-1px\",\r\n overflow: \"hidden\",\r\n clip: \"rect(0 0 0 0)\",\r\n whiteSpace: \"nowrap\",\r\n border: 0,\r\n} satisfies SxProps<Theme>);\r\n\r\ninterface FavoriteCellProps {\r\n resourceKey: string;\r\n id: RowId;\r\n size: FavoriteToggleSize;\r\n addLabel: string;\r\n removeLabel: string;\r\n followedLabel: string;\r\n notFollowedLabel: string;\r\n rowLabel?: string | undefined;\r\n}\r\n\r\nfunction FavoriteCell(props: FavoriteCellProps): React.JSX.Element {\r\n const {\r\n resourceKey,\r\n id,\r\n size,\r\n addLabel,\r\n removeLabel,\r\n followedLabel,\r\n notFollowedLabel,\r\n rowLabel,\r\n } = props;\r\n const { isFavorite, toggle } = useIsFavorite(resourceKey, id);\r\n\r\n // Action-oriented accessible name (toggle convention); aria-pressed (set\r\n // by FavoriteToggle) carries the state. Always provided, so the Tooltip\r\n // never mirrors its title onto the trigger.\r\n const action = isFavorite ? removeLabel : addLabel;\r\n const ariaLabel = rowLabel ? action + \" : \" + rowLabel : action;\r\n // Visible status shown on hover/focus.\r\n const statusLabel = isFavorite ? followedLabel : notFollowedLabel;\r\n\r\n const handleChange: NonNullable<\r\n React.ComponentProps<typeof FavoriteToggle>[\"onChange\"]\r\n > = function handleChange(_next, e) {\r\n // Don't let the toggle's click bubble to the row's onRowClick.\r\n if (e && typeof e.stopPropagation === \"function\") e.stopPropagation();\r\n toggle();\r\n };\r\n const handleKeyDown: NonNullable<\r\n React.ComponentProps<typeof FavoriteToggle>[\"onKeyDown\"]\r\n > = function handleKeyDown(e) {\r\n // Prevent row-level Enter/Space (onRowClick) from also firing; the\r\n // button's own native activation is unaffected.\r\n e.stopPropagation();\r\n };\r\n\r\n return (\r\n <Tooltip title={statusLabel}>\r\n <FavoriteToggle\r\n pressed={isFavorite}\r\n onChange={handleChange}\r\n onKeyDown={handleKeyDown}\r\n size={size}\r\n labels={{ addFavorite: addLabel, removeFavorite: removeLabel }}\r\n aria-label={ariaLabel}\r\n />\r\n </Tooltip>\r\n );\r\n}\r\n\r\nexport interface MakeFavoriteColumnOptions<T> {\r\n /** Required — follow namespace. */\r\n resourceKey: string;\r\n /** MUST match the grid's getRowId. Defaults to (r) => r.id. */\r\n getRowId?: (row: T) => RowId;\r\n /** Column key. @default \"__favorite__\" */\r\n key?: string;\r\n /** Toggle size (sm fits dense rows). @default \"sm\" */\r\n size?: FavoriteToggleSize;\r\n /** Column width (narrow / compact). @default 44 */\r\n width?: number | string;\r\n /** (row) => string, enriches the per-row aria-label. */\r\n getRowLabel?: (row: T) => string;\r\n labels?: Partial<FavoriteColumnLabels>;\r\n}\r\n\r\n/**\r\n * Builds a v2 DataGrid column definition for the compact follow-star column.\r\n */\r\nexport default function makeFavoriteColumn<T>(\r\n options: MakeFavoriteColumnOptions<T>\r\n): DataGridColumn<T> {\r\n const opts = options;\r\n const resourceKey = opts.resourceKey;\r\n const getRowId: (row: T) => RowId =\r\n typeof opts.getRowId === \"function\"\r\n ? opts.getRowId\r\n : function defaultGetRowId(r: T): RowId {\r\n return (r as { id: RowId }).id;\r\n };\r\n const key = opts.key || \"__favorite__\";\r\n const size = opts.size || \"sm\";\r\n const width: number | string = opts.width != null ? opts.width : 44;\r\n const getRowLabel =\r\n typeof opts.getRowLabel === \"function\" ? opts.getRowLabel : null;\r\n const L: FavoriteColumnLabels = opts.labels\r\n ? { ...DEFAULT_LABELS, ...opts.labels }\r\n : DEFAULT_LABELS;\r\n\r\n if (process.env[\"NODE_ENV\"] !== \"production\" && !resourceKey) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n \"[@portnet/ui v2] makeFavoriteColumn: `resourceKey` is required to scope follows.\"\r\n );\r\n }\r\n\r\n return {\r\n key: key,\r\n header: (\r\n <Box component=\"span\" sx={SR_ONLY_SX}>\r\n {L.columnHeader}\r\n </Box>\r\n ),\r\n align: \"center\",\r\n sortable: false,\r\n toggleable: false, // kept out of ColumnsToggle (cannot be hidden)\r\n resizable: false,\r\n reorderable: false,\r\n width: width,\r\n render: function renderFavorite(row: T): React.ReactNode {\r\n return (\r\n <FavoriteCell\r\n resourceKey={resourceKey}\r\n id={getRowId(row)}\r\n size={size}\r\n addLabel={L.addFavorite}\r\n removeLabel={L.removeFavorite}\r\n followedLabel={L.statusFollowed}\r\n notFollowedLabel={L.statusNotFollowed}\r\n rowLabel={getRowLabel ? getRowLabel(row) : undefined}\r\n />\r\n );\r\n },\r\n };\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAA0E,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAE,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC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AI,CAACpC,WAAW,EAAE;IAC5D;IACAqC,OAAO,CAACC,IAAI,CACV,kFACF,CAAC;EACH;EAEA,OAAO;IACLtG,GAAG,EAAEA,GAAG;IACRuG,MAAM,eACJ,IAAAxH,WAAA,CAAAqG,GAAA,EAAC1G,IAAA,WAAG;MAAC8H,SAAS,EAAC,MAAM;MAACC,EAAE,EAAErD,UAAW;MAAAkC,QAAA,EAClCY,CAAC,CAACnD;IAAY,CACZ,CACN;IACD2D,KAAK,EAAE,QAAQ;IACfC,QAAQ,EAAE,KAAK;IACfC,UAAU,EAAE,KAAK;IAAE;IACnBC,SAAS,EAAE,KAAK;IAChBC,WAAW,EAAE,KAAK;IAClBxD,KAAK,EAAEA,KAAK;IACZyD,MAAM,EAAE,SAASC,cAAcA,CAACC,GAAM,EAAmB;MACvD,oBACE,IAAAlI,WAAA,CAAAqG,GAAA,EAACtB,YAAY;QACXE,WAAW,EAAEA,WAAY;QACzBC,EAAE,EAAE6B,QAAQ,CAACmB,GAAG,CAAE;QAClB/C,IAAI,EAAEA,IAAK;QACXC,QAAQ,EAAE+B,CAAC,CAAClD,WAAY;QACxBoB,WAAW,EAAE8B,CAAC,CAACjD,cAAe;QAC9BoB,aAAa,EAAE6B,CAAC,CAAChD,cAAe;QAChCoB,gBAAgB,EAAE4B,CAAC,CAAC/C,iBAAkB;QACtCoB,QAAQ,EAAE0B,WAAW,GAAGA,WAAW,CAACgB,GAAG,CAAC,GAAGxE;MAAU,CACtD,CAAC;IAEN;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
3
|
+
import type { FavoritesFilterMode } from "../personalization/capabilities/favoritesView";
|
|
4
|
+
/**
|
|
5
|
+
* FavoritesFilter - Portnet UI v2 (pattern)
|
|
6
|
+
*
|
|
7
|
+
* Presentational "Tous / Suivis" toggle for the follow filter, built on
|
|
8
|
+
* the v2 Segmented (role=radiogroup, arrow-key selection, focus halo).
|
|
9
|
+
* Provider-free — drive it from the same state you pass to
|
|
10
|
+
* useFavoritesView:
|
|
11
|
+
*
|
|
12
|
+
* const [favFilter, setFavFilter] = React.useState("all");
|
|
13
|
+
* const view = useFavoritesView("ti:list", rows, {
|
|
14
|
+
* getRowId, filterMode: favFilter,
|
|
15
|
+
* });
|
|
16
|
+
* <FavoritesFilter
|
|
17
|
+
* value={favFilter}
|
|
18
|
+
* onChange={setFavFilter}
|
|
19
|
+
* favoriteCount={view.favoriteCount}
|
|
20
|
+
* totalCount={rows.length}
|
|
21
|
+
* />
|
|
22
|
+
*
|
|
23
|
+
* Values ("all" | "only") match FAVORITES_FILTER. Pass `fullWidth` to let
|
|
24
|
+
* it span its row on narrow / mobile toolbars.
|
|
25
|
+
*/
|
|
26
|
+
export interface FavoritesFilterLabels {
|
|
27
|
+
all: string;
|
|
28
|
+
favorites: string;
|
|
29
|
+
ariaLabel: string;
|
|
30
|
+
}
|
|
31
|
+
export interface FavoritesFilterProps {
|
|
32
|
+
/** Current mode (matches FAVORITES_FILTER). @default "all" */
|
|
33
|
+
value?: FavoritesFilterMode;
|
|
34
|
+
/** (mode) => void. */
|
|
35
|
+
onChange?: (value: FavoritesFilterMode) => void;
|
|
36
|
+
/** Count shown on the "Suivis" segment. */
|
|
37
|
+
favoriteCount?: number;
|
|
38
|
+
/** Count shown on the "Tous" segment. */
|
|
39
|
+
totalCount?: number;
|
|
40
|
+
showCounts?: boolean;
|
|
41
|
+
showIcon?: boolean;
|
|
42
|
+
size?: "sm" | "md";
|
|
43
|
+
/** Span the available width — useful on narrow / mobile toolbars. */
|
|
44
|
+
fullWidth?: boolean;
|
|
45
|
+
/** Localised labels (FR default; EN/AR supported). */
|
|
46
|
+
labels?: Partial<FavoritesFilterLabels>;
|
|
47
|
+
sx?: SxProps<Theme>;
|
|
48
|
+
}
|
|
49
|
+
declare function FavoritesFilter(props: FavoritesFilterProps): React.JSX.Element;
|
|
50
|
+
export default FavoritesFilter;
|
|
51
|
+
//# sourceMappingURL=FavoritesFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FavoritesFilter.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/patterns/FavoritesFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAYD,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,sBAAsB;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACxC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwDvE;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _StarRounded = _interopRequireDefault(require("@mui/icons-material/StarRounded"));
|
|
9
|
+
var _Segmented = _interopRequireDefault(require("../components/Segmented"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
20
|
+
* FavoritesFilter - Portnet UI v2 (pattern)
|
|
21
|
+
*
|
|
22
|
+
* Presentational "Tous / Suivis" toggle for the follow filter, built on
|
|
23
|
+
* the v2 Segmented (role=radiogroup, arrow-key selection, focus halo).
|
|
24
|
+
* Provider-free — drive it from the same state you pass to
|
|
25
|
+
* useFavoritesView:
|
|
26
|
+
*
|
|
27
|
+
* const [favFilter, setFavFilter] = React.useState("all");
|
|
28
|
+
* const view = useFavoritesView("ti:list", rows, {
|
|
29
|
+
* getRowId, filterMode: favFilter,
|
|
30
|
+
* });
|
|
31
|
+
* <FavoritesFilter
|
|
32
|
+
* value={favFilter}
|
|
33
|
+
* onChange={setFavFilter}
|
|
34
|
+
* favoriteCount={view.favoriteCount}
|
|
35
|
+
* totalCount={rows.length}
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* Values ("all" | "only") match FAVORITES_FILTER. Pass `fullWidth` to let
|
|
39
|
+
* it span its row on narrow / mobile toolbars.
|
|
40
|
+
*/
|
|
41
|
+
var DEFAULT_LABELS = Object.freeze({
|
|
42
|
+
all: "Tous",
|
|
43
|
+
favorites: "Suivis",
|
|
44
|
+
ariaLabel: "Filtrer par suivis"
|
|
45
|
+
});
|
|
46
|
+
function withCount(label, count) {
|
|
47
|
+
return typeof count === "number" ? label + " (" + count + ")" : label;
|
|
48
|
+
}
|
|
49
|
+
function FavoritesFilter(props) {
|
|
50
|
+
var _props$value = props.value,
|
|
51
|
+
value = _props$value === void 0 ? "all" : _props$value,
|
|
52
|
+
onChange = props.onChange,
|
|
53
|
+
favoriteCount = props.favoriteCount,
|
|
54
|
+
totalCount = props.totalCount,
|
|
55
|
+
_props$showCounts = props.showCounts,
|
|
56
|
+
showCounts = _props$showCounts === void 0 ? true : _props$showCounts,
|
|
57
|
+
_props$showIcon = props.showIcon,
|
|
58
|
+
showIcon = _props$showIcon === void 0 ? true : _props$showIcon,
|
|
59
|
+
_props$size = props.size,
|
|
60
|
+
size = _props$size === void 0 ? "sm" : _props$size,
|
|
61
|
+
_props$fullWidth = props.fullWidth,
|
|
62
|
+
fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,
|
|
63
|
+
labels = props.labels,
|
|
64
|
+
sx = props.sx;
|
|
65
|
+
var L = React.useMemo(function () {
|
|
66
|
+
return labels ? _objectSpread(_objectSpread({}, DEFAULT_LABELS), labels) : DEFAULT_LABELS;
|
|
67
|
+
}, [labels]);
|
|
68
|
+
var options = React.useMemo(function buildOptions() {
|
|
69
|
+
return [{
|
|
70
|
+
value: "all",
|
|
71
|
+
label: showCounts ? withCount(L.all, totalCount) : L.all
|
|
72
|
+
}, _objectSpread({
|
|
73
|
+
value: "only",
|
|
74
|
+
label: showCounts ? withCount(L.favorites, favoriteCount) : L.favorites
|
|
75
|
+
}, showIcon ? {
|
|
76
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StarRounded["default"], {
|
|
77
|
+
fontSize: "small"
|
|
78
|
+
})
|
|
79
|
+
} : {})];
|
|
80
|
+
}, [L, showCounts, showIcon, totalCount, favoriteCount]);
|
|
81
|
+
var handleChange = React.useCallback(function handleChange(v) {
|
|
82
|
+
// Segmented emits its configured option values only ("all" / "only").
|
|
83
|
+
if (onChange) onChange(v);
|
|
84
|
+
}, [onChange]);
|
|
85
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Segmented["default"], _objectSpread({
|
|
86
|
+
value: value,
|
|
87
|
+
onChange: handleChange,
|
|
88
|
+
options: options,
|
|
89
|
+
size: size,
|
|
90
|
+
fullWidth: fullWidth,
|
|
91
|
+
"aria-label": L.ariaLabel
|
|
92
|
+
}, sx !== undefined ? {
|
|
93
|
+
sx: sx
|
|
94
|
+
} : {}));
|
|
95
|
+
}
|
|
96
|
+
var _default = exports["default"] = FavoritesFilter;
|
|
97
|
+
//# sourceMappingURL=FavoritesFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FavoritesFilter.js","names":["React","_interopRequireWildcard","require","_StarRounded","_interopRequireDefault","_Segmented","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","DEFAULT_LABELS","freeze","all","favorites","ariaLabel","withCount","label","count","FavoritesFilter","props","_props$value","onChange","favoriteCount","totalCount","_props$showCounts","showCounts","_props$showIcon","showIcon","_props$size","size","_props$fullWidth","fullWidth","labels","sx","L","useMemo","options","buildOptions","icon","jsx","fontSize","handleChange","useCallback","v","_default","exports"],"sources":["../../../src/lib/v2/patterns/FavoritesFilter.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport StarRoundedIcon from \"@mui/icons-material/StarRounded\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\n\r\nimport Segmented from \"../components/Segmented\";\r\nimport type { SegmentedOption, SegmentedValue } from \"../components/Segmented\";\r\nimport type { FavoritesFilterMode } from \"../personalization/capabilities/favoritesView\";\r\n\r\n/**\r\n * FavoritesFilter - Portnet UI v2 (pattern)\r\n *\r\n * Presentational \"Tous / Suivis\" toggle for the follow filter, built on\r\n * the v2 Segmented (role=radiogroup, arrow-key selection, focus halo).\r\n * Provider-free — drive it from the same state you pass to\r\n * useFavoritesView:\r\n *\r\n * const [favFilter, setFavFilter] = React.useState(\"all\");\r\n * const view = useFavoritesView(\"ti:list\", rows, {\r\n * getRowId, filterMode: favFilter,\r\n * });\r\n * <FavoritesFilter\r\n * value={favFilter}\r\n * onChange={setFavFilter}\r\n * favoriteCount={view.favoriteCount}\r\n * totalCount={rows.length}\r\n * />\r\n *\r\n * Values (\"all\" | \"only\") match FAVORITES_FILTER. Pass `fullWidth` to let\r\n * it span its row on narrow / mobile toolbars.\r\n */\r\n\r\nexport interface FavoritesFilterLabels {\r\n all: string;\r\n favorites: string;\r\n ariaLabel: string;\r\n}\r\n\r\nconst DEFAULT_LABELS = Object.freeze({\r\n all: \"Tous\",\r\n favorites: \"Suivis\",\r\n ariaLabel: \"Filtrer par suivis\",\r\n} satisfies FavoritesFilterLabels);\r\n\r\nfunction withCount(label: string, count: number | undefined): string {\r\n return typeof count === \"number\" ? label + \" (\" + count + \")\" : label;\r\n}\r\n\r\nexport interface FavoritesFilterProps {\r\n /** Current mode (matches FAVORITES_FILTER). @default \"all\" */\r\n value?: FavoritesFilterMode;\r\n /** (mode) => void. */\r\n onChange?: (value: FavoritesFilterMode) => void;\r\n /** Count shown on the \"Suivis\" segment. */\r\n favoriteCount?: number;\r\n /** Count shown on the \"Tous\" segment. */\r\n totalCount?: number;\r\n showCounts?: boolean;\r\n showIcon?: boolean;\r\n size?: \"sm\" | \"md\";\r\n /** Span the available width — useful on narrow / mobile toolbars. */\r\n fullWidth?: boolean;\r\n /** Localised labels (FR default; EN/AR supported). */\r\n labels?: Partial<FavoritesFilterLabels>;\r\n sx?: SxProps<Theme>;\r\n}\r\n\r\nfunction FavoritesFilter(props: FavoritesFilterProps): React.JSX.Element {\r\n const {\r\n value = \"all\",\r\n onChange,\r\n favoriteCount,\r\n totalCount,\r\n showCounts = true,\r\n showIcon = true,\r\n size = \"sm\",\r\n fullWidth = false,\r\n labels,\r\n sx,\r\n } = props;\r\n const L = React.useMemo<FavoritesFilterLabels>(\r\n () => (labels ? { ...DEFAULT_LABELS, ...labels } : DEFAULT_LABELS),\r\n [labels]\r\n );\r\n\r\n const options = React.useMemo<SegmentedOption[]>(\r\n function buildOptions() {\r\n return [\r\n {\r\n value: \"all\",\r\n label: showCounts ? withCount(L.all, totalCount) : L.all,\r\n },\r\n {\r\n value: \"only\",\r\n label: showCounts\r\n ? withCount(L.favorites, favoriteCount)\r\n : L.favorites,\r\n ...(showIcon ? { icon: <StarRoundedIcon fontSize=\"small\" /> } : {}),\r\n },\r\n ];\r\n },\r\n [L, showCounts, showIcon, totalCount, favoriteCount]\r\n );\r\n\r\n const handleChange = React.useCallback(\r\n function handleChange(v: SegmentedValue): void {\r\n // Segmented emits its configured option values only (\"all\" / \"only\").\r\n if (onChange) onChange(v as FavoritesFilterMode);\r\n },\r\n [onChange]\r\n );\r\n\r\n return (\r\n <Segmented\r\n value={value}\r\n onChange={handleChange}\r\n options={options}\r\n size={size}\r\n fullWidth={fullWidth}\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