@kinetis/vector-ui 0.12.4 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -3
- package/README.md +13 -5
- package/app/components/Vx/Cell/Markdown.vue +1 -1
- package/app/components/Vx/Cell/RichText.vue +1 -1
- package/app/components/Vx/CommandPalette.vue +16 -2
- package/app/components/Vx/FieldsForm.vue +10 -2
- package/app/components/Vx/Input/KeyValue.vue +2 -2
- package/app/components/Vx/Input/Markdown.vue +5 -0
- package/app/components/Vx/Input/Money.vue +1 -1
- package/app/components/Vx/Input/RichText.vue +6 -1
- package/app/components/Vx/Input/Text.vue +18 -2
- package/app/components/Vx/Input/Textarea.vue +19 -2
- package/app/components/Vx/InputAddons.vue +45 -0
- package/app/components/Vx/Layout.vue +1 -1
- package/app/components/Vx/List/Pager.vue +1 -1
- package/app/components/Vx/List/ViewMenu.vue +1 -1
- package/app/components/Vx/Queues/Failed.vue +2 -2
- package/app/components/Vx/Queues/FailedDetail.vue +2 -2
- package/app/components/Vx/Queues/Metrics.vue +1 -1
- package/app/components/Vx/Queues/Overview.vue +2 -2
- package/app/components/Vx/Resource/Audit.vue +4 -0
- package/app/components/Vx/Resource/Form.vue +9 -1
- package/app/components/Vx/Resource/RelationPanel.vue +1 -1
- package/app/components/Vx/Resource/Table.vue +25 -2
- package/app/components/Vx/Widget/Card.vue +2 -2
- package/app/components/VxAi/ApprovalCard.vue +115 -0
- package/app/components/VxAi/Assistant.vue +190 -0
- package/app/components/VxAi/Credentials.vue +111 -0
- package/app/components/VxAi/FilterAsk.vue +176 -0
- package/app/components/VxAi/WritingAddon.vue +127 -0
- package/app/components/VxAi/WritingMenu.vue +91 -0
- package/app/components/VxAi/WritingResult.vue +48 -0
- package/app/components/VxAi/WritingToolbarItem.vue +189 -0
- package/app/composables/useConfirm.ts +1 -1
- package/app/composables/useVectorApi.ts +4 -4
- package/app/composables/useVectorAssistant.ts +318 -0
- package/app/composables/useVectorAuthStore.ts +1 -1
- package/app/composables/useVectorExtend.ts +157 -0
- package/app/composables/useVectorExtensions.ts +64 -6
- package/app/composables/useVectorFields.ts +1 -1
- package/app/composables/useVectorIdle.ts +1 -1
- package/app/composables/useVectorLocale.ts +2 -2
- package/app/composables/useVectorSchema.ts +1 -1
- package/app/composables/useVectorVersion.ts +2 -2
- package/app/composables/useVectorWriting.ts +72 -0
- package/app/i18n/ar/ai.ts +93 -0
- package/app/i18n/ar/index.ts +2 -1
- package/app/i18n/ar/record.ts +4 -0
- package/app/i18n/ar/shell.ts +1 -0
- package/app/i18n/de/ai.ts +93 -0
- package/app/i18n/de/index.ts +2 -1
- package/app/i18n/de/record.ts +4 -0
- package/app/i18n/de/shell.ts +1 -0
- package/app/i18n/en/ai.ts +93 -0
- package/app/i18n/en/index.ts +2 -1
- package/app/i18n/en/record.ts +4 -0
- package/app/i18n/en/shell.ts +1 -0
- package/app/i18n/es/ai.ts +93 -0
- package/app/i18n/es/index.ts +2 -1
- package/app/i18n/es/record.ts +4 -0
- package/app/i18n/es/shell.ts +1 -0
- package/app/i18n/fr/ai.ts +93 -0
- package/app/i18n/fr/index.ts +2 -1
- package/app/i18n/fr/record.ts +4 -0
- package/app/i18n/fr/shell.ts +1 -0
- package/app/i18n/he/ai.ts +93 -0
- package/app/i18n/he/index.ts +2 -1
- package/app/i18n/he/record.ts +4 -0
- package/app/i18n/he/shell.ts +1 -0
- package/app/i18n/index.ts +1 -1
- package/app/i18n/it/ai.ts +93 -0
- package/app/i18n/it/index.ts +2 -1
- package/app/i18n/it/record.ts +4 -0
- package/app/i18n/it/shell.ts +1 -0
- package/app/i18n/ja/ai.ts +93 -0
- package/app/i18n/ja/index.ts +2 -1
- package/app/i18n/ja/record.ts +4 -0
- package/app/i18n/ja/shell.ts +1 -0
- package/app/i18n/ko/ai.ts +93 -0
- package/app/i18n/ko/index.ts +2 -1
- package/app/i18n/ko/record.ts +4 -0
- package/app/i18n/ko/shell.ts +1 -0
- package/app/i18n/nl/ai.ts +93 -0
- package/app/i18n/nl/index.ts +2 -1
- package/app/i18n/nl/record.ts +4 -0
- package/app/i18n/nl/shell.ts +1 -0
- package/app/i18n/pl/ai.ts +93 -0
- package/app/i18n/pl/index.ts +2 -1
- package/app/i18n/pl/record.ts +4 -0
- package/app/i18n/pl/shell.ts +1 -0
- package/app/i18n/pt/ai.ts +93 -0
- package/app/i18n/pt/index.ts +2 -1
- package/app/i18n/pt/record.ts +4 -0
- package/app/i18n/pt/shell.ts +1 -0
- package/app/i18n/pt-BR/ai.ts +93 -0
- package/app/i18n/pt-BR/index.ts +2 -1
- package/app/i18n/pt-BR/record.ts +4 -0
- package/app/i18n/pt-BR/shell.ts +1 -0
- package/app/i18n/ru/ai.ts +93 -0
- package/app/i18n/ru/index.ts +2 -1
- package/app/i18n/ru/record.ts +4 -0
- package/app/i18n/ru/shell.ts +1 -0
- package/app/i18n/tr/ai.ts +93 -0
- package/app/i18n/tr/index.ts +2 -1
- package/app/i18n/tr/record.ts +4 -0
- package/app/i18n/tr/shell.ts +1 -0
- package/app/i18n/uk/ai.ts +93 -0
- package/app/i18n/uk/index.ts +2 -1
- package/app/i18n/uk/record.ts +4 -0
- package/app/i18n/uk/shell.ts +1 -0
- package/app/i18n/zh-Hans/ai.ts +93 -0
- package/app/i18n/zh-Hans/index.ts +2 -1
- package/app/i18n/zh-Hans/record.ts +4 -0
- package/app/i18n/zh-Hans/shell.ts +1 -0
- package/app/layouts/vector.vue +4 -1
- package/app/pages/settings.vue +7 -1
- package/app/plugins/vector-ai.client.ts +54 -0
- package/app/plugins/vector-extensions.client.ts +28 -37
- package/app/types/vector.ts +40 -3
- package/app/utils/aiAvailability.ts +55 -0
- package/app/utils/assistantBody.ts +69 -0
- package/app/utils/assistantStream.ts +133 -0
- package/app/utils/assistantTools.ts +45 -0
- package/app/utils/followScroll.ts +110 -0
- package/app/utils/format.ts +3 -3
- package/app/utils/internal/paths.ts +1 -1
- package/app/utils/queues.ts +1 -1
- package/app/utils/recordLinks.ts +45 -0
- package/app/utils/richtext.ts +3 -3
- package/app/utils/translate.ts +2 -2
- package/dist/static/200.html +1 -1
- package/dist/static/404.html +1 -1
- package/dist/static/_nuxt/-ksGenLl.js +1 -0
- package/dist/static/_nuxt/{DDJY3JL5.js → 0Q9tQaGZ.js} +1 -1
- package/dist/static/_nuxt/2mrvZCJz.js +3 -0
- package/dist/static/_nuxt/{C2PH7r9_.js → 2u7wMpR1.js} +1 -1
- package/dist/static/_nuxt/72BATg3-.js +1 -0
- package/dist/static/_nuxt/{BKtgreqG.js → 7hLwEPpo.js} +1 -1
- package/dist/static/_nuxt/{D5vg-NJ4.js → 7rwxDW6j.js} +1 -1
- package/dist/static/_nuxt/{Pj99sh0X.js → AbcTnLPe.js} +1 -1
- package/dist/static/_nuxt/B-b861aP.js +1 -0
- package/dist/static/_nuxt/{Cuw0JSbz.js → B2rZ5lwu.js} +1 -1
- package/dist/static/_nuxt/B4hfz7cN.js +1 -0
- package/dist/static/_nuxt/B65UlNtP.js +1 -0
- package/dist/static/_nuxt/{oThorgNS.js → B8JL5gwX.js} +1 -1
- package/dist/static/_nuxt/{D5Woe3YR.js → B8wNbnS0.js} +1 -1
- package/dist/static/_nuxt/{BDM1yKDf.js → B9FqenNL.js} +1 -1
- package/dist/static/_nuxt/{wLSd0d84.js → B9s6vEby.js} +1 -1
- package/dist/static/_nuxt/BE6e_jlD.js +1 -0
- package/dist/static/_nuxt/{Dx8sj9kP.js → BFZfZyte.js} +1 -1
- package/dist/static/_nuxt/{Dnl_Q9LX.js → BJSRjsBt.js} +1 -1
- package/dist/static/_nuxt/{lRmDd_Kx.js → BJh6qVAK.js} +1 -1
- package/dist/static/_nuxt/{DBmDhhWl.js → BJxaGigr.js} +1 -1
- package/dist/static/_nuxt/{CmoDOC5e.js → BL2SeM_r.js} +1 -1
- package/dist/static/_nuxt/BPT7yI6j.js +1 -0
- package/dist/static/_nuxt/BQ47h6Wh.js +1 -0
- package/dist/static/_nuxt/{CalcRVj7.js → BQitPbA5.js} +1 -1
- package/dist/static/_nuxt/{D9unnd4n.js → BSj4WTjT.js} +1 -1
- package/dist/static/_nuxt/{D3cKZbMy.js → BVrihF-G.js} +1 -1
- package/dist/static/_nuxt/BW9qBvMR.js +1 -0
- package/dist/static/_nuxt/{DU1KpHiJ.js → BWscDCZb.js} +1 -1
- package/dist/static/_nuxt/{JGAhx20W.js → BXnWvqRw.js} +1 -1
- package/dist/static/_nuxt/BcSEGymu.js +2 -0
- package/dist/static/_nuxt/Bj-QksVr.js +2 -0
- package/dist/static/_nuxt/{CvMhFq5K.js → Bl4F_9Di.js} +1 -1
- package/dist/static/_nuxt/{BRbbmSpl.js → BowgCQje.js} +1 -1
- package/dist/static/_nuxt/{DgVB5umK.js → BuTE4a2w.js} +1 -1
- package/dist/static/_nuxt/Bw6FrC2B.js +1 -0
- package/dist/static/_nuxt/{Cv0_BbF0.js → Byf6uyFv.js} +1 -1
- package/dist/static/_nuxt/Bzvft7RG.js +1 -0
- package/dist/static/_nuxt/C1y0neXX.js +1 -0
- package/dist/static/_nuxt/{BUF7Jq4U.js → C48zuAYh.js} +1 -1
- package/dist/static/_nuxt/{DJFQLDk5.js → C52FYB-5.js} +1 -1
- package/dist/static/_nuxt/CAXk9Oc1.js +1 -0
- package/dist/static/_nuxt/{C7fSyjDf.js → CD5zJmlk.js} +1 -1
- package/dist/static/_nuxt/CDnV5Q2S.js +2 -0
- package/dist/static/_nuxt/{CzTUD5Qk.js → CE5HzlKJ.js} +1 -1
- package/dist/static/_nuxt/{7K6MnLUx.js → CF_C4t63.js} +1 -1
- package/dist/static/_nuxt/CFuvN8kq.js +1 -0
- package/dist/static/_nuxt/{CqMf6Lsu.js → CHIGMs2v.js} +1 -1
- package/dist/static/_nuxt/CIcNJyjb.js +1 -0
- package/dist/static/_nuxt/{Dyz4VrUP.js → CLJSzUt5.js} +1 -1
- package/dist/static/_nuxt/CQvUQgZO.js +2 -0
- package/dist/static/_nuxt/{N6Uxr2YO.js → CRAHgjs4.js} +1 -1
- package/dist/static/_nuxt/{B6NDob-m.js → CSezMYzn.js} +1 -1
- package/dist/static/_nuxt/{B7CwuqHQ.js → CSgLLbCN.js} +1 -1
- package/dist/static/_nuxt/{1EmobxKy.js → CTHBH7-N.js} +1 -1
- package/dist/static/_nuxt/CVGEoUmj.js +1 -0
- package/dist/static/_nuxt/{bm6plv74.js → CVePRzEp.js} +1 -1
- package/dist/static/_nuxt/{R3rw3hPp.js → CWfptrnU.js} +1 -1
- package/dist/static/_nuxt/{C1djf5sc.js → CXSf4TOH.js} +1 -1
- package/dist/static/_nuxt/CbOoWXps.js +1 -0
- package/dist/static/_nuxt/Cf2NM87n.js +1 -0
- package/dist/static/_nuxt/{ycmL3bWs.js → CjYmnU-l.js} +1 -1
- package/dist/static/_nuxt/Ckm05LT2.js +1 -0
- package/dist/static/_nuxt/{DHtEcXUO.js → Cl2jXKkl.js} +1 -1
- package/dist/static/_nuxt/{CF1K6UXb.js → Clx69IQe.js} +1 -1
- package/dist/static/_nuxt/{BZDOVMsw.js → CmJ0ekjX.js} +1 -1
- package/dist/static/_nuxt/{Cjyh4OAN.js → Cpel4vlt.js} +1 -1
- package/dist/static/_nuxt/{CUAnR2FD.js → CrYfHi9E.js} +1 -1
- package/dist/static/_nuxt/CvTgOEOS.js +1 -0
- package/dist/static/_nuxt/CvVbTdaI.js +1 -0
- package/dist/static/_nuxt/{DoNlTJTo.js → D2ovGjnz.js} +1 -1
- package/dist/static/_nuxt/{BOHl_j0c.js → D3cIKCPa.js} +1 -1
- package/dist/static/_nuxt/{CvtjhXJ1.js → D3jC5ZAK.js} +1 -1
- package/dist/static/_nuxt/{FzhpMR1D.js → D3xofh1k.js} +1 -1
- package/dist/static/_nuxt/{BfuFZvSA.js → D7dC5VYH.js} +1 -1
- package/dist/static/_nuxt/{DfVLYfcR.js → D7eR_J9I.js} +1 -1
- package/dist/static/_nuxt/DAXm0JlI.js +1 -0
- package/dist/static/_nuxt/DDsQjoa8.js +1 -0
- package/dist/static/_nuxt/DFIqxsd4.js +1 -0
- package/dist/static/_nuxt/DGQrzV9s.js +1 -0
- package/dist/static/_nuxt/{1_Uuyt8D.js → DHNZ4ANp.js} +1 -1
- package/dist/static/_nuxt/{AXpHq_M6.js → DKOyYUi8.js} +1 -1
- package/dist/static/_nuxt/DOEj9Txc.js +1 -0
- package/dist/static/_nuxt/{CJepLjEa.js → DOq2YmIE.js} +1 -1
- package/dist/static/_nuxt/DOxWca9k.js +1 -0
- package/dist/static/_nuxt/{D7JW3pi_.js → DVyeIIya.js} +1 -1
- package/dist/static/_nuxt/{DT1zmKvw.js → DW3p59oX.js} +1 -1
- package/dist/static/_nuxt/{ERkvasWH.js → DXZAXwNd.js} +1 -1
- package/dist/static/_nuxt/{D11OKveI.js → DYPYEI74.js} +1 -1
- package/dist/static/_nuxt/D_hQWjK3.js +1 -0
- package/dist/static/_nuxt/{ZNfE-M4g.js → Dao3p0cp.js} +1 -1
- package/dist/static/_nuxt/{D3xqGGYp.js → DcC5rHQt.js} +1 -1
- package/dist/static/_nuxt/DdYMnBKs.js +1 -0
- package/dist/static/_nuxt/{DOOLWZFN.js → DeZyAt_3.js} +1 -1
- package/dist/static/_nuxt/DfApYreK.js +10 -0
- package/dist/static/_nuxt/{BEcvuouq.js → DjRWYJ_r.js} +1 -1
- package/dist/static/_nuxt/{DqVTouT1.js → DllQuWrz.js} +1 -1
- package/dist/static/_nuxt/DpWwaWd-.js +185 -0
- package/dist/static/_nuxt/DryMzf1V.js +1 -0
- package/dist/static/_nuxt/{BEu939QZ.js → DsLys5JK.js} +1 -1
- package/dist/static/_nuxt/DvEvjhbF.js +1 -0
- package/dist/static/_nuxt/{B1lIMV_o.js → Dw7WalTb.js} +1 -1
- package/dist/static/_nuxt/{Dqv1iAUt.js → DwpSsR4l.js} +1 -1
- package/dist/static/_nuxt/FfebEZGy.js +1 -0
- package/dist/static/_nuxt/{DPDZkh6Z.js → GdAHGVsW.js} +1 -1
- package/dist/static/_nuxt/{qFGHTGtX.js → HdAGfEVj.js} +1 -1
- package/dist/static/_nuxt/{CsakM5cG.js → IxgCkjBe.js} +1 -1
- package/dist/static/_nuxt/{BJiySRJW.js → Jl8QPdwt.js} +1 -1
- package/dist/static/_nuxt/{4_OCizmC.js → KWfizXHd.js} +1 -1
- package/dist/static/_nuxt/KeyValue.CWzmqYlQ.css +1 -0
- package/dist/static/_nuxt/Notifications.CAlaWnJg.css +1 -0
- package/dist/static/_nuxt/PqTF-5Vs.js +1 -0
- package/dist/static/_nuxt/SacKuioS.js +65 -0
- package/dist/static/_nuxt/TlyrWgih.js +1 -0
- package/dist/static/_nuxt/{oj_DzV60.js → WAarVmAq.js} +1 -1
- package/dist/static/_nuxt/{DcWEOxVe.js → XnbMqODk.js} +1 -1
- package/dist/static/_nuxt/{R_5D07UV.js → Y2iAEIYr.js} +1 -1
- package/dist/static/_nuxt/_resource_.Q2lVCG-n.css +1 -0
- package/dist/static/_nuxt/{BSj7_50x.js → b2bdl3qT.js} +1 -1
- package/dist/static/_nuxt/bNqxxQg2.js +1 -0
- package/dist/static/_nuxt/builds/latest.json +1 -1
- package/dist/static/_nuxt/builds/meta/f78103ad-2489-4aee-b300-160bb1a81e35.json +1 -0
- package/dist/static/_nuxt/{yO0LqdZ2.js → e2dpeiRT.js} +1 -1
- package/dist/static/_nuxt/{entry.DmwuXgFN.css → entry.CANiyyNa.css} +1 -1
- package/dist/static/_nuxt/error-404.D5YWHu6f.css +1 -0
- package/dist/static/_nuxt/error-500.BP1eYUQR.css +1 -0
- package/dist/static/_nuxt/{CB-gmtNU.js → fLsGnP3B.js} +1 -1
- package/dist/static/_nuxt/gYmJEXHP.js +1 -0
- package/dist/static/_nuxt/{B-nBg1Xv.js → jI4JB4sB.js} +1 -1
- package/dist/static/_nuxt/{DebXB2Xn.js → qoAbHCOq.js} +1 -1
- package/dist/static/_nuxt/rYfJ_RlJ.js +1 -0
- package/dist/static/_nuxt/{CrGsoVt3.js → tGXqY3hN.js} +1 -1
- package/dist/static/_nuxt/{Bk4XXIda.js → tv5vSe5Y.js} +1 -1
- package/dist/static/_nuxt/vector.NgmG3ZDn.css +1 -0
- package/dist/static/_nuxt/{BEX0oVSL.js → wSbLQ3i5.js} +2 -2
- package/dist/static/_nuxt/{0Vkqk5K3.js → y5gvPoD3.js} +1 -1
- package/dist/static/_nuxt/{DyweGZi4.js → yIw8BzU6.js} +1 -1
- package/dist/static/_nuxt/{NTQyXsYJ.js → zA0zNamO.js} +1 -1
- package/dist/static/index.html +1 -1
- package/dist/static/jobs/index.html +1 -1
- package/dist/static/login/index.html +1 -1
- package/dist/static/queues/index.html +1 -1
- package/dist/static/settings/index.html +1 -1
- package/dist/static/vector-bundle.json +148 -152
- package/package.json +19 -18
- package/dist/static/_nuxt/7dnGTtf6.js +0 -2
- package/dist/static/_nuxt/AfaX5CNR.js +0 -105
- package/dist/static/_nuxt/B-KA4dLI.js +0 -65
- package/dist/static/_nuxt/B6S9Z6WQ.js +0 -1
- package/dist/static/_nuxt/BDNMzG2s.js +0 -1
- package/dist/static/_nuxt/BJhRZpbP.js +0 -1
- package/dist/static/_nuxt/BPzr_ZFH.js +0 -1
- package/dist/static/_nuxt/BZXFBS4d.js +0 -1
- package/dist/static/_nuxt/Bp1wYuAu.js +0 -2
- package/dist/static/_nuxt/BpF7UbSy.js +0 -1
- package/dist/static/_nuxt/BqIYBnn1.js +0 -1
- package/dist/static/_nuxt/Brpk64DL.js +0 -1
- package/dist/static/_nuxt/BtZEn8rG.js +0 -1
- package/dist/static/_nuxt/BzcHWzF1.js +0 -1
- package/dist/static/_nuxt/C-dF6TjJ.js +0 -1
- package/dist/static/_nuxt/C0BqlrB-.js +0 -1
- package/dist/static/_nuxt/C6kvBrux.js +0 -1
- package/dist/static/_nuxt/C9pCrKWL.js +0 -1
- package/dist/static/_nuxt/CBIdPVBN.js +0 -1
- package/dist/static/_nuxt/CE4w7ySf.js +0 -1
- package/dist/static/_nuxt/CEq7Sdek.js +0 -1
- package/dist/static/_nuxt/CIIjiec-.js +0 -1
- package/dist/static/_nuxt/CL8kR7Jl.js +0 -1
- package/dist/static/_nuxt/CTqdSnzX.js +0 -1
- package/dist/static/_nuxt/CcarPq9D.js +0 -1
- package/dist/static/_nuxt/Cet_varq.js +0 -1
- package/dist/static/_nuxt/ChHwRItD.js +0 -1
- package/dist/static/_nuxt/ClGaGEq-.js +0 -1
- package/dist/static/_nuxt/CojXjKit.js +0 -1
- package/dist/static/_nuxt/CpCuvz_Q.js +0 -1
- package/dist/static/_nuxt/D-sMWl8f.js +0 -1
- package/dist/static/_nuxt/D1s1ZPEA.js +0 -2
- package/dist/static/_nuxt/D7UGFkhh.js +0 -1
- package/dist/static/_nuxt/D8p7N22I.js +0 -1
- package/dist/static/_nuxt/DBXnb1tR.js +0 -1
- package/dist/static/_nuxt/DL237dS3.js +0 -1
- package/dist/static/_nuxt/DRB_eN3w.js +0 -67
- package/dist/static/_nuxt/Djb5b_0H.js +0 -1
- package/dist/static/_nuxt/DlpIJgqB.js +0 -1
- package/dist/static/_nuxt/DrEHkKjX.js +0 -10
- package/dist/static/_nuxt/Dt7NqY56.js +0 -1
- package/dist/static/_nuxt/DuYZsH0p.js +0 -1
- package/dist/static/_nuxt/Dx-cZwBu.js +0 -2
- package/dist/static/_nuxt/IhWbQWqt.js +0 -1
- package/dist/static/_nuxt/JkGLG92w.js +0 -1
- package/dist/static/_nuxt/KeyValue.CczYMB-Q.css +0 -1
- package/dist/static/_nuxt/Notifications.AEytcgEO.css +0 -1
- package/dist/static/_nuxt/QTRQ5bvA.js +0 -1
- package/dist/static/_nuxt/UoJt16Vw.js +0 -1
- package/dist/static/_nuxt/VSpacer.DfbUir7X.css +0 -1
- package/dist/static/_nuxt/_resource_.CZ-hvn3L.css +0 -1
- package/dist/static/_nuxt/builds/meta/5f231028-949f-4f49-8f8d-307070c40687.json +0 -1
- package/dist/static/_nuxt/error-404.DIb-VIQ0.css +0 -1
- package/dist/static/_nuxt/error-500.BvRwBykK.css +0 -1
- package/dist/static/_nuxt/vector.ClRRJOjR.css +0 -1
- package/dist/static/_nuxt/wlpNGAAZ.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,100 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- A resource's list reloads the page it shows on
|
|
13
|
+
`refreshNuxtData('vector.list.<slug>')`, or on `refreshNuxtData()`
|
|
14
|
+
with no keys, as a page loaded with `useAsyncData` does.
|
|
15
|
+
|
|
16
|
+
## [0.13.0] - 2026-11-19
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `window.Vector` version 2. Every version 1 function keeps its
|
|
21
|
+
signature; new registration points, reachable by runtime extensions and
|
|
22
|
+
by layers through `useVectorExtend()`: `defineShellAction` (the app
|
|
23
|
+
bar), `defineListToolbarItem` (a list's toolbar, with its filters,
|
|
24
|
+
groups, advanced conditions and search, two-way),
|
|
25
|
+
`defineInputAddon` (under form inputs of given field types, or, with
|
|
26
|
+
`placement: 'inner'`, inside a text or textarea input at its inline
|
|
27
|
+
end),
|
|
28
|
+
`defineEditorToolbarItem` (the rich-text and Markdown toolbars, given
|
|
29
|
+
the live Tiptap editor), `definePaletteCommand` (the command palette's
|
|
30
|
+
"Commands") and `defineSettingsAddon` (under a settings group's form).
|
|
31
|
+
- `window.Vector.host` and `useVectorHost()`: the loaded descriptor
|
|
32
|
+
(read-only), the route context (`path`, `resource`, `recordId`), the
|
|
33
|
+
locale, and the admin's `markdownHtml` and `sanitizeHtml`. The curated
|
|
34
|
+
Vuetify set gains `VNavigationDrawer`, `VToolbar`,
|
|
35
|
+
`VProgressCircular` and `VBadge`.
|
|
36
|
+
- The types carry `meta` on resources and fields.
|
|
37
|
+
- History shows a write's origin as a chip (*via assistant* for the AI
|
|
38
|
+
assistant's approved proposals), from `record.audit.origin.<token>`,
|
|
39
|
+
or the token itself when it has no message.
|
|
40
|
+
- The AI UI for `kinetis/vector-ai`, registered through the points
|
|
41
|
+
above only while the descriptor carries `capabilities.ai`, so a plain
|
|
42
|
+
install registers none of it and sends no AI request. Each part shows
|
|
43
|
+
only while its own flag is on, for a resource not kept from the model
|
|
44
|
+
(`excluded`) and a field not kept back (`excludedFields`):
|
|
45
|
+
- **Plain-language filters** in every list's toolbar
|
|
46
|
+
(`capabilities.ai.filters`): the answer filters the list at once,
|
|
47
|
+
and a note says what it understood, offers the candidates of an
|
|
48
|
+
ambiguous relation, and Undo puts the list's filter and search back.
|
|
49
|
+
- **The assistant** (`capabilities.ai.assistant`): a sparkle button in
|
|
50
|
+
the app bar, and ⌘J (Ctrl+J on Windows and Linux) from anywhere,
|
|
51
|
+
open an end-side drawer with the conversation, a composer, *New
|
|
52
|
+
conversation* and a line naming the page the questions are about.
|
|
53
|
+
Answers stream from `POST /vector/ai/assistant` (the Vercel AI SDK
|
|
54
|
+
data-stream protocol, with the whole JSON answer where the runtime
|
|
55
|
+
answers `501`), follow the reader at a reading pace, render through
|
|
56
|
+
the admin's own Markdown sanitizer and link each `resource#id` to
|
|
57
|
+
its record. Tool chips show each tool once, with a count. A
|
|
58
|
+
failure shows its reason and Retry; a spent budget says when it
|
|
59
|
+
renews. The conversation sent back is trimmed to the server's caps
|
|
60
|
+
(`ASSISTANT_MAX_BODY_BYTES`, `ASSISTANT_MAX_MESSAGES`,
|
|
61
|
+
`ASSISTANT_MAX_MESSAGE_CHARS`, checked against
|
|
62
|
+
`AssistantController` by the test suite) and opens with the
|
|
63
|
+
person's own message. It is the signed-in user's: forgotten, and
|
|
64
|
+
the drawer closed, when the user changes, the session ends or the
|
|
65
|
+
admin signs out.
|
|
66
|
+
- **Approval cards** (`capabilities.ai.assistantWrites`): a change the
|
|
67
|
+
assistant proposed shows under its answer as a card built from the
|
|
68
|
+
structured proposal, field by field with the value before, never
|
|
69
|
+
from the model's prose. Approve and Reject post to
|
|
70
|
+
`/vector/ai/approvals/{id}/approve` and `/reject`; the decision goes
|
|
71
|
+
back to the assistant, and an expired (410) or unknown (404)
|
|
72
|
+
proposal says so. An executed change reloads the open list, record
|
|
73
|
+
and History.
|
|
74
|
+
- **Writing help** (`capabilities.ai.writing`): a menu inside the
|
|
75
|
+
`string` and `text` inputs of a resource's create and edit pages
|
|
76
|
+
(`defineInputAddon`, placement `inner`), and in the rich-text and
|
|
77
|
+
Markdown editors' toolbars, never in a bulk edit, an action's
|
|
78
|
+
dialog or a relation's inline create. Rewrite, Shorten, Fix
|
|
79
|
+
grammar and Translate to… work on the selection, or the whole text
|
|
80
|
+
while nothing is selected; the answer opens beside the text, Before
|
|
81
|
+
and After, to Replace or Discard. Not offered on a field in
|
|
82
|
+
`capabilities.ai.noWriting`.
|
|
83
|
+
- **The provider-key panel** of the `ai` settings group
|
|
84
|
+
(`GET`, `PUT` and `DELETE /vector/ai/credentials`).
|
|
85
|
+
- Its messages, under `ai`, in every shipped language.
|
|
86
|
+
- `capabilities.ai` in the descriptor's type (`AiCapabilities`), read
|
|
87
|
+
through `aiCapabilities()` and `aiOffered()`.
|
|
88
|
+
|
|
89
|
+
### Changed
|
|
90
|
+
|
|
91
|
+
- Reads descriptor version 6 (`DESCRIPTOR_VERSION`), the one
|
|
92
|
+
`kinetis/vector` 0.16.0 publishes, and refuses version 5.
|
|
93
|
+
- Depends on Tiptap 3.35, DOMPurify 3.5 and vue-i18n 11.4.23.
|
|
94
|
+
|
|
95
|
+
## [0.12.5] - 2026-11-16
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
|
|
99
|
+
- The Tiptap dependencies (`@tiptap/core`, `@tiptap/pm`, `@tiptap/vue-3`,
|
|
100
|
+
`@tiptap/starter-kit`, `@tiptap/markdown`, `@tiptap/suggestion` and the
|
|
101
|
+
image, link, mention, placeholder and table extensions) now require
|
|
102
|
+
`^3.34.0`.
|
|
103
|
+
|
|
10
104
|
## [0.12.4] - 2026-11-16
|
|
11
105
|
|
|
12
106
|
### Changed
|
|
@@ -223,15 +317,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
223
317
|
the forms, the settings, bulk edit, action dialogs, inline list edits
|
|
224
318
|
and uploads, instead of being read as one: a `null` entry made a form
|
|
225
319
|
or the list's changeset fail without showing anything.
|
|
226
|
-
- A record form shows a server error on a field it does not show
|
|
227
|
-
by `visibleWhen`, or preset by the relation the form was opened from
|
|
320
|
+
- A record form shows a server error on a field it does not show (hidden
|
|
321
|
+
by `visibleWhen`, or preset by the relation the form was opened from)
|
|
228
322
|
above the form, under the field's label; it was shown nowhere, and the
|
|
229
323
|
save failed without a reason.
|
|
230
324
|
|
|
231
325
|
### Security
|
|
232
326
|
|
|
233
327
|
- An action answering `ActionResponse::openUrl()` opens the URL only
|
|
234
|
-
when it is http(s), mailto or relative
|
|
328
|
+
when it is http(s), mailto or relative: the rule a URL cell and a
|
|
235
329
|
rich-text link follow. A `javascript:` or `data:` URL, which an action
|
|
236
330
|
echoing a record's value could return, is no longer opened.
|
|
237
331
|
- A notification's link is followed only when it is a path of the
|
package/README.md
CHANGED
|
@@ -24,13 +24,20 @@ monorepo, beside its PHP package and a demo application.
|
|
|
24
24
|
|
|
25
25
|
The admin UI for [`kinetis/vector`](https://packagist.org/packages/kinetis/vector):
|
|
26
26
|
a Nuxt 4 layer on Vuetify 4 that renders the descriptor the API
|
|
27
|
-
publishes
|
|
28
|
-
dashboards, jobs, settings
|
|
27
|
+
publishes (navigation, lists, forms, relation panels, actions,
|
|
28
|
+
dashboards, jobs, settings) and contains no application knowledge. An
|
|
29
29
|
application is a Nuxt app that extends the layer, served as a static
|
|
30
30
|
site on its own origin with a bearer token (standalone), or installed
|
|
31
31
|
into the PHP application and served at `/vector/ui` behind its session
|
|
32
32
|
(hosted).
|
|
33
33
|
|
|
34
|
+
With [`kinetis/vector-ai`](https://packagist.org/packages/kinetis/vector-ai)
|
|
35
|
+
on the server, the same layer shows AI features: plain-language
|
|
36
|
+
filters, the assistant with its approval cards, writing help and the
|
|
37
|
+
provider-key panel. They turn on from the descriptor's
|
|
38
|
+
`capabilities.ai`; without it, the admin shows none of them and sends no
|
|
39
|
+
AI request. See [AI](https://kinetis.dev/vector/docs/ai.html).
|
|
40
|
+
|
|
34
41
|
The package also ships that hosted build, in `dist/static` with its
|
|
35
42
|
`vector-bundle.json` manifest: `kinetis vector:install-ui` downloads it
|
|
36
43
|
from the registry and installs it, so a PHP deployment needs no Node.
|
|
@@ -52,8 +59,9 @@ export default defineNuxtConfig({
|
|
|
52
59
|
|
|
53
60
|
`pnpm nuxt dev` for development, `pnpm nuxt generate` for a static site
|
|
54
61
|
any web server hosts. The API allows the UI's origin through
|
|
55
|
-
`CorsMiddleware`
|
|
56
|
-
|
|
62
|
+
`CorsMiddleware`, exposing `Retry-After` so the AI features can say
|
|
63
|
+
when a spent daily budget renews, and offers the `POST /auth/login`
|
|
64
|
+
endpoint the sign-in page calls; see
|
|
57
65
|
[Deployment](https://kinetis.dev/vector/docs/deployment.html). Keep this
|
|
58
66
|
package at the release your `kinetis/vector` pins: the admin shows a
|
|
59
67
|
banner naming both versions when they differ.
|
|
@@ -77,4 +85,4 @@ Cells, inputs, widgets and runtime extensions:
|
|
|
77
85
|
|
|
78
86
|
## License
|
|
79
87
|
|
|
80
|
-
MIT
|
|
88
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// Markdown source. On the record page it is rendered: markdown-it with HTML
|
|
3
3
|
// in the source turned off (raw HTML shows as text), then DOMPurify with the
|
|
4
|
-
// same allow-list as rich text
|
|
4
|
+
// same allow-list as rich text; the only other `v-html` in the layer. In a
|
|
5
5
|
// list, the plain text, shortened.
|
|
6
6
|
const props = defineProps<{ value: unknown, context: 'index' | 'show' }>()
|
|
7
7
|
const text = computed(() => typeof props.value === 'string' ? props.value : '')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { VectorField, VectorResource } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
|
-
// A rich-text value. On the record page it is shown as HTML
|
|
4
|
+
// A rich-text value. On the record page it is shown as HTML, and this is
|
|
5
5
|
// the one `v-html` in the layer. It is safe because the HTML is never the
|
|
6
6
|
// stored value: it is generated here from the document through the
|
|
7
7
|
// field's fixed schema (anything outside the schema cannot be expressed),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { fieldProps, type VectorSearchResult } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
4
|
// Ctrl/Cmd+K: search every globally searchable resource, jump to a
|
|
5
|
-
// record or a resource. A dialog and a list
|
|
5
|
+
// record or a resource. A dialog and a list; no Labs dependency.
|
|
6
6
|
const appConfig = useAppConfig()
|
|
7
7
|
const api = useVectorApi()
|
|
8
8
|
const { menu, resource: resourceOf } = useVectorSchema()
|
|
@@ -36,7 +36,7 @@ watch(open, (o) => { if (!o) { query.value = ''; results.value = [] } })
|
|
|
36
36
|
|
|
37
37
|
const keyOf = (r: VectorSearchResult) => `${r.resource}-${r.id}`
|
|
38
38
|
|
|
39
|
-
/** The subtitle as its field shows it
|
|
39
|
+
/** The subtitle as its field shows it (an enum by its label) then the resource. */
|
|
40
40
|
function subtitleOf(r: VectorSearchResult): string {
|
|
41
41
|
const resource = resourceOf(r.resource)
|
|
42
42
|
const field = resource?.fields.find(f => f.name === resource.searchResult?.subtitle)
|
|
@@ -70,6 +70,16 @@ const pages = useVectorPages()
|
|
|
70
70
|
const pageItems = computed(() => Object.entries(pages.value)
|
|
71
71
|
.map(([name, p]) => ({ name, title: pageLabel(p.title), icon: p.icon }))
|
|
72
72
|
.filter(p => (query.value ?? '').trim() === '' || p.title.toLowerCase().includes((query.value ?? '').trim().toLowerCase())))
|
|
73
|
+
// commands extensions and layers registered (definePaletteCommand): each takes what was typed
|
|
74
|
+
const { paletteCommands } = useVectorExtensions()
|
|
75
|
+
const commands = computed(() => [...paletteCommands.entries()].map(([name, c]) => ({ name, title: pageLabel(c.title), icon: c.icon, run: c.run })))
|
|
76
|
+
|
|
77
|
+
function runCommand(command: { run: (query: string) => unknown }) {
|
|
78
|
+
const typed = (query.value ?? '').trim()
|
|
79
|
+
open.value = false
|
|
80
|
+
void Promise.resolve().then(() => command.run(typed)).catch(() => undefined)
|
|
81
|
+
}
|
|
82
|
+
|
|
73
83
|
const resources = computed(() => menu.value.flatMap(g => g.items).filter(r => (query.value ?? '').trim() === '' || r.label.toLowerCase().includes((query.value ?? '').trim().toLowerCase())))
|
|
74
84
|
|
|
75
85
|
function go(path: string) {
|
|
@@ -107,6 +117,10 @@ defineExpose({ open })
|
|
|
107
117
|
</template>
|
|
108
118
|
</v-list-item>
|
|
109
119
|
</template>
|
|
120
|
+
<template v-if="commands.length">
|
|
121
|
+
<v-list-subheader>{{ t('shell.palette.commands') }}</v-list-subheader>
|
|
122
|
+
<v-list-item v-for="c in commands" :key="c.name" :data-palette-command="c.name" :title="c.title" :prepend-icon="c.icon ?? 'mdi-console-line'" @click="runCommand(c)" />
|
|
123
|
+
</template>
|
|
110
124
|
<v-list-subheader>{{ t('shell.palette.resources') }}</v-list-subheader>
|
|
111
125
|
<v-list-item v-for="r in resources" :key="r.slug" :title="r.label" :prepend-icon="r.icon ?? 'mdi-table'" @click="go(`/r/${r.slug}`)" />
|
|
112
126
|
<template v-if="pageItems.length">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { VectorField, VectorFieldState } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
|
-
// A block of inputs for a loose field list
|
|
5
|
-
// settings group
|
|
4
|
+
// A block of inputs for a loose field list (an action's dialog, a
|
|
5
|
+
// settings group) sharing the record form's registry, rules and 422
|
|
6
6
|
// mapping. The owner holds the values and the server errors.
|
|
7
7
|
const props = defineProps<{
|
|
8
8
|
fields: VectorField[]
|
|
@@ -41,6 +41,14 @@ function set(name: string, value: unknown) {
|
|
|
41
41
|
:resource="resource ?? ''"
|
|
42
42
|
@update:model-value="(v: unknown) => set(field.name, v)"
|
|
43
43
|
/>
|
|
44
|
+
<VxInputAddons
|
|
45
|
+
:field="field"
|
|
46
|
+
:resource="resource ?? ''"
|
|
47
|
+
:record="values"
|
|
48
|
+
:model-value="values[field.name]"
|
|
49
|
+
:disabled="states[field.name]?.disabled === true"
|
|
50
|
+
@update:model-value="(v: unknown) => set(field.name, v)"
|
|
51
|
+
/>
|
|
44
52
|
</v-col>
|
|
45
53
|
</v-row>
|
|
46
54
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { fieldProps, type VectorField } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
4
|
// A key-value field's entries as rows of two text inputs. The rows are the
|
|
5
|
-
// editing state
|
|
5
|
+
// editing state (a row may be half typed) and the model is the object
|
|
6
6
|
// they make: a row without a key is left out, a repeated key's last row wins.
|
|
7
7
|
const props = defineProps<{ field: VectorField, rules?: unknown[], errorMessages: string[], record?: Record<string, unknown>, resource?: string, disabled?: boolean }>()
|
|
8
8
|
const model = defineModel<Record<string, string> | null>()
|
|
@@ -14,7 +14,7 @@ const keyLabel = computed(() => String(fieldProps(props.field).keyLabel ?? t('fi
|
|
|
14
14
|
const valueLabel = computed(() => String(fieldProps(props.field).valueLabel ?? t('fields.keyValue.value')))
|
|
15
15
|
|
|
16
16
|
// Adopt a value set from outside (a record loaded), not the one these rows
|
|
17
|
-
// just made
|
|
17
|
+
// just made, which comes back as the form's reactive copy, so by content.
|
|
18
18
|
let emitted = ''
|
|
19
19
|
watch(model, (value) => {
|
|
20
20
|
if (JSON.stringify(value ?? {}) === emitted) return
|
|
@@ -12,6 +12,7 @@ const props = defineProps<{ field: VectorField, rules: ((v: unknown) => true | s
|
|
|
12
12
|
const model = defineModel<string | null>()
|
|
13
13
|
|
|
14
14
|
const { t } = useVectorT()
|
|
15
|
+
const { editorToolbar } = useVectorExtensions()
|
|
15
16
|
const toolbar = computed(() => props.field.markdown?.toolbar ?? ['bold', 'italic', 'strike', 'code', 'heading', 'list', 'blockquote', 'codeBlock', 'horizontalRule', 'link'])
|
|
16
17
|
const on = (button: string) => toolbar.value.includes(button)
|
|
17
18
|
const source = ref(false)
|
|
@@ -108,6 +109,10 @@ function applyLink() {
|
|
|
108
109
|
</v-card>
|
|
109
110
|
</v-menu>
|
|
110
111
|
</template>
|
|
112
|
+
<!-- editor-toolbar items extensions and layers registered (defineEditorToolbarItem), given the live editor -->
|
|
113
|
+
<template v-if="editor">
|
|
114
|
+
<component :is="item" v-for="[name, item] in editorToolbar" :key="name" :data-editor-toolbar-item="name" :editor="editor" :field="field" />
|
|
115
|
+
</template>
|
|
111
116
|
<v-spacer />
|
|
112
117
|
<v-btn size="small" variant="text" :prepend-icon="source ? 'mdi-eye-outline' : 'mdi-language-markdown-outline'" :aria-pressed="source" @click="source = !source">
|
|
113
118
|
{{ source ? t('fields.richtext.visual') : t('fields.richtext.source') }}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { VectorField } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
|
-
// Edited as a decimal amount, held as minor units
|
|
4
|
+
// Edited as a decimal amount, held as minor units; the wire value, in as
|
|
5
5
|
// many decimals as the currency has (none for yen, three for dinars). The
|
|
6
6
|
// text is what was typed until the field is left; only then, when the
|
|
7
7
|
// value changes from outside, or when the currency changes, is it written
|
|
@@ -4,7 +4,7 @@ import type { Editor } from '@tiptap/core'
|
|
|
4
4
|
import type { VectorField } from '#vector/app/types/vector'
|
|
5
5
|
|
|
6
6
|
// A rich-text field: a Tiptap editor over exactly the field's schema. Its
|
|
7
|
-
// value is the document as JSON text
|
|
7
|
+
// value is the document as JSON text (null when empty) which the server
|
|
8
8
|
// validates against the same schema. Pasted content outside the schema is
|
|
9
9
|
// dropped by construction: ProseMirror keeps only what the schema holds.
|
|
10
10
|
// An image is uploaded through the field's image field and stored by its
|
|
@@ -13,6 +13,7 @@ const props = defineProps<{ field: VectorField, rules: ((v: unknown) => true | s
|
|
|
13
13
|
const model = defineModel<string | null>()
|
|
14
14
|
|
|
15
15
|
const { t } = useVectorT()
|
|
16
|
+
const { editorToolbar } = useVectorExtensions()
|
|
16
17
|
const client = useVectorResource(() => props.resource ?? '')
|
|
17
18
|
const { richText: custom } = useVectorExtensions()
|
|
18
19
|
const rich = computed(() => props.field.richtext ?? { features: [], imageField: null, mentions: null, storesHtml: false, maxBytes: 262_144 })
|
|
@@ -155,6 +156,10 @@ const inTable = computed(() => active('table'))
|
|
|
155
156
|
<v-btn icon="mdi-image-plus" size="small" variant="text" :loading="uploading" :aria-label="t('fields.richtext.image')" @click="picker?.click()" />
|
|
156
157
|
<input ref="picker" type="file" accept="image/png,image/jpeg,image/webp,image/gif" class="d-none" :aria-label="t('fields.richtext.image')" @change="insertImage">
|
|
157
158
|
</template>
|
|
159
|
+
<!-- editor-toolbar items extensions and layers registered (defineEditorToolbarItem), given the live editor -->
|
|
160
|
+
<template v-if="editor">
|
|
161
|
+
<component :is="item" v-for="[name, item] in editorToolbar" :key="name" :data-editor-toolbar-item="name" :editor="editor" :field="field" />
|
|
162
|
+
</template>
|
|
158
163
|
<v-spacer />
|
|
159
164
|
<v-btn icon="mdi-undo" size="small" variant="text" :aria-label="t('fields.richtext.undo')" @click="run(e => e.chain().focus().undo().run())" />
|
|
160
165
|
<v-btn icon="mdi-redo" size="small" variant="text" :aria-label="t('fields.richtext.redo')" @click="run(e => e.chain().focus().redo().run())" />
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { VectorField } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// `disabled` stays undefined when not given, so a disabled v-form still disables the field
|
|
5
|
+
const props = withDefaults(defineProps<{ field: VectorField, rules: ((v: unknown) => true | string)[], errorMessages: string[], record?: Record<string, unknown>, resource?: string, disabled?: boolean }>(), { record: undefined, resource: undefined, disabled: undefined })
|
|
5
6
|
const model = defineModel<string | null>()
|
|
6
7
|
const type = computed(() => ({ email: 'email', url: 'url', password: 'password' } as Record<string, string>)[props.field.type] ?? 'text')
|
|
8
|
+
// the input addons registered inside the field (defineInputAddon placement `inner`), at its inline end
|
|
9
|
+
const innerAddons = useVectorInputAddons(() => props.field.type, () => 'inner')
|
|
7
10
|
</script>
|
|
8
11
|
|
|
9
12
|
<template>
|
|
@@ -16,6 +19,19 @@ const type = computed(() => ({ email: 'email', url: 'url', password: 'password'
|
|
|
16
19
|
:hint="field.help ?? undefined"
|
|
17
20
|
:persistent-hint="!!field.help"
|
|
18
21
|
:clearable="field.nullable === true"
|
|
22
|
+
:disabled="props.disabled"
|
|
19
23
|
:prepend-inner-icon="field.type === 'color' ? 'mdi-palette' : undefined"
|
|
20
|
-
|
|
24
|
+
>
|
|
25
|
+
<template v-if="innerAddons.length" #append-inner>
|
|
26
|
+
<VxInputAddons
|
|
27
|
+
placement="inner"
|
|
28
|
+
:field="field"
|
|
29
|
+
:resource="resource ?? ''"
|
|
30
|
+
:record="record ?? null"
|
|
31
|
+
:model-value="model"
|
|
32
|
+
:disabled="props.disabled === true"
|
|
33
|
+
@update:model-value="(v: unknown) => { model = typeof v === 'string' ? v : null }"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
</v-text-field>
|
|
21
37
|
</template>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { VectorField } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// `disabled` stays undefined when not given, so a disabled v-form still disables the field
|
|
5
|
+
const props = withDefaults(defineProps<{ field: VectorField, rules: ((v: unknown) => true | string)[], errorMessages: string[], record?: Record<string, unknown>, resource?: string, disabled?: boolean }>(), { record: undefined, resource: undefined, disabled: undefined })
|
|
5
6
|
const model = defineModel<string | null>()
|
|
7
|
+
// the input addons registered inside the field (defineInputAddon placement `inner`), at its top inline end
|
|
8
|
+
const innerAddons = useVectorInputAddons(() => props.field.type, () => 'inner')
|
|
6
9
|
</script>
|
|
7
10
|
|
|
8
11
|
<template>
|
|
@@ -13,8 +16,22 @@ const model = defineModel<string | null>()
|
|
|
13
16
|
:error-messages="errorMessages"
|
|
14
17
|
:hint="field.help ?? undefined"
|
|
15
18
|
:persistent-hint="!!field.help"
|
|
19
|
+
:disabled="props.disabled"
|
|
16
20
|
:class="{ 'font-monospace': props.field.type === 'json' }"
|
|
17
21
|
auto-grow
|
|
18
22
|
rows="3"
|
|
19
|
-
|
|
23
|
+
>
|
|
24
|
+
<template v-if="innerAddons.length" #append-inner>
|
|
25
|
+
<VxInputAddons
|
|
26
|
+
placement="inner"
|
|
27
|
+
class="align-self-start"
|
|
28
|
+
:field="field"
|
|
29
|
+
:resource="resource ?? ''"
|
|
30
|
+
:record="record ?? null"
|
|
31
|
+
:model-value="model"
|
|
32
|
+
:disabled="props.disabled === true"
|
|
33
|
+
@update:model-value="(v: unknown) => { model = typeof v === 'string' ? v : null }"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
</v-textarea>
|
|
20
37
|
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { VectorField } from '#vector/app/types/vector'
|
|
3
|
+
import type { VectorInputAddonPlacement } from '#vector/app/composables/useVectorExtensions'
|
|
4
|
+
|
|
5
|
+
// The addons extensions and layers registered for this field's type
|
|
6
|
+
// (defineInputAddon) at one placement: `below`, in a row under its input
|
|
7
|
+
// in the record form and in a loose field list; `inner`, inline inside a
|
|
8
|
+
// text or textarea input at its end (Vuetify's append-inner slot). Nothing
|
|
9
|
+
// at all when there are none.
|
|
10
|
+
const props = withDefaults(defineProps<{
|
|
11
|
+
field: VectorField
|
|
12
|
+
/** The resource's slug; empty in a settings group. */
|
|
13
|
+
resource: string
|
|
14
|
+
record: Record<string, unknown> | null | undefined
|
|
15
|
+
modelValue: unknown
|
|
16
|
+
disabled?: boolean
|
|
17
|
+
placement?: VectorInputAddonPlacement
|
|
18
|
+
}>(), { disabled: false, placement: 'below' })
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits<{ 'update:modelValue': [value: unknown] }>()
|
|
21
|
+
const addons = useVectorInputAddons(() => props.field.type, () => props.placement)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div
|
|
26
|
+
v-if="addons.length"
|
|
27
|
+
:class="placement === 'inner'
|
|
28
|
+
? 'vx-input-addons vx-input-addons--inner d-inline-flex align-center ga-1'
|
|
29
|
+
: 'vx-input-addons d-flex flex-wrap align-center ga-2 mt-n2 mb-2'"
|
|
30
|
+
:data-input-addons="placement === 'inner' ? 'inner' : undefined"
|
|
31
|
+
>
|
|
32
|
+
<component
|
|
33
|
+
:is="addon.component"
|
|
34
|
+
v-for="addon in addons"
|
|
35
|
+
:key="addon.name"
|
|
36
|
+
:data-input-addon="addon.name"
|
|
37
|
+
:field="field"
|
|
38
|
+
:resource="resource"
|
|
39
|
+
:record="record ?? null"
|
|
40
|
+
:model-value="modelValue"
|
|
41
|
+
:disabled="disabled === true"
|
|
42
|
+
@update:model-value="(v: unknown) => emit('update:modelValue', v)"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
@@ -3,7 +3,7 @@ import type { VectorLayoutNode } from '#vector/app/types/vector'
|
|
|
3
3
|
|
|
4
4
|
// A resource's layout (sections, tabs, column spans) around the fields
|
|
5
5
|
// the owner renders through the `field` slot: the record form's inputs,
|
|
6
|
-
// the show page's values. Layout only groups
|
|
6
|
+
// the show page's values. Layout only groups; it never decides what is
|
|
7
7
|
// edited or shown; `shown` does, per field. A section or tab none of
|
|
8
8
|
// whose fields is shown is not drawn. A field with an error opens the
|
|
9
9
|
// section holding it and activates its tab, which carries a badge.
|
|
@@ -3,7 +3,7 @@ import { useLocale } from 'vuetify'
|
|
|
3
3
|
|
|
4
4
|
// The footer of a list that cannot say how many records it has: an
|
|
5
5
|
// uncounted (withoutCount) list shows the page it is on, a cursor list
|
|
6
|
-
// not even that. Previous and next only
|
|
6
|
+
// not even that. Previous and next only; no total, no last page.
|
|
7
7
|
defineProps<{
|
|
8
8
|
perPage: number
|
|
9
9
|
perPageOptions: number[]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { VectorListState, VectorResource, VectorSavedView } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
4
|
// Saved views: pick one, save the current list as a new one, update or
|
|
5
|
-
// delete your own, share, set your default
|
|
5
|
+
// delete your own, share, set your default, or, where the policy allows,
|
|
6
6
|
// the default of everyone who has none of their own.
|
|
7
7
|
const props = defineProps<{ resource: VectorResource, current: VectorListState, activeId: number | null }>()
|
|
8
8
|
const emit = defineEmits<{ apply: [view: VectorSavedView | null], 'update:activeId': [id: number | null] }>()
|
|
@@ -27,7 +27,7 @@ const pruneDays = ref('30')
|
|
|
27
27
|
// the action running: only its own button shows as loading, and no second one starts meanwhile
|
|
28
28
|
const acting = ref<'retry' | 'forget' | 'prune' | null>(null)
|
|
29
29
|
// a date field the browser could not read: a partly typed date keeps its value '' and fires no input event,
|
|
30
|
-
// so each input's own validity is read whenever it matters
|
|
30
|
+
// so each input's own validity is read whenever it matters, on input, change and blur, and at Apply
|
|
31
31
|
const badInput = ref({ failedFrom: false, failedTo: false })
|
|
32
32
|
const filterRow = ref<HTMLElement | null>(null)
|
|
33
33
|
let request = 0
|
|
@@ -97,7 +97,7 @@ function toggle(id: string, on: boolean | null) {
|
|
|
97
97
|
selected.value = next
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
/** Asks, then runs `action` once
|
|
100
|
+
/** Asks, then runs `action` once (a second click while one runs does nothing) and reloads the list either way. */
|
|
101
101
|
async function guarded(kind: 'retry' | 'forget' | 'prune', title: string, text: string, action: () => Promise<void>) {
|
|
102
102
|
if (acting.value !== null) return
|
|
103
103
|
if (!await confirm({ title, text, confirmText: t('queues.actions.confirm'), cancelText: t('queues.actions.cancel'), destructive: true })) return
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import type { VectorFailedJob, VectorQueuePermissions } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
4
|
// One failed job: GET /failed/{id}, its exception, message, trace (always
|
|
5
|
-
// null today) and redacted arguments, every one as text
|
|
6
|
-
// never v-html
|
|
5
|
+
// null today) and redacted arguments, every one as text (interpolated,
|
|
6
|
+
// never v-html) and Retry and Forget where the permissions allow them.
|
|
7
7
|
const props = defineProps<{ id: string, permissions: VectorQueuePermissions }>()
|
|
8
8
|
const emit = defineEmits<{ back: [], changed: [] }>()
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { VectorQueueMetrics } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
4
|
// The job metrics: GET /metrics for a watched queue (or all) over a window
|
|
5
|
-
// of at most 7 days, the last hour by default
|
|
5
|
+
// of at most 7 days, the last hour by default; the window's totals,
|
|
6
6
|
// attempts per minute as an inline SVG sparkline (no chart library), and
|
|
7
7
|
// the totals per queue and per job class.
|
|
8
8
|
const props = defineProps<{ queues: string[] }>()
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import type { VectorQueue, VectorQueuePermissions } from '#vector/app/types/vector'
|
|
3
3
|
|
|
4
4
|
// The overview: GET /vector/queues every QUEUE_POLL_MS while the page is
|
|
5
|
-
// visible, one request at a time
|
|
6
|
-
// settled
|
|
5
|
+
// visible, one request at a time (the next is scheduled only once the last
|
|
6
|
+
// settled) and never after the tab is unmounted or once the server refused
|
|
7
7
|
// the dashboard. The Failed column is there only with failed jobs.
|
|
8
8
|
const props = defineProps<{ permissions: VectorQueuePermissions, failedJobs: boolean }>()
|
|
9
9
|
|
|
@@ -13,6 +13,9 @@ const { data, status, error, refresh } = await useAsyncData(() => `vector.audit.
|
|
|
13
13
|
const entries = computed<VectorAuditEntry[]>(() => data.value?.data ?? [])
|
|
14
14
|
|
|
15
15
|
const label = (name: string) => props.resource.fields.find(f => f.name === name)?.label ?? name
|
|
16
|
+
const i18n = useNuxtApp().$vectorI18n
|
|
17
|
+
/** The channel an entry's write came through, in words: a known origin translated, any other as its token. */
|
|
18
|
+
const origin = (token: string) => i18n.global.te(`record.audit.origin.${token}`) ? t(`record.audit.origin.${token}`) : token
|
|
16
19
|
function show(value: unknown): string {
|
|
17
20
|
if (value === null || value === undefined) return t('common.none')
|
|
18
21
|
return displayValue(value)
|
|
@@ -58,6 +61,7 @@ async function revert(entry: VectorAuditEntry) {
|
|
|
58
61
|
<v-timeline-item v-for="entry in entries" :key="entry.id" :icon="icon[entry.event] ?? 'mdi-play-circle-outline'" dot-color="primary" size="small">
|
|
59
62
|
<div class="text-body-2">
|
|
60
63
|
<strong>{{ entry.event }}</strong> {{ t('record.audit.byUser', { actor: entry.actorId }) }}<span v-if="entry.impersonatorId"> {{ t('record.audit.impersonatedBy', { impersonator: entry.impersonatorId }) }}</span>
|
|
64
|
+
<v-chip v-if="entry.origin" size="x-small" variant="tonal" class="ms-1" :data-audit-origin="entry.origin">{{ t('record.audit.via', { origin: origin(entry.origin) }) }}</v-chip>
|
|
61
65
|
<span class="text-medium-emphasis"> · {{ formatDateTime(entry.createdAt) }}</span>
|
|
62
66
|
<v-btn
|
|
63
67
|
v-if="revertableFields(entry).length"
|
|
@@ -7,7 +7,7 @@ import { type Violation, violationsOf } from '#vector/app/utils/internal/violati
|
|
|
7
7
|
// editable field, client rules mirroring the server's, and the server's
|
|
8
8
|
// 422 mapped onto the field it names. It knows whether it holds unsaved
|
|
9
9
|
// changes (`dirty`), and on a page offers save variants: back to the
|
|
10
|
-
// record, keep editing, or (creating) start another
|
|
10
|
+
// record, keep editing, or (creating) start another; the last one chosen
|
|
11
11
|
// remembered per user, Ctrl/Cmd+S running it.
|
|
12
12
|
const props = defineProps<{
|
|
13
13
|
resource: VectorResource
|
|
@@ -353,6 +353,14 @@ const hiddenErrors = computed(() => Object.entries(serverErrors)
|
|
|
353
353
|
v-bind="fieldsByName.get(name)!.repeater ? { serverErrors } : {}"
|
|
354
354
|
@update:model-value="clearServerError(name)"
|
|
355
355
|
/>
|
|
356
|
+
<VxInputAddons
|
|
357
|
+
:field="fieldsByName.get(name)!"
|
|
358
|
+
:resource="resource.slug"
|
|
359
|
+
:record="inputRecord"
|
|
360
|
+
:model-value="values[name]"
|
|
361
|
+
:disabled="states[name]?.disabled === true"
|
|
362
|
+
@update:model-value="(v: unknown) => { values[name] = v; clearServerError(name) }"
|
|
363
|
+
/>
|
|
356
364
|
</template>
|
|
357
365
|
</VxLayout>
|
|
358
366
|
</v-card-text>
|
|
@@ -3,7 +3,7 @@ import type { VectorField, VectorRecord, VectorRelationValue, VectorResource } f
|
|
|
3
3
|
|
|
4
4
|
// One collection of a record (hasMany or manyToMany) as a panel under
|
|
5
5
|
// its show page: the related records as a server-paged table in the
|
|
6
|
-
// target's own columns, and the changes the relation allows here
|
|
6
|
+
// target's own columns, and the changes the relation allows here,
|
|
7
7
|
// creating a child with the parent pre-filled (hasMany), attaching and
|
|
8
8
|
// detaching existing records (manyToMany).
|
|
9
9
|
const props = defineProps<{
|