@portnet/ui 6.0.2 → 6.0.3
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 +652 -0
- package/dist/esm/index.js +72 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/v2/__tests__/AppMain.test.js +130 -0
- package/dist/esm/v2/__tests__/AppMain.test.js.map +1 -0
- package/dist/esm/v2/__tests__/ChartFigure.test.js +180 -0
- package/dist/esm/v2/__tests__/ChartFigure.test.js.map +1 -0
- package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js +150 -0
- package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
- package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js +93 -0
- package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldError.test.js +71 -38
- package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FieldNaming.test.js +160 -0
- package/dist/esm/v2/__tests__/FieldNaming.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldWidth.test.js +11 -11
- package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FileCard.test.js +18 -17
- package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js +87 -179
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +32 -44
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js +101 -0
- package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js +118 -199
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
- package/dist/esm/v2/__tests__/MobileRowCard.test.js +44 -42
- package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/PreviewDrawer.test.js +165 -0
- package/dist/esm/v2/__tests__/PreviewDrawer.test.js.map +1 -0
- package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js +156 -0
- package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +37 -52
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
- package/dist/esm/v2/__tests__/apiError.test.js +50 -69
- package/dist/esm/v2/__tests__/apiError.test.js.map +1 -1
- package/dist/esm/v2/__tests__/banned-patterns.test.js +41 -122
- package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -1
- package/dist/esm/v2/__tests__/chart-palette.test.js +204 -0
- package/dist/esm/v2/__tests__/chart-palette.test.js.map +1 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js +42 -74
- package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -1
- package/dist/esm/v2/__tests__/cssVariables.test.js +44 -51
- package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -1
- package/dist/esm/v2/__tests__/fileValidation.test.js +134 -0
- package/dist/esm/v2/__tests__/fileValidation.test.js.map +1 -0
- package/dist/esm/v2/__tests__/filterCriteria.test.js +321 -0
- package/dist/esm/v2/__tests__/filterCriteria.test.js.map +1 -0
- package/dist/esm/v2/__tests__/fmtDate.test.js +68 -0
- package/dist/esm/v2/__tests__/fmtDate.test.js.map +1 -0
- package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js +218 -0
- package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js +17 -21
- package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -1
- package/dist/esm/v2/__tests__/locale-fallback.test.js +35 -40
- package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -1
- package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js +143 -0
- package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
- package/dist/esm/v2/__tests__/rowActions.test.js +182 -0
- package/dist/esm/v2/__tests__/rowActions.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js +155 -0
- package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js +266 -402
- package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -1
- package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js +120 -0
- package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
- package/dist/esm/v2/components/Accordion.js +48 -70
- package/dist/esm/v2/components/Accordion.js.map +1 -1
- package/dist/esm/v2/components/ActionStrip.js +31 -43
- package/dist/esm/v2/components/ActionStrip.js.map +1 -1
- package/dist/esm/v2/components/Banner.js +25 -22
- package/dist/esm/v2/components/Banner.js.map +1 -1
- package/dist/esm/v2/components/Busy.js +14 -19
- package/dist/esm/v2/components/Busy.js.map +1 -1
- package/dist/esm/v2/components/Button.js +34 -45
- package/dist/esm/v2/components/Button.js.map +1 -1
- package/dist/esm/v2/components/CategoryTag.js +44 -27
- package/dist/esm/v2/components/CategoryTag.js.map +1 -1
- package/dist/esm/v2/components/Checkbox.js +32 -38
- package/dist/esm/v2/components/Checkbox.js.map +1 -1
- package/dist/esm/v2/components/Chip.js +23 -36
- package/dist/esm/v2/components/Chip.js.map +1 -1
- package/dist/esm/v2/components/Combobox.js +112 -136
- package/dist/esm/v2/components/Combobox.js.map +1 -1
- package/dist/esm/v2/components/CommandPalette.js +113 -198
- package/dist/esm/v2/components/CommandPalette.js.map +1 -1
- package/dist/esm/v2/components/ConfirmDialog.js +36 -45
- package/dist/esm/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/esm/v2/components/DatePicker.js +78 -81
- package/dist/esm/v2/components/DatePicker.js.map +1 -1
- package/dist/esm/v2/components/DateRangePicker.js +63 -74
- package/dist/esm/v2/components/DateRangePicker.js.map +1 -1
- package/dist/esm/v2/components/DateTimePicker.js +81 -86
- package/dist/esm/v2/components/DateTimePicker.js.map +1 -1
- package/dist/esm/v2/components/Drawer.js +71 -65
- package/dist/esm/v2/components/Drawer.js.map +1 -1
- package/dist/esm/v2/components/Dropzone.js +130 -177
- package/dist/esm/v2/components/Dropzone.js.map +1 -1
- package/dist/esm/v2/components/EmptyState.js +9 -9
- package/dist/esm/v2/components/EmptyState.js.map +1 -1
- package/dist/esm/v2/components/FavoriteToggle.js +24 -33
- package/dist/esm/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/esm/v2/components/Field.js +155 -59
- package/dist/esm/v2/components/Field.js.map +1 -1
- package/dist/esm/v2/components/FieldError.js +9 -13
- package/dist/esm/v2/components/FieldError.js.map +1 -1
- package/dist/esm/v2/components/FieldHelp.js +28 -49
- package/dist/esm/v2/components/FieldHelp.js.map +1 -1
- package/dist/esm/v2/components/FileCard.js +14 -19
- package/dist/esm/v2/components/FileCard.js.map +1 -1
- package/dist/esm/v2/components/FilterTab.js +22 -31
- package/dist/esm/v2/components/FilterTab.js.map +1 -1
- package/dist/esm/v2/components/ForbiddenPage.js +28 -8
- package/dist/esm/v2/components/ForbiddenPage.js.map +1 -1
- package/dist/esm/v2/components/FormGrid.js +48 -54
- package/dist/esm/v2/components/FormGrid.js.map +1 -1
- package/dist/esm/v2/components/FormikDisplay.js +98 -24
- package/dist/esm/v2/components/FormikDisplay.js.map +1 -1
- package/dist/esm/v2/components/Input.js +75 -34
- package/dist/esm/v2/components/Input.js.map +1 -1
- package/dist/esm/v2/components/KPICard.js +42 -51
- package/dist/esm/v2/components/KPICard.js.map +1 -1
- package/dist/esm/v2/components/KPIStrip.js +9 -15
- package/dist/esm/v2/components/KPIStrip.js.map +1 -1
- package/dist/esm/v2/components/KV.js +16 -23
- package/dist/esm/v2/components/KV.js.map +1 -1
- package/dist/esm/v2/components/KVGrid.js +15 -23
- package/dist/esm/v2/components/KVGrid.js.map +1 -1
- package/dist/esm/v2/components/Layout.js +81 -117
- package/dist/esm/v2/components/Layout.js.map +1 -1
- package/dist/esm/v2/components/MobileRowCard.js +64 -75
- package/dist/esm/v2/components/MobileRowCard.js.map +1 -1
- package/dist/esm/v2/components/Modal.js +44 -53
- package/dist/esm/v2/components/Modal.js.map +1 -1
- package/dist/esm/v2/components/NetworkErrorPage.js +28 -11
- package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/esm/v2/components/NotFoundPage.js +28 -9
- package/dist/esm/v2/components/NotFoundPage.js.map +1 -1
- package/dist/esm/v2/components/NumberInput.js +77 -107
- package/dist/esm/v2/components/NumberInput.js.map +1 -1
- package/dist/esm/v2/components/OverflowMenu.js +24 -42
- package/dist/esm/v2/components/OverflowMenu.js.map +1 -1
- package/dist/esm/v2/components/PdfViewer.js +24 -33
- package/dist/esm/v2/components/PdfViewer.js.map +1 -1
- package/dist/esm/v2/components/ProgressBar.js +28 -36
- package/dist/esm/v2/components/ProgressBar.js.map +1 -1
- package/dist/esm/v2/components/Radio.js +49 -57
- package/dist/esm/v2/components/Radio.js.map +1 -1
- package/dist/esm/v2/components/SectionErrorBoundary.js +84 -130
- package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -1
- package/dist/esm/v2/components/SectionHeader.js +24 -31
- package/dist/esm/v2/components/SectionHeader.js.map +1 -1
- package/dist/esm/v2/components/Segmented.js +59 -84
- package/dist/esm/v2/components/Segmented.js.map +1 -1
- package/dist/esm/v2/components/Select.js +100 -138
- package/dist/esm/v2/components/Select.js.map +1 -1
- package/dist/esm/v2/components/ServerErrorPage.js +27 -10
- package/dist/esm/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/esm/v2/components/Skeleton.js +81 -96
- package/dist/esm/v2/components/Skeleton.js.map +1 -1
- package/dist/esm/v2/components/SkipLink.js +6 -7
- package/dist/esm/v2/components/SkipLink.js.map +1 -1
- package/dist/esm/v2/components/Spinner.js +13 -22
- package/dist/esm/v2/components/Spinner.js.map +1 -1
- package/dist/esm/v2/components/Status.js +14 -25
- package/dist/esm/v2/components/Status.js.map +1 -1
- package/dist/esm/v2/components/Stepper.js +68 -71
- package/dist/esm/v2/components/Stepper.js.map +1 -1
- package/dist/esm/v2/components/Surface.js +25 -44
- package/dist/esm/v2/components/Surface.js.map +1 -1
- package/dist/esm/v2/components/Switch.js +21 -29
- package/dist/esm/v2/components/Switch.js.map +1 -1
- package/dist/esm/v2/components/TabPanel.js +84 -0
- package/dist/esm/v2/components/TabPanel.js.map +1 -0
- package/dist/esm/v2/components/Tabs.js +43 -19
- package/dist/esm/v2/components/Tabs.js.map +1 -1
- package/dist/esm/v2/components/TelInput.js +75 -108
- package/dist/esm/v2/components/TelInput.js.map +1 -1
- package/dist/esm/v2/components/Textarea.js +21 -30
- package/dist/esm/v2/components/Textarea.js.map +1 -1
- package/dist/esm/v2/components/TimePicker.js +59 -69
- package/dist/esm/v2/components/TimePicker.js.map +1 -1
- package/dist/esm/v2/components/Toast.js +109 -163
- package/dist/esm/v2/components/Toast.js.map +1 -1
- package/dist/esm/v2/components/Tooltip.js +18 -31
- package/dist/esm/v2/components/Tooltip.js.map +1 -1
- package/dist/esm/v2/components/_ErrorPageBody.js +6 -5
- package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -1
- package/dist/esm/v2/components/_pickerShared.js +2 -2
- package/dist/esm/v2/components/_pickerShared.js.map +1 -1
- package/dist/esm/v2/components/index.js +37 -0
- package/dist/esm/v2/components/index.js.map +1 -1
- package/dist/esm/v2/hooks/index.js +62 -0
- package/dist/esm/v2/hooks/index.js.map +1 -1
- package/dist/esm/v2/hooks/useAppliedFilters.js +112 -0
- package/dist/esm/v2/hooks/useAppliedFilters.js.map +1 -0
- package/dist/esm/v2/hooks/useDebouncedCallback.js +82 -0
- package/dist/esm/v2/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js +5 -19
- package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -1
- package/dist/esm/v2/hooks/useDensity.js +13 -17
- package/dist/esm/v2/hooks/useDensity.js.map +1 -1
- package/dist/esm/v2/hooks/useFocusFirstError.js +25 -33
- package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -1
- package/dist/esm/v2/hooks/useFocusOnRouteChange.js +81 -0
- package/dist/esm/v2/hooks/useFocusOnRouteChange.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusTrap.js +19 -23
- package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -1
- package/dist/esm/v2/hooks/useFormAutoSave.js +38 -53
- package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -1
- package/dist/esm/v2/hooks/useFormCompletionProgress.js +32 -51
- package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -1
- package/dist/esm/v2/hooks/useKeyboardShortcuts.js +125 -0
- package/dist/esm/v2/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/esm/v2/hooks/usePrefersReducedMotion.js +99 -0
- package/dist/esm/v2/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js +2 -10
- package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -1
- package/dist/esm/v2/hooks/useSortedRows.js +3 -5
- package/dist/esm/v2/hooks/useSortedRows.js.map +1 -1
- package/dist/esm/v2/hooks/useTabLoading.js +6 -21
- package/dist/esm/v2/hooks/useTabLoading.js.map +1 -1
- package/dist/esm/v2/index.js +2 -3
- package/dist/esm/v2/index.js.map +1 -1
- package/dist/esm/v2/modalContext.js +2 -2
- package/dist/esm/v2/modalContext.js.map +1 -1
- package/dist/esm/v2/models/favorite.js.map +1 -1
- package/dist/esm/v2/models/personalization.js.map +1 -1
- package/dist/esm/v2/models/referentiel.js.map +1 -1
- package/dist/esm/v2/models/savedFilter.js.map +1 -1
- package/dist/esm/v2/patterns/ActionBar.js +115 -159
- package/dist/esm/v2/patterns/ActionBar.js.map +1 -1
- package/dist/esm/v2/patterns/AppMain.js +108 -0
- package/dist/esm/v2/patterns/AppMain.js.map +1 -0
- package/dist/esm/v2/patterns/BulkActionBar.js +31 -34
- package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/esm/v2/patterns/ChartFigure.js +151 -0
- package/dist/esm/v2/patterns/ChartFigure.js.map +1 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js +111 -152
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/esm/v2/patterns/ColumnsToggle.js +43 -77
- package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/esm/v2/patterns/DataGrid.js +221 -255
- package/dist/esm/v2/patterns/DataGrid.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js +76 -94
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridToolbar.js +85 -89
- package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridVirtualized.js +141 -182
- package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +26 -30
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/esm/v2/patterns/DetailSplit.js +108 -0
- package/dist/esm/v2/patterns/DetailSplit.js.map +1 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js +15 -17
- package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/esm/v2/patterns/FavoritesFilter.js +30 -39
- package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/esm/v2/patterns/FilterTabBar.js +112 -0
- package/dist/esm/v2/patterns/FilterTabBar.js.map +1 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js +12 -13
- package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/esm/v2/patterns/FormPageShell.js +43 -41
- package/dist/esm/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/esm/v2/patterns/FormSection.js +30 -38
- package/dist/esm/v2/patterns/FormSection.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCheckbox.js +29 -39
- package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js +56 -60
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCombobox.js +51 -69
- package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDatePicker.js +44 -58
- package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDateTimePicker.js +44 -58
- package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikErrorFocus.js +22 -23
- package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/esm/v2/patterns/FormikErrorSummary.js +89 -0
- package/dist/esm/v2/patterns/FormikErrorSummary.js.map +1 -0
- package/dist/esm/v2/patterns/FormikFile.js +94 -78
- package/dist/esm/v2/patterns/FormikFile.js.map +1 -1
- package/dist/esm/v2/patterns/FormikInput.js +40 -53
- package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
- package/dist/esm/v2/patterns/FormikRadioGroup.js +39 -51
- package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -1
- package/dist/esm/v2/patterns/FormikReferentielField.js +49 -59
- package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/esm/v2/patterns/FormikSelect.js +64 -87
- package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/esm/v2/patterns/FormikTextarea.js +30 -46
- package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +53 -71
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/esm/v2/patterns/NetworkErrorBanner.js +6 -7
- package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/esm/v2/patterns/PageContent.js +10 -14
- package/dist/esm/v2/patterns/PageContent.js.map +1 -1
- package/dist/esm/v2/patterns/PreviewDrawer.js +153 -0
- package/dist/esm/v2/patterns/PreviewDrawer.js.map +1 -0
- package/dist/esm/v2/patterns/ReferentielField.js +327 -312
- package/dist/esm/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/esm/v2/patterns/RowFavoriteToggle.js +27 -22
- package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -1
- package/dist/esm/v2/patterns/SaveFilterDialog.js +38 -66
- package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/esm/v2/patterns/SavedFiltersMenu.js +62 -81
- package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/esm/v2/patterns/SkeletonPageShell.js +106 -129
- package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/esm/v2/patterns/SortableHeader.js +22 -45
- package/dist/esm/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/esm/v2/patterns/Tour.js +94 -120
- package/dist/esm/v2/patterns/Tour.js.map +1 -1
- package/dist/esm/v2/patterns/_dataGridShared.js +107 -128
- package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/esm/v2/patterns/_pickerSerialisation.js +6 -8
- package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -1
- package/dist/esm/v2/patterns/_sort.js +17 -33
- package/dist/esm/v2/patterns/_sort.js.map +1 -1
- package/dist/esm/v2/patterns/_useColumnReorder.js +122 -160
- package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/esm/v2/patterns/_useColumnResize.js +78 -96
- package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/esm/v2/patterns/filterCriteria.js +102 -0
- package/dist/esm/v2/patterns/filterCriteria.js.map +1 -0
- package/dist/esm/v2/patterns/index.js +152 -0
- package/dist/esm/v2/patterns/index.js.map +1 -1
- package/dist/esm/v2/patterns/rowActions.js +223 -0
- package/dist/esm/v2/patterns/rowActions.js.map +1 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js +50 -47
- package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/_storageKey.js +5 -5
- package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +22 -23
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +13 -13
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/favorites.js +36 -60
- package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/favoritesView.js +22 -34
- package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js +28 -34
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js +119 -0
- package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js +90 -98
- package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/esm/v2/personalization/createPersonalizationStore.js +78 -181
- package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/esm/v2/personalization/index.js +17 -0
- package/dist/esm/v2/personalization/index.js.map +1 -1
- package/dist/esm/v2/personalization/personalizationContext.js +9 -9
- package/dist/esm/v2/personalization/personalizationContext.js.map +1 -1
- package/dist/esm/v2/personalization/schema.js +8 -9
- package/dist/esm/v2/personalization/schema.js.map +1 -1
- package/dist/esm/v2/referentiel/ReferentielProvider.js +27 -42
- package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/esm/v2/referentiel/types.js +2 -0
- package/dist/esm/v2/referentiel/types.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js +10 -11
- package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -1
- package/dist/esm/v2/referentiel/useReferentielOptions.js +60 -117
- package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/esm/v2/referentiel/useReferentielSearch.js +37 -91
- package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/esm/v2/theme/_brand.js +8 -24
- package/dist/esm/v2/theme/_brand.js.map +1 -1
- package/dist/esm/v2/theme/_brandSecondary.js +8 -24
- package/dist/esm/v2/theme/_brandSecondary.js.map +1 -1
- package/dist/esm/v2/theme/createPortnetTheme.js +51 -61
- package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/esm/v2/theme/cssVariables.js +62 -69
- package/dist/esm/v2/theme/cssVariables.js.map +1 -1
- package/dist/esm/v2/theme/index.js +5 -5
- package/dist/esm/v2/theme/index.js.map +1 -1
- package/dist/esm/v2/tokens/breakpoints.js +14 -14
- package/dist/esm/v2/tokens/breakpoints.js.map +1 -1
- package/dist/esm/v2/tokens/chart.js +261 -0
- package/dist/esm/v2/tokens/chart.js.map +1 -0
- package/dist/esm/v2/tokens/colors.js +22 -22
- package/dist/esm/v2/tokens/colors.js.map +1 -1
- package/dist/esm/v2/tokens/density.js +62 -7
- package/dist/esm/v2/tokens/density.js.map +1 -1
- package/dist/esm/v2/tokens/index.js +49 -34
- package/dist/esm/v2/tokens/index.js.map +1 -1
- package/dist/esm/v2/tokens/motion.js +12 -20
- package/dist/esm/v2/tokens/motion.js.map +1 -1
- package/dist/esm/v2/tokens/radius.js +1 -1
- package/dist/esm/v2/tokens/radius.js.map +1 -1
- package/dist/esm/v2/tokens/shadows.js +6 -6
- package/dist/esm/v2/tokens/shadows.js.map +1 -1
- package/dist/esm/v2/tokens/spacing.js +2 -2
- package/dist/esm/v2/tokens/spacing.js.map +1 -1
- package/dist/esm/v2/tokens/state.js +1 -1
- package/dist/esm/v2/tokens/state.js.map +1 -1
- package/dist/esm/v2/tokens/statusPalette.js +17 -21
- package/dist/esm/v2/tokens/statusPalette.js.map +1 -1
- package/dist/esm/v2/tokens/tokens.json +6 -1
- package/dist/esm/v2/tokens/typography.js +13 -13
- package/dist/esm/v2/tokens/typography.js.map +1 -1
- package/dist/esm/v2/tokens/zIndex.js +1 -1
- package/dist/esm/v2/tokens/zIndex.js.map +1 -1
- package/dist/esm/v2/types/datagrid.js.map +1 -1
- package/dist/esm/v2/utils/apiError.js +16 -37
- package/dist/esm/v2/utils/apiError.js.map +1 -1
- package/dist/esm/v2/utils/contrast.js +31 -32
- package/dist/esm/v2/utils/contrast.js.map +1 -1
- package/dist/esm/v2/utils/cx.js +5 -25
- package/dist/esm/v2/utils/cx.js.map +1 -1
- package/dist/esm/v2/utils/fileDownload.js +23 -26
- package/dist/esm/v2/utils/fileDownload.js.map +1 -1
- package/dist/esm/v2/utils/fileValidation.js +209 -0
- package/dist/esm/v2/utils/fileValidation.js.map +1 -0
- package/dist/esm/v2/utils/fmtDate.js +111 -0
- package/dist/esm/v2/utils/fmtDate.js.map +1 -0
- package/dist/esm/v2/utils/fmtMoney.js +8 -10
- package/dist/esm/v2/utils/fmtMoney.js.map +1 -1
- package/dist/esm/v2/utils/formikErrors.js +78 -0
- package/dist/esm/v2/utils/formikErrors.js.map +1 -0
- package/dist/esm/v2/utils/index.js +35 -2
- package/dist/esm/v2/utils/index.js.map +1 -1
- package/dist/esm/v2/utils/mergeLabels.js +7 -12
- package/dist/esm/v2/utils/mergeLabels.js.map +1 -1
- package/dist/esm/v2/utils/networkStatus.js +12 -12
- package/dist/esm/v2/utils/networkStatus.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -49
- package/dist/index.js.map +1 -1
- package/dist/v2/__tests__/AppMain.test.js +133 -0
- package/dist/v2/__tests__/AppMain.test.js.map +1 -0
- package/dist/v2/__tests__/ChartFigure.test.js +183 -0
- package/dist/v2/__tests__/ChartFigure.test.js.map +1 -0
- package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js +153 -0
- package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
- package/dist/v2/__tests__/DrawerTactileTargets.test.js +94 -0
- package/dist/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
- package/dist/v2/__tests__/FieldError.test.js +82 -49
- package/dist/v2/__tests__/FieldError.test.js.map +1 -1
- package/dist/v2/__tests__/FieldNaming.test.js +161 -0
- package/dist/v2/__tests__/FieldNaming.test.js.map +1 -0
- package/dist/v2/__tests__/FieldWidth.test.js +23 -25
- package/dist/v2/__tests__/FieldWidth.test.js.map +1 -1
- package/dist/v2/__tests__/FileCard.test.js +29 -28
- package/dist/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/v2/__tests__/FormikCheckbox.test.js +90 -183
- package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -1
- package/dist/v2/__tests__/FormikDateTimePicker.test.js +38 -48
- package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
- package/dist/v2/__tests__/FormikDisplayWidth.test.js +102 -0
- package/dist/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
- package/dist/v2/__tests__/FormikRadioGroup.test.js +123 -204
- package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
- package/dist/v2/__tests__/MobileRowCard.test.js +63 -61
- package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
- package/dist/v2/__tests__/PreviewDrawer.test.js +169 -0
- package/dist/v2/__tests__/PreviewDrawer.test.js.map +1 -0
- package/dist/v2/__tests__/ReferentielFieldContainer.test.js +159 -0
- package/dist/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js +53 -68
- package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
- package/dist/v2/__tests__/apiError.test.js +50 -69
- package/dist/v2/__tests__/apiError.test.js.map +1 -1
- package/dist/v2/__tests__/banned-patterns.test.js +42 -123
- package/dist/v2/__tests__/banned-patterns.test.js.map +1 -1
- package/dist/v2/__tests__/chart-palette.test.js +205 -0
- package/dist/v2/__tests__/chart-palette.test.js.map +1 -0
- package/dist/v2/__tests__/contrast-palette.test.js +42 -74
- package/dist/v2/__tests__/contrast-palette.test.js.map +1 -1
- package/dist/v2/__tests__/cssVariables.test.js +44 -51
- package/dist/v2/__tests__/cssVariables.test.js.map +1 -1
- package/dist/v2/__tests__/fileValidation.test.js +136 -0
- package/dist/v2/__tests__/fileValidation.test.js.map +1 -0
- package/dist/v2/__tests__/filterCriteria.test.js +324 -0
- package/dist/v2/__tests__/filterCriteria.test.js.map +1 -0
- package/dist/v2/__tests__/fmtDate.test.js +69 -0
- package/dist/v2/__tests__/fmtDate.test.js.map +1 -0
- package/dist/v2/__tests__/gap-leakage-refonte.test.js +221 -0
- package/dist/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
- package/dist/v2/__tests__/labels-merge.test.js +23 -27
- package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
- package/dist/v2/__tests__/locale-fallback.test.js +47 -52
- package/dist/v2/__tests__/locale-fallback.test.js.map +1 -1
- package/dist/v2/__tests__/reviveSavedCriteria.test.js +144 -0
- package/dist/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
- package/dist/v2/__tests__/rowActions.test.js +186 -0
- package/dist/v2/__tests__/rowActions.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusOnRouteChange.test.js +156 -0
- package/dist/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusTrap.test.js +270 -407
- package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -1
- package/dist/v2/__tests__/usePrefersReducedMotion.test.js +123 -0
- package/dist/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
- package/dist/v2/components/Accordion.js +60 -82
- package/dist/v2/components/Accordion.js.map +1 -1
- package/dist/v2/components/ActionStrip.js +40 -52
- package/dist/v2/components/ActionStrip.js.map +1 -1
- package/dist/v2/components/Banner.js +42 -41
- package/dist/v2/components/Banner.js.map +1 -1
- package/dist/v2/components/Busy.js +22 -27
- package/dist/v2/components/Busy.js.map +1 -1
- package/dist/v2/components/Button.js +39 -50
- package/dist/v2/components/Button.js.map +1 -1
- package/dist/v2/components/CategoryTag.d.ts.map +1 -1
- package/dist/v2/components/CategoryTag.js +49 -32
- package/dist/v2/components/CategoryTag.js.map +1 -1
- package/dist/v2/components/Checkbox.js +39 -45
- package/dist/v2/components/Checkbox.js.map +1 -1
- package/dist/v2/components/Chip.js +29 -42
- package/dist/v2/components/Chip.js.map +1 -1
- package/dist/v2/components/Combobox.js +122 -144
- package/dist/v2/components/Combobox.js.map +1 -1
- package/dist/v2/components/CommandPalette.js +138 -225
- package/dist/v2/components/CommandPalette.js.map +1 -1
- package/dist/v2/components/ConfirmDialog.js +46 -56
- package/dist/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/v2/components/DatePicker.js +81 -86
- package/dist/v2/components/DatePicker.js.map +1 -1
- package/dist/v2/components/DateRangePicker.js +77 -87
- package/dist/v2/components/DateRangePicker.js.map +1 -1
- package/dist/v2/components/DateTimePicker.js +84 -91
- package/dist/v2/components/DateTimePicker.js.map +1 -1
- package/dist/v2/components/Drawer.d.ts.map +1 -1
- package/dist/v2/components/Drawer.js +93 -88
- package/dist/v2/components/Drawer.js.map +1 -1
- package/dist/v2/components/Dropzone.js +150 -196
- package/dist/v2/components/Dropzone.js.map +1 -1
- package/dist/v2/components/EmptyState.js +18 -20
- package/dist/v2/components/EmptyState.js.map +1 -1
- package/dist/v2/components/FavoriteToggle.js +28 -39
- package/dist/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/v2/components/Field.d.ts +62 -4
- package/dist/v2/components/Field.d.ts.map +1 -1
- package/dist/v2/components/Field.js +169 -70
- package/dist/v2/components/Field.js.map +1 -1
- package/dist/v2/components/FieldError.js +18 -21
- package/dist/v2/components/FieldError.js.map +1 -1
- package/dist/v2/components/FieldHelp.js +40 -60
- package/dist/v2/components/FieldHelp.js.map +1 -1
- package/dist/v2/components/FileCard.js +27 -31
- package/dist/v2/components/FileCard.js.map +1 -1
- package/dist/v2/components/FilterTab.js +30 -38
- package/dist/v2/components/FilterTab.js.map +1 -1
- package/dist/v2/components/ForbiddenPage.d.ts +25 -1
- package/dist/v2/components/ForbiddenPage.d.ts.map +1 -1
- package/dist/v2/components/ForbiddenPage.js +37 -17
- package/dist/v2/components/ForbiddenPage.js.map +1 -1
- package/dist/v2/components/FormGrid.js +53 -59
- package/dist/v2/components/FormGrid.js.map +1 -1
- package/dist/v2/components/FormikDisplay.d.ts +50 -1
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
- package/dist/v2/components/FormikDisplay.js +108 -33
- package/dist/v2/components/FormikDisplay.js.map +1 -1
- package/dist/v2/components/Input.d.ts +40 -0
- package/dist/v2/components/Input.d.ts.map +1 -1
- package/dist/v2/components/Input.js +81 -41
- package/dist/v2/components/Input.js.map +1 -1
- package/dist/v2/components/KPICard.js +57 -67
- package/dist/v2/components/KPICard.js.map +1 -1
- package/dist/v2/components/KPIStrip.js +16 -22
- package/dist/v2/components/KPIStrip.js.map +1 -1
- package/dist/v2/components/KV.js +25 -31
- package/dist/v2/components/KV.js.map +1 -1
- package/dist/v2/components/KVGrid.js +19 -26
- package/dist/v2/components/KVGrid.js.map +1 -1
- package/dist/v2/components/Layout.js +91 -120
- package/dist/v2/components/Layout.js.map +1 -1
- package/dist/v2/components/MobileRowCard.js +79 -91
- package/dist/v2/components/MobileRowCard.js.map +1 -1
- package/dist/v2/components/Modal.js +61 -69
- package/dist/v2/components/Modal.js.map +1 -1
- package/dist/v2/components/NetworkErrorPage.d.ts +19 -1
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
- package/dist/v2/components/NetworkErrorPage.js +38 -21
- package/dist/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/v2/components/NotFoundPage.d.ts +17 -1
- package/dist/v2/components/NotFoundPage.d.ts.map +1 -1
- package/dist/v2/components/NotFoundPage.js +37 -18
- package/dist/v2/components/NotFoundPage.js.map +1 -1
- package/dist/v2/components/NumberInput.js +88 -118
- package/dist/v2/components/NumberInput.js.map +1 -1
- package/dist/v2/components/OverflowMenu.js +38 -56
- package/dist/v2/components/OverflowMenu.js.map +1 -1
- package/dist/v2/components/PdfViewer.js +34 -45
- package/dist/v2/components/PdfViewer.js.map +1 -1
- package/dist/v2/components/ProgressBar.js +42 -49
- package/dist/v2/components/ProgressBar.js.map +1 -1
- package/dist/v2/components/Radio.js +59 -67
- package/dist/v2/components/Radio.js.map +1 -1
- package/dist/v2/components/SectionErrorBoundary.js +90 -135
- package/dist/v2/components/SectionErrorBoundary.js.map +1 -1
- package/dist/v2/components/SectionHeader.js +34 -41
- package/dist/v2/components/SectionHeader.js.map +1 -1
- package/dist/v2/components/Segmented.js +69 -93
- package/dist/v2/components/Segmented.js.map +1 -1
- package/dist/v2/components/Select.d.ts +26 -2
- package/dist/v2/components/Select.d.ts.map +1 -1
- package/dist/v2/components/Select.js +120 -155
- package/dist/v2/components/Select.js.map +1 -1
- package/dist/v2/components/ServerErrorPage.d.ts +27 -1
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
- package/dist/v2/components/ServerErrorPage.js +37 -20
- package/dist/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/v2/components/Skeleton.js +86 -100
- package/dist/v2/components/Skeleton.js.map +1 -1
- package/dist/v2/components/SkipLink.js +9 -12
- package/dist/v2/components/SkipLink.js.map +1 -1
- package/dist/v2/components/Spinner.js +16 -25
- package/dist/v2/components/Spinner.js.map +1 -1
- package/dist/v2/components/Status.js +18 -29
- package/dist/v2/components/Status.js.map +1 -1
- package/dist/v2/components/Stepper.js +80 -82
- package/dist/v2/components/Stepper.js.map +1 -1
- package/dist/v2/components/Surface.js +34 -49
- package/dist/v2/components/Surface.js.map +1 -1
- package/dist/v2/components/Switch.js +29 -37
- package/dist/v2/components/Switch.js.map +1 -1
- package/dist/v2/components/TabPanel.d.ts +17 -0
- package/dist/v2/components/TabPanel.d.ts.map +1 -0
- package/dist/v2/components/TabPanel.js +90 -0
- package/dist/v2/components/TabPanel.js.map +1 -0
- package/dist/v2/components/Tabs.d.ts +25 -0
- package/dist/v2/components/Tabs.d.ts.map +1 -1
- package/dist/v2/components/Tabs.js +53 -29
- package/dist/v2/components/Tabs.js.map +1 -1
- package/dist/v2/components/TelInput.js +80 -115
- package/dist/v2/components/TelInput.js.map +1 -1
- package/dist/v2/components/Textarea.js +26 -35
- package/dist/v2/components/Textarea.js.map +1 -1
- package/dist/v2/components/TimePicker.js +62 -74
- package/dist/v2/components/TimePicker.js.map +1 -1
- package/dist/v2/components/Toast.js +119 -174
- package/dist/v2/components/Toast.js.map +1 -1
- package/dist/v2/components/Tooltip.js +23 -38
- package/dist/v2/components/Tooltip.js.map +1 -1
- package/dist/v2/components/_ErrorPageBody.js +15 -16
- package/dist/v2/components/_ErrorPageBody.js.map +1 -1
- package/dist/v2/components/_pickerShared.js +5 -5
- package/dist/v2/components/_pickerShared.js.map +1 -1
- package/dist/v2/components/index.d.ts +40 -1
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/components/index.js +153 -136
- package/dist/v2/components/index.js.map +1 -1
- package/dist/v2/hooks/index.d.ts +65 -0
- package/dist/v2/hooks/index.d.ts.map +1 -1
- package/dist/v2/hooks/index.js +63 -24
- package/dist/v2/hooks/index.js.map +1 -1
- package/dist/v2/hooks/useAppliedFilters.d.ts +102 -0
- package/dist/v2/hooks/useAppliedFilters.d.ts.map +1 -0
- package/dist/v2/hooks/useAppliedFilters.js +117 -0
- package/dist/v2/hooks/useAppliedFilters.js.map +1 -0
- package/dist/v2/hooks/useDebouncedCallback.d.ts +64 -0
- package/dist/v2/hooks/useDebouncedCallback.d.ts.map +1 -0
- package/dist/v2/hooks/useDebouncedCallback.js +87 -0
- package/dist/v2/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.js +6 -20
- package/dist/v2/hooks/useDelayedFlag.js.map +1 -1
- package/dist/v2/hooks/useDensity.d.ts.map +1 -1
- package/dist/v2/hooks/useDensity.js +14 -18
- package/dist/v2/hooks/useDensity.js.map +1 -1
- package/dist/v2/hooks/useFocusFirstError.js +26 -34
- package/dist/v2/hooks/useFocusFirstError.js.map +1 -1
- package/dist/v2/hooks/useFocusOnRouteChange.d.ts +65 -0
- package/dist/v2/hooks/useFocusOnRouteChange.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusOnRouteChange.js +88 -0
- package/dist/v2/hooks/useFocusOnRouteChange.js.map +1 -0
- package/dist/v2/hooks/useFocusTrap.js +20 -24
- package/dist/v2/hooks/useFocusTrap.js.map +1 -1
- package/dist/v2/hooks/useFormAutoSave.d.ts +4 -4
- package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -1
- package/dist/v2/hooks/useFormAutoSave.js +39 -54
- package/dist/v2/hooks/useFormAutoSave.js.map +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.d.ts +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.js +33 -52
- package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -1
- package/dist/v2/hooks/useKeyboardShortcuts.d.ts +25 -0
- package/dist/v2/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/v2/hooks/useKeyboardShortcuts.js +132 -0
- package/dist/v2/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/v2/hooks/usePrefersReducedMotion.d.ts +56 -0
- package/dist/v2/hooks/usePrefersReducedMotion.d.ts.map +1 -0
- package/dist/v2/hooks/usePrefersReducedMotion.js +105 -0
- package/dist/v2/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.js +5 -13
- package/dist/v2/hooks/useResolvedDensity.js.map +1 -1
- package/dist/v2/hooks/useSortedRows.js +4 -6
- package/dist/v2/hooks/useSortedRows.js.map +1 -1
- package/dist/v2/hooks/useTabLoading.js +7 -22
- package/dist/v2/hooks/useTabLoading.js.map +1 -1
- package/dist/v2/index.js +143 -145
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/modalContext.js +2 -2
- package/dist/v2/modalContext.js.map +1 -1
- package/dist/v2/models/favorite.d.ts +8 -9
- package/dist/v2/models/favorite.d.ts.map +1 -1
- package/dist/v2/models/favorite.js.map +1 -1
- package/dist/v2/models/index.js +4 -4
- package/dist/v2/models/index.js.map +1 -1
- package/dist/v2/models/personalization.d.ts +44 -48
- package/dist/v2/models/personalization.d.ts.map +1 -1
- package/dist/v2/models/personalization.js.map +1 -1
- package/dist/v2/models/referentiel.d.ts +32 -50
- package/dist/v2/models/referentiel.d.ts.map +1 -1
- package/dist/v2/models/referentiel.js.map +1 -1
- package/dist/v2/models/savedFilter.d.ts +8 -17
- package/dist/v2/models/savedFilter.d.ts.map +1 -1
- package/dist/v2/models/savedFilter.js.map +1 -1
- package/dist/v2/patterns/ActionBar.js +152 -187
- package/dist/v2/patterns/ActionBar.js.map +1 -1
- package/dist/v2/patterns/AppMain.d.ts +109 -0
- package/dist/v2/patterns/AppMain.d.ts.map +1 -0
- package/dist/v2/patterns/AppMain.js +115 -0
- package/dist/v2/patterns/AppMain.js.map +1 -0
- package/dist/v2/patterns/BulkActionBar.js +40 -42
- package/dist/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/v2/patterns/ChartFigure.d.ts +124 -0
- package/dist/v2/patterns/ChartFigure.d.ts.map +1 -0
- package/dist/v2/patterns/ChartFigure.js +159 -0
- package/dist/v2/patterns/ChartFigure.js.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js +138 -174
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/v2/patterns/ColumnsToggle.js +60 -94
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/v2/patterns/DataGrid.d.ts.map +1 -1
- package/dist/v2/patterns/DataGrid.js +262 -297
- package/dist/v2/patterns/DataGrid.js.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.js +104 -121
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/v2/patterns/DataGridToolbar.js +103 -106
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/v2/patterns/DataGridVirtualized.js +179 -217
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js +32 -35
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/v2/patterns/DetailSplit.d.ts +87 -0
- package/dist/v2/patterns/DetailSplit.d.ts.map +1 -0
- package/dist/v2/patterns/DetailSplit.js +116 -0
- package/dist/v2/patterns/DetailSplit.js.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.js +22 -23
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/v2/patterns/FavoritesFilter.js +36 -44
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/v2/patterns/FilterTabBar.d.ts +28 -0
- package/dist/v2/patterns/FilterTabBar.d.ts.map +1 -0
- package/dist/v2/patterns/FilterTabBar.js +120 -0
- package/dist/v2/patterns/FilterTabBar.js.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.js +20 -23
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/v2/patterns/FormPageShell.js +53 -50
- package/dist/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/v2/patterns/FormSection.d.ts +8 -3
- package/dist/v2/patterns/FormSection.d.ts.map +1 -1
- package/dist/v2/patterns/FormSection.js +44 -51
- package/dist/v2/patterns/FormSection.js.map +1 -1
- package/dist/v2/patterns/FormikCheckbox.js +36 -45
- package/dist/v2/patterns/FormikCheckbox.js.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +17 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.js +62 -65
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/v2/patterns/FormikCombobox.js +55 -72
- package/dist/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.js +50 -64
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/v2/patterns/FormikDateTimePicker.js +50 -64
- package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -1
- package/dist/v2/patterns/FormikErrorFocus.js +25 -26
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/v2/patterns/FormikErrorSummary.d.ts +74 -0
- package/dist/v2/patterns/FormikErrorSummary.d.ts.map +1 -0
- package/dist/v2/patterns/FormikErrorSummary.js +97 -0
- package/dist/v2/patterns/FormikErrorSummary.js.map +1 -0
- package/dist/v2/patterns/FormikFile.d.ts +14 -1
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
- package/dist/v2/patterns/FormikFile.js +99 -83
- package/dist/v2/patterns/FormikFile.js.map +1 -1
- package/dist/v2/patterns/FormikInput.js +45 -58
- package/dist/v2/patterns/FormikInput.js.map +1 -1
- package/dist/v2/patterns/FormikRadioGroup.js +45 -56
- package/dist/v2/patterns/FormikRadioGroup.js.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts +12 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.js +54 -64
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/v2/patterns/FormikSelect.js +70 -92
- package/dist/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/v2/patterns/FormikTextarea.js +35 -51
- package/dist/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +60 -80
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/v2/patterns/NetworkErrorBanner.js +13 -16
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/v2/patterns/PageContent.js +17 -20
- package/dist/v2/patterns/PageContent.js.map +1 -1
- package/dist/v2/patterns/PreviewDrawer.d.ts +49 -0
- package/dist/v2/patterns/PreviewDrawer.d.ts.map +1 -0
- package/dist/v2/patterns/PreviewDrawer.js +159 -0
- package/dist/v2/patterns/PreviewDrawer.js.map +1 -0
- package/dist/v2/patterns/ReferentielField.d.ts +86 -2
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/ReferentielField.js +347 -327
- package/dist/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/v2/patterns/RowFavoriteToggle.d.ts +6 -0
- package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -1
- package/dist/v2/patterns/RowFavoriteToggle.js +38 -30
- package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -1
- package/dist/v2/patterns/SaveFilterDialog.js +50 -77
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/v2/patterns/SavedFiltersMenu.js +89 -107
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/v2/patterns/SkeletonPageShell.js +122 -143
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/v2/patterns/SortableHeader.js +35 -57
- package/dist/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/v2/patterns/Tour.js +121 -142
- package/dist/v2/patterns/Tour.js.map +1 -1
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
- package/dist/v2/patterns/_dataGridShared.js +131 -147
- package/dist/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/v2/patterns/_pickerSerialisation.js +9 -10
- package/dist/v2/patterns/_pickerSerialisation.js.map +1 -1
- package/dist/v2/patterns/_sort.js +17 -33
- package/dist/v2/patterns/_sort.js.map +1 -1
- package/dist/v2/patterns/_useColumnReorder.js +124 -163
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/v2/patterns/_useColumnResize.js +80 -99
- package/dist/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/v2/patterns/filterCriteria.d.ts +78 -0
- package/dist/v2/patterns/filterCriteria.d.ts.map +1 -0
- package/dist/v2/patterns/filterCriteria.js +110 -0
- package/dist/v2/patterns/filterCriteria.js.map +1 -0
- package/dist/v2/patterns/index.d.ts +160 -0
- package/dist/v2/patterns/index.d.ts.map +1 -1
- package/dist/v2/patterns/index.js +157 -79
- package/dist/v2/patterns/index.js.map +1 -1
- package/dist/v2/patterns/rowActions.d.ts +150 -0
- package/dist/v2/patterns/rowActions.d.ts.map +1 -0
- package/dist/v2/patterns/rowActions.js +232 -0
- package/dist/v2/patterns/rowActions.js.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
- package/dist/v2/personalization/PersonalizationProvider.js +57 -53
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/v2/personalization/adapters/_storageKey.js +5 -5
- package/dist/v2/personalization/adapters/_storageKey.js.map +1 -1
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +25 -24
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/createMemoryAdapter.js +14 -14
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/index.js +5 -5
- package/dist/v2/personalization/adapters/index.js.map +1 -1
- package/dist/v2/personalization/capabilities/favorites.js +39 -62
- package/dist/v2/personalization/capabilities/favorites.js.map +1 -1
- package/dist/v2/personalization/capabilities/favoritesView.js +25 -37
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/v2/personalization/capabilities/gridPreferences.js +31 -36
- package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -1
- package/dist/v2/personalization/capabilities/index.js +12 -12
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts +88 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.js +126 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.js +93 -100
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.js +81 -182
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/v2/personalization/index.d.ts +16 -0
- package/dist/v2/personalization/index.d.ts.map +1 -1
- package/dist/v2/personalization/index.js +30 -23
- package/dist/v2/personalization/index.js.map +1 -1
- package/dist/v2/personalization/personalizationContext.js +10 -12
- package/dist/v2/personalization/personalizationContext.js.map +1 -1
- package/dist/v2/personalization/schema.js +8 -9
- package/dist/v2/personalization/schema.js.map +1 -1
- package/dist/v2/referentiel/ReferentielProvider.js +31 -45
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/v2/referentiel/index.js +11 -13
- package/dist/v2/referentiel/index.js.map +1 -1
- package/dist/v2/referentiel/types.d.ts +105 -0
- package/dist/v2/referentiel/types.d.ts.map +1 -0
- package/dist/v2/referentiel/types.js +6 -0
- package/dist/v2/referentiel/types.js.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.js +13 -16
- package/dist/v2/referentiel/useReferentielClient.js.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.d.ts +7 -17
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.js +63 -120
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.d.ts +7 -48
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.js +40 -95
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/v2/theme/_brand.js +12 -26
- package/dist/v2/theme/_brand.js.map +1 -1
- package/dist/v2/theme/_brandSecondary.js +12 -26
- package/dist/v2/theme/_brandSecondary.js.map +1 -1
- package/dist/v2/theme/createPortnetTheme.js +41 -49
- package/dist/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/v2/theme/cssVariables.d.ts +3 -3
- package/dist/v2/theme/cssVariables.d.ts.map +1 -1
- package/dist/v2/theme/cssVariables.js +65 -70
- package/dist/v2/theme/cssVariables.js.map +1 -1
- package/dist/v2/theme/index.js +10 -10
- package/dist/v2/theme/index.js.map +1 -1
- package/dist/v2/tokens/breakpoints.js +16 -16
- package/dist/v2/tokens/breakpoints.js.map +1 -1
- package/dist/v2/tokens/chart.d.ts +103 -0
- package/dist/v2/tokens/chart.d.ts.map +1 -0
- package/dist/v2/tokens/chart.js +270 -0
- package/dist/v2/tokens/chart.js.map +1 -0
- package/dist/v2/tokens/colors.js +24 -24
- package/dist/v2/tokens/colors.js.map +1 -1
- package/dist/v2/tokens/density.d.ts +104 -0
- package/dist/v2/tokens/density.d.ts.map +1 -1
- package/dist/v2/tokens/density.js +67 -12
- package/dist/v2/tokens/density.js.map +1 -1
- package/dist/v2/tokens/index.d.ts +50 -1
- package/dist/v2/tokens/index.d.ts.map +1 -1
- package/dist/v2/tokens/index.js +116 -68
- package/dist/v2/tokens/index.js.map +1 -1
- package/dist/v2/tokens/motion.js +16 -22
- package/dist/v2/tokens/motion.js.map +1 -1
- package/dist/v2/tokens/radius.js +3 -3
- package/dist/v2/tokens/radius.js.map +1 -1
- package/dist/v2/tokens/shadows.js +8 -8
- package/dist/v2/tokens/shadows.js.map +1 -1
- package/dist/v2/tokens/spacing.js +4 -4
- package/dist/v2/tokens/spacing.js.map +1 -1
- package/dist/v2/tokens/state.js +3 -3
- package/dist/v2/tokens/state.js.map +1 -1
- package/dist/v2/tokens/statusPalette.js +21 -23
- package/dist/v2/tokens/statusPalette.js.map +1 -1
- package/dist/v2/tokens/tokens.json +6 -1
- package/dist/v2/tokens/typography.js +15 -15
- package/dist/v2/tokens/typography.js.map +1 -1
- package/dist/v2/tokens/zIndex.js +3 -3
- package/dist/v2/tokens/zIndex.js.map +1 -1
- package/dist/v2/types/datagrid.d.ts +9 -1
- package/dist/v2/types/datagrid.d.ts.map +1 -1
- package/dist/v2/types/datagrid.js.map +1 -1
- package/dist/v2/types/index.js +2 -2
- package/dist/v2/types/index.js.map +1 -1
- package/dist/v2/utils/apiError.js +16 -37
- package/dist/v2/utils/apiError.js.map +1 -1
- package/dist/v2/utils/contrast.js +31 -32
- package/dist/v2/utils/contrast.js.map +1 -1
- package/dist/v2/utils/cx.js +7 -27
- package/dist/v2/utils/cx.js.map +1 -1
- package/dist/v2/utils/fileDownload.js +25 -28
- package/dist/v2/utils/fileDownload.js.map +1 -1
- package/dist/v2/utils/fileValidation.d.ts +116 -0
- package/dist/v2/utils/fileValidation.d.ts.map +1 -0
- package/dist/v2/utils/fileValidation.js +220 -0
- package/dist/v2/utils/fileValidation.js.map +1 -0
- package/dist/v2/utils/fmtDate.d.ts +103 -0
- package/dist/v2/utils/fmtDate.d.ts.map +1 -0
- package/dist/v2/utils/fmtDate.js +119 -0
- package/dist/v2/utils/fmtDate.js.map +1 -0
- package/dist/v2/utils/fmtMoney.d.ts +3 -3
- package/dist/v2/utils/fmtMoney.d.ts.map +1 -1
- package/dist/v2/utils/fmtMoney.js +9 -11
- package/dist/v2/utils/fmtMoney.js.map +1 -1
- package/dist/v2/utils/formikErrors.d.ts +67 -0
- package/dist/v2/utils/formikErrors.d.ts.map +1 -0
- package/dist/v2/utils/formikErrors.js +85 -0
- package/dist/v2/utils/formikErrors.js.map +1 -0
- package/dist/v2/utils/index.d.ts +5 -0
- package/dist/v2/utils/index.d.ts.map +1 -1
- package/dist/v2/utils/index.js +67 -18
- package/dist/v2/utils/index.js.map +1 -1
- package/dist/v2/utils/mergeLabels.js +9 -14
- package/dist/v2/utils/mergeLabels.js.map +1 -1
- package/dist/v2/utils/networkStatus.js +14 -14
- package/dist/v2/utils/networkStatus.js.map +1 -1
- package/package.json +26 -9
|
@@ -1,34 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _Banner = _interopRequireDefault(require("./Banner"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function
|
|
13
|
-
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
19
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
23
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
25
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
26
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
28
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
30
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /**
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
/**
|
|
32
13
|
* SectionErrorBoundary — Portnet UI v2
|
|
33
14
|
*
|
|
34
15
|
* Isolates a subtree so one failing section cannot take down the page.
|
|
@@ -77,6 +58,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
77
58
|
* `onError` hook for an APM breadcrumb — which is how the detail reaches
|
|
78
59
|
* whoever can act on it, rather than the user who cannot.
|
|
79
60
|
*/
|
|
61
|
+
|
|
80
62
|
/**
|
|
81
63
|
* Pulls the topmost user component out of a React component stack.
|
|
82
64
|
*
|
|
@@ -87,26 +69,17 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
87
69
|
*/
|
|
88
70
|
function extractFirstComponent(stack) {
|
|
89
71
|
if (!stack || typeof stack !== "string") return null;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var match = /^(?:in|at)\s+([A-Za-z0-9_$.]+)/.exec(line);
|
|
98
|
-
var name = match === null || match === void 0 ? void 0 : match[1];
|
|
99
|
-
// Skip host elements (div, span…) — only a capitalised name is a component.
|
|
100
|
-
if (name && /^[A-Z]/.test(name)) return name;
|
|
101
|
-
}
|
|
102
|
-
} catch (err) {
|
|
103
|
-
_iterator.e(err);
|
|
104
|
-
} finally {
|
|
105
|
-
_iterator.f();
|
|
72
|
+
for (const raw of stack.split("\n")) {
|
|
73
|
+
const line = raw.trim();
|
|
74
|
+
if (!line) continue;
|
|
75
|
+
const match = /^(?:in|at)\s+([A-Za-z0-9_$.]+)/.exec(line);
|
|
76
|
+
const name = match?.[1];
|
|
77
|
+
// Skip host elements (div, span…) — only a capitalised name is a component.
|
|
78
|
+
if (name && /^[A-Z]/.test(name)) return name;
|
|
106
79
|
}
|
|
107
80
|
return null;
|
|
108
81
|
}
|
|
109
|
-
|
|
82
|
+
const DETAIL_SX = Object.freeze({
|
|
110
83
|
fontFamily: "var(--font-mono)",
|
|
111
84
|
fontSize: "var(--text-xs)",
|
|
112
85
|
color: "var(--fg-subtle)",
|
|
@@ -115,107 +88,89 @@ var DETAIL_SX = Object.freeze({
|
|
|
115
88
|
// otherwise widen the banner past its container.
|
|
116
89
|
wordBreak: "break-word"
|
|
117
90
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var _this;
|
|
123
|
-
_classCallCheck(this, SectionErrorBoundary);
|
|
124
|
-
_this = _super.call(this, props);
|
|
125
|
-
_this.state = {
|
|
91
|
+
class SectionErrorBoundary extends React.Component {
|
|
92
|
+
constructor(props) {
|
|
93
|
+
super(props);
|
|
94
|
+
this.state = {
|
|
126
95
|
error: null,
|
|
127
96
|
info: null,
|
|
128
97
|
attempt: 0
|
|
129
98
|
};
|
|
130
|
-
|
|
131
|
-
return _this;
|
|
99
|
+
this.handleRetry = this.handleRetry.bind(this);
|
|
132
100
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
101
|
+
static getDerivedStateFromError(error) {
|
|
102
|
+
return {
|
|
103
|
+
error
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
componentDidCatch(error, info) {
|
|
107
|
+
const title = this.props?.title || "Section";
|
|
108
|
+
// eslint-disable-next-line no-console
|
|
109
|
+
console.error(`[SectionErrorBoundary:${title}]`, error, "\nComponent stack:", info?.componentStack);
|
|
110
|
+
this.setState({
|
|
111
|
+
info
|
|
112
|
+
});
|
|
113
|
+
/* Guarded: a throwing reporter must not take down the boundary that exists to
|
|
114
|
+
* stop things from taking each other down. */
|
|
115
|
+
try {
|
|
116
|
+
this.props.onError?.(error, info);
|
|
117
|
+
} catch {
|
|
118
|
+
/* reporter failed — the console.error above is still the record */
|
|
151
119
|
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
120
|
+
}
|
|
121
|
+
handleRetry() {
|
|
122
|
+
this.setState(s => ({
|
|
123
|
+
error: null,
|
|
124
|
+
info: null,
|
|
125
|
+
attempt: s.attempt + 1
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
const {
|
|
130
|
+
error,
|
|
131
|
+
info,
|
|
132
|
+
attempt
|
|
133
|
+
} = this.state;
|
|
134
|
+
const {
|
|
135
|
+
title,
|
|
136
|
+
children,
|
|
137
|
+
secondaryAction,
|
|
138
|
+
retryLabel
|
|
139
|
+
} = this.props;
|
|
140
|
+
if (!error) {
|
|
141
|
+
/* Re-keyed on retry so React REMOUNTS the subtree rather than reusing the
|
|
142
|
+
* state that led to the throw. Without this, retry re-renders the same
|
|
143
|
+
* broken instance and fails identically. */
|
|
144
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
145
|
+
children: children
|
|
146
|
+
}, attempt);
|
|
162
147
|
}
|
|
163
|
-
}, {
|
|
164
|
-
key: "render",
|
|
165
|
-
value: function render() {
|
|
166
|
-
var _ref, _error$message;
|
|
167
|
-
var _this$state = this.state,
|
|
168
|
-
error = _this$state.error,
|
|
169
|
-
info = _this$state.info,
|
|
170
|
-
attempt = _this$state.attempt;
|
|
171
|
-
var _this$props3 = this.props,
|
|
172
|
-
title = _this$props3.title,
|
|
173
|
-
children = _this$props3.children,
|
|
174
|
-
secondaryAction = _this$props3.secondaryAction,
|
|
175
|
-
retryLabel = _this$props3.retryLabel;
|
|
176
|
-
if (!error) {
|
|
177
|
-
/* Re-keyed on retry so React REMOUNTS the subtree rather than reusing the
|
|
178
|
-
* state that led to the throw. Without this, retry re-renders the same
|
|
179
|
-
* broken instance and fails identically. */
|
|
180
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
181
|
-
children: children
|
|
182
|
-
}, attempt);
|
|
183
|
-
}
|
|
184
148
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
secondaryAction
|
|
201
|
-
} : {}),
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
value: function getDerivedStateFromError(error) {
|
|
213
|
-
return {
|
|
214
|
-
error: error
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
}]);
|
|
218
|
-
return SectionErrorBoundary;
|
|
219
|
-
}(React.Component);
|
|
220
|
-
var _default = exports["default"] = SectionErrorBoundary;
|
|
149
|
+
/* Bracket access, not dot: `noPropertyAccessFromIndexSignature` is one of the
|
|
150
|
+
* nine mandatory strict flags, and `process.env` is an index signature. Note
|
|
151
|
+
* that `tsc --noEmit` did not flag this — only `tsconfig.build.json` did, so a
|
|
152
|
+
* green typecheck is not sufficient evidence here. */
|
|
153
|
+
const isDev = process.env["NODE_ENV"] !== "production";
|
|
154
|
+
const originComponent = extractFirstComponent(info?.componentStack);
|
|
155
|
+
const technicalMessage = String(error?.message ?? error ?? "");
|
|
156
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Banner.default, {
|
|
157
|
+
variant: "error",
|
|
158
|
+
title: `${title || "Section"} — affichage impossible`,
|
|
159
|
+
action: {
|
|
160
|
+
label: retryLabel || "Réessayer",
|
|
161
|
+
onClick: this.handleRetry
|
|
162
|
+
},
|
|
163
|
+
...(secondaryAction ? {
|
|
164
|
+
secondaryAction
|
|
165
|
+
} : {}),
|
|
166
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
167
|
+
children: ["Cette section n'a pas pu s'afficher. Cliquez sur \xAB\xA0", retryLabel || "Réessayer", "\xA0\xBB\xA0; si le probl\xE8me persiste, rechargez la page ou contactez l'administrateur."]
|
|
168
|
+
}), isDev && (technicalMessage || originComponent) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
169
|
+
style: DETAIL_SX,
|
|
170
|
+
children: [technicalMessage, originComponent ? ` · origine probable : ${originComponent}` : ""]
|
|
171
|
+
})]
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
var _default = exports.default = SectionErrorBoundary;
|
|
221
176
|
//# sourceMappingURL=SectionErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionErrorBoundary.js","names":["React","_interopRequireWildcard","require","_Banner","_interopRequireDefault","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","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","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","Number","_inherits","subClass","superClass","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","bind","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf","result","NewTarget","Reflect","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","_createForOfIteratorHelper","allowArrayLike","it","iterator","Array","isArray","_unsupportedIterableToArray","F","s","n","done","_e","f","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","name","from","test","arr","len","arr2","extractFirstComponent","stack","_iterator","split","_step","raw","line","trim","match","exec","DETAIL_SX","freeze","fontFamily","fontSize","color","marginTop","wordBreak","SectionErrorBoundary","_React$Component","_super","_this","state","error","info","attempt","handleRetry","componentDidCatch","_this$props","title","console","concat","componentStack","setState","_this$props$onError","_this$props2","onError","_unused","render","_ref","_error$message","_this$state","_this$props3","children","secondaryAction","retryLabel","jsx","Fragment","isDev","process","env","originComponent","technicalMessage","message","jsxs","variant","action","label","onClick","style","getDerivedStateFromError","Component","_default","exports"],"sources":["../../../src/lib/v2/components/SectionErrorBoundary.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Banner from \"./Banner\";\r\nimport type { BannerAction } from \"./Banner\";\r\n\r\n/**\r\n * SectionErrorBoundary — Portnet UI v2\r\n *\r\n * Isolates a subtree so one failing section cannot take down the page.\r\n *\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n * WHY THIS BELONGS IN THE LIBRARY (capability gap G-30)\r\n *\r\n * ISO/IEC 25010 § Reliability — Fault tolerance: a system must keep operating\r\n * despite a fault. React does the opposite by default. An exception thrown during\r\n * render unmounts the WHOLE tree, so a single section receiving an unexpected\r\n * payload — an `articles` field arriving as an object where `.map` is called —\r\n * replaces the entire page with a BLANK SCREEN. Not an error message: nothing.\r\n * That is the worst possible failure mode, and it is reachable in every GU module\r\n * whose wire models declare all fields optional precisely because the legacy\r\n * back-end is not dependable.\r\n *\r\n * `ms-ti-fe` wrapped 13 sections in a boundary of its own; `addpe-fe` had none,\r\n * and neither did this library — so the pattern was one module's private\r\n * safeguard rather than a platform guarantee. Promoting it makes fault tolerance\r\n * available by import instead of by copy (R-2.1).\r\n *\r\n * NO MUI IMPORT, deliberately. This file depends only on React and `Banner`.\r\n * That constraint is inherited from the reference implementation and it is\r\n * load-bearing rather than stylistic: if MUI is what threw, importing MUI in the\r\n * fallback risks failing the fallback too. Keep it that way.\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n *\r\n * <SectionErrorBoundary title=\"Marchandises\">\r\n * <MarchandisesSection data={data.marchandises} />\r\n * </SectionErrorBoundary>\r\n *\r\n * Class component because `getDerivedStateFromError` and `componentDidCatch` have\r\n * no hook equivalent in stable React.\r\n *\r\n * WHAT THE USER SEES, and how it diverges from the reference. The reference\r\n * rendered `error.message` straight into the banner body — so an end user was\r\n * shown \"Cannot read properties of undefined (reading 'map')\". Charter §09.3\r\n * forbids exactly that (\"pas de jargon technique exposé à l'utilisateur\"), and a\r\n * raw JS exception is worse than the \"Erreur HTTP 422\" the charter uses as its\r\n * DON'T example. So:\r\n *\r\n * - production: a stable French sentence + the retry action. Nothing technical.\r\n * - development: the message and the probable origin component are appended,\r\n * because that is where a developer reads them.\r\n * - always: `console.error` with the full component stack, and the optional\r\n * `onError` hook for an APM breadcrumb — which is how the detail reaches\r\n * whoever can act on it, rather than the user who cannot.\r\n */\r\n\r\nexport interface SectionErrorBoundaryProps {\r\n /** Short section label, used to name the failure in the banner and the log. */\r\n title?: string | undefined;\r\n /** The subtree to protect. */\r\n children?: React.ReactNode | undefined;\r\n /**\r\n * Optional second affordance, rendered left of \"Réessayer\" (R-M.6). Use it when\r\n * retrying is unlikely to help and the user needs a way out — e.g. « Retour à la\r\n * liste ». The library cannot know the host's navigation, so this is a\r\n * pass-through rather than a built-in.\r\n *\r\n * Only possible since `Banner` gained `secondaryAction` (gap G-19); the\r\n * reference implementation had no second exit at all.\r\n */\r\n secondaryAction?: BannerAction | undefined;\r\n /**\r\n * Reporting hook, called once per caught error with the same arguments as\r\n * `componentDidCatch`. `console.error` is invisible in production, so without\r\n * this a boundary silently swallows the only signal an operator would get.\r\n */\r\n onError?: ((error: Error, info: React.ErrorInfo) => void) | undefined;\r\n /** Retry button label. Defaults to « Réessayer ». */\r\n retryLabel?: string | undefined;\r\n}\r\n\r\ninterface SectionErrorBoundaryState {\r\n error: Error | null;\r\n info: React.ErrorInfo | null;\r\n attempt: number;\r\n}\r\n\r\n/**\r\n * Pulls the topmost user component out of a React component stack.\r\n *\r\n * Handles BOTH stack formats: React 18 emits `\" in Foo (at Bar.tsx:42)\"`,\r\n * React 19 emits `\" at Foo (Bar.tsx:42)\"`. The reference matched only `in`,\r\n * so on React 19 — which this library targets — it silently returned null and the\r\n * origin hint never rendered.\r\n */\r\nfunction extractFirstComponent(\r\n stack: string | null | undefined\r\n): string | null {\r\n if (!stack || typeof stack !== \"string\") return null;\r\n for (const raw of stack.split(\"\\n\")) {\r\n const line = raw.trim();\r\n if (!line) continue;\r\n const match = /^(?:in|at)\\s+([A-Za-z0-9_$.]+)/.exec(line);\r\n const name = match?.[1];\r\n // Skip host elements (div, span…) — only a capitalised name is a component.\r\n if (name && /^[A-Z]/.test(name)) return name;\r\n }\r\n return null;\r\n}\r\n\r\nconst DETAIL_SX = Object.freeze({\r\n fontFamily: \"var(--font-mono)\",\r\n fontSize: \"var(--text-xs)\",\r\n color: \"var(--fg-subtle)\",\r\n marginTop: \"var(--s-1)\",\r\n // `wordBreak` because an exception message has no spaces to wrap on and would\r\n // otherwise widen the banner past its container.\r\n wordBreak: \"break-word\" as const,\r\n});\r\n\r\nclass SectionErrorBoundary extends React.Component<\r\n SectionErrorBoundaryProps,\r\n SectionErrorBoundaryState\r\n> {\r\n constructor(props: SectionErrorBoundaryProps) {\r\n super(props);\r\n this.state = { error: null, info: null, attempt: 0 };\r\n this.handleRetry = this.handleRetry.bind(this);\r\n }\r\n\r\n static getDerivedStateFromError(\r\n error: Error\r\n ): Partial<SectionErrorBoundaryState> {\r\n return { error };\r\n }\r\n\r\n override componentDidCatch(error: Error, info: React.ErrorInfo) {\r\n const title = this.props?.title || \"Section\";\r\n // eslint-disable-next-line no-console\r\n console.error(\r\n `[SectionErrorBoundary:${title}]`,\r\n error,\r\n \"\\nComponent stack:\",\r\n info?.componentStack\r\n );\r\n this.setState({ info });\r\n /* Guarded: a throwing reporter must not take down the boundary that exists to\r\n * stop things from taking each other down. */\r\n try {\r\n this.props.onError?.(error, info);\r\n } catch {\r\n /* reporter failed — the console.error above is still the record */\r\n }\r\n }\r\n\r\n handleRetry() {\r\n this.setState((s) => ({ error: null, info: null, attempt: s.attempt + 1 }));\r\n }\r\n\r\n override render() {\r\n const { error, info, attempt } = this.state;\r\n const { title, children, secondaryAction, retryLabel } = this.props;\r\n\r\n if (!error) {\r\n /* Re-keyed on retry so React REMOUNTS the subtree rather than reusing the\r\n * state that led to the throw. Without this, retry re-renders the same\r\n * broken instance and fails identically. */\r\n return <React.Fragment key={attempt}>{children}</React.Fragment>;\r\n }\r\n\r\n /* Bracket access, not dot: `noPropertyAccessFromIndexSignature` is one of the\r\n * nine mandatory strict flags, and `process.env` is an index signature. Note\r\n * that `tsc --noEmit` did not flag this — only `tsconfig.build.json` did, so a\r\n * green typecheck is not sufficient evidence here. */\r\n const isDev = process.env[\"NODE_ENV\"] !== \"production\";\r\n const originComponent = extractFirstComponent(info?.componentStack);\r\n const technicalMessage = String(error?.message ?? error ?? \"\");\r\n\r\n return (\r\n <Banner\r\n variant=\"error\"\r\n title={`${title || \"Section\"} — affichage impossible`}\r\n action={{ label: retryLabel || \"Réessayer\", onClick: this.handleRetry }}\r\n {...(secondaryAction ? { secondaryAction } : {})}\r\n >\r\n {/* §09.3 — [Quoi] + [Comment corriger], no technical detail. The cause\r\n goes to the console and to `onError`, not to the user. */}\r\n <div>\r\n Cette section n'a pas pu s'afficher. Cliquez sur « \r\n {retryLabel || \"Réessayer\"} » ; si le problème persiste,\r\n rechargez la page ou contactez l'administrateur.\r\n </div>\r\n {isDev && (technicalMessage || originComponent) && (\r\n <div style={DETAIL_SX}>\r\n {technicalMessage}\r\n {originComponent ? ` · origine probable : ${originComponent}` : \"\"}\r\n </div>\r\n )}\r\n </Banner>\r\n );\r\n }\r\n}\r\n\r\nexport default SectionErrorBoundary;\r\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8B,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,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAO,OAAA,CAAAP,GAAA,yBAAAA,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AC,4FAE7B;QAAA,CAAK,CAAC,EACLG,KAAK,KAAKI,gBAAgB,IAAID,eAAe,CAAC,iBAC7C,IAAApL,WAAA,CAAAuL,IAAA;UAAKK,KAAK,EAAEhD,SAAU;UAAAgC,QAAA,GACnBS,gBAAgB,EAChBD,eAAe,+BAAApB,MAAA,CAA4BoB,eAAe,IAAK,EAAE;QAAA,CAC/D,CACN;MAAA,EACK,CAAC;IAEb;EAAC;IAAAnK,GAAA;IAAA2B,KAAA,EAtED,SAAAiJ,yBACErC,KAAY,EACwB;MACpC,OAAO;QAAEA,KAAK,EAALA;MAAM,CAAC;IAClB;EAAC;EAAA,OAAAL,oBAAA;AAAA,EAdgCxJ,KAAK,CAACmM,SAAS;AAAA,IAAAC,QAAA,GAAAC,OAAA,cAmFnC7C,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SectionErrorBoundary.js","names":["React","_interopRequireWildcard","require","_Banner","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","extractFirstComponent","stack","raw","split","line","trim","match","exec","name","test","DETAIL_SX","freeze","fontFamily","fontSize","color","marginTop","wordBreak","SectionErrorBoundary","Component","constructor","props","state","error","info","attempt","handleRetry","bind","getDerivedStateFromError","componentDidCatch","title","console","componentStack","setState","onError","s","render","children","secondaryAction","retryLabel","jsx","Fragment","isDev","process","env","originComponent","technicalMessage","String","message","jsxs","variant","action","label","onClick","style","_default","exports"],"sources":["../../../src/lib/v2/components/SectionErrorBoundary.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Banner from \"./Banner\";\r\nimport type { BannerAction } from \"./Banner\";\r\n\r\n/**\r\n * SectionErrorBoundary — Portnet UI v2\r\n *\r\n * Isolates a subtree so one failing section cannot take down the page.\r\n *\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n * WHY THIS BELONGS IN THE LIBRARY (capability gap G-30)\r\n *\r\n * ISO/IEC 25010 § Reliability — Fault tolerance: a system must keep operating\r\n * despite a fault. React does the opposite by default. An exception thrown during\r\n * render unmounts the WHOLE tree, so a single section receiving an unexpected\r\n * payload — an `articles` field arriving as an object where `.map` is called —\r\n * replaces the entire page with a BLANK SCREEN. Not an error message: nothing.\r\n * That is the worst possible failure mode, and it is reachable in every GU module\r\n * whose wire models declare all fields optional precisely because the legacy\r\n * back-end is not dependable.\r\n *\r\n * `ms-ti-fe` wrapped 13 sections in a boundary of its own; `addpe-fe` had none,\r\n * and neither did this library — so the pattern was one module's private\r\n * safeguard rather than a platform guarantee. Promoting it makes fault tolerance\r\n * available by import instead of by copy (R-2.1).\r\n *\r\n * NO MUI IMPORT, deliberately. This file depends only on React and `Banner`.\r\n * That constraint is inherited from the reference implementation and it is\r\n * load-bearing rather than stylistic: if MUI is what threw, importing MUI in the\r\n * fallback risks failing the fallback too. Keep it that way.\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n *\r\n * <SectionErrorBoundary title=\"Marchandises\">\r\n * <MarchandisesSection data={data.marchandises} />\r\n * </SectionErrorBoundary>\r\n *\r\n * Class component because `getDerivedStateFromError` and `componentDidCatch` have\r\n * no hook equivalent in stable React.\r\n *\r\n * WHAT THE USER SEES, and how it diverges from the reference. The reference\r\n * rendered `error.message` straight into the banner body — so an end user was\r\n * shown \"Cannot read properties of undefined (reading 'map')\". Charter §09.3\r\n * forbids exactly that (\"pas de jargon technique exposé à l'utilisateur\"), and a\r\n * raw JS exception is worse than the \"Erreur HTTP 422\" the charter uses as its\r\n * DON'T example. So:\r\n *\r\n * - production: a stable French sentence + the retry action. Nothing technical.\r\n * - development: the message and the probable origin component are appended,\r\n * because that is where a developer reads them.\r\n * - always: `console.error` with the full component stack, and the optional\r\n * `onError` hook for an APM breadcrumb — which is how the detail reaches\r\n * whoever can act on it, rather than the user who cannot.\r\n */\r\n\r\nexport interface SectionErrorBoundaryProps {\r\n /** Short section label, used to name the failure in the banner and the log. */\r\n title?: string | undefined;\r\n /** The subtree to protect. */\r\n children?: React.ReactNode | undefined;\r\n /**\r\n * Optional second affordance, rendered left of \"Réessayer\" (R-M.6). Use it when\r\n * retrying is unlikely to help and the user needs a way out — e.g. « Retour à la\r\n * liste ». The library cannot know the host's navigation, so this is a\r\n * pass-through rather than a built-in.\r\n *\r\n * Only possible since `Banner` gained `secondaryAction` (gap G-19); the\r\n * reference implementation had no second exit at all.\r\n */\r\n secondaryAction?: BannerAction | undefined;\r\n /**\r\n * Reporting hook, called once per caught error with the same arguments as\r\n * `componentDidCatch`. `console.error` is invisible in production, so without\r\n * this a boundary silently swallows the only signal an operator would get.\r\n */\r\n onError?: ((error: Error, info: React.ErrorInfo) => void) | undefined;\r\n /** Retry button label. Defaults to « Réessayer ». */\r\n retryLabel?: string | undefined;\r\n}\r\n\r\ninterface SectionErrorBoundaryState {\r\n error: Error | null;\r\n info: React.ErrorInfo | null;\r\n attempt: number;\r\n}\r\n\r\n/**\r\n * Pulls the topmost user component out of a React component stack.\r\n *\r\n * Handles BOTH stack formats: React 18 emits `\" in Foo (at Bar.tsx:42)\"`,\r\n * React 19 emits `\" at Foo (Bar.tsx:42)\"`. The reference matched only `in`,\r\n * so on React 19 — which this library targets — it silently returned null and the\r\n * origin hint never rendered.\r\n */\r\nfunction extractFirstComponent(\r\n stack: string | null | undefined\r\n): string | null {\r\n if (!stack || typeof stack !== \"string\") return null;\r\n for (const raw of stack.split(\"\\n\")) {\r\n const line = raw.trim();\r\n if (!line) continue;\r\n const match = /^(?:in|at)\\s+([A-Za-z0-9_$.]+)/.exec(line);\r\n const name = match?.[1];\r\n // Skip host elements (div, span…) — only a capitalised name is a component.\r\n if (name && /^[A-Z]/.test(name)) return name;\r\n }\r\n return null;\r\n}\r\n\r\nconst DETAIL_SX = Object.freeze({\r\n fontFamily: \"var(--font-mono)\",\r\n fontSize: \"var(--text-xs)\",\r\n color: \"var(--fg-subtle)\",\r\n marginTop: \"var(--s-1)\",\r\n // `wordBreak` because an exception message has no spaces to wrap on and would\r\n // otherwise widen the banner past its container.\r\n wordBreak: \"break-word\" as const,\r\n});\r\n\r\nclass SectionErrorBoundary extends React.Component<\r\n SectionErrorBoundaryProps,\r\n SectionErrorBoundaryState\r\n> {\r\n constructor(props: SectionErrorBoundaryProps) {\r\n super(props);\r\n this.state = { error: null, info: null, attempt: 0 };\r\n this.handleRetry = this.handleRetry.bind(this);\r\n }\r\n\r\n static getDerivedStateFromError(\r\n error: Error\r\n ): Partial<SectionErrorBoundaryState> {\r\n return { error };\r\n }\r\n\r\n override componentDidCatch(error: Error, info: React.ErrorInfo) {\r\n const title = this.props?.title || \"Section\";\r\n // eslint-disable-next-line no-console\r\n console.error(\r\n `[SectionErrorBoundary:${title}]`,\r\n error,\r\n \"\\nComponent stack:\",\r\n info?.componentStack\r\n );\r\n this.setState({ info });\r\n /* Guarded: a throwing reporter must not take down the boundary that exists to\r\n * stop things from taking each other down. */\r\n try {\r\n this.props.onError?.(error, info);\r\n } catch {\r\n /* reporter failed — the console.error above is still the record */\r\n }\r\n }\r\n\r\n handleRetry() {\r\n this.setState((s) => ({ error: null, info: null, attempt: s.attempt + 1 }));\r\n }\r\n\r\n override render() {\r\n const { error, info, attempt } = this.state;\r\n const { title, children, secondaryAction, retryLabel } = this.props;\r\n\r\n if (!error) {\r\n /* Re-keyed on retry so React REMOUNTS the subtree rather than reusing the\r\n * state that led to the throw. Without this, retry re-renders the same\r\n * broken instance and fails identically. */\r\n return <React.Fragment key={attempt}>{children}</React.Fragment>;\r\n }\r\n\r\n /* Bracket access, not dot: `noPropertyAccessFromIndexSignature` is one of the\r\n * nine mandatory strict flags, and `process.env` is an index signature. Note\r\n * that `tsc --noEmit` did not flag this — only `tsconfig.build.json` did, so a\r\n * green typecheck is not sufficient evidence here. */\r\n const isDev = process.env[\"NODE_ENV\"] !== \"production\";\r\n const originComponent = extractFirstComponent(info?.componentStack);\r\n const technicalMessage = String(error?.message ?? error ?? \"\");\r\n\r\n return (\r\n <Banner\r\n variant=\"error\"\r\n title={`${title || \"Section\"} — affichage impossible`}\r\n action={{ label: retryLabel || \"Réessayer\", onClick: this.handleRetry }}\r\n {...(secondaryAction ? { secondaryAction } : {})}\r\n >\r\n {/* §09.3 — [Quoi] + [Comment corriger], no technical detail. The cause\r\n goes to the console and to `onError`, not to the user. */}\r\n <div>\r\n Cette section n'a pas pu s'afficher. Cliquez sur « \r\n {retryLabel || \"Réessayer\"} » ; si le problème persiste,\r\n rechargez la page ou contactez l'administrateur.\r\n </div>\r\n {isDev && (technicalMessage || originComponent) && (\r\n <div style={DETAIL_SX}>\r\n {technicalMessage}\r\n {originComponent ? ` · origine probable : ${originComponent}` : \"\"}\r\n </div>\r\n )}\r\n </Banner>\r\n );\r\n }\r\n}\r\n\r\nexport default SectionErrorBoundary;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8B,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAK,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,G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B,EAChBD,eAAe,GAAG,yBAAyBA,eAAe,EAAE,GAAG,EAAE;MAAA,CAC/D,CACN;IAAA,CACK,CAAC;EAEb;AACF;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAxE,OAAA,GAEckC,oBAAoB","ignoreList":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
12
|
/**
|
|
13
13
|
* SectionHeader — Portnet UI v2
|
|
14
14
|
*
|
|
@@ -49,17 +49,8 @@ var _excluded = ["level", "icon", "title", "children", "subtitle", "action", "sx
|
|
|
49
49
|
* action — optional trailing element (Button, dropdown, etc.).
|
|
50
50
|
* sx — escape hatch.
|
|
51
51
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
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; }
|
|
55
|
-
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; }
|
|
56
|
-
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; }
|
|
57
|
-
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; }
|
|
58
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
59
|
-
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); }
|
|
60
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
61
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
62
|
-
var TYPOGRAPHY_BY_LEVEL = Object.freeze({
|
|
52
|
+
|
|
53
|
+
const TYPOGRAPHY_BY_LEVEL = Object.freeze({
|
|
63
54
|
h2: {
|
|
64
55
|
fontSize: "var(--text-h2)",
|
|
65
56
|
lineHeight: "var(--lh-tight)"
|
|
@@ -73,26 +64,27 @@ var TYPOGRAPHY_BY_LEVEL = Object.freeze({
|
|
|
73
64
|
lineHeight: "var(--lh-snug)"
|
|
74
65
|
}
|
|
75
66
|
});
|
|
76
|
-
function SectionHeader(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box
|
|
89
|
-
sx:
|
|
67
|
+
function SectionHeader({
|
|
68
|
+
level = "h3",
|
|
69
|
+
icon,
|
|
70
|
+
title,
|
|
71
|
+
children,
|
|
72
|
+
subtitle,
|
|
73
|
+
action,
|
|
74
|
+
sx,
|
|
75
|
+
...rest
|
|
76
|
+
}) {
|
|
77
|
+
const headingText = title ?? children;
|
|
78
|
+
const typography = TYPOGRAPHY_BY_LEVEL[level] || TYPOGRAPHY_BY_LEVEL.h3;
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
80
|
+
sx: {
|
|
90
81
|
display: "flex",
|
|
91
82
|
alignItems: subtitle ? "flex-start" : "center",
|
|
92
|
-
gap: "var(--s-2)"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
gap: "var(--s-2)",
|
|
84
|
+
...sx
|
|
85
|
+
},
|
|
86
|
+
...rest,
|
|
87
|
+
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
96
88
|
"aria-hidden": "true",
|
|
97
89
|
sx: {
|
|
98
90
|
color: "var(--fg-muted)",
|
|
@@ -106,20 +98,21 @@ function SectionHeader(_ref) {
|
|
|
106
98
|
}
|
|
107
99
|
},
|
|
108
100
|
children: icon
|
|
109
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box
|
|
101
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
110
102
|
sx: {
|
|
111
103
|
flex: 1,
|
|
112
104
|
minWidth: 0
|
|
113
105
|
},
|
|
114
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box
|
|
106
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
115
107
|
component: level,
|
|
116
|
-
sx:
|
|
108
|
+
sx: {
|
|
117
109
|
margin: 0,
|
|
118
110
|
fontWeight: "var(--fw-semibold)",
|
|
119
|
-
color: "var(--fg)"
|
|
120
|
-
|
|
111
|
+
color: "var(--fg)",
|
|
112
|
+
...typography
|
|
113
|
+
},
|
|
121
114
|
children: headingText
|
|
122
|
-
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box
|
|
115
|
+
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
123
116
|
sx: {
|
|
124
117
|
marginTop: "var(--s-1)",
|
|
125
118
|
fontSize: "var(--text-sm)",
|
|
@@ -128,13 +121,13 @@ function SectionHeader(_ref) {
|
|
|
128
121
|
},
|
|
129
122
|
children: subtitle
|
|
130
123
|
})]
|
|
131
|
-
}), action && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box
|
|
124
|
+
}), action && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
132
125
|
sx: {
|
|
133
126
|
flex: "0 0 auto"
|
|
134
127
|
},
|
|
135
128
|
children: action
|
|
136
129
|
})]
|
|
137
|
-
})
|
|
130
|
+
});
|
|
138
131
|
}
|
|
139
|
-
var _default = exports
|
|
132
|
+
var _default = exports.default = SectionHeader;
|
|
140
133
|
//# sourceMappingURL=SectionHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_jsxRuntime","_excluded","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","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","Symbol","toPrimitive","undefined","res","TypeError","Number","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","TYPOGRAPHY_BY_LEVEL","freeze","h2","fontSize","lineHeight","h3","h4","SectionHeader","_ref","_ref$level","level","icon","title","children","subtitle","action","sx","rest","headingText","typography","jsxs","display","alignItems","gap","jsx","color","marginTop","flex","minWidth","component","margin","fontWeight","_default","exports"],"sources":["../../../src/lib/v2/components/SectionHeader.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { BoxProps } from \"@mui/material/Box\";\r\n\r\n/**\r\n * SectionHeader — Portnet UI v2\r\n *\r\n * Charter §03 · standalone section-header primitive. Replaces the\r\n * local AppTitle wrapper that host modules previously maintained\r\n * (audit Batch 2 violation C3 in ms-ti-fe — direct MUI Typography\r\n * with hardcoded styling).\r\n *\r\n * Distinguished from v2.FormSection: SectionHeader is JUST the\r\n * heading row (no wrapping content, no surface chrome). Use it\r\n * when you need to label a region but don't want the FormSection\r\n * card border + padding.\r\n *\r\n * Usage:\r\n *\r\n * <SectionHeader level=\"h3\" icon={<DescriptionIcon />}>\r\n * Données du titre\r\n * </SectionHeader>\r\n *\r\n * <SectionHeader\r\n * level=\"h2\"\r\n * title=\"Documents joints\"\r\n * subtitle=\"Pièces transmises par l'opérateur\"\r\n * action={<Button variant=\"ghost\">Tout télécharger</Button>}\r\n * />\r\n *\r\n * The text can be passed either as `children` (single-line) or as\r\n * `title` + optional `subtitle` (multi-line).\r\n *\r\n * Props:\r\n * level — semantic h-level (\"h2\" / \"h3\" / \"h4\"). Default \"h3\".\r\n * Pick the next level below the page's outermost\r\n * heading (typically the ActionBar h1).\r\n * icon — optional leading icon element.\r\n * title — heading text. Use this OR children.\r\n * children — heading text. Use this OR title.\r\n * subtitle — optional secondary line beneath the title.\r\n * action — optional trailing element (Button, dropdown, etc.).\r\n * sx — escape hatch.\r\n */\r\n\r\nexport type SectionHeaderLevel = \"h2\" | \"h3\" | \"h4\";\r\n\r\nconst TYPOGRAPHY_BY_LEVEL: Record<SectionHeaderLevel, { fontSize: string; lineHeight: string }> = Object.freeze({\r\n h2: { fontSize: \"var(--text-h2)\", lineHeight: \"var(--lh-tight)\" },\r\n h3: { fontSize: \"var(--text-h3)\", lineHeight: \"var(--lh-snug)\" },\r\n h4: { fontSize: \"var(--text-h4)\", lineHeight: \"var(--lh-snug)\" },\r\n});\r\n\r\nexport interface SectionHeaderProps extends Omit<BoxProps, \"title\"> {\r\n level?: SectionHeaderLevel | undefined;\r\n icon?: React.ReactElement | undefined;\r\n title?: React.ReactNode | undefined;\r\n subtitle?: React.ReactNode | undefined;\r\n action?: React.ReactNode | undefined;\r\n}\r\n\r\nfunction SectionHeader({\r\n level = \"h3\",\r\n icon,\r\n title,\r\n children,\r\n subtitle,\r\n action,\r\n sx,\r\n ...rest\r\n}: SectionHeaderProps) {\r\n const headingText = title ?? children;\r\n const typography = TYPOGRAPHY_BY_LEVEL[level] || TYPOGRAPHY_BY_LEVEL.h3;\r\n\r\n return (\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n alignItems: subtitle ? \"flex-start\" : \"center\",\r\n gap: \"var(--s-2)\",\r\n ...sx,\r\n }}\r\n {...rest}\r\n >\r\n {icon && (\r\n <Box\r\n aria-hidden=\"true\"\r\n sx={{\r\n color: \"var(--fg-muted)\",\r\n display: \"inline-flex\",\r\n // Lift the icon slightly so it lines up with the\r\n // first cap-height of the heading text rather than\r\n // floating at the baseline.\r\n marginTop: subtitle ? \"2px\" : 0,\r\n \"& svg\": { fontSize: 20 },\r\n }}\r\n >\r\n {icon}\r\n </Box>\r\n )}\r\n\r\n <Box sx={{ flex: 1, minWidth: 0 }}>\r\n <Box\r\n component={level}\r\n sx={{\r\n margin: 0,\r\n fontWeight: \"var(--fw-semibold)\",\r\n color: \"var(--fg)\",\r\n ...typography,\r\n }}\r\n >\r\n {headingText}\r\n </Box>\r\n {subtitle && (\r\n <Box\r\n sx={{\r\n marginTop: \"var(--s-1)\",\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n lineHeight: \"var(--lh-normal)\",\r\n }}\r\n >\r\n {subtitle}\r\n </Box>\r\n )}\r\n </Box>\r\n\r\n {action && <Box sx={{ flex: \"0 0 auto\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AO;QAAW,GACpBN,UAAU,CACb;QAAAN,QAAA,EAEDK;MAAW,CACT,CAAC,EACLJ,QAAQ,iBACP,IAAAlF,WAAA,CAAA4F,GAAA,EAAC9F,IAAA,WAAG;QACFsF,EAAE,EAAE;UACFU,SAAS,EAAG,YAAY;UACxBvB,QAAQ,EAAI,gBAAgB;UAC5BsB,KAAK,EAAO,iBAAiB;UAC7BrB,UAAU,EAAE;QACd,CAAE;QAAAS,QAAA,EAEDC;MAAQ,CACN,CACN;IAAA,CACE,CAAC,EAELC,MAAM,iBAAI,IAAAnF,WAAA,CAAA4F,GAAA,EAAC9F,IAAA,WAAG;MAACsF,EAAE,EAAE;QAAEW,IAAI,EAAE;MAAW,CAAE;MAAAd,QAAA,EAAEE;IAAM,CAAM,CAAC;EAAA,EACrD,CAAC;AAEV;AAAC,IAAAiB,QAAA,GAAAC,OAAA,cAEc1B,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TYPOGRAPHY_BY_LEVEL","freeze","h2","fontSize","lineHeight","h3","h4","SectionHeader","level","icon","title","children","subtitle","action","sx","rest","headingText","typography","jsxs","display","alignItems","gap","jsx","color","marginTop","flex","minWidth","component","margin","fontWeight","_default","exports"],"sources":["../../../src/lib/v2/components/SectionHeader.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { BoxProps } from \"@mui/material/Box\";\r\n\r\n/**\r\n * SectionHeader — Portnet UI v2\r\n *\r\n * Charter §03 · standalone section-header primitive. Replaces the\r\n * local AppTitle wrapper that host modules previously maintained\r\n * (audit Batch 2 violation C3 in ms-ti-fe — direct MUI Typography\r\n * with hardcoded styling).\r\n *\r\n * Distinguished from v2.FormSection: SectionHeader is JUST the\r\n * heading row (no wrapping content, no surface chrome). Use it\r\n * when you need to label a region but don't want the FormSection\r\n * card border + padding.\r\n *\r\n * Usage:\r\n *\r\n * <SectionHeader level=\"h3\" icon={<DescriptionIcon />}>\r\n * Données du titre\r\n * </SectionHeader>\r\n *\r\n * <SectionHeader\r\n * level=\"h2\"\r\n * title=\"Documents joints\"\r\n * subtitle=\"Pièces transmises par l'opérateur\"\r\n * action={<Button variant=\"ghost\">Tout télécharger</Button>}\r\n * />\r\n *\r\n * The text can be passed either as `children` (single-line) or as\r\n * `title` + optional `subtitle` (multi-line).\r\n *\r\n * Props:\r\n * level — semantic h-level (\"h2\" / \"h3\" / \"h4\"). Default \"h3\".\r\n * Pick the next level below the page's outermost\r\n * heading (typically the ActionBar h1).\r\n * icon — optional leading icon element.\r\n * title — heading text. Use this OR children.\r\n * children — heading text. Use this OR title.\r\n * subtitle — optional secondary line beneath the title.\r\n * action — optional trailing element (Button, dropdown, etc.).\r\n * sx — escape hatch.\r\n */\r\n\r\nexport type SectionHeaderLevel = \"h2\" | \"h3\" | \"h4\";\r\n\r\nconst TYPOGRAPHY_BY_LEVEL: Record<SectionHeaderLevel, { fontSize: string; lineHeight: string }> = Object.freeze({\r\n h2: { fontSize: \"var(--text-h2)\", lineHeight: \"var(--lh-tight)\" },\r\n h3: { fontSize: \"var(--text-h3)\", lineHeight: \"var(--lh-snug)\" },\r\n h4: { fontSize: \"var(--text-h4)\", lineHeight: \"var(--lh-snug)\" },\r\n});\r\n\r\nexport interface SectionHeaderProps extends Omit<BoxProps, \"title\"> {\r\n level?: SectionHeaderLevel | undefined;\r\n icon?: React.ReactElement | undefined;\r\n title?: React.ReactNode | undefined;\r\n subtitle?: React.ReactNode | undefined;\r\n action?: React.ReactNode | undefined;\r\n}\r\n\r\nfunction SectionHeader({\r\n level = \"h3\",\r\n icon,\r\n title,\r\n children,\r\n subtitle,\r\n action,\r\n sx,\r\n ...rest\r\n}: SectionHeaderProps) {\r\n const headingText = title ?? children;\r\n const typography = TYPOGRAPHY_BY_LEVEL[level] || TYPOGRAPHY_BY_LEVEL.h3;\r\n\r\n return (\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n alignItems: subtitle ? \"flex-start\" : \"center\",\r\n gap: \"var(--s-2)\",\r\n ...sx,\r\n }}\r\n {...rest}\r\n >\r\n {icon && (\r\n <Box\r\n aria-hidden=\"true\"\r\n sx={{\r\n color: \"var(--fg-muted)\",\r\n display: \"inline-flex\",\r\n // Lift the icon slightly so it lines up with the\r\n // first cap-height of the heading text rather than\r\n // floating at the baseline.\r\n marginTop: subtitle ? \"2px\" : 0,\r\n \"& svg\": { fontSize: 20 },\r\n }}\r\n >\r\n {icon}\r\n </Box>\r\n )}\r\n\r\n <Box sx={{ flex: 1, minWidth: 0 }}>\r\n <Box\r\n component={level}\r\n sx={{\r\n margin: 0,\r\n fontWeight: \"var(--fw-semibold)\",\r\n color: \"var(--fg)\",\r\n ...typography,\r\n }}\r\n >\r\n {headingText}\r\n </Box>\r\n {subtitle && (\r\n <Box\r\n sx={{\r\n marginTop: \"var(--s-1)\",\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n lineHeight: \"var(--lh-normal)\",\r\n }}\r\n >\r\n {subtitle}\r\n </Box>\r\n )}\r\n </Box>\r\n\r\n {action && <Box sx={{ flex: \"0 0 auto\" }}>{action}</Box>}\r\n </Box>\r\n );\r\n}\r\n\r\nexport default SectionHeader;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAA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