kanbancast-components
Advanced tools
Comparing version
@@ -28,3 +28,2 @@ import { LitElement } from 'lit'; | ||
disconnectedCallback(): void; | ||
handleBeforeUnload: (event: Event) => void; | ||
applyTheme(): void; | ||
@@ -31,0 +30,0 @@ fetchStatuses(): Promise<void>; |
@@ -17,6 +17,6 @@ import { css as g, LitElement as $, html as h } from "lit"; | ||
*/ | ||
const x = globalThis, _ = x.ShadowRoot && (x.ShadyCSS === void 0 || x.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, D = Symbol(), O = /* @__PURE__ */ new WeakMap(); | ||
let V = class { | ||
const x = globalThis, _ = x.ShadowRoot && (x.ShadyCSS === void 0 || x.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, A = Symbol(), O = /* @__PURE__ */ new WeakMap(); | ||
let R = class { | ||
constructor(t, e, o) { | ||
if (this._$cssResult$ = !0, o !== D) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
if (this._$cssResult$ = !0, o !== A) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
this.cssText = t, this.t = e; | ||
@@ -37,3 +37,3 @@ } | ||
}; | ||
const z = (s) => new V(typeof s == "string" ? s : s + "", void 0, D), I = (s, t) => { | ||
const V = (s) => new R(typeof s == "string" ? s : s + "", void 0, A), z = (s, t) => { | ||
if (_) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
@@ -47,3 +47,3 @@ else for (const e of t) { | ||
for (const o of t.cssRules) e += o.cssText; | ||
return z(e); | ||
return V(e); | ||
})(s) : s; | ||
@@ -55,6 +55,6 @@ /** | ||
*/ | ||
const { is: N, defineProperty: K, getOwnPropertyDescriptor: q, getOwnPropertyNames: B, getOwnPropertySymbols: F, getPrototypeOf: J } = Object, m = globalThis, M = m.trustedTypes, G = M ? M.emptyScript : "", C = m.reactiveElementPolyfillSupport, w = (s, t) => s, k = { toAttribute(s, t) { | ||
const { is: I, defineProperty: N, getOwnPropertyDescriptor: K, getOwnPropertyNames: q, getOwnPropertySymbols: B, getPrototypeOf: F } = Object, m = globalThis, M = m.trustedTypes, J = M ? M.emptyScript : "", C = m.reactiveElementPolyfillSupport, w = (s, t) => s, k = { toAttribute(s, t) { | ||
switch (t) { | ||
case Boolean: | ||
s = s ? G : null; | ||
s = s ? J : null; | ||
break; | ||
@@ -84,3 +84,3 @@ case Object: | ||
return e; | ||
} }, T = (s, t) => !N(s, t), L = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: T }; | ||
} }, T = (s, t) => !I(s, t), L = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: T }; | ||
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), m.litPropertyMetadata ?? (m.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); | ||
@@ -97,7 +97,7 @@ class y extends HTMLElement { | ||
const o = Symbol(), i = this.getPropertyDescriptor(t, o, e); | ||
i !== void 0 && K(this.prototype, t, i); | ||
i !== void 0 && N(this.prototype, t, i); | ||
} | ||
} | ||
static getPropertyDescriptor(t, e, o) { | ||
const { get: i, set: n } = q(this.prototype, t) ?? { get() { | ||
const { get: i, set: n } = K(this.prototype, t) ?? { get() { | ||
return this[e]; | ||
@@ -119,3 +119,3 @@ }, set(r) { | ||
if (this.hasOwnProperty(w("elementProperties"))) return; | ||
const t = J(this); | ||
const t = F(this); | ||
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); | ||
@@ -126,3 +126,3 @@ } | ||
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(w("properties"))) { | ||
const e = this.properties, o = [...B(e), ...F(e)]; | ||
const e = this.properties, o = [...q(e), ...B(e)]; | ||
for (const i of o) this.createProperty(i, e[i]); | ||
@@ -176,3 +176,3 @@ } | ||
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
return I(t, this.constructor.elementStyles), t; | ||
return z(t, this.constructor.elementStyles), t; | ||
} | ||
@@ -295,3 +295,3 @@ connectedCallback() { | ||
*/ | ||
const H = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: T }, W = (s = H, t, e) => { | ||
const G = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: T }, H = (s = G, t, e) => { | ||
const { kind: o, metadata: i } = e; | ||
@@ -318,3 +318,3 @@ let n = globalThis.litPropertyMetadata.get(i); | ||
function c(s) { | ||
return (t, e) => typeof e == "object" ? W(s, t, e) : ((o, i, n) => { | ||
return (t, e) => typeof e == "object" ? H(s, t, e) : ((o, i, n) => { | ||
const r = i.hasOwnProperty(n); | ||
@@ -332,3 +332,3 @@ return i.constructor.createProperty(n, r ? { ...o, wrapped: !0 } : o), r ? Object.getOwnPropertyDescriptor(i, n) : void 0; | ||
} | ||
const Y = g` | ||
const W = g` | ||
/* Your existing styles */ | ||
@@ -573,3 +573,3 @@ :root { | ||
} | ||
`, Z = g` | ||
`, Y = g` | ||
.overlay { | ||
@@ -629,3 +629,3 @@ position: fixed; | ||
} | ||
`, Q = g` | ||
`, Z = g` | ||
.header { | ||
@@ -664,3 +664,3 @@ display: flex; | ||
transition: background-color 0.3s; | ||
}`, X = (s) => { | ||
}`, Q = (s) => { | ||
switch (s) { | ||
@@ -679,6 +679,6 @@ case "Requested": | ||
}; | ||
var tt = Object.defineProperty, et = Object.getOwnPropertyDescriptor, st = (s, t, e, o) => { | ||
for (var i = o > 1 ? void 0 : o ? et(t, e) : t, n = s.length - 1, r; n >= 0; n--) | ||
var X = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, et = (s, t, e, o) => { | ||
for (var i = o > 1 ? void 0 : o ? tt(t, e) : t, n = s.length - 1, r; n >= 0; n--) | ||
(r = s[n]) && (i = (o ? r(t, e, i) : r(i)) || i); | ||
return o && i && tt(t, e, i), i; | ||
return o && i && X(t, e, i), i; | ||
}; | ||
@@ -726,9 +726,9 @@ let E = class extends $ { | ||
`; | ||
E = st([ | ||
E = et([ | ||
S("back-link") | ||
], E); | ||
var ot = Object.defineProperty, it = Object.getOwnPropertyDescriptor, f = (s, t, e, o) => { | ||
for (var i = o > 1 ? void 0 : o ? it(t, e) : t, n = s.length - 1, r; n >= 0; n--) | ||
var st = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, f = (s, t, e, o) => { | ||
for (var i = o > 1 ? void 0 : o ? ot(t, e) : t, n = s.length - 1, r; n >= 0; n--) | ||
(r = s[n]) && (i = (o ? r(t, e, i) : r(i)) || i); | ||
return o && i && ot(t, e, i), i; | ||
return o && i && st(t, e, i), i; | ||
}; | ||
@@ -801,3 +801,3 @@ let u = class extends $ { | ||
}; | ||
u.styles = [Z, g` | ||
u.styles = [Y, g` | ||
`]; | ||
@@ -825,7 +825,7 @@ f([ | ||
], u); | ||
function R(s, t) { | ||
function D(s, t) { | ||
const e = JSON.parse(localStorage.getItem("analyticsLogs") || "[]"); | ||
e.push({ eventName: s, eventData: t, timestamp: (/* @__PURE__ */ new Date()).toISOString() }), localStorage.setItem("analyticsLogs", JSON.stringify(e)); | ||
} | ||
async function U(s) { | ||
async function it(s) { | ||
const t = JSON.parse(localStorage.getItem("analyticsLogs") || "[]"); | ||
@@ -890,3 +890,3 @@ if (t.length > 0) | ||
_selectTab(s) { | ||
this.selectedTab = s, this.dispatchEvent(new CustomEvent("tab-changed", { detail: { tab: s } })), R("tab-changed", { tab: s }); | ||
this.selectedTab = s, this.dispatchEvent(new CustomEvent("tab-changed", { detail: { tab: s } })), D("tab-changed", { tab: s }); | ||
} | ||
@@ -897,3 +897,3 @@ _toggleModal() { | ||
}; | ||
v.styles = [Q, g``]; | ||
v.styles = [Z, g``]; | ||
P([ | ||
@@ -960,3 +960,3 @@ c({ type: String }) | ||
/> | ||
</svg>`, A = h` | ||
</svg>`, U = h` | ||
<svg | ||
@@ -979,5 +979,3 @@ fill="#000000" | ||
constructor() { | ||
super(...arguments), this.statuses = [], this.projectId = 1, this.newTaskTitle = "", this.newTaskDescription = "", this.apiKey = "arwn30IP3lx3", this.containerColor = "#ffffff", this.selectedTab = "Active", this.showModal = !1, this.theme = "light", this.commentContent = "", this.taskVotes = {}, this.commentVotes = {}, this.showComments = {}, this.handleBeforeUnload = (s) => { | ||
console.log(s), U(this.apiKey); | ||
}; | ||
super(...arguments), this.statuses = [], this.projectId = 1, this.newTaskTitle = "", this.newTaskDescription = "", this.apiKey = "arwn30IP3lx3", this.containerColor = "#ffffff", this.selectedTab = "Active", this.showModal = !1, this.theme = "light", this.commentContent = "", this.taskVotes = {}, this.commentVotes = {}, this.showComments = {}; | ||
} | ||
@@ -988,8 +986,8 @@ toggleTheme() { | ||
connectedCallback() { | ||
super.connectedCallback(), this.fetchStatuses(), this.logEvent("board-view", { board: "loaded" }), window.addEventListener("beforeunload", this.handleBeforeUnload), setInterval(() => { | ||
U(this.apiKey); | ||
}, 5e3); | ||
super.connectedCallback(), this.fetchStatuses(), this.logEvent("board-view", { board: "loaded" }), setInterval(() => { | ||
it(this.apiKey); | ||
}, 1e4); | ||
} | ||
disconnectedCallback() { | ||
window.removeEventListener("beforeunload", this.handleBeforeUnload), super.disconnectedCallback(); | ||
super.disconnectedCallback(); | ||
} | ||
@@ -1110,3 +1108,3 @@ applyTheme() { | ||
handleTabChanged(s) { | ||
this.selectedTab = s.detail.tab, R("tab-changed", { tab: s.detail.tab }); | ||
this.selectedTab = s.detail.tab, D("tab-changed", { tab: s.detail.tab }); | ||
} | ||
@@ -1145,3 +1143,3 @@ handleToggleModal(s) { | ||
var i, n, r, d; | ||
const { emoji: t, bgColor: e, textColor: o } = X( | ||
const { emoji: t, bgColor: e, textColor: o } = Q( | ||
((i = s.status) == null ? void 0 : i.title) ?? "" | ||
@@ -1157,3 +1155,3 @@ ); | ||
> | ||
${A} | ||
${U} | ||
<span class="votes-count" | ||
@@ -1198,3 +1196,3 @@ >${this.taskVotes[s.id] ?? 1}</span | ||
> | ||
${A} | ||
${U} | ||
<span | ||
@@ -1243,3 +1241,3 @@ >${this.commentVotes[p.id] ?? 0}</span | ||
}; | ||
a.styles = [Y, g` | ||
a.styles = [W, g` | ||
/* Your existing styles */ | ||
@@ -1246,0 +1244,0 @@ :root { |
{ | ||
"name": "kanbancast-components", | ||
"private": false, | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "types": "dist/board-view.d.ts", |
@@ -47,19 +47,11 @@ import { LitElement, html, css } from 'lit'; | ||
this.logEvent('board-view', {'board':'loaded'}) | ||
window.addEventListener('beforeunload', this.handleBeforeUnload); | ||
setInterval(() => { | ||
setInterval(() => { | ||
sendAnalyticsData(this.apiKey); | ||
}, 5000); | ||
}, 10000); | ||
} | ||
disconnectedCallback() { | ||
window.removeEventListener('beforeunload', this.handleBeforeUnload); | ||
super.disconnectedCallback(); | ||
} | ||
handleBeforeUnload = (event: Event) => { | ||
console.log(event); | ||
sendAnalyticsData(this.apiKey); | ||
}; | ||
applyTheme() { | ||
@@ -66,0 +58,0 @@ this.shadowRoot?.host.classList.toggle("dark-theme", this.theme === "dark"); |
76564
-0.67%2392
-0.37%