@k3-tech/react-kit 0.0.72 → 0.0.74
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/index.d.ts +11 -0
- package/dist/index.js +6132 -3995
- package/dist/kit/builder/data-table/components/DataTable.d.ts +21 -2
- package/dist/kit/builder/upload-wizard/UploadWizard.d.ts +54 -0
- package/dist/kit/builder/upload-wizard/UploadWizardMappingStep.d.ts +61 -0
- package/dist/kit/builder/upload-wizard/UploadWizardPreviewStep.d.ts +27 -0
- package/dist/kit/builder/upload-wizard/UploadWizardResultStep.d.ts +15 -0
- package/dist/kit/builder/upload-wizard/UploadWizardStepper.d.ts +6 -0
- package/dist/kit/builder/upload-wizard/UploadWizardUploadStep.d.ts +43 -0
- package/dist/kit/builder/upload-wizard/index.d.ts +8 -0
- package/dist/kit/builder/upload-wizard/types.d.ts +91 -0
- package/dist/kit/builder/upload-wizard/useFilePreview.d.ts +50 -0
- package/dist/kit/components/data-display/DescriptionList.d.ts +17 -0
- package/dist/kit/components/data-display/EmptyState.d.ts +13 -0
- package/dist/kit/components/data-display/StatCard.d.ts +49 -0
- package/dist/kit/components/data-display/index.d.ts +4 -0
- package/dist/kit/components/file-action/FileAction.d.ts +38 -0
- package/dist/kit/components/file-action/index.d.ts +2 -0
- package/dist/kit/components/fileuploader/FileUploader.d.ts +1 -1
- package/dist/kit/components/fileuploader/types.d.ts +2 -0
- package/dist/kit/components/import-progress/ImportProgress.d.ts +16 -0
- package/dist/kit/components/import-progress/index.d.ts +2 -0
- package/dist/kit/components/info-tip/InfoTip.d.ts +7 -0
- package/dist/kit/components/info-tip/index.d.ts +2 -0
- package/dist/kit/components/loading-overlay/LoadingOverlay.d.ts +9 -0
- package/dist/kit/components/loading-overlay/index.d.ts +2 -0
- package/dist/kit/components/product-cell/ProductCell.d.ts +13 -0
- package/dist/kit/components/product-cell/index.d.ts +2 -0
- package/dist/kit/components/row-actions/RowActions.d.ts +53 -0
- package/dist/kit/components/row-actions/index.d.ts +2 -0
- package/dist/kit/components/setting-row/SettingRow.d.ts +12 -0
- package/dist/kit/components/setting-row/index.d.ts +2 -0
- package/dist/kit/components/status-text/StatusText.d.ts +20 -0
- package/dist/kit/components/status-text/index.d.ts +2 -0
- package/dist/kit/components/tree/Tree.d.ts +42 -0
- package/dist/kit/components/tree/index.d.ts +2 -0
- package/dist/kit/themes/base.css +3 -3
- package/dist/kit/themes/clean-slate.css +871 -397
- package/dist/kit/themes/default.css +1327 -412
- package/dist/kit/themes/minimal-modern.css +871 -397
- package/dist/kit/themes/spotify.css +871 -397
- package/dist/shadcn/ui/alert.d.ts +1 -1
- package/dist/shadcn/ui/badge.d.ts +1 -1
- package/dist/shadcn/ui/button.d.ts +3 -1
- package/dist/shadcn/ui/progress.d.ts +10 -1
- package/package.json +5 -1
- package/.babelrc +0 -12
- package/.storybook/main.ts +0 -22
- package/.storybook/preview.ts +0 -198
- package/Dockerfile.storybook +0 -43
- package/biome.json +0 -10
- package/components.json +0 -20
- package/dist/chunks/index.js +0 -5168
- package/dist/chunks/ort.bundle.min.js +0 -4
- package/dist/chunks/ort.webgpu.bundle.min.js +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/Can.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/RequireAuth.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/ShowWhenAuthenticated.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/ShowWhenError.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/ShowWhenLoading.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/ShowWhenUnauthenticated.d.ts.map +0 -1
- package/dist/kit/builder/auth/components/withPermission.d.ts.map +0 -1
- package/dist/kit/builder/auth/hooks/action-hooks.d.ts.map +0 -1
- package/dist/kit/builder/auth/hooks/core-hooks.d.ts.map +0 -1
- package/dist/kit/builder/auth/hooks/index.d.ts.map +0 -1
- package/dist/kit/builder/auth/hooks/permission-hooks.d.ts.map +0 -1
- package/dist/kit/builder/auth/hooks/token-hooks.d.ts.map +0 -1
- package/dist/kit/builder/auth/index.d.ts.map +0 -1
- package/dist/kit/builder/auth/providers/AuthProvider.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/adapter-config.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/adapter.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/core.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/index.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/middleware.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/permissions.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/state.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/storage.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/token-manager.d.ts.map +0 -1
- package/dist/kit/builder/auth/types/utils.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/auth-adapter.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/apollo-link.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/axios.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/fetch.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/graphql.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/index.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/rest.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/client-adapters/urql-exchange.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/permission-checker.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/browser.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/cookie.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/encryption.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/env.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/factory.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/index.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/storage/memory.d.ts.map +0 -1
- package/dist/kit/builder/auth/utils/token-manager.d.ts.map +0 -1
- package/dist/kit/builder/data-table/components/DataTable.d.ts.map +0 -1
- package/dist/kit/builder/data-table/components/DataTableColumnHeader.d.ts.map +0 -1
- package/dist/kit/builder/data-table/components/DataTableFilterPanel.d.ts.map +0 -1
- package/dist/kit/builder/data-table/components/DataTablePagination.d.ts.map +0 -1
- package/dist/kit/builder/data-table/components/DataTableViewOptions.d.ts.map +0 -1
- package/dist/kit/builder/data-table/index.d.ts.map +0 -1
- package/dist/kit/builder/data-table/types.d.ts.map +0 -1
- package/dist/kit/builder/data-table/utils/dotAccessor.d.ts.map +0 -1
- package/dist/kit/builder/dialog/index.d.ts.map +0 -1
- package/dist/kit/builder/dialog/provider.d.ts.map +0 -1
- package/dist/kit/builder/form/components/FormBuilder.d.ts.map +0 -1
- package/dist/kit/builder/form/components/FormBuilderActions.d.ts.map +0 -1
- package/dist/kit/builder/form/components/FormBuilderContext.d.ts.map +0 -1
- package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/ArrayField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/AutocompleteField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/CheckboxField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/DateField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/DatePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/DateRangePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/DateTimePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/DateTimeRangePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/FileField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/MonthPickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/MonthRangePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/NumberField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/ObjectField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/RadioField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/SelectField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/SwitchField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/TextField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/TextareaField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/TimePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/TimeRangePickerField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/index.d.ts.map +0 -1
- package/dist/kit/builder/form/components/fields/types.d.ts.map +0 -1
- package/dist/kit/builder/form/components/index.d.ts.map +0 -1
- package/dist/kit/builder/form/components/sectionNodes.d.ts.map +0 -1
- package/dist/kit/builder/form/hooks/useFormBuilder.d.ts.map +0 -1
- package/dist/kit/builder/form/index.d.ts.map +0 -1
- package/dist/kit/builder/form/types.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/common-forms.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/dependencies.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/field-factories.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/index.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/section-factories.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/transformers.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/validations.d.ts.map +0 -1
- package/dist/kit/builder/form/utils/validators.d.ts.map +0 -1
- package/dist/kit/builder/page/Page.d.ts.map +0 -1
- package/dist/kit/builder/page/PageBackButton.d.ts.map +0 -1
- package/dist/kit/builder/page/index.d.ts.map +0 -1
- package/dist/kit/builder/section/SectionBuilder.d.ts.map +0 -1
- package/dist/kit/builder/section/SectionContainer.d.ts.map +0 -1
- package/dist/kit/builder/section/index.d.ts.map +0 -1
- package/dist/kit/builder/section/types.d.ts.map +0 -1
- package/dist/kit/builder/stack-dialog/context.d.ts.map +0 -1
- package/dist/kit/builder/stack-dialog/hooks.d.ts.map +0 -1
- package/dist/kit/builder/stack-dialog/index.d.ts.map +0 -1
- package/dist/kit/builder/stack-dialog/provider.d.ts.map +0 -1
- package/dist/kit/builder/stack-dialog/renderer.d.ts.map +0 -1
- package/dist/kit/builder/stack-dialog/types.d.ts.map +0 -1
- package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +0 -1
- package/dist/kit/components/autocomplete/index.d.ts.map +0 -1
- package/dist/kit/components/autocomplete/types.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/DataTableHeader.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/DebouncedFilterField.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/FilterFieldRenderer.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/index.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/types.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/urlSerialization.d.ts.map +0 -1
- package/dist/kit/components/data-table-headers/useDataTableHeaderUrl.d.ts.map +0 -1
- package/dist/kit/components/datepicker/DatePicker.d.ts.map +0 -1
- package/dist/kit/components/datepicker/DateRangePicker.d.ts.map +0 -1
- package/dist/kit/components/datepicker/index.d.ts.map +0 -1
- package/dist/kit/components/datetimepicker/DateTimePicker.d.ts.map +0 -1
- package/dist/kit/components/datetimepicker/DateTimeRangePicker.d.ts.map +0 -1
- package/dist/kit/components/datetimepicker/index.d.ts.map +0 -1
- package/dist/kit/components/fileuploader/FileUploader.d.ts.map +0 -1
- package/dist/kit/components/fileuploader/image-preprocess.d.ts.map +0 -1
- package/dist/kit/components/fileuploader/index.d.ts.map +0 -1
- package/dist/kit/components/fileuploader/types.d.ts.map +0 -1
- package/dist/kit/components/forminfo/FormInfoError.d.ts.map +0 -1
- package/dist/kit/components/forminfo/index.d.ts.map +0 -1
- package/dist/kit/components/info-tooltip/InfoTooltip.d.ts.map +0 -1
- package/dist/kit/components/keyboard/Keyboard.d.ts.map +0 -1
- package/dist/kit/components/keyboard/index.d.ts.map +0 -1
- package/dist/kit/components/login/Login.d.ts.map +0 -1
- package/dist/kit/components/login/index.d.ts.map +0 -1
- package/dist/kit/components/monthpicker/MonthInput.d.ts.map +0 -1
- package/dist/kit/components/monthpicker/MonthPicker.d.ts.map +0 -1
- package/dist/kit/components/monthpicker/MonthRangeInput.d.ts.map +0 -1
- package/dist/kit/components/monthpicker/MonthRangePicker.d.ts.map +0 -1
- package/dist/kit/components/numpad/Numpad.d.ts.map +0 -1
- package/dist/kit/components/numpad/index.d.ts.map +0 -1
- package/dist/kit/components/timepicker/TimePicker.d.ts.map +0 -1
- package/dist/kit/components/timepicker/TimeRangePicker.d.ts.map +0 -1
- package/dist/kit/components/timepicker/index.d.ts.map +0 -1
- package/dist/kit/layouts/admin/components/AdminLayout.d.ts.map +0 -1
- package/dist/kit/layouts/admin/components/ThemeToggle.d.ts.map +0 -1
- package/dist/kit/layouts/admin/hooks/menu.d.ts.map +0 -1
- package/dist/kit/layouts/admin/providers/AdminMenuProvider.d.ts.map +0 -1
- package/dist/kit/layouts/admin/types/index.d.ts.map +0 -1
- package/dist/kit/providers/ThemeProvider.d.ts.map +0 -1
- package/dist/shadcn/hooks/use-mobile.d.ts.map +0 -1
- package/dist/shadcn/lib/utils.d.ts.map +0 -1
- package/dist/shadcn/ui/accordion.d.ts.map +0 -1
- package/dist/shadcn/ui/alert-dialog.d.ts.map +0 -1
- package/dist/shadcn/ui/alert.d.ts.map +0 -1
- package/dist/shadcn/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/shadcn/ui/avatar.d.ts.map +0 -1
- package/dist/shadcn/ui/badge.d.ts.map +0 -1
- package/dist/shadcn/ui/breadcrumb.d.ts.map +0 -1
- package/dist/shadcn/ui/button.d.ts.map +0 -1
- package/dist/shadcn/ui/calendar.d.ts.map +0 -1
- package/dist/shadcn/ui/card.d.ts.map +0 -1
- package/dist/shadcn/ui/carousel.d.ts.map +0 -1
- package/dist/shadcn/ui/chart.d.ts.map +0 -1
- package/dist/shadcn/ui/checkbox.d.ts.map +0 -1
- package/dist/shadcn/ui/collapsible.d.ts.map +0 -1
- package/dist/shadcn/ui/command.d.ts.map +0 -1
- package/dist/shadcn/ui/context-menu.d.ts.map +0 -1
- package/dist/shadcn/ui/dialog.d.ts.map +0 -1
- package/dist/shadcn/ui/drawer.d.ts.map +0 -1
- package/dist/shadcn/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/shadcn/ui/form.d.ts.map +0 -1
- package/dist/shadcn/ui/hover-card.d.ts.map +0 -1
- package/dist/shadcn/ui/input-otp.d.ts.map +0 -1
- package/dist/shadcn/ui/input.d.ts.map +0 -1
- package/dist/shadcn/ui/label.d.ts.map +0 -1
- package/dist/shadcn/ui/menubar.d.ts.map +0 -1
- package/dist/shadcn/ui/navigation-menu.d.ts.map +0 -1
- package/dist/shadcn/ui/pagination.d.ts.map +0 -1
- package/dist/shadcn/ui/popover.d.ts.map +0 -1
- package/dist/shadcn/ui/progress.d.ts.map +0 -1
- package/dist/shadcn/ui/radio-group.d.ts.map +0 -1
- package/dist/shadcn/ui/resizable.d.ts.map +0 -1
- package/dist/shadcn/ui/scroll-area.d.ts.map +0 -1
- package/dist/shadcn/ui/select.d.ts.map +0 -1
- package/dist/shadcn/ui/separator.d.ts.map +0 -1
- package/dist/shadcn/ui/sheet.d.ts.map +0 -1
- package/dist/shadcn/ui/sidebar.d.ts.map +0 -1
- package/dist/shadcn/ui/skeleton.d.ts.map +0 -1
- package/dist/shadcn/ui/slider.d.ts.map +0 -1
- package/dist/shadcn/ui/sonner.d.ts.map +0 -1
- package/dist/shadcn/ui/switch.d.ts.map +0 -1
- package/dist/shadcn/ui/table.d.ts.map +0 -1
- package/dist/shadcn/ui/tabs.d.ts.map +0 -1
- package/dist/shadcn/ui/textarea.d.ts.map +0 -1
- package/dist/shadcn/ui/toggle-group.d.ts.map +0 -1
- package/dist/shadcn/ui/toggle.d.ts.map +0 -1
- package/dist/shadcn/ui/tooltip.d.ts.map +0 -1
- package/src/index.ts +0 -100
- package/src/kit/builder/auth/components/Can.tsx +0 -27
- package/src/kit/builder/auth/components/RequireAuth.tsx +0 -78
- package/src/kit/builder/auth/components/ShowWhenAuthenticated.tsx +0 -10
- package/src/kit/builder/auth/components/ShowWhenError.tsx +0 -10
- package/src/kit/builder/auth/components/ShowWhenLoading.tsx +0 -10
- package/src/kit/builder/auth/components/ShowWhenUnauthenticated.tsx +0 -10
- package/src/kit/builder/auth/components/withPermission.tsx +0 -23
- package/src/kit/builder/auth/hooks/action-hooks.ts +0 -34
- package/src/kit/builder/auth/hooks/core-hooks.ts +0 -65
- package/src/kit/builder/auth/hooks/index.ts +0 -4
- package/src/kit/builder/auth/hooks/permission-hooks.ts +0 -43
- package/src/kit/builder/auth/hooks/token-hooks.ts +0 -25
- package/src/kit/builder/auth/index.ts +0 -132
- package/src/kit/builder/auth/providers/AuthProvider.tsx +0 -131
- package/src/kit/builder/auth/types/adapter-config.ts +0 -44
- package/src/kit/builder/auth/types/adapter.ts +0 -132
- package/src/kit/builder/auth/types/core.ts +0 -27
- package/src/kit/builder/auth/types/index.ts +0 -9
- package/src/kit/builder/auth/types/middleware.ts +0 -20
- package/src/kit/builder/auth/types/permissions.ts +0 -23
- package/src/kit/builder/auth/types/state.ts +0 -16
- package/src/kit/builder/auth/types/storage.ts +0 -21
- package/src/kit/builder/auth/types/token-manager.ts +0 -9
- package/src/kit/builder/auth/types/utils.ts +0 -55
- package/src/kit/builder/auth/utils/auth-adapter.ts +0 -437
- package/src/kit/builder/auth/utils/client-adapters/apollo-link.ts +0 -30
- package/src/kit/builder/auth/utils/client-adapters/axios.ts +0 -61
- package/src/kit/builder/auth/utils/client-adapters/fetch.ts +0 -48
- package/src/kit/builder/auth/utils/client-adapters/graphql.ts +0 -60
- package/src/kit/builder/auth/utils/client-adapters/index.ts +0 -6
- package/src/kit/builder/auth/utils/client-adapters/rest.ts +0 -60
- package/src/kit/builder/auth/utils/client-adapters/urql-exchange.ts +0 -76
- package/src/kit/builder/auth/utils/permission-checker.ts +0 -150
- package/src/kit/builder/auth/utils/storage/browser.ts +0 -99
- package/src/kit/builder/auth/utils/storage/cookie.ts +0 -116
- package/src/kit/builder/auth/utils/storage/encryption.ts +0 -80
- package/src/kit/builder/auth/utils/storage/env.ts +0 -2
- package/src/kit/builder/auth/utils/storage/factory.ts +0 -37
- package/src/kit/builder/auth/utils/storage/index.ts +0 -6
- package/src/kit/builder/auth/utils/storage/memory.ts +0 -15
- package/src/kit/builder/auth/utils/token-manager.ts +0 -55
- package/src/kit/builder/data-table/components/DataTable.tsx +0 -662
- package/src/kit/builder/data-table/components/DataTableColumnHeader.tsx +0 -67
- package/src/kit/builder/data-table/components/DataTableFilterPanel.tsx +0 -160
- package/src/kit/builder/data-table/components/DataTablePagination.tsx +0 -135
- package/src/kit/builder/data-table/components/DataTableViewOptions.tsx +0 -51
- package/src/kit/builder/data-table/index.ts +0 -6
- package/src/kit/builder/data-table/types.ts +0 -44
- package/src/kit/builder/data-table/utils/dotAccessor.ts +0 -6
- package/src/kit/builder/dialog/index.ts +0 -6
- package/src/kit/builder/dialog/provider.tsx +0 -170
- package/src/kit/builder/form/components/FormBuilder.tsx +0 -333
- package/src/kit/builder/form/components/FormBuilderActions.tsx +0 -78
- package/src/kit/builder/form/components/FormBuilderContext.tsx +0 -52
- package/src/kit/builder/form/components/FormBuilderField.tsx +0 -476
- package/src/kit/builder/form/components/fields/ArrayField.tsx +0 -312
- package/src/kit/builder/form/components/fields/AutocompleteField.tsx +0 -99
- package/src/kit/builder/form/components/fields/CheckboxField.tsx +0 -78
- package/src/kit/builder/form/components/fields/DateField.tsx +0 -55
- package/src/kit/builder/form/components/fields/DatePickerField.tsx +0 -48
- package/src/kit/builder/form/components/fields/DateRangePickerField.tsx +0 -72
- package/src/kit/builder/form/components/fields/DateTimePickerField.tsx +0 -55
- package/src/kit/builder/form/components/fields/DateTimeRangePickerField.tsx +0 -65
- package/src/kit/builder/form/components/fields/FileField.tsx +0 -38
- package/src/kit/builder/form/components/fields/MonthPickerField.tsx +0 -34
- package/src/kit/builder/form/components/fields/MonthRangePickerField.tsx +0 -42
- package/src/kit/builder/form/components/fields/NumberField.tsx +0 -88
- package/src/kit/builder/form/components/fields/ObjectField.tsx +0 -35
- package/src/kit/builder/form/components/fields/RadioField.tsx +0 -48
- package/src/kit/builder/form/components/fields/SelectField.tsx +0 -47
- package/src/kit/builder/form/components/fields/SwitchField.tsx +0 -76
- package/src/kit/builder/form/components/fields/TextField.tsx +0 -26
- package/src/kit/builder/form/components/fields/TextareaField.tsx +0 -21
- package/src/kit/builder/form/components/fields/TimePickerField.tsx +0 -36
- package/src/kit/builder/form/components/fields/TimeRangePickerField.tsx +0 -44
- package/src/kit/builder/form/components/fields/index.ts +0 -21
- package/src/kit/builder/form/components/fields/types.ts +0 -18
- package/src/kit/builder/form/components/index.ts +0 -3
- package/src/kit/builder/form/components/sectionNodes.tsx +0 -148
- package/src/kit/builder/form/hooks/useFormBuilder.ts +0 -457
- package/src/kit/builder/form/index.ts +0 -4
- package/src/kit/builder/form/types.ts +0 -294
- package/src/kit/builder/form/utils/common-forms.ts +0 -68
- package/src/kit/builder/form/utils/dependencies.ts +0 -56
- package/src/kit/builder/form/utils/field-factories.ts +0 -177
- package/src/kit/builder/form/utils/index.ts +0 -17
- package/src/kit/builder/form/utils/section-factories.ts +0 -38
- package/src/kit/builder/form/utils/transformers.ts +0 -100
- package/src/kit/builder/form/utils/validations.ts +0 -22
- package/src/kit/builder/form/utils/validators.ts +0 -20
- package/src/kit/builder/page/Page.tsx +0 -205
- package/src/kit/builder/page/PageBackButton.tsx +0 -52
- package/src/kit/builder/page/index.ts +0 -1
- package/src/kit/builder/section/SectionBuilder.tsx +0 -443
- package/src/kit/builder/section/SectionContainer.tsx +0 -85
- package/src/kit/builder/section/index.ts +0 -2
- package/src/kit/builder/section/types.ts +0 -83
- package/src/kit/builder/stack-dialog/context.ts +0 -15
- package/src/kit/builder/stack-dialog/hooks.ts +0 -13
- package/src/kit/builder/stack-dialog/index.ts +0 -12
- package/src/kit/builder/stack-dialog/provider.tsx +0 -51
- package/src/kit/builder/stack-dialog/renderer.tsx +0 -36
- package/src/kit/builder/stack-dialog/types.ts +0 -34
- package/src/kit/components/autocomplete/Autocomplete.tsx +0 -732
- package/src/kit/components/autocomplete/index.ts +0 -3
- package/src/kit/components/autocomplete/types.ts +0 -27
- package/src/kit/components/data-table-headers/DataTableHeader.tsx +0 -158
- package/src/kit/components/data-table-headers/DebouncedFilterField.tsx +0 -83
- package/src/kit/components/data-table-headers/FilterFieldRenderer.tsx +0 -194
- package/src/kit/components/data-table-headers/index.ts +0 -6
- package/src/kit/components/data-table-headers/types.ts +0 -89
- package/src/kit/components/data-table-headers/urlSerialization.ts +0 -173
- package/src/kit/components/data-table-headers/useDataTableHeaderUrl.ts +0 -107
- package/src/kit/components/datepicker/DatePicker.tsx +0 -173
- package/src/kit/components/datepicker/DateRangePicker.tsx +0 -526
- package/src/kit/components/datepicker/index.ts +0 -2
- package/src/kit/components/datetimepicker/DateTimePicker.tsx +0 -420
- package/src/kit/components/datetimepicker/DateTimeRangePicker.tsx +0 -676
- package/src/kit/components/datetimepicker/index.ts +0 -2
- package/src/kit/components/fileuploader/FileUploader.tsx +0 -880
- package/src/kit/components/fileuploader/image-preprocess.ts +0 -253
- package/src/kit/components/fileuploader/index.ts +0 -4
- package/src/kit/components/fileuploader/types.ts +0 -94
- package/src/kit/components/forminfo/FormInfoError.tsx +0 -135
- package/src/kit/components/forminfo/index.ts +0 -1
- package/src/kit/components/info-tooltip/InfoTooltip.tsx +0 -18
- package/src/kit/components/keyboard/Keyboard.tsx +0 -916
- package/src/kit/components/keyboard/index.ts +0 -4
- package/src/kit/components/login/Login.tsx +0 -141
- package/src/kit/components/login/index.ts +0 -1
- package/src/kit/components/monthpicker/MonthInput.tsx +0 -131
- package/src/kit/components/monthpicker/MonthPicker.tsx +0 -224
- package/src/kit/components/monthpicker/MonthRangeInput.tsx +0 -153
- package/src/kit/components/monthpicker/MonthRangePicker.tsx +0 -409
- package/src/kit/components/numpad/Numpad.tsx +0 -377
- package/src/kit/components/numpad/index.ts +0 -4
- package/src/kit/components/timepicker/TimePicker.tsx +0 -319
- package/src/kit/components/timepicker/TimeRangePicker.tsx +0 -368
- package/src/kit/components/timepicker/index.ts +0 -2
- package/src/kit/layouts/admin/components/AdminLayout.tsx +0 -419
- package/src/kit/layouts/admin/components/ThemeToggle.tsx +0 -54
- package/src/kit/layouts/admin/hooks/menu.ts +0 -32
- package/src/kit/layouts/admin/providers/AdminMenuProvider.tsx +0 -78
- package/src/kit/layouts/admin/types/index.ts +0 -26
- package/src/kit/providers/ThemeProvider.tsx +0 -90
- package/src/kit/themes/base.css +0 -11
- package/src/kit/themes/clean-slate.css +0 -155
- package/src/kit/themes/default.css +0 -197
- package/src/kit/themes/minimal-modern.css +0 -155
- package/src/kit/themes/spotify.css +0 -164
- package/src/shadcn/hooks/use-mobile.ts +0 -21
- package/src/shadcn/lib/utils.ts +0 -6
- package/src/shadcn/ui/accordion.tsx +0 -66
- package/src/shadcn/ui/alert-dialog.tsx +0 -157
- package/src/shadcn/ui/alert.tsx +0 -66
- package/src/shadcn/ui/aspect-ratio.tsx +0 -11
- package/src/shadcn/ui/avatar.tsx +0 -53
- package/src/shadcn/ui/badge.tsx +0 -46
- package/src/shadcn/ui/breadcrumb.tsx +0 -111
- package/src/shadcn/ui/button.tsx +0 -59
- package/src/shadcn/ui/calendar.tsx +0 -217
- package/src/shadcn/ui/card.tsx +0 -92
- package/src/shadcn/ui/carousel.tsx +0 -240
- package/src/shadcn/ui/chart.tsx +0 -353
- package/src/shadcn/ui/checkbox.tsx +0 -32
- package/src/shadcn/ui/collapsible.tsx +0 -33
- package/src/shadcn/ui/command.tsx +0 -184
- package/src/shadcn/ui/context-menu.tsx +0 -252
- package/src/shadcn/ui/dialog.tsx +0 -146
- package/src/shadcn/ui/drawer.tsx +0 -135
- package/src/shadcn/ui/dropdown-menu.tsx +0 -257
- package/src/shadcn/ui/form.tsx +0 -168
- package/src/shadcn/ui/hover-card.tsx +0 -44
- package/src/shadcn/ui/input-otp.tsx +0 -77
- package/src/shadcn/ui/input.tsx +0 -21
- package/src/shadcn/ui/label.tsx +0 -24
- package/src/shadcn/ui/menubar.tsx +0 -276
- package/src/shadcn/ui/navigation-menu.tsx +0 -168
- package/src/shadcn/ui/pagination.tsx +0 -128
- package/src/shadcn/ui/popover.tsx +0 -48
- package/src/shadcn/ui/progress.tsx +0 -31
- package/src/shadcn/ui/radio-group.tsx +0 -45
- package/src/shadcn/ui/resizable.tsx +0 -56
- package/src/shadcn/ui/scroll-area.tsx +0 -58
- package/src/shadcn/ui/select.tsx +0 -185
- package/src/shadcn/ui/separator.tsx +0 -28
- package/src/shadcn/ui/sheet.tsx +0 -139
- package/src/shadcn/ui/sidebar.tsx +0 -726
- package/src/shadcn/ui/skeleton.tsx +0 -13
- package/src/shadcn/ui/slider.tsx +0 -63
- package/src/shadcn/ui/sonner.tsx +0 -37
- package/src/shadcn/ui/switch.tsx +0 -31
- package/src/shadcn/ui/table.tsx +0 -134
- package/src/shadcn/ui/tabs.tsx +0 -66
- package/src/shadcn/ui/textarea.tsx +0 -18
- package/src/shadcn/ui/toggle-group.tsx +0 -73
- package/src/shadcn/ui/toggle.tsx +0 -47
- package/src/shadcn/ui/tooltip.tsx +0 -61
- package/src/stories/FileUploader.stories.tsx +0 -185
- package/src/stories/kit/builder/DataTable.Basic.stories.tsx +0 -71
- package/src/stories/kit/builder/DataTable.Filters.stories.tsx +0 -98
- package/src/stories/kit/builder/DataTable.Pagination.stories.tsx +0 -73
- package/src/stories/kit/builder/DataTable.SelectionAndActions.stories.tsx +0 -77
- package/src/stories/kit/builder/DataTable.Sorting.stories.tsx +0 -67
- package/src/stories/kit/builder/Dialog.stories.tsx +0 -90
- package/src/stories/kit/builder/Form.ArrayLayouts.stories.tsx +0 -177
- package/src/stories/kit/builder/Form.Autocomplete.stories.tsx +0 -220
- package/src/stories/kit/builder/Form.Basic.stories.tsx +0 -79
- package/src/stories/kit/builder/Form.Complex.stories.tsx +0 -569
- package/src/stories/kit/builder/Form.DateTime.stories.tsx +0 -70
- package/src/stories/kit/builder/Form.Dynamic.stories.tsx +0 -926
- package/src/stories/kit/builder/Form.Files.stories.tsx +0 -136
- package/src/stories/kit/builder/Form.MultipleFormBuilder.stories.tsx +0 -377
- package/src/stories/kit/builder/Form.Pickers.stories.tsx +0 -75
- package/src/stories/kit/builder/Form.Simple.stories.tsx +0 -91
- package/src/stories/kit/builder/Form.Time.stories.tsx +0 -68
- package/src/stories/kit/builder/Page.stories.tsx +0 -115
- package/src/stories/kit/builder/Section.stories.tsx +0 -282
- package/src/stories/kit/components/Autocomplete.stories.tsx +0 -313
- package/src/stories/kit/components/DatePicker.stories.tsx +0 -195
- package/src/stories/kit/components/DateRangePicker.stories.tsx +0 -195
- package/src/stories/kit/components/Keyboard.stories.tsx +0 -263
- package/src/stories/kit/components/Login.stories.tsx +0 -167
- package/src/stories/kit/components/MonthPicker.stories.tsx +0 -100
- package/src/stories/kit/components/MonthRangePicker.stories.tsx +0 -117
- package/src/stories/kit/components/Numpad.stories.tsx +0 -195
- package/src/stories/kit/components/TimePicker.stories.tsx +0 -71
- package/src/stories/kit/components/TimeRangePicker.stories.tsx +0 -43
- package/src/stories/kit/layouts/admin/AdminLayout.Basic.stories.tsx +0 -118
- package/src/stories/kit/layouts/admin/AdminLayout.Collapsible.stories.tsx +0 -81
- package/src/stories/kit/layouts/admin/AdminLayout.Complex.stories.tsx +0 -251
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarHeaderComponent.stories.tsx +0 -80
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarTitleAndIcon.stories.tsx +0 -70
- package/src/stories/kit/layouts/admin/AdminLayout.HeaderSlots.stories.tsx +0 -87
- package/src/stories/shadcn/ui/Accordion.stories.tsx +0 -117
- package/src/stories/shadcn/ui/Alert.stories.tsx +0 -36
- package/src/stories/shadcn/ui/AlertDialog.stories.tsx +0 -73
- package/src/stories/shadcn/ui/AspectRatio.stories.tsx +0 -58
- package/src/stories/shadcn/ui/Avatar.stories.tsx +0 -26
- package/src/stories/shadcn/ui/Badge.stories.tsx +0 -28
- package/src/stories/shadcn/ui/Breadcrumb.stories.tsx +0 -47
- package/src/stories/shadcn/ui/Button.stories.tsx +0 -51
- package/src/stories/shadcn/ui/Calendar.stories.tsx +0 -33
- package/src/stories/shadcn/ui/Card.stories.tsx +0 -39
- package/src/stories/shadcn/ui/Carousel.stories.tsx +0 -37
- package/src/stories/shadcn/ui/Chart.stories.tsx +0 -72
- package/src/stories/shadcn/ui/Checkbox.stories.tsx +0 -64
- package/src/stories/shadcn/ui/Collapsible.stories.tsx +0 -40
- package/src/stories/shadcn/ui/Command.stories.tsx +0 -53
- package/src/stories/shadcn/ui/ContextMenu.stories.tsx +0 -67
- package/src/stories/shadcn/ui/Dialog.stories.tsx +0 -45
- package/src/stories/shadcn/ui/Drawer.stories.tsx +0 -49
- package/src/stories/shadcn/ui/DropdownMenu.stories.tsx +0 -75
- package/src/stories/shadcn/ui/Form.stories.tsx +0 -93
- package/src/stories/shadcn/ui/HoverCard.stories.tsx +0 -43
- package/src/stories/shadcn/ui/Input.stories.tsx +0 -41
- package/src/stories/shadcn/ui/InputOtp.stories.tsx +0 -39
- package/src/stories/shadcn/ui/Label.stories.tsx +0 -29
- package/src/stories/shadcn/ui/Menubar.stories.tsx +0 -87
- package/src/stories/shadcn/ui/NavigationMenu.stories.tsx +0 -78
- package/src/stories/shadcn/ui/Pagination.stories.tsx +0 -51
- package/src/stories/shadcn/ui/Popover.stories.tsx +0 -53
- package/src/stories/shadcn/ui/Progress.stories.tsx +0 -30
- package/src/stories/shadcn/ui/RadioGroup.stories.tsx +0 -31
- package/src/stories/shadcn/ui/Resizable.stories.tsx +0 -55
- package/src/stories/shadcn/ui/ScrollArea.stories.tsx +0 -84
- package/src/stories/shadcn/ui/Select.stories.tsx +0 -61
- package/src/stories/shadcn/ui/Separator.stories.tsx +0 -35
- package/src/stories/shadcn/ui/Sheet.stories.tsx +0 -48
- package/src/stories/shadcn/ui/Sidebar.stories.tsx +0 -131
- package/src/stories/shadcn/ui/Skeleton.stories.tsx +0 -23
- package/src/stories/shadcn/ui/Slider.stories.tsx +0 -21
- package/src/stories/shadcn/ui/Sonner.stories.tsx +0 -49
- package/src/stories/shadcn/ui/Switch.stories.tsx +0 -28
- package/src/stories/shadcn/ui/Table.stories.tsx +0 -374
- package/src/stories/shadcn/ui/Tabs.stories.tsx +0 -31
- package/src/stories/shadcn/ui/Textarea.stories.tsx +0 -42
- package/src/stories/shadcn/ui/Toggle.stories.tsx +0 -44
- package/src/stories/shadcn/ui/ToggleGroup.stories.tsx +0 -28
- package/src/stories/shadcn/ui/Tooltip.stories.tsx +0 -30
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -52
- package/tsconfig.spec.json +0 -38
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -93
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import { ColumnDef, ColumnFiltersState, PaginationState, Table as ReactTable, SortingState, VisibilityState } from '@tanstack/react-table';
|
|
1
|
+
import { ColumnDef, ColumnFiltersState, PaginationState, RowSelectionState, Table as ReactTable, SortingState, VisibilityState } from '@tanstack/react-table';
|
|
2
2
|
import { UseFormReturn } from 'react-hook-form';
|
|
3
3
|
import { DataTableAction, DataTableBatchAction, DataTableFiltersProp } from '../types';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
export type DataTableRowTone = 'info' | 'success' | 'warning' | 'danger';
|
|
6
|
+
/** Column meta the DataTable reads. */
|
|
7
|
+
export interface DataTableColumnMeta {
|
|
8
|
+
label?: string;
|
|
9
|
+
headerClassName?: string;
|
|
10
|
+
cellClassName?: string;
|
|
11
|
+
/** Pin the column to an edge while the table scrolls sideways. */
|
|
12
|
+
sticky?: 'left' | 'right' | false;
|
|
13
|
+
/** Distance from that edge in px, for a second or third pinned column. */
|
|
14
|
+
stickyOffset?: number;
|
|
15
|
+
}
|
|
5
16
|
export interface DataTableProps<TData, TValue> {
|
|
6
17
|
columns: ColumnDef<TData, TValue>[];
|
|
7
18
|
data: TData[];
|
|
@@ -40,6 +51,14 @@ export interface DataTableProps<TData, TValue> {
|
|
|
40
51
|
onFormFilterChange?: (values: Record<string, unknown>) => void;
|
|
41
52
|
formFilterForm?: UseFormReturn<any>;
|
|
42
53
|
selectable?: boolean;
|
|
54
|
+
/** Rows that may not be selected render a disabled checkbox. */
|
|
55
|
+
isRowSelectable?: (row: TData) => boolean;
|
|
56
|
+
/** Controlled selection, keyed by getRowId (defaults to the row index). */
|
|
57
|
+
rowSelection?: RowSelectionState;
|
|
58
|
+
onRowSelectionChange?: (next: RowSelectionState) => void;
|
|
59
|
+
getRowId?: (row: TData, index: number) => string;
|
|
60
|
+
/** Tints a whole row with a DS status tone; sticky cells keep the tint opaque. */
|
|
61
|
+
rowTone?: (row: TData) => DataTableRowTone | undefined;
|
|
43
62
|
actions?: DataTableAction[];
|
|
44
63
|
batchActions?: DataTableBatchAction<TData>[];
|
|
45
64
|
showStandardActions?: boolean;
|
|
@@ -62,5 +81,5 @@ export interface DataTableProps<TData, TValue> {
|
|
|
62
81
|
*/
|
|
63
82
|
CustomHeaderComponent?: () => React.ReactNode;
|
|
64
83
|
}
|
|
65
|
-
export declare function DataTable<TData, TValue>({ columns, data, loading, sorting, sortingState, onSortingChange, columnFilters, columnFiltersState, onColumnFiltersChange, rowCount, pagination, paginationShowPageInfo, paginationShowSelectedRowInfo, paginationShowRowsPerPageSelection, paginationShowFirstAndLastPageButton, paginationWrapperClassName, onPaginationChange, paginationState, columnVisibility, columnVisibilityState, onColumnVisibilityChange, onTable, className, emptyText, maxVisibleRows, formFilterForm, formFilters, formFilterValues, onFormFilterChange, selectable, actions, batchActions, showStandardActions, onRefresh, onRowClick, filterCollapsible, filterDefaultOpen, filterWrapper, filterTitle, filterShowActionsSeparator, CustomHeaderComponent, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export declare function DataTable<TData, TValue>({ columns, data, loading, sorting, sortingState, onSortingChange, columnFilters, columnFiltersState, onColumnFiltersChange, rowCount, pagination, paginationShowPageInfo, paginationShowSelectedRowInfo, paginationShowRowsPerPageSelection, paginationShowFirstAndLastPageButton, paginationWrapperClassName, onPaginationChange, paginationState, columnVisibility, columnVisibilityState, onColumnVisibilityChange, onTable, className, emptyText, maxVisibleRows, formFilterForm, formFilters, formFilterValues, onFormFilterChange, selectable, isRowSelectable, rowSelection: rowSelectionProp, onRowSelectionChange, getRowId, rowTone, actions, batchActions, showStandardActions, onRefresh, onRowClick, filterCollapsible, filterDefaultOpen, filterWrapper, filterTitle, filterShowActionsSeparator, CustomHeaderComponent, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
66
85
|
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
import { SaveTemplateFn, UpdateTemplateFn, UploadStandardKey, UploadTemplateOption } from './types';
|
|
3
|
+
export interface UploadWizardProps {
|
|
4
|
+
/** Saved templates the user can pick from on step 1. */
|
|
5
|
+
templates: UploadTemplateOption[];
|
|
6
|
+
/** Fields the importer needs filled in from each uploaded file. */
|
|
7
|
+
standardKeys: UploadStandardKey[];
|
|
8
|
+
saveTemplate: SaveTemplateFn;
|
|
9
|
+
updateTemplate: UpdateTemplateFn;
|
|
10
|
+
/**
|
|
11
|
+
* Fired once the user clicks the "complete" CTA on step 3 with the file +
|
|
12
|
+
* resolved template. Host wires the actual side-effect (kick off recon,
|
|
13
|
+
* import pricelist, etc.).
|
|
14
|
+
*/
|
|
15
|
+
onComplete: (input: {
|
|
16
|
+
file: File;
|
|
17
|
+
template: UploadTemplateOption;
|
|
18
|
+
/** Parsed rows already projected to the template's standard keys —
|
|
19
|
+
* lets the host submit straight to a domain mutation without
|
|
20
|
+
* re-parsing the file. */
|
|
21
|
+
rows: Record<string, string>[];
|
|
22
|
+
}) => void | Promise<void>;
|
|
23
|
+
/** Header of step 1's gradient card. */
|
|
24
|
+
uploadHeading: string;
|
|
25
|
+
/** Subheading copy on step 1. */
|
|
26
|
+
uploadSubheading: string;
|
|
27
|
+
/** Label on the source picker (e.g. "Bank source"). */
|
|
28
|
+
uploadSourceLabel: string;
|
|
29
|
+
/** Copy for the "new source" option in the source picker. */
|
|
30
|
+
newSourceLabel: string;
|
|
31
|
+
/** Wording on the bottom CTAs of step 1, varies by source state. */
|
|
32
|
+
continueLabelNew?: string;
|
|
33
|
+
continueLabelExisting?: string;
|
|
34
|
+
/** Subtitle for the required-section in step 2. */
|
|
35
|
+
requiredSubtitle?: string;
|
|
36
|
+
/** Placeholder text for the "Source name" input in step 2. */
|
|
37
|
+
sourceNamePlaceholder?: string;
|
|
38
|
+
/** Label of the step-3 primary action button (e.g. "Reconcile"). */
|
|
39
|
+
completeLabel?: string;
|
|
40
|
+
/** Optional Lucide icon for step 1's gradient card. */
|
|
41
|
+
HeaderIcon?: LucideIcon;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Generic multi-step upload wizard:
|
|
45
|
+
* 1) Upload — pick a saved template (or set up new) and drop the file.
|
|
46
|
+
* 2) Map columns — bind source-file columns to standard keys.
|
|
47
|
+
* 3) Review — preview parsed rows, then trigger the host's action.
|
|
48
|
+
*
|
|
49
|
+
* Backed by the masterdata `upload_template` table so any feature that needs
|
|
50
|
+
* per-source column mapping (recon bank, pricelist, product availability, …)
|
|
51
|
+
* shares one UX.
|
|
52
|
+
*/
|
|
53
|
+
export declare function UploadWizard({ templates, standardKeys, saveTemplate, updateTemplate, onComplete, uploadHeading, uploadSubheading, uploadSourceLabel, newSourceLabel, continueLabelNew, continueLabelExisting, requiredSubtitle, sourceNamePlaceholder, completeLabel, HeaderIcon, }: UploadWizardProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
//# sourceMappingURL=UploadWizard.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { UploadColumnMapping, UploadColumnRules, UploadStandardKey } from './types';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Raw file so the mapping step can parse it live for column suggestions. */
|
|
4
|
+
file: File;
|
|
5
|
+
/** "create" = brand-new mapping; "update" = editing an existing template. */
|
|
6
|
+
mode: "create" | "update";
|
|
7
|
+
/** Standard keys the host expects mapped (e.g. transactionDate / amount / etc.). */
|
|
8
|
+
standardKeys: UploadStandardKey[];
|
|
9
|
+
/** Pre-filled mapping when editing an existing template. */
|
|
10
|
+
initialMapping?: UploadColumnMapping;
|
|
11
|
+
/**
|
|
12
|
+
* Pre-filled developer-set per-column rules (type / format / contains /
|
|
13
|
+
* notContains / gt / gte). Loaded when editing an existing template;
|
|
14
|
+
* empty / undefined = no rules.
|
|
15
|
+
*/
|
|
16
|
+
initialRules?: UploadColumnRules;
|
|
17
|
+
/** Pre-filled name (e.g. "BNI EDC") when editing. */
|
|
18
|
+
initialName?: string;
|
|
19
|
+
/** Pre-filled header row when editing; defaults to 1. */
|
|
20
|
+
initialHeaderRow?: number | null;
|
|
21
|
+
/** Pre-filled delimiter when editing; null = auto-detect. */
|
|
22
|
+
initialDelimiter?: string | null;
|
|
23
|
+
/** Copy for the optional-section's "this section's importer can't run without these" subtitle. */
|
|
24
|
+
requiredSubtitle?: string;
|
|
25
|
+
/** Wording on the source-name field placeholder. */
|
|
26
|
+
sourceNamePlaceholder?: string;
|
|
27
|
+
onBack: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Persist the mapping (create on first save, update if editing an existing
|
|
30
|
+
* template). Stays on this step so the user can keep tweaking.
|
|
31
|
+
*/
|
|
32
|
+
onSave: (input: {
|
|
33
|
+
uploadTemplateName: string;
|
|
34
|
+
uploadTemplateKey: string;
|
|
35
|
+
headerRow: number | null;
|
|
36
|
+
delimiter: string | null;
|
|
37
|
+
columnMapping: UploadColumnMapping;
|
|
38
|
+
columnRules: UploadColumnRules;
|
|
39
|
+
}) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Move to the preview step without persisting. Useful when the user just
|
|
42
|
+
* wants a one-off look at how the mapping will land before deciding to save.
|
|
43
|
+
*/
|
|
44
|
+
onContinue: (input: {
|
|
45
|
+
uploadTemplateName: string;
|
|
46
|
+
uploadTemplateKey: string;
|
|
47
|
+
headerRow: number | null;
|
|
48
|
+
delimiter: string | null;
|
|
49
|
+
columnMapping: UploadColumnMapping;
|
|
50
|
+
columnRules: UploadColumnRules;
|
|
51
|
+
}) => void;
|
|
52
|
+
/** Disable Save while a save request is in flight. */
|
|
53
|
+
saving?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Step 2 — pick which source column maps to each standard key.
|
|
57
|
+
* Two sections: required keys (top) + optional keys (collapsible).
|
|
58
|
+
*/
|
|
59
|
+
export declare function UploadWizardMappingStep({ file, mode, standardKeys, initialMapping, initialRules, initialName, initialHeaderRow, initialDelimiter, requiredSubtitle, sourceNamePlaceholder, onBack, onSave, onContinue, saving, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=UploadWizardMappingStep.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UploadColumnMapping, UploadStandardKey } from './types';
|
|
2
|
+
interface Props {
|
|
3
|
+
fileName: string;
|
|
4
|
+
templateName: string;
|
|
5
|
+
standardKeys: UploadStandardKey[];
|
|
6
|
+
columnMapping: UploadColumnMapping;
|
|
7
|
+
/** Preview rows parsed in the browser from the uploaded file. */
|
|
8
|
+
previewRows: Record<string, string | number>[];
|
|
9
|
+
/** True while the file is still being read. */
|
|
10
|
+
parsing?: boolean;
|
|
11
|
+
/** True when the file format can't be previewed in the browser (.xlsx). */
|
|
12
|
+
unsupported?: boolean;
|
|
13
|
+
/** Label on the primary action button (e.g. "Reconcile", "Import"). */
|
|
14
|
+
completeLabel?: string;
|
|
15
|
+
/** True while the submit action (upload + create) is in flight. */
|
|
16
|
+
busy?: boolean;
|
|
17
|
+
/** Label shown on the primary button while busy (e.g. "Uploading…"). */
|
|
18
|
+
busyLabel?: string;
|
|
19
|
+
onBack: () => void;
|
|
20
|
+
onDone: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Step 3 — confirm what was parsed before kicking off the actual action.
|
|
24
|
+
*/
|
|
25
|
+
export declare function UploadWizardPreviewStep({ fileName, templateName, standardKeys, columnMapping, previewRows, parsing, unsupported, completeLabel, busy, busyLabel, onBack, onDone, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=UploadWizardPreviewStep.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** What the import creates, e.g. "purchase order" / "transfer request". */
|
|
3
|
+
entityLabel: string;
|
|
4
|
+
status: string | null;
|
|
5
|
+
processed: number;
|
|
6
|
+
total: number;
|
|
7
|
+
message?: string | null;
|
|
8
|
+
/** True while still polling (job not terminal yet). */
|
|
9
|
+
running: boolean;
|
|
10
|
+
onViewResults: () => void;
|
|
11
|
+
onBack: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function UploadWizardResultStep({ entityLabel, status, processed, total, message, running, onViewResults, onBack, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=UploadWizardResultStep.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
import { UploadTemplateOption } from './types';
|
|
3
|
+
interface Props {
|
|
4
|
+
templates: UploadTemplateOption[];
|
|
5
|
+
/** File kept by the container so it survives back-navigation from later steps. */
|
|
6
|
+
file: File | null;
|
|
7
|
+
onFileChange: (file: File | null) => void;
|
|
8
|
+
/** Selected template ID (empty string = "+ New source"). Lifted to container. */
|
|
9
|
+
selectedID: string;
|
|
10
|
+
onSelectedIDChange: (id: string) => void;
|
|
11
|
+
onContinue: (input: {
|
|
12
|
+
file: File;
|
|
13
|
+
template: UploadTemplateOption | null;
|
|
14
|
+
}) => void;
|
|
15
|
+
/** Optional Back CTA — shown when this step is reached from an earlier
|
|
16
|
+
* domain-specific step (e.g. recon-bank's "Bank & Period"). The default
|
|
17
|
+
* generic wizard starts here so it leaves this unset. */
|
|
18
|
+
onBack?: () => void;
|
|
19
|
+
/** Wording overrides — let each host explain its own upload context. */
|
|
20
|
+
heading: string;
|
|
21
|
+
subheading: string;
|
|
22
|
+
sourceLabel: string;
|
|
23
|
+
newSourceLabel: string;
|
|
24
|
+
sourcePickerHintNew?: string;
|
|
25
|
+
sourcePickerHintExisting?: string;
|
|
26
|
+
/** Lucide icon shown in the gradient header. Defaults to a generic upload icon. */
|
|
27
|
+
HeaderIcon?: LucideIcon;
|
|
28
|
+
/** Label on the primary CTA — varies if the user already picked a saved template. */
|
|
29
|
+
continueLabelNew?: string;
|
|
30
|
+
continueLabelExisting?: string;
|
|
31
|
+
/** When true, the primary CTA is disabled and shows a busy label — used by
|
|
32
|
+
* hosts that upload the file as part of "Continue" (e.g. recon-bank). */
|
|
33
|
+
busy?: boolean;
|
|
34
|
+
/** Label shown on the CTA while busy. */
|
|
35
|
+
busyLabel?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Step 1 — pick a saved source (or "+ New source") and drop the file.
|
|
39
|
+
* Modern landing card with the upload area front-and-center.
|
|
40
|
+
*/
|
|
41
|
+
export declare function UploadWizardUploadStep({ templates, file, onFileChange, selectedID, onSelectedIDChange, onContinue, onBack, heading, subheading, sourceLabel, newSourceLabel, sourcePickerHintNew, sourcePickerHintExisting, HeaderIcon, continueLabelNew, continueLabelExisting, busy, busyLabel, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=UploadWizardUploadStep.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { UploadWizard, type UploadWizardProps } from './UploadWizard';
|
|
2
|
+
export { UploadWizardUploadStep } from './UploadWizardUploadStep';
|
|
3
|
+
export { UploadWizardMappingStep } from './UploadWizardMappingStep';
|
|
4
|
+
export { UploadWizardPreviewStep } from './UploadWizardPreviewStep';
|
|
5
|
+
export { UploadWizardResultStep } from './UploadWizardResultStep';
|
|
6
|
+
export { fetchFilePreview, projectRowsToStandardKeys, setUploadWizardPreviewBaseURL, useFilePreview, } from './useFilePreview';
|
|
7
|
+
export type { SaveTemplateFn, UpdateTemplateFn, UploadColumnMapping, UploadColumnRule, UploadColumnRules, UploadStandardKey, UploadTemplateOption, UploadTemplateSaveInput, UploadTemplateUpdateInput, } from './types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One field the downstream importer needs from every uploaded file. The wizard
|
|
3
|
+
* shows these in two groups (required first, optional collapsible) and the
|
|
4
|
+
* user picks which source-file column maps to each.
|
|
5
|
+
*/
|
|
6
|
+
export interface UploadStandardKey {
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
required: boolean;
|
|
10
|
+
hint?: string;
|
|
11
|
+
includeInTemplate?: boolean;
|
|
12
|
+
templateNote?: string;
|
|
13
|
+
containsPlaceholder?: string;
|
|
14
|
+
notContainsPlaceholder?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Standard-key → source-file column header. */
|
|
17
|
+
export type UploadColumnMapping = Record<string, string>;
|
|
18
|
+
/**
|
|
19
|
+
* Optional developer-set rules attached to a mapped column. The downstream
|
|
20
|
+
* importer reads `type` to decide which other fields apply:
|
|
21
|
+
* - "date" → uses `format`
|
|
22
|
+
* - "text" → uses `contains` / `notContains`
|
|
23
|
+
* - "number" → uses `gt` / `gte`
|
|
24
|
+
* Cleared rules drop the row; the wizard exposes these through a per-row
|
|
25
|
+
* collapsible editor in the mapping step.
|
|
26
|
+
*/
|
|
27
|
+
export interface UploadColumnRule {
|
|
28
|
+
type?: "date" | "text" | "number";
|
|
29
|
+
format?: string;
|
|
30
|
+
contains?: string[];
|
|
31
|
+
notContains?: string[];
|
|
32
|
+
gt?: number;
|
|
33
|
+
gte?: number;
|
|
34
|
+
/** Recon amount keys only: extra source columns summed (absolute values) into this key. */
|
|
35
|
+
sumColumns?: string[];
|
|
36
|
+
}
|
|
37
|
+
/** Standard-key → optional per-column rule. */
|
|
38
|
+
export type UploadColumnRules = Record<string, UploadColumnRule>;
|
|
39
|
+
/**
|
|
40
|
+
* A saved upload template (one row in the masterdata `upload_template` table).
|
|
41
|
+
*
|
|
42
|
+
* `headerRow` is 1-based; null means positional (no header row).
|
|
43
|
+
* `delimiter` is the CSV delimiter character; null = auto-detect. Ignored for
|
|
44
|
+
* .xlsx files.
|
|
45
|
+
*/
|
|
46
|
+
export interface UploadTemplateOption {
|
|
47
|
+
uploadTemplateID: string;
|
|
48
|
+
uploadTemplateKey: string;
|
|
49
|
+
uploadTemplateName: string;
|
|
50
|
+
headerRow: number | null;
|
|
51
|
+
delimiter: string | null;
|
|
52
|
+
columnMapping: UploadColumnMapping;
|
|
53
|
+
/**
|
|
54
|
+
* Developer-set per-column rules persisted alongside the source picker
|
|
55
|
+
* in the same column_mapping JSONB entry. End users never edit this
|
|
56
|
+
* through the wizard — it's set up once per template by devs/devops.
|
|
57
|
+
*/
|
|
58
|
+
columnRules?: UploadColumnRules;
|
|
59
|
+
/**
|
|
60
|
+
* Generic, flow-specific set of domain-entity ids this template applies to,
|
|
61
|
+
* letting a wizard auto-select it once one of those entities is picked. A
|
|
62
|
+
* template can serve many entities (e.g. bank_recon: one EDC layout shared
|
|
63
|
+
* by several bank accounts). The meaning of each id is owned by the host
|
|
64
|
+
* flow; the wizard treats them as opaque. Empty when the template is unscoped.
|
|
65
|
+
*/
|
|
66
|
+
referenceIDs?: string[] | null;
|
|
67
|
+
}
|
|
68
|
+
/** Input shape passed back to the host when the user saves a new mapping. */
|
|
69
|
+
export interface UploadTemplateSaveInput {
|
|
70
|
+
uploadTemplateKey: string;
|
|
71
|
+
uploadTemplateName: string;
|
|
72
|
+
headerRow: number | null;
|
|
73
|
+
delimiter: string | null;
|
|
74
|
+
columnMapping: UploadColumnMapping;
|
|
75
|
+
columnRules?: UploadColumnRules;
|
|
76
|
+
/** Opaque, flow-specific ids to bind this template to (see UploadTemplateOption). */
|
|
77
|
+
referenceIDs?: string[] | null;
|
|
78
|
+
}
|
|
79
|
+
/** Input shape passed back when the user edits an existing template. */
|
|
80
|
+
export interface UploadTemplateUpdateInput extends UploadTemplateSaveInput {
|
|
81
|
+
uploadTemplateID: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Saves a brand-new template. Implementations should resolve with the persisted
|
|
85
|
+
* record (so the wizard can keep using the BE-assigned ID) or reject — the
|
|
86
|
+
* wizard renders the rejection's message via toast.
|
|
87
|
+
*/
|
|
88
|
+
export type SaveTemplateFn = (input: UploadTemplateSaveInput) => Promise<UploadTemplateOption>;
|
|
89
|
+
/** Updates an existing template. Same resolve/reject contract as save. */
|
|
90
|
+
export type UpdateTemplateFn = (input: UploadTemplateUpdateInput) => Promise<UploadTemplateOption>;
|
|
91
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { UploadColumnMapping } from './types';
|
|
2
|
+
export interface FilePreviewConfig {
|
|
3
|
+
/** 1-based row holding the column headers. null = positional (no header). */
|
|
4
|
+
headerRow: number | null;
|
|
5
|
+
/** CSV delimiter; null = auto-detect. Ignored for .xlsx. */
|
|
6
|
+
delimiter: string | null;
|
|
7
|
+
/** How many data rows to fetch. */
|
|
8
|
+
maxRows?: number;
|
|
9
|
+
/** How many raw rows the UI's "first N lines" pane should receive. */
|
|
10
|
+
maxSnippetRows?: number;
|
|
11
|
+
}
|
|
12
|
+
interface ParsedPreview {
|
|
13
|
+
/** Column names as read from the file (header text, or "Column N" for positional). */
|
|
14
|
+
columns: string[];
|
|
15
|
+
/** First N data rows, keyed by source column label. */
|
|
16
|
+
rows: Record<string, string>[];
|
|
17
|
+
/** First N raw rows, pre-split into cells by the BE — for header detection UI. */
|
|
18
|
+
snippetRows: string[][];
|
|
19
|
+
/** True while the request is in flight. */
|
|
20
|
+
parsing: boolean;
|
|
21
|
+
/** Set when the file format can't be parsed by the BE (anything not csv/xlsx). */
|
|
22
|
+
unsupported: boolean;
|
|
23
|
+
/** Set when the request failed. */
|
|
24
|
+
error: string | null;
|
|
25
|
+
}
|
|
26
|
+
/** The app sets the file-service base URL once at start; the wizard posts previews there. */
|
|
27
|
+
export declare const setUploadWizardPreviewBaseURL: (baseURL: string | null | undefined) => void;
|
|
28
|
+
type FilePreviewResult = Omit<ParsedPreview, "parsing" | "error">;
|
|
29
|
+
/** One preview round-trip (no debounce/state) — also used to sniff a file's header for template auto-detect. */
|
|
30
|
+
export declare const fetchFilePreview: (file: File, config: FilePreviewConfig, signal?: AbortSignal) => Promise<FilePreviewResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Ship the uploaded file to the masterdata preview endpoint and return the
|
|
33
|
+
* parsed columns, rows, and raw snippet rows.
|
|
34
|
+
*
|
|
35
|
+
* Why BE-side instead of in-browser parsing?
|
|
36
|
+
* - csv + xlsx share one parser with the actual recon/import pipeline
|
|
37
|
+
* - no FE bundle hit from a heavy xlsx library
|
|
38
|
+
* - header-detection + delimiter logic stays in one place
|
|
39
|
+
*
|
|
40
|
+
* Requests are debounced ({@link DEBOUNCE_MS}) and the previous in-flight
|
|
41
|
+
* request is aborted when the user nudges headerRow / delimiter rapidly.
|
|
42
|
+
*/
|
|
43
|
+
export declare const useFilePreview: (file: File | null, config: FilePreviewConfig | null) => ParsedPreview;
|
|
44
|
+
/**
|
|
45
|
+
* Project parsed source rows into the standard-key shape the preview table
|
|
46
|
+
* consumes — { transactionDate, amount, ... } using the template's mapping.
|
|
47
|
+
*/
|
|
48
|
+
export declare const projectRowsToStandardKeys: (rows: Record<string, string>[], mapping: UploadColumnMapping) => Record<string, string>[];
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=useFilePreview.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type DescriptionListItem = {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value?: React.ReactNode;
|
|
5
|
+
mono?: boolean;
|
|
6
|
+
muted?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type DescriptionListProps = {
|
|
9
|
+
/** Items with an undefined, null or false value are skipped. */
|
|
10
|
+
items: DescriptionListItem[];
|
|
11
|
+
/** `rows` = label left, value right (DS DescriptionList). `grid` = label above value, up to 4 columns (detail header). */
|
|
12
|
+
layout?: 'rows' | 'grid';
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/** Read-only facts about one record (K3Core DS DescriptionList). */
|
|
16
|
+
export declare function DescriptionList({ items, layout, className }: DescriptionListProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=DescriptionList.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type EmptyStateProps = {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
hint?: React.ReactNode;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
/** Dashed box for an empty drop or add area, instead of a top divider. */
|
|
7
|
+
dashed?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/** Centered empty / no-results block for cards and lists outside DataTable (K3Core DS EmptyState). */
|
|
12
|
+
export declare function EmptyState({ title, hint, icon, dashed, className, children }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
declare const TONE_CLASS: {
|
|
3
|
+
readonly green: {
|
|
4
|
+
readonly card: "bg-success-bg border-success-bd";
|
|
5
|
+
readonly chip: "text-success-fg bg-[color-mix(in_srgb,var(--success-fg)_16%,transparent)]";
|
|
6
|
+
readonly ink: "text-success-fg";
|
|
7
|
+
};
|
|
8
|
+
readonly amber: {
|
|
9
|
+
readonly card: "bg-warning-bg border-warning-bd";
|
|
10
|
+
readonly chip: "text-warning-fg bg-[color-mix(in_srgb,var(--warning-fg)_16%,transparent)]";
|
|
11
|
+
readonly ink: "text-warning-fg";
|
|
12
|
+
};
|
|
13
|
+
readonly blue: {
|
|
14
|
+
readonly card: "bg-info-bg border-info-bd";
|
|
15
|
+
readonly chip: "text-info-fg bg-[color-mix(in_srgb,var(--info-fg)_16%,transparent)]";
|
|
16
|
+
readonly ink: "text-info-fg";
|
|
17
|
+
};
|
|
18
|
+
readonly red: {
|
|
19
|
+
readonly card: "bg-danger-bg border-danger-bd";
|
|
20
|
+
readonly chip: "text-danger-fg bg-[color-mix(in_srgb,var(--danger-fg)_16%,transparent)]";
|
|
21
|
+
readonly ink: "text-danger-fg";
|
|
22
|
+
};
|
|
23
|
+
readonly teal: {
|
|
24
|
+
readonly card: "bg-teal-bg border-[color-mix(in_srgb,var(--teal-fg)_24%,transparent)]";
|
|
25
|
+
readonly chip: "text-teal-fg bg-[color-mix(in_srgb,var(--teal-fg)_16%,transparent)]";
|
|
26
|
+
readonly ink: "text-teal-fg";
|
|
27
|
+
};
|
|
28
|
+
readonly pink: {
|
|
29
|
+
readonly card: "bg-pink-bg border-[color-mix(in_srgb,var(--pink-fg)_24%,transparent)]";
|
|
30
|
+
readonly chip: "text-pink-fg bg-[color-mix(in_srgb,var(--pink-fg)_16%,transparent)]";
|
|
31
|
+
readonly ink: "text-pink-fg";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type StatCardTone = keyof typeof TONE_CLASS;
|
|
35
|
+
export type StatCardProps = {
|
|
36
|
+
label: React.ReactNode;
|
|
37
|
+
value?: React.ReactNode;
|
|
38
|
+
tone?: StatCardTone;
|
|
39
|
+
icon?: React.ReactNode;
|
|
40
|
+
loading?: boolean;
|
|
41
|
+
mono?: boolean;
|
|
42
|
+
className?: string;
|
|
43
|
+
};
|
|
44
|
+
/** Soft-tinted metric tile: icon chip, label, large value (K3Core DS StatCard). */
|
|
45
|
+
export declare function StatCard({ label, value, tone, icon, loading, mono, className }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
/** Responsive row of stat cards: 2 columns in a narrow space, 4 when there is room. */
|
|
47
|
+
export declare function StatCardGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=StatCard.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Button } from '../../../shadcn/ui/button';
|
|
2
|
+
import { DataTableAction } from '../../builder/data-table/types';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
declare const FILE_ACTION: {
|
|
5
|
+
readonly import: {
|
|
6
|
+
readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
7
|
+
readonly label: "Import";
|
|
8
|
+
readonly busy: "Importing…";
|
|
9
|
+
};
|
|
10
|
+
readonly export: {
|
|
11
|
+
readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
12
|
+
readonly label: "Export";
|
|
13
|
+
readonly busy: "Exporting…";
|
|
14
|
+
};
|
|
15
|
+
readonly template: {
|
|
16
|
+
readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
readonly label: "Download Template";
|
|
18
|
+
readonly busy: "Downloading…";
|
|
19
|
+
};
|
|
20
|
+
readonly download: {
|
|
21
|
+
readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
22
|
+
readonly label: "Download";
|
|
23
|
+
readonly busy: "Downloading…";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type FileActionKind = keyof typeof FILE_ACTION;
|
|
27
|
+
export interface FileActionButtonProps extends React.ComponentProps<typeof Button> {
|
|
28
|
+
kind: FileActionKind;
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Import / Export / Download Template / Download button with the standard icon and label. */
|
|
32
|
+
export declare function FileActionButton({ kind, loading, children, disabled, variant, ...props }: FileActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
/** DataTable toolbar action with the standard icon and label for a file action. */
|
|
34
|
+
export declare function fileAction(kind: FileActionKind, action: Omit<DataTableAction, 'icon'> & {
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
}): DataTableAction;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=FileAction.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FileUploaderProps } from './types';
|
|
2
|
-
export declare function FileUploader({ value, defaultValue, onChange, uploader, transformFile, onUploadSuccess, onUploadError, onRemove, withRetry, onRetry, onRetryAll, multiple, maxFiles, accept, layout, disabled, enableBackgroundRemoval, defaultBackgroundRemovalEnabled, withDownload, withImagePreview, placeholder, className, dataTestID }: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function FileUploader({ value, defaultValue, onChange, uploader, transformFile, onUploadSuccess, onUploadError, onRemove, withRetry, onRetry, onRetryAll, multiple, maxFiles, accept, layout, disabled, enableBackgroundRemoval, defaultBackgroundRemovalEnabled, withDownload, withImagePreview, placeholder, hint, className, dataTestID }: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default FileUploader;
|
|
4
4
|
//# sourceMappingURL=FileUploader.d.ts.map
|
|
@@ -71,6 +71,8 @@ export type FileUploaderProps = {
|
|
|
71
71
|
withImagePreview?: boolean;
|
|
72
72
|
/** Optional label or placeholder for the dropzone */
|
|
73
73
|
placeholder?: string;
|
|
74
|
+
/** Small line under the dropzone title, e.g. "PNG, JPG or PDF up to 10MB". */
|
|
75
|
+
hint?: string;
|
|
74
76
|
/** Additional className */
|
|
75
77
|
className?: string;
|
|
76
78
|
dataTestID?: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProgressTone } from '../../../shadcn/ui/progress';
|
|
2
|
+
export interface ImportProgressProps {
|
|
3
|
+
processed?: number | null;
|
|
4
|
+
total?: number | null;
|
|
5
|
+
tone?: ProgressTone;
|
|
6
|
+
/** Left label above the bar; omit to hide the label row's left side. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Text after the count, e.g. "created". */
|
|
9
|
+
unit?: string;
|
|
10
|
+
/** Compact: thin bar with the count below it (table cells). */
|
|
11
|
+
size?: 'sm' | 'md';
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Progress of a background job (import, generate): count, percent and bar. */
|
|
15
|
+
export declare function ImportProgress({ processed, total, tone, label, unit, size, className, }: ImportProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=ImportProgress.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface InfoTipProps {
|
|
2
|
+
text: React.ReactNode;
|
|
3
|
+
/** Field name, used for the icon button's accessible name. */
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function InfoTip({ text, label }: InfoTipProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=InfoTip.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface LoadingOverlayProps {
|
|
3
|
+
/** Short status, e.g. "Saving…". */
|
|
4
|
+
message?: React.ReactNode;
|
|
5
|
+
/** panel: spinner and text on a card; bare: on the dimmed page only. */
|
|
6
|
+
variant?: 'panel' | 'bare';
|
|
7
|
+
}
|
|
8
|
+
export declare function LoadingOverlay({ message, variant }: LoadingOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=LoadingOverlay.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ProductCellProps {
|
|
2
|
+
/** Internal SKU, shown in the tooltip of the barcode line. */
|
|
3
|
+
productCode?: string | null;
|
|
4
|
+
productName?: string | null;
|
|
5
|
+
/** Scanned code shown on the first line (DS "code"). */
|
|
6
|
+
barcode?: string | null;
|
|
7
|
+
isConsignment?: boolean | null;
|
|
8
|
+
/** DS tint: blue by default, green for confirmed/scanned rows. */
|
|
9
|
+
tone?: 'default' | 'success';
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function ProductCell({ productCode, productName, barcode, isConsignment, tone, className }: ProductCellProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ProductCell.d.ts.map
|