Skip to content

Commit

Permalink
fix: options -d
Browse files Browse the repository at this point in the history
  • Loading branch information
arpowers committed Sep 1, 2024
1 parent 43e3af5 commit 3dcf8cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions @fiction/cards/cinema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const CinemaItemSchema = z.object({
name: z.string(),
href: z.string(),
btn: z.enum(['outline', 'minimal']),
icon: z.string().optional(),
iconAfter: z.string().optional(),
icon: MediaBasicSchema.optional(),
iconAfter: MediaBasicSchema.optional(),
}) as z.Schema<ActionItem>).optional(),
})

Expand Down Expand Up @@ -103,13 +103,13 @@ const options = [
new InputOption({ key: 'header', label: 'Header', input: 'InputText' }),
new InputOption({ key: 'subHeader', label: 'Sub Header', input: 'InputText' }),
new InputOption({ key: 'superHeader', label: 'Super Header', input: 'InputText' }),
new InputOption({ key: 'media', label: 'Media', input: 'InputMediaDisplay', props: { formats: { url: true, image: true, video: true } } }),
new InputOption({ key: 'media', label: 'Media', input: 'InputMedia', props: { formats: { url: true, image: true, video: true } } }),
new InputOption({ key: 'actions', label: 'Actions', input: 'InputList', options: [
new InputOption({ key: 'name', label: 'Name', input: 'InputText' }),
new InputOption({ key: 'href', label: 'Href', input: 'InputText' }),
new InputOption({ key: 'btn', label: 'Button', input: 'InputSelect', props: { options: ['outline', 'minimal'] } }),
new InputOption({ key: 'icon', label: 'Icon (Left)', input: 'InputText', description: 'Use format i-tabler-[icon], check docs for info' }),
new InputOption({ key: 'iconAfter', label: 'Icon (Right)', input: 'InputText', description: 'Use format i-tabler-[icon], check docs for info' }),
new InputOption({ key: 'icon', label: 'Icon (Left)', input: 'InputIcon', description: 'Use format i-tabler-[icon], check docs for info' }),
new InputOption({ key: 'iconAfter', label: 'Icon (Right)', input: 'InputIcon', description: 'Use format i-tabler-[icon], check docs for info' }),
] }),
],
}),
Expand Down
4 changes: 4 additions & 0 deletions @fiction/cards/test/tpl.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ describe('verify template settings config', async () => {
"posts.items.0.authors.0.avatar.bgSize": "string",
"posts.items.0.authors.0.avatar.blurhash": "string",
"posts.items.0.authors.0.avatar.caption": "string",
"posts.items.0.authors.0.avatar.class": "string",
"posts.items.0.authors.0.avatar.el": "unknown",
"posts.items.0.authors.0.avatar.filters": "array",
"posts.items.0.authors.0.avatar.filters.0.filter": "string",
Expand All @@ -122,6 +123,7 @@ describe('verify template settings config', async () => {
"posts.items.0.authors.0.avatar.format": "string",
"posts.items.0.authors.0.avatar.height": "number",
"posts.items.0.authors.0.avatar.html": "string",
"posts.items.0.authors.0.avatar.iconId": "string",
"posts.items.0.authors.0.avatar.mime": "string",
"posts.items.0.authors.0.avatar.modify": "object",
"posts.items.0.authors.0.avatar.modify.flip": "string",
Expand Down Expand Up @@ -167,6 +169,7 @@ describe('verify template settings config', async () => {
"posts.items.0.media.bgSize": "string",
"posts.items.0.media.blurhash": "string",
"posts.items.0.media.caption": "string",
"posts.items.0.media.class": "string",
"posts.items.0.media.el": "unknown",
"posts.items.0.media.filters": "array",
"posts.items.0.media.filters.0.filter": "string",
Expand All @@ -175,6 +178,7 @@ describe('verify template settings config', async () => {
"posts.items.0.media.format": "string",
"posts.items.0.media.height": "number",
"posts.items.0.media.html": "string",
"posts.items.0.media.iconId": "string",
"posts.items.0.media.mime": "string",
"posts.items.0.media.modify": "object",
"posts.items.0.media.modify.flip": "string",
Expand Down
4 changes: 2 additions & 2 deletions @fiction/ui/inputs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const inputs = {
InputTextarea: { el: def(async () => import('./InputTextarea.vue')) },
InputWeight: { el: def(async () => import('./InputWeight.vue')) },
InputNumber: { el: def(async () => import('./InputNumber.vue')) },
InputIcon: { el: def(async () => import('./InputIcon.vue')), shape: ['url', 'format', 'html', 'iconId', 'el'] },
InputMedia: { el: def(async () => import('./InputMedia.vue')), shape: ['url', 'format', 'html', 'el', 'modify', 'modify.flip'] },
InputIcon: { el: def(async () => import('./InputIcon.vue')), shape: ['url', 'format', 'html', 'iconId', 'el', 'class'] },
InputMedia: { el: def(async () => import('./InputMedia.vue')), shape: ['url', 'format', 'html', 'el', 'modify', 'modify.flip', 'iconId', 'class'] },
InputMediaUpload: { el: def(async () => import('./InputMediaUpload.vue')), shape: ['url'] },
InputMediaDisplay: { el: def(async () => import('./InputMediaDisplay.vue')), shape: ['url', 'format', 'html', 'el', 'modify', 'modify.flip'] },
InputRanking: { el: def(async () => import('./InputRanking.vue')) },
Expand Down

0 comments on commit 3dcf8cd

Please sign in to comment.