1import { o as c, c as b, a as t, j, G as C, z, J as E, e as o, u as e, n as L, f as a, w as $, D as G, i as g, H as D, t as l, q as h, E as x, d, C as p, b as A, F as H, g as J } from "./app-yg_pP4S4.js"; 2import { _ as R } from "./BaseButton-DP1PFEmO.js"; 3import { r as M, _ as Z } from "./ModalConfirmation-BptK8hn4.js"; 4import { _ as K } from "./Table-D1P44re1.js"; 5import { _ as Q } from "./DashboardLayout-CXf_hhYT.js"; 6import { r as W, u as X } from "./consts-7Qk9bpse.js"; 7import { a as v } from "./functions-DLrKIvnr.js"; 8import { t as ee } from "./UserAvatar-B3-R1wxh.js"; 9import { g as te } from "./useGetStatusColor-DPi9sZjB.js"; 10import { u as re } from "./LoaderIcon-BfI_LFZK.js"; 11import { h as se, b as ae, a as oe, d as le } from "./index-CDyB1Hog.js"; 12import { S as ne, F as ie } from "./XMarkIcon-C7ztHuKP.js"; 13import { r as de } from "./form-BcDj1t5Y.js"; 14import { g as ue, S as ce, r as me, M as pe, b as _ } from "./menu-DpWDC0YJ.js"; 15import { r as fe } from "./EyeSlashIcon-B1bK03kn.js"; 16import { r as he } from "./EyeIcon-BsyDCt-k.js"; 17import { r as ge } from "./PencilIcon-DF7D2KxS.js"; 18import { r as xe } from "./TrashIcon-7IRzqwUc.js"; 19import "./TablePagination-CoQin-sh.js"; 20import "./listbox-BVei8WBz.js"; 21import "./use-text-value-9Z6g_4jd.js"; 22import "./ChevronUpDownIcon-D7fhXTZr.js"; 23import "./CheckIcon-CfE0icDF.js"; 24import "./LiveChat-BEmWJs6j.js"; 25import "./ApplicationLogo-D4QkytOJ.js"; 26import "./_plugin-vue_export-helper-DlAUqK2U.js"; 27import "./popover-DTQdCRwt.js"; 28import "./BaseInput-DrEncIoW.js"; 29import "./index-BF2h0ubX.js"; 30import "./CheckIcon-Bb6ppPFl.js"; 31import "./modelWrapper-D0DowOi8.js"; 32import "./ChevronRightIcon-f6ucdGu7.js"; 33import "./ArrowUpIcon-c4MStV6E.js"; 34import "./BaseModal-lnT_D81c.js"; 35import "./EyeIcon-C30yl1ND.js"; 36import "./HomeIcon-B7IW8yDA.js"; 37import "./MinusIcon-C5ZUuSoW.js"; 38import "./vue-transitions-DxcThSkT.js"; 39import "./ClockIcon-DWc8x_ii.js"; 40import "./use-tree-walker-DC0osvAV.js"; 41function _e(w, y) { 42 return c(), b("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [t("path", { "fill-rule": "evenodd", d: "M15.75 4.5a3 3 0 1 1 .825 2.066l-8.421 4.679a3.002 3.002 0 0 1 0 1.51l8.421 4.679a3 3 0 1 1-.729 1.31l-8.421-4.678a3 3 0 1 1 0-4.132l8.421-4.679a3 3 0 0 1-.096-.755Z", "clip-rule": "evenodd" })]); 43} 44const be = { class: "sm:hidden" }, ye = { class: "max-sm:hidden" }, ve = { class: "block p-4 sm:flex sm:justify-between sm:p-6" }, we = { class: "mr-4 w-full" }, ke = { class: "relative rounded-md shadow-sm" }, Ce = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" }, $e = ["placeholder"], De = { class: "pr-3 max-lg:relative max-lg:w-full max-lg:max-w-0 max-lg:py-3 max-lg:pl-4 max-lg:pr-2 sm:max-lg:pl-6" }, Me = { class: "mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500 lg:hidden" }, Se = { class: "truncate" }, Ye = { class: "hidden pr-10 lg:table-cell" }, Fe = ["href"], Ue = { class: "hidden py-6 align-top lg:table-cell" }, Ve = { class: "flex w-26" }, Be = { class: "sr-only" }, Ne = { class: "hidden xl:table-cell" }, Oe = { class: "truncate pr-5 text-sm text-gray-700" }, Te = { class: "hidden lg:table-cell" }, Ie = { class: "truncate pr-5 text-sm text-gray-700" }, qe = { class: "flex items-center justify-end max-lg:pr-2 sm:max-lg:pr-4 md:pr-6" }, Pe = { class: "sr-only" }, je = { class: "py-1" }, ze = { class: "mb-3 text-xl font-semibold text-gray-900" }, Ee = { class: "mb-5 text-gray-500" }, Le = { class: "text-sm text-gray-500" }, Ut = { __name: "OrderFormIndex", props: { orderForms: { type: Object, required: true } }, setup(w) { 45 const y = w, { t: r } = j(), { copy: S } = se(), m = C(route().params.search), f = C(null), Y = ae(le).smaller("lg"), { trigger: F, popper: U } = re({ placement: "bottom-end", strategy: "fixed" }), V = [{ label: r("{requests}", { requests: W.value }) }], B = [{ key: "title", label: r("Title"), showing: true, position: 1, headerClasses: "w-full" }, { key: "url", label: r("URL"), showing: true, position: 2, headerClasses: "w-full" }, { key: "status", label: r("Status"), showing: true, position: 3 }, { key: "created_at", label: r("Created"), showing: true, position: 4 }, { key: "updated_at", label: r("Updated"), showing: true, position: 5 }], N = (n) => { 46 h.get(route("checkout-forms.index"), n); 47 }, O = () => { 48 h.delete(route("checkout-forms.destroy", f.value), { onSuccess: () => { 49 f.value = null; 50 } }); 51 }, k = (n, u) => h.put(route("checkout-forms.update", u), { status: n ? "enabled" : "disabled" }), T = (n) => { 52 S(n.url), ee.success(r("Link copied to clipboard")); 53 }, I = oe((n) => { 54 h.get(route("checkout-forms.index"), { search: n }); 55 }, 1e3); 56 z(m, (n) => { 57 I(n); 58 }); 59 const q = J(() => ({ ...y.orderForms, data: y.orderForms.data.map((n) => ({ ...n, published: n.status === "enabled" })) })); 60 return (n, u) => { 61 const P = E("tooltip"); 62 return c(), b(H, null, [o(e(L), { title: e(r)("Order forms") }, null, 8, ["title"]), o(Q, { breadcrumbs: V }, { header: a(() => [d(l(e(r)("Order forms")), 1)]), actions: a(() => [o(e(x), { href: n.route("checkout-forms.build") }, { default: a(() => [o(R, { class: "max-sm:inline-flex max-sm:min-h-11" }, { default: a(() => [o(e(M), { class: "-ml-0.5 mr-1.5 h-5 w-5 sm:hidden", "aria-hidden": "true" }
62), t("span", be, l(e(r)("Create")), 1), t("span", ye, l(e(r)("Create order form")), 1)]), _: 1 })]), _: 1 }, 8, ["href"])]), default: a(() => [t("div", ve, [t("div", null, [t("div", we, [t("div", ke, [t("div", Ce, [o(e(de), { class: "h-5 w-5 text-gray-400", "aria-hidden": "true" })]), $(t("input", { "onUpdate:modelValue": u[0] || (u[0] = (s) => m.value = s), type: "search", name: "search", class: "block w-full rounded-md border-gray-300 pl-10 focus:border-primary-500 focus:ring-primary-500", placeholder: e(r)("Search"), autocomplete: "off" }, null, 8, $e), [[G, m.value]])])])])]), o(K, { data: q.value, columns: B, "sortable-columns": ["created_at", "updated_at"], paginated: "", expandable: "", class: "max-sm:[&_.normal-row~.normal-row>td]:border-t lg:max-xl:[&_th:nth-child(4)]:hidden max-lg:[&_thead]:hidden", onSortUpdated: N }, { title: a(({ item: s }) => [t("td", De, [o(e(x), { href: n.route("checkout-forms.build", s), class: "block w-60 truncate p-3 text-sm font-medium text-gray-900 hover:text-primary-600 max-lg:w-auto max-lg:p-0 max-lg:after:absolute max-lg:after:inset-0 max-lg:after:content-[''] lg:max-xl:w-44" }, { default: a(() => [d(l(s.title), 1)]), _: 2 }, 1032, ["href"]), t("div", Me, [t("span", { class: p(["inline-flex shrink-0 items-center rounded px-2 py-0.5 font-medium leading-4", e(te)(s.published ? "green" : "gray")]) }, l(s.published ? e(r)("Published") : e(r)("Unpublished")), 3), t("span", Se, l(e(r)("Updated {date}", { date: e(v)(s.updated_at, "MMM D, YYYY") })), 1)])])]), url: a(({ item: s }) => [t("td", Ye, [$((c(), b("a", { class: "block w-60 truncate text-sm text-blue-500 lg:max-xl:w-40", target: "_blank", href: s.url }, [d(l(s.url), 1)], 8, Fe)), [[P, s.url]])])]), status: a(({ item: s }) => [t("td", Ue, [t("div", Ve, [o(e(X), { modelValue: s.published, "onUpdate:modelValue": [(i) => s.published = i, (i) => k(i, s)], class: p([s.published ? "bg-primary-600" : "bg-gray-200", "relative mt-2 inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"]) }, { default: a(() => [t("span", Be, l(e(r)("Published")), 1), t("span", { "aria-hidden": "true", class: p(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out", s.published ? "translate-x-5" : "translate-x-0"]) }, null, 2)]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "class"])])])]), created_at: a(({ item: s }) => [t("td", Ne, [t("span", Oe, l(e(v)(s.created_at, "MMM D, YYYY")), 1)])]), updated_at: a(({ item: s }) => [t("td", Te, [t("span", Ie, l(e(v)(s.updated_at, "MMM D, YYYY")), 1)])]), expandable: a(({ item: s }) => [t("td", null, [t("div", qe, [o(e(ue), { as: "div", class: "inline-block text-left" }, { default: a(() => [o(e(ce), { ref_key: "menuButton", ref: F, class: "relative cursor-pointer p-2 text-gray-500 hover:text-gray-600 max-lg:p-2.5" }, { default: a(() => [t("div", null, [t("span", Pe, l(e(r)("Open options")), 1), o(e(me), { class: "h-6 w-6 cursor-pointer text-gray-400 hover:text-gray-500" })])]), _: 1 }, 512), o(e(pe), { ref_key: "menuItems", ref: U, class: "absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { default: a(() => [t("div", je, [e(Y) ? (c(), g(e(_), { key: 0, onClick: (i) => k(!s.published, s) }, { default: a(({ active: i }) => [t("span", { class: p([i ? "bg-gray-100 text-gray-900" : "text-gray-700", "flex min-h-11 cursor-pointer items-center px-4 py-2 text-sm"]) }, [(c(), g(D(s.published ? e(fe) : e(he)), { class: "mr-3.5 h-5 w-5 text-gray-400" })), d(" " + l(s.published ? e(r)("Unpublish") : e(r)("Publish")), 1)], 2)]), _: 2 }, 1032, ["onClick"])) : A("", true), o(e(_), { onClick: (i) => T(s) }, { default: a(({ active: i }) => [t("span", { class: p([i ? "bg-gray-100 text-gray-900" : "text-gray-700", "flex cursor-pointer items-center px-4 py-2 text-sm max-lg:min-h-11"]) }, [o(e(_e), { class: "mr-3.5 h-5 w-5 text-gray-400" }), d(" " + l(e(r)("Share link")), 1)], 2)]), _: 1 }, 8, ["onClick"]), o(e(_), null, { default: a(({ active: i }) => [o(e(x), { href: n.route("checkout-forms.build", s), class: p([i ? "bg-gray-100 text-gray-900" : "text-gray-700", "flex cursor-pointer items-center px-4 py-2 text-sm max-lg:min-h-11"]) }, { default: a(() => [o(e(ge), { class: "mr-3.5 h-5 w-5 text-gray-400" }
62), d(" " + l(e(r)("Edit")), 1)]), _: 1 }, 8, ["href", "class"])]), _: 2 }, 1024), o(e(_), { onClick: (i) => f.value = s }, { default: a(({ active: i }) => [t("span", { class: p([i ? "bg-gray-100 text-gray-900" : "text-gray-700", "flex cursor-pointer items-center px-4 py-2 text-sm max-lg:min-h-11"]) }, [o(e(xe), { class: "mr-3.5 h-5 w-5 text-gray-400" }), d(" " + l(e(r)("Delete")), 1)], 2)]), _: 1 }, 8, ["onClick"])])]), _: 2 }, 1536)]), _: 2 }, 1024)])])]), "empty-state": a(() => [(c(), g(D(m.value ? e(ne) : e(ie)), { class: "mx-auto mb-5 h-12 w-12 stroke-1 text-gray-400" })), t("h3", ze, l(m.value ? e(r)("No results found") : e(r)("No order forms yet")), 1), t("p", Ee, l(m.value ? e(r)("Try a different search.") : e(r)("Get started by creating a new order form.")), 1), m.value ? (c(), b("button", { key: 0, type: "button", class: "inline-flex min-h-11 items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", onClick: u[1] || (u[1] = (s) => e(h).visit(n.route("checkout-forms.index"))) }, l(e(r)("Clear search")), 1)) : (c(), g(e(x), { key: 1, href: n.route("checkout-forms.build"), class: "ml-3 inline-flex items-center rounded-md border border-transparent bg-primary-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2" }, { default: a(() => [o(e(M), { class: "mr-3 h-5 w-5" }), d(" " + l(e(r)("Create order form")), 1)]), _: 1 }, 8, ["href"]))]), _: 1 }, 8, ["data"]), o(Z, { open: !!f.value, "confirm-text": e(r)("Delete"), color: "red", onConfirmed: O, onClosed: u[2] || (u[2] = (s) => f.value = null) }, { title: a(() => [d(l(e(r)("Delete")), 1)]), content: a(() => [t("p", Le, l(e(r)("Are you sure you want to delete this order form?")), 1)]), _: 1 }, 8, ["open", "confirm-text"])]), _: 1 })], 64); 63 }; 64} }; 65export { 66 Ut as default 67};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.