diff --git a/package.json b/package.json index ea32c12ad9..24a2b60991 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "@storybook/addon-essentials": "^8.6.11", "@storybook/addon-interactions": "^8.6.11", "@storybook/addon-links": "^8.6.11", - "@storybook/addon-svelte-csf": "^5.0.0-next.23", + "@storybook/addon-svelte-csf": "^5.0.10", "@storybook/addon-themes": "^8.6.11", "@storybook/blocks": "^8.6.11", "@storybook/icons": "^1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95722d4011..9b824bb2e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -170,7 +170,7 @@ importers: specifier: ^8.6.11 version: 8.6.15(react@18.3.1)(storybook@8.6.15(prettier@3.5.3)) '@storybook/addon-svelte-csf': - specifier: ^5.0.0-next.23 + specifier: ^5.0.10 version: 5.0.10(@storybook/svelte@8.6.15(storybook@8.6.15(prettier@3.5.3))(svelte@5.46.0))(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.46.0)(vite@6.4.1(@types/node@18.19.130)(jiti@1.21.7)(terser@5.44.1)(yaml@2.8.2)))(storybook@8.6.15(prettier@3.5.3))(svelte@5.46.0)(vite@6.4.1(@types/node@18.19.130)(jiti@1.21.7)(terser@5.44.1)(yaml@2.8.2)) '@storybook/addon-themes': specifier: ^8.6.11 diff --git a/src/lib/components/payload-input-with-encoding.svelte b/src/lib/components/payload-input-with-encoding.svelte index eb01dff1c7..26eddb5599 100644 --- a/src/lib/components/payload-input-with-encoding.svelte +++ b/src/lib/components/payload-input-with-encoding.svelte @@ -1,19 +1,12 @@ - - + +
+ + + + + + + + + + + + +

Activity Timeouts

+ + + + + + + + {#if $errors.startToCloseTimeout} +

+ {$errors.startToCloseTimeout} +

+ {/if} +
+ + {#if advancedOptionsVisible} + +
+

Custom Search Attributes

+

+ Indexed fields used in a List Filter to filter a list of Standalone + Activities. +

+
+ +
+ + +
+

User Metadata

+

+ Add context to Standalone Activities to help identify and understand + its operations. +

+
+
+
+
+
+
+ {/if} + +
+ + + +
+ diff --git a/src/lib/components/standalone-activity-form/types.ts b/src/lib/components/standalone-activity-form/types.ts new file mode 100644 index 0000000000..d2dee1f420 --- /dev/null +++ b/src/lib/components/standalone-activity-form/types.ts @@ -0,0 +1,19 @@ +import type { PayloadInputEncoding } from '$lib/models/payload-encoding'; +import type { SearchAttributeInput } from '$lib/stores/search-attributes'; + +export interface StandaloneActivityFormData { + identity: string; + namespace: string; + activityId: string; + taskQueue: string; + activityType: string; + startToCloseTimeout: string; + scheduleToCloseTimeout?: string; + scheduleToStartTimeout?: string; + input?: string; + encoding?: PayloadInputEncoding; + messageType?: string; + searchAttributes?: SearchAttributeInput[]; + summary?: string; + details?: string; +} diff --git a/src/lib/components/workflow/client-actions/signal-confirmation-modal.svelte b/src/lib/components/workflow/client-actions/signal-confirmation-modal.svelte index 8c36685900..c65bd3f643 100644 --- a/src/lib/components/workflow/client-actions/signal-confirmation-modal.svelte +++ b/src/lib/components/workflow/client-actions/signal-confirmation-modal.svelte @@ -1,14 +1,13 @@ -
+
{@render children?.()}
diff --git a/src/lib/holocene/duration-input/duration-input.mdx b/src/lib/holocene/duration-input/duration-input.mdx new file mode 100644 index 0000000000..9630cb4d1b --- /dev/null +++ b/src/lib/holocene/duration-input/duration-input.mdx @@ -0,0 +1,67 @@ +import { Meta } from '@storybook/blocks'; + +import DurationInput from './duration-input.stories.svelte'; + + + +# Duration Input + +`` allows specifying a Duration in seconds (eg: `"10s"`) while allowing input in varying units. + +By default, `` includes the following Unit options: + +- millisecond(s) +- second(s) +- minute(s) +- hour(s) + +When entering a value with "millisecond(s)" selected, the value will be converted to a `Duration`, eg. `1000` will be converted to `"1s"`. + +An array of custom `Units` can be passed if more options are needed. A `Unit` is described by a `label`, and a `convert` function, with the type signature: `(n: number) => number`. The job of the `convert` function is to convert the value in the selected unit to seconds. + +```svelte + + + + +``` + +The `` Props interface is generic, such that the type of the `initialUnit` prop can be inferred based on the array of `Units` passed in: + + +```svelte + + + + +/> +``` diff --git a/src/lib/holocene/duration-input/duration-input.stories.svelte b/src/lib/holocene/duration-input/duration-input.stories.svelte new file mode 100644 index 0000000000..6b44a4be99 --- /dev/null +++ b/src/lib/holocene/duration-input/duration-input.stories.svelte @@ -0,0 +1,51 @@ + + +{#snippet template(args: Args)} + +{/snippet} + + + + n / Math.pow(10, 9) }, + { label: 'Day(s)', convert: (n) => n * 86400 }, + { label: 'Week(s)', convert: (n) => n * 604800 }, + ], + initialUnit: 'Day(s)', + }} +/> diff --git a/src/lib/holocene/duration-input/duration-input.svelte b/src/lib/holocene/duration-input/duration-input.svelte new file mode 100644 index 0000000000..b2e01af156 --- /dev/null +++ b/src/lib/holocene/duration-input/duration-input.svelte @@ -0,0 +1,137 @@ + + + + +
+
diff --git a/src/lib/holocene/icon/svg/activity.svelte b/src/lib/holocene/icon/svg/activity.svelte index ac1a65d8e6..2007b665e6 100644 --- a/src/lib/holocene/icon/svg/activity.svelte +++ b/src/lib/holocene/icon/svg/activity.svelte @@ -5,7 +5,7 @@ diff --git a/src/lib/holocene/navigation/navigation-container.svelte b/src/lib/holocene/navigation/navigation-container.svelte index 2f9e76dcc6..d12a476c7f 100644 --- a/src/lib/holocene/navigation/navigation-container.svelte +++ b/src/lib/holocene/navigation/navigation-container.svelte @@ -24,7 +24,7 @@