@cyclone-ui/state 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/base/atoms/atom-with-broadcast.cjs +1 -2
- package/dist/base/atoms/atom-with-broadcast.d.cts +0 -2
- package/dist/base/atoms/atom-with-broadcast.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-broadcast.d.mts +0 -2
- package/dist/base/atoms/atom-with-broadcast.mjs +1 -2
- package/dist/base/atoms/atom-with-compare.cjs +1 -2
- package/dist/base/atoms/atom-with-compare.d.cts +0 -2
- package/dist/base/atoms/atom-with-compare.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-compare.d.mts +0 -2
- package/dist/base/atoms/atom-with-compare.mjs +1 -2
- package/dist/base/atoms/atom-with-debounce.cjs +1 -2
- package/dist/base/atoms/atom-with-debounce.d.cts +0 -2
- package/dist/base/atoms/atom-with-debounce.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-debounce.d.mts +0 -2
- package/dist/base/atoms/atom-with-debounce.mjs +1 -2
- package/dist/base/atoms/atom-with-effect.cjs +1 -2
- package/dist/base/atoms/atom-with-effect.d.cts +0 -2
- package/dist/base/atoms/atom-with-effect.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-effect.d.mts +0 -2
- package/dist/base/atoms/atom-with-effect.mjs +1 -2
- package/dist/base/atoms/atom-with-listeners.cjs +1 -2
- package/dist/base/atoms/atom-with-listeners.d.cts +0 -2
- package/dist/base/atoms/atom-with-listeners.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-listeners.d.mts +0 -2
- package/dist/base/atoms/atom-with-listeners.mjs +1 -2
- package/dist/base/atoms/atom-with-pending.cjs +1 -2
- package/dist/base/atoms/atom-with-pending.d.cts +0 -2
- package/dist/base/atoms/atom-with-pending.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-pending.d.mts +0 -2
- package/dist/base/atoms/atom-with-pending.mjs +1 -2
- package/dist/base/atoms/atom-with-refresh-and-default.cjs +1 -2
- package/dist/base/atoms/atom-with-refresh-and-default.d.cts +0 -2
- package/dist/base/atoms/atom-with-refresh-and-default.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-refresh-and-default.d.mts +0 -2
- package/dist/base/atoms/atom-with-refresh-and-default.mjs +1 -2
- package/dist/base/atoms/atom-with-refresh.cjs +1 -2
- package/dist/base/atoms/atom-with-refresh.d.cts +0 -2
- package/dist/base/atoms/atom-with-refresh.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-refresh.d.mts +0 -2
- package/dist/base/atoms/atom-with-refresh.mjs +1 -2
- package/dist/base/atoms/atom-with-toggle.cjs +1 -2
- package/dist/base/atoms/atom-with-toggle.d.cts +0 -2
- package/dist/base/atoms/atom-with-toggle.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-toggle.d.mts +0 -2
- package/dist/base/atoms/atom-with-toggle.mjs +1 -2
- package/dist/base/atoms/atom-with-web-storage.cjs +1 -2
- package/dist/base/atoms/atom-with-web-storage.d.cts +0 -2
- package/dist/base/atoms/atom-with-web-storage.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-web-storage.d.mts +0 -2
- package/dist/base/atoms/atom-with-web-storage.mjs +1 -2
- package/dist/base/atoms/atom-with-wrapper.cjs +1 -2
- package/dist/base/atoms/atom-with-wrapper.d.cts +0 -2
- package/dist/base/atoms/atom-with-wrapper.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-wrapper.d.mts +0 -2
- package/dist/base/atoms/atom-with-wrapper.mjs +1 -2
- package/dist/base/atoms/base-atom.cjs +1 -2
- package/dist/base/atoms/base-atom.mjs +1 -2
- package/dist/base/hooks/use-atom-effect.cjs +1 -2
- package/dist/base/hooks/use-atom-effect.d.cts +0 -2
- package/dist/base/hooks/use-atom-effect.d.cts.map +1 -1
- package/dist/base/hooks/use-atom-effect.d.mts +0 -2
- package/dist/base/hooks/use-atom-effect.mjs +1 -2
- package/dist/base/hooks/use-hydrate-molecule.cjs +1 -2
- package/dist/base/hooks/use-hydrate-molecule.d.cts +0 -2
- package/dist/base/hooks/use-hydrate-molecule.d.cts.map +1 -1
- package/dist/base/hooks/use-hydrate-molecule.d.mts +0 -2
- package/dist/base/hooks/use-hydrate-molecule.mjs +1 -2
- package/dist/base/hooks/use-prepare-atoms.cjs +1 -2
- package/dist/base/hooks/use-prepare-atoms.d.cts +0 -2
- package/dist/base/hooks/use-prepare-atoms.d.cts.map +1 -1
- package/dist/base/hooks/use-prepare-atoms.d.mts +0 -2
- package/dist/base/hooks/use-prepare-atoms.mjs +1 -2
- package/dist/base/hooks/use-sync-molecule.cjs +1 -2
- package/dist/base/hooks/use-sync-molecule.d.cts +0 -2
- package/dist/base/hooks/use-sync-molecule.d.cts.map +1 -1
- package/dist/base/hooks/use-sync-molecule.d.mts +0 -2
- package/dist/base/hooks/use-sync-molecule.mjs +1 -2
- package/dist/base/utilities/create-molecule.cjs +1 -2
- package/dist/base/utilities/create-molecule.d.cts +0 -2
- package/dist/base/utilities/create-molecule.d.cts.map +1 -1
- package/dist/base/utilities/create-molecule.d.mts +0 -2
- package/dist/base/utilities/create-molecule.mjs +1 -2
- package/dist/base/utilities/create-web-storage.cjs +1 -2
- package/dist/base/utilities/create-web-storage.d.cts +0 -2
- package/dist/base/utilities/create-web-storage.d.cts.map +1 -1
- package/dist/base/utilities/create-web-storage.d.mts +0 -2
- package/dist/base/utilities/create-web-storage.mjs +1 -2
- package/dist/base/utilities/debounce.cjs +1 -2
- package/dist/base/utilities/debounce.d.cts +0 -2
- package/dist/base/utilities/debounce.d.cts.map +1 -1
- package/dist/base/utilities/debounce.d.mts +0 -2
- package/dist/base/utilities/debounce.mjs +1 -2
- package/dist/base/utilities/is-atom.cjs +1 -2
- package/dist/base/utilities/is-atom.mjs +1 -2
- package/dist/base/utilities/set-atom-debug.cjs +1 -2
- package/dist/base/utilities/set-atom-debug.d.cts +0 -2
- package/dist/base/utilities/set-atom-debug.d.cts.map +1 -1
- package/dist/base/utilities/set-atom-debug.d.mts +0 -2
- package/dist/base/utilities/set-atom-debug.mjs +1 -2
- package/dist/form/atoms/atom-with-field.cjs +1 -2
- package/dist/form/atoms/atom-with-field.mjs +1 -2
- package/dist/form/atoms/atom-with-messages.cjs +1 -2
- package/dist/form/atoms/atom-with-messages.mjs +1 -2
- package/dist/form/hooks/use-field-actions.cjs +1 -2
- package/dist/form/hooks/use-field-actions.d.cts +0 -2
- package/dist/form/hooks/use-field-actions.d.cts.map +1 -1
- package/dist/form/hooks/use-field-actions.d.mts +0 -2
- package/dist/form/hooks/use-field-actions.mjs +1 -2
- package/dist/form/hooks/use-field-ref.cjs +1 -2
- package/dist/form/hooks/use-field-ref.d.cts +0 -2
- package/dist/form/hooks/use-field-ref.d.cts.map +1 -1
- package/dist/form/hooks/use-field-ref.d.mts +0 -2
- package/dist/form/hooks/use-field-ref.mjs +1 -2
- package/dist/form/hooks/use-form-actions.cjs +1 -2
- package/dist/form/hooks/use-form-actions.d.cts +0 -2
- package/dist/form/hooks/use-form-actions.d.cts.map +1 -1
- package/dist/form/hooks/use-form-actions.d.mts +0 -2
- package/dist/form/hooks/use-form-actions.mjs +1 -2
- package/dist/form/molecules/field-molecule.cjs +1 -2
- package/dist/form/molecules/field-molecule.d.cts +0 -2
- package/dist/form/molecules/field-molecule.d.cts.map +1 -1
- package/dist/form/molecules/field-molecule.d.mts +0 -2
- package/dist/form/molecules/field-molecule.mjs +1 -2
- package/dist/form/molecules/form-molecule.cjs +1 -2
- package/dist/form/molecules/form-molecule.d.cts +0 -2
- package/dist/form/molecules/form-molecule.d.cts.map +1 -1
- package/dist/form/molecules/form-molecule.d.mts +0 -2
- package/dist/form/molecules/form-molecule.mjs +1 -2
- package/dist/form/providers/FieldProvider.cjs +1 -2
- package/dist/form/providers/FieldProvider.d.cts +0 -2
- package/dist/form/providers/FieldProvider.d.cts.map +1 -1
- package/dist/form/providers/FieldProvider.d.mts +0 -2
- package/dist/form/providers/FieldProvider.mjs +1 -2
- package/dist/form/providers/FormProvider.cjs +1 -2
- package/dist/form/providers/FormProvider.d.cts +0 -2
- package/dist/form/providers/FormProvider.d.cts.map +1 -1
- package/dist/form/providers/FormProvider.d.mts +0 -2
- package/dist/form/providers/FormProvider.mjs +1 -2
- package/dist/form/types.cjs +1 -2
- package/dist/form/types.d.cts +0 -2
- package/dist/form/types.d.cts.map +1 -1
- package/dist/form/types.d.mts +0 -2
- package/dist/form/types.mjs +1 -2
- package/dist/form/utilities/abort-error.cjs +1 -2
- package/dist/form/utilities/abort-error.d.cts +0 -2
- package/dist/form/utilities/abort-error.d.cts.map +1 -1
- package/dist/form/utilities/abort-error.d.mts +0 -2
- package/dist/form/utilities/abort-error.mjs +1 -2
- package/dist/form/utilities/is-validation-results.cjs +1 -2
- package/dist/form/utilities/is-validation-results.d.cts +0 -2
- package/dist/form/utilities/is-validation-results.d.cts.map +1 -1
- package/dist/form/utilities/is-validation-results.d.mts +0 -2
- package/dist/form/utilities/is-validation-results.mjs +1 -2
- package/dist/form/utilities/validators.cjs +1 -2
- package/dist/form/utilities/validators.d.cts +0 -2
- package/dist/form/utilities/validators.d.cts.map +1 -1
- package/dist/form/utilities/validators.d.mts +0 -2
- package/dist/form/utilities/validators.mjs +1 -2
- package/dist/message/components/MessageViewport.cjs +1 -2
- package/dist/message/components/MessageViewport.d.cts +0 -2
- package/dist/message/components/MessageViewport.d.cts.map +1 -1
- package/dist/message/components/MessageViewport.d.mts +0 -2
- package/dist/message/components/MessageViewport.mjs +1 -2
- package/dist/message/hooks/use-message-actions.cjs +1 -2
- package/dist/message/hooks/use-message-actions.d.cts +0 -2
- package/dist/message/hooks/use-message-actions.d.cts.map +1 -1
- package/dist/message/hooks/use-message-actions.d.mts +0 -2
- package/dist/message/hooks/use-message-actions.mjs +1 -2
- package/dist/message/providers/MessageProvider.cjs +1 -2
- package/dist/message/providers/MessageProvider.d.cts +0 -2
- package/dist/message/providers/MessageProvider.d.cts.map +1 -1
- package/dist/message/providers/MessageProvider.d.mts +0 -2
- package/dist/message/providers/MessageProvider.mjs +1 -2
- package/dist/message/types.d.cts +0 -2
- package/dist/message/types.d.cts.map +1 -1
- package/dist/message/types.d.mts +0 -2
- package/dist/theme/hooks/use-theme-actions.cjs +1 -2
- package/dist/theme/hooks/use-theme-actions.d.cts +0 -2
- package/dist/theme/hooks/use-theme-actions.d.cts.map +1 -1
- package/dist/theme/hooks/use-theme-actions.d.mts +0 -2
- package/dist/theme/hooks/use-theme-actions.mjs +1 -2
- package/dist/theme/hooks/use-theme-store.cjs +1 -2
- package/dist/theme/hooks/use-theme-store.d.cts +0 -2
- package/dist/theme/hooks/use-theme-store.d.cts.map +1 -1
- package/dist/theme/hooks/use-theme-store.d.mts +0 -2
- package/dist/theme/hooks/use-theme-store.mjs +1 -2
- package/dist/theme/molecules/theme-molecule.cjs +1 -2
- package/dist/theme/molecules/theme-molecule.d.cts +0 -2
- package/dist/theme/molecules/theme-molecule.d.cts.map +1 -1
- package/dist/theme/molecules/theme-molecule.d.mts +0 -2
- package/dist/theme/molecules/theme-molecule.mjs +1 -2
- package/dist/theme/providers/ThemeProvider.cjs +1 -2
- package/dist/theme/providers/ThemeProvider.d.cts +0 -2
- package/dist/theme/providers/ThemeProvider.d.cts.map +1 -1
- package/dist/theme/providers/ThemeProvider.d.mts +0 -2
- package/dist/theme/providers/ThemeProvider.mjs +1 -2
- package/dist/theme/types.d.cts +0 -2
- package/dist/theme/types.d.cts.map +1 -1
- package/dist/theme/types.d.mts +0 -2
- package/dist/theme/utilities/theme-helpers.cjs +1 -2
- package/dist/theme/utilities/theme-helpers.d.cts +0 -2
- package/dist/theme/utilities/theme-helpers.d.cts.map +1 -1
- package/dist/theme/utilities/theme-helpers.d.mts +0 -2
- package/dist/theme/utilities/theme-helpers.mjs +1 -2
- package/dist/types.d.cts +0 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +0 -2
- package/package.json +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isDevelopment } from "@stryke/env/environment-checks";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/utilities/set-atom-debug.ts
|
|
4
4
|
/**
|
|
5
5
|
* Add a debug label to the Jotai Atom
|
|
6
6
|
*
|
|
@@ -19,6 +19,5 @@ const setAtomDebugPrivate = (atom) => {
|
|
|
19
19
|
if (isDevelopment) atom.debugPrivate = true;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
export { setAtomDebugLabel, setAtomDebugPrivate };
|
|
24
23
|
//# sourceMappingURL=set-atom-debug.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let jotai_utils = require("jotai/utils");
|
|
2
2
|
let jotai = require("jotai");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/form/atoms/atom-with-field.ts
|
|
5
5
|
const atomWithFieldItems = (optionsAtom, valueAtom, disabledAtom) => {
|
|
6
6
|
return (0, jotai_utils.atomWithDefault)((get) => {
|
|
7
7
|
const options = get(optionsAtom);
|
|
@@ -19,5 +19,4 @@ const atomWithFieldItems = (optionsAtom, valueAtom, disabledAtom) => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
exports.atomWithFieldItems = atomWithFieldItems;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { atomWithDefault } from "jotai/utils";
|
|
2
2
|
import { atom } from "jotai";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/form/atoms/atom-with-field.ts
|
|
5
5
|
const atomWithFieldItems = (optionsAtom, valueAtom, disabledAtom) => {
|
|
6
6
|
return atomWithDefault((get) => {
|
|
7
7
|
const options = get(optionsAtom);
|
|
@@ -19,6 +19,5 @@ const atomWithFieldItems = (optionsAtom, valueAtom, disabledAtom) => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
export { atomWithFieldItems };
|
|
24
23
|
//# sourceMappingURL=atom-with-field.mjs.map
|
|
@@ -2,7 +2,7 @@ const require_is_validation_results = require("../utilities/is-validation-result
|
|
|
2
2
|
let jotai = require("jotai");
|
|
3
3
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/form/atoms/atom-with-messages.ts
|
|
6
6
|
const getMessageType = (validationResults, type) => {
|
|
7
7
|
const messages = [];
|
|
8
8
|
if (validationResults.initialize) messages.push(...validationResults.initialize.filter((message) => type === message.type && (message.message || message.code) && !messages.some((existing) => existing.message === message.message || existing.code === message.code)));
|
|
@@ -74,7 +74,6 @@ const atomWithTheme = (optionsAtom, dangerMessagesAtom, warningMessagesAtom, inf
|
|
|
74
74
|
return "base";
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
//#endregion
|
|
78
77
|
exports.atomWithFieldsMessageList = atomWithFieldsMessageList;
|
|
79
78
|
exports.atomWithFieldsMessageTypes = atomWithFieldsMessageTypes;
|
|
80
79
|
exports.atomWithMessageTypes = atomWithMessageTypes;
|
|
@@ -2,7 +2,7 @@ import { isValidationResults } from "../utilities/is-validation-results.mjs";
|
|
|
2
2
|
import { atom } from "jotai";
|
|
3
3
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/form/atoms/atom-with-messages.ts
|
|
6
6
|
const getMessageType = (validationResults, type) => {
|
|
7
7
|
const messages = [];
|
|
8
8
|
if (validationResults.initialize) messages.push(...validationResults.initialize.filter((message) => type === message.type && (message.message || message.code) && !messages.some((existing) => existing.message === message.message || existing.code === message.code)));
|
|
@@ -74,6 +74,5 @@ const atomWithTheme = (optionsAtom, dangerMessagesAtom, warningMessagesAtom, inf
|
|
|
74
74
|
return "base";
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
//#endregion
|
|
78
77
|
export { atomWithFieldsMessageList, atomWithFieldsMessageTypes, atomWithMessageTypes, atomWithMessages, atomWithTheme, getFieldsMessageList, getFieldsMessageTypes, getMessageType };
|
|
79
78
|
//# sourceMappingURL=atom-with-messages.mjs.map
|
|
@@ -5,7 +5,7 @@ let react = require("react");
|
|
|
5
5
|
let _stryke_type_checks_is_promise = require("@stryke/type-checks/is-promise");
|
|
6
6
|
let _stryke_string_format_upper_case_first = require("@stryke/string-format/upper-case-first");
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/form/hooks/use-field-actions.ts
|
|
9
9
|
const useFieldActions = () => {
|
|
10
10
|
const field = require_field_molecule.FieldApi.useMolecule();
|
|
11
11
|
const validate = (0, jotai_utils.useAtomCallback)((0, react.useCallback)(async (get, set, nextValue, cause) => {
|
|
@@ -88,5 +88,4 @@ const useFieldActions = () => {
|
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
//#endregion
|
|
92
91
|
exports.useFieldActions = useFieldActions;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ValidationCause } from "../types.cjs";
|
|
2
2
|
import { Ref } from "react";
|
|
3
|
-
//#region src/form/hooks/use-field-actions.d.ts
|
|
4
3
|
declare const useFieldActions: <TFieldValue = any>() => {
|
|
5
4
|
mount: (ref: Ref<HTMLInputElement>, tabIndex?: number | undefined) => Promise<void>;
|
|
6
5
|
initialize: (initialValue: TFieldValue, skipIfDirty?: boolean | undefined) => Promise<void>;
|
|
@@ -12,6 +11,5 @@ declare const useFieldActions: <TFieldValue = any>() => {
|
|
|
12
11
|
validate: (nextValue: TFieldValue, cause: ValidationCause) => Promise<void>;
|
|
13
12
|
reset: () => Promise<void>;
|
|
14
13
|
};
|
|
15
|
-
//#endregion
|
|
16
14
|
export { useFieldActions };
|
|
17
15
|
//# sourceMappingURL=use-field-actions.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-actions.d.cts","names":[],"sources":["../../../src/form/hooks/use-field-actions.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-field-actions.d.cts","names":[],"sources":["../../../src/form/hooks/use-field-actions.ts"],"mappings":";;cA8Ba,kBAAmB;;;;;;EA2KZ,aAAA,qBAAO"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ValidationCause } from "../types.mjs";
|
|
2
2
|
import { Ref } from "react";
|
|
3
|
-
//#region src/form/hooks/use-field-actions.d.ts
|
|
4
3
|
declare const useFieldActions: <TFieldValue = any>() => {
|
|
5
4
|
mount: (ref: Ref<HTMLInputElement>, tabIndex?: number | undefined) => Promise<void>;
|
|
6
5
|
initialize: (initialValue: TFieldValue, skipIfDirty?: boolean | undefined) => Promise<void>;
|
|
@@ -12,6 +11,5 @@ declare const useFieldActions: <TFieldValue = any>() => {
|
|
|
12
11
|
validate: (nextValue: TFieldValue, cause: ValidationCause) => Promise<void>;
|
|
13
12
|
reset: () => Promise<void>;
|
|
14
13
|
};
|
|
15
|
-
//#endregion
|
|
16
14
|
export { useFieldActions };
|
|
17
15
|
//# sourceMappingURL=use-field-actions.d.mts.map
|
|
@@ -5,7 +5,7 @@ import { useCallback } from "react";
|
|
|
5
5
|
import { isPromise } from "@stryke/type-checks/is-promise";
|
|
6
6
|
import { upperCaseFirst } from "@stryke/string-format/upper-case-first";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/form/hooks/use-field-actions.ts
|
|
9
9
|
const useFieldActions = () => {
|
|
10
10
|
const field = FieldApi.useMolecule();
|
|
11
11
|
const validate = useAtomCallback(useCallback(async (get, set, nextValue, cause) => {
|
|
@@ -88,6 +88,5 @@ const useFieldActions = () => {
|
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
//#endregion
|
|
92
91
|
export { useFieldActions };
|
|
93
92
|
//# sourceMappingURL=use-field-actions.mjs.map
|
|
@@ -3,7 +3,7 @@ let react = require("react");
|
|
|
3
3
|
let _maskito_react = require("@maskito/react");
|
|
4
4
|
let _tamagui_core = require("@tamagui/core");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/form/hooks/use-field-ref.ts
|
|
7
7
|
const useFieldRef = (forwardedRef) => {
|
|
8
8
|
const ref = (0, react.useRef)(null);
|
|
9
9
|
const options = require_field_molecule.FieldApi.use().options.get();
|
|
@@ -12,5 +12,4 @@ const useFieldRef = (forwardedRef) => {
|
|
|
12
12
|
return (0, _tamagui_core.useComposedRefs)(...refs);
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
exports.useFieldRef = useFieldRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-ref.d.cts","names":[],"sources":["../../../src/form/hooks/use-field-ref.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-field-ref.d.cts","names":[],"sources":["../../../src/form/hooks/use-field-ref.ts"],"mappings":";cA0Ba,cACX,eAAe,IAAI,sBAClB,IAAI"}
|
|
@@ -3,7 +3,7 @@ import { useRef } from "react";
|
|
|
3
3
|
import { useMaskito } from "@maskito/react";
|
|
4
4
|
import { useComposedRefs } from "@tamagui/core";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/form/hooks/use-field-ref.ts
|
|
7
7
|
const useFieldRef = (forwardedRef) => {
|
|
8
8
|
const ref = useRef(null);
|
|
9
9
|
const options = FieldApi.use().options.get();
|
|
@@ -12,6 +12,5 @@ const useFieldRef = (forwardedRef) => {
|
|
|
12
12
|
return useComposedRefs(...refs);
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { useFieldRef };
|
|
17
16
|
//# sourceMappingURL=use-field-ref.mjs.map
|
|
@@ -5,7 +5,7 @@ let react = require("react");
|
|
|
5
5
|
let _stryke_type_checks_is_promise = require("@stryke/type-checks/is-promise");
|
|
6
6
|
let _stryke_string_format_upper_case_first = require("@stryke/string-format/upper-case-first");
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/form/hooks/use-form-actions.ts
|
|
9
9
|
const useFormActions = () => {
|
|
10
10
|
const form = require_form_molecule.FormApi.useMolecule();
|
|
11
11
|
return {
|
|
@@ -65,5 +65,4 @@ const useFormActions = () => {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
//#endregion
|
|
69
68
|
exports.useFormActions = useFormActions;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ValidationCause } from "../types.cjs";
|
|
2
|
-
//#region src/form/hooks/use-form-actions.d.ts
|
|
3
2
|
declare const useFormActions: <TFormValues extends Record<string, any> = Record<string, any>>() => {
|
|
4
3
|
initializeField: (_name: string) => Promise<void>;
|
|
5
4
|
uninitializeField: (_name: string) => Promise<void>;
|
|
@@ -8,6 +7,5 @@ declare const useFormActions: <TFormValues extends Record<string, any> = Record<
|
|
|
8
7
|
submit: () => Promise<void>;
|
|
9
8
|
reset: () => void;
|
|
10
9
|
};
|
|
11
|
-
//#endregion
|
|
12
10
|
export { useFormActions };
|
|
13
11
|
//# sourceMappingURL=use-form-actions.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form-actions.d.cts","names":[],"sources":["../../../src/form/hooks/use-form-actions.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-form-actions.d.cts","names":[],"sources":["../../../src/form/hooks/use-form-actions.ts"],"mappings":";cA6Ba,iBACX,oBAAoB,sBAAsB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ValidationCause } from "../types.mjs";
|
|
2
|
-
//#region src/form/hooks/use-form-actions.d.ts
|
|
3
2
|
declare const useFormActions: <TFormValues extends Record<string, any> = Record<string, any>>() => {
|
|
4
3
|
initializeField: (_name: string) => Promise<void>;
|
|
5
4
|
uninitializeField: (_name: string) => Promise<void>;
|
|
@@ -8,6 +7,5 @@ declare const useFormActions: <TFormValues extends Record<string, any> = Record<
|
|
|
8
7
|
submit: () => Promise<void>;
|
|
9
8
|
reset: () => void;
|
|
10
9
|
};
|
|
11
|
-
//#endregion
|
|
12
10
|
export { useFormActions };
|
|
13
11
|
//# sourceMappingURL=use-form-actions.d.mts.map
|
|
@@ -5,7 +5,7 @@ import { useCallback } from "react";
|
|
|
5
5
|
import { isPromise } from "@stryke/type-checks/is-promise";
|
|
6
6
|
import { upperCaseFirst } from "@stryke/string-format/upper-case-first";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/form/hooks/use-form-actions.ts
|
|
9
9
|
const useFormActions = () => {
|
|
10
10
|
const form = FormApi.useMolecule();
|
|
11
11
|
return {
|
|
@@ -65,6 +65,5 @@ const useFormActions = () => {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
//#endregion
|
|
69
68
|
export { useFormActions };
|
|
70
69
|
//# sourceMappingURL=use-form-actions.mjs.map
|
|
@@ -15,7 +15,7 @@ let _stryke_helpers_to_path = require("@stryke/helpers/to-path");
|
|
|
15
15
|
let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
16
16
|
let jotai_optics = require("jotai-optics");
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/form/molecules/field-molecule.ts
|
|
19
19
|
const DEFAULT_FIELD_OPTIONS = {
|
|
20
20
|
theme: "base",
|
|
21
21
|
size: "md",
|
|
@@ -152,6 +152,5 @@ const FieldApi = require_create_molecule.createMoleculeApi((scope) => {
|
|
|
152
152
|
};
|
|
153
153
|
}, { type: "field" });
|
|
154
154
|
|
|
155
|
-
//#endregion
|
|
156
155
|
exports.DEFAULT_FIELD_OPTIONS = DEFAULT_FIELD_OPTIONS;
|
|
157
156
|
exports.FieldApi = FieldApi;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { MoleculeApi } from "../../base/utilities/create-molecule.cjs";
|
|
2
2
|
import { FieldAtoms, FieldOptionsState } from "../types.cjs";
|
|
3
3
|
import "../../index.cjs";
|
|
4
|
-
//#region src/form/molecules/field-molecule.d.ts
|
|
5
4
|
declare const DEFAULT_FIELD_OPTIONS: FieldOptionsState;
|
|
6
5
|
declare const FieldApi: MoleculeApi<FieldAtoms<any>>;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { DEFAULT_FIELD_OPTIONS, FieldApi };
|
|
9
7
|
//# sourceMappingURL=field-molecule.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/field-molecule.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/field-molecule.ts"],"mappings":";;;cA+Ca,uBAAuB;cAWvB,UAAQA,YAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { MoleculeApi } from "../../base/utilities/create-molecule.mjs";
|
|
2
2
|
import { FieldAtoms, FieldOptionsState } from "../types.mjs";
|
|
3
3
|
import "../../index.mjs";
|
|
4
|
-
//#region src/form/molecules/field-molecule.d.ts
|
|
5
4
|
declare const DEFAULT_FIELD_OPTIONS: FieldOptionsState;
|
|
6
5
|
declare const FieldApi: MoleculeApi<FieldAtoms<any>>;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { DEFAULT_FIELD_OPTIONS, FieldApi };
|
|
9
7
|
//# sourceMappingURL=field-molecule.d.mts.map
|
|
@@ -15,7 +15,7 @@ import { toPath } from "@stryke/helpers/to-path";
|
|
|
15
15
|
import { isSet } from "@stryke/type-checks/is-set";
|
|
16
16
|
import { focusAtom } from "jotai-optics";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/form/molecules/field-molecule.ts
|
|
19
19
|
const DEFAULT_FIELD_OPTIONS = {
|
|
20
20
|
theme: "base",
|
|
21
21
|
size: "md",
|
|
@@ -152,6 +152,5 @@ const FieldApi = createMoleculeApi((scope) => {
|
|
|
152
152
|
};
|
|
153
153
|
}, { type: "field" });
|
|
154
154
|
|
|
155
|
-
//#endregion
|
|
156
155
|
export { DEFAULT_FIELD_OPTIONS, FieldApi };
|
|
157
156
|
//# sourceMappingURL=field-molecule.mjs.map
|
|
@@ -10,7 +10,7 @@ let _stryke_helpers_flatten_object = require("@stryke/helpers/flatten-object");
|
|
|
10
10
|
let _stryke_helpers_set_field = require("@stryke/helpers/set-field");
|
|
11
11
|
let _stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/form/molecules/form-molecule.ts
|
|
14
14
|
const DEFAULT_FORM_OPTIONS = {
|
|
15
15
|
theme: "base",
|
|
16
16
|
debounceMs: 100,
|
|
@@ -175,6 +175,5 @@ const FormApi = require_create_molecule.createMoleculeApi((scope) => {
|
|
|
175
175
|
};
|
|
176
176
|
}, { type: "form" });
|
|
177
177
|
|
|
178
|
-
//#endregion
|
|
179
178
|
exports.DEFAULT_FORM_OPTIONS = DEFAULT_FORM_OPTIONS;
|
|
180
179
|
exports.FormApi = FormApi;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { MoleculeApi } from "../../base/utilities/create-molecule.cjs";
|
|
2
2
|
import { FormAtoms, FormOptionsState } from "../types.cjs";
|
|
3
3
|
import "../../index.cjs";
|
|
4
|
-
//#region src/form/molecules/form-molecule.d.ts
|
|
5
4
|
declare const DEFAULT_FORM_OPTIONS: FormOptionsState;
|
|
6
5
|
declare const FormApi: MoleculeApi<FormAtoms<Record<string, any>>>;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { DEFAULT_FORM_OPTIONS, FormApi };
|
|
9
7
|
//# sourceMappingURL=form-molecule.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/form-molecule.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/form-molecule.ts"],"mappings":";;;cA8Ca,sBAAsB;cAStB,SAAOA,YAAA,UAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { MoleculeApi } from "../../base/utilities/create-molecule.mjs";
|
|
2
2
|
import { FormAtoms, FormOptionsState } from "../types.mjs";
|
|
3
3
|
import "../../index.mjs";
|
|
4
|
-
//#region src/form/molecules/form-molecule.d.ts
|
|
5
4
|
declare const DEFAULT_FORM_OPTIONS: FormOptionsState;
|
|
6
5
|
declare const FormApi: MoleculeApi<FormAtoms<Record<string, any>>>;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { DEFAULT_FORM_OPTIONS, FormApi };
|
|
9
7
|
//# sourceMappingURL=form-molecule.d.mts.map
|
|
@@ -10,7 +10,7 @@ import { flattenObject } from "@stryke/helpers/flatten-object";
|
|
|
10
10
|
import { setField } from "@stryke/helpers/set-field";
|
|
11
11
|
import { isNumber } from "@stryke/type-checks/is-number";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/form/molecules/form-molecule.ts
|
|
14
14
|
const DEFAULT_FORM_OPTIONS = {
|
|
15
15
|
theme: "base",
|
|
16
16
|
debounceMs: 100,
|
|
@@ -175,6 +175,5 @@ const FormApi = createMoleculeApi((scope) => {
|
|
|
175
175
|
};
|
|
176
176
|
}, { type: "form" });
|
|
177
177
|
|
|
178
|
-
//#endregion
|
|
179
178
|
export { DEFAULT_FORM_OPTIONS, FormApi };
|
|
180
179
|
//# sourceMappingURL=form-molecule.mjs.map
|
|
@@ -8,7 +8,7 @@ let _tamagui_core = require("@tamagui/core");
|
|
|
8
8
|
let _stryke_async = require("@stryke/async");
|
|
9
9
|
let _stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/form/providers/FieldProvider.tsx
|
|
12
12
|
function FieldStateManager(_props) {
|
|
13
13
|
const { validate } = require_use_field_actions.useFieldActions();
|
|
14
14
|
const form = require_form_molecule.FormApi.useMolecule();
|
|
@@ -99,5 +99,4 @@ function FieldProvider({ children, name, ...props }) {
|
|
|
99
99
|
</require_field_molecule.FieldApi.Provider>;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
//#endregion
|
|
103
102
|
exports.FieldProvider = FieldProvider;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FieldOptions } from "../types.cjs";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
|
-
//#region src/form/providers/FieldProvider.d.ts
|
|
4
3
|
type FieldProviderOptions<TFieldValue = any> = PropsWithChildren<FieldOptions<TFieldValue> & {
|
|
5
4
|
name: string;
|
|
6
5
|
}>;
|
|
7
6
|
declare function FieldProvider<TFieldValue = any>({ children, name, ...props }: FieldProviderOptions<TFieldValue>): import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { FieldProvider, FieldProviderOptions };
|
|
10
8
|
//# sourceMappingURL=FieldProvider.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldProvider.d.cts","names":[],"sources":["../../../src/form/providers/FieldProvider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldProvider.d.cts","names":[],"sources":["../../../src/form/providers/FieldProvider.tsx"],"mappings":";;KAoSY,qBAAqB,qBAAqB,kBACpD,aAAa;EAAiB;;iBAGhB,cAAc,qBAC5B,UACA,SACG,SACF,qBAAqB,+BAAY,IAAA"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FieldOptions } from "../types.mjs";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
|
-
//#region src/form/providers/FieldProvider.d.ts
|
|
4
3
|
type FieldProviderOptions<TFieldValue = any> = PropsWithChildren<FieldOptions<TFieldValue> & {
|
|
5
4
|
name: string;
|
|
6
5
|
}>;
|
|
7
6
|
declare function FieldProvider<TFieldValue = any>({ children, name, ...props }: FieldProviderOptions<TFieldValue>): import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { FieldProvider, FieldProviderOptions };
|
|
10
8
|
//# sourceMappingURL=FieldProvider.d.mts.map
|
|
@@ -8,7 +8,7 @@ import { useThemeName } from "@tamagui/core";
|
|
|
8
8
|
import { delay } from "@stryke/async";
|
|
9
9
|
import { isBoolean } from "@stryke/type-checks/is-boolean";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/form/providers/FieldProvider.tsx
|
|
12
12
|
function FieldStateManager(_props) {
|
|
13
13
|
const { validate } = useFieldActions();
|
|
14
14
|
const form = FormApi.useMolecule();
|
|
@@ -99,6 +99,5 @@ function FieldProvider({ children, name, ...props }) {
|
|
|
99
99
|
</FieldApi.Provider>;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
//#endregion
|
|
103
102
|
export { FieldProvider };
|
|
104
103
|
//# sourceMappingURL=FieldProvider.mjs.map
|
|
@@ -8,7 +8,7 @@ let react = require("react");
|
|
|
8
8
|
let _tamagui_core = require("@tamagui/core");
|
|
9
9
|
let _stryke_async = require("@stryke/async");
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/form/providers/FormProvider.tsx
|
|
12
12
|
function FormStateManager(props) {
|
|
13
13
|
const { validate } = require_use_form_actions.useFormActions();
|
|
14
14
|
const molecule = require_form_molecule.FormApi.useMolecule();
|
|
@@ -62,5 +62,4 @@ const FormProvider = ({ children, name, ...props }) => {
|
|
|
62
62
|
</require_form_molecule.FormApi.Provider>;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
exports.FormProvider = FormProvider;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FormOptions } from "../types.cjs";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
|
-
//#region src/form/providers/FormProvider.d.ts
|
|
4
3
|
type FormProviderOptions<TFormValues extends Record<string, any> = Record<string, any>> = PropsWithChildren<FormOptions<TFormValues> & {
|
|
5
4
|
name: string;
|
|
6
5
|
}>;
|
|
7
6
|
declare const FormProvider: <TFormValues extends Record<string, any> = Record<string, any>>({ children, name, ...props }: FormProviderOptions<TFormValues>) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { FormProvider, FormProviderOptions };
|
|
10
8
|
//# sourceMappingURL=FormProvider.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormProvider.d.cts","names":[],"sources":["../../../src/form/providers/FormProvider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormProvider.d.cts","names":[],"sources":["../../../src/form/providers/FormProvider.tsx"],"mappings":";;KA6GY,oBACV,oBAAoB,sBAAsB,uBACxC,kBAAkB,YAAY;EAAiB;;cAEtC,eACX,oBAAoB,sBAAsB,uBAC1C,UAAA,SAAA,SAIC,oBAAoB,iCAAY,IAAA"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FormOptions } from "../types.mjs";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
|
-
//#region src/form/providers/FormProvider.d.ts
|
|
4
3
|
type FormProviderOptions<TFormValues extends Record<string, any> = Record<string, any>> = PropsWithChildren<FormOptions<TFormValues> & {
|
|
5
4
|
name: string;
|
|
6
5
|
}>;
|
|
7
6
|
declare const FormProvider: <TFormValues extends Record<string, any> = Record<string, any>>({ children, name, ...props }: FormProviderOptions<TFormValues>) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { FormProvider, FormProviderOptions };
|
|
10
8
|
//# sourceMappingURL=FormProvider.d.mts.map
|
|
@@ -8,7 +8,7 @@ import { useEffect } from "react";
|
|
|
8
8
|
import { useThemeName } from "@tamagui/core";
|
|
9
9
|
import { delay } from "@stryke/async";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/form/providers/FormProvider.tsx
|
|
12
12
|
function FormStateManager(props) {
|
|
13
13
|
const { validate } = useFormActions();
|
|
14
14
|
const molecule = FormApi.useMolecule();
|
|
@@ -62,6 +62,5 @@ const FormProvider = ({ children, name, ...props }) => {
|
|
|
62
62
|
</FormApi.Provider>;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
export { FormProvider };
|
|
67
66
|
//# sourceMappingURL=FormProvider.mjs.map
|
package/dist/form/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("@cyclone-ui/helpers");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/form/types.ts
|
|
4
4
|
const ValidationCause = {
|
|
5
5
|
INITIALIZE: "initialize",
|
|
6
6
|
CHANGE: "change",
|
|
@@ -9,5 +9,4 @@ const ValidationCause = {
|
|
|
9
9
|
SERVER: "server"
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.ValidationCause = ValidationCause;
|
package/dist/form/types.d.cts
CHANGED
|
@@ -9,7 +9,6 @@ import { MaybePromise } from "@stryke/types/base";
|
|
|
9
9
|
import { SelectOption, SelectOptionValue } from "@stryke/types/form";
|
|
10
10
|
import { IsPlainObject } from "@stryke/types/object";
|
|
11
11
|
import { ValidationDetail } from "@stryke/types/validations";
|
|
12
|
-
//#region src/form/types.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* "server" is only intended for SSR/SSG validation and should not execute anything
|
|
15
14
|
*/
|
|
@@ -290,6 +289,5 @@ interface FieldAtoms<TFieldValue> {
|
|
|
290
289
|
invalid: Atom<boolean>;
|
|
291
290
|
valid: Atom<boolean>;
|
|
292
291
|
}
|
|
293
|
-
//#endregion
|
|
294
292
|
export { CallbackContext, FieldAtoms, FieldChangeEventHandler, FieldOptions, FieldOptionsState, FieldStatus, FormAtoms, FormOptions, FormOptionsState, FormValuesState, InferFieldState, InferFormState, ValidationCause, ValidationResults, Validator };
|
|
295
293
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":["ValidationDetails"],"sources":["../../src/form/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":["ValidationDetails"],"sources":["../../src/form/types.ts"],"mappings":";;;;;;;;;;;;;;KA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AAe,aAAa;EAG/B,YAAY,aACV,cAAc,aAAa,gCAC1B,gBAAgB,aAAa;EAIhC,MAAM,aAAa,kBAAkB,eAAe;EAEpD,QAAQ,KAAKA;EACb,UAAU,KAAKA;EACf,MAAM,KAAKA;EACX,WAAW,KAAKA;EAChB,SAAS,KAAKA;EACd,UAAU,KAAKA;EACf,UAAU,KAAKA;EAEf,gBAAgB,KAAKA;EACrB,iBAAiB,KAAKA;EACtB,cAAc,KAAKA;EACnB,mBAAmB,KAAKA;EACxB,iBAAiB,KAAKA;EACtB,kBAAkB,KAAKA;EACvB,kBAAkB,KAAKA;EAEvB,OAAO;EACP,UAAU,KAAKA;EAEf,SAAS;EACT,OAAO"}
|
package/dist/form/types.d.mts
CHANGED
|
@@ -9,7 +9,6 @@ import { MaybePromise } from "@stryke/types/base";
|
|
|
9
9
|
import { SelectOption, SelectOptionValue } from "@stryke/types/form";
|
|
10
10
|
import { IsPlainObject } from "@stryke/types/object";
|
|
11
11
|
import { ValidationDetail } from "@stryke/types/validations";
|
|
12
|
-
//#region src/form/types.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* "server" is only intended for SSR/SSG validation and should not execute anything
|
|
15
14
|
*/
|
|
@@ -290,6 +289,5 @@ interface FieldAtoms<TFieldValue> {
|
|
|
290
289
|
invalid: Atom<boolean>;
|
|
291
290
|
valid: Atom<boolean>;
|
|
292
291
|
}
|
|
293
|
-
//#endregion
|
|
294
292
|
export { CallbackContext, FieldAtoms, FieldChangeEventHandler, FieldOptions, FieldOptionsState, FieldStatus, FormAtoms, FormOptions, FormOptionsState, FormValuesState, InferFieldState, InferFormState, ValidationCause, ValidationResults, Validator };
|
|
295
293
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/form/types.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@cyclone-ui/helpers";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/form/types.ts
|
|
4
4
|
const ValidationCause = {
|
|
5
5
|
INITIALIZE: "initialize",
|
|
6
6
|
CHANGE: "change",
|
|
@@ -9,6 +9,5 @@ const ValidationCause = {
|
|
|
9
9
|
SERVER: "server"
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { ValidationCause };
|
|
14
13
|
//# sourceMappingURL=types.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/form/utilities/abort-error.ts
|
|
2
2
|
/**
|
|
3
3
|
* Error used to cancel in-flight form validation when a provider unmounts.
|
|
4
4
|
*
|
|
@@ -11,5 +11,4 @@ var AbortError = class extends Error {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
//#endregion
|
|
15
14
|
exports.AbortError = AbortError;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/form/utilities/abort-error.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Error used to cancel in-flight form validation when a provider unmounts.
|
|
4
3
|
*
|
|
@@ -8,6 +7,5 @@ declare class AbortError extends Error {
|
|
|
8
7
|
name: string;
|
|
9
8
|
constructor(message?: string);
|
|
10
9
|
}
|
|
11
|
-
//#endregion
|
|
12
10
|
export { AbortError };
|
|
13
11
|
//# sourceMappingURL=abort-error.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort-error.d.cts","names":[],"sources":["../../../src/form/utilities/abort-error.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"abort-error.d.cts","names":[],"sources":["../../../src/form/utilities/abort-error.ts"],"mappings":";;;;;cAuBa,mBAAmB;EACrB;EAEG,YAAA"}
|