@ostack.tech/ui-kform 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/en-C1hDoCmB.js.map +1 -1
- package/dist/locales/en-GB.js.map +1 -1
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/ostack-ui-kform.js +5176 -5176
- package/dist/ostack-ui-kform.js.map +1 -1
- package/dist/types/components/Annexes/Annex.d.ts +5 -5
- package/dist/types/components/Annexes/AnnexTab.d.ts +1 -1
- package/dist/types/components/Annexes/Annexes.d.ts +4 -4
- package/dist/types/components/Annexes/AnnexesContext.d.ts +5 -5
- package/dist/types/components/Annexes/AnnexesManager.d.ts +3 -3
- package/dist/types/components/Annexes/AnnexesMenu.d.ts +3 -3
- package/dist/types/components/Annexes/AnnexesTabList.d.ts +3 -3
- package/dist/types/components/Annexes/index.d.ts +3 -3
- package/dist/types/components/CheckboxControl/CheckboxControl.d.ts +6 -6
- package/dist/types/components/CheckboxControl/index.d.ts +1 -1
- package/dist/types/components/CheckboxGroupControl/CheckboxGroupControl.d.ts +6 -6
- package/dist/types/components/CheckboxGroupControl/index.d.ts +1 -1
- package/dist/types/components/ControlField/ControlField.d.ts +4 -4
- package/dist/types/components/ControlField/ControlFieldContext.d.ts +4 -4
- package/dist/types/components/ControlField/index.d.ts +2 -2
- package/dist/types/components/DateControl/DateControl.d.ts +6 -6
- package/dist/types/components/DateControl/index.d.ts +1 -1
- package/dist/types/components/DateRangeControl/DateRangeControl.d.ts +6 -6
- package/dist/types/components/DateRangeControl/index.d.ts +1 -1
- package/dist/types/components/FileControl/FileControl.d.ts +6 -6
- package/dist/types/components/FileControl/index.d.ts +1 -1
- package/dist/types/components/FormApp/FormApp.d.ts +8 -8
- package/dist/types/components/FormApp/FormAppContext.d.ts +7 -7
- package/dist/types/components/FormApp/FormAppElement.d.ts +3 -3
- package/dist/types/components/FormApp/FormAppIssueMessages.d.ts +3 -3
- package/dist/types/components/FormApp/FormAppStatus.d.ts +1 -1
- package/dist/types/components/FormApp/index.d.ts +4 -4
- package/dist/types/components/FormPages/FormPage.d.ts +6 -6
- package/dist/types/components/FormPages/FormPageHeader.d.ts +3 -3
- package/dist/types/components/FormPages/FormPageSidebarItem.d.ts +1 -1
- package/dist/types/components/FormPages/FormPages.d.ts +3 -3
- package/dist/types/components/FormPages/FormPagesContext.d.ts +5 -5
- package/dist/types/components/FormPages/FormPagesNavigation.d.ts +4 -4
- package/dist/types/components/FormPages/FormPagesSelect.d.ts +3 -3
- package/dist/types/components/FormPages/FormPagesSelectOption.d.ts +1 -1
- package/dist/types/components/FormPages/FormPagesSidebar.d.ts +2 -2
- package/dist/types/components/FormPages/index.d.ts +3 -3
- package/dist/types/components/FormStepper/FormStep.d.ts +1 -1
- package/dist/types/components/FormStepper/FormStepContent.d.ts +4 -4
- package/dist/types/components/FormStepper/FormStepList.d.ts +3 -3
- package/dist/types/components/FormStepper/FormStepper.d.ts +4 -4
- package/dist/types/components/FormStepper/FormStepperContext.d.ts +5 -5
- package/dist/types/components/FormStepper/index.d.ts +3 -3
- package/dist/types/components/IssueAlert/IssueAlert.d.ts +4 -4
- package/dist/types/components/IssueAlert/index.d.ts +1 -1
- package/dist/types/components/IssueMessage/IssueMessage.d.ts +2 -2
- package/dist/types/components/IssueMessage/index.d.ts +1 -1
- package/dist/types/components/IssueMessages/IssueMessages.d.ts +4 -4
- package/dist/types/components/IssueMessages/index.d.ts +1 -1
- package/dist/types/components/IssuesPanel/IssuesPanel.d.ts +4 -4
- package/dist/types/components/IssuesPanel/IssuesPanelControls.d.ts +4 -4
- package/dist/types/components/IssuesPanel/IssuesPanelMessagesCard.d.ts +6 -6
- package/dist/types/components/IssuesPanel/IssuesPanelSummaryCard.d.ts +5 -5
- package/dist/types/components/IssuesPanel/index.d.ts +1 -1
- package/dist/types/components/IssuesPopover/IssuesPopover.d.ts +4 -4
- package/dist/types/components/IssuesPopover/index.d.ts +1 -1
- package/dist/types/components/LoadAction/LoadAction.d.ts +3 -3
- package/dist/types/components/LoadAction/index.d.ts +1 -1
- package/dist/types/components/NumericControl/NumericControl.d.ts +6 -6
- package/dist/types/components/NumericControl/index.d.ts +1 -1
- package/dist/types/components/PathLink/PathLink.d.ts +3 -3
- package/dist/types/components/PathLink/index.d.ts +1 -1
- package/dist/types/components/RadioGroupControl/RadioGroupControl.d.ts +6 -6
- package/dist/types/components/RadioGroupControl/index.d.ts +1 -1
- package/dist/types/components/SaveAction/SaveAction.d.ts +3 -3
- package/dist/types/components/SaveAction/index.d.ts +1 -1
- package/dist/types/components/SelectControl/SelectControl.d.ts +7 -7
- package/dist/types/components/SelectControl/index.d.ts +1 -1
- package/dist/types/components/SelectMultipleControl/SelectMultipleControl.d.ts +7 -7
- package/dist/types/components/SelectMultipleControl/index.d.ts +1 -1
- package/dist/types/components/SubmitAction/SubmitAction.d.ts +4 -4
- package/dist/types/components/SubmitAction/index.d.ts +1 -1
- package/dist/types/components/TableControl/TableControl.d.ts +8 -8
- package/dist/types/components/TableControl/TableControlAddRowTrigger.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlApi.d.ts +4 -4
- package/dist/types/components/TableControl/TableControlCell.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlColumn.d.ts +4 -4
- package/dist/types/components/TableControl/TableControlContent.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlContext.d.ts +7 -7
- package/dist/types/components/TableControl/TableControlPagination.d.ts +1 -1
- package/dist/types/components/TableControl/TableControlRemoveRowTrigger.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlRow.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlRowsPerPage.d.ts +1 -1
- package/dist/types/components/TableControl/index.d.ts +8 -8
- package/dist/types/components/TextControl/TextControl.d.ts +6 -6
- package/dist/types/components/TextControl/index.d.ts +1 -1
- package/dist/types/components/TopBar/TopBar.d.ts +2 -2
- package/dist/types/components/TopBar/TopBarActions.d.ts +3 -3
- package/dist/types/components/TopBar/index.d.ts +2 -2
- package/dist/types/components/ValidateAction/ValidateAction.d.ts +2 -2
- package/dist/types/components/ValidateAction/index.d.ts +1 -1
- package/dist/types/index.d.ts +36 -36
- package/dist/types/locales/en-GB.d.ts +1 -1
- package/dist/types/locales/en-US.d.ts +1 -1
- package/dist/types/locales/en.d.ts +1 -1
- package/dist/types/locales/fr.d.ts +1 -1
- package/dist/types/locales/index.d.ts +4 -4
- package/dist/types/locales/pt.d.ts +1 -1
- package/dist/types/providers/LocalizationProvider/LocalizationContext.d.ts +2 -2
- package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +14 -14
- package/dist/types/providers/LocalizationProvider/LocalizationProvider.d.ts +3 -3
- package/dist/types/providers/LocalizationProvider/index.d.ts +4 -4
- package/dist/types/providers/LocalizationProvider/useLocale.d.ts +1 -1
- package/dist/types/providers/PrefixSuffixProvider/PrefixSuffixContext.d.ts +1 -1
- package/dist/types/providers/PrefixSuffixProvider/PrefixSuffixProvider.d.ts +2 -2
- package/dist/types/providers/PrefixSuffixProvider/defaultPrefixSuffix.d.ts +1 -1
- package/dist/types/providers/PrefixSuffixProvider/index.d.ts +4 -4
- package/dist/types/providers/PrefixSuffixProvider/usePrefix.d.ts +1 -1
- package/dist/types/utils/dateRestrictions.d.ts +2 -2
- package/dist/types/utils/displayStatusConversions.d.ts +2 -2
- package/dist/types/utils/mostSpecificPath.d.ts +1 -1
- package/dist/types/utils/options.d.ts +2 -2
- package/dist/types/utils/pathSpecificity.d.ts +1 -1
- package/dist/types/utils/selectionTransformations.d.ts +4 -4
- package/dist/types/utils/useControlAutofocus.d.ts +2 -2
- package/dist/types/utils/useControlIssues.d.ts +3 -3
- package/dist/types/utils/useFormLoader.d.ts +3 -3
- package/dist/types/utils/useFormSaver.d.ts +3 -3
- package/dist/types/utils/useRegisterControl.d.ts +3 -3
- package/dist/types/utils/useReportValidationFailures.d.ts +1 -1
- package/dist/types/utils/useTemporalStringTransformer.d.ts +3 -3
- package/package.json +8 -23
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Input, TextArea } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Path } from '@ostack.tech/kform';
|
|
2
|
+
import { InputController, InputOptions } from '@ostack.tech/kform-react';
|
|
3
|
+
import { Input, TextArea } from '@ostack.tech/ui';
|
|
4
|
+
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ComponentRef, ReactNode, Ref } from 'react';
|
|
5
|
+
import { IssueMessages, IssueMessagesByCode } from '../IssueMessages';
|
|
6
6
|
/** Properties of the text control component. */
|
|
7
7
|
export type TextControlProps<T extends string | null = string | null> = TextControlPropsSingleline<T> | TextControlPropsMultiline<T>;
|
|
8
8
|
export type TextControlPropsSingleline<T extends string | null = string | null> = Omit<ComponentPropsWithoutRef<typeof Input>, "defaultValue" | "value" | "status"> & TextControlPropsBase<T> & {
|
|
@@ -63,4 +63,4 @@ export type TextControlPropsBase<T extends string | null = string | null> = Omit
|
|
|
63
63
|
* The component further supports either single or multiple lines via the
|
|
64
64
|
* `multiline` prop.
|
|
65
65
|
*/
|
|
66
|
-
export declare const TextControl: import(
|
|
66
|
+
export declare const TextControl: import('react').ForwardRefExoticComponent<TextControlProps<string | null> & import('react').RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './TextControl.tsx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
/** Properties of the top bar component. */
|
|
3
3
|
export interface TopBarProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
}
|
|
5
5
|
/** Top bar component. */
|
|
6
|
-
export declare const TopBar: import(
|
|
6
|
+
export declare const TopBar: import('react').ForwardRefExoticComponent<TopBarProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Stack } from
|
|
2
|
-
import {
|
|
1
|
+
import { Stack } from '@ostack.tech/ui';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
/** Properties of the top bar actions component. */
|
|
4
4
|
export interface TopBarActionsProps extends ComponentPropsWithoutRef<typeof Stack> {
|
|
5
5
|
}
|
|
6
6
|
/** Container used to display actions within the top bar. */
|
|
7
|
-
export declare const TopBarActions: import(
|
|
7
|
+
export declare const TopBarActions: import('react').ForwardRefExoticComponent<TopBarActionsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './TopBar.tsx';
|
|
2
|
+
export * from './TopBarActions.tsx';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ButtonProps } from '@ostack.tech/ui';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
/** Properties of the validate action. */
|
|
4
4
|
export interface ValidateActionProps extends Omit<ButtonProps, "children"> {
|
|
5
5
|
/** Action's label. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './ValidateAction.tsx';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
1
|
+
export * from './locales';
|
|
2
|
+
export * from './components/Annexes';
|
|
3
|
+
export * from './components/CheckboxControl';
|
|
4
|
+
export * from './components/CheckboxGroupControl';
|
|
5
|
+
export * from './components/ControlField';
|
|
6
|
+
export * from './components/DateControl';
|
|
7
|
+
export * from './components/DateRangeControl';
|
|
8
|
+
export * from './components/FileControl';
|
|
9
|
+
export * from './components/FormApp';
|
|
10
|
+
export * from './components/FormPages';
|
|
11
|
+
export * from './components/FormStepper';
|
|
12
|
+
export * from './components/IssueAlert';
|
|
13
|
+
export * from './components/IssueMessages';
|
|
14
|
+
export * from './components/IssuesPanel';
|
|
15
|
+
export * from './components/IssuesPopover';
|
|
16
|
+
export * from './components/LoadAction';
|
|
17
|
+
export * from './components/NumericControl';
|
|
18
|
+
export * from './components/PathLink';
|
|
19
|
+
export * from './components/RadioGroupControl';
|
|
20
|
+
export * from './components/SaveAction';
|
|
21
|
+
export * from './components/SelectControl';
|
|
22
|
+
export * from './components/SelectMultipleControl';
|
|
23
|
+
export * from './components/SubmitAction';
|
|
24
|
+
export * from './components/TableControl';
|
|
25
|
+
export * from './components/TextControl';
|
|
26
|
+
export * from './components/TopBar';
|
|
27
|
+
export * from './components/ValidateAction';
|
|
28
|
+
export * from './providers/LocalizationProvider';
|
|
29
|
+
export * from './providers/PrefixSuffixProvider';
|
|
30
|
+
export * from './utils/displayStatusConversions.ts';
|
|
31
|
+
export * from './utils/options.ts';
|
|
32
|
+
export * from './utils/useControlIssues.tsx';
|
|
33
|
+
export * from './utils/useFormLoader.tsx';
|
|
34
|
+
export * from './utils/useFormSaver.tsx';
|
|
35
|
+
export * from './utils/useFormValidator.ts';
|
|
36
|
+
export * from './utils/useRegisterControl.tsx';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './en-GB.tsx';
|
|
2
|
+
export * from './en-US.tsx';
|
|
3
|
+
export * from './fr.tsx';
|
|
4
|
+
export * from './pt.tsx';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalizationObject } from './LocalizationObject.ts';
|
|
2
2
|
/** Value of the localisation context. */
|
|
3
3
|
export interface LocalizationContextValue {
|
|
4
4
|
locale: LocalizationObject;
|
|
5
5
|
setLocale: (locale: LocalizationObject) => void;
|
|
6
6
|
}
|
|
7
7
|
/** Localisation context. */
|
|
8
|
-
export declare const LocalizationContext: import(
|
|
8
|
+
export declare const LocalizationContext: import('react').Context<LocalizationContextValue | null>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { LocalizationObject as UiLocalizationObject } from '@ostack.tech/ui';
|
|
2
|
+
import { AnnexesManagerProps } from '../../components/Annexes';
|
|
3
|
+
import { DateRangeControlProps } from '../../components/DateRangeControl';
|
|
4
|
+
import { FileControlProps } from '../../components/FileControl';
|
|
5
|
+
import { FormAppProps } from '../../components/FormApp';
|
|
6
|
+
import { FormPageProps, FormPagesNavigationProps } from '../../components/FormPages';
|
|
7
|
+
import { IssueMessagesProps } from '../../components/IssueMessages';
|
|
8
|
+
import { IssuesPanelProps } from '../../components/IssuesPanel';
|
|
9
|
+
import { IssuesPopoverProps } from '../../components/IssuesPopover';
|
|
10
|
+
import { LoadActionProps } from '../../components/LoadAction';
|
|
11
|
+
import { SaveActionProps } from '../../components/SaveAction';
|
|
12
|
+
import { SubmitActionProps } from '../../components/SubmitAction';
|
|
13
|
+
import { TableControlAddRowTriggerProps, TableControlRemoveRowTriggerProps } from '../../components/TableControl';
|
|
14
|
+
import { ValidateActionProps } from '../../components/ValidateAction';
|
|
15
15
|
/** Localization object representation. */
|
|
16
16
|
export interface LocalizationObject {
|
|
17
17
|
baseLocale: UiLocalizationObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LocalizationObject } from './LocalizationObject.ts';
|
|
3
3
|
/** Properties of the localisation provider. */
|
|
4
4
|
export interface LocalizationProviderProps {
|
|
5
5
|
/** Uncontrolled locale to use. */
|
|
@@ -18,4 +18,4 @@ export interface LocalizationProviderProps {
|
|
|
18
18
|
* Localisation provider (also sets the `@ostack.tech/ui` localisation
|
|
19
19
|
* provider).
|
|
20
20
|
*/
|
|
21
|
-
export declare function LocalizationProvider({ defaultLocale, locale: controlledLocale, onLocaleChange, children, }: LocalizationProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import(
|
|
21
|
+
export declare function LocalizationProvider({ defaultLocale, locale: controlledLocale, onLocaleChange, children, }: LocalizationProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './LocalizationContext.ts';
|
|
2
|
+
export * from './LocalizationObject.ts';
|
|
3
|
+
export * from './LocalizationProvider.tsx';
|
|
4
|
+
export * from './useLocale.ts';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Prefix-suffix context. */
|
|
2
|
-
export declare const PrefixSuffixContext: import(
|
|
2
|
+
export declare const PrefixSuffixContext: import('react').Context<string | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
/** Properties of the prefix-suffix provider. */
|
|
3
3
|
export interface PrefixSuffixProviderProps {
|
|
4
4
|
/** Suffix to add to ostack/UI's prefix. */
|
|
@@ -6,4 +6,4 @@ export interface PrefixSuffixProviderProps {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
}
|
|
8
8
|
/** Prefix-suffix provider. */
|
|
9
|
-
export declare function PrefixSuffixProvider({ prefixSuffix, children, }: PrefixSuffixProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import(
|
|
9
|
+
export declare function PrefixSuffixProvider({ prefixSuffix, children, }: PrefixSuffixProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { setDefaultPrefixSuffix } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export { setDefaultPrefixSuffix } from './defaultPrefixSuffix.ts';
|
|
2
|
+
export * from './PrefixSuffixContext.ts';
|
|
3
|
+
export * from './PrefixSuffixProvider.tsx';
|
|
4
|
+
export * from './usePrefix.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Schema } from '@ostack.tech/kform';
|
|
2
|
+
import { Temporal } from '@ostack.tech/kform-react';
|
|
3
3
|
/** Returns the minimum date allowed based on a temporal schema's restrictions. */
|
|
4
4
|
export declare function minDateRestriction<T extends Temporal | null>(schema: Schema<T>): Date | undefined;
|
|
5
5
|
/** Returns the maximum date allowed based on a temporal schema's restrictions. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DisplayStatus } from '@ostack.tech/kform';
|
|
2
|
+
import { ControlStatus } from '@ostack.tech/ui';
|
|
3
3
|
/** Transforms ostack/KForm's display status into ostack/UI's control status. */
|
|
4
4
|
export declare function displayStatusToControlStatus(displayStatus: DisplayStatus | undefined): ControlStatus | undefined;
|
|
5
5
|
/** Transforms ostack/KForm's display status into a "danger" or "warning" colour. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OptionProps, OptionsGroupProps } from '@ostack.tech/ui';
|
|
2
|
+
import { Key, ReactNode } from 'react';
|
|
3
3
|
/** Object representation of an options group. */
|
|
4
4
|
export type OptionsGroupObject<T = unknown> = Omit<OptionsGroupProps, "children"> & {
|
|
5
5
|
/** Group's options. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbsolutePath } from '@ostack.tech/kform';
|
|
2
2
|
/**
|
|
3
3
|
* Given two paths, returns a number > 0 if the first path is more specific than
|
|
4
4
|
* the second, a number < 0 if the first path is less specific than the second,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Schema } from '@ostack.tech/kform';
|
|
2
|
+
import { Listable } from '@ostack.tech/kform-react';
|
|
3
|
+
import { JSX } from 'react';
|
|
4
|
+
import { OptionObject, OptionsGroupObject } from './options.ts';
|
|
5
5
|
/**
|
|
6
6
|
* Parses a selection value from the (string) index of an option (or empty
|
|
7
7
|
* string).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { IssueMessages,
|
|
1
|
+
import { SealedValidationIssue } from '@ostack.tech/kform';
|
|
2
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
|
+
import { IssueMessages, IssueMessagesByCode } from '../components/IssueMessages';
|
|
4
4
|
/** Options of the `useControlIssues` hook. */
|
|
5
5
|
export interface UseControlIssuesOptions {
|
|
6
6
|
/** Mapping from path to issues to display. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbsolutePath } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AbsolutePath } from '@ostack.tech/kform';
|
|
2
|
+
import { FileSystemHandle, FileWithHandle, WellKnownDirectory } from 'browser-fs-access';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Options that can be passed to the {@link useFormLoader} hook, or to its
|
|
6
6
|
* resulting `load` function.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbsolutePath } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AbsolutePath } from '@ostack.tech/kform';
|
|
2
|
+
import { FileSystemHandle, WellKnownDirectory } from 'browser-fs-access';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Options that can be passed to the {@link useFormSaver} hook, or to its
|
|
6
6
|
* resulting `save`/`saveAs` functions.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { DisplayStatus, SealedValidationIssue } from '@ostack.tech/kform';
|
|
2
|
+
import { Controller } from '@ostack.tech/kform-react';
|
|
3
|
+
import { FocusEvent, ReactNode, Ref, RefObject } from 'react';
|
|
4
4
|
/** Options when registering the control. */
|
|
5
5
|
export interface UseRegisterControlOptions<T> {
|
|
6
6
|
controller: Controller<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocatedValidationInfo } from '@ostack.tech/kform-react';
|
|
2
2
|
type ReportValidationFailuresInfo = Pick<LocatedValidationInfo, "path" | "issues">;
|
|
3
3
|
/** Hook used to report validation failures that occur. */
|
|
4
4
|
export declare function useReportValidationFailures(info?: ReportValidationFailuresInfo[]): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Schema } from '@ostack.tech/kform';
|
|
2
|
+
import { Temporal } from '@ostack.tech/kform-react';
|
|
3
|
+
import { DateFormatterOptions, DateParserOptions, DateTransformerOptions } from '@ostack.tech/ui';
|
|
4
4
|
/** Temporal string transformer. */
|
|
5
5
|
export interface TemporalStringTransformer {
|
|
6
6
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ostack.tech/ui-kform",
|
|
3
3
|
"description": "Integration of ostack/UI with ostack/KForm.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Opensoft",
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"directory": "packages/ui-kform/"
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=10"
|
|
18
|
-
},
|
|
19
16
|
"main": "dist/ostack-ui-kform.js",
|
|
20
17
|
"types": "dist/types/index.d.ts",
|
|
21
18
|
"sass": "scss/index.scss",
|
|
@@ -25,21 +22,9 @@
|
|
|
25
22
|
"types": "./dist/types/index.d.ts",
|
|
26
23
|
"import": "./dist/ostack-ui-kform.js"
|
|
27
24
|
},
|
|
28
|
-
"./locales
|
|
29
|
-
"types": "./dist/types/locales
|
|
30
|
-
"import": "./dist/locales
|
|
31
|
-
},
|
|
32
|
-
"./locales/en-US": {
|
|
33
|
-
"types": "./dist/types/locales/en-US.d.ts",
|
|
34
|
-
"import": "./dist/locales/en-US.js"
|
|
35
|
-
},
|
|
36
|
-
"./locales/fr": {
|
|
37
|
-
"types": "./dist/types/locales/fr.d.ts",
|
|
38
|
-
"import": "./dist/locales/fr.js"
|
|
39
|
-
},
|
|
40
|
-
"./locales/pt": {
|
|
41
|
-
"types": "./dist/types/locales/pt.d.ts",
|
|
42
|
-
"import": "./dist/locales/pt.js"
|
|
25
|
+
"./locales/*": {
|
|
26
|
+
"types": "./dist/types/locales/*.d.ts",
|
|
27
|
+
"import": "./dist/locales/*.js"
|
|
43
28
|
},
|
|
44
29
|
"./css": "./dist/ostack-ui-kform.css",
|
|
45
30
|
"./scss": "./scss/index.scss",
|
|
@@ -54,9 +39,9 @@
|
|
|
54
39
|
"scripts": {
|
|
55
40
|
"clean": "rimraf dist/ scss/",
|
|
56
41
|
"build": "npm run build:js && npm run build:css",
|
|
57
|
-
"build:js": "vite build
|
|
58
|
-
"build:css": "npm run copy
|
|
59
|
-
"copy
|
|
42
|
+
"build:js": "vite build",
|
|
43
|
+
"build:css": "npm run copy:scss && sass -I ../../node_modules/ scss/index.scss dist/ostack-ui-kform.css",
|
|
44
|
+
"copy:scss": "cpy 'src/**/*.scss' '!src/**/*.stories.scss' scss/"
|
|
60
45
|
},
|
|
61
46
|
"dependencies": {
|
|
62
47
|
"browser-fs-access": "^0.38.0"
|
|
@@ -67,7 +52,7 @@
|
|
|
67
52
|
"@fortawesome/free-solid-svg-icons": "^6.2.0 || ^7.0.0",
|
|
68
53
|
"@ostack.tech/kform": "~0.31.0",
|
|
69
54
|
"@ostack.tech/kform-react": "~0.31.0",
|
|
70
|
-
"@ostack.tech/ui": "~0.3.
|
|
55
|
+
"@ostack.tech/ui": "~0.3.1",
|
|
71
56
|
"@types/react": "^18.0.0 || ^19.0.0",
|
|
72
57
|
"@types/react-dom": "^18.0.0 || ^19.0.0",
|
|
73
58
|
"date-fns": "^4.1.0",
|