@grasp-labs/ds-microfrontends-integration 0.8.0 → 0.9.0
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 +7 -10
- package/dist/components/schemaFields/SchemaFields.stories.d.ts +25 -0
- package/dist/components/schemaFields/VaultField.d.ts +8 -0
- package/dist/components/schemaFields/index.d.ts +1 -0
- package/dist/components/vault/VaultInput/VaultInput.d.ts +2 -1
- package/dist/components/vault/VaultInput/VaultInput.stories.d.ts +2 -0
- package/dist/{index-8yHLPV2n.js → index-B8LlhrN4.js} +869 -841
- package/dist/{index.esm-DgyjJxy1-CnakrFTI.js → index.esm-DgyjJxy1-D8dr4I8d.js} +1 -1
- package/dist/index.js +22 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -251,16 +251,13 @@ Skip the form entirely by setting `DEV_AUTH_TOKEN` (env var or `.env` file) befo
|
|
|
251
251
|
|
|
252
252
|
```
|
|
253
253
|
src/
|
|
254
|
-
├── components/
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
├──
|
|
259
|
-
├──
|
|
260
|
-
|
|
261
|
-
├── lib/ # Library utilities (schema, etc.)
|
|
262
|
-
└── mf-common.ts # Microfrontend configuration utilities
|
|
263
|
-
└── index.ts # Main entry point
|
|
254
|
+
├── components/ # React components (vault, translation, schema fields, etc.)
|
|
255
|
+
├── hooks/ # Custom React hooks
|
|
256
|
+
├── lib/ # JSON schema utilities and shared logic
|
|
257
|
+
├── types/ # TypeScript type definitions
|
|
258
|
+
├── utils/ # Shared helper functions
|
|
259
|
+
├── mf-common.ts # Microfrontend configuration utilities
|
|
260
|
+
└── index.ts # Main entry point
|
|
264
261
|
```
|
|
265
262
|
|
|
266
263
|
## 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 {};
|
|
@@ -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;
|