UNPKG

@vue-js-cron/vuetify

Version:
205 lines (204 loc) 5.86 kB
import { selectProps as B, setupSelect as N, setupCron as U, cronCoreProps as E } from "@vue-js-cron/core"; import { resolveComponent as n, openBlock as l, createBlock as a, mergeProps as P, createSlots as z, withCtx as o, createTextVNode as c, toDisplayString as p, createVNode as i, createElementBlock as m, Fragment as _, renderList as h, createCommentVNode as d, withModifiers as A, defineComponent as D } from "vue"; const F = { inheritAttrs: !1, name: "CustomSelect", props: { ...B(), menuProps: { type: Object, default: () => { } }, chipProps: { type: Object, default: () => { } } }, emits: ["update:model-value"], setup(e, s) { return N(e, () => e.modelValue, s); } }; const V = (e, s) => { const u = e.__vccOpts || e; for (const [y, k] of s) u[y] = k; return u; }; function L(e, s, u, y, k, w) { const r = n("v-icon"), v = n("v-list-item"), C = n("v-col"), t = n("v-row"), b = n("v-list"), $ = n("v-menu"), S = n("v-chip"); return l(), a(S, P(u.chipProps, { disabled: e.disabled }), z({ default: o(() => [ c(" " + p(e.selection ?? e.selectedStr) + " ", 1), i($, P({ activator: "parent" }, u.menuProps), { default: o(() => [ i(b, { class: "pa-0 ma-0" }, { default: o(() => [ (l(!0), m(_, null, h(e.itemRows, (g, O) => (l(), a(t, { key: O, "no-gutters": "" }, { default: o(() => [ (l(!0), m(_, null, h(g, (f, j) => (l(), a(C, { key: j }, { default: o(() => [ f ? (l(), a(v, { key: 0, class: "vcron-v-item", onClick: (I) => e.select(f), active: e.has(f) }, { default: o(() => [ c(p(f.text), 1) ]), _: 2 }, 1032, ["onClick", "active"])) : d("", !0) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 16) ]), _: 2 }, [ e.clearable && !e.isEmpty ? { name: "append", fn: o(() => [ i(r, { size: "small", icon: "mdi-close", onClick: s[0] || (s[0] = A((g) => e.clear(), ["stop"])) }) ]), key: "0" } : void 0 ]), 1040, ["disabled"]); } const M = /* @__PURE__ */ V(F, [["render", L]]), R = () => ({ /** * Properties of Vuetify VChip * * @remarks * See {@link https://vuetifyjs.com/en/api/v-chip/#props} */ chipProps: { type: Object, default() { return {}; } }, ...E() }), T = D({ name: "CronVuetify", components: { CustomSelect: M }, props: R(), emits: ["update:model-value", "update:period", "error"], setup(e, s) { return U(e, s); } }), q = { style: { display: "inline-block" } }; function G(e, s, u, y, k, w) { const r = n("v-col"), v = n("custom-select"), C = n("v-row"); return l(), m("div", q, [ i(C, { align: "baseline", dense: "" }, { default: o(() => [ e.period.prefix.value ? (l(), a(r, { key: 0, class: "flex-grow-0" }, { default: o(() => [ c(p(e.period.prefix.value), 1) ]), _: 1 })) : d("", !0), i(r, { cols: "auto" }, { default: o(() => [ i(v, { "model-value": e.period.selected.value.id, "item-value": "id", items: e.period.items, "onUpdate:modelValue": s[0] || (s[0] = (t) => e.period.select(t)), disabled: e.disabled, "chip-props": e.chipProps }, null, 8, ["model-value", "items", "disabled", "chip-props"]) ]), _: 1 }), e.period.suffix.value ? (l(), a(r, { key: 1, class: "flex-grow-0" }, { default: o(() => [ c(p(e.period.suffix.value), 1) ]), _: 1 })) : d("", !0), (l(!0), m(_, null, h(e.selected, (t) => (l(), m(_, { key: t.id }, [ t.prefix.value ? (l(), a(r, { key: 0, class: "flex-grow-0" }, { default: o(() => [ c(p(t.prefix.value), 1) ]), _: 2 }, 1024)) : d("", !0), i(r, { cols: "auto" }, { default: o(() => [ i(v, { "model-value": t.selected.value, "onUpdate:modelValue": (b) => t.select(b), items: t.items, cols: e.cols[t.id] || 1, selection: t.text.value, multiple: "", clearable: "", disabled: e.disabled, "chip-props": e.chipProps, "menu-props": { closeOnContentClick: !1 } }, null, 8, ["model-value", "onUpdate:modelValue", "items", "cols", "selection", "disabled", "chip-props"]) ]), _: 2 }, 1024), t.suffix.value ? (l(), a(r, { key: 1, class: "flex-grow-0" }, { default: o(() => [ c(p(t.suffix.value), 1) ]), _: 2 }, 1024)) : d("", !0) ], 64))), 128)) ]), _: 1 }) ]); } const H = /* @__PURE__ */ V(T, [["render", G]]), Q = { install: (e) => { e.component("CronVuetify", H); } }; export { H as CronVuetify, Q as CronVuetifyPlugin, R as cronVuetifyProps, Q as default }; //# sourceMappingURL=vuetify.js.map