mirror of https://github.com/halo-dev/halo
chore: bump formkit version to 0.18.0 (#4428)
#### What type of PR is this? /area console /kind bug /milestone 2.9.x #### What this PR does / why we need it: 升级 FormKit 依赖至 [0.18.0](https://formkit.com/changelog#_0180-beta-18) 修复[升级到 0.17.5](https://github.com/halo-dev/halo/pull/4411) 之后输入框失去焦点之后无法提交的问题。 see https://github.com/halo-dev/halo/issues/4424#issuecomment-1677331547 #### Which issue(s) this PR fixes: Fixes #4424 #### Special notes for your reviewer: 需要测试各个输入框是否正常工作。 #### Does this PR introduce a user-facing change? ```release-note 升级 FormKit 的依赖至 0.18.0 ```pull/4434/head
parent
58679b2811
commit
8678d614e2
|
@ -4,6 +4,7 @@
|
||||||
export {};
|
export {};
|
||||||
|
|
||||||
import type { CoreMenuGroupId } from "@halo-dev/console-shared";
|
import type { CoreMenuGroupId } from "@halo-dev/console-shared";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
import "vue-router";
|
import "vue-router";
|
||||||
|
|
||||||
|
@ -37,3 +38,12 @@ declare module "axios" {
|
||||||
mute?: boolean;
|
mute?: boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
export interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
"datetime-local": {
|
||||||
|
type: "datetime-local";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -44,13 +44,13 @@
|
||||||
"@codemirror/state": "^6.1.4",
|
"@codemirror/state": "^6.1.4",
|
||||||
"@codemirror/view": "^6.5.1",
|
"@codemirror/view": "^6.5.1",
|
||||||
"@emoji-mart/data": "^1.0.8",
|
"@emoji-mart/data": "^1.0.8",
|
||||||
"@formkit/core": "^0.17.5",
|
"@formkit/core": "^0.18.1",
|
||||||
"@formkit/i18n": "^0.17.5",
|
"@formkit/i18n": "^0.18.1",
|
||||||
"@formkit/inputs": "^0.17.5",
|
"@formkit/inputs": "^0.18.1",
|
||||||
"@formkit/themes": "^0.17.5",
|
"@formkit/themes": "^0.18.1",
|
||||||
"@formkit/utils": "^0.17.5",
|
"@formkit/utils": "^0.18.1",
|
||||||
"@formkit/validation": "0.17.5",
|
"@formkit/validation": "0.18.1",
|
||||||
"@formkit/vue": "^0.17.5",
|
"@formkit/vue": "^0.18.1",
|
||||||
"@halo-dev/api-client": "workspace:*",
|
"@halo-dev/api-client": "workspace:*",
|
||||||
"@halo-dev/components": "workspace:*",
|
"@halo-dev/components": "workspace:*",
|
||||||
"@halo-dev/console-shared": "workspace:*",
|
"@halo-dev/console-shared": "workspace:*",
|
||||||
|
|
|
@ -39,26 +39,26 @@ importers:
|
||||||
specifier: ^1.0.8
|
specifier: ^1.0.8
|
||||||
version: 1.0.8
|
version: 1.0.8
|
||||||
'@formkit/core':
|
'@formkit/core':
|
||||||
specifier: ^0.17.5
|
specifier: ^0.18.1
|
||||||
version: 0.17.5
|
version: 0.18.1
|
||||||
'@formkit/i18n':
|
'@formkit/i18n':
|
||||||
specifier: ^0.17.5
|
specifier: ^0.18.1
|
||||||
version: 0.17.5
|
version: 0.18.1
|
||||||
'@formkit/inputs':
|
'@formkit/inputs':
|
||||||
specifier: ^0.17.5
|
specifier: ^0.18.1
|
||||||
version: 0.17.5
|
version: 0.18.1
|
||||||
'@formkit/themes':
|
'@formkit/themes':
|
||||||
specifier: ^0.17.5
|
specifier: ^0.18.1
|
||||||
version: 0.17.5(tailwindcss@3.3.0)
|
version: 0.18.1(tailwindcss@3.3.0)
|
||||||
'@formkit/utils':
|
'@formkit/utils':
|
||||||
specifier: ^0.17.5
|
specifier: ^0.18.1
|
||||||
version: 0.17.5
|
version: 0.18.1
|
||||||
'@formkit/validation':
|
'@formkit/validation':
|
||||||
specifier: 0.17.5
|
specifier: 0.18.1
|
||||||
version: 0.17.5
|
version: 0.18.1
|
||||||
'@formkit/vue':
|
'@formkit/vue':
|
||||||
specifier: ^0.17.5
|
specifier: ^0.18.1
|
||||||
version: 0.17.5(tailwindcss@3.3.0)(vue@3.3.4)
|
version: 0.18.1(tailwindcss@3.3.0)
|
||||||
'@halo-dev/api-client':
|
'@halo-dev/api-client':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:packages/api-client
|
version: link:packages/api-client
|
||||||
|
@ -2279,51 +2279,51 @@ packages:
|
||||||
'@floating-ui/core': 0.3.1
|
'@floating-ui/core': 0.3.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/core@0.17.5:
|
/@formkit/core@0.18.1:
|
||||||
resolution: {integrity: sha512-BrtvKOfJ/W7Z2r25LiQC10hy+5TG+22Y57dpQrYdp3bMEziaXHwWxxreX9VgnADUXbwgxxhViEsexINWYsnKQw==}
|
resolution: {integrity: sha512-qoVpV5gF7k7WtVdJB85pT59AxzEVDefGna6q1zfODhoJ+VtrjhGnFtHUENRahLTB1fz5iknFDG8fCN/uG5wBMw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/dev@0.17.5:
|
/@formkit/dev@0.18.1:
|
||||||
resolution: {integrity: sha512-bnGQemvEL/Nkx1w8XiJd7cQZ8kOGz9TT+zUdun44XBfD8r3vRdrHi7BkL5c7v8rC2DJ8jOmb4AdT9v4xu2ijlg==}
|
resolution: {integrity: sha512-iDwRKUvR4edlTikijn6NmNdBYEC+Iz7INGdvDflvckZAWYNaqm21T5Gf7aXLjqrzhr5kB2yijcCct+zojkkaAg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/i18n@0.17.5:
|
/@formkit/i18n@0.18.1:
|
||||||
resolution: {integrity: sha512-pN0CtaAa1xVWGEHfg259X7j3sm93wRM9NC+BjWL9bh1NmXWg4vvxZvUD4eA9ks85VN5zL5+sqpb7cn4UFZW1pw==}
|
resolution: {integrity: sha512-7TPLd+l3enVKwmCOK7r+5NBObvvFPtKvyxz31kvQenXEk9rPUzmj4VpMzxMBDhJ9B19LiH/Kwn5m20rwdu9z4w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
'@formkit/validation': 0.17.5
|
'@formkit/validation': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/inputs@0.17.5:
|
/@formkit/inputs@0.18.1:
|
||||||
resolution: {integrity: sha512-cFULXWLM6+rPW9vzoOhnZcu7m8xVfan7tzLY6qBKaAIISmfnq1HV/qSvwR2Ttx4m0CPnUnERjxCgQLd23mfHhQ==}
|
resolution: {integrity: sha512-nTcidV7O16wHIz4Jy/YqRJf/gCSLijfC404rCIe9mTtvmvj3+wnpErYfjNnWUmIPTQEjdHSriv6zOl0MDcVARA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/observer@0.17.5:
|
/@formkit/observer@0.18.1:
|
||||||
resolution: {integrity: sha512-HoMtPsx6nr3WQkrhv8isHTwXHlslowwyKDH3r44vgrf9bCl0/1VgyfZ7DMHZnxhnWYx0whkyOxrFr+P1yimrWA==}
|
resolution: {integrity: sha512-3AFfkg5+4DRICG10pW2nWEk0xOthi+MjUamfKan4317VSG3Hku4nTp2w4vAhfocoIWv4Y57DwLS3Q79BDyLY6w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/rules@0.17.5:
|
/@formkit/rules@0.18.1:
|
||||||
resolution: {integrity: sha512-/5Taf5NIJ0oAPZlYFJ2BmpDX8aoOLzm38RKOFCS2FJcNcVW53rA727O89bV2JTqt4ld5vaZEXjQPeNOnRWut3w==}
|
resolution: {integrity: sha512-DVL8tU0y2yhvu73BKHNjQgSkZlutXTcJlDtWq7FKh8Omooi6qFmHpl0ihk8Lk0NaU7ulXK54lZEn7P61c2vJpQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
'@formkit/validation': 0.17.5
|
'@formkit/validation': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/themes@0.17.5(tailwindcss@3.3.0):
|
/@formkit/themes@0.18.1(tailwindcss@3.3.0):
|
||||||
resolution: {integrity: sha512-LzAoV2JAbP7HzgdDAqO2/FgNYFqcDmceaBkzME+MIWDcDSCwHHS81bVHejIkuWm3p5oGiinnqL1UnoCddzIrjg==}
|
resolution: {integrity: sha512-K7Q2z0f4TUXPgLuqamrTxXE32EO6g0In4rznG60cafbZj+JkhtsA+b0qzvRLq5Fu0FZrczqwgAX+loWpVid3bw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
tailwindcss: ^3.2.0
|
tailwindcss: ^3.2.0
|
||||||
unocss: ^0.31.0
|
unocss: ^0.31.0
|
||||||
|
@ -2336,36 +2336,34 @@ packages:
|
||||||
windicss:
|
windicss:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
tailwindcss: 3.3.0(postcss@8.4.21)
|
tailwindcss: 3.3.0(postcss@8.4.21)
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/utils@0.17.5:
|
/@formkit/utils@0.18.1:
|
||||||
resolution: {integrity: sha512-VhGdmuyXQKB6ceQeQx1pJ/TP+vCUG5+ZiXeKySuFItAjfk7euTwtalDgv1tXrgCtPwANr6KPMC3rPGsoHS9cSQ==}
|
resolution: {integrity: sha512-a4Ls7evdXxB3vYVOmtYBsA7lEKvKDqYrpfNpcTu0tqMN1Zb8ThMt7sB/zD673m9MdVO/p6nOb59UfDKGbaqGkw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/validation@0.17.5:
|
/@formkit/validation@0.18.1:
|
||||||
resolution: {integrity: sha512-InG5Yg/d8wu4R1og99rXEJ1dyLazVdSmFKgTLXB6bFgNK1OJnFcpU76jPLzJ6FiUOUH6sCVr/zWekF0iLbDl8g==}
|
resolution: {integrity: sha512-nVOO0rbQ+j+0nmOxR3SUlHq8bGSzkx2SQgYdkG7ad6gXjWxTAvoddqepyvnSl5q8ZX0oK2ldZH1cMMlObFi2eQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/observer': 0.17.5
|
'@formkit/observer': 0.18.1
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/vue@0.17.5(tailwindcss@3.3.0)(vue@3.3.4):
|
/@formkit/vue@0.18.1(tailwindcss@3.3.0):
|
||||||
resolution: {integrity: sha512-jqGSoScC5rc/zcOj2VEjqvKq8z1X1vJmqm78efLlCydwRZP/e82EZGYebQAiOFIto+KIrIvd+iOFM+greuQPGg==}
|
resolution: {integrity: sha512-XV44zm+cwQJA0UqRYhyUMEcH2HNT6IamUio364K7FJdrwxYnKXlGl5Tld1B90DlvIlWZgVdLCAA/26vn1yAwkQ==}
|
||||||
peerDependencies:
|
|
||||||
vue: ^3.2.1
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@formkit/core': 0.17.5
|
'@formkit/core': 0.18.1
|
||||||
'@formkit/dev': 0.17.5
|
'@formkit/dev': 0.18.1
|
||||||
'@formkit/i18n': 0.17.5
|
'@formkit/i18n': 0.18.1
|
||||||
'@formkit/inputs': 0.17.5
|
'@formkit/inputs': 0.18.1
|
||||||
'@formkit/observer': 0.17.5
|
'@formkit/observer': 0.18.1
|
||||||
'@formkit/rules': 0.17.5
|
'@formkit/rules': 0.18.1
|
||||||
'@formkit/themes': 0.17.5(tailwindcss@3.3.0)
|
'@formkit/themes': 0.18.1(tailwindcss@3.3.0)
|
||||||
'@formkit/utils': 0.17.5
|
'@formkit/utils': 0.18.1
|
||||||
'@formkit/validation': 0.17.5
|
'@formkit/validation': 0.18.1
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- tailwindcss
|
- tailwindcss
|
||||||
|
@ -4099,7 +4097,7 @@ packages:
|
||||||
grapheme-splitter: 1.0.4
|
grapheme-splitter: 1.0.4
|
||||||
ignore: 5.2.0
|
ignore: 5.2.0
|
||||||
natural-compare-lite: 1.4.0
|
natural-compare-lite: 1.4.0
|
||||||
semver: 7.5.2
|
semver: 7.5.4
|
||||||
tsutils: 3.21.0(typescript@5.0.4)
|
tsutils: 3.21.0(typescript@5.0.4)
|
||||||
typescript: 5.0.4
|
typescript: 5.0.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -11567,7 +11565,7 @@ packages:
|
||||||
espree: 9.5.2
|
espree: 9.5.2
|
||||||
esquery: 1.5.0
|
esquery: 1.5.0
|
||||||
lodash: 4.17.21
|
lodash: 4.17.21
|
||||||
semver: 7.5.2
|
semver: 7.5.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -11662,7 +11660,7 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/language-core': 1.8.8(typescript@5.0.4)
|
'@vue/language-core': 1.8.8(typescript@5.0.4)
|
||||||
'@vue/typescript': 1.8.8(typescript@5.0.4)
|
'@vue/typescript': 1.8.8(typescript@5.0.4)
|
||||||
semver: 7.5.2
|
semver: 7.5.4
|
||||||
typescript: 5.0.4
|
typescript: 5.0.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { select, selects, defaultIcon } from "@formkit/inputs";
|
import { select, selects, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
attachmentGroupSelect: {
|
||||||
|
type: "attachmentGroupSelect";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { select, selects, defaultIcon } from "@formkit/inputs";
|
import { select, selects, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
attachmentPolicySelect: {
|
||||||
|
type: "attachmentPolicySelect";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -2,6 +2,17 @@ import { initialValue } from "@formkit/inputs";
|
||||||
import { createInput } from "@formkit/vue";
|
import { createInput } from "@formkit/vue";
|
||||||
import AttachmentInput from "./AttachmentInput.vue";
|
import AttachmentInput from "./AttachmentInput.vue";
|
||||||
|
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
attachment: {
|
||||||
|
type: "attachment";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const attachment = createInput(AttachmentInput, {
|
export const attachment = createInput(AttachmentInput, {
|
||||||
type: "input",
|
type: "input",
|
||||||
props: ["accepts"],
|
props: ["accepts"],
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs";
|
import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
categoryCheckbox: {
|
||||||
|
type: "categoryCheckbox";
|
||||||
|
value?: string[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -13,6 +13,16 @@ import {
|
||||||
} from "@formkit/inputs";
|
} from "@formkit/inputs";
|
||||||
import CategorySelect from "./CategorySelect.vue";
|
import CategorySelect from "./CategorySelect.vue";
|
||||||
import { CategorySelectSection } from "./sections";
|
import { CategorySelectSection } from "./sections";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
categorySelect: {
|
||||||
|
type: "categorySelect";
|
||||||
|
value?: string | string[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const categorySelect: FormKitTypeDefinition = {
|
export const categorySelect: FormKitTypeDefinition = {
|
||||||
schema: outer(
|
schema: outer(
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs";
|
import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
menuCheckbox: {
|
||||||
|
type: "menuCheckbox";
|
||||||
|
value?: string[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { select, selects, defaultIcon } from "@formkit/inputs";
|
import { select, selects, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
menuItemSelect: {
|
||||||
|
type: "menuItemSelect";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { radio, radios, defaultIcon } from "@formkit/inputs";
|
import { radio, radios, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
menuRadio: {
|
||||||
|
type: "menuRadio";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -2,6 +2,16 @@ import { postLabels } from "@/constants/labels";
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { select, selects, defaultIcon } from "@formkit/inputs";
|
import { select, selects, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
postSelect: {
|
||||||
|
type: "postSelect";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -12,6 +12,16 @@ import {
|
||||||
} from "@formkit/inputs";
|
} from "@formkit/inputs";
|
||||||
import { repeaterItems } from "./sections";
|
import { repeaterItems } from "./sections";
|
||||||
import Repeater from "./Repeater.vue";
|
import Repeater from "./Repeater.vue";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
repeater: {
|
||||||
|
type: "repeater";
|
||||||
|
value?: Record<string, unknown>[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const repeater: FormKitTypeDefinition = {
|
export const repeater: FormKitTypeDefinition = {
|
||||||
schema: outer(
|
schema: outer(
|
||||||
|
|
|
@ -4,6 +4,16 @@ import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { select, selects, defaultIcon } from "@formkit/inputs";
|
import { select, selects, defaultIcon } from "@formkit/inputs";
|
||||||
import { i18n } from "@/locales";
|
import { i18n } from "@/locales";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
roleSelect: {
|
||||||
|
type: "roleSelect";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -2,6 +2,16 @@ import { singlePageLabels } from "@/constants/labels";
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { select, selects, defaultIcon } from "@formkit/inputs";
|
import { select, selects, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
singlePageSelect: {
|
||||||
|
type: "singlePageSelect";
|
||||||
|
value?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
|
||||||
import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs";
|
import { checkbox, checkboxes, defaultIcon } from "@formkit/inputs";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
tagCheckbox: {
|
||||||
|
type: "tagCheckbox";
|
||||||
|
value?: string[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function optionsHandler(node: FormKitNode) {
|
function optionsHandler(node: FormKitNode) {
|
||||||
node.on("created", async () => {
|
node.on("created", async () => {
|
||||||
|
|
|
@ -13,6 +13,16 @@ import {
|
||||||
} from "@formkit/inputs";
|
} from "@formkit/inputs";
|
||||||
import TagSelect from "./TagSelect.vue";
|
import TagSelect from "./TagSelect.vue";
|
||||||
import { TagSelectSection } from "./sections";
|
import { TagSelectSection } from "./sections";
|
||||||
|
import type { FormKitInputs } from "@formkit/inputs";
|
||||||
|
|
||||||
|
declare module "@formkit/inputs" {
|
||||||
|
interface FormKitInputProps<Props extends FormKitInputs<Props>> {
|
||||||
|
tagSelect: {
|
||||||
|
type: "tagSelect";
|
||||||
|
value?: string | string[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const tagSelect: FormKitTypeDefinition = {
|
export const tagSelect: FormKitTypeDefinition = {
|
||||||
schema: outer(
|
schema: outer(
|
||||||
|
|
Loading…
Reference in New Issue