@happyvertical/smrt-svelte 0.53.1 → 0.53.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -15
- package/dist/__tests__/app-state.test.js +0 -156
- package/dist/__tests__/data-surface-bridge.test.js +0 -351
- package/dist/__tests__/provider-mode-harness.svelte +0 -14
- package/dist/__tests__/provider-mode-harness.svelte.d.ts +0 -11
- package/dist/__tests__/provider-mode-harness.svelte.d.ts.map +0 -1
- package/dist/__tests__/provider-mode-probe.svelte +0 -13
- package/dist/__tests__/provider-mode-probe.svelte.d.ts +0 -8
- package/dist/__tests__/provider-mode-probe.svelte.d.ts.map +0 -1
- package/dist/__tests__/provider-webmcp-harness.svelte +0 -14
- package/dist/__tests__/provider-webmcp-harness.svelte.d.ts +0 -8
- package/dist/__tests__/provider-webmcp-harness.svelte.d.ts.map +0 -1
- package/dist/__tests__/success-never-text.test.js +0 -100
- package/dist/__tests__/warm-clients.test.js +0 -186
- package/dist/browser-ai/adapters/llm/bitgpu-inference-backend.test.js +0 -464
- package/dist/browser-ai/adapters/llm/webllm-inference-backend.test.js +0 -646
- package/dist/browser-ai/adapters/stt/browser-speech.test.js +0 -113
- package/dist/browser-ai/adapters/stt/dictation-source.test.js +0 -52
- package/dist/browser-ai/svelte/components/__tests__/ModelStatusControl.test.js +0 -172
- package/dist/components/board/__tests__/Board.test.js +0 -498
- package/dist/components/board/__tests__/BoardSsrHarness.svelte +0 -30
- package/dist/components/board/__tests__/BoardSsrHarness.svelte.d.ts +0 -19
- package/dist/components/board/__tests__/BoardSsrHarness.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/AddressInput.behavior.test.js +0 -216
- package/dist/components/forms/__tests__/CheckboxInput.test.js +0 -92
- package/dist/components/forms/__tests__/DateRangeInput.behavior.test.js +0 -135
- package/dist/components/forms/__tests__/DateTimeInput.behavior.test.js +0 -113
- package/dist/components/forms/__tests__/FileUpload.error-alert.test.js +0 -37
- package/dist/components/forms/__tests__/FileUpload.native-form.test.js +0 -249
- package/dist/components/forms/__tests__/FileUpload.test.js +0 -90
- package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte +0 -24
- package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte.d.ts +0 -10
- package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/Form.behavior.test.js +0 -137
- package/dist/components/forms/__tests__/Form.extraction.test.js +0 -68
- package/dist/components/forms/__tests__/Form.stt-error.test.js +0 -57
- package/dist/components/forms/__tests__/Form.test.js +0 -86
- package/dist/components/forms/__tests__/Form.ui-controls.test.js +0 -119
- package/dist/components/forms/__tests__/Form.webmcp.test.js +0 -2336
- package/dist/components/forms/__tests__/FormMicButton.test.js +0 -92
- package/dist/components/forms/__tests__/FormScope.test.js +0 -39
- package/dist/components/forms/__tests__/MeasurementInput.behavior.test.js +0 -129
- package/dist/components/forms/__tests__/MoneyInput.behavior.test.js +0 -124
- package/dist/components/forms/__tests__/NumberInput.behavior.test.js +0 -151
- package/dist/components/forms/__tests__/PhoneInput.behavior.test.js +0 -96
- package/dist/components/forms/__tests__/SearchInput.test.js +0 -79
- package/dist/components/forms/__tests__/SelectInput.behavior.test.js +0 -132
- package/dist/components/forms/__tests__/TextInput.behavior.test.js +0 -131
- package/dist/components/forms/__tests__/TextareaInput.behavior.test.js +0 -96
- package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte +0 -30
- package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte.d.ts +0 -7
- package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/async-validation-form.fixture.svelte +0 -19
- package/dist/components/forms/__tests__/async-validation-form.fixture.svelte.d.ts +0 -9
- package/dist/components/forms/__tests__/async-validation-form.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte +0 -21
- package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte.d.ts +0 -8
- package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/composite-inputs-a11y.test.js +0 -69
- package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte +0 -27
- package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte.d.ts +0 -9
- package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte +0 -48
- package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte.d.ts +0 -10
- package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte +0 -26
- package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte.d.ts +0 -13
- package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte +0 -52
- package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.d.ts +0 -16
- package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-scope.fixture.svelte +0 -30
- package/dist/components/forms/__tests__/form-scope.fixture.svelte.d.ts +0 -10
- package/dist/components/forms/__tests__/form-scope.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-fields.fixture.svelte +0 -158
- package/dist/components/forms/__tests__/form-with-fields.fixture.svelte.d.ts +0 -51
- package/dist/components/forms/__tests__/form-with-fields.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte +0 -24
- package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte.d.ts +0 -11
- package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte +0 -105
- package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte.d.ts +0 -42
- package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte +0 -84
- package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte.d.ts +0 -14
- package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte +0 -44
- package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte.d.ts +0 -9
- package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/mic-keyboard-a11y.test.js +0 -74
- package/dist/components/forms/__tests__/policy-field.fixture.svelte +0 -35
- package/dist/components/forms/__tests__/policy-field.fixture.svelte.d.ts +0 -8
- package/dist/components/forms/__tests__/policy-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/rich-inputs-a11y.test.js +0 -87
- package/dist/components/settings/__tests__/SettingsCatalog.test.js +0 -69
- package/dist/components/settings/__tests__/catalog.test.js +0 -46
- package/dist/components/workspace/__tests__/AdminShell.responsive.test.js +0 -597
- package/dist/components/workspace/__tests__/AdminShell.test.js +0 -572
- package/dist/components/workspace/__tests__/RoleShell.test.js +0 -772
- package/dist/components/workspace/__tests__/TenantNav.test.js +0 -208
- package/dist/components/workspace/__tests__/WorkspaceAccountMenu.test.js +0 -79
- package/dist/components/workspace/__tests__/WorkspaceShell.test.js +0 -630
- package/dist/components/workspace/__tests__/admin-shell-header-overflow.test.js +0 -25
- package/dist/components/workspace/__tests__/admin-shell-hotkeys.test.js +0 -34
- package/dist/components/workspace/__tests__/admin-shell-mobile.test.js +0 -217
- package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte +0 -52
- package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte.d.ts +0 -23
- package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/admin-shell-page-contracts.test.js +0 -30
- package/dist/components/workspace/__tests__/admin-shell-responsive-state.test.js +0 -184
- package/dist/components/workspace/__tests__/admin-shell-settings.test.js +0 -25
- package/dist/components/workspace/__tests__/admin-shell-state.test.js +0 -286
- package/dist/components/workspace/__tests__/admin-shell-theme-hooks.test.js +0 -36
- package/dist/components/workspace/__tests__/breadcrumbs-helpers.test.js +0 -141
- package/dist/components/workspace/__tests__/context-forwarding-harness.svelte +0 -45
- package/dist/components/workspace/__tests__/context-forwarding-harness.svelte.d.ts +0 -21
- package/dist/components/workspace/__tests__/context-forwarding-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/define-tools-dock.test.js +0 -1188
- package/dist/components/workspace/__tests__/harness.svelte +0 -25
- package/dist/components/workspace/__tests__/harness.svelte.d.ts +0 -14
- package/dist/components/workspace/__tests__/harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/index.test.js +0 -28
- package/dist/components/workspace/__tests__/legacy-index.test.js +0 -9
- package/dist/components/workspace/__tests__/manifest-nav-helpers.test.js +0 -24
- package/dist/components/workspace/__tests__/manifest-nav.test.js +0 -599
- package/dist/components/workspace/__tests__/nav-helpers.test.js +0 -95
- package/dist/components/workspace/__tests__/render-harness.svelte +0 -66
- package/dist/components/workspace/__tests__/render-harness.svelte.d.ts +0 -32
- package/dist/components/workspace/__tests__/render-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/render-tools-dock.test.js +0 -260
- package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte +0 -58
- package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte.d.ts +0 -16
- package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte +0 -41
- package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte.d.ts +0 -13
- package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/shell-chrome-components.test.js +0 -108
- package/dist/components/workspace/__tests__/system-feed.test.js +0 -327
- package/dist/components/workspace/__tests__/test-icon.svelte +0 -17
- package/dist/components/workspace/__tests__/test-icon.svelte.d.ts +0 -19
- package/dist/components/workspace/__tests__/test-icon.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte +0 -38
- package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte.d.ts +0 -22
- package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.d.ts +0 -66
- package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.js +0 -115
- package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.d.ts +0 -15
- package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.js +0 -7
- package/dist/components/workspace/__tests__/typed-tool-fixture.test.js +0 -115
- package/dist/components/workspace/__tests__/use-harness-orphan.svelte +0 -9
- package/dist/components/workspace/__tests__/use-harness-orphan.svelte.d.ts +0 -19
- package/dist/components/workspace/__tests__/use-harness-orphan.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/use-harness.svelte +0 -23
- package/dist/components/workspace/__tests__/use-harness.svelte.d.ts +0 -8
- package/dist/components/workspace/__tests__/use-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/use-tools-dock.test.js +0 -33
- package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte +0 -43
- package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte.d.ts +0 -11
- package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/server/__tests__/compose-availability.test.js +0 -383
- package/dist/components/workspace/server/__tests__/typed-context-fixture.d.ts +0 -78
- package/dist/components/workspace/server/__tests__/typed-context-fixture.d.ts.map +0 -1
- package/dist/components/workspace/server/__tests__/typed-context-fixture.js +0 -104
- package/dist/hooks/__tests__/stt-consumer.fixture.svelte +0 -25
- package/dist/hooks/__tests__/stt-consumer.fixture.svelte.d.ts +0 -15
- package/dist/hooks/__tests__/stt-consumer.fixture.svelte.d.ts.map +0 -1
- package/dist/hooks/__tests__/stt-ownership-harness.svelte +0 -42
- package/dist/hooks/__tests__/stt-ownership-harness.svelte.d.ts +0 -20
- package/dist/hooks/__tests__/stt-ownership-harness.svelte.d.ts.map +0 -1
- package/dist/hooks/__tests__/useSTT-ownership.test.js +0 -102
- package/dist/i18n/__tests__/server.spec.js +0 -57
- package/dist/internal/logger.test.js +0 -54
- package/dist/provider-mode.test.js +0 -86
- package/dist/provider-webmcp.test.js +0 -244
- package/dist/state/__tests__/app-state-ai-lifecycle.test.js +0 -240
- package/dist/state/__tests__/warm-clients.test.js +0 -40
- package/dist/web/__tests__/activity-feed-harness.svelte +0 -32
- package/dist/web/__tests__/activity-feed-harness.svelte.d.ts +0 -18
- package/dist/web/__tests__/activity-feed-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/activity-feed.integration.svelte.test.js +0 -190
- package/dist/web/__tests__/activity-feed.svelte.test.js +0 -235
- package/dist/web/__tests__/assistant-dock.integration.svelte.test.js +0 -204
- package/dist/web/__tests__/data-surface-conformance.integration.svelte.test.js +0 -1392
- package/dist/web/__tests__/harness.svelte +0 -25
- package/dist/web/__tests__/harness.svelte.d.ts +0 -15
- package/dist/web/__tests__/harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/list-data-surface.fixture.svelte +0 -59
- package/dist/web/__tests__/list-data-surface.fixture.svelte.d.ts +0 -14
- package/dist/web/__tests__/list-data-surface.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/list-data-surface.svelte.test.js +0 -106
- package/dist/web/__tests__/list-data-surface.test.js +0 -651
- package/dist/web/__tests__/list-sort-surface.fixture.svelte +0 -41
- package/dist/web/__tests__/list-sort-surface.fixture.svelte.d.ts +0 -15
- package/dist/web/__tests__/list-sort-surface.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/list-sort-surface.svelte.test.js +0 -59
- package/dist/web/__tests__/live-collection.svelte.test.js +0 -185
- package/dist/web/__tests__/provider-ui-registry.fixture.svelte +0 -43
- package/dist/web/__tests__/provider-ui-registry.fixture.svelte.d.ts +0 -13
- package/dist/web/__tests__/provider-ui-registry.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/provider-ui-registry.test.js +0 -235
- package/dist/web/__tests__/remote-query-harness.svelte +0 -27
- package/dist/web/__tests__/remote-query-harness.svelte.d.ts +0 -11
- package/dist/web/__tests__/remote-query-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/remote-query.svelte.test.js +0 -101
- package/dist/web/__tests__/surfaces.child.fixture.svelte +0 -69
- package/dist/web/__tests__/surfaces.child.fixture.svelte.d.ts +0 -16
- package/dist/web/__tests__/surfaces.child.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/surfaces.fixture.svelte +0 -26
- package/dist/web/__tests__/surfaces.fixture.svelte.d.ts +0 -18
- package/dist/web/__tests__/surfaces.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/surfaces.svelte.test.js +0 -140
- package/dist/web/__tests__/update-available-harness.svelte +0 -46
- package/dist/web/__tests__/update-available-harness.svelte.d.ts +0 -22
- package/dist/web/__tests__/update-available-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/update-available.svelte.test.js +0 -137
- package/dist/web/__tests__/view-intent-provider.fixture.svelte +0 -28
- package/dist/web/__tests__/view-intent-provider.fixture.svelte.d.ts +0 -13
- package/dist/web/__tests__/view-intent-provider.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/view-intent.fixture.svelte +0 -33
- package/dist/web/__tests__/view-intent.fixture.svelte.d.ts +0 -15
- package/dist/web/__tests__/view-intent.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/view-intent.intents.d.ts +0 -14
- package/dist/web/__tests__/view-intent.intents.d.ts.map +0 -1
- package/dist/web/__tests__/view-intent.intents.js +0 -38
- package/dist/web/__tests__/view-intent.svelte.test.js +0 -244
- package/dist/web/__tests__/webmcp-composed.child.fixture.svelte +0 -73
- package/dist/web/__tests__/webmcp-composed.child.fixture.svelte.d.ts +0 -8
- package/dist/web/__tests__/webmcp-composed.child.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-composed.fixture.svelte +0 -52
- package/dist/web/__tests__/webmcp-composed.fixture.svelte.d.ts +0 -12
- package/dist/web/__tests__/webmcp-composed.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-composed.integration.svelte.test.js +0 -251
- package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte +0 -16
- package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte.d.ts +0 -19
- package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte +0 -11
- package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte.d.ts +0 -8
- package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte +0 -20
- package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte.d.ts +0 -7
- package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-harness-unannotated.svelte +0 -14
- package/dist/web/__tests__/webmcp-harness-unannotated.svelte.d.ts +0 -19
- package/dist/web/__tests__/webmcp-harness-unannotated.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-harness.svelte +0 -18
- package/dist/web/__tests__/webmcp-harness.svelte.d.ts +0 -7
- package/dist/web/__tests__/webmcp-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-ssr.fixture.svelte +0 -13
- package/dist/web/__tests__/webmcp-ssr.fixture.svelte.d.ts +0 -19
- package/dist/web/__tests__/webmcp-ssr.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-ui.test.js +0 -723
- package/dist/web/__tests__/webmcp.test.js +0 -234
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { onMount } from 'svelte';
|
|
3
|
-
import {
|
|
4
|
-
type FieldDefinition,
|
|
5
|
-
getFormContext,
|
|
6
|
-
tryGetFormContext,
|
|
7
|
-
} from '../../../state/form-context.js';
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
name,
|
|
11
|
-
label,
|
|
12
|
-
legacyCleanup = false,
|
|
13
|
-
separateLegacyCleanupContext = false,
|
|
14
|
-
}: {
|
|
15
|
-
name: string;
|
|
16
|
-
label: string;
|
|
17
|
-
legacyCleanup?: boolean;
|
|
18
|
-
separateLegacyCleanupContext?: boolean;
|
|
19
|
-
} = $props();
|
|
20
|
-
|
|
21
|
-
let value = $state('');
|
|
22
|
-
const formContext = tryGetFormContext();
|
|
23
|
-
// Legacy helpers sometimes obtain the context again for teardown. The accessors
|
|
24
|
-
// must retain this component's ownership boundary across both calls.
|
|
25
|
-
// svelte-ignore state_referenced_locally
|
|
26
|
-
const cleanupContext = separateLegacyCleanupContext
|
|
27
|
-
? getFormContext()
|
|
28
|
-
: formContext;
|
|
29
|
-
|
|
30
|
-
onMount(() => {
|
|
31
|
-
const field: FieldDefinition = {
|
|
32
|
-
name,
|
|
33
|
-
type: 'text',
|
|
34
|
-
label,
|
|
35
|
-
setValue: (next) => {
|
|
36
|
-
value = String(next ?? '');
|
|
37
|
-
},
|
|
38
|
-
getValue: () => value,
|
|
39
|
-
};
|
|
40
|
-
const dispose = formContext?.registerField(field);
|
|
41
|
-
if (!formContext) return;
|
|
42
|
-
return legacyCleanup
|
|
43
|
-
? () => cleanupContext?.unregisterField(field.name)
|
|
44
|
-
: dispose;
|
|
45
|
-
});
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<input {name} aria-label={label} bind:value />
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
name: string;
|
|
3
|
-
label: string;
|
|
4
|
-
legacyCleanup?: boolean;
|
|
5
|
-
separateLegacyCleanupContext?: boolean;
|
|
6
|
-
};
|
|
7
|
-
declare const CustomRegistrationField: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
-
type CustomRegistrationField = ReturnType<typeof CustomRegistrationField>;
|
|
9
|
-
export default CustomRegistrationField;
|
|
10
|
-
//# sourceMappingURL=custom-registration-field.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-registration-field.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/custom-registration-field.fixture.svelte.ts"],"names":[],"mappings":"AAUC,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC,CAAC;AA2CF,QAAA,MAAM,uBAAuB,sDAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import DateRangeInput from '../DateRangeInput.svelte';
|
|
3
|
-
import Form from '../Form.svelte';
|
|
4
|
-
import NumberInput from '../NumberInput.svelte';
|
|
5
|
-
import TextInput from '../TextInput.svelte';
|
|
6
|
-
|
|
7
|
-
let {
|
|
8
|
-
onagechange,
|
|
9
|
-
ondateschange,
|
|
10
|
-
ontextchange,
|
|
11
|
-
showDateRange = false,
|
|
12
|
-
}: {
|
|
13
|
-
onagechange?: (value: number | null) => void;
|
|
14
|
-
ondateschange?: (value: { startDate: string; endDate: string }) => void;
|
|
15
|
-
ontextchange?: (value: string) => void;
|
|
16
|
-
showDateRange?: boolean;
|
|
17
|
-
} = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<Form showFormListen sttAdapter="browser-speech">
|
|
21
|
-
<NumberInput name="age" label="Age" onchange={onagechange} />
|
|
22
|
-
{#if showDateRange}
|
|
23
|
-
<DateRangeInput name="dates" label="Dates" onchange={ondateschange} />
|
|
24
|
-
{/if}
|
|
25
|
-
<TextInput name="fullname" label="Full name" onchange={ontextchange} />
|
|
26
|
-
</Form>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
onagechange?: (value: number | null) => void;
|
|
3
|
-
ondateschange?: (value: {
|
|
4
|
-
startDate: string;
|
|
5
|
-
endDate: string;
|
|
6
|
-
}) => void;
|
|
7
|
-
ontextchange?: (value: string) => void;
|
|
8
|
-
showDateRange?: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare const FormExtractionValues: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
-
type FormExtractionValues = ReturnType<typeof FormExtractionValues>;
|
|
12
|
-
export default FormExtractionValues;
|
|
13
|
-
//# sourceMappingURL=form-extraction-values.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-extraction-values.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/form-extraction-values.fixture.svelte.ts"],"names":[],"mappings":"AAQC,KAAK,gBAAgB,GAAI;IACxB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAyBF,QAAA,MAAM,oBAAoB,sDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
3
|
-
import Form from '../Form.svelte';
|
|
4
|
-
import TextInput from '../TextInput.svelte';
|
|
5
|
-
import CompoundRegistrationWrapper from './compound-registration-wrapper.fixture.svelte';
|
|
6
|
-
import CustomRegistrationField from './custom-registration-field.fixture.svelte';
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
interactionRegistry,
|
|
10
|
-
firstName = 'first',
|
|
11
|
-
showFirst = true,
|
|
12
|
-
showReplacement = false,
|
|
13
|
-
showCustomFirst = false,
|
|
14
|
-
showCustomReplacement = false,
|
|
15
|
-
legacyCustomCleanup = false,
|
|
16
|
-
separateLegacyCleanupContext = false,
|
|
17
|
-
compoundLegacyCustom = false,
|
|
18
|
-
}: {
|
|
19
|
-
interactionRegistry: ControlInteractionRegistry;
|
|
20
|
-
firstName?: string;
|
|
21
|
-
showFirst?: boolean;
|
|
22
|
-
showReplacement?: boolean;
|
|
23
|
-
showCustomFirst?: boolean;
|
|
24
|
-
showCustomReplacement?: boolean;
|
|
25
|
-
legacyCustomCleanup?: boolean;
|
|
26
|
-
separateLegacyCleanupContext?: boolean;
|
|
27
|
-
compoundLegacyCustom?: boolean;
|
|
28
|
-
} = $props();
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<Form {interactionRegistry} formId="registration-lifecycle">
|
|
32
|
-
{#if showFirst}
|
|
33
|
-
<TextInput name={firstName} label="First field" />
|
|
34
|
-
{/if}
|
|
35
|
-
{#if showReplacement}
|
|
36
|
-
<TextInput name="shared" label="Replacement field" />
|
|
37
|
-
{/if}
|
|
38
|
-
{#if compoundLegacyCustom}
|
|
39
|
-
<CompoundRegistrationWrapper
|
|
40
|
-
showFirst={showCustomFirst}
|
|
41
|
-
showReplacement={showCustomReplacement}
|
|
42
|
-
legacyCleanup={legacyCustomCleanup}
|
|
43
|
-
/>
|
|
44
|
-
{:else}
|
|
45
|
-
{#if showCustomFirst}
|
|
46
|
-
<CustomRegistrationField name="custom-shared" label="Custom first" legacyCleanup={legacyCustomCleanup} {separateLegacyCleanupContext} />
|
|
47
|
-
{/if}
|
|
48
|
-
{#if showCustomReplacement}
|
|
49
|
-
<CustomRegistrationField name="custom-shared" label="Custom replacement" legacyCleanup={legacyCustomCleanup} {separateLegacyCleanupContext} />
|
|
50
|
-
{/if}
|
|
51
|
-
{/if}
|
|
52
|
-
</Form>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
interactionRegistry: ControlInteractionRegistry;
|
|
4
|
-
firstName?: string;
|
|
5
|
-
showFirst?: boolean;
|
|
6
|
-
showReplacement?: boolean;
|
|
7
|
-
showCustomFirst?: boolean;
|
|
8
|
-
showCustomReplacement?: boolean;
|
|
9
|
-
legacyCustomCleanup?: boolean;
|
|
10
|
-
separateLegacyCleanupContext?: boolean;
|
|
11
|
-
compoundLegacyCustom?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const FormRegistrationLifecycle: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
|
-
type FormRegistrationLifecycle = ReturnType<typeof FormRegistrationLifecycle>;
|
|
15
|
-
export default FormRegistrationLifecycle;
|
|
16
|
-
//# sourceMappingURL=form-registration-lifecycle.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-registration-lifecycle.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAM9E,KAAK,gBAAgB,GAAI;IACxB,mBAAmB,EAAE,0BAA0B,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AA0CF,QAAA,MAAM,yBAAyB,sDAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
type ControlInteractionRegistry,
|
|
4
|
-
FormGroup,
|
|
5
|
-
Input,
|
|
6
|
-
} from '@happyvertical/smrt-ui/forms';
|
|
7
|
-
import FormScope from '../FormScope.svelte';
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
interactionRegistry = undefined,
|
|
11
|
-
showTown = true,
|
|
12
|
-
}: {
|
|
13
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
14
|
-
showTown?: boolean;
|
|
15
|
-
} = $props();
|
|
16
|
-
let name = $state('');
|
|
17
|
-
let town = $state('');
|
|
18
|
-
let secret = $state('');
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<FormScope formId="new-site" purpose="Start a new town site" {interactionRegistry}>
|
|
22
|
-
<div class="wizard">
|
|
23
|
-
<FormGroup label="Site name" id="site-name"><Input name="name" bind:value={name} /></FormGroup>
|
|
24
|
-
{#if showTown}
|
|
25
|
-
<FormGroup label="Town" id="site-town"><Input name="town" bind:value={town} /></FormGroup>
|
|
26
|
-
{/if}
|
|
27
|
-
<FormGroup label="Access key" id="site-key"><Input name="key" type="password" bind:value={secret} /></FormGroup>
|
|
28
|
-
<button type="button">Continue</button>
|
|
29
|
-
</div>
|
|
30
|
-
</FormScope>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
2
|
-
import FormScope from '../FormScope.svelte';
|
|
3
|
-
type $$ComponentProps = {
|
|
4
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
5
|
-
showTown?: boolean;
|
|
6
|
-
};
|
|
7
|
-
declare const FormScope: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
-
type FormScope = ReturnType<typeof FormScope>;
|
|
9
|
-
export default FormScope;
|
|
10
|
-
//# sourceMappingURL=form-scope.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-scope.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/form-scope.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,0BAA0B,EAGhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE3C,KAAK,gBAAgB,GAAI;IACxB,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA2BF,QAAA,MAAM,SAAS,sDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/** Test fixture (S11 #1416): a Form wrapping a TextInput + NumberInput so the
|
|
3
|
-
* Form's field-registration → value-collection → onsubmit contract can be
|
|
4
|
-
* exercised end-to-end (the submit handler reads each registered field's
|
|
5
|
-
* getValue()). */
|
|
6
|
-
import type { ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
7
|
-
import CheckboxInput from '../CheckboxInput.svelte';
|
|
8
|
-
import DateTimeInput from '../DateTimeInput.svelte';
|
|
9
|
-
import Form from '../Form.svelte';
|
|
10
|
-
import MoneyInput from '../MoneyInput.svelte';
|
|
11
|
-
import NumberInput from '../NumberInput.svelte';
|
|
12
|
-
import PhoneInput from '../PhoneInput.svelte';
|
|
13
|
-
import SelectInput from '../SelectInput.svelte';
|
|
14
|
-
import TextareaInput from '../TextareaInput.svelte';
|
|
15
|
-
import TextInput from '../TextInput.svelte';
|
|
16
|
-
|
|
17
|
-
let {
|
|
18
|
-
onsubmit = undefined,
|
|
19
|
-
method = undefined,
|
|
20
|
-
action = undefined,
|
|
21
|
-
textValue = '',
|
|
22
|
-
numberValue = null,
|
|
23
|
-
showAge = true,
|
|
24
|
-
showMoney = false,
|
|
25
|
-
showClearFields = false,
|
|
26
|
-
showScalarFields = false,
|
|
27
|
-
checkboxValue = true,
|
|
28
|
-
checkboxRequired = false,
|
|
29
|
-
selectValue = 'second',
|
|
30
|
-
selectRequired = false,
|
|
31
|
-
dateValue = '',
|
|
32
|
-
phoneValue = '',
|
|
33
|
-
notesValue = '',
|
|
34
|
-
notesAppendMode = false,
|
|
35
|
-
notesRequired = false,
|
|
36
|
-
moneyMin = undefined,
|
|
37
|
-
moneyMax = undefined,
|
|
38
|
-
webmcp = false,
|
|
39
|
-
textRequired = false,
|
|
40
|
-
textDisabled = false,
|
|
41
|
-
fieldsetDisabled = false,
|
|
42
|
-
formSubject = undefined,
|
|
43
|
-
ageRequired = false,
|
|
44
|
-
ageLabel = 'Age',
|
|
45
|
-
ageMin = undefined,
|
|
46
|
-
ageMax = undefined,
|
|
47
|
-
ageStep = undefined,
|
|
48
|
-
interactionRegistry = undefined,
|
|
49
|
-
ontextchange = undefined,
|
|
50
|
-
oncheckboxchange = undefined,
|
|
51
|
-
onselectchange = undefined,
|
|
52
|
-
onnoteschange = undefined,
|
|
53
|
-
onnumberchange = undefined,
|
|
54
|
-
}: {
|
|
55
|
-
onsubmit?: (data: Record<string, unknown>) => void;
|
|
56
|
-
method?: 'GET' | 'POST';
|
|
57
|
-
action?: string;
|
|
58
|
-
textValue?: string;
|
|
59
|
-
numberValue?: number | null;
|
|
60
|
-
showAge?: boolean;
|
|
61
|
-
showMoney?: boolean;
|
|
62
|
-
showClearFields?: boolean;
|
|
63
|
-
showScalarFields?: boolean;
|
|
64
|
-
checkboxValue?: boolean;
|
|
65
|
-
checkboxRequired?: boolean;
|
|
66
|
-
selectValue?: string;
|
|
67
|
-
selectRequired?: boolean;
|
|
68
|
-
dateValue?: string;
|
|
69
|
-
phoneValue?: string;
|
|
70
|
-
notesValue?: string;
|
|
71
|
-
notesAppendMode?: boolean;
|
|
72
|
-
notesRequired?: boolean;
|
|
73
|
-
moneyMin?: number;
|
|
74
|
-
moneyMax?: number;
|
|
75
|
-
webmcp?: boolean;
|
|
76
|
-
textRequired?: boolean;
|
|
77
|
-
textDisabled?: boolean;
|
|
78
|
-
fieldsetDisabled?: boolean;
|
|
79
|
-
formSubject?: { type: string; id: string; label?: string };
|
|
80
|
-
ageRequired?: boolean;
|
|
81
|
-
ageLabel?: string;
|
|
82
|
-
ageMin?: number;
|
|
83
|
-
ageMax?: number;
|
|
84
|
-
ageStep?: number;
|
|
85
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
86
|
-
ontextchange?: (value: string) => void;
|
|
87
|
-
oncheckboxchange?: (value: boolean) => void;
|
|
88
|
-
onselectchange?: (value: string) => void;
|
|
89
|
-
onnoteschange?: (value: string) => void;
|
|
90
|
-
onnumberchange?: (value: number | null) => void;
|
|
91
|
-
} = $props();
|
|
92
|
-
let lastSubject: { type: string; id: string; label?: string } | undefined;
|
|
93
|
-
let mutableSubject = $state<
|
|
94
|
-
{ type: string; id: string; label?: string } | undefined
|
|
95
|
-
>(undefined);
|
|
96
|
-
const mutateSubjectLabel = 'Mutate subject';
|
|
97
|
-
$effect(() => {
|
|
98
|
-
const nextSubject = formSubject;
|
|
99
|
-
if (nextSubject !== lastSubject) {
|
|
100
|
-
lastSubject = nextSubject;
|
|
101
|
-
mutableSubject = nextSubject ? { ...nextSubject } : undefined;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
function mutateSubject() {
|
|
105
|
-
if (mutableSubject) mutableSubject.id = 'person-mutated';
|
|
106
|
-
}
|
|
107
|
-
</script>
|
|
108
|
-
|
|
109
|
-
<Form {onsubmit} {method} {action} {webmcp} {interactionRegistry} subject={mutableSubject}>
|
|
110
|
-
<fieldset disabled={fieldsetDisabled}>
|
|
111
|
-
<TextInput
|
|
112
|
-
name="fullname"
|
|
113
|
-
label="Full name"
|
|
114
|
-
required={textRequired}
|
|
115
|
-
disabled={textDisabled}
|
|
116
|
-
onchange={ontextchange}
|
|
117
|
-
bind:value={textValue}
|
|
118
|
-
/>
|
|
119
|
-
{#if showAge}
|
|
120
|
-
<NumberInput
|
|
121
|
-
name="age"
|
|
122
|
-
label={ageLabel}
|
|
123
|
-
required={ageRequired}
|
|
124
|
-
min={ageMin}
|
|
125
|
-
max={ageMax}
|
|
126
|
-
step={ageStep}
|
|
127
|
-
onchange={onnumberchange}
|
|
128
|
-
bind:value={numberValue}
|
|
129
|
-
/>
|
|
130
|
-
{/if}
|
|
131
|
-
{#if showMoney}
|
|
132
|
-
<MoneyInput name="budget" label="Budget" min={moneyMin} max={moneyMax} />
|
|
133
|
-
{/if}
|
|
134
|
-
{#if showClearFields}
|
|
135
|
-
<CheckboxInput name="enabled" label="Enabled" required={checkboxRequired} onchange={oncheckboxchange} bind:checked={checkboxValue} />
|
|
136
|
-
<SelectInput
|
|
137
|
-
name="choice"
|
|
138
|
-
label="Choice"
|
|
139
|
-
required={selectRequired}
|
|
140
|
-
onchange={onselectchange}
|
|
141
|
-
options={[
|
|
142
|
-
{ value: 'first', label: 'First' },
|
|
143
|
-
{ value: 'second', label: 'Second' },
|
|
144
|
-
]}
|
|
145
|
-
bind:value={selectValue}
|
|
146
|
-
/>
|
|
147
|
-
{/if}
|
|
148
|
-
{#if showScalarFields}
|
|
149
|
-
<DateTimeInput name="appointment" label="Appointment" includeTime={false} bind:value={dateValue} />
|
|
150
|
-
<PhoneInput name="phone" label="Phone" bind:value={phoneValue} />
|
|
151
|
-
<TextareaInput name="notes" label="Notes" required={notesRequired} appendMode={notesAppendMode} onchange={onnoteschange} bind:value={notesValue} />
|
|
152
|
-
{/if}
|
|
153
|
-
</fieldset>
|
|
154
|
-
{#if mutableSubject}
|
|
155
|
-
<button type="button" onclick={mutateSubject}>{mutateSubjectLabel}</button>
|
|
156
|
-
{/if}
|
|
157
|
-
<button type="submit">Submit</button>
|
|
158
|
-
</Form>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/** Test fixture (S11 #1416): a Form wrapping a TextInput + NumberInput so the
|
|
2
|
-
* Form's field-registration → value-collection → onsubmit contract can be
|
|
3
|
-
* exercised end-to-end (the submit handler reads each registered field's
|
|
4
|
-
* getValue()). */
|
|
5
|
-
import type { ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
6
|
-
type $$ComponentProps = {
|
|
7
|
-
onsubmit?: (data: Record<string, unknown>) => void;
|
|
8
|
-
method?: 'GET' | 'POST';
|
|
9
|
-
action?: string;
|
|
10
|
-
textValue?: string;
|
|
11
|
-
numberValue?: number | null;
|
|
12
|
-
showAge?: boolean;
|
|
13
|
-
showMoney?: boolean;
|
|
14
|
-
showClearFields?: boolean;
|
|
15
|
-
showScalarFields?: boolean;
|
|
16
|
-
checkboxValue?: boolean;
|
|
17
|
-
checkboxRequired?: boolean;
|
|
18
|
-
selectValue?: string;
|
|
19
|
-
selectRequired?: boolean;
|
|
20
|
-
dateValue?: string;
|
|
21
|
-
phoneValue?: string;
|
|
22
|
-
notesValue?: string;
|
|
23
|
-
notesAppendMode?: boolean;
|
|
24
|
-
notesRequired?: boolean;
|
|
25
|
-
moneyMin?: number;
|
|
26
|
-
moneyMax?: number;
|
|
27
|
-
webmcp?: boolean;
|
|
28
|
-
textRequired?: boolean;
|
|
29
|
-
textDisabled?: boolean;
|
|
30
|
-
fieldsetDisabled?: boolean;
|
|
31
|
-
formSubject?: {
|
|
32
|
-
type: string;
|
|
33
|
-
id: string;
|
|
34
|
-
label?: string;
|
|
35
|
-
};
|
|
36
|
-
ageRequired?: boolean;
|
|
37
|
-
ageLabel?: string;
|
|
38
|
-
ageMin?: number;
|
|
39
|
-
ageMax?: number;
|
|
40
|
-
ageStep?: number;
|
|
41
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
42
|
-
ontextchange?: (value: string) => void;
|
|
43
|
-
oncheckboxchange?: (value: boolean) => void;
|
|
44
|
-
onselectchange?: (value: string) => void;
|
|
45
|
-
onnoteschange?: (value: string) => void;
|
|
46
|
-
onnumberchange?: (value: number | null) => void;
|
|
47
|
-
};
|
|
48
|
-
declare const FormWithFields: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
49
|
-
type FormWithFields = ReturnType<typeof FormWithFields>;
|
|
50
|
-
export default FormWithFields;
|
|
51
|
-
//# sourceMappingURL=form-with-fields.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-with-fields.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/form-with-fields.fixture.svelte.ts"],"names":[],"mappings":"AAGA;;;mBAGmB;AACnB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAW9E,KAAK,gBAAgB,GAAI;IACxB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACjD,CAAC;AAmGF,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
ControlInteractionRegistry,
|
|
4
|
-
ControlSensitivity,
|
|
5
|
-
} from '@happyvertical/smrt-ui/forms';
|
|
6
|
-
import Form from '../Form.svelte';
|
|
7
|
-
import PolicyField from './policy-field.fixture.svelte';
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
webmcp = false,
|
|
11
|
-
interactionRegistry,
|
|
12
|
-
sensitivity = 'public',
|
|
13
|
-
writable = true,
|
|
14
|
-
}: {
|
|
15
|
-
webmcp?: boolean;
|
|
16
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
17
|
-
sensitivity?: ControlSensitivity;
|
|
18
|
-
writable?: boolean;
|
|
19
|
-
} = $props();
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<Form {webmcp} {interactionRegistry} formId="policy-form">
|
|
23
|
-
<PolicyField sensitivity={sensitivity === 'secret' ? 'secret' : 'public'} {writable} />
|
|
24
|
-
</Form>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ControlInteractionRegistry, ControlSensitivity } from '@happyvertical/smrt-ui/forms';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
webmcp?: boolean;
|
|
4
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
5
|
-
sensitivity?: ControlSensitivity;
|
|
6
|
-
writable?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare const FormWithPolicyField: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
-
type FormWithPolicyField = ReturnType<typeof FormWithPolicyField>;
|
|
10
|
-
export default FormWithPolicyField;
|
|
11
|
-
//# sourceMappingURL=form-with-policy-field.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-with-policy-field.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/form-with-policy-field.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAIrC,KAAK,gBAAgB,GAAI;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAoBF,QAAA,MAAM,mBAAmB,sDAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
type ControlInteractionRegistry,
|
|
4
|
-
Input,
|
|
5
|
-
} from '@happyvertical/smrt-ui/forms';
|
|
6
|
-
import AddressInput from '../AddressInput.svelte';
|
|
7
|
-
import DateRangeInput from '../DateRangeInput.svelte';
|
|
8
|
-
import Form from '../Form.svelte';
|
|
9
|
-
import MeasurementInput from '../MeasurementInput.svelte';
|
|
10
|
-
import TextInput from '../TextInput.svelte';
|
|
11
|
-
|
|
12
|
-
let {
|
|
13
|
-
onsubmit = undefined,
|
|
14
|
-
webmcp = false,
|
|
15
|
-
addressFields = ['street', 'city', 'province', 'postalCode', 'country'],
|
|
16
|
-
addressCountries = undefined,
|
|
17
|
-
addressProvinces = undefined,
|
|
18
|
-
structuredRequired = true,
|
|
19
|
-
interactionRegistry = undefined,
|
|
20
|
-
fieldsetDisabled = false,
|
|
21
|
-
onmeasurementchange = undefined,
|
|
22
|
-
ondateschange = undefined,
|
|
23
|
-
onaddresschange = undefined,
|
|
24
|
-
measurementStep = undefined,
|
|
25
|
-
measurementUnits = undefined,
|
|
26
|
-
measurementLabel = 'Measurement',
|
|
27
|
-
measurementMin = undefined,
|
|
28
|
-
measurementMax = undefined,
|
|
29
|
-
minDate = undefined,
|
|
30
|
-
maxDate = undefined,
|
|
31
|
-
dateDisabled = false,
|
|
32
|
-
measurementName = 'measurement',
|
|
33
|
-
showCollidingSibling = false,
|
|
34
|
-
showExactNameCollisions = false,
|
|
35
|
-
showBaseControlCollision = false,
|
|
36
|
-
}: {
|
|
37
|
-
onsubmit?: (data: Record<string, unknown>) => void;
|
|
38
|
-
webmcp?: boolean;
|
|
39
|
-
addressFields?: Array<
|
|
40
|
-
'street' | 'city' | 'province' | 'postalCode' | 'country'
|
|
41
|
-
>;
|
|
42
|
-
addressCountries?: Array<{ value: string; label: string }>;
|
|
43
|
-
addressProvinces?: Array<{ value: string; label: string }>;
|
|
44
|
-
structuredRequired?: boolean;
|
|
45
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
46
|
-
fieldsetDisabled?: boolean;
|
|
47
|
-
onmeasurementchange?: (value: { value: number; unit: string } | null) => void;
|
|
48
|
-
ondateschange?: (value: { startDate: string; endDate: string }) => void;
|
|
49
|
-
onaddresschange?: (value: Partial<Record<string, string>>) => void;
|
|
50
|
-
measurementStep?: number;
|
|
51
|
-
measurementUnits?: Array<'ft' | 'in' | 'm' | 'cm' | 'mm' | 'yd'>;
|
|
52
|
-
measurementLabel?: string;
|
|
53
|
-
measurementMin?: number;
|
|
54
|
-
measurementMax?: number;
|
|
55
|
-
minDate?: string;
|
|
56
|
-
maxDate?: string;
|
|
57
|
-
dateDisabled?: boolean;
|
|
58
|
-
measurementName?: string;
|
|
59
|
-
showCollidingSibling?: boolean;
|
|
60
|
-
showExactNameCollisions?: boolean;
|
|
61
|
-
showBaseControlCollision?: boolean;
|
|
62
|
-
} = $props();
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<Form {onsubmit} {webmcp} {interactionRegistry} formId="structured-fields">
|
|
66
|
-
<fieldset disabled={fieldsetDisabled}>
|
|
67
|
-
<MeasurementInput
|
|
68
|
-
name={measurementName}
|
|
69
|
-
label={measurementLabel}
|
|
70
|
-
required={structuredRequired}
|
|
71
|
-
min={measurementMin}
|
|
72
|
-
max={measurementMax}
|
|
73
|
-
step={measurementStep}
|
|
74
|
-
units={measurementUnits}
|
|
75
|
-
onchange={onmeasurementchange}
|
|
76
|
-
/>
|
|
77
|
-
<DateRangeInput
|
|
78
|
-
name="dates"
|
|
79
|
-
label="Dates"
|
|
80
|
-
required={structuredRequired}
|
|
81
|
-
{minDate}
|
|
82
|
-
{maxDate}
|
|
83
|
-
disabled={dateDisabled}
|
|
84
|
-
onchange={ondateschange}
|
|
85
|
-
/>
|
|
86
|
-
<AddressInput
|
|
87
|
-
name="address"
|
|
88
|
-
label="Address"
|
|
89
|
-
fields={addressFields}
|
|
90
|
-
countries={addressCountries}
|
|
91
|
-
provinces={addressProvinces}
|
|
92
|
-
required={structuredRequired}
|
|
93
|
-
onchange={onaddresschange}
|
|
94
|
-
/>
|
|
95
|
-
</fieldset>
|
|
96
|
-
{#if showExactNameCollisions}
|
|
97
|
-
<TextInput name="address[city]" label="Exact address city" />
|
|
98
|
-
<TextInput name="{measurementName}_unit" label="Exact measurement unit" />
|
|
99
|
-
{/if}
|
|
100
|
-
{#if showBaseControlCollision}
|
|
101
|
-
<Input name="address[city]" data-testid="base-address-city" />
|
|
102
|
-
{/if}
|
|
103
|
-
{#if showCollidingSibling}<input name="{measurementName}_note" />{/if}
|
|
104
|
-
<button type="submit">Submit</button>
|
|
105
|
-
</Form>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
onsubmit?: (data: Record<string, unknown>) => void;
|
|
4
|
-
webmcp?: boolean;
|
|
5
|
-
addressFields?: Array<'street' | 'city' | 'province' | 'postalCode' | 'country'>;
|
|
6
|
-
addressCountries?: Array<{
|
|
7
|
-
value: string;
|
|
8
|
-
label: string;
|
|
9
|
-
}>;
|
|
10
|
-
addressProvinces?: Array<{
|
|
11
|
-
value: string;
|
|
12
|
-
label: string;
|
|
13
|
-
}>;
|
|
14
|
-
structuredRequired?: boolean;
|
|
15
|
-
interactionRegistry?: ControlInteractionRegistry;
|
|
16
|
-
fieldsetDisabled?: boolean;
|
|
17
|
-
onmeasurementchange?: (value: {
|
|
18
|
-
value: number;
|
|
19
|
-
unit: string;
|
|
20
|
-
} | null) => void;
|
|
21
|
-
ondateschange?: (value: {
|
|
22
|
-
startDate: string;
|
|
23
|
-
endDate: string;
|
|
24
|
-
}) => void;
|
|
25
|
-
onaddresschange?: (value: Partial<Record<string, string>>) => void;
|
|
26
|
-
measurementStep?: number;
|
|
27
|
-
measurementUnits?: Array<'ft' | 'in' | 'm' | 'cm' | 'mm' | 'yd'>;
|
|
28
|
-
measurementLabel?: string;
|
|
29
|
-
measurementMin?: number;
|
|
30
|
-
measurementMax?: number;
|
|
31
|
-
minDate?: string;
|
|
32
|
-
maxDate?: string;
|
|
33
|
-
dateDisabled?: boolean;
|
|
34
|
-
measurementName?: string;
|
|
35
|
-
showCollidingSibling?: boolean;
|
|
36
|
-
showExactNameCollisions?: boolean;
|
|
37
|
-
showBaseControlCollision?: boolean;
|
|
38
|
-
};
|
|
39
|
-
declare const FormWithStructuredFields: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
40
|
-
type FormWithStructuredFields = ReturnType<typeof FormWithStructuredFields>;
|
|
41
|
-
export default FormWithStructuredFields;
|
|
42
|
-
//# sourceMappingURL=form-with-structured-fields.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-with-structured-fields.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/__tests__/form-with-structured-fields.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,8BAA8B,CAAC;AAOrC,KAAK,gBAAgB,GAAI;IACxB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CACnB,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAC1D,CAAC;IACF,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,KAAK,CAAC,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAuDF,QAAA,MAAM,wBAAwB,sDAAwC,CAAC;AACvE,KAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC5E,eAAe,wBAAwB,CAAC"}
|