shinkansen-pinion 1.2.0 → 1.2.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/package.json +1 -1
- package/src/common/index.d.mts +1 -7
- package/src/components/cogs/checkbox/index.d.mts +1 -7
- package/src/components/cogs/email/index.d.mts +1 -7
- package/src/components/cogs/index.d.mts +8 -14
- package/src/components/cogs/number/index.d.mts +1 -7
- package/src/components/cogs/password/index.d.mts +1 -7
- package/src/components/cogs/radio/index.d.mts +1 -7
- package/src/components/cogs/select/index.d.mts +1 -7
- package/src/components/cogs/text/index.d.mts +1 -7
- package/src/components/cogs/textarea/index.d.mts +1 -7
- package/src/components/index.d.mts +2 -8
- package/src/components/sprockets/check-answers/index.d.mts +1 -14
- package/src/components/sprockets/error-summary/index.d.mts +1 -14
- package/src/components/sprockets/fieldset/index.d.mts +1 -14
- package/src/components/sprockets/index.d.mts +3 -9
- package/src/index.d.mts +3 -9
- package/src/pinion/index.d.mts +28 -41
- package/src/transformers/check-answers/index.d.mts +6 -6
- package/src/transformers/index.d.mts +3 -9
package/package.json
CHANGED
package/src/common/index.d.mts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { CheckboxCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/checkbox' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/checkbox'
|
|
7
|
-
}
|
|
1
|
+
export { CheckboxCog as default } from 'shinkansen-cogs'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { EmailCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/email' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/email'
|
|
7
|
-
}
|
|
1
|
+
export { EmailCog as default } from 'shinkansen-cogs'
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export { default as TextareaCog } from '#pinion/components/cogs/textarea'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module 'shinkansen-pinion/components/cogs' {
|
|
13
|
-
export * from '#pinion/components/cogs'
|
|
14
|
-
}
|
|
1
|
+
export { default as CheckboxCog } from '#pinion/components/cogs/checkbox'
|
|
2
|
+
export { default as EmailCog } from '#pinion/components/cogs/email'
|
|
3
|
+
export { default as NumberCog } from '#pinion/components/cogs/number'
|
|
4
|
+
export { default as PasswordCog } from '#pinion/components/cogs/password'
|
|
5
|
+
export { default as RadioCog } from '#pinion/components/cogs/radio'
|
|
6
|
+
export { default as SelectCog } from '#pinion/components/cogs/select'
|
|
7
|
+
export { default as TextCog } from '#pinion/components/cogs/text'
|
|
8
|
+
export { default as TextareaCog } from '#pinion/components/cogs/textarea'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { NumberCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/number' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/number'
|
|
7
|
-
}
|
|
1
|
+
export { NumberCog as default } from 'shinkansen-cogs'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { PasswordCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/password' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/password'
|
|
7
|
-
}
|
|
1
|
+
export { PasswordCog as default } from 'shinkansen-cogs'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { RadioCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/radio' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/radio'
|
|
7
|
-
}
|
|
1
|
+
export { RadioCog as default } from 'shinkansen-cogs'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { SelectCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/select' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/select'
|
|
7
|
-
}
|
|
1
|
+
export { SelectCog as default } from 'shinkansen-cogs'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { TextCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/text' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/text'
|
|
7
|
-
}
|
|
1
|
+
export { TextCog as default } from 'shinkansen-cogs'
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { TextareaCog as default } from 'shinkansen-cogs'
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module 'shinkansen-pinion/components/cogs/textarea' {
|
|
6
|
-
export { default } from '#pinion/components/cogs/textarea'
|
|
7
|
-
}
|
|
1
|
+
export { TextareaCog as default } from 'shinkansen-cogs'
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * as Sprockets from '#pinion/components/sprockets'
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
declare module 'shinkansen-pinion/components' {
|
|
7
|
-
export * from '#pinion/components'
|
|
8
|
-
}
|
|
1
|
+
export * as Cogs from '#pinion/components/cogs'
|
|
2
|
+
export * as Sprockets from '#pinion/components/sprockets'
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
import type React from 'react'
|
|
4
|
-
import type { SprocketProps } from 'shinkansen-sprockets/sprockets'
|
|
5
|
-
|
|
6
|
-
export default function CheckAnswersSprocket (props: SprocketProps): React.JSX.Element
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export { CheckAnswersSprocket as default } from 'shinkansen-sprockets'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module 'shinkansen-pinion/components/check-answers' {
|
|
13
|
-
export { default } from '#pinion/components/check-answers'
|
|
14
|
-
}
|
|
1
|
+
export { CheckAnswersSprocket as default } from 'shinkansen-sprockets'
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
import type React from 'react'
|
|
4
|
-
import type { SprocketProps } from 'shinkansen-sprockets/sprockets'
|
|
5
|
-
|
|
6
|
-
export default function ErrorSummarySprocket (props: SprocketProps): React.JSX.Element
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export { ErrorSummarySprocket as default } from 'shinkansen-sprockets'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module 'shinkansen-pinion/components/error-summary' {
|
|
13
|
-
export { default } from '#pinion/components/error-summary'
|
|
14
|
-
}
|
|
1
|
+
export { ErrorSummarySprocket as default } from 'shinkansen-sprockets'
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
import type React from 'react'
|
|
4
|
-
import type { SprocketProps } from 'shinkansen-sprockets/sprockets'
|
|
5
|
-
|
|
6
|
-
export default function FieldsetSprocket (props: SprocketProps): React.JSX.Element
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export { FieldsetSprocket as default } from 'shinkansen-sprockets'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module 'shinkansen-pinion/components/fieldset' {
|
|
13
|
-
export { default } from '#pinion/components/fieldset'
|
|
14
|
-
}
|
|
1
|
+
export { FieldsetSprocket as default } from 'shinkansen-sprockets'
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { default as Fieldset } from '#pinion/components/fieldset'
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module 'shinkansen-pinion/components/sprockets' {
|
|
8
|
-
export * from '#pinion/components/sprockets'
|
|
9
|
-
}
|
|
1
|
+
export { default as CheckAnswers } from '#pinion/components/sprockets/check-answers'
|
|
2
|
+
export { default as ErrorSummary } from '#pinion/components/sprockets/error-summary'
|
|
3
|
+
export { default as Fieldset } from '#pinion/components/sprockets/fieldset'
|
package/src/index.d.mts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { default as Pinion } from '#pinion/pinion'
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module 'shinkansen-pinion' {
|
|
8
|
-
export * from '#pinion'
|
|
9
|
-
}
|
|
1
|
+
export * as components from '#pinion/components'
|
|
2
|
+
export * as transformers from '#pinion/transformers'
|
|
3
|
+
export { default as Pinion } from '#pinion/pinion'
|
package/src/pinion/index.d.mts
CHANGED
|
@@ -1,48 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
import type React from 'react'
|
|
1
|
+
import type React from 'react'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
elements: PinionTypes.ElementsEnumType | PinionTypes.ElementsAnyOfType | PinionTypes.ElementsOneOfType | PinionTypes.ElementsFieldType
|
|
7
|
-
}
|
|
3
|
+
type PinionType = PinionTypes.PinionType
|
|
4
|
+
type ParamsType = PinionTypes.ParamsType
|
|
8
5
|
|
|
9
|
-
|
|
6
|
+
type MetaType = PinionTypes.MetaType
|
|
7
|
+
type MetaEnumType = PinionTypes.MetaEnumType
|
|
8
|
+
type MetaAnyOfType = PinionTypes.MetaAnyOfType
|
|
9
|
+
type MetaOneOfType = PinionTypes.MetaOneOfType
|
|
10
|
+
type MetaFieldType = PinionTypes.MetaFieldType
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onChange: PinionTypes.OnChangeType
|
|
16
|
-
}
|
|
12
|
+
type ElementsEnumType = PinionTypes.ElementsEnumType
|
|
13
|
+
type ElementsAnyOfType = PinionTypes.ElementsAnyOfType
|
|
14
|
+
type ElementsOneOfType = PinionTypes.ElementsOneOfType
|
|
15
|
+
type ElementsFieldType = PinionTypes.ElementsFieldType
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
meta: PinionTypes.MetaType
|
|
20
|
-
elements: PinionTypes.ElementsEnumType | PinionTypes.ElementsAnyOfType | PinionTypes.ElementsOneOfType | PinionTypes.ElementsFieldType
|
|
21
|
-
params: ParamsType
|
|
22
|
-
onChange: PinionTypes.OnChangeType
|
|
23
|
-
}
|
|
17
|
+
type OnChangeType = PinionTypes.OnChangeType
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
params: ParamsType
|
|
28
|
-
onChange: PinionTypes.OnChangeType
|
|
29
|
-
}
|
|
19
|
+
type FieldProps = PinionTypes.FieldProps
|
|
20
|
+
type GroupProps = PinionTypes.GroupProps
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
export function renderToRadiosForAnyOf (meta: PinionTypes.MetaType, elements: PinionTypes.ElementsAnyOfType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element
|
|
33
|
-
export function renderToRadiosForOneOf (meta: PinionTypes.MetaType, elements: PinionTypes.ElementsOneOfType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element
|
|
34
|
-
export function renderToSelectForEnum (meta: PinionTypes.MetaType, elements: PinionTypes.ElementsEnumType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element
|
|
35
|
-
export function renderToSelectForAnyOf (meta: PinionTypes.MetaType, elements: PinionTypes.ElementsAnyOfType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element
|
|
36
|
-
export function renderToSelectForOneOf (meta: PinionTypes.MetaType, elements: PinionTypes.ElementsOneOfType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element
|
|
37
|
-
export function renderToField (meta: PinionTypes.MetaType, elements: PinionTypes.ElementsFieldType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element
|
|
38
|
-
export function Field (props: FieldProps): React.JSX.Element
|
|
39
|
-
export function Group (props: GroupProps): React.JSX.Element
|
|
40
|
-
export function renderField (pinion: PinionType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element | null
|
|
41
|
-
export function renderGroup (pinion: PinionType, params: ParamsType, onChange: PinionTypes.OnChangeType): React.JSX.Element | null
|
|
42
|
-
export default function Pinion (props: PinionProps): React.JSX.Element
|
|
43
|
-
}
|
|
22
|
+
type PinionProps = PinionTypes.PinionProps
|
|
44
23
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
24
|
+
export function renderToRadiosForEnum (meta: MetaEnumType, elements:ElementsEnumType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
25
|
+
export function renderToRadiosForAnyOf (meta: MetaAnyOfType, elements: ElementsAnyOfType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
26
|
+
export function renderToRadiosForOneOf (meta: MetaOneOfType, elements: ElementsOneOfType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
27
|
+
export function renderToSelectForEnum (meta: MetaEnumType, elements: ElementsEnumType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
28
|
+
export function renderToSelectForAnyOf (meta: MetaAnyOfType, elements: ElementsAnyOfType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
29
|
+
export function renderToSelectForOneOf (meta: MetaOneOfType, elements: ElementsOneOfType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
30
|
+
export function renderToField (meta: MetaFieldType, elements: ElementsFieldType, params: ParamsType, onChange: OnChangeType): React.JSX.Element
|
|
31
|
+
export function Field (props: FieldProps): React.JSX.Element
|
|
32
|
+
export function Group (props: GroupProps): React.JSX.Element
|
|
33
|
+
export function renderField (pinion: PinionType, params: ParamsType, onChange: OnChangeType): React.JSX.Element | null
|
|
34
|
+
export function renderGroup (pinion: PinionType, params: ParamsType, onChange: OnChangeType): React.JSX.Element | null
|
|
35
|
+
export default function Pinion (props: PinionProps): React.JSX.Element
|
|
@@ -30,10 +30,10 @@ export default function transformAnswer (
|
|
|
30
30
|
array: ArrayType,
|
|
31
31
|
group: GroupType
|
|
32
32
|
): (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
TypeStringAnswerType[] |
|
|
34
|
+
TypeNumberAnswerType[] |
|
|
35
|
+
TypeArrayAnswerType[] |
|
|
36
|
+
TypeObjectAnswerType[] |
|
|
37
|
+
TypeBooleanAnswerType[] |
|
|
38
|
+
TypeNullAnswerType[]
|
|
39
39
|
)
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * as errorMessage from '#pinion/transformers/error-message'
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module 'shinkansen-pinion/transformers' {
|
|
8
|
-
export * from '#pinion/transformers'
|
|
9
|
-
}
|
|
1
|
+
export * as checkAnswers from '#pinion/transformers/check-answers'
|
|
2
|
+
export * as common from '#pinion/transformers/common'
|
|
3
|
+
export * as errorMessage from '#pinion/transformers/error-message'
|