@grasp-labs/ds-microfrontends-integration 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -253,16 +253,13 @@ After a successful login, the middleware redirects to `process.env.VITE_BASE_PAT
253
253
 
254
254
  ```
255
255
  src/
256
- ├── components/ # React components
257
- ├── translation/ # Translation system
258
- ├── vault/ # Vault secret management
259
- │ └── SchemaFields/ # JSON Schema form fields
260
- ├── hooks/ # Custom React hooks
261
- ├── types/ # TypeScript type definitions
262
- ├── utils/ # Utility functions
263
- ├── lib/ # Library utilities (schema, etc.)
264
- └── mf-common.ts # Microfrontend configuration utilities
265
- └── index.ts # Main entry point
256
+ ├── components/ # React components (vault, translation, schema fields, etc.)
257
+ ├── hooks/ # Custom React hooks
258
+ ├── lib/ # JSON schema utilities and shared logic
259
+ ├── types/ # TypeScript type definitions
260
+ ├── utils/ # Shared helper functions
261
+ ├── mf-common.ts # Microfrontend configuration utilities
262
+ └── index.ts # Main entry point
266
263
  ```
267
264
 
268
265
  ## Contributing
@@ -0,0 +1,25 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { Schema } from 'src/types';
3
+ type SchemaFieldsExampleProps = {
4
+ schema: Schema;
5
+ defaultValues: Record<string, unknown>;
6
+ };
7
+ declare const meta: {
8
+ title: string;
9
+ component: ({ schema, defaultValues, }: SchemaFieldsExampleProps) => import("react/jsx-runtime").JSX.Element;
10
+ parameters: {
11
+ layout: string;
12
+ };
13
+ tags: string[];
14
+ decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
15
+ schema: Schema;
16
+ defaultValues: Record<string, unknown>;
17
+ }>, context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
18
+ schema: Schema;
19
+ defaultValues: Record<string, unknown>;
20
+ }>) => import("react/jsx-runtime").JSX.Element)[];
21
+ };
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+ export declare const BasicForm: Story;
25
+ export declare const NestedWithVault: Story;
@@ -0,0 +1,8 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { FieldDescriptor } from 'src/lib/schema';
3
+ type VaultFieldProps = {
4
+ descriptor: FieldDescriptor;
5
+ control: Control;
6
+ };
7
+ export declare function VaultField({ descriptor, control }: VaultFieldProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -6,3 +6,4 @@ export { JsonField } from './JsonField';
6
6
  export { NumberField } from './NumberField';
7
7
  export { SchemaFields } from './SchemaFields';
8
8
  export { TextField } from './TextField';
9
+ export { VaultField } from './VaultField';
@@ -4,6 +4,7 @@ export type SecretOption = BaseOption & {
4
4
  };
5
5
  export type VaultInputProps = {
6
6
  id?: string;
7
+ name?: string;
7
8
  value?: string;
8
9
  onChange?: (secretId: string | null) => void;
9
10
  placeholder?: string;
@@ -16,4 +17,4 @@ export type VaultInputProps = {
16
17
  selectClassName?: string;
17
18
  toggleAriaLabel?: string;
18
19
  };
19
- export declare const VaultInput: ({ id, value, onChange, placeholder, label, error, disabled, disableSearch, hideAddButton, className, selectClassName, toggleAriaLabel, }: VaultInputProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const VaultInput: ({ id, name, value, onChange, placeholder, label, error, disabled, disableSearch, hideAddButton, className, selectClassName, toggleAriaLabel, }: VaultInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -8,6 +8,7 @@ declare const meta: {
8
8
  tags: string[];
9
9
  decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
10
10
  id?: string | undefined;
11
+ name?: string | undefined;
11
12
  value?: string | undefined;
12
13
  onChange?: ((secretId: string | null) => void) | undefined;
13
14
  placeholder?: string | undefined;
@@ -26,6 +27,7 @@ declare const meta: {
26
27
  errorMessage?: string | undefined;
27
28
  }>, context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
28
29
  id?: string | undefined;
30
+ name?: string | undefined;
29
31
  value?: string | undefined;
30
32
  onChange?: ((secretId: string | null) => void) | undefined;
31
33
  placeholder?: string | undefined;
@@ -5,6 +5,5 @@ export type VaultSecretDialogProps = {
5
5
  secret?: Secret | null;
6
6
  onSecretCreated?: (secret: Secret) => void;
7
7
  onSecretUpdated?: (secret: Secret) => void;
8
- onSecretDeleted?: (id: string) => void;
9
8
  };
10
- export declare const VaultSecretDialog: ({ isOpen, onClose, secret, onSecretCreated, onSecretUpdated, onSecretDeleted, }: VaultSecretDialogProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const VaultSecretDialog: ({ isOpen, onClose, secret, onSecretCreated, onSecretUpdated, }: VaultSecretDialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
2
2
  import { Secret } from '../../../types';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ isOpen, onClose, secret, onSecretCreated, onSecretUpdated, onSecretDeleted, }: import('./VaultSecretDialog').VaultSecretDialogProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ isOpen, onClose, secret, onSecretCreated, onSecretUpdated, }: import('./VaultSecretDialog').VaultSecretDialogProps) => import("react/jsx-runtime").JSX.Element;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
@@ -12,14 +12,12 @@ declare const meta: {
12
12
  secret?: (Secret | null) | undefined;
13
13
  onSecretCreated?: ((secret: Secret) => void) | undefined;
14
14
  onSecretUpdated?: ((secret: Secret) => void) | undefined;
15
- onSecretDeleted?: ((id: string) => void) | undefined;
16
15
  }>, context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
17
16
  isOpen: boolean;
18
17
  onClose: () => void;
19
18
  secret?: (Secret | null) | undefined;
20
19
  onSecretCreated?: ((secret: Secret) => void) | undefined;
21
20
  onSecretUpdated?: ((secret: Secret) => void) | undefined;
22
- onSecretDeleted?: ((id: string) => void) | undefined;
23
21
  }>) => import("react/jsx-runtime").JSX.Element)[];
24
22
  tags: string[];
25
23
  args: {
@@ -27,7 +25,6 @@ declare const meta: {
27
25
  onClose: () => void;
28
26
  onSecretCreated: (secret: Secret) => void;
29
27
  onSecretUpdated: (secret: Secret) => void;
30
- onSecretDeleted: (id: string) => void;
31
28
  };
32
29
  };
33
30
  export default meta;