diff --git a/src/components/components.vue.es.js b/src/components/components.vue.es.js index 119cfe7..81b82ed 100644 --- a/src/components/components.vue.es.js +++ b/src/components/components.vue.es.js @@ -1,17 +1,17 @@ -import { openBlock as s, createElementBlock as r, createElementVNode as f, normalizeClass as l, Fragment as h, renderList as g, createCommentVNode as m, toDisplayString as T, renderSlot as k, resolveComponent as _, createVNode as p, withCtx as w } from "../lib/vue.esm-browser.js"; -function y(...e) { - return e.reduce((a, t) => a + t, ""); +import { openBlock as r, createElementBlock as o, createElementVNode as g, normalizeClass as m, Fragment as y, renderList as w, createCommentVNode as _, toDisplayString as v, renderSlot as T, resolveComponent as f, createVNode as i, withCtx as b, createTextVNode as h } from "../lib/vue.esm-browser.js"; +function k(...t) { + return t.reduce((a, e) => a + e, ""); } -const b = (e, a) => { - const t = e.__vccOpts || e; - for (const [c, o] of a) - t[c] = o; - return t; -}, C = { +const p = (t, a) => { + const e = t.__vccOpts || t; + for (const [l, s] of a) + e[l] = s; + return e; +}, x = { name: "Tabs", props: ["context", "actor", "group", "tabs", "flags"], setup() { - return { concat: y }; + return { concat: k }; }, data() { return { @@ -19,73 +19,76 @@ const b = (e, a) => { }; }, methods: { - changeTab(e) { - e && e.currentTarget && (this.currentTab = e.currentTarget.dataset.tab); - for (let [a, t] of Object.entries(this.tabs)) + changeTab(t) { + t && t.currentTarget && (this.currentTab = t.currentTarget.dataset.tab); + for (let [a, e] of Object.entries(this.tabs)) this.tabs[a].active = !1; this.tabs[this.currentTab] && (this.tabs[this.currentTab].active = !0); }, - getTabClass(e, a) { - return `tab-link tab-link--${a}${e.active ? " active" : ""}`; + getTabClass(t, a) { + return `tab-link tab-link--${a}${t.active ? " active" : ""}`; } }, async mounted() { - var e; - this.currentTab = this.tabs.defaultTab ?? "creatures", (e = this.tabs) != null && e[this.currentTab].hidden && (this.currentTab = "creatures"), this.changeTab(!1); + var a; + const t = (a = Object.values(this.tabs)) == null ? void 0 : a.find((e) => e.active); + Object.values(this.tabs).forEach((e) => console.log(e)), console.log("Active", t), this.currentTab = (t == null ? void 0 : t.key) ?? "creatures", this.changeTab(!1); } -}, v = { class: "section section--tabs flexshrink" }, $ = ["data-group"], x = ["data-tab"], B = { key: 1 }; -function S(e, a, t, c, o, i) { - return s(), r("section", v, [ - f("nav", { - class: l("sheet-tabs tabs tabs--" + t.group), - "data-group": t.group +}, C = { class: "section section--tabs flexshrink" }, $ = ["data-group"], B = ["data-tab"], S = { key: 1 }; +function N(t, a, e, l, s, u) { + return r(), o("section", C, [ + g("nav", { + class: m("sheet-tabs tabs tabs--" + e.group), + "data-group": e.group }, [ - (s(!0), r(h, null, g(t.tabs, (n, u) => (s(), r("span", { - key: "tab-" + t.group + "-" + u + (r(!0), o(y, null, w(e.tabs, (n, c) => (r(), o("span", { + key: "tab-" + e.group + "-" + c }, [ - n.hidden ? m("", !0) : (s(), r("a", { + n.hidden ? _("", !0) : (r(), o("a", { key: 0, - onClick: a[0] || (a[0] = (...d) => i.changeTab && i.changeTab(...d)), - class: l(i.getTabClass(n, u)), - "data-tab": u + onClick: a[0] || (a[0] = (...d) => u.changeTab && u.changeTab(...d)), + class: m(u.getTabClass(n, c)), + "data-tab": c }, [ - n.icon ? (s(), r("i", { + n.icon ? (r(), o("i", { key: 0, - class: l(c.concat("fas ", n.icon)) - }, null, 2)) : m("", !0), - n.hideLabel ? m("", !0) : (s(), r("span", B, T(n.label), 1)) - ], 10, x)) + class: m(l.concat("fas ", n.icon)) + }, null, 2)) : _("", !0), + n.hideLabel ? _("", !0) : (r(), o("span", S, v(n.label), 1)) + ], 10, B)) ]))), 128)) ], 10, $) ]); } -const N = /* @__PURE__ */ b(C, [["render", S]]), z = { +const O = /* @__PURE__ */ p(x, [["render", N]]), V = { name: "Tab", props: ["context", "actor", "tab", "group", "classes"] -}, P = ["data-group", "data-tab"]; -function V(e, a, t, c, o, i) { - return s(), r("div", { - class: l("tab " + t.tab.key + (t.tab.active ? " active" : "") + (t.classes ? " " + t.classes : "")), - "data-group": t.group, - "data-tab": t.tab.key +}, z = ["data-group", "data-tab"]; +function I(t, a, e, l, s, u) { + return r(), o("div", { + class: m("tab " + e.tab.key + (e.tab.active ? " active" : "") + (e.classes ? " " + e.classes : "")), + "data-group": e.group, + "data-tab": e.tab.key }, [ - k(e.$slots, "default") - ], 10, P); + T(t.$slots, "default") + ], 10, z); } -const F = /* @__PURE__ */ b(z, [["render", V]]), I = { +const P = /* @__PURE__ */ p(V, [["render", I]]), j = { name: "Stub", props: ["context"] }; -function M(e, a, t, c, o, i) { - return s(), r("h1", null, "Foobar"); +function E(t, a, e, l, s, u) { + return r(), o("h1", null, [ + T(t.$slots, "default", {}, void 0, !0) + ]); } -const O = /* @__PURE__ */ b(I, [["render", M], ["__scopeId", "data-v-59ae215c"]]), E = { +const M = /* @__PURE__ */ p(j, [["render", E], ["__scopeId", "data-v-ceecbcd3"]]), A = { name: "ArchmageCompendiumBrowser", props: ["context"], components: { - Tabs: N, - Tab: F, - Stub: O + Tabs: O, + Tab: P, + Stub: M // CompendiumBrowserCreatures, // CompendiumBrowserPowers, // CompendiumBrowserItems @@ -97,28 +100,28 @@ const O = /* @__PURE__ */ b(I, [["render", M], ["__scopeId", "data-v-59ae215c"]] }; }, data() { + var t, a, e; return { // The only variable we actually need to track is the active tab. tabs: { - defaultTab: "creatures", primary: { // Default tab is assigned in the flags() computed property. creatures: { key: "creatures", label: game.i18n.localize("CMPBrowser.Tab.NPCBrowser"), - active: !1, + active: ((t = this.context) == null ? void 0 : t.defaultTab) === "creatures", opened: !1 }, powers: { key: "powers", label: game.i18n.localize("CMPBrowser.Tab.SpellBrowser"), - active: !1, + active: ((a = this.context) == null ? void 0 : a.defaultTab) === "powers", opened: !1 }, items: { key: "items", label: game.i18n.localize("CMPBrowser.Tab.ItemBrowser"), - active: !1, + active: ((e = this.context) == null ? void 0 : e.defaultTab) === "items", opened: !1 } } @@ -134,33 +137,67 @@ const O = /* @__PURE__ */ b(I, [["render", M], ["__scopeId", "data-v-59ae215c"]] async mounted() { console.log("Compendium browser mounted."); } -}, L = { class: "compendium-browser-vue flexcol" }, j = { class: "container container--top" }, A = { class: "container container--bottom" }; -function D(e, a, t, c, o, i) { - const n = _("Tabs"), u = _("Stub"), d = _("Tab"); - return s(), r("div", L, [ - f("section", j, [ - p(n, { +}, F = { class: "compendium-browser-vue flexcol" }, L = { class: "container container--top" }, D = { class: "container container--bottom" }; +function G(t, a, e, l, s, u) { + const n = f("Tabs"), c = f("Stub"), d = f("Tab"); + return r(), o("div", F, [ + g("section", L, [ + i(n, { group: "primary", - tabs: o.tabs.primary, - flags: e.flags - }, null, 8, ["tabs", "flags"]) + tabs: s.tabs.primary + }, null, 8, ["tabs"]) ]), - f("section", A, [ - p(d, { + g("section", D, [ + i(d, { group: "primary", - tab: o.tabs.primary.creatures, + tab: s.tabs.primary.creatures, classes: "container container--bottom flexrow" }, { - default: w(() => [ - p(u) + default: b(() => [ + i(c, null, { + default: b(() => [ + h("Creatures") + ]), + _: 1 + }) + ]), + _: 1 + }, 8, ["tab"]), + i(d, { + group: "primary", + tab: s.tabs.primary.powers, + classes: "container container--bottom flexrow" + }, { + default: b(() => [ + i(c, null, { + default: b(() => [ + h("Spells") + ]), + _: 1 + }) + ]), + _: 1 + }, 8, ["tab"]), + i(d, { + group: "primary", + tab: s.tabs.primary.items, + classes: "container container--bottom flexrow" + }, { + default: b(() => [ + i(c, null, { + default: b(() => [ + h("Items") + ]), + _: 1 + }) ]), _: 1 }, 8, ["tab"]) ]) ]); } -const q = /* @__PURE__ */ b(E, [["render", D]]); +const H = /* @__PURE__ */ p(A, [["render", G]]); export { - q as VueCompendiumBrowser + H as VueCompendiumBrowser }; //# sourceMappingURL=components.vue.es.js.map diff --git a/src/components/components.vue.es.js.map b/src/components/components.vue.es.js.map index d24a05c..d142622 100644 --- a/src/components/components.vue.es.js.map +++ b/src/components/components.vue.es.js.map @@ -1 +1 @@ -{"version":3,"file":"components.vue.es.js","sources":["../vue/methods/Helpers.js","../vue/components/parts/Tabs.vue","../vue/components/parts/Tab.vue","../vue/components/dialogs/compendium-browser/stub.vue","../vue/CompendiumBrowser.vue"],"sourcesContent":["export function getSafeValue(property, defaultValue) {\n if (property) return property.value;\n return defaultValue;\n}\n\nexport function localize(key) {\n return game.i18n.localize(key);\n}\n\nexport function cssClass(string) {\n return encodeURIComponent(\n string.trim().toLowerCase()\n ).replace(/%[0-9A-F]{2}/gi, '-');\n}\n\nexport function numberFormat(value, dec = 0, sign = false) {\n value = parseFloat(value).toFixed(dec);\n if (sign ) return ( value >= 0 ) ? `+${value}` : value;\n return value;\n}\n\nexport function concat(...args) {\n return args.reduce((acc, cur) => {\n return acc + cur;\n }, '');\n}\n\nexport async function getActor(actorData) {\n // If no drag data is available, we can't retrieve the actor.\n if (!actorData?.dragData?.uuid) return false;\n\n // Async load the actor/token from the UUID.\n const document = await fromUuid(actorData.dragData.uuid);\n\n // If it's a token, retrieve the actor prop. Otherwise, retrieve the document.\n return document?.actor ?? document;\n}\n\n/**\n * Retrieve module art for an actor\n *\n * @param {object} actor Index version of an actor document from a compendium.\n * @returns {string} Path to art asset\n */\nexport function getActorModuleArt(actor) {\n // UUID doesn't exactly match the format used in the map currently.\n const actorMapId = actor.uuid.replace('.Actor', '');\n // Retrieve the art from the map, or fallback to the actor image.\n const art = game.archmage.system.moduleArt.map.get(actorMapId);\n return art?.actor ?? actor.img;\n}\n\n/**\n * Retrieve index for a list of compendiums.\n *\n * @param {Array} packNames Array of compendiums to index.\n * @param {Array} fields Array of field paths to include in the index.\n * @returns Combined entries from the queried compendiums.\n */\nexport async function getPackIndex(packNames = [], fields = []) {\n if (!packNames) return;\n if (!fields || fields.length < 1) return;\n\n let packs = [];\n\n for (let packName of packNames) {\n const pack = game.packs.get(packName);\n const packIndex = await pack.getIndex({fields: fields});\n packs = packs.concat(packIndex.contents);\n }\n\n return packs;\n}\n\n/**\n * Open a document's sheet based on its uuid.\n *\n * @param {string} uuid Document UUID to open.\n * @param {string} type Document type to open. Defaults to 'Actor'.\n */\nexport function openDocument(uuid, type = 'Actor') {\n getDocumentClass(type).fromDropData({\n type: type,\n uuid: uuid\n }).then(document => {\n if (document?.sheet) {\n document.sheet.render(true);\n }\n else {\n console.warn(`No document found for ${uuid}`);\n }\n });\n}\n\n/**\n * Starts a drag event and provides document drop data.\n *\n * @param {Event} event Drag event.\n * @param {Object} entry Pack index entry object.\n */\nexport function startDrag(event, entry, type = 'Actor') {\n event.dataTransfer.setData('text/plain', JSON.stringify({\n type: type,\n uuid: entry.uuid\n }));\n}\n","\n\n\n\n","\n\n\n\n","\n\n\n\n","\n\n"],"names":["concat","args","acc","cur","_sfc_main","event","k","v","tab","index","_a","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","$props","_Fragment","_renderList","tabKey","_createCommentVNode","$options","$setup","_hoisted_4","_toDisplayString","_renderSlot","_ctx","Tabs","Tab","Stub","_createVNode","_component_Tabs","$data","_component_Tab","_withCtx","_component_Stub"],"mappings":";AAqBO,SAASA,KAAUC,GAAM;AAC9B,SAAOA,EAAK,OAAO,CAACC,GAAKC,MAChBD,IAAMC,GACZ,EAAE;AACP;;;;;;GCVKC,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW,SAAS,SAAS,QAAQ,OAAO;AAAA,EACpD,QAAQ;AACN,WAAO,EAAE,QAAAJ,EAAO;AAAA,EACjB;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,UAAUK,GAAO;AAEf,MAAIA,KAASA,EAAM,kBACjB,KAAK,aAAaA,EAAM,cAAc,QAAQ;AAIhD,eAAS,CAACC,GAAEC,CAAC,KAAK,OAAO,QAAQ,KAAK,IAAI;AACxC,aAAK,KAAKD,CAAC,EAAE,SAAS;AAIxB,MAAI,KAAK,KAAK,KAAK,UAAU,MAC3B,KAAK,KAAK,KAAK,UAAU,EAAE,SAAS;AAAA,IAEvC;AA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AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACD;AAAA,EACD,SAAS,CAAE;AAAA,EACX,UAAU,CAAE;AAAA,EACZ,OAAO,CAAE;AAAA,EACT,MAAM,UAAU;AACd,YAAQ,IAAI,gCAAgC;AAAA,EAC7C;AAAA,EACD,MAAM,UAAU;AACd,YAAQ,IAAI,6BAA6B;AAAA,EAC3C;AACF,GA/FOpB,IAAA,EAAA,OAAM,iCAAgC,GAEhCC,IAAA,EAAA,OAAM,2BAA0B,GAKhCC,IAAA,EAAA,OAAM,8BAA6B;;;AAP9C,SAAAC,EAAA,GAAAC,EA4BM,OA5BNJ,GA4BM;AAAA,IA1BJK,EAEU,WAFVJ,GAEU;AAAA,MADRoB,EAA2DC,GAAA;AAAA,QAArD,OAAM;AAAA,QAAW,MAAMC,EAAI,KAAC;AAAA,QAAU,OAAON,EAAK;AAAA;;IAI1DZ,EAoBU,WApBVH,GAoBU;AAAA,MAbRmB,EAGMG,GAAA;AAAA,QAHD,OAAM;AAAA,QAAW,KAAKD,EAAA,KAAK,QAAQ;AAAA,QAAW,SAAQ;AAAA;QAfjE,SAAAE,EAgBQ,MAAQ;AAAA,UAARJ,EAAQK,CAAA;AAAA;QAhBhB,GAAA;AAAA;;;;;"} \ No newline at end of file +{"version":3,"file":"components.vue.es.js","sources":["../vue/methods/Helpers.js","../vue/components/parts/Tabs.vue","../vue/components/parts/Tab.vue","../vue/components/dialogs/compendium-browser/stub.vue","../vue/CompendiumBrowser.vue"],"sourcesContent":["export function getSafeValue(property, defaultValue) {\n if (property) return property.value;\n return defaultValue;\n}\n\nexport function localize(key) {\n return game.i18n.localize(key);\n}\n\nexport function cssClass(string) {\n return encodeURIComponent(\n string.trim().toLowerCase()\n ).replace(/%[0-9A-F]{2}/gi, '-');\n}\n\nexport function numberFormat(value, dec = 0, sign = false) {\n value = parseFloat(value).toFixed(dec);\n if (sign ) return ( value >= 0 ) ? `+${value}` : value;\n return value;\n}\n\nexport function concat(...args) {\n return args.reduce((acc, cur) => {\n return acc + cur;\n }, '');\n}\n\nexport async function getActor(actorData) {\n // If no drag data is available, we can't retrieve the actor.\n if (!actorData?.dragData?.uuid) return false;\n\n // Async load the actor/token from the UUID.\n const document = await fromUuid(actorData.dragData.uuid);\n\n // If it's a token, retrieve the actor prop. Otherwise, retrieve the document.\n return document?.actor ?? document;\n}\n\n/**\n * Retrieve module art for an actor\n *\n * @param {object} actor Index version of an actor document from a compendium.\n * @returns {string} Path to art asset\n */\nexport function getActorModuleArt(actor) {\n // UUID doesn't exactly match the format used in the map currently.\n const actorMapId = actor.uuid.replace('.Actor', '');\n // Retrieve the art from the map, or fallback to the actor image.\n const art = game.archmage.system.moduleArt.map.get(actorMapId);\n return art?.actor ?? actor.img;\n}\n\n/**\n * Retrieve index for a list of compendiums.\n *\n * @param {Array} packNames Array of compendiums to index.\n * @param {Array} fields Array of field paths to include in the index.\n * @returns Combined entries from the queried compendiums.\n */\nexport async function getPackIndex(packNames = [], fields = []) {\n if (!packNames) return;\n if (!fields || fields.length < 1) return;\n\n let packs = [];\n\n for (let packName of packNames) {\n const pack = game.packs.get(packName);\n const packIndex = await pack.getIndex({fields: fields});\n packs = packs.concat(packIndex.contents);\n }\n\n return packs;\n}\n\n/**\n * Open a document's sheet based on its uuid.\n *\n * @param {string} uuid Document UUID to open.\n * @param {string} type Document type to open. Defaults to 'Actor'.\n */\nexport function openDocument(uuid, type = 'Actor') {\n getDocumentClass(type).fromDropData({\n type: type,\n uuid: uuid\n }).then(document => {\n if (document?.sheet) {\n document.sheet.render(true);\n }\n else {\n console.warn(`No document found for ${uuid}`);\n }\n });\n}\n\n/**\n * Starts a drag event and provides document drop data.\n *\n * @param {Event} event Drag event.\n * @param {Object} entry Pack index entry object.\n */\nexport function startDrag(event, entry, type = 'Actor') {\n event.dataTransfer.setData('text/plain', JSON.stringify({\n type: type,\n uuid: entry.uuid\n }));\n}\n","\n\n\n\n","\n\n\n\n","\n\n\n\n","\n\n"],"names":["concat","args","acc","cur","_sfc_main","event","k","v","tab","index","activeTab","_a","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","$props","_Fragment","_renderList","tabKey","_createCommentVNode","$options","$setup","_hoisted_4","_toDisplayString","_renderSlot","_ctx","Tabs","Tab","Stub","_b","_c","_createVNode","_component_Tabs","$data","_component_Tab","_withCtx","_component_Stub","_createTextVNode"],"mappings":";AAqBO,SAASA,KAAUC,GAAM;AAC9B,SAAOA,EAAK,OAAO,CAACC,GAAKC,MAChBD,IAAMC,GACZ,EAAE;AACP;;;;;;GCVKC,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW,SAAS,SAAS,QAAQ,OAAO;AAAA,EACpD,QAAQ;AACN,WAAO,EAAE,QAAAJ,EAAO;AAAA,EACjB;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,UAAUK,GAAO;AAEf,MAAIA,KAASA,EAAM,kBACjB,KAAK,aAAaA,EAAM,cAAc,QAAQ;AAIhD,eAAS,CAACC,GAAEC,CAAC,KAAK,OAAO,QAAQ,KAAK,IAAI;AACxC,aAAK,KAAKD,CAAC,EAAE,SAAS;AAIxB,MAAI,KAAK,KAAK,KAAK,UAAU,MAC3B,KAAK,KAAK,KAAK,UAAU,EAAE,SAAS;AAAA,IAEvC;AAAA,IACD,YAAYE,GAAKC,GAAO;AACtB,aAAO,sBAAsBA,CAAK,GAAGD,EAAI,SAAS,YAAW,EAAE;AAAA,IACjE;AAAA,EACD;AAAA,EACD,MAAM,UAAU;;AACd,UAAME,KAAYC,IAAA,OAAO,OAAO,KAAK,IAAI,MAAvB,gBAAAA,EAA0B,KAAK,CAACH,MAAQA,EAAI;AAC9D,WAAO,OAAO,KAAK,IAAI,EAAE,QAAQ,CAACA,MAAQ,QAAQ,IAAIA,CAAG,CAAC,GAC1D,QAAQ,IAAI,UAAUE,CAAS,GAC/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,EAAkBK,GAAA,MAAA;AAAA,YA1B1B,SAAAD,EA0Bc,MAAK;AAAA,cA1BnBE,EA0Bc,OAAK;AAAA;YA1BnB,GAAA;AAAA;;QAAA,GAAA;AAAA;;;;;"} \ No newline at end of file diff --git a/src/components/styles.vue.css b/src/components/styles.vue.css index d037fb8..d606d33 100644 --- a/src/components/styles.vue.css +++ b/src/components/styles.vue.css @@ -1 +1 @@ -#compendium .directory-footer[data-v-59ae215c]{display:block}#compendium .directory-footer .compendium-browser-btn[data-v-59ae215c]{margin-top:5px}.compendium-browser[data-v-59ae215c]{overflow-y:hidden!important;max-width:1100px;max-height:90vh;min-width:630px;min-height:500px}.compendium-browser .window-content[data-v-59ae215c],.compendium-browser .window-content .parent[data-v-59ae215c]{overflow-y:hidden!important;height:100%}.compendium-browser .window-content .parent .content[data-v-59ae215c]{overflow-y:hidden!important;height:calc(100% - 2em)}.compendium-browser .window-content .parent .content .tab[data-v-59ae215c],.compendium-browser .window-content .parent .content .tab .browser[data-v-59ae215c]{overflow-y:hidden!important;height:100%}.compendium-browser .window-content .parent .content .tab .browser ul[data-v-59ae215c]{overflow-y:auto;overflow-x:hidden;height:100%}.compendium-browser .window-content .parent .content .tab .settings[data-v-59ae215c]{overflow-y:auto;height:100%}.compendium-browser .tabs[data-v-59ae215c]{max-height:2em;border-bottom:1px solid var(--color-border-light-primary)}.compendium-browser .tabContainer[data-v-59ae215c]{height:calc(100% - 2em)}.compendium-browser .tabContainer .tab[data-v-59ae215c]{width:100%;height:100%;overflow:scroll}.compendium-browser .control-area[data-v-59ae215c]{position:sticky;display:block;min-width:250px;max-width:45%;width:350px;height:100%;padding-right:5px;overflow:auto}.compendium-browser .control-area button[data-v-59ae215c]{background:#0000000d;border:1px solid #bbb;border-radius:5px;margin-top:5px;padding:2px}.compendium-browser .control-area .filtercontainer[data-v-59ae215c]{border:1px solid #bbb;border-radius:5px;margin-top:5px;padding:2px}.compendium-browser .control-area .filtercontainer h3[data-v-59ae215c]{margin:0;cursor:pointer}.compendium-browser .control-area .filtercontainer dl[data-v-59ae215c],.compendium-browser .control-area .filtercontainer div[data-v-59ae215c]{margin:5px 0}.compendium-browser .control-area .filtercontainer dt[data-v-59ae215c]{display:inline-block;width:40%;padding-left:5px}.compendium-browser .control-area .filtercontainer dd[data-v-59ae215c]{display:inline-block;width:58%;margin-left:0}.compendium-browser .control-area .filtercontainer dd select[data-v-59ae215c]{width:100%}.compendium-browser .control-area .filtercontainer .multiselect[data-v-59ae215c]{border:1px solid #bbb;border-radius:3px;vertical-align:middle;line-height:32px;margin:2px 0}.compendium-browser .control-area .filtercontainer .multiselect label[data-v-59ae215c]{padding:5px}.compendium-browser .control-area .filtercontainer .multiselect input[data-v-59ae215c]{vertical-align:middle}.compendium-browser .control-area .filtercontainer .small-input[data-v-59ae215c]{width:calc(100% - 44px);height:27px;background:#0000000d;border:1px solid #444;border-radius:3px;padding:0 3px;text-overflow:ellipsis}.compendium-browser .control-area .filtercontainer .small-select[data-v-59ae215c]{width:40px}.compendium-browser .list-area[data-v-59ae215c]{position:sticky;display:flex;min-width:250px;max-width:55%;width:400px;height:100%;padding-right:5px}.compendium-browser .list-area .loading[data-v-59ae215c]{flex:0;text-align:center}.compendium-browser .browser[data-v-59ae215c]{height:100%;overflow-y:hidden!important}.compendium-browser .browser .window-content[data-v-59ae215c]{overflow-y:hidden!important}.compendium-browser .browser ul[data-v-59ae215c]{float:right;display:block;min-width:335px;margin:0;height:100%;overflow:auto;padding-left:5px}.compendium-browser .browser ul .filter-tags[data-v-59ae215c]{display:none}.compendium-browser .browser ul li span[data-v-59ae215c]{white-space:nowrap;overflow:hidden}.compendium-browser .browser ul li .spell-tags span.negative[data-v-59ae215c]{color:#bbb}.compendium-browser .browser ul li .item-name span[data-v-59ae215c],.compendium-browser .browser ul li .feat-tags span[data-v-59ae215c]{white-space:break-spaces;height:inherit;display:block}.compendium-browser .browser .spacer[data-v-59ae215c]{display:inline-block;min-width:5px}.compendium-browser .browser .spacer-large[data-v-59ae215c]{display:inline-block;min-width:15px}.compendium-browser .item-browser li[data-v-59ae215c]{cursor:default;vertical-align:middle;line-height:16px;margin:2px 0;height:32px}.compendium-browser .item-browser li .item-image[data-v-59ae215c]{max-width:32px;height:32px}.compendium-browser .item-browser li .item-name[data-v-59ae215c]{padding-left:5px;flex:2}.compendium-browser .item-browser li .feat-tags[data-v-59ae215c],.compendium-browser .item-browser li .item-tags[data-v-59ae215c]{text-align:right;margin-right:3px;margin-left:3px;text-transform:capitalize;height:32px}.compendium-browser .feat-browser li[data-v-59ae215c]{cursor:default;vertical-align:middle;line-height:16px;margin:2px 0;height:32px}.compendium-browser .feat-browser li .item-image[data-v-59ae215c]{max-width:32px;height:32px}.compendium-browser .feat-browser li .item-name[data-v-59ae215c]{padding-left:5px;flex:2}.compendium-browser .feat-browser li .feat-tags[data-v-59ae215c],.compendium-browser .feat-browser li .item-tags[data-v-59ae215c]{text-align:right;margin-right:3px;margin-left:3px;text-transform:capitalize;height:32px}.compendium-browser .spell-browser li[data-v-59ae215c]{cursor:default;vertical-align:middle;line-height:16px;margin:2px 0;height:32px}.compendium-browser .spell-browser li .item-image[data-v-59ae215c]{max-width:32px;height:32px}.compendium-browser .spell-browser li .item-name[data-v-59ae215c]{padding-left:5px;flex:2}.compendium-browser .spell-browser li .feat-tags[data-v-59ae215c],.compendium-browser .spell-browser li .item-tags[data-v-59ae215c]{text-align:right;margin-right:3px;margin-left:3px;text-transform:capitalize;height:32px}.compendium-browser .spell-browser .spell .spell-level[data-v-59ae215c]{text-align:center;font-weight:900;max-width:18px;height:32px}.compendium-browser .spell-browser .spell .spell-tags[data-v-59ae215c]{text-align:right;margin-right:3px;font-weight:900;max-width:100px;height:32px}.compendium-browser .npc-browser .npc[data-v-59ae215c]{cursor:default;vertical-align:middle;line-height:64px;margin:4px 0}.compendium-browser .npc-browser .npc .npc-image[data-v-59ae215c]{max-width:64px;height:64px}.compendium-browser .npc-browser .npc .npc-image img[data-v-59ae215c]{width:64px;height:64px;border:none;object-fit:contain}.compendium-browser .npc-browser .npc .npc-line[data-v-59ae215c]{line-height:25px;padding:9px 0 5px 5px}.compendium-browser .npc-browser .npc .npc-name[data-v-59ae215c]{font-weight:700;font-size:16px}.compendium-browser .npc-browser .npc .cr[data-v-59ae215c]{display:inline-block;width:55px}.compendium-browser .npc-browser .npc .size[data-v-59ae215c]{display:inline-block;width:75px}.compendium-browser .npc-browser .npc .type[data-v-59ae215c]{display:inline-block}.compendium-browser .settings .settings-group[data-v-59ae215c]{border:1px solid #bbb;border-radius:5px;margin-top:5px;padding:2px}.compendium-browser .settings .settings-group h3[data-v-59ae215c]{margin:0;cursor:pointer}.compendium-browser .settings .settings-group label[data-v-59ae215c]{display:block}.compendium-browser .settings .settings-group h4[data-v-59ae215c]{display:inline-block;vertical-align:middle;height:100%}h1[data-v-59ae215c]{color:red} +#compendium .directory-footer[data-v-ceecbcd3]{display:block}#compendium .directory-footer .compendium-browser-btn[data-v-ceecbcd3]{margin-top:5px}.compendium-browser[data-v-ceecbcd3]{overflow-y:hidden!important;max-width:1100px;max-height:90vh;min-width:630px;min-height:500px}.compendium-browser .window-content[data-v-ceecbcd3],.compendium-browser .window-content .parent[data-v-ceecbcd3]{overflow-y:hidden!important;height:100%}.compendium-browser .window-content .parent .content[data-v-ceecbcd3]{overflow-y:hidden!important;height:calc(100% - 2em)}.compendium-browser .window-content .parent .content .tab[data-v-ceecbcd3],.compendium-browser .window-content .parent .content .tab .browser[data-v-ceecbcd3]{overflow-y:hidden!important;height:100%}.compendium-browser .window-content .parent .content .tab .browser ul[data-v-ceecbcd3]{overflow-y:auto;overflow-x:hidden;height:100%}.compendium-browser .window-content .parent .content .tab .settings[data-v-ceecbcd3]{overflow-y:auto;height:100%}.compendium-browser .tabs[data-v-ceecbcd3]{max-height:2em;border-bottom:1px solid var(--color-border-light-primary)}.compendium-browser .tabContainer[data-v-ceecbcd3]{height:calc(100% - 2em)}.compendium-browser .tabContainer .tab[data-v-ceecbcd3]{width:100%;height:100%;overflow:scroll}.compendium-browser .control-area[data-v-ceecbcd3]{position:sticky;display:block;min-width:250px;max-width:45%;width:350px;height:100%;padding-right:5px;overflow:auto}.compendium-browser .control-area button[data-v-ceecbcd3]{background:#0000000d;border:1px solid #bbb;border-radius:5px;margin-top:5px;padding:2px}.compendium-browser .control-area .filtercontainer[data-v-ceecbcd3]{border:1px solid #bbb;border-radius:5px;margin-top:5px;padding:2px}.compendium-browser .control-area .filtercontainer h3[data-v-ceecbcd3]{margin:0;cursor:pointer}.compendium-browser .control-area .filtercontainer dl[data-v-ceecbcd3],.compendium-browser .control-area .filtercontainer div[data-v-ceecbcd3]{margin:5px 0}.compendium-browser .control-area .filtercontainer dt[data-v-ceecbcd3]{display:inline-block;width:40%;padding-left:5px}.compendium-browser .control-area .filtercontainer dd[data-v-ceecbcd3]{display:inline-block;width:58%;margin-left:0}.compendium-browser .control-area .filtercontainer dd select[data-v-ceecbcd3]{width:100%}.compendium-browser .control-area .filtercontainer .multiselect[data-v-ceecbcd3]{border:1px solid #bbb;border-radius:3px;vertical-align:middle;line-height:32px;margin:2px 0}.compendium-browser .control-area .filtercontainer .multiselect label[data-v-ceecbcd3]{padding:5px}.compendium-browser .control-area .filtercontainer .multiselect input[data-v-ceecbcd3]{vertical-align:middle}.compendium-browser .control-area .filtercontainer .small-input[data-v-ceecbcd3]{width:calc(100% - 44px);height:27px;background:#0000000d;border:1px solid #444;border-radius:3px;padding:0 3px;text-overflow:ellipsis}.compendium-browser .control-area .filtercontainer .small-select[data-v-ceecbcd3]{width:40px}.compendium-browser .list-area[data-v-ceecbcd3]{position:sticky;display:flex;min-width:250px;max-width:55%;width:400px;height:100%;padding-right:5px}.compendium-browser .list-area .loading[data-v-ceecbcd3]{flex:0;text-align:center}.compendium-browser .browser[data-v-ceecbcd3]{height:100%;overflow-y:hidden!important}.compendium-browser .browser .window-content[data-v-ceecbcd3]{overflow-y:hidden!important}.compendium-browser .browser ul[data-v-ceecbcd3]{float:right;display:block;min-width:335px;margin:0;height:100%;overflow:auto;padding-left:5px}.compendium-browser .browser ul .filter-tags[data-v-ceecbcd3]{display:none}.compendium-browser .browser ul li span[data-v-ceecbcd3]{white-space:nowrap;overflow:hidden}.compendium-browser .browser ul li .spell-tags span.negative[data-v-ceecbcd3]{color:#bbb}.compendium-browser .browser ul li .item-name span[data-v-ceecbcd3],.compendium-browser .browser ul li .feat-tags span[data-v-ceecbcd3]{white-space:break-spaces;height:inherit;display:block}.compendium-browser .browser .spacer[data-v-ceecbcd3]{display:inline-block;min-width:5px}.compendium-browser .browser .spacer-large[data-v-ceecbcd3]{display:inline-block;min-width:15px}.compendium-browser .item-browser li[data-v-ceecbcd3]{cursor:default;vertical-align:middle;line-height:16px;margin:2px 0;height:32px}.compendium-browser .item-browser li .item-image[data-v-ceecbcd3]{max-width:32px;height:32px}.compendium-browser .item-browser li .item-name[data-v-ceecbcd3]{padding-left:5px;flex:2}.compendium-browser .item-browser li .feat-tags[data-v-ceecbcd3],.compendium-browser .item-browser li .item-tags[data-v-ceecbcd3]{text-align:right;margin-right:3px;margin-left:3px;text-transform:capitalize;height:32px}.compendium-browser .feat-browser li[data-v-ceecbcd3]{cursor:default;vertical-align:middle;line-height:16px;margin:2px 0;height:32px}.compendium-browser .feat-browser li .item-image[data-v-ceecbcd3]{max-width:32px;height:32px}.compendium-browser .feat-browser li .item-name[data-v-ceecbcd3]{padding-left:5px;flex:2}.compendium-browser .feat-browser li .feat-tags[data-v-ceecbcd3],.compendium-browser .feat-browser li .item-tags[data-v-ceecbcd3]{text-align:right;margin-right:3px;margin-left:3px;text-transform:capitalize;height:32px}.compendium-browser .spell-browser li[data-v-ceecbcd3]{cursor:default;vertical-align:middle;line-height:16px;margin:2px 0;height:32px}.compendium-browser .spell-browser li .item-image[data-v-ceecbcd3]{max-width:32px;height:32px}.compendium-browser .spell-browser li .item-name[data-v-ceecbcd3]{padding-left:5px;flex:2}.compendium-browser .spell-browser li .feat-tags[data-v-ceecbcd3],.compendium-browser .spell-browser li .item-tags[data-v-ceecbcd3]{text-align:right;margin-right:3px;margin-left:3px;text-transform:capitalize;height:32px}.compendium-browser .spell-browser .spell .spell-level[data-v-ceecbcd3]{text-align:center;font-weight:900;max-width:18px;height:32px}.compendium-browser .spell-browser .spell .spell-tags[data-v-ceecbcd3]{text-align:right;margin-right:3px;font-weight:900;max-width:100px;height:32px}.compendium-browser .npc-browser .npc[data-v-ceecbcd3]{cursor:default;vertical-align:middle;line-height:64px;margin:4px 0}.compendium-browser .npc-browser .npc .npc-image[data-v-ceecbcd3]{max-width:64px;height:64px}.compendium-browser .npc-browser .npc .npc-image img[data-v-ceecbcd3]{width:64px;height:64px;border:none;object-fit:contain}.compendium-browser .npc-browser .npc .npc-line[data-v-ceecbcd3]{line-height:25px;padding:9px 0 5px 5px}.compendium-browser .npc-browser .npc .npc-name[data-v-ceecbcd3]{font-weight:700;font-size:16px}.compendium-browser .npc-browser .npc .cr[data-v-ceecbcd3]{display:inline-block;width:55px}.compendium-browser .npc-browser .npc .size[data-v-ceecbcd3]{display:inline-block;width:75px}.compendium-browser .npc-browser .npc .type[data-v-ceecbcd3]{display:inline-block}.compendium-browser .settings .settings-group[data-v-ceecbcd3]{border:1px solid #bbb;border-radius:5px;margin-top:5px;padding:2px}.compendium-browser .settings .settings-group h3[data-v-ceecbcd3]{margin:0;cursor:pointer}.compendium-browser .settings .settings-group label[data-v-ceecbcd3]{display:block}.compendium-browser .settings .settings-group h4[data-v-ceecbcd3]{display:inline-block;vertical-align:middle;height:100%}h1[data-v-ceecbcd3]{color:red} diff --git a/src/vue/CompendiumBrowser.vue b/src/vue/CompendiumBrowser.vue index f7541df..8276014 100644 --- a/src/vue/CompendiumBrowser.vue +++ b/src/vue/CompendiumBrowser.vue @@ -2,7 +2,7 @@
- +
@@ -14,17 +14,19 @@ have been opened at least once. --> - + Creatures - + + Spells + + - + + Items + +
@@ -60,25 +62,24 @@ export default { return { // The only variable we actually need to track is the active tab. tabs: { - defaultTab: 'creatures', primary: { // Default tab is assigned in the flags() computed property. creatures: { key: 'creatures', label: game.i18n.localize('CMPBrowser.Tab.NPCBrowser'), - active: false, + active: this.context?.defaultTab === 'creatures' ?? false, opened: false }, powers: { key: 'powers', label: game.i18n.localize('CMPBrowser.Tab.SpellBrowser'), - active: false, + active: this.context?.defaultTab === 'powers' ?? false, opened: false }, items: { key: 'items', label: game.i18n.localize('CMPBrowser.Tab.ItemBrowser'), - active: false, + active: this.context?.defaultTab === 'items' ?? false, opened: false } } @@ -92,6 +93,13 @@ export default { console.log("Creating compendium browser..."); }, async mounted() { + // const defaultTab = this?.context?.defaultTab ?? 'creatures'; + // if (this.tabs.primary?.[defaultTab]) { + // this.tabs.primary[defaultTab].active = true; + // } + // else { + // this.tabs.primary.creatures.active = true; + // } console.log("Compendium browser mounted."); } } diff --git a/src/vue/components/dialogs/compendium-browser/stub.vue b/src/vue/components/dialogs/compendium-browser/stub.vue index 25c08a8..1135cfd 100644 --- a/src/vue/components/dialogs/compendium-browser/stub.vue +++ b/src/vue/components/dialogs/compendium-browser/stub.vue @@ -1,5 +1,5 @@