@zeng-alt/formkit-form-builder 1.4.0 → 2.0.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/CHANGELOG.md +45 -0
- package/README.md +325 -137
- package/dist/builder.css +1 -1
- package/dist/builder.es.js +7922 -42834
- package/dist/builder.es.js.map +1 -0
- package/dist/builder.umd.js +58 -86
- package/dist/chunks/AiPrompt-CWUhBDH4.js +174 -0
- package/dist/chunks/AiPrompt-CWUhBDH4.js.map +1 -0
- package/dist/chunks/BadgeEditor-B1kB2DXg.js +133 -0
- package/dist/chunks/BadgeEditor-B1kB2DXg.js.map +1 -0
- package/dist/chunks/BuilderPreview-CKL5bqCP.js +142 -0
- package/dist/chunks/BuilderPreview-CKL5bqCP.js.map +1 -0
- package/dist/chunks/ButtonGroupEditor-C5pChDFz.js +55 -0
- package/dist/chunks/ButtonGroupEditor-C5pChDFz.js.map +1 -0
- package/dist/chunks/CardEditor-Bsbriwvu.js +61 -0
- package/dist/chunks/CardEditor-Bsbriwvu.js.map +1 -0
- package/dist/chunks/CheckboxEditor-CxNEvn_Y.js +23 -0
- package/dist/chunks/CheckboxEditor-CxNEvn_Y.js.map +1 -0
- package/dist/chunks/CollapseEditor-CUFTdj0V.js +36 -0
- package/dist/chunks/CollapseEditor-CUFTdj0V.js.map +1 -0
- package/dist/chunks/ColorEditor-Bo9QkLsR.js +17 -0
- package/dist/chunks/ColorEditor-Bo9QkLsR.js.map +1 -0
- package/dist/chunks/DataTableContainerPreview-phlGcigM.js +403 -0
- package/dist/chunks/DataTableContainerPreview-phlGcigM.js.map +1 -0
- package/dist/chunks/DataTableEditor-BTDWXdtk.js +473 -0
- package/dist/chunks/DataTableEditor-BTDWXdtk.js.map +1 -0
- package/dist/chunks/DataTableFieldPicker-qWxGmVxr.js +1579 -0
- package/dist/chunks/DataTableFieldPicker-qWxGmVxr.js.map +1 -0
- package/dist/chunks/DataTableRowCellInput-BLTM3I21.js +195 -0
- package/dist/chunks/DataTableRowCellInput-BLTM3I21.js.map +1 -0
- package/dist/chunks/DataTableSearchField-PU89hniM.js +81 -0
- package/dist/chunks/DataTableSearchField-PU89hniM.js.map +1 -0
- package/dist/chunks/DateLikeEditor-ZkCbMhpE.js +74 -0
- package/dist/chunks/DateLikeEditor-ZkCbMhpE.js.map +1 -0
- package/dist/chunks/DateTimeEditor-C-jZKTT5.js +73 -0
- package/dist/chunks/DateTimeEditor-C-jZKTT5.js.map +1 -0
- package/dist/chunks/EditorSection-BR3qdK2c.js +23 -0
- package/dist/chunks/EditorSection-BR3qdK2c.js.map +1 -0
- package/dist/chunks/EditsLayout-fueCrxZM.js +22 -0
- package/dist/chunks/EditsLayout-fueCrxZM.js.map +1 -0
- package/dist/chunks/ExprEditModal-CeXiPStM.js +540 -0
- package/dist/chunks/ExprEditModal-CeXiPStM.js.map +1 -0
- package/dist/chunks/FileEditor-BXELd_SD.js +35 -0
- package/dist/chunks/FileEditor-BXELd_SD.js.map +1 -0
- package/dist/chunks/FormRenderer-BwykpB3h.js +2625 -0
- package/dist/chunks/FormRenderer-BwykpB3h.js.map +1 -0
- package/dist/chunks/GroupEditor-DchDUDDY.js +13 -0
- package/dist/chunks/GroupEditor-DchDUDDY.js.map +1 -0
- package/dist/chunks/HistoryPanel-1p0-Obef.js +104 -0
- package/dist/chunks/HistoryPanel-1p0-Obef.js.map +1 -0
- package/dist/chunks/ImportExportModal-CTqkyp1s.js +266 -0
- package/dist/chunks/ImportExportModal-CTqkyp1s.js.map +1 -0
- package/dist/chunks/InlineEditableText-BO-dT5rp.js +68 -0
- package/dist/chunks/InlineEditableText-BO-dT5rp.js.map +1 -0
- package/dist/chunks/InputGroupEditor-D_5giZtN.js +13 -0
- package/dist/chunks/InputGroupEditor-D_5giZtN.js.map +1 -0
- package/dist/chunks/IssuesPanel-CW5bdwvC.js +82 -0
- package/dist/chunks/IssuesPanel-CW5bdwvC.js.map +1 -0
- package/dist/chunks/JsCodeEditor-CIPxhwZa.js +751 -0
- package/dist/chunks/JsCodeEditor-CIPxhwZa.js.map +1 -0
- package/dist/chunks/JsonTextarea-C3mnRwtG.js +54 -0
- package/dist/chunks/JsonTextarea-C3mnRwtG.js.map +1 -0
- package/dist/chunks/ListEditor-C1hn5yOi.js +25 -0
- package/dist/chunks/ListEditor-C1hn5yOi.js.map +1 -0
- package/dist/chunks/NaiveAlertEditor-DACimYS1.js +67 -0
- package/dist/chunks/NaiveAlertEditor-DACimYS1.js.map +1 -0
- package/dist/chunks/NaiveAutoCompleteEditor-CtCvPe7H.js +122 -0
- package/dist/chunks/NaiveAutoCompleteEditor-CtCvPe7H.js.map +1 -0
- package/dist/chunks/NaiveAvatarEditor-CmDUodoa.js +36 -0
- package/dist/chunks/NaiveAvatarEditor-CmDUodoa.js.map +1 -0
- package/dist/chunks/NaiveBackTopEditor-Iq-li1JT.js +69 -0
- package/dist/chunks/NaiveBackTopEditor-Iq-li1JT.js.map +1 -0
- package/dist/chunks/NaiveBasicSection-wNyhGLou.js +184 -0
- package/dist/chunks/NaiveBasicSection-wNyhGLou.js.map +1 -0
- package/dist/chunks/NaiveBlockquoteEditor-BfqWqKwF.js +13 -0
- package/dist/chunks/NaiveBlockquoteEditor-BfqWqKwF.js.map +1 -0
- package/dist/chunks/NaiveButtonEditor-B4Rp2T7n.js +168 -0
- package/dist/chunks/NaiveButtonEditor-B4Rp2T7n.js.map +1 -0
- package/dist/chunks/NaiveCascaderEditor-BtD6KRXl.js +26 -0
- package/dist/chunks/NaiveCascaderEditor-BtD6KRXl.js.map +1 -0
- package/dist/chunks/NaiveDividerEditor-B1dPteDV.js +52 -0
- package/dist/chunks/NaiveDividerEditor-B1dPteDV.js.map +1 -0
- package/dist/chunks/NaiveH1Editor-Can7c9mh.js +14 -0
- package/dist/chunks/NaiveH1Editor-Can7c9mh.js.map +1 -0
- package/dist/chunks/NaiveH2Editor-BRKeEVf4.js +14 -0
- package/dist/chunks/NaiveH2Editor-BRKeEVf4.js.map +1 -0
- package/dist/chunks/NaiveH3Editor-DCdyd3-n.js +14 -0
- package/dist/chunks/NaiveH3Editor-DCdyd3-n.js.map +1 -0
- package/dist/chunks/NaiveH4Editor-COFS6udv.js +14 -0
- package/dist/chunks/NaiveH4Editor-COFS6udv.js.map +1 -0
- package/dist/chunks/NaiveH5Editor-CQEe6s1O.js +14 -0
- package/dist/chunks/NaiveH5Editor-CQEe6s1O.js.map +1 -0
- package/dist/chunks/NaiveH6Editor-DHGzIUAl.js +14 -0
- package/dist/chunks/NaiveH6Editor-DHGzIUAl.js.map +1 -0
- package/dist/chunks/NaiveHeaderEditor-Cy02AmLI.js +12 -0
- package/dist/chunks/NaiveHeaderEditor-Cy02AmLI.js.map +1 -0
- package/dist/chunks/NaiveImageEditor-WyVYLNbT.js +201 -0
- package/dist/chunks/NaiveImageEditor-WyVYLNbT.js.map +1 -0
- package/dist/chunks/NaiveLiEditor-CC65rrna.js +13 -0
- package/dist/chunks/NaiveLiEditor-CC65rrna.js.map +1 -0
- package/dist/chunks/NaiveLinkEditor-DkjFrzEE.js +38 -0
- package/dist/chunks/NaiveLinkEditor-DkjFrzEE.js.map +1 -0
- package/dist/chunks/NaiveMentionEditor-BupocM2c.js +23 -0
- package/dist/chunks/NaiveMentionEditor-BupocM2c.js.map +1 -0
- package/dist/chunks/NaiveOlEditor-DYFqg6Sp.js +16 -0
- package/dist/chunks/NaiveOlEditor-DYFqg6Sp.js.map +1 -0
- package/dist/chunks/NaiveParagraphEditor-B3Ju6ZNI.js +104 -0
- package/dist/chunks/NaiveParagraphEditor-B3Ju6ZNI.js.map +1 -0
- package/dist/chunks/NaiveProgressEditor-CwpsZG2z.js +119 -0
- package/dist/chunks/NaiveProgressEditor-CwpsZG2z.js.map +1 -0
- package/dist/chunks/NaiveQrCodeEditor-YWWAozHe.js +77 -0
- package/dist/chunks/NaiveQrCodeEditor-YWWAozHe.js.map +1 -0
- package/dist/chunks/NaiveRateEditor-BVY1QiXv.js +44 -0
- package/dist/chunks/NaiveRateEditor-BVY1QiXv.js.map +1 -0
- package/dist/chunks/NaiveSwitchEditor-BP1v-oZf.js +17 -0
- package/dist/chunks/NaiveSwitchEditor-BP1v-oZf.js.map +1 -0
- package/dist/chunks/NaiveTextEditor-C38l4Q-j.js +107 -0
- package/dist/chunks/NaiveTextEditor-C38l4Q-j.js.map +1 -0
- package/dist/chunks/NaiveTransferEditor-BRH_5ioX.js +19 -0
- package/dist/chunks/NaiveTransferEditor-BRH_5ioX.js.map +1 -0
- package/dist/chunks/NaiveTreeSelectEditor-jX2DrMcT.js +26 -0
- package/dist/chunks/NaiveTreeSelectEditor-jX2DrMcT.js.map +1 -0
- package/dist/chunks/NaiveUlEditor-CMKofBid.js +16 -0
- package/dist/chunks/NaiveUlEditor-CMKofBid.js.map +1 -0
- package/dist/chunks/NumberEditor-0P2Li_GH.js +40 -0
- package/dist/chunks/NumberEditor-0P2Li_GH.js.map +1 -0
- package/dist/chunks/NumberInput-DU-FiLxW.js +37 -0
- package/dist/chunks/NumberInput-DU-FiLxW.js.map +1 -0
- package/dist/chunks/OptionsLayoutSection-C9gVadRA.js +21 -0
- package/dist/chunks/OptionsLayoutSection-C9gVadRA.js.map +1 -0
- package/dist/chunks/OptionsSourceTabs-3fsum0OI.js +628 -0
- package/dist/chunks/OptionsSourceTabs-3fsum0OI.js.map +1 -0
- package/dist/chunks/OptionsTagsSection-vKkxlWLw.js +31 -0
- package/dist/chunks/OptionsTagsSection-vKkxlWLw.js.map +1 -0
- package/dist/chunks/PasswordEditor-Igld1ak6.js +29 -0
- package/dist/chunks/PasswordEditor-Igld1ak6.js.map +1 -0
- package/dist/chunks/PlaceholderSection-BKOS-7Qu.js +26 -0
- package/dist/chunks/PlaceholderSection-BKOS-7Qu.js.map +1 -0
- package/dist/chunks/RadioEditor-CyJhILjI.js +23 -0
- package/dist/chunks/RadioEditor-CyJhILjI.js.map +1 -0
- package/dist/chunks/RangeEditor-PGOnGfuV.js +86 -0
- package/dist/chunks/RangeEditor-PGOnGfuV.js.map +1 -0
- package/dist/chunks/RichText-DqcMtoil.js +424 -0
- package/dist/chunks/RichText-DqcMtoil.js.map +1 -0
- package/dist/chunks/RichTextEditor-EfA6m9w2.js +81 -0
- package/dist/chunks/RichTextEditor-EfA6m9w2.js.map +1 -0
- package/dist/chunks/SelectEditor-mJ_zUivj.js +21 -0
- package/dist/chunks/SelectEditor-mJ_zUivj.js.map +1 -0
- package/dist/chunks/SelectInput-DY4Oi2Lp.js +31 -0
- package/dist/chunks/SelectInput-DY4Oi2Lp.js.map +1 -0
- package/dist/chunks/SignatureEditor-BNttg68X.js +52 -0
- package/dist/chunks/SignatureEditor-BNttg68X.js.map +1 -0
- package/dist/chunks/SignaturePad-qhmoMg1E.js +170 -0
- package/dist/chunks/SignaturePad-qhmoMg1E.js.map +1 -0
- package/dist/chunks/StepsEditor-C8U-ext8.js +63 -0
- package/dist/chunks/StepsEditor-C8U-ext8.js.map +1 -0
- package/dist/chunks/SubmitEditor-B9R984q8.js +168 -0
- package/dist/chunks/SubmitEditor-B9R984q8.js.map +1 -0
- package/dist/chunks/SwitchInput-DQrSTyW0.js +34 -0
- package/dist/chunks/SwitchInput-DQrSTyW0.js.map +1 -0
- package/dist/chunks/TabsEditor-DepUhmsz.js +100 -0
- package/dist/chunks/TabsEditor-DepUhmsz.js.map +1 -0
- package/dist/chunks/TagsInput-DeG3Om1R.js +36 -0
- package/dist/chunks/TagsInput-DeG3Om1R.js.map +1 -0
- package/dist/chunks/TemplatePickerModal-DPkdJJJs.js +440 -0
- package/dist/chunks/TemplatePickerModal-DPkdJJJs.js.map +1 -0
- package/dist/chunks/TextInput-D1EMeBPf.js +53 -0
- package/dist/chunks/TextInput-D1EMeBPf.js.map +1 -0
- package/dist/chunks/TextLikeEditor-Du0nHQWQ.js +56 -0
- package/dist/chunks/TextLikeEditor-Du0nHQWQ.js.map +1 -0
- package/dist/chunks/ToggleInput-DoZPwM0A.js +51 -0
- package/dist/chunks/ToggleInput-DoZPwM0A.js.map +1 -0
- package/dist/chunks/_plugin-vue_export-helper-BxNYtmDu.js +8 -0
- package/dist/chunks/axios-agM_iOnv.js +1589 -0
- package/dist/chunks/axios-agM_iOnv.js.map +1 -0
- package/dist/chunks/bind-runtime-CRyrBYCi.js +58 -0
- package/dist/chunks/bind-runtime-CRyrBYCi.js.map +1 -0
- package/dist/chunks/canvas-locate-CxDD4bDp.js +64 -0
- package/dist/chunks/canvas-locate-CxDD4bDp.js.map +1 -0
- package/dist/chunks/context-4zkSHwVA.js +2510 -0
- package/dist/chunks/context-4zkSHwVA.js.map +1 -0
- package/dist/chunks/create-form-builder-state-CoXaJhWO.js +358 -0
- package/dist/chunks/create-form-builder-state-CoXaJhWO.js.map +1 -0
- package/dist/chunks/date-family-BYkr1OaE.js +75 -0
- package/dist/chunks/date-family-BYkr1OaE.js.map +1 -0
- package/dist/chunks/evaluator-DqNftI0d.js +139 -0
- package/dist/chunks/evaluator-DqNftI0d.js.map +1 -0
- package/dist/chunks/expr-parse-u7_CxMWg.js +463 -0
- package/dist/chunks/expr-parse-u7_CxMWg.js.map +1 -0
- package/dist/chunks/expr-source-BRPYrxuB.js +118 -0
- package/dist/chunks/expr-source-BRPYrxuB.js.map +1 -0
- package/dist/chunks/form-builder-plugin-BCbiWZKT.js +280 -0
- package/dist/chunks/form-builder-plugin-BCbiWZKT.js.map +1 -0
- package/dist/chunks/form-fields-DjLk8iH2.js +877 -0
- package/dist/chunks/form-fields-DjLk8iH2.js.map +1 -0
- package/dist/chunks/form-layout-Dm4QeYrL.js +69 -0
- package/dist/chunks/form-layout-Dm4QeYrL.js.map +1 -0
- package/dist/chunks/grid-C8xMKll5.js +137 -0
- package/dist/chunks/grid-C8xMKll5.js.map +1 -0
- package/dist/chunks/keys-D4DlFgJT.js +61 -0
- package/dist/chunks/keys-D4DlFgJT.js.map +1 -0
- package/dist/chunks/media-family-B4Wijm18.js +178 -0
- package/dist/chunks/media-family-B4Wijm18.js.map +1 -0
- package/dist/chunks/misc-family-CQJhCKco.js +133 -0
- package/dist/chunks/misc-family-CQJhCKco.js.map +1 -0
- package/dist/chunks/rich-text-toolbar-CQidmjGI.js +32 -0
- package/dist/chunks/rich-text-toolbar-CQidmjGI.js.map +1 -0
- package/dist/chunks/rolldown-runtime-DMoxecvO.js +11 -0
- package/dist/chunks/schema-adapter-_sLPmdLy.js +2089 -0
- package/dist/chunks/schema-adapter-_sLPmdLy.js.map +1 -0
- package/dist/chunks/selection-family-T_wZGrXc.js +249 -0
- package/dist/chunks/selection-family-T_wZGrXc.js.map +1 -0
- package/dist/chunks/use-ai-prompt-focus-39DHK41R.js +14 -0
- package/dist/chunks/use-ai-prompt-focus-39DHK41R.js.map +1 -0
- package/dist/chunks/use-bind-events-C-H7jhW_.js +89 -0
- package/dist/chunks/use-bind-events-C-H7jhW_.js.map +1 -0
- package/dist/chunks/use-config-DTr8dhzM.js +16 -0
- package/dist/chunks/use-config-DTr8dhzM.js.map +1 -0
- package/dist/chunks/use-dictionary-BAN34x49.js +26 -0
- package/dist/chunks/use-dictionary-BAN34x49.js.map +1 -0
- package/dist/chunks/use-dynamic-options-DbGSz-3_.js +29 -0
- package/dist/chunks/use-dynamic-options-DbGSz-3_.js.map +1 -0
- package/dist/chunks/use-schema-render-data-DagOPKiy.js +33 -0
- package/dist/chunks/use-schema-render-data-DagOPKiy.js.map +1 -0
- package/dist/chunks/utils-DlUMv2vG.js +53 -0
- package/dist/chunks/utils-DlUMv2vG.js.map +1 -0
- package/dist/index.d.ts +243 -1060
- package/dist/renderer.d.ts +632 -0
- package/dist/renderer.es.js +6 -0
- package/dist/renderer.umd.js +34 -0
- package/package.json +48 -33
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { t as e } from "./NaiveHeaderEditor-Cy02AmLI.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, openBlock as r } from "vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/components/sidebar-right/edits/editors/NaiveH6Editor.vue
|
|
5
|
+
var i = /* @__PURE__ */ n({
|
|
6
|
+
__name: "NaiveH6Editor",
|
|
7
|
+
setup(n) {
|
|
8
|
+
return (n, i) => (r(), t(e));
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { i as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=NaiveH6Editor-DHGzIUAl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveH6Editor-DHGzIUAl.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveH6Editor.vue","../../src/components/sidebar-right/edits/editors/NaiveH6Editor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport NaiveHeaderEditor from './NaiveHeaderEditor.vue'\n</script>\n\n<template>\n <NaiveHeaderEditor />\n</template>\n","<script setup lang=\"ts\">\nimport NaiveHeaderEditor from './NaiveHeaderEditor.vue'\n</script>\n\n<template>\n <NaiveHeaderEditor />\n</template>\n"],"mappings":";;;;;;;yBAKE,EAAqB,EAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createElementBlock as e, defineComponent as t, openBlock as n } from "vue";
|
|
2
|
+
//#region src/components/sidebar-right/edits/editors/NaiveHeaderEditor.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var r = { class: "hidden" }, i = /* @__PURE__ */ t({
|
|
4
|
+
__name: "NaiveHeaderEditor",
|
|
5
|
+
setup(t) {
|
|
6
|
+
return (t, i) => (n(), e("div", r));
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { i as t };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=NaiveHeaderEditor-Cy02AmLI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveHeaderEditor-Cy02AmLI.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveHeaderEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveHeaderEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// 标题内容由统一\"内容\"编辑区块(StaticContentSection)编辑;本类型无其它可配置项\n// (事件由外层「事件」分组按 naiveH1~H6 定义的 bindEvents 渲染,均为空不显示)。\n</script>\n\n<template>\n <div class=\"hidden\"></div>\n</template>\n","<script setup lang=\"ts\">\n// 标题内容由统一\"内容\"编辑区块(StaticContentSection)编辑;本类型无其它可配置项\n// (事件由外层「事件」分组按 naiveH1~H6 定义的 bindEvents 渲染,均为空不显示)。\n</script>\n\n<template>\n <div class=\"hidden\"></div>\n</template>\n"],"mappings":";;;;;yBAME,EAA0B,OAA1B,EAA0B"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { n as e } from "./context-4zkSHwVA.js";
|
|
2
|
+
import { t } from "./form-fields-DjLk8iH2.js";
|
|
3
|
+
import { t as n } from "./EditorSection-BR3qdK2c.js";
|
|
4
|
+
import { t as r } from "./TextInput-D1EMeBPf.js";
|
|
5
|
+
import { t as i } from "./SelectInput-DY4Oi2Lp.js";
|
|
6
|
+
import { t as a } from "./SwitchInput-DQrSTyW0.js";
|
|
7
|
+
import { t as o } from "./NumberInput-DU-FiLxW.js";
|
|
8
|
+
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createVNode as f, defineComponent as p, openBlock as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
|
|
9
|
+
//#region src/components/sidebar-right/edits/editors/NaiveImageEditor.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var v = {
|
|
11
|
+
key: 4,
|
|
12
|
+
class: "text-[11px] text-muted-foreground -mt-2"
|
|
13
|
+
}, y = /* @__PURE__ */ p({
|
|
14
|
+
__name: "NaiveImageEditor",
|
|
15
|
+
setup(p) {
|
|
16
|
+
let { createPropsProp: y } = t(), { t: b } = e(), x = y("src", ""), S = y("alt", ""), C = y("sizeMode", "ratio"), w = y("aspectRatio", "16/9"), T = y("minHeight", 120), E = c({
|
|
17
|
+
get: () => {
|
|
18
|
+
let e = T.value, t = typeof e == "number" ? e : Number(e);
|
|
19
|
+
return Number.isFinite(t) ? t : 120;
|
|
20
|
+
},
|
|
21
|
+
set: (e) => {
|
|
22
|
+
T.value = e ?? 120;
|
|
23
|
+
}
|
|
24
|
+
}), D = y("width", 240), O = c({
|
|
25
|
+
get: () => {
|
|
26
|
+
let e = D.value;
|
|
27
|
+
return typeof e == "number" && Number.isFinite(e) ? String(e) : typeof e == "string" ? e : "240";
|
|
28
|
+
},
|
|
29
|
+
set: (e) => {
|
|
30
|
+
let t = Number(e);
|
|
31
|
+
D.value = Number.isFinite(t) ? t : e;
|
|
32
|
+
}
|
|
33
|
+
}), k = y("height", 160), A = c({
|
|
34
|
+
get: () => {
|
|
35
|
+
let e = k.value;
|
|
36
|
+
return typeof e == "number" && Number.isFinite(e) ? String(e) : typeof e == "string" ? e : "160";
|
|
37
|
+
},
|
|
38
|
+
set: (e) => {
|
|
39
|
+
let t = Number(e);
|
|
40
|
+
k.value = Number.isFinite(t) ? t : e;
|
|
41
|
+
}
|
|
42
|
+
}), j = y("objectFit", "cover"), M = y("previewDisabled", !1), N = y("lazy", !1);
|
|
43
|
+
return (e, t) => (m(), d(s, null, [
|
|
44
|
+
f(i, {
|
|
45
|
+
label: g(b)("edits.image.sizeModeLabel"),
|
|
46
|
+
value: g(C),
|
|
47
|
+
options: [
|
|
48
|
+
{
|
|
49
|
+
label: g(b)("edits.image.sizeModeRatio"),
|
|
50
|
+
value: "ratio"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: g(b)("edits.image.sizeModeFill"),
|
|
54
|
+
value: "fill"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: g(b)("edits.image.sizeModeFixed"),
|
|
58
|
+
value: "fixed"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"onUpdate:value": t[0] ||= (e) => C.value = e
|
|
62
|
+
}, null, 8, [
|
|
63
|
+
"label",
|
|
64
|
+
"value",
|
|
65
|
+
"options"
|
|
66
|
+
]),
|
|
67
|
+
g(C) === "ratio" ? (m(), l(i, {
|
|
68
|
+
key: 0,
|
|
69
|
+
label: g(b)("edits.image.aspectRatioLabel"),
|
|
70
|
+
value: g(w),
|
|
71
|
+
options: [
|
|
72
|
+
{
|
|
73
|
+
label: "16:9",
|
|
74
|
+
value: "16/9"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: "4:3",
|
|
78
|
+
value: "4/3"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "3:2",
|
|
82
|
+
value: "3/2"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "1:1",
|
|
86
|
+
value: "1/1"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: g(b)("edits.image.aspectRatioOriginal"),
|
|
90
|
+
value: "original"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"onUpdate:value": t[1] ||= (e) => w.value = e
|
|
94
|
+
}, null, 8, [
|
|
95
|
+
"label",
|
|
96
|
+
"value",
|
|
97
|
+
"options"
|
|
98
|
+
])) : u("", !0),
|
|
99
|
+
g(C) === "fill" ? (m(), l(o, {
|
|
100
|
+
key: 1,
|
|
101
|
+
label: g(b)("edits.image.minHeightLabel"),
|
|
102
|
+
placeholder: g(b)("edits.image.minHeightPlaceholder"),
|
|
103
|
+
value: E.value,
|
|
104
|
+
"onUpdate:value": t[2] ||= (e) => E.value = e
|
|
105
|
+
}, null, 8, [
|
|
106
|
+
"label",
|
|
107
|
+
"placeholder",
|
|
108
|
+
"value"
|
|
109
|
+
])) : u("", !0),
|
|
110
|
+
g(C) === "fixed" ? (m(), l(r, {
|
|
111
|
+
key: 2,
|
|
112
|
+
label: g(b)("edits.image.widthLabel"),
|
|
113
|
+
placeholder: g(b)("edits.image.widthPlaceholder"),
|
|
114
|
+
value: O.value,
|
|
115
|
+
"onUpdate:value": t[3] ||= (e) => O.value = e
|
|
116
|
+
}, null, 8, [
|
|
117
|
+
"label",
|
|
118
|
+
"placeholder",
|
|
119
|
+
"value"
|
|
120
|
+
])) : u("", !0),
|
|
121
|
+
g(C) === "fixed" ? (m(), l(r, {
|
|
122
|
+
key: 3,
|
|
123
|
+
label: g(b)("edits.image.heightLabel"),
|
|
124
|
+
placeholder: g(b)("edits.image.heightPlaceholder"),
|
|
125
|
+
value: A.value,
|
|
126
|
+
"onUpdate:value": t[4] ||= (e) => A.value = e
|
|
127
|
+
}, null, 8, [
|
|
128
|
+
"label",
|
|
129
|
+
"placeholder",
|
|
130
|
+
"value"
|
|
131
|
+
])) : u("", !0),
|
|
132
|
+
g(C) === "fill" ? (m(), d("div", v, h(g(b)("edits.image.fillRowSpanHint")), 1)) : u("", !0),
|
|
133
|
+
f(r, {
|
|
134
|
+
label: g(b)("edits.image.srcLabel"),
|
|
135
|
+
placeholder: g(b)("edits.image.srcPlaceholder"),
|
|
136
|
+
value: g(x),
|
|
137
|
+
"onUpdate:value": t[5] ||= (e) => x.value = e
|
|
138
|
+
}, null, 8, [
|
|
139
|
+
"label",
|
|
140
|
+
"placeholder",
|
|
141
|
+
"value"
|
|
142
|
+
]),
|
|
143
|
+
f(r, {
|
|
144
|
+
label: g(b)("edits.image.altLabel"),
|
|
145
|
+
placeholder: g(b)("edits.image.altPlaceholder"),
|
|
146
|
+
value: g(S),
|
|
147
|
+
"onUpdate:value": t[6] ||= (e) => S.value = e
|
|
148
|
+
}, null, 8, [
|
|
149
|
+
"label",
|
|
150
|
+
"placeholder",
|
|
151
|
+
"value"
|
|
152
|
+
]),
|
|
153
|
+
f(n, { title: g(b)("edits.sections.appearance") }, {
|
|
154
|
+
default: _(() => [f(i, {
|
|
155
|
+
label: g(b)("edits.image.objectFitLabel"),
|
|
156
|
+
value: g(j),
|
|
157
|
+
options: [
|
|
158
|
+
{
|
|
159
|
+
label: "fill",
|
|
160
|
+
value: "fill"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: "contain",
|
|
164
|
+
value: "contain"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: "cover",
|
|
168
|
+
value: "cover"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: "none",
|
|
172
|
+
value: "none"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: "scale-down",
|
|
176
|
+
value: "scale-down"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"onUpdate:value": t[7] ||= (e) => j.value = e
|
|
180
|
+
}, null, 8, ["label", "value"])]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["title"]),
|
|
183
|
+
f(n, { title: g(b)("edits.sections.behavior") }, {
|
|
184
|
+
default: _(() => [f(a, {
|
|
185
|
+
label: g(b)("edits.image.previewDisabledLabel"),
|
|
186
|
+
value: g(M),
|
|
187
|
+
"onUpdate:value": t[8] ||= (e) => M.value = e
|
|
188
|
+
}, null, 8, ["label", "value"]), f(a, {
|
|
189
|
+
label: g(b)("edits.image.lazyLabel"),
|
|
190
|
+
value: g(N),
|
|
191
|
+
"onUpdate:value": t[9] ||= (e) => N.value = e
|
|
192
|
+
}, null, 8, ["label", "value"])]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["title"])
|
|
195
|
+
], 64));
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
//#endregion
|
|
199
|
+
export { y as default };
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=NaiveImageEditor-WyVYLNbT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveImageEditor-WyVYLNbT.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveImageEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveImageEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useFormField } from '../../../../composables/form-fields'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\nimport EditorSection from '../common/EditorSection.vue'\nimport NumberInput from '../common/NumberInput.vue'\nimport SelectInput from '../common/SelectInput.vue'\nimport SwitchInput from '../common/SwitchInput.vue'\nimport TextInput from '../common/TextInput.vue'\n\nconst { createPropsProp } = useFormField()\nconst { t } = useFormBuilderI18n()\n\nconst src = createPropsProp<string>('src', '')\nconst alt = createPropsProp<string>('alt', '')\n\n// K2:尺寸模式放在最前,按模式切换显示对应的专属配置(比例 / 最小高度 / 固定宽高)\nconst sizeMode = createPropsProp<string>('sizeMode', 'ratio')\nconst aspectRatio = createPropsProp<string>('aspectRatio', '16/9')\n\nconst minHeightRaw = createPropsProp<unknown>('minHeight', 120)\nconst minHeight = computed<number | null>({\n get: () => {\n const value = minHeightRaw.value\n const parsed = typeof value === 'number' ? value : Number(value)\n return Number.isFinite(parsed) ? parsed : 120\n },\n set: (value: number | null) => {\n minHeightRaw.value = value ?? 120\n },\n})\n\nconst widthRaw = createPropsProp<unknown>('width', 240)\nconst width = computed({\n get: () => {\n const value = widthRaw.value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n if (typeof value === 'string') return value\n return '240'\n },\n set: (value: string) => {\n const parsed = Number(value)\n widthRaw.value = Number.isFinite(parsed) ? parsed : value\n },\n})\n\nconst heightRaw = createPropsProp<unknown>('height', 160)\nconst height = computed({\n get: () => {\n const value = heightRaw.value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n if (typeof value === 'string') return value\n return '160'\n },\n set: (value: string) => {\n const parsed = Number(value)\n heightRaw.value = Number.isFinite(parsed) ? parsed : value\n },\n})\n\nconst objectFit = createPropsProp<string>('objectFit', 'cover')\nconst previewDisabled = createPropsProp<boolean>('previewDisabled', false)\nconst lazy = createPropsProp<boolean>('lazy', false)\n</script>\n\n<template>\n <SelectInput\n :label=\"t('edits.image.sizeModeLabel')\"\n :value=\"sizeMode\"\n :options=\"[\n { label: t('edits.image.sizeModeRatio'), value: 'ratio' },\n { label: t('edits.image.sizeModeFill'), value: 'fill' },\n { label: t('edits.image.sizeModeFixed'), value: 'fixed' },\n ]\"\n @update:value=\"(v) => (sizeMode = v)\"\n />\n <SelectInput\n v-if=\"sizeMode === 'ratio'\"\n :label=\"t('edits.image.aspectRatioLabel')\"\n :value=\"aspectRatio\"\n :options=\"[\n { label: '16:9', value: '16/9' },\n { label: '4:3', value: '4/3' },\n { label: '3:2', value: '3/2' },\n { label: '1:1', value: '1/1' },\n { label: t('edits.image.aspectRatioOriginal'), value: 'original' },\n ]\"\n @update:value=\"(v) => (aspectRatio = v)\"\n />\n <NumberInput\n v-if=\"sizeMode === 'fill'\"\n :label=\"t('edits.image.minHeightLabel')\"\n :placeholder=\"t('edits.image.minHeightPlaceholder')\"\n :value=\"minHeight\"\n @update:value=\"(v) => (minHeight = v)\"\n />\n <TextInput\n v-if=\"sizeMode === 'fixed'\"\n :label=\"t('edits.image.widthLabel')\"\n :placeholder=\"t('edits.image.widthPlaceholder')\"\n :value=\"width\"\n @update:value=\"(v) => (width = v)\"\n />\n <TextInput\n v-if=\"sizeMode === 'fixed'\"\n :label=\"t('edits.image.heightLabel')\"\n :placeholder=\"t('edits.image.heightPlaceholder')\"\n :value=\"height\"\n @update:value=\"(v) => (height = v)\"\n />\n <!-- fill 模式下高度由占用行数撑开:同一行没有其它更高的字段时,靠上面的\n minHeight 兜底,这里提示一句,避免用户改了占用行数却不知道为什么高度没变\n (占用行数已挪到外层「基础」分组,与列数放在一起) -->\n <div v-if=\"sizeMode === 'fill'\" class=\"text-[11px] text-muted-foreground -mt-2\">\n {{ t('edits.image.fillRowSpanHint') }}\n </div>\n <TextInput\n :label=\"t('edits.image.srcLabel')\"\n :placeholder=\"t('edits.image.srcPlaceholder')\"\n :value=\"src\"\n @update:value=\"(v) => (src = v)\"\n />\n <TextInput\n :label=\"t('edits.image.altLabel')\"\n :placeholder=\"t('edits.image.altPlaceholder')\"\n :value=\"alt\"\n @update:value=\"(v) => (alt = v)\"\n />\n <EditorSection :title=\"t('edits.sections.appearance')\">\n <SelectInput\n :label=\"t('edits.image.objectFitLabel')\"\n :value=\"objectFit\"\n :options=\"[\n { label: 'fill', value: 'fill' },\n { label: 'contain', value: 'contain' },\n { label: 'cover', value: 'cover' },\n { label: 'none', value: 'none' },\n { label: 'scale-down', value: 'scale-down' },\n ]\"\n @update:value=\"(v) => (objectFit = v)\"\n />\n </EditorSection>\n <EditorSection :title=\"t('edits.sections.behavior')\">\n <SwitchInput\n :label=\"t('edits.image.previewDisabledLabel')\"\n :value=\"previewDisabled\"\n @update:value=\"(v) => (previewDisabled = v)\"\n />\n <SwitchInput\n :label=\"t('edits.image.lazyLabel')\"\n :value=\"lazy\"\n @update:value=\"(v) => (lazy = v)\"\n />\n </EditorSection>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useFormField } from '../../../../composables/form-fields'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\nimport EditorSection from '../common/EditorSection.vue'\nimport NumberInput from '../common/NumberInput.vue'\nimport SelectInput from '../common/SelectInput.vue'\nimport SwitchInput from '../common/SwitchInput.vue'\nimport TextInput from '../common/TextInput.vue'\n\nconst { createPropsProp } = useFormField()\nconst { t } = useFormBuilderI18n()\n\nconst src = createPropsProp<string>('src', '')\nconst alt = createPropsProp<string>('alt', '')\n\n// K2:尺寸模式放在最前,按模式切换显示对应的专属配置(比例 / 最小高度 / 固定宽高)\nconst sizeMode = createPropsProp<string>('sizeMode', 'ratio')\nconst aspectRatio = createPropsProp<string>('aspectRatio', '16/9')\n\nconst minHeightRaw = createPropsProp<unknown>('minHeight', 120)\nconst minHeight = computed<number | null>({\n get: () => {\n const value = minHeightRaw.value\n const parsed = typeof value === 'number' ? value : Number(value)\n return Number.isFinite(parsed) ? parsed : 120\n },\n set: (value: number | null) => {\n minHeightRaw.value = value ?? 120\n },\n})\n\nconst widthRaw = createPropsProp<unknown>('width', 240)\nconst width = computed({\n get: () => {\n const value = widthRaw.value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n if (typeof value === 'string') return value\n return '240'\n },\n set: (value: string) => {\n const parsed = Number(value)\n widthRaw.value = Number.isFinite(parsed) ? parsed : value\n },\n})\n\nconst heightRaw = createPropsProp<unknown>('height', 160)\nconst height = computed({\n get: () => {\n const value = heightRaw.value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n if (typeof value === 'string') return value\n return '160'\n },\n set: (value: string) => {\n const parsed = Number(value)\n heightRaw.value = Number.isFinite(parsed) ? parsed : value\n },\n})\n\nconst objectFit = createPropsProp<string>('objectFit', 'cover')\nconst previewDisabled = createPropsProp<boolean>('previewDisabled', false)\nconst lazy = createPropsProp<boolean>('lazy', false)\n</script>\n\n<template>\n <SelectInput\n :label=\"t('edits.image.sizeModeLabel')\"\n :value=\"sizeMode\"\n :options=\"[\n { label: t('edits.image.sizeModeRatio'), value: 'ratio' },\n { label: t('edits.image.sizeModeFill'), value: 'fill' },\n { label: t('edits.image.sizeModeFixed'), value: 'fixed' },\n ]\"\n @update:value=\"(v) => (sizeMode = v)\"\n />\n <SelectInput\n v-if=\"sizeMode === 'ratio'\"\n :label=\"t('edits.image.aspectRatioLabel')\"\n :value=\"aspectRatio\"\n :options=\"[\n { label: '16:9', value: '16/9' },\n { label: '4:3', value: '4/3' },\n { label: '3:2', value: '3/2' },\n { label: '1:1', value: '1/1' },\n { label: t('edits.image.aspectRatioOriginal'), value: 'original' },\n ]\"\n @update:value=\"(v) => (aspectRatio = v)\"\n />\n <NumberInput\n v-if=\"sizeMode === 'fill'\"\n :label=\"t('edits.image.minHeightLabel')\"\n :placeholder=\"t('edits.image.minHeightPlaceholder')\"\n :value=\"minHeight\"\n @update:value=\"(v) => (minHeight = v)\"\n />\n <TextInput\n v-if=\"sizeMode === 'fixed'\"\n :label=\"t('edits.image.widthLabel')\"\n :placeholder=\"t('edits.image.widthPlaceholder')\"\n :value=\"width\"\n @update:value=\"(v) => (width = v)\"\n />\n <TextInput\n v-if=\"sizeMode === 'fixed'\"\n :label=\"t('edits.image.heightLabel')\"\n :placeholder=\"t('edits.image.heightPlaceholder')\"\n :value=\"height\"\n @update:value=\"(v) => (height = v)\"\n />\n <!-- fill 模式下高度由占用行数撑开:同一行没有其它更高的字段时,靠上面的\n minHeight 兜底,这里提示一句,避免用户改了占用行数却不知道为什么高度没变\n (占用行数已挪到外层「基础」分组,与列数放在一起) -->\n <div v-if=\"sizeMode === 'fill'\" class=\"text-[11px] text-muted-foreground -mt-2\">\n {{ t('edits.image.fillRowSpanHint') }}\n </div>\n <TextInput\n :label=\"t('edits.image.srcLabel')\"\n :placeholder=\"t('edits.image.srcPlaceholder')\"\n :value=\"src\"\n @update:value=\"(v) => (src = v)\"\n />\n <TextInput\n :label=\"t('edits.image.altLabel')\"\n :placeholder=\"t('edits.image.altPlaceholder')\"\n :value=\"alt\"\n @update:value=\"(v) => (alt = v)\"\n />\n <EditorSection :title=\"t('edits.sections.appearance')\">\n <SelectInput\n :label=\"t('edits.image.objectFitLabel')\"\n :value=\"objectFit\"\n :options=\"[\n { label: 'fill', value: 'fill' },\n { label: 'contain', value: 'contain' },\n { label: 'cover', value: 'cover' },\n { label: 'none', value: 'none' },\n { label: 'scale-down', value: 'scale-down' },\n ]\"\n @update:value=\"(v) => (objectFit = v)\"\n />\n </EditorSection>\n <EditorSection :title=\"t('edits.sections.behavior')\">\n <SwitchInput\n :label=\"t('edits.image.previewDisabledLabel')\"\n :value=\"previewDisabled\"\n @update:value=\"(v) => (previewDisabled = v)\"\n />\n <SwitchInput\n :label=\"t('edits.image.lazyLabel')\"\n :value=\"lazy\"\n @update:value=\"(v) => (lazy = v)\"\n />\n </EditorSection>\n</template>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createElementBlock as e, defineComponent as t, openBlock as n } from "vue";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region src/components/sidebar-right/edits/editors/NaiveLiEditor.vue
|
|
4
|
+
var r = /* @__PURE__ */ t({
|
|
5
|
+
__name: "NaiveLiEditor",
|
|
6
|
+
setup(t) {
|
|
7
|
+
return (t, r) => (n(), e("div"));
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as default };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=NaiveLiEditor-CC65rrna.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveLiEditor-CC65rrna.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveLiEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveLiEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// 内容由统一\"内容\"编辑区块(StaticContentSection)编辑;本类型无其它可配置项。\n</script>\n\n<template>\n <div></div>\n</template>\n","<script setup lang=\"ts\">\n// 内容由统一\"内容\"编辑区块(StaticContentSection)编辑;本类型无其它可配置项。\n</script>\n\n<template>\n <div></div>\n</template>\n"],"mappings":";;;;;;yBAKE,EAAW,MAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { n as e } from "./context-4zkSHwVA.js";
|
|
2
|
+
import { t } from "./form-fields-DjLk8iH2.js";
|
|
3
|
+
import { t as n } from "./EditorSection-BR3qdK2c.js";
|
|
4
|
+
import { t as r } from "./TextInput-D1EMeBPf.js";
|
|
5
|
+
import { t as i } from "./SelectInput-DY4Oi2Lp.js";
|
|
6
|
+
import { Fragment as a, createElementBlock as o, createVNode as s, defineComponent as c, openBlock as l, unref as u, withCtx as d } from "vue";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/sidebar-right/edits/editors/NaiveLinkEditor.vue
|
|
9
|
+
var f = /* @__PURE__ */ c({
|
|
10
|
+
__name: "NaiveLinkEditor",
|
|
11
|
+
setup(c) {
|
|
12
|
+
let { createPropsProp: f } = t(), { t: p } = e(), m = f("href", "https://www.example.com"), h = f("target", "_blank");
|
|
13
|
+
return (e, t) => (l(), o(a, null, [s(r, {
|
|
14
|
+
label: u(p)("edits.props.href"),
|
|
15
|
+
placeholder: "https://...",
|
|
16
|
+
value: u(m),
|
|
17
|
+
"onUpdate:value": t[0] ||= (e) => m.value = e
|
|
18
|
+
}, null, 8, ["label", "value"]), s(n, { title: u(p)("edits.sections.appearance") }, {
|
|
19
|
+
default: d(() => [s(i, {
|
|
20
|
+
label: u(p)("edits.props.target"),
|
|
21
|
+
value: u(h),
|
|
22
|
+
options: [{
|
|
23
|
+
label: "_blank",
|
|
24
|
+
value: "_blank"
|
|
25
|
+
}, {
|
|
26
|
+
label: "_self",
|
|
27
|
+
value: "_self"
|
|
28
|
+
}],
|
|
29
|
+
"onUpdate:value": t[1] ||= (e) => h.value = e
|
|
30
|
+
}, null, 8, ["label", "value"])]),
|
|
31
|
+
_: 1
|
|
32
|
+
}, 8, ["title"])], 64));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { f as default };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=NaiveLinkEditor-DkjFrzEE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveLinkEditor-DkjFrzEE.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveLinkEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveLinkEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useFormField } from '../../../../composables/form-fields'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\nimport EditorSection from '../common/EditorSection.vue'\nimport TextInput from '../common/TextInput.vue'\nimport SelectInput from '../common/SelectInput.vue'\n\nconst { createPropsProp } = useFormField()\nconst { t } = useFormBuilderI18n()\n\nconst linkHref = createPropsProp<string>('href', 'https://www.example.com')\nconst linkTarget = createPropsProp<string>('target', '_blank')\n</script>\n\n<template>\n <TextInput\n :label=\"t('edits.props.href')\"\n placeholder=\"https://...\"\n :value=\"linkHref\"\n @update:value=\"(v) => (linkHref = v)\"\n />\n <EditorSection :title=\"t('edits.sections.appearance')\">\n <SelectInput\n :label=\"t('edits.props.target')\"\n :value=\"linkTarget\"\n :options=\"[\n { label: '_blank', value: '_blank' },\n { label: '_self', value: '_self' },\n ]\"\n @update:value=\"(v) => (linkTarget = v)\"\n />\n </EditorSection>\n</template>\n","<script setup lang=\"ts\">\nimport { useFormField } from '../../../../composables/form-fields'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\nimport EditorSection from '../common/EditorSection.vue'\nimport TextInput from '../common/TextInput.vue'\nimport SelectInput from '../common/SelectInput.vue'\n\nconst { createPropsProp } = useFormField()\nconst { t } = useFormBuilderI18n()\n\nconst linkHref = createPropsProp<string>('href', 'https://www.example.com')\nconst linkTarget = createPropsProp<string>('target', '_blank')\n</script>\n\n<template>\n <TextInput\n :label=\"t('edits.props.href')\"\n placeholder=\"https://...\"\n :value=\"linkHref\"\n @update:value=\"(v) => (linkHref = v)\"\n />\n <EditorSection :title=\"t('edits.sections.appearance')\">\n <SelectInput\n :label=\"t('edits.props.target')\"\n :value=\"linkTarget\"\n :options=\"[\n { label: '_blank', value: '_blank' },\n { label: '_self', value: '_self' },\n ]\"\n @update:value=\"(v) => (linkTarget = v)\"\n />\n </EditorSection>\n</template>\n"],"mappings":";;;;;;;;;;;EAOA,IAAM,EAAE,uBAAoB,GAAa,EACnC,EAAE,SAAM,GAAmB,EAE3B,IAAW,EAAwB,QAAQ,0BAAyB,EACpE,IAAa,EAAwB,UAAU,SAAQ;qCAI3D,EAKE,GAAA;GAJC,OAAO,EAAA,EAAC,CAAA,mBAAA;GACT,aAAY;GACX,OAAO,EAAA,EAAQ;GACf,kBAAY,AAAA,EAAA,QAAG,MAAO,EAAA,QAAW;mCAEpC,EAUgB,GAAA,EAVA,OAAO,EAAA,EAAC,CAAA,4BAAA,EAAA,EAAA;oBASpB,CARF,EAQE,GAAA;IAPC,OAAO,EAAA,EAAC,CAAA,qBAAA;IACR,OAAO,EAAA,EAAU;IACjB,SAAS,CAAA;;;;;;MAGT;IACA,kBAAY,AAAA,EAAA,QAAG,MAAO,EAAA,QAAa"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { t as e } from "./NaiveBasicSection-wNyhGLou.js";
|
|
2
|
+
import { t } from "./PlaceholderSection-BKOS-7Qu.js";
|
|
3
|
+
import { t as n } from "./OptionsTagsSection-vKkxlWLw.js";
|
|
4
|
+
import { Fragment as r, createElementBlock as i, createVNode as a, defineComponent as o, openBlock as s } from "vue";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/sidebar-right/edits/editors/NaiveMentionEditor.vue
|
|
7
|
+
var c = /* @__PURE__ */ o({
|
|
8
|
+
__name: "NaiveMentionEditor",
|
|
9
|
+
setup(o) {
|
|
10
|
+
return (o, c) => (s(), i(r, null, [
|
|
11
|
+
a(t),
|
|
12
|
+
a(n),
|
|
13
|
+
a(e, {
|
|
14
|
+
size: !0,
|
|
15
|
+
disabled: !0
|
|
16
|
+
})
|
|
17
|
+
], 64));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { c as default };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=NaiveMentionEditor-BupocM2c.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveMentionEditor-BupocM2c.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveMentionEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveMentionEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport PlaceholderSection from '../common/PlaceholderSection.vue'\nimport OptionsTagsSection from '../common/OptionsTagsSection.vue'\nimport NaiveBasicSection from '../common/NaiveBasicSection.vue'\n</script>\n\n<template>\n <PlaceholderSection />\n <OptionsTagsSection />\n <NaiveBasicSection :size=\"true\" :disabled=\"true\" />\n</template>\n","<script setup lang=\"ts\">\nimport PlaceholderSection from '../common/PlaceholderSection.vue'\nimport OptionsTagsSection from '../common/OptionsTagsSection.vue'\nimport NaiveBasicSection from '../common/NaiveBasicSection.vue'\n</script>\n\n<template>\n <PlaceholderSection />\n <OptionsTagsSection />\n <NaiveBasicSection :size=\"true\" :disabled=\"true\" />\n</template>\n"],"mappings":";;;;;;;;;;GAOE,EAAsB,EAAA;GACtB,EAAsB,EAAA;GACtB,EAAmD,GAAA;IAA/B,MAAM;IAAO,UAAU"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { n as e } from "./context-4zkSHwVA.js";
|
|
2
|
+
import { t } from "./OptionsTagsSection-vKkxlWLw.js";
|
|
3
|
+
import { createBlock as n, defineComponent as r, openBlock as i, unref as a } from "vue";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/components/sidebar-right/edits/editors/NaiveOlEditor.vue
|
|
6
|
+
var o = /* @__PURE__ */ r({
|
|
7
|
+
__name: "NaiveOlEditor",
|
|
8
|
+
setup(r) {
|
|
9
|
+
let { t: o } = e();
|
|
10
|
+
return (e, r) => (i(), n(t, { label: a(o)("edits.items") }, null, 8, ["label"]));
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { o as default };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=NaiveOlEditor-DYFqg6Sp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveOlEditor-DYFqg6Sp.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveOlEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveOlEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport OptionsTagsSection from '../common/OptionsTagsSection.vue'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\n\nconst { t } = useFormBuilderI18n()\n</script>\n\n<template>\n <OptionsTagsSection :label=\"t('edits.items')\" />\n</template>\n","<script setup lang=\"ts\">\nimport OptionsTagsSection from '../common/OptionsTagsSection.vue'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\n\nconst { t } = useFormBuilderI18n()\n</script>\n\n<template>\n <OptionsTagsSection :label=\"t('edits.items')\" />\n</template>\n"],"mappings":";;;;;;;;EAIA,IAAM,EAAE,SAAM,GAAmB;yBAI/B,EAAgD,GAAA,EAA3B,OAAO,EAAA,EAAC,CAAA,cAAA,EAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { n as e } from "./context-4zkSHwVA.js";
|
|
2
|
+
import { t } from "./form-fields-DjLk8iH2.js";
|
|
3
|
+
import { t as n } from "./EditorSection-BR3qdK2c.js";
|
|
4
|
+
import { t as r } from "./SelectInput-DY4Oi2Lp.js";
|
|
5
|
+
import { computed as i, createBlock as a, createVNode as o, defineComponent as s, openBlock as c, unref as l, withCtx as u } from "vue";
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/components/sidebar-right/edits/editors/NaiveParagraphEditor.vue
|
|
8
|
+
var d = /* @__PURE__ */ s({
|
|
9
|
+
__name: "NaiveParagraphEditor",
|
|
10
|
+
setup(s) {
|
|
11
|
+
let { createPropsProp: d } = t(), { t: f } = e(), p = d("theme", "default"), m = d("depth", 1), h = i({
|
|
12
|
+
get: () => {
|
|
13
|
+
let e = m.value;
|
|
14
|
+
return typeof e == "number" && Number.isFinite(e) ? String(e) : typeof e == "string" ? e : "1";
|
|
15
|
+
},
|
|
16
|
+
set: (e) => {
|
|
17
|
+
let t = Number(e);
|
|
18
|
+
m.value = Number.isFinite(t) ? t : e;
|
|
19
|
+
}
|
|
20
|
+
}), g = d("align", "start");
|
|
21
|
+
return (e, t) => (c(), a(n, { title: l(f)("edits.sections.appearance") }, {
|
|
22
|
+
default: u(() => [
|
|
23
|
+
o(r, {
|
|
24
|
+
label: l(f)("edits.props.theme"),
|
|
25
|
+
value: l(p),
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
label: "default",
|
|
29
|
+
value: "default"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "primary",
|
|
33
|
+
value: "primary"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "info",
|
|
37
|
+
value: "info"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "success",
|
|
41
|
+
value: "success"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "warning",
|
|
45
|
+
value: "warning"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "error",
|
|
49
|
+
value: "error"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"onUpdate:value": t[0] ||= (e) => p.value = e
|
|
53
|
+
}, null, 8, ["label", "value"]),
|
|
54
|
+
o(r, {
|
|
55
|
+
label: l(f)("edits.props.depth"),
|
|
56
|
+
value: h.value,
|
|
57
|
+
options: [
|
|
58
|
+
{
|
|
59
|
+
label: "1",
|
|
60
|
+
value: "1"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: "2",
|
|
64
|
+
value: "2"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: "3",
|
|
68
|
+
value: "3"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"onUpdate:value": t[1] ||= (e) => h.value = e
|
|
72
|
+
}, null, 8, ["label", "value"]),
|
|
73
|
+
o(r, {
|
|
74
|
+
label: l(f)("edits.props.align"),
|
|
75
|
+
value: l(g),
|
|
76
|
+
options: [
|
|
77
|
+
{
|
|
78
|
+
label: "start",
|
|
79
|
+
value: "start"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "center",
|
|
83
|
+
value: "center"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: "end",
|
|
87
|
+
value: "end"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: "justify",
|
|
91
|
+
value: "justify"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"onUpdate:value": t[2] ||= (e) => g.value = e
|
|
95
|
+
}, null, 8, ["label", "value"])
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["title"]));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
//#endregion
|
|
102
|
+
export { d as default };
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=NaiveParagraphEditor-B3Ju6ZNI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NaiveParagraphEditor-B3Ju6ZNI.js","names":[],"sources":["../../src/components/sidebar-right/edits/editors/NaiveParagraphEditor.vue","../../src/components/sidebar-right/edits/editors/NaiveParagraphEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useFormField } from '../../../../composables/form-fields'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\nimport EditorSection from '../common/EditorSection.vue'\nimport SelectInput from '../common/SelectInput.vue'\n\nconst { createPropsProp } = useFormField()\nconst { t } = useFormBuilderI18n()\n\nconst typoTheme = createPropsProp<string>('theme', 'default')\nconst typoDepthRaw = createPropsProp<unknown>('depth', 1)\nconst typoDepth = computed({\n get: () => {\n const value = typoDepthRaw.value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n if (typeof value === 'string') return value\n return '1'\n },\n set: (value: string) => {\n const parsed = Number(value)\n typoDepthRaw.value = Number.isFinite(parsed) ? parsed : value\n },\n})\nconst typoAlign = createPropsProp<string>('align', 'start')\n</script>\n\n<template>\n <EditorSection :title=\"t('edits.sections.appearance')\">\n <SelectInput\n :label=\"t('edits.props.theme')\"\n :value=\"typoTheme\"\n :options=\"[\n { label: 'default', value: 'default' },\n { label: 'primary', value: 'primary' },\n { label: 'info', value: 'info' },\n { label: 'success', value: 'success' },\n { label: 'warning', value: 'warning' },\n { label: 'error', value: 'error' },\n ]\"\n @update:value=\"(v) => (typoTheme = v)\"\n />\n <SelectInput\n :label=\"t('edits.props.depth')\"\n :value=\"typoDepth\"\n :options=\"[\n { label: '1', value: '1' },\n { label: '2', value: '2' },\n { label: '3', value: '3' },\n ]\"\n @update:value=\"(v) => (typoDepth = v)\"\n />\n <SelectInput\n :label=\"t('edits.props.align')\"\n :value=\"typoAlign\"\n :options=\"[\n { label: 'start', value: 'start' },\n { label: 'center', value: 'center' },\n { label: 'end', value: 'end' },\n { label: 'justify', value: 'justify' },\n ]\"\n @update:value=\"(v) => (typoAlign = v)\"\n />\n </EditorSection>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useFormField } from '../../../../composables/form-fields'\nimport { useFormBuilderI18n } from '../../../../i18n/context'\nimport EditorSection from '../common/EditorSection.vue'\nimport SelectInput from '../common/SelectInput.vue'\n\nconst { createPropsProp } = useFormField()\nconst { t } = useFormBuilderI18n()\n\nconst typoTheme = createPropsProp<string>('theme', 'default')\nconst typoDepthRaw = createPropsProp<unknown>('depth', 1)\nconst typoDepth = computed({\n get: () => {\n const value = typoDepthRaw.value\n if (typeof value === 'number' && Number.isFinite(value)) return String(value)\n if (typeof value === 'string') return value\n return '1'\n },\n set: (value: string) => {\n const parsed = Number(value)\n typoDepthRaw.value = Number.isFinite(parsed) ? parsed : value\n },\n})\nconst typoAlign = createPropsProp<string>('align', 'start')\n</script>\n\n<template>\n <EditorSection :title=\"t('edits.sections.appearance')\">\n <SelectInput\n :label=\"t('edits.props.theme')\"\n :value=\"typoTheme\"\n :options=\"[\n { label: 'default', value: 'default' },\n { label: 'primary', value: 'primary' },\n { label: 'info', value: 'info' },\n { label: 'success', value: 'success' },\n { label: 'warning', value: 'warning' },\n { label: 'error', value: 'error' },\n ]\"\n @update:value=\"(v) => (typoTheme = v)\"\n />\n <SelectInput\n :label=\"t('edits.props.depth')\"\n :value=\"typoDepth\"\n :options=\"[\n { label: '1', value: '1' },\n { label: '2', value: '2' },\n { label: '3', value: '3' },\n ]\"\n @update:value=\"(v) => (typoDepth = v)\"\n />\n <SelectInput\n :label=\"t('edits.props.align')\"\n :value=\"typoAlign\"\n :options=\"[\n { label: 'start', value: 'start' },\n { label: 'center', value: 'center' },\n { label: 'end', value: 'end' },\n { label: 'justify', value: 'justify' },\n ]\"\n @update:value=\"(v) => (typoAlign = v)\"\n />\n </EditorSection>\n</template>\n"],"mappings":";;;;;;;;;;EAOA,IAAM,EAAE,uBAAoB,GAAa,EACnC,EAAE,SAAM,GAAmB,EAE3B,IAAY,EAAwB,SAAS,UAAS,EACtD,IAAe,EAAyB,SAAS,EAAC,EAClD,IAAY,EAAS;GACzB,WAAW;IACT,IAAM,IAAQ,EAAa;AAG3B,WAFI,OAAO,KAAU,YAAY,OAAO,SAAS,EAAM,GAAS,OAAO,EAAK,GACxE,OAAO,KAAU,WAAiB,IAC/B;;GAET,MAAM,MAAkB;IACtB,IAAM,IAAS,OAAO,EAAK;AAC3B,MAAa,QAAQ,OAAO,SAAS,EAAO,GAAG,IAAS;;GAE3D,CAAA,EACK,IAAY,EAAwB,SAAS,QAAO;yBAIxD,EAmCgB,GAAA,EAnCA,OAAO,EAAA,EAAC,CAAA,4BAAA,EAAA,EAAA;oBAapB;IAZF,EAYE,GAAA;KAXC,OAAO,EAAA,EAAC,CAAA,oBAAA;KACR,OAAO,EAAA,EAAS;KAChB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;MAOT;KACA,kBAAY,AAAA,EAAA,QAAG,MAAO,EAAA,QAAY;;IAErC,EASE,GAAA;KARC,OAAO,EAAA,EAAC,CAAA,oBAAA;KACR,OAAO,EAAA;KACP,SAAS;;;;;;;;;;;;;MAIT;KACA,kBAAY,AAAA,EAAA,QAAG,MAAO,EAAA,QAAY;;IAErC,EAUE,GAAA;KATC,OAAO,EAAA,EAAC,CAAA,oBAAA;KACR,OAAO,EAAA,EAAS;KAChB,SAAS;;;;;;;;;;;;;;;;;MAKT;KACA,kBAAY,AAAA,EAAA,QAAG,MAAO,EAAA,QAAY"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { n as e } from "./context-4zkSHwVA.js";
|
|
2
|
+
import { t } from "./form-fields-DjLk8iH2.js";
|
|
3
|
+
import { t as n } from "./EditorSection-BR3qdK2c.js";
|
|
4
|
+
import { t as r } from "./EditsLayout-fueCrxZM.js";
|
|
5
|
+
import { t as i } from "./SelectInput-DY4Oi2Lp.js";
|
|
6
|
+
import { t as a } from "./SwitchInput-DQrSTyW0.js";
|
|
7
|
+
import { t as o } from "./NumberInput-DU-FiLxW.js";
|
|
8
|
+
import { Fragment as s, createBlock as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, openBlock as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
9
|
+
import { NColorPicker as _ } from "naive-ui";
|
|
10
|
+
//#region src/components/sidebar-right/edits/editors/NaiveProgressEditor.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var v = { class: "text-xs font-medium tracking-wide text-foreground/80 block mb-1" }, y = { class: "text-xs font-medium tracking-wide text-foreground/80 block mb-1" }, b = /* @__PURE__ */ f({
|
|
12
|
+
__name: "NaiveProgressEditor",
|
|
13
|
+
setup(f) {
|
|
14
|
+
let { createPropsProp: b } = t(), { t: x } = e(), S = b("percentage", 60), C = b("progressType", "line"), w = b("status", "default"), T = b("processing", !1), E = b("showIndicator", !0), D = b("height", 8), O = b("strokeWidth", 6), k = b("color", void 0), A = b("railColor", void 0);
|
|
15
|
+
return (e, t) => (p(), l(s, null, [d(n, { title: h(x)("edits.sections.appearance") }, {
|
|
16
|
+
default: g(() => [
|
|
17
|
+
d(o, {
|
|
18
|
+
label: h(x)("edits.props.percentage"),
|
|
19
|
+
value: h(S),
|
|
20
|
+
placeholder: "60",
|
|
21
|
+
"onUpdate:value": t[0] ||= (e) => S.value = e ?? 0
|
|
22
|
+
}, null, 8, ["label", "value"]),
|
|
23
|
+
d(i, {
|
|
24
|
+
label: h(x)("edits.props.type"),
|
|
25
|
+
value: h(C),
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
label: "line",
|
|
29
|
+
value: "line"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "circle",
|
|
33
|
+
value: "circle"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "dashboard",
|
|
37
|
+
value: "dashboard"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"onUpdate:value": t[1] ||= (e) => C.value = e
|
|
41
|
+
}, null, 8, ["label", "value"]),
|
|
42
|
+
d(i, {
|
|
43
|
+
label: h(x)("edits.props.status"),
|
|
44
|
+
value: h(w),
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
label: "default",
|
|
48
|
+
value: "default"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: "success",
|
|
52
|
+
value: "success"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "info",
|
|
56
|
+
value: "info"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: "warning",
|
|
60
|
+
value: "warning"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: "error",
|
|
64
|
+
value: "error"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"onUpdate:value": t[2] ||= (e) => w.value = e
|
|
68
|
+
}, null, 8, ["label", "value"]),
|
|
69
|
+
h(C) === "line" ? (p(), c(o, {
|
|
70
|
+
key: 0,
|
|
71
|
+
label: h(x)("edits.props.height"),
|
|
72
|
+
value: h(D),
|
|
73
|
+
placeholder: "8",
|
|
74
|
+
"onUpdate:value": t[3] ||= (e) => D.value = e ?? 0
|
|
75
|
+
}, null, 8, ["label", "value"])) : (p(), c(o, {
|
|
76
|
+
key: 1,
|
|
77
|
+
label: h(x)("edits.props.strokeWidth"),
|
|
78
|
+
value: h(O),
|
|
79
|
+
placeholder: "6",
|
|
80
|
+
"onUpdate:value": t[4] ||= (e) => O.value = e ?? 0
|
|
81
|
+
}, null, 8, ["label", "value"])),
|
|
82
|
+
d(r, null, {
|
|
83
|
+
default: g(() => [u("label", v, m(h(x)("edits.props.color")), 1), d(h(_), {
|
|
84
|
+
size: "small",
|
|
85
|
+
value: h(k) || null,
|
|
86
|
+
"show-alpha": !1,
|
|
87
|
+
"onUpdate:value": t[5] ||= (e) => k.value = e ?? void 0
|
|
88
|
+
}, null, 8, ["value"])]),
|
|
89
|
+
_: 1
|
|
90
|
+
}),
|
|
91
|
+
d(r, null, {
|
|
92
|
+
default: g(() => [u("label", y, m(h(x)("edits.props.railColor")), 1), d(h(_), {
|
|
93
|
+
size: "small",
|
|
94
|
+
value: h(A) || null,
|
|
95
|
+
"show-alpha": !1,
|
|
96
|
+
"onUpdate:value": t[6] ||= (e) => A.value = e ?? void 0
|
|
97
|
+
}, null, 8, ["value"])]),
|
|
98
|
+
_: 1
|
|
99
|
+
})
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 8, ["title"]), d(n, { title: h(x)("edits.sections.behavior") }, {
|
|
103
|
+
default: g(() => [d(a, {
|
|
104
|
+
label: h(x)("edits.props.processing"),
|
|
105
|
+
value: h(T),
|
|
106
|
+
"onUpdate:value": t[7] ||= (e) => T.value = e
|
|
107
|
+
}, null, 8, ["label", "value"]), d(a, {
|
|
108
|
+
label: h(x)("edits.props.showIndicator"),
|
|
109
|
+
value: h(E),
|
|
110
|
+
"onUpdate:value": t[8] ||= (e) => E.value = e
|
|
111
|
+
}, null, 8, ["label", "value"])]),
|
|
112
|
+
_: 1
|
|
113
|
+
}, 8, ["title"])], 64));
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
//#endregion
|
|
117
|
+
export { b as default };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=NaiveProgressEditor-CwpsZG2z.js.map
|