@webority/ui-react 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppAccordion.js +1 -57
- package/dist/components/AppActionIcon.js +1 -53
- package/dist/components/AppAlert.js +1 -85
- package/dist/components/AppAsyncBlock.js +1 -48
- package/dist/components/AppAutocomplete.js +1 -93
- package/dist/components/AppAvatar.js +1 -143
- package/dist/components/AppAvatarGroup.js +1 -43
- package/dist/components/AppAvatarPicker.js +1 -247
- package/dist/components/AppBadge.js +1 -28
- package/dist/components/AppBanner.js +1 -49
- package/dist/components/AppBreadcrumbs.js +1 -24
- package/dist/components/AppButton.js +1 -85
- package/dist/components/AppCalendar.js +1 -72
- package/dist/components/AppCard.js +1 -110
- package/dist/components/AppChart.js +1 -153
- package/dist/components/AppChartCard.js +1 -125
- package/dist/components/AppCheckbox.js +1 -21
- package/dist/components/AppChip.js +1 -71
- package/dist/components/AppChoiceCard.js +1 -69
- package/dist/components/AppChoiceChip.js +1 -31
- package/dist/components/AppColorField.js +1 -63
- package/dist/components/AppColumnMenu.js +1 -27
- package/dist/components/AppCommandPalette.js +1 -164
- package/dist/components/AppCompareTable.js +1 -41
- package/dist/components/AppConfirmDialog.js +1 -93
- package/dist/components/AppConsentBanner.js +1 -37
- package/dist/components/AppContextMenu.js +1 -46
- package/dist/components/AppCopyButton.js +1 -41
- package/dist/components/AppCountrySelect.js +1 -75
- package/dist/components/AppDashboardCell.js +1 -19
- package/dist/components/AppDashboardGrid.js +1 -12
- package/dist/components/AppDataTable.js +1 -213
- package/dist/components/AppDatePicker.js +1 -59
- package/dist/components/AppDateRangePicker.js +1 -73
- package/dist/components/AppDescriptions.js +1 -40
- package/dist/components/AppDropZone.js +1 -106
- package/dist/components/AppDropdown.js +1 -90
- package/dist/components/AppEmptyState.js +1 -37
- package/dist/components/AppErrorSummary.js +1 -37
- package/dist/components/AppFileAttachment.js +1 -140
- package/dist/components/AppFilePicker.js +1 -220
- package/dist/components/AppFileViewer.js +1 -50
- package/dist/components/AppFilterBar.js +1 -129
- package/dist/components/AppFloatingDock.js +1 -47
- package/dist/components/AppFormActions.js +1 -23
- package/dist/components/AppFormRow.js +1 -24
- package/dist/components/AppFormSection.js +1 -32
- package/dist/components/AppIcon.js +1 -147
- package/dist/components/AppInfoList.js +1 -36
- package/dist/components/AppInfoTip.js +1 -41
- package/dist/components/AppInput.js +1 -269
- package/dist/components/AppKanban.js +1 -270
- package/dist/components/AppKpiTile.js +1 -91
- package/dist/components/AppLink.js +1 -74
- package/dist/components/AppLogoPicker.js +1 -264
- package/dist/components/AppMeter.js +1 -42
- package/dist/components/AppModal.js +1 -124
- package/dist/components/AppMultiSelect.js +1 -75
- package/dist/components/AppNumberInput.js +1 -139
- package/dist/components/AppOtpInput.js +1 -53
- package/dist/components/AppPageHeader.js +1 -82
- package/dist/components/AppPagination.js +1 -66
- package/dist/components/AppPhoneNumberInput.js +1 -53
- package/dist/components/AppPopover.js +1 -47
- package/dist/components/AppPricingCard.js +1 -58
- package/dist/components/AppProgress.js +1 -42
- package/dist/components/AppQrCode.js +1 -40
- package/dist/components/AppRadio.js +1 -21
- package/dist/components/AppRadioGroup.js +1 -79
- package/dist/components/AppRepeater.js +1 -57
- package/dist/components/AppRequiredMark.js +1 -11
- package/dist/components/AppResourceCard.js +1 -38
- package/dist/components/AppResult.js +1 -66
- package/dist/components/AppRichText.js +1 -72
- package/dist/components/AppScrollbar.js +1 -16
- package/dist/components/AppSearch.js +1 -52
- package/dist/components/AppSegmented.js +1 -87
- package/dist/components/AppSelect.js +1 -95
- package/dist/components/AppSelectMini.js +1 -45
- package/dist/components/AppShell.js +1 -709
- package/dist/components/AppSidebarMenu.js +1 -77
- package/dist/components/AppSkeleton.js +1 -24
- package/dist/components/AppSlider.js +1 -76
- package/dist/components/AppSortableList.js +1 -63
- package/dist/components/AppSparkline.js +1 -47
- package/dist/components/AppSpinner.js +1 -23
- package/dist/components/AppSplash.js +1 -62
- package/dist/components/AppStatusBadge.js +1 -22
- package/dist/components/AppStepper.js +1 -94
- package/dist/components/AppSwitch.js +1 -26
- package/dist/components/AppTableEmptyState.js +1 -30
- package/dist/components/AppTablePagination.js +1 -85
- package/dist/components/AppTableToolbar.js +1 -41
- package/dist/components/AppTabs.js +1 -195
- package/dist/components/AppTagInput.js +1 -63
- package/dist/components/AppTextarea.js +1 -81
- package/dist/components/AppThemeToggle.js +1 -102
- package/dist/components/AppTimePicker.js +1 -68
- package/dist/components/AppTimeline.js +1 -102
- package/dist/components/AppToast.js +1 -169
- package/dist/components/AppToolbar.js +1 -63
- package/dist/components/AppTooltip.js +1 -50
- package/dist/components/AppTour.js +1 -39
- package/dist/components/AppTreeView.js +1 -61
- package/dist/components/AppWizard.js +1 -82
- package/dist/components/AppWorkspaceSwitcher.js +1 -176
- package/dist/components/ModalIcons.js +1 -18
- package/dist/components/iconCatalogFull/bold/a.g.js +1 -69
- package/dist/components/iconCatalogFull/bold/b.g.js +1 -79
- package/dist/components/iconCatalogFull/bold/c.g.js +1 -98
- package/dist/components/iconCatalogFull/bold/d.g.js +1 -54
- package/dist/components/iconCatalogFull/bold/e.g.js +1 -34
- package/dist/components/iconCatalogFull/bold/f.g.js +1 -39
- package/dist/components/iconCatalogFull/bold/g.g.js +1 -43
- package/dist/components/iconCatalogFull/bold/h.g.js +1 -38
- package/dist/components/iconCatalogFull/bold/i.g.js +1 -20
- package/dist/components/iconCatalogFull/bold/j.g.js +1 -8
- package/dist/components/iconCatalogFull/bold/k.g.js +1 -9
- package/dist/components/iconCatalogFull/bold/l.g.js +1 -38
- package/dist/components/iconCatalogFull/bold/m.g.js +1 -91
- package/dist/components/iconCatalogFull/bold/n.g.js +1 -23
- package/dist/components/iconCatalogFull/bold/o.g.js +1 -11
- package/dist/components/iconCatalogFull/bold/p.g.js +1 -45
- package/dist/components/iconCatalogFull/bold/q.g.js +1 -12
- package/dist/components/iconCatalogFull/bold/r.g.js +1 -47
- package/dist/components/iconCatalogFull/bold/s.g.js +1 -99
- package/dist/components/iconCatalogFull/bold/t.g.js +1 -60
- package/dist/components/iconCatalogFull/bold/u.g.js +1 -17
- package/dist/components/iconCatalogFull/bold/v.g.js +1 -27
- package/dist/components/iconCatalogFull/bold/w.g.js +1 -30
- package/dist/components/iconCatalogFull/bold/x.g.js +1 -8
- package/dist/components/iconCatalogFull/bold/y.g.js +1 -0
- package/dist/components/iconCatalogFull/bold/z.g.js +1 -7
- package/dist/components/iconCatalogFull/broken/a.g.js +1 -69
- package/dist/components/iconCatalogFull/broken/b.g.js +1 -79
- package/dist/components/iconCatalogFull/broken/c.g.js +1 -98
- package/dist/components/iconCatalogFull/broken/d.g.js +1 -54
- package/dist/components/iconCatalogFull/broken/e.g.js +1 -34
- package/dist/components/iconCatalogFull/broken/f.g.js +1 -39
- package/dist/components/iconCatalogFull/broken/g.g.js +1 -43
- package/dist/components/iconCatalogFull/broken/h.g.js +1 -38
- package/dist/components/iconCatalogFull/broken/i.g.js +1 -20
- package/dist/components/iconCatalogFull/broken/j.g.js +1 -8
- package/dist/components/iconCatalogFull/broken/k.g.js +1 -9
- package/dist/components/iconCatalogFull/broken/l.g.js +1 -38
- package/dist/components/iconCatalogFull/broken/m.g.js +1 -91
- package/dist/components/iconCatalogFull/broken/n.g.js +1 -23
- package/dist/components/iconCatalogFull/broken/o.g.js +1 -11
- package/dist/components/iconCatalogFull/broken/p.g.js +1 -45
- package/dist/components/iconCatalogFull/broken/q.g.js +1 -12
- package/dist/components/iconCatalogFull/broken/r.g.js +1 -47
- package/dist/components/iconCatalogFull/broken/s.g.js +1 -99
- package/dist/components/iconCatalogFull/broken/t.g.js +1 -60
- package/dist/components/iconCatalogFull/broken/u.g.js +1 -17
- package/dist/components/iconCatalogFull/broken/v.g.js +1 -27
- package/dist/components/iconCatalogFull/broken/w.g.js +1 -30
- package/dist/components/iconCatalogFull/broken/x.g.js +1 -8
- package/dist/components/iconCatalogFull/broken/y.g.js +1 -0
- package/dist/components/iconCatalogFull/broken/z.g.js +1 -7
- package/dist/components/iconCatalogFull/bulk/a.g.js +1 -69
- package/dist/components/iconCatalogFull/bulk/b.g.js +1 -79
- package/dist/components/iconCatalogFull/bulk/c.g.js +1 -98
- package/dist/components/iconCatalogFull/bulk/d.g.js +1 -54
- package/dist/components/iconCatalogFull/bulk/e.g.js +1 -34
- package/dist/components/iconCatalogFull/bulk/f.g.js +1 -39
- package/dist/components/iconCatalogFull/bulk/g.g.js +1 -43
- package/dist/components/iconCatalogFull/bulk/h.g.js +1 -38
- package/dist/components/iconCatalogFull/bulk/i.g.js +1 -20
- package/dist/components/iconCatalogFull/bulk/j.g.js +1 -8
- package/dist/components/iconCatalogFull/bulk/k.g.js +1 -9
- package/dist/components/iconCatalogFull/bulk/l.g.js +1 -38
- package/dist/components/iconCatalogFull/bulk/m.g.js +1 -91
- package/dist/components/iconCatalogFull/bulk/n.g.js +1 -23
- package/dist/components/iconCatalogFull/bulk/o.g.js +1 -11
- package/dist/components/iconCatalogFull/bulk/p.g.js +1 -45
- package/dist/components/iconCatalogFull/bulk/q.g.js +1 -12
- package/dist/components/iconCatalogFull/bulk/r.g.js +1 -47
- package/dist/components/iconCatalogFull/bulk/s.g.js +1 -99
- package/dist/components/iconCatalogFull/bulk/t.g.js +1 -60
- package/dist/components/iconCatalogFull/bulk/u.g.js +1 -17
- package/dist/components/iconCatalogFull/bulk/v.g.js +1 -27
- package/dist/components/iconCatalogFull/bulk/w.g.js +1 -30
- package/dist/components/iconCatalogFull/bulk/x.g.js +1 -8
- package/dist/components/iconCatalogFull/bulk/y.g.js +1 -0
- package/dist/components/iconCatalogFull/bulk/z.g.js +1 -7
- package/dist/components/iconCatalogFull/linear/a.g.js +1 -69
- package/dist/components/iconCatalogFull/linear/b.g.js +1 -79
- package/dist/components/iconCatalogFull/linear/c.g.js +1 -98
- package/dist/components/iconCatalogFull/linear/d.g.js +1 -54
- package/dist/components/iconCatalogFull/linear/e.g.js +1 -34
- package/dist/components/iconCatalogFull/linear/f.g.js +1 -39
- package/dist/components/iconCatalogFull/linear/g.g.js +1 -43
- package/dist/components/iconCatalogFull/linear/h.g.js +1 -38
- package/dist/components/iconCatalogFull/linear/i.g.js +1 -20
- package/dist/components/iconCatalogFull/linear/j.g.js +1 -8
- package/dist/components/iconCatalogFull/linear/k.g.js +1 -9
- package/dist/components/iconCatalogFull/linear/l.g.js +1 -38
- package/dist/components/iconCatalogFull/linear/m.g.js +1 -91
- package/dist/components/iconCatalogFull/linear/n.g.js +1 -23
- package/dist/components/iconCatalogFull/linear/o.g.js +1 -11
- package/dist/components/iconCatalogFull/linear/p.g.js +1 -45
- package/dist/components/iconCatalogFull/linear/q.g.js +1 -12
- package/dist/components/iconCatalogFull/linear/r.g.js +1 -47
- package/dist/components/iconCatalogFull/linear/s.g.js +1 -99
- package/dist/components/iconCatalogFull/linear/t.g.js +1 -60
- package/dist/components/iconCatalogFull/linear/u.g.js +1 -17
- package/dist/components/iconCatalogFull/linear/v.g.js +1 -27
- package/dist/components/iconCatalogFull/linear/w.g.js +1 -30
- package/dist/components/iconCatalogFull/linear/x.g.js +1 -8
- package/dist/components/iconCatalogFull/linear/y.g.js +1 -0
- package/dist/components/iconCatalogFull/linear/z.g.js +1 -7
- package/dist/components/iconCatalogFull/outline/a.g.js +1 -69
- package/dist/components/iconCatalogFull/outline/b.g.js +1 -79
- package/dist/components/iconCatalogFull/outline/c.g.js +1 -98
- package/dist/components/iconCatalogFull/outline/d.g.js +1 -54
- package/dist/components/iconCatalogFull/outline/e.g.js +1 -34
- package/dist/components/iconCatalogFull/outline/f.g.js +1 -39
- package/dist/components/iconCatalogFull/outline/g.g.js +1 -43
- package/dist/components/iconCatalogFull/outline/h.g.js +1 -38
- package/dist/components/iconCatalogFull/outline/i.g.js +1 -20
- package/dist/components/iconCatalogFull/outline/j.g.js +1 -8
- package/dist/components/iconCatalogFull/outline/k.g.js +1 -9
- package/dist/components/iconCatalogFull/outline/l.g.js +1 -38
- package/dist/components/iconCatalogFull/outline/m.g.js +1 -91
- package/dist/components/iconCatalogFull/outline/n.g.js +1 -23
- package/dist/components/iconCatalogFull/outline/o.g.js +1 -11
- package/dist/components/iconCatalogFull/outline/p.g.js +1 -45
- package/dist/components/iconCatalogFull/outline/q.g.js +1 -12
- package/dist/components/iconCatalogFull/outline/r.g.js +1 -47
- package/dist/components/iconCatalogFull/outline/s.g.js +1 -99
- package/dist/components/iconCatalogFull/outline/t.g.js +1 -60
- package/dist/components/iconCatalogFull/outline/u.g.js +1 -17
- package/dist/components/iconCatalogFull/outline/v.g.js +1 -27
- package/dist/components/iconCatalogFull/outline/w.g.js +1 -30
- package/dist/components/iconCatalogFull/outline/x.g.js +1 -8
- package/dist/components/iconCatalogFull/outline/y.g.js +1 -0
- package/dist/components/iconCatalogFull/outline/z.g.js +1 -7
- package/dist/components/iconCatalogFull/twotone/a.g.js +1 -69
- package/dist/components/iconCatalogFull/twotone/b.g.js +1 -79
- package/dist/components/iconCatalogFull/twotone/c.g.js +1 -98
- package/dist/components/iconCatalogFull/twotone/d.g.js +1 -54
- package/dist/components/iconCatalogFull/twotone/e.g.js +1 -34
- package/dist/components/iconCatalogFull/twotone/f.g.js +1 -39
- package/dist/components/iconCatalogFull/twotone/g.g.js +1 -43
- package/dist/components/iconCatalogFull/twotone/h.g.js +1 -38
- package/dist/components/iconCatalogFull/twotone/i.g.js +1 -20
- package/dist/components/iconCatalogFull/twotone/j.g.js +1 -8
- package/dist/components/iconCatalogFull/twotone/k.g.js +1 -9
- package/dist/components/iconCatalogFull/twotone/l.g.js +1 -38
- package/dist/components/iconCatalogFull/twotone/m.g.js +1 -91
- package/dist/components/iconCatalogFull/twotone/n.g.js +1 -23
- package/dist/components/iconCatalogFull/twotone/o.g.js +1 -11
- package/dist/components/iconCatalogFull/twotone/p.g.js +1 -45
- package/dist/components/iconCatalogFull/twotone/q.g.js +1 -12
- package/dist/components/iconCatalogFull/twotone/r.g.js +1 -47
- package/dist/components/iconCatalogFull/twotone/s.g.js +1 -99
- package/dist/components/iconCatalogFull/twotone/t.g.js +1 -60
- package/dist/components/iconCatalogFull/twotone/u.g.js +1 -17
- package/dist/components/iconCatalogFull/twotone/v.g.js +1 -27
- package/dist/components/iconCatalogFull/twotone/w.g.js +1 -30
- package/dist/components/iconCatalogFull/twotone/x.g.js +1 -8
- package/dist/components/iconCatalogFull/twotone/y.g.js +1 -0
- package/dist/components/iconCatalogFull/twotone/z.g.js +1 -7
- package/dist/components/iconCatalogLoaders.g.js +1 -170
- package/dist/components/iconCatalogNames.g.js +1 -4
- package/dist/components/iconGlyphs.g.js +1 -211
- package/dist/components/iconVariants.g.js +1 -1040
- package/dist/components/renderIconProp.js +1 -13
- package/dist/components/toast.js +1 -41
- package/dist/components/toastStore.js +1 -78
- package/dist/components/useWuiControl.js +1 -106
- package/dist/components/warnInvalidValue.js +1 -17
- package/dist/components/warnUnknownProps.js +1 -17
- package/dist/components/withTooltip.js +1 -12
- package/dist/lib/CheckField.js +1 -37
- package/dist/lib/FileItemRow.js +1 -44
- package/dist/lib/emptyValue.js +1 -6
- package/dist/lib/fileItem.js +1 -27
- package/dist/lib/focusField.js +1 -14
- package/dist/lib/listQuery.js +1 -57
- package/dist/lib/navMatch.js +1 -29
- package/dist/lib/pageWindow.js +1 -14
- package/dist/lib/qrCode.js +1 -577
- package/dist/lib/shellCookie.js +1 -16
- package/dist/lib/useCommandPaletteShortcut.js +1 -15
- package/dist/lib/useFloatingStack.js +1 -25
- package/dist/lib/useListQuery.js +1 -120
- package/dist/lib/usePagination.js +1 -29
- package/dist/lib/useTableView.js +1 -42
- package/dist/types/components/AppAlert.d.ts +6 -1
- package/dist/types/components/AppCalendar.d.ts +8 -6
- package/dist/types/components/AppDatePicker.d.ts +4 -1
- package/dist/types/components/AppDateRangePicker.d.ts +2 -1
- package/dist/types/components/AppDropdown.d.ts +12 -1
- package/dist/types/components/AppStepper.d.ts +8 -1
- package/dist/types/components/AppWizard.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bold/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bold/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/bold/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bold/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bold/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/bold/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/bold/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/bold/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bold/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bold/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bold/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bold/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bold/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/broken/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/broken/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/broken/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/broken/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/broken/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/broken/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/broken/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/broken/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/broken/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/broken/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/broken/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/broken/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/broken/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bulk/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/bulk/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bulk/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bulk/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bulk/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bulk/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/bulk/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/bulk/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/bulk/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bulk/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bulk/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bulk/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bulk/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/linear/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/linear/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/linear/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/linear/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/linear/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/linear/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/linear/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/linear/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/linear/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/linear/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/linear/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/linear/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/linear/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/outline/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/outline/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/outline/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/outline/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/outline/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/outline/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/outline/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/outline/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/outline/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/outline/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/outline/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/outline/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/outline/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/twotone/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/twotone/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/twotone/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/twotone/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/twotone/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/twotone/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/twotone/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/twotone/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/twotone/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/twotone/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/twotone/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/twotone/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/twotone/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogLoaders.g.d.ts +6 -0
- package/dist/ui-react.js +1 -117
- package/package.json +7 -9
- package/dist/types/components/__tests__/restPassthrough.d.ts +0 -9
|
@@ -1,37 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "../lib/focusField.js";
|
|
3
|
-
import { useEffect as n, useId as r, useRef as i } from "react";
|
|
4
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/AppErrorSummary.jsx
|
|
6
|
-
function s({ errors: s = [], title: c, autoFocus: l = !0, id: u, className: d = "", ...f }) {
|
|
7
|
-
e("AppErrorSummary", f);
|
|
8
|
-
let p = r(), m = u || p, h = i(null), g = i(0), _ = s.length;
|
|
9
|
-
return n(() => {
|
|
10
|
-
l && _ > 0 && g.current === 0 && h.current?.focus(), g.current = _;
|
|
11
|
-
}, [_, l]), _ ? /* @__PURE__ */ o("div", {
|
|
12
|
-
ref: h,
|
|
13
|
-
className: ["alert alert-danger wui-error-summary", d].filter(Boolean).join(" "),
|
|
14
|
-
role: "alert",
|
|
15
|
-
tabIndex: -1,
|
|
16
|
-
"aria-labelledby": `${m}-title`,
|
|
17
|
-
id: m,
|
|
18
|
-
"data-autofocus": l ? "" : void 0,
|
|
19
|
-
...f,
|
|
20
|
-
children: [/* @__PURE__ */ a("h2", {
|
|
21
|
-
className: "wui-error-summary-title",
|
|
22
|
-
id: `${m}-title`,
|
|
23
|
-
children: c ?? `Fix ${_} field${_ > 1 ? "s" : ""} to continue`
|
|
24
|
-
}), /* @__PURE__ */ a("ul", {
|
|
25
|
-
className: "wui-error-summary-list",
|
|
26
|
-
children: s.map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("a", {
|
|
27
|
-
href: `#${e.field}`,
|
|
28
|
-
onClick: (n) => {
|
|
29
|
-
n.preventDefault(), t(e.field);
|
|
30
|
-
},
|
|
31
|
-
children: e.message
|
|
32
|
-
}) }, `${e.field}:${e.message}`))
|
|
33
|
-
})]
|
|
34
|
-
}) : null;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { s as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import t from"../lib/focusField.js";import{useEffect as n,useId as r,useRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({errors:s=[],title:c,autoFocus:l=!0,id:u,className:d=``,...f}){e(`AppErrorSummary`,f);let p=r(),m=u||p,h=i(null),g=i(0),_=s.length;return n(()=>{l&&_>0&&g.current===0&&h.current?.focus(),g.current=_},[_,l]),_?o(`div`,{ref:h,className:[`alert alert-danger wui-error-summary`,d].filter(Boolean).join(` `),role:`alert`,tabIndex:-1,"aria-labelledby":`${m}-title`,id:m,"data-autofocus":l?``:void 0,...f,children:[a(`h2`,{className:`wui-error-summary-title`,id:`${m}-title`,children:c??`Fix ${_} field${_>1?`s`:``} to continue`}),a(`ul`,{className:`wui-error-summary-list`,children:s.map(e=>a(`li`,{children:a(`a`,{href:`#${e.field}`,onClick:n=>{n.preventDefault(),t(e.field)},children:e.message})},`${e.field}:${e.message}`))})]}):null}export{s as default};
|
|
@@ -1,140 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./AppIcon.js";
|
|
3
|
-
import { keyOf as n, nameOf as r, sizeLabelOf as i, useItemUrl as a } from "../lib/fileItem.js";
|
|
4
|
-
import o from "../lib/FileItemRow.js";
|
|
5
|
-
import { DEFAULT_IMAGE_ACCEPT as s, DEFAULT_MAX_SIZE_MB as c, acceptLabel as l, isImageFile as u, isImageOnlyAccept as d, validateFile as f } from "@webority/ui-elements/helpers";
|
|
6
|
-
import { useId as p, useState as m } from "react";
|
|
7
|
-
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/AppFileAttachment.jsx
|
|
9
|
-
function v({ label: r = "Attachment", value: i, name: a, onChange: l, multiple: v = !1, accept: x = s, maxSizeMb: S = c, optional: C = !1, validate: w = !0, error: T, id: E, ...D }) {
|
|
10
|
-
e("AppFileAttachment", D);
|
|
11
|
-
let O = p(), k = E || O, [A, j] = m(""), M = v && Array.isArray(i) ? i : i ? [i] : [], N = d(x), P = (e) => e instanceof File ? u(e) : N || u(e), F = !v && M.length === 1 && P(M[0]), I = y(x, S);
|
|
12
|
-
function L(e) {
|
|
13
|
-
let t = Array.from(e.target.files || []);
|
|
14
|
-
if (e.target.value = "", !t.length) return;
|
|
15
|
-
let r = [], a = "";
|
|
16
|
-
for (let e of t) {
|
|
17
|
-
let t = w ? f(e, {
|
|
18
|
-
accept: x,
|
|
19
|
-
maxSizeMb: S
|
|
20
|
-
}) : null;
|
|
21
|
-
if (t) {
|
|
22
|
-
a ||= t;
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
r.push(e);
|
|
26
|
-
}
|
|
27
|
-
if (j(a), r.length) if (v) {
|
|
28
|
-
let e = Array.isArray(i) ? i : i ? [i] : [], t = new Set(e.map(n));
|
|
29
|
-
l(e.concat(r.filter((e) => !t.has(n(e)))));
|
|
30
|
-
} else l(r[0]);
|
|
31
|
-
}
|
|
32
|
-
function R(e) {
|
|
33
|
-
j(""), l(v ? M.filter((t, n) => n !== e) : null);
|
|
34
|
-
}
|
|
35
|
-
let z = T || A, B = z ? `${k}-error` : void 0, V = v || M.length === 0, H = N ? "image" : "file", U = v ? `Add ${H}s` : `Add ${N ? "an" : "a"} ${H}`;
|
|
36
|
-
return /* @__PURE__ */ _("div", {
|
|
37
|
-
className: "field",
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ _("label", {
|
|
40
|
-
className: "label",
|
|
41
|
-
htmlFor: k,
|
|
42
|
-
children: [r, C && /* @__PURE__ */ g("span", {
|
|
43
|
-
className: "label-optional",
|
|
44
|
-
children: " (optional)"
|
|
45
|
-
})]
|
|
46
|
-
}),
|
|
47
|
-
V && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("label", {
|
|
48
|
-
className: "attach-drop",
|
|
49
|
-
htmlFor: k,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ g("span", {
|
|
52
|
-
className: "attach-drop-icon",
|
|
53
|
-
children: /* @__PURE__ */ g(t, {
|
|
54
|
-
name: N ? "image" : "file-text",
|
|
55
|
-
size: 18
|
|
56
|
-
})
|
|
57
|
-
}),
|
|
58
|
-
/* @__PURE__ */ _("span", {
|
|
59
|
-
className: "attach-drop-copy",
|
|
60
|
-
children: [/* @__PURE__ */ g("span", {
|
|
61
|
-
className: "attach-drop-title",
|
|
62
|
-
children: U
|
|
63
|
-
}), I && /* @__PURE__ */ g("span", {
|
|
64
|
-
className: "attach-drop-hint",
|
|
65
|
-
children: I
|
|
66
|
-
})]
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ g("span", {
|
|
69
|
-
className: "attach-drop-cta",
|
|
70
|
-
children: "Browse"
|
|
71
|
-
})
|
|
72
|
-
]
|
|
73
|
-
}), /* @__PURE__ */ g("input", {
|
|
74
|
-
id: k,
|
|
75
|
-
type: "file",
|
|
76
|
-
className: "visually-hidden",
|
|
77
|
-
name: a,
|
|
78
|
-
accept: x || void 0,
|
|
79
|
-
multiple: v || void 0,
|
|
80
|
-
"aria-describedby": B,
|
|
81
|
-
onChange: L,
|
|
82
|
-
...D
|
|
83
|
-
})] }),
|
|
84
|
-
F ? /* @__PURE__ */ g(b, {
|
|
85
|
-
item: M[0],
|
|
86
|
-
isImage: !0,
|
|
87
|
-
onRemove: () => R(0)
|
|
88
|
-
}) : M.length > 0 && /* @__PURE__ */ g("div", {
|
|
89
|
-
className: "attach-list",
|
|
90
|
-
children: M.map((e, t) => /* @__PURE__ */ g(o, {
|
|
91
|
-
item: e,
|
|
92
|
-
isImage: P(e),
|
|
93
|
-
onRemove: () => R(t)
|
|
94
|
-
}, n(e)))
|
|
95
|
-
}),
|
|
96
|
-
z && /* @__PURE__ */ g("div", {
|
|
97
|
-
className: "field-error",
|
|
98
|
-
id: `${k}-error`,
|
|
99
|
-
children: z
|
|
100
|
-
})
|
|
101
|
-
]
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function y(e, t) {
|
|
105
|
-
let n = e?.trim() ? l(e) : "", r = t > 0 ? `up to ${t} MB` : "";
|
|
106
|
-
return n && r ? `${n}, ${r}` : r ? `Up to ${t} MB` : n;
|
|
107
|
-
}
|
|
108
|
-
function b({ item: e, isImage: n, onRemove: o }) {
|
|
109
|
-
let s = a(e, n), c = r(e), l = i(e);
|
|
110
|
-
return /* @__PURE__ */ _("div", {
|
|
111
|
-
className: "attach-preview",
|
|
112
|
-
children: [/* @__PURE__ */ _("div", {
|
|
113
|
-
className: "attach-figure",
|
|
114
|
-
children: [/* @__PURE__ */ g("img", {
|
|
115
|
-
src: s,
|
|
116
|
-
alt: c
|
|
117
|
-
}), /* @__PURE__ */ g("button", {
|
|
118
|
-
type: "button",
|
|
119
|
-
className: "attach-remove",
|
|
120
|
-
"aria-label": "Remove attachment",
|
|
121
|
-
onClick: o,
|
|
122
|
-
children: /* @__PURE__ */ g(t, {
|
|
123
|
-
name: "x",
|
|
124
|
-
size: 18
|
|
125
|
-
})
|
|
126
|
-
})]
|
|
127
|
-
}), /* @__PURE__ */ _("div", {
|
|
128
|
-
className: "attach-meta",
|
|
129
|
-
children: [/* @__PURE__ */ g("div", {
|
|
130
|
-
className: "attach-name",
|
|
131
|
-
children: c
|
|
132
|
-
}), l && /* @__PURE__ */ g("div", {
|
|
133
|
-
className: "attach-size",
|
|
134
|
-
children: l
|
|
135
|
-
})]
|
|
136
|
-
})]
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
//#endregion
|
|
140
|
-
export { v as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{keyOf as n,nameOf as r,sizeLabelOf as i,useItemUrl as a}from"../lib/fileItem.js";import o from"../lib/FileItemRow.js";import{DEFAULT_IMAGE_ACCEPT as s,DEFAULT_MAX_SIZE_MB as c,acceptLabel as l,isImageFile as u,isImageOnlyAccept as d,validateFile as f}from"@webority/ui-elements/helpers";import{useId as p,useState as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";function v({label:r=`Attachment`,value:i,name:a,onChange:l,multiple:v=!1,accept:x=s,maxSizeMb:S=c,optional:C=!1,validate:w=!0,error:T,id:E,...D}){e(`AppFileAttachment`,D);let O=p(),k=E||O,[A,j]=m(``),M=v&&Array.isArray(i)?i:i?[i]:[],N=d(x),P=e=>e instanceof File?u(e):N||u(e),F=!v&&M.length===1&&P(M[0]),I=y(x,S);function L(e){let t=Array.from(e.target.files||[]);if(e.target.value=``,!t.length)return;let r=[],a=``;for(let e of t){let t=w?f(e,{accept:x,maxSizeMb:S}):null;if(t){a||=t;continue}r.push(e)}if(j(a),r.length)if(v){let e=Array.isArray(i)?i:i?[i]:[],t=new Set(e.map(n));l(e.concat(r.filter(e=>!t.has(n(e)))))}else l(r[0])}function R(e){j(``),l(v?M.filter((t,n)=>n!==e):null)}let z=T||A,B=z?`${k}-error`:void 0,V=v||M.length===0,H=N?`image`:`file`,U=v?`Add ${H}s`:`Add ${N?`an`:`a`} ${H}`;return _(`div`,{className:`field`,children:[_(`label`,{className:`label`,htmlFor:k,children:[r,C&&g(`span`,{className:`label-optional`,children:` (optional)`})]}),V&&_(h,{children:[_(`label`,{className:`attach-drop`,htmlFor:k,children:[g(`span`,{className:`attach-drop-icon`,children:g(t,{name:N?`image`:`file-text`,size:18})}),_(`span`,{className:`attach-drop-copy`,children:[g(`span`,{className:`attach-drop-title`,children:U}),I&&g(`span`,{className:`attach-drop-hint`,children:I})]}),g(`span`,{className:`attach-drop-cta`,children:`Browse`})]}),g(`input`,{id:k,type:`file`,className:`visually-hidden`,name:a,accept:x||void 0,multiple:v||void 0,"aria-describedby":B,onChange:L,...D})]}),F?g(b,{item:M[0],isImage:!0,onRemove:()=>R(0)}):M.length>0&&g(`div`,{className:`attach-list`,children:M.map((e,t)=>g(o,{item:e,isImage:P(e),onRemove:()=>R(t)},n(e)))}),z&&g(`div`,{className:`field-error`,id:`${k}-error`,children:z})]})}function y(e,t){let n=e?.trim()?l(e):``,r=t>0?`up to ${t} MB`:``;return n&&r?`${n}, ${r}`:r?`Up to ${t} MB`:n}function b({item:e,isImage:n,onRemove:o}){let s=a(e,n),c=r(e),l=i(e);return _(`div`,{className:`attach-preview`,children:[_(`div`,{className:`attach-figure`,children:[g(`img`,{src:s,alt:c}),g(`button`,{type:`button`,className:`attach-remove`,"aria-label":`Remove attachment`,onClick:o,children:g(t,{name:`x`,size:18})})]}),_(`div`,{className:`attach-meta`,children:[g(`div`,{className:`attach-name`,children:c}),l&&g(`div`,{className:`attach-size`,children:l})]})]})}export{v as default};
|
|
@@ -1,220 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./withTooltip.js";
|
|
3
|
-
import n from "./AppIcon.js";
|
|
4
|
-
import r from "./AppRequiredMark.js";
|
|
5
|
-
import { keyOf as i } from "../lib/fileItem.js";
|
|
6
|
-
import a from "../lib/FileItemRow.js";
|
|
7
|
-
import { DEFAULT_MAX_SIZE_MB as o, acceptLabel as s, isImageFile as c, isImageOnlyAccept as ee, isPdfFile as l, validateFile as u } from "@webority/ui-elements/helpers";
|
|
8
|
-
import { useEffect as d, useId as te, useRef as f, useState as p } from "react";
|
|
9
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
|
-
//#region src/components/AppFilePicker.jsx
|
|
11
|
-
function g({ label: g, value: _, name: ne, id: re, onPick: v, multiple: y = !1, maxFiles: b, accept: x = ".jpg,.jpeg,.png", maxSizeMb: S = o, required: ie, error: ae, hint: C, loading: w = !1, className: T = "", fieldClassName: E = "", style: D, ...O }) {
|
|
12
|
-
e("AppFilePicker", O);
|
|
13
|
-
let [oe, k] = p(null), [se, A] = p(null), [j, M] = p(!1), [N, P] = p(""), F = f(null), ce = te(), I = re || ce;
|
|
14
|
-
d(() => {
|
|
15
|
-
if (!y && _ instanceof File && c(_)) {
|
|
16
|
-
let e = URL.createObjectURL(_);
|
|
17
|
-
return k(e), () => URL.revokeObjectURL(e);
|
|
18
|
-
}
|
|
19
|
-
k(null);
|
|
20
|
-
}, [_, y]);
|
|
21
|
-
let L = !y && _ && !c(_) && l(_) ? _ instanceof File ? _ : _.url : null;
|
|
22
|
-
d(() => {
|
|
23
|
-
if (!L) {
|
|
24
|
-
A(null);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
let e = !0, t = null;
|
|
28
|
-
return import("@webority/ui-elements/file-viewer").then((e) => e.renderPdfFirstPage(typeof L == "string" ? { url: L } : L)).then((n) => {
|
|
29
|
-
e && (t = URL.createObjectURL(n), A(t));
|
|
30
|
-
}).catch((e) => console.warn("[AppFilePicker] the PDF preview failed:", e?.message)), () => {
|
|
31
|
-
e = !1, A(null), t && URL.revokeObjectURL(t);
|
|
32
|
-
};
|
|
33
|
-
}, [L]);
|
|
34
|
-
let R = y ? Array.isArray(_) ? _ : _ ? [_] : [] : [], z = ae || N, B = z ? `${I}-error` : void 0, V = C && !z ? `${I}-hint` : void 0, H = B || V, U = ee(x), W = !y && !!_, G = W && (_ instanceof File ? c(_) : U || c(_)), le = _?.name, K = G ? _?.url || oe : se, q = G ? "image" : "file", ue = g ? `Change ${g}` : `Change ${q}`, J = g ? `Remove ${g}` : `Remove ${q}`, Y = g ? `${g} preview` : `Selected ${q} preview`, X = (e) => {
|
|
35
|
-
let t = u(e, {
|
|
36
|
-
accept: x,
|
|
37
|
-
maxSizeMb: S
|
|
38
|
-
});
|
|
39
|
-
return t ? (P(t), !1) : (P(""), v(e), !0);
|
|
40
|
-
}, Z = (e) => {
|
|
41
|
-
let t = Array.from(e || []);
|
|
42
|
-
if (!t.length) return;
|
|
43
|
-
let n = Array.isArray(_) ? _ : _ ? [_] : [], r = new Set(n.map(i)), a = "", o = [];
|
|
44
|
-
for (let e of t) {
|
|
45
|
-
let t = u(e, {
|
|
46
|
-
accept: x,
|
|
47
|
-
maxSizeMb: S
|
|
48
|
-
});
|
|
49
|
-
if (t) {
|
|
50
|
-
a ||= t;
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
r.has(i(e)) || (r.add(i(e)), o.push(e));
|
|
54
|
-
}
|
|
55
|
-
let s = n.concat(o);
|
|
56
|
-
b && s.length > b && (s = s.slice(0, b), a ||= `Up to ${b} files.`), P(a), v(s);
|
|
57
|
-
}, de = (e) => {
|
|
58
|
-
if (y) {
|
|
59
|
-
Z(e.target.files);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
let t = e.target.files?.[0] || null;
|
|
63
|
-
t && (X(t) || (e.target.value = ""));
|
|
64
|
-
}, fe = (e) => {
|
|
65
|
-
if (e.preventDefault(), M(!1), w) return;
|
|
66
|
-
if (y) {
|
|
67
|
-
Z(e.dataTransfer.files);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
let t = e.dataTransfer.files?.[0];
|
|
71
|
-
t && X(t);
|
|
72
|
-
}, pe = (e) => {
|
|
73
|
-
P(""), v(R.filter((t, n) => n !== e));
|
|
74
|
-
}, me = () => F.current?.click(), Q = w ? /* @__PURE__ */ m("span", {
|
|
75
|
-
className: "wui-file-busy",
|
|
76
|
-
children: /* @__PURE__ */ m("span", {
|
|
77
|
-
className: "spinner-border spinner-border-sm",
|
|
78
|
-
role: "status",
|
|
79
|
-
"aria-label": "Loading"
|
|
80
|
-
})
|
|
81
|
-
}) : null, $ = /* @__PURE__ */ m("input", {
|
|
82
|
-
id: I,
|
|
83
|
-
name: ne,
|
|
84
|
-
ref: F,
|
|
85
|
-
type: "file",
|
|
86
|
-
"aria-describedby": H,
|
|
87
|
-
accept: x,
|
|
88
|
-
multiple: y || void 0,
|
|
89
|
-
disabled: w || void 0,
|
|
90
|
-
className: "visually-hidden",
|
|
91
|
-
onClick: (e) => {
|
|
92
|
-
e.currentTarget.value = "";
|
|
93
|
-
},
|
|
94
|
-
onChange: de,
|
|
95
|
-
...O
|
|
96
|
-
});
|
|
97
|
-
return /* @__PURE__ */ h("div", {
|
|
98
|
-
className: `field${E ? ` ${E}` : ""}`,
|
|
99
|
-
children: [
|
|
100
|
-
/* @__PURE__ */ h("label", {
|
|
101
|
-
className: "label",
|
|
102
|
-
htmlFor: I,
|
|
103
|
-
children: [g, ie && /* @__PURE__ */ m(r, {})]
|
|
104
|
-
}),
|
|
105
|
-
W ? /* @__PURE__ */ h("div", {
|
|
106
|
-
className: `file-preview${z ? " error" : ""}${T ? ` ${T}` : ""}`,
|
|
107
|
-
style: D,
|
|
108
|
-
"aria-busy": w || void 0,
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ h("button", {
|
|
111
|
-
type: "button",
|
|
112
|
-
className: "file-preview-open",
|
|
113
|
-
"aria-label": ue,
|
|
114
|
-
onClick: me,
|
|
115
|
-
disabled: w,
|
|
116
|
-
children: [K ? /* @__PURE__ */ m("img", {
|
|
117
|
-
src: K,
|
|
118
|
-
alt: Y,
|
|
119
|
-
className: "file-preview-img"
|
|
120
|
-
}) : /* @__PURE__ */ h("span", {
|
|
121
|
-
className: "file-preview-file",
|
|
122
|
-
children: [/* @__PURE__ */ m(n, {
|
|
123
|
-
name: "file-text",
|
|
124
|
-
size: 28
|
|
125
|
-
}), /* @__PURE__ */ m("span", {
|
|
126
|
-
className: "file-preview-file-name",
|
|
127
|
-
children: le
|
|
128
|
-
})]
|
|
129
|
-
}), /* @__PURE__ */ m("span", {
|
|
130
|
-
className: "file-preview-overlay",
|
|
131
|
-
children: /* @__PURE__ */ h("span", {
|
|
132
|
-
className: "file-preview-cta",
|
|
133
|
-
children: [
|
|
134
|
-
/* @__PURE__ */ m(n, {
|
|
135
|
-
name: G ? "image" : "file-text",
|
|
136
|
-
size: 16
|
|
137
|
-
}),
|
|
138
|
-
" ",
|
|
139
|
-
G ? "Change image" : "Change file"
|
|
140
|
-
]
|
|
141
|
-
})
|
|
142
|
-
})]
|
|
143
|
-
}),
|
|
144
|
-
t(/* @__PURE__ */ m("button", {
|
|
145
|
-
type: "button",
|
|
146
|
-
className: "file-preview-remove",
|
|
147
|
-
"aria-label": J,
|
|
148
|
-
onClick: () => v(null),
|
|
149
|
-
disabled: w,
|
|
150
|
-
children: /* @__PURE__ */ m(n, {
|
|
151
|
-
name: "x",
|
|
152
|
-
size: 16
|
|
153
|
-
})
|
|
154
|
-
}), J),
|
|
155
|
-
$,
|
|
156
|
-
Q
|
|
157
|
-
]
|
|
158
|
-
}) : /* @__PURE__ */ h("div", {
|
|
159
|
-
className: `file-input file-input-tall${j ? " dragging" : ""}${z ? " error" : ""}${y && R.length > 0 ? " has-files" : ""}${T ? ` ${T}` : ""}`,
|
|
160
|
-
style: D,
|
|
161
|
-
"aria-busy": w || void 0,
|
|
162
|
-
onDragOver: (e) => {
|
|
163
|
-
e.preventDefault(), !w && !j && M(!0);
|
|
164
|
-
},
|
|
165
|
-
onDragLeave: (e) => {
|
|
166
|
-
e.preventDefault(), M(!1);
|
|
167
|
-
},
|
|
168
|
-
onDrop: fe,
|
|
169
|
-
children: [
|
|
170
|
-
/* @__PURE__ */ h("label", {
|
|
171
|
-
htmlFor: I,
|
|
172
|
-
className: "file-input-zone-label",
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ m("span", {
|
|
175
|
-
className: "file-input-icon",
|
|
176
|
-
children: /* @__PURE__ */ m(n, {
|
|
177
|
-
name: "upload",
|
|
178
|
-
size: 24
|
|
179
|
-
})
|
|
180
|
-
}),
|
|
181
|
-
/* @__PURE__ */ h("span", {
|
|
182
|
-
className: "file-input-title",
|
|
183
|
-
children: [/* @__PURE__ */ m("span", {
|
|
184
|
-
className: "browse",
|
|
185
|
-
children: "Click to upload"
|
|
186
|
-
}), " or drag & drop"]
|
|
187
|
-
}),
|
|
188
|
-
/* @__PURE__ */ m("span", {
|
|
189
|
-
className: "file-input-text",
|
|
190
|
-
children: S > 0 ? `${s(x)} · up to ${S} MB` : s(x)
|
|
191
|
-
})
|
|
192
|
-
]
|
|
193
|
-
}),
|
|
194
|
-
$,
|
|
195
|
-
Q,
|
|
196
|
-
y && R.length > 0 && /* @__PURE__ */ m("div", {
|
|
197
|
-
className: "attach-list",
|
|
198
|
-
children: R.map((e, t) => /* @__PURE__ */ m(a, {
|
|
199
|
-
item: e,
|
|
200
|
-
isImage: e instanceof File ? c(e) : U || c(e),
|
|
201
|
-
noun: "file",
|
|
202
|
-
onRemove: () => pe(t)
|
|
203
|
-
}, i(e)))
|
|
204
|
-
})
|
|
205
|
-
]
|
|
206
|
-
}),
|
|
207
|
-
z ? /* @__PURE__ */ m("div", {
|
|
208
|
-
className: "field-error",
|
|
209
|
-
id: B,
|
|
210
|
-
children: z
|
|
211
|
-
}) : C ? /* @__PURE__ */ m("div", {
|
|
212
|
-
className: "field-hint",
|
|
213
|
-
id: V,
|
|
214
|
-
children: C
|
|
215
|
-
}) : null
|
|
216
|
-
]
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
//#endregion
|
|
220
|
-
export { g as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import t from"./withTooltip.js";import n from"./AppIcon.js";import r from"./AppRequiredMark.js";import{keyOf as i}from"../lib/fileItem.js";import a from"../lib/FileItemRow.js";import{DEFAULT_MAX_SIZE_MB as o,acceptLabel as s,isImageFile as c,isImageOnlyAccept as ee,isPdfFile as l,validateFile as u}from"@webority/ui-elements/helpers";import{useEffect as d,useId as te,useRef as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({label:g,value:_,name:ne,id:re,onPick:v,multiple:y=!1,maxFiles:b,accept:x=`.jpg,.jpeg,.png`,maxSizeMb:S=o,required:ie,error:ae,hint:C,loading:w=!1,className:T=``,fieldClassName:E=``,style:D,...O}){e(`AppFilePicker`,O);let[oe,k]=p(null),[se,A]=p(null),[j,M]=p(!1),[N,P]=p(``),F=f(null),ce=te(),I=re||ce;d(()=>{if(!y&&_ instanceof File&&c(_)){let e=URL.createObjectURL(_);return k(e),()=>URL.revokeObjectURL(e)}k(null)},[_,y]);let L=!y&&_&&!c(_)&&l(_)?_ instanceof File?_:_.url:null;d(()=>{if(!L){A(null);return}let e=!0,t=null;return import(`@webority/ui-elements/file-viewer`).then(e=>e.renderPdfFirstPage(typeof L==`string`?{url:L}:L)).then(n=>{e&&(t=URL.createObjectURL(n),A(t))}).catch(e=>console.warn(`[AppFilePicker] the PDF preview failed:`,e?.message)),()=>{e=!1,A(null),t&&URL.revokeObjectURL(t)}},[L]);let R=y?Array.isArray(_)?_:_?[_]:[]:[],z=ae||N,B=z?`${I}-error`:void 0,V=C&&!z?`${I}-hint`:void 0,H=B||V,U=ee(x),W=!y&&!!_,G=W&&(_ instanceof File?c(_):U||c(_)),le=_?.name,K=G?_?.url||oe:se,q=G?`image`:`file`,ue=g?`Change ${g}`:`Change ${q}`,J=g?`Remove ${g}`:`Remove ${q}`,Y=g?`${g} preview`:`Selected ${q} preview`,X=e=>{let t=u(e,{accept:x,maxSizeMb:S});return t?(P(t),!1):(P(``),v(e),!0)},Z=e=>{let t=Array.from(e||[]);if(!t.length)return;let n=Array.isArray(_)?_:_?[_]:[],r=new Set(n.map(i)),a=``,o=[];for(let e of t){let t=u(e,{accept:x,maxSizeMb:S});if(t){a||=t;continue}r.has(i(e))||(r.add(i(e)),o.push(e))}let s=n.concat(o);b&&s.length>b&&(s=s.slice(0,b),a||=`Up to ${b} files.`),P(a),v(s)},de=e=>{if(y){Z(e.target.files);return}let t=e.target.files?.[0]||null;t&&(X(t)||(e.target.value=``))},fe=e=>{if(e.preventDefault(),M(!1),w)return;if(y){Z(e.dataTransfer.files);return}let t=e.dataTransfer.files?.[0];t&&X(t)},pe=e=>{P(``),v(R.filter((t,n)=>n!==e))},me=()=>F.current?.click(),Q=w?m(`span`,{className:`wui-file-busy`,children:m(`span`,{className:`spinner-border spinner-border-sm`,role:`status`,"aria-label":`Loading`})}):null,$=m(`input`,{id:I,name:ne,ref:F,type:`file`,"aria-describedby":H,accept:x,multiple:y||void 0,disabled:w||void 0,className:`visually-hidden`,onClick:e=>{e.currentTarget.value=``},onChange:de,...O});return h(`div`,{className:`field${E?` ${E}`:``}`,children:[h(`label`,{className:`label`,htmlFor:I,children:[g,ie&&m(r,{})]}),W?h(`div`,{className:`file-preview${z?` error`:``}${T?` ${T}`:``}`,style:D,"aria-busy":w||void 0,children:[h(`button`,{type:`button`,className:`file-preview-open`,"aria-label":ue,onClick:me,disabled:w,children:[K?m(`img`,{src:K,alt:Y,className:`file-preview-img`}):h(`span`,{className:`file-preview-file`,children:[m(n,{name:`file-text`,size:28}),m(`span`,{className:`file-preview-file-name`,children:le})]}),m(`span`,{className:`file-preview-overlay`,children:h(`span`,{className:`file-preview-cta`,children:[m(n,{name:G?`image`:`file-text`,size:16}),` `,G?`Change image`:`Change file`]})})]}),t(m(`button`,{type:`button`,className:`file-preview-remove`,"aria-label":J,onClick:()=>v(null),disabled:w,children:m(n,{name:`x`,size:16})}),J),$,Q]}):h(`div`,{className:`file-input file-input-tall${j?` dragging`:``}${z?` error`:``}${y&&R.length>0?` has-files`:``}${T?` ${T}`:``}`,style:D,"aria-busy":w||void 0,onDragOver:e=>{e.preventDefault(),!w&&!j&&M(!0)},onDragLeave:e=>{e.preventDefault(),M(!1)},onDrop:fe,children:[h(`label`,{htmlFor:I,className:`file-input-zone-label`,children:[m(`span`,{className:`file-input-icon`,children:m(n,{name:`upload`,size:24})}),h(`span`,{className:`file-input-title`,children:[m(`span`,{className:`browse`,children:`Click to upload`}),` or drag & drop`]}),m(`span`,{className:`file-input-text`,children:S>0?`${s(x)} · up to ${S} MB`:s(x)})]}),$,Q,y&&R.length>0&&m(`div`,{className:`attach-list`,children:R.map((e,t)=>m(a,{item:e,isImage:e instanceof File?c(e):U||c(e),noun:`file`,onRemove:()=>pe(t)},i(e)))})]}),z?m(`div`,{className:`field-error`,id:B,children:z}):C?m(`div`,{className:`field-hint`,id:V,children:C}):null]})}export{g as default};
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { forwardRef as t, useCallback as n, useEffect as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
3
|
-
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
import { createPortal as u } from "react-dom";
|
|
5
|
-
//#region src/components/AppFileViewer.jsx
|
|
6
|
-
var d = "wui-file-viewer:load", f = "wui-file-viewer:error", p = "wui-file-viewer:prefs-change", m = t(function({ src: t, name: m, type: h, prefs: g, onPrefsChange: _, viewKey: v, download: y = !1, workerSrc: b, assetBase: x, captions: S, actions: C, onLoad: w, onError: T, className: E = "", style: D, ...O }, k) {
|
|
7
|
-
e("AppFileViewer", O);
|
|
8
|
-
let A = a(null), j = a(w), M = a(T), N = a(_), [P, F] = o(null), I = n((e) => {
|
|
9
|
-
A.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
|
|
10
|
-
}, [k]);
|
|
11
|
-
return i(() => {
|
|
12
|
-
g !== void 0 && (A.current.prefs = g);
|
|
13
|
-
}, [g]), r(() => {
|
|
14
|
-
j.current = w, M.current = T, N.current = _;
|
|
15
|
-
}), r(() => {
|
|
16
|
-
let e = A.current, t = (e) => j.current?.(e.detail), n = (e) => M.current?.(e.detail), r = (e) => N.current?.(e.detail);
|
|
17
|
-
return e.addEventListener(d, t), e.addEventListener(f, n), e.addEventListener(p, r), () => {
|
|
18
|
-
e.removeEventListener(d, t), e.removeEventListener(f, n), e.removeEventListener(p, r);
|
|
19
|
-
};
|
|
20
|
-
}, []), r(() => {
|
|
21
|
-
let e = !0;
|
|
22
|
-
return import("@webority/ui-elements/file-viewer").then(() => {
|
|
23
|
-
let t = A.current;
|
|
24
|
-
e && t?.isConnected && F(t.actionsContainer);
|
|
25
|
-
}).catch((t) => {
|
|
26
|
-
console.warn("[AppFileViewer] the viewer failed to load:", t?.message), e && M.current?.({ message: t?.message ?? String(t) });
|
|
27
|
-
}), () => {
|
|
28
|
-
e = !1;
|
|
29
|
-
};
|
|
30
|
-
}, []), /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("wui-file-viewer", {
|
|
31
|
-
ref: I,
|
|
32
|
-
src: t,
|
|
33
|
-
name: m || void 0,
|
|
34
|
-
type: h || void 0,
|
|
35
|
-
"view-key": v || void 0,
|
|
36
|
-
download: y ? "" : void 0,
|
|
37
|
-
"worker-src": b || void 0,
|
|
38
|
-
"asset-base": x || void 0,
|
|
39
|
-
captions: S || void 0,
|
|
40
|
-
className: E || void 0,
|
|
41
|
-
style: D,
|
|
42
|
-
...O
|
|
43
|
-
}), P && C != null && u(/* @__PURE__ */ c("div", {
|
|
44
|
-
slot: "actions",
|
|
45
|
-
className: "wui-file-viewer-slot",
|
|
46
|
-
children: C
|
|
47
|
-
}), P)] });
|
|
48
|
-
});
|
|
49
|
-
//#endregion
|
|
50
|
-
export { m as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import{forwardRef as t,useCallback as n,useEffect as r,useLayoutEffect as i,useRef as a,useState as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{createPortal as u}from"react-dom";var d=`wui-file-viewer:load`,f=`wui-file-viewer:error`,p=`wui-file-viewer:prefs-change`,m=t(function({src:t,name:m,type:h,prefs:g,onPrefsChange:_,viewKey:v,download:y=!1,workerSrc:b,assetBase:x,captions:S,actions:C,onLoad:w,onError:T,className:E=``,style:D,...O},k){e(`AppFileViewer`,O);let A=a(null),j=a(w),M=a(T),N=a(_),[P,F]=o(null),I=n(e=>{A.current=e,typeof k==`function`?k(e):k&&(k.current=e)},[k]);return i(()=>{g!==void 0&&(A.current.prefs=g)},[g]),r(()=>{j.current=w,M.current=T,N.current=_}),r(()=>{let e=A.current,t=e=>j.current?.(e.detail),n=e=>M.current?.(e.detail),r=e=>N.current?.(e.detail);return e.addEventListener(d,t),e.addEventListener(f,n),e.addEventListener(p,r),()=>{e.removeEventListener(d,t),e.removeEventListener(f,n),e.removeEventListener(p,r)}},[]),r(()=>{let e=!0;return import(`@webority/ui-elements/file-viewer`).then(()=>{let t=A.current;e&&t?.isConnected&&F(t.actionsContainer)}).catch(t=>{console.warn(`[AppFileViewer] the viewer failed to load:`,t?.message),e&&M.current?.({message:t?.message??String(t)})}),()=>{e=!1}},[]),l(s,{children:[c(`wui-file-viewer`,{ref:I,src:t,name:m||void 0,type:h||void 0,"view-key":v||void 0,download:y?``:void 0,"worker-src":b||void 0,"asset-base":x||void 0,captions:S||void 0,className:E||void 0,style:D,...O}),P&&C!=null&&u(c(`div`,{slot:`actions`,className:`wui-file-viewer-slot`,children:C}),P)]})});export{m as default};
|
|
@@ -1,129 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import n from "./AppButton.js";
|
|
4
|
-
import r from "./AppSegmented.js";
|
|
5
|
-
import i from "./AppChip.js";
|
|
6
|
-
import a from "./AppDateRangePicker.js";
|
|
7
|
-
import { emptyFacetValue as o, isFacetActive as s } from "../lib/listQuery.js";
|
|
8
|
-
import c from "./AppMultiSelect.js";
|
|
9
|
-
import l from "./AppSearch.js";
|
|
10
|
-
import u from "./AppSelect.js";
|
|
11
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
-
//#region src/components/AppFilterBar.jsx
|
|
13
|
-
var p = [
|
|
14
|
-
"enum",
|
|
15
|
-
"multiEnum",
|
|
16
|
-
"dateRange",
|
|
17
|
-
"text"
|
|
18
|
-
], m = 4, h = (e) => (e.type === "enum" || e.type === "multiEnum") && !e.options?.length, g = (e, t) => e.options?.find((e) => e.value === t)?.label ?? t;
|
|
19
|
-
function _(e, t) {
|
|
20
|
-
if (!s(e, t)) return [];
|
|
21
|
-
if (e.type === "enum") return [{
|
|
22
|
-
id: e.key,
|
|
23
|
-
text: g(e, t),
|
|
24
|
-
clear: () => o(e)
|
|
25
|
-
}];
|
|
26
|
-
if (e.type === "multiEnum") return t.map((n) => ({
|
|
27
|
-
id: `${e.key}:${n}`,
|
|
28
|
-
text: g(e, n),
|
|
29
|
-
clear: () => t.filter((e) => e !== n)
|
|
30
|
-
}));
|
|
31
|
-
if (e.type === "dateRange") {
|
|
32
|
-
let n = t.from && t.to ? `${t.from} to ${t.to}` : t.from ? `From ${t.from}` : `Until ${t.to}`;
|
|
33
|
-
return [{
|
|
34
|
-
id: e.key,
|
|
35
|
-
text: n,
|
|
36
|
-
clear: () => o(e)
|
|
37
|
-
}];
|
|
38
|
-
}
|
|
39
|
-
return [];
|
|
40
|
-
}
|
|
41
|
-
function v({ facets: r, value: a, onChange: c, className: l = "", ...u }) {
|
|
42
|
-
t("AppFilterBar", u);
|
|
43
|
-
for (let t of r) e("AppFilterBar", "facets[].type", t.type, p);
|
|
44
|
-
let m = r.filter((e) => !h(e)), g = m.flatMap((e) => _(e, a[e.key]).map((t) => ({
|
|
45
|
-
...t,
|
|
46
|
-
facet: e
|
|
47
|
-
}))), v = m.filter((e) => s(e, a[e.key]));
|
|
48
|
-
return /* @__PURE__ */ f("div", {
|
|
49
|
-
className: `wui-filter-bar d-flex flex-wrap align-items-center gap-2${l ? ` ${l}` : ""}`,
|
|
50
|
-
...u,
|
|
51
|
-
children: [
|
|
52
|
-
m.map((e) => /* @__PURE__ */ d(y, {
|
|
53
|
-
facet: e,
|
|
54
|
-
value: a[e.key],
|
|
55
|
-
onChange: (t) => c(e.key, t)
|
|
56
|
-
}, e.key)),
|
|
57
|
-
g.map((e) => /* @__PURE__ */ d(i, {
|
|
58
|
-
size: "sm",
|
|
59
|
-
label: `${e.facet.label}: ${e.text}`,
|
|
60
|
-
removeLabel: `Remove ${e.facet.label} filter ${e.text}`,
|
|
61
|
-
onRemove: () => c(e.facet.key, e.clear())
|
|
62
|
-
}, e.id)),
|
|
63
|
-
v.length > 1 && /* @__PURE__ */ d(n, {
|
|
64
|
-
variant: "ghost",
|
|
65
|
-
size: "sm",
|
|
66
|
-
onClick: () => {
|
|
67
|
-
for (let e of v) c(e.key, o(e));
|
|
68
|
-
},
|
|
69
|
-
children: "Clear all"
|
|
70
|
-
})
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function y({ facet: e, value: t, onChange: n }) {
|
|
75
|
-
if (e.type === "enum") {
|
|
76
|
-
let i = e.options ?? [];
|
|
77
|
-
return i.length < m ? /* @__PURE__ */ d(r, {
|
|
78
|
-
label: e.label,
|
|
79
|
-
name: e.key,
|
|
80
|
-
size: "sm",
|
|
81
|
-
value: t ?? "",
|
|
82
|
-
onChange: n,
|
|
83
|
-
options: [{
|
|
84
|
-
value: "",
|
|
85
|
-
label: "All"
|
|
86
|
-
}, ...i]
|
|
87
|
-
}) : /* @__PURE__ */ d(u, {
|
|
88
|
-
"aria-label": e.label,
|
|
89
|
-
name: e.key,
|
|
90
|
-
placeholder: e.label,
|
|
91
|
-
size: "sm",
|
|
92
|
-
clearable: !0,
|
|
93
|
-
value: t ?? "",
|
|
94
|
-
onChange: n,
|
|
95
|
-
options: i
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return e.type === "multiEnum" ? /* @__PURE__ */ d(c, {
|
|
99
|
-
"aria-label": e.label,
|
|
100
|
-
name: e.key,
|
|
101
|
-
placeholder: e.label,
|
|
102
|
-
size: "sm",
|
|
103
|
-
collapseChips: !0,
|
|
104
|
-
values: t ?? [],
|
|
105
|
-
onChange: n,
|
|
106
|
-
options: e.options ?? []
|
|
107
|
-
}) : e.type === "dateRange" ? /* @__PURE__ */ d(a, {
|
|
108
|
-
ariaLabel: e.label,
|
|
109
|
-
startName: `${e.key}From`,
|
|
110
|
-
endName: `${e.key}To`,
|
|
111
|
-
placeholder: e.label,
|
|
112
|
-
size: "sm",
|
|
113
|
-
start: t?.from ?? "",
|
|
114
|
-
end: t?.to ?? "",
|
|
115
|
-
onChange: (e) => n({
|
|
116
|
-
from: e.start ?? "",
|
|
117
|
-
to: e.end ?? ""
|
|
118
|
-
})
|
|
119
|
-
}) : /* @__PURE__ */ d(l, {
|
|
120
|
-
ariaLabel: e.label,
|
|
121
|
-
name: e.key,
|
|
122
|
-
placeholder: e.label,
|
|
123
|
-
size: "sm",
|
|
124
|
-
value: t ?? "",
|
|
125
|
-
onChange: n
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
export { v as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppSegmented.js";import i from"./AppChip.js";import a from"./AppDateRangePicker.js";import{emptyFacetValue as o,isFacetActive as s}from"../lib/listQuery.js";import c from"./AppMultiSelect.js";import l from"./AppSearch.js";import u from"./AppSelect.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`enum`,`multiEnum`,`dateRange`,`text`],m=4,h=e=>(e.type===`enum`||e.type===`multiEnum`)&&!e.options?.length,g=(e,t)=>e.options?.find(e=>e.value===t)?.label??t;function _(e,t){if(!s(e,t))return[];if(e.type===`enum`)return[{id:e.key,text:g(e,t),clear:()=>o(e)}];if(e.type===`multiEnum`)return t.map(n=>({id:`${e.key}:${n}`,text:g(e,n),clear:()=>t.filter(e=>e!==n)}));if(e.type===`dateRange`){let n=t.from&&t.to?`${t.from} to ${t.to}`:t.from?`From ${t.from}`:`Until ${t.to}`;return[{id:e.key,text:n,clear:()=>o(e)}]}return[]}function v({facets:r,value:a,onChange:c,className:l=``,...u}){t(`AppFilterBar`,u);for(let t of r)e(`AppFilterBar`,`facets[].type`,t.type,p);let m=r.filter(e=>!h(e)),g=m.flatMap(e=>_(e,a[e.key]).map(t=>({...t,facet:e}))),v=m.filter(e=>s(e,a[e.key]));return f(`div`,{className:`wui-filter-bar d-flex flex-wrap align-items-center gap-2${l?` ${l}`:``}`,...u,children:[m.map(e=>d(y,{facet:e,value:a[e.key],onChange:t=>c(e.key,t)},e.key)),g.map(e=>d(i,{size:`sm`,label:`${e.facet.label}: ${e.text}`,removeLabel:`Remove ${e.facet.label} filter ${e.text}`,onRemove:()=>c(e.facet.key,e.clear())},e.id)),v.length>1&&d(n,{variant:`ghost`,size:`sm`,onClick:()=>{for(let e of v)c(e.key,o(e))},children:`Clear all`})]})}function y({facet:e,value:t,onChange:n}){if(e.type===`enum`){let i=e.options??[];return i.length<m?d(r,{label:e.label,name:e.key,size:`sm`,value:t??``,onChange:n,options:[{value:``,label:`All`},...i]}):d(u,{"aria-label":e.label,name:e.key,placeholder:e.label,size:`sm`,clearable:!0,value:t??``,onChange:n,options:i})}return e.type===`multiEnum`?d(c,{"aria-label":e.label,name:e.key,placeholder:e.label,size:`sm`,collapseChips:!0,values:t??[],onChange:n,options:e.options??[]}):e.type===`dateRange`?d(a,{ariaLabel:e.label,startName:`${e.key}From`,endName:`${e.key}To`,placeholder:e.label,size:`sm`,start:t?.from??``,end:t?.to??``,onChange:e=>n({from:e.start??``,to:e.end??``})}):d(l,{ariaLabel:e.label,name:e.key,placeholder:e.label,size:`sm`,value:t??``,onChange:n})}export{v as default};
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./renderIconProp.js";
|
|
3
|
-
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import "@webority/ui-elements/elements/dock";
|
|
5
|
-
//#region src/components/AppFloatingDock.jsx
|
|
6
|
-
function a({ items: a = [], linkComponent: o, ariaLabel: s = "Quick navigation", magnify: c = !0, maxScale: l, radius: u, className: d = "", ...f }) {
|
|
7
|
-
return e("AppFloatingDock", f), /* @__PURE__ */ r("wui-dock", {
|
|
8
|
-
role: "navigation",
|
|
9
|
-
"aria-label": s,
|
|
10
|
-
static: c ? void 0 : "",
|
|
11
|
-
"max-scale": l ?? void 0,
|
|
12
|
-
radius: u ?? void 0,
|
|
13
|
-
class: d || void 0,
|
|
14
|
-
...f,
|
|
15
|
-
children: a.map((e, a) => {
|
|
16
|
-
let s = e.key ?? `${e.title}-${a}`, c = /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("span", {
|
|
17
|
-
className: "dock-item-tip",
|
|
18
|
-
"aria-hidden": "true",
|
|
19
|
-
children: e.title
|
|
20
|
-
}), /* @__PURE__ */ r("span", {
|
|
21
|
-
className: "dock-item-icon",
|
|
22
|
-
children: t(e.icon, { size: 18 })
|
|
23
|
-
})] });
|
|
24
|
-
if (e.to && o) return /* @__PURE__ */ r(o, {
|
|
25
|
-
className: "dock-item",
|
|
26
|
-
to: e.to,
|
|
27
|
-
"aria-label": e.title,
|
|
28
|
-
children: c
|
|
29
|
-
}, s);
|
|
30
|
-
let l = e.href ?? e.to;
|
|
31
|
-
return l ? /* @__PURE__ */ r("a", {
|
|
32
|
-
className: "dock-item",
|
|
33
|
-
href: l,
|
|
34
|
-
"aria-label": e.title,
|
|
35
|
-
children: c
|
|
36
|
-
}, s) : /* @__PURE__ */ r("button", {
|
|
37
|
-
type: "button",
|
|
38
|
-
className: "dock-item",
|
|
39
|
-
onClick: e.onClick,
|
|
40
|
-
"aria-label": e.title,
|
|
41
|
-
children: c
|
|
42
|
-
}, s);
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
export { a as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import t from"./renderIconProp.js";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/dock";function a({items:a=[],linkComponent:o,ariaLabel:s=`Quick navigation`,magnify:c=!0,maxScale:l,radius:u,className:d=``,...f}){return e(`AppFloatingDock`,f),r(`wui-dock`,{role:`navigation`,"aria-label":s,static:c?void 0:``,"max-scale":l??void 0,radius:u??void 0,class:d||void 0,...f,children:a.map((e,a)=>{let s=e.key??`${e.title}-${a}`,c=i(n,{children:[r(`span`,{className:`dock-item-tip`,"aria-hidden":`true`,children:e.title}),r(`span`,{className:`dock-item-icon`,children:t(e.icon,{size:18})})]});if(e.to&&o)return r(o,{className:`dock-item`,to:e.to,"aria-label":e.title,children:c},s);let l=e.href??e.to;return l?r(`a`,{className:`dock-item`,href:l,"aria-label":e.title,children:c},s):r(`button`,{type:`button`,className:`dock-item`,onClick:e.onClick,"aria-label":e.title,children:c},s)})})}export{a as default};
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/AppFormActions.jsx
|
|
5
|
-
var r = [
|
|
6
|
-
"end",
|
|
7
|
-
"start",
|
|
8
|
-
"between"
|
|
9
|
-
];
|
|
10
|
-
function i({ children: i, sticky: a = !1, align: o = "end", className: s = "", ...c }) {
|
|
11
|
-
return t("AppFormActions", c), e("AppFormActions", "align", o, r), /* @__PURE__ */ n("div", {
|
|
12
|
-
className: [
|
|
13
|
-
"form-actions",
|
|
14
|
-
a ? "form-actions-sticky" : "",
|
|
15
|
-
o && o !== "end" ? `form-actions-${o}` : "",
|
|
16
|
-
s
|
|
17
|
-
].filter(Boolean).join(" "),
|
|
18
|
-
...c,
|
|
19
|
-
children: i
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { i as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";var r=[`end`,`start`,`between`];function i({children:i,sticky:a=!1,align:o=`end`,className:s=``,...c}){return t(`AppFormActions`,c),e(`AppFormActions`,`align`,o,r),n(`div`,{className:[`form-actions`,a?`form-actions-sticky`:``,o&&o!==`end`?`form-actions-${o}`:``,s].filter(Boolean).join(` `),...c,children:i})}export{i as default};
|