kanbancast-components
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
import { css as U, LitElement as O, html as $ } from "lit"; | ||
import { css as k, LitElement as U, html as $ } from "lit"; | ||
/** | ||
@@ -7,3 +7,3 @@ * @license | ||
*/ | ||
const A = (r) => (t, e) => { | ||
const T = (r) => (t, e) => { | ||
e !== void 0 ? e.addInitializer(() => { | ||
@@ -18,4 +18,4 @@ customElements.define(r, t); | ||
*/ | ||
const p = globalThis, m = p.ShadowRoot && (p.ShadyCSS === void 0 || p.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, P = Symbol(), S = /* @__PURE__ */ new WeakMap(); | ||
let x = class { | ||
const p = globalThis, g = p.ShadowRoot && (p.ShadyCSS === void 0 || p.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, P = Symbol(), S = /* @__PURE__ */ new WeakMap(); | ||
let O = class { | ||
constructor(t, e, s) { | ||
@@ -29,3 +29,3 @@ if (this._$cssResult$ = !0, s !== P) | ||
const e = this.t; | ||
if (m && t === void 0) { | ||
if (g && t === void 0) { | ||
const s = e !== void 0 && e.length === 1; | ||
@@ -40,4 +40,4 @@ s && (t = S.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && S.set(e, t)); | ||
}; | ||
const C = (r) => new x(typeof r == "string" ? r : r + "", void 0, P), k = (r, t) => { | ||
if (m) | ||
const A = (r) => new O(typeof r == "string" ? r : r + "", void 0, P), x = (r, t) => { | ||
if (g) | ||
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
@@ -49,7 +49,7 @@ else | ||
} | ||
}, E = m ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => { | ||
}, _ = g ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => { | ||
let e = ""; | ||
for (const s of t.cssRules) | ||
e += s.cssText; | ||
return C(e); | ||
return A(e); | ||
})(r) : r; | ||
@@ -61,6 +61,6 @@ /** | ||
*/ | ||
const { is: T, defineProperty: j, getOwnPropertyDescriptor: R, getOwnPropertyNames: M, getOwnPropertySymbols: z, getPrototypeOf: D } = Object, c = globalThis, _ = c.trustedTypes, L = _ ? _.emptyScript : "", b = c.reactiveElementPolyfillSupport, d = (r, t) => r, u = { toAttribute(r, t) { | ||
const { is: C, defineProperty: j, getOwnPropertyDescriptor: R, getOwnPropertyNames: D, getOwnPropertySymbols: M, getPrototypeOf: z } = Object, c = globalThis, E = c.trustedTypes, I = E ? E.emptyScript : "", b = c.reactiveElementPolyfillSupport, h = (r, t) => r, u = { toAttribute(r, t) { | ||
switch (t) { | ||
case Boolean: | ||
r = r ? L : null; | ||
r = r ? I : null; | ||
break; | ||
@@ -90,5 +90,5 @@ case Object: | ||
return e; | ||
} }, v = (r, t) => !T(r, t), w = { attribute: !0, type: String, converter: u, reflect: !1, hasChanged: v }; | ||
} }, m = (r, t) => !C(r, t), w = { attribute: !0, type: String, converter: u, reflect: !1, hasChanged: m }; | ||
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), c.litPropertyMetadata ?? (c.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); | ||
class h extends HTMLElement { | ||
class d extends HTMLElement { | ||
static addInitializer(t) { | ||
@@ -123,12 +123,12 @@ this._$Ei(), (this.l ?? (this.l = [])).push(t); | ||
static _$Ei() { | ||
if (this.hasOwnProperty(d("elementProperties"))) | ||
if (this.hasOwnProperty(h("elementProperties"))) | ||
return; | ||
const t = D(this); | ||
const t = z(this); | ||
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); | ||
} | ||
static finalize() { | ||
if (this.hasOwnProperty(d("finalized"))) | ||
if (this.hasOwnProperty(h("finalized"))) | ||
return; | ||
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d("properties"))) { | ||
const e = this.properties, s = [...M(e), ...z(e)]; | ||
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(h("properties"))) { | ||
const e = this.properties, s = [...D(e), ...M(e)]; | ||
for (const i of s) | ||
@@ -156,5 +156,5 @@ this.createProperty(i, e[i]); | ||
for (const i of s) | ||
e.unshift(E(i)); | ||
e.unshift(_(i)); | ||
} else | ||
t !== void 0 && e.push(E(t)); | ||
t !== void 0 && e.push(_(t)); | ||
return e; | ||
@@ -189,3 +189,3 @@ } | ||
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
return k(t, this.constructor.elementStyles), t; | ||
return x(t, this.constructor.elementStyles), t; | ||
} | ||
@@ -229,3 +229,3 @@ connectedCallback() { | ||
if (t !== void 0) { | ||
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? v)(this[t], e)) | ||
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? m)(this[t], e)) | ||
return; | ||
@@ -308,3 +308,3 @@ this.P(t, e, s); | ||
} | ||
h.elementStyles = [], h.shadowRootOptions = { mode: "open" }, h[d("elementProperties")] = /* @__PURE__ */ new Map(), h[d("finalized")] = /* @__PURE__ */ new Map(), b == null || b({ ReactiveElement: h }), (c.reactiveElementVersions ?? (c.reactiveElementVersions = [])).push("2.0.4"); | ||
d.elementStyles = [], d.shadowRootOptions = { mode: "open" }, d[h("elementProperties")] = /* @__PURE__ */ new Map(), d[h("finalized")] = /* @__PURE__ */ new Map(), b == null || b({ ReactiveElement: d }), (c.reactiveElementVersions ?? (c.reactiveElementVersions = [])).push("2.0.4"); | ||
/** | ||
@@ -315,3 +315,3 @@ * @license | ||
*/ | ||
const I = { attribute: !0, type: String, converter: u, reflect: !1, hasChanged: v }, N = (r = I, t, e) => { | ||
const L = { attribute: !0, type: String, converter: u, reflect: !1, hasChanged: m }, N = (r = L, t, e) => { | ||
const { kind: s, metadata: i } = e; | ||
@@ -337,3 +337,3 @@ let n = globalThis.litPropertyMetadata.get(i); | ||
}; | ||
function g(r) { | ||
function v(r) { | ||
return (t, e) => typeof e == "object" ? N(r, t, e) : ((s, i, n) => { | ||
@@ -349,5 +349,74 @@ const o = i.hasOwnProperty(n); | ||
}; | ||
let l = class extends O { | ||
let l = class extends U { | ||
constructor() { | ||
super(...arguments), this.statuses = [], this.projectId = 0, this.selectedTab = "Active"; | ||
super(...arguments), this.statuses = [ | ||
{ | ||
id: 1, | ||
title: "Pending", | ||
slug: "pending", | ||
order: 3, | ||
tasks: [] | ||
}, | ||
{ | ||
id: 2, | ||
title: "To Do", | ||
slug: "to-do", | ||
order: 1, | ||
tasks: [ | ||
{ | ||
id: 1, | ||
title: "Task 1", | ||
description: "Description of Task 1", | ||
order: 1, | ||
votes: 1, | ||
status_id: 1 | ||
}, | ||
{ | ||
id: 2, | ||
title: "Task 2", | ||
description: "Description of Task 2", | ||
order: 2, | ||
votes: 1, | ||
status_id: 1 | ||
} | ||
] | ||
}, | ||
{ | ||
id: 3, | ||
title: "In Progress", | ||
slug: "in-progress", | ||
order: 2, | ||
tasks: [ | ||
{ | ||
id: 3, | ||
title: "Task 3", | ||
description: "Description of Task 3", | ||
order: 1, | ||
votes: 1, | ||
status_id: 2 | ||
} | ||
] | ||
}, | ||
{ | ||
id: 4, | ||
title: "Review", | ||
slug: "review", | ||
order: 3, | ||
tasks: [] | ||
}, | ||
{ | ||
id: 5, | ||
title: "Done", | ||
slug: "done", | ||
order: 4, | ||
tasks: [] | ||
}, | ||
{ | ||
id: 6, | ||
title: "Published", | ||
slug: "published", | ||
order: 4, | ||
tasks: [] | ||
} | ||
], this.projectId = 0, this.selectedTab = "Active"; | ||
} | ||
@@ -359,3 +428,3 @@ updated(r) { | ||
const r = ["To Do", "In Progress", "Pending", "Review"], t = ["Done", "Published"], e = this.selectedTab === "Active" ? r : t; | ||
return this.statuses.filter((s) => e.includes(s.title)).flatMap((s) => s.tasks.map((i) => ({ ...i, status: s }))); | ||
return (this.statuses || []).filter((s) => e.includes(s.title)).flatMap((s) => s.tasks.map((i) => ({ ...i, status: s }))); | ||
} | ||
@@ -415,3 +484,3 @@ render() { | ||
}; | ||
l.styles = U` | ||
l.styles = k` | ||
:.container { | ||
@@ -482,12 +551,12 @@ background-color: #5a67d8; | ||
f([ | ||
g({ type: Array }) | ||
v({ type: Array }) | ||
], l.prototype, "statuses", 2); | ||
f([ | ||
g({ type: Number }) | ||
v({ type: Number }) | ||
], l.prototype, "projectId", 2); | ||
f([ | ||
g({ type: String }) | ||
v({ type: String }) | ||
], l.prototype, "selectedTab", 2); | ||
l = f([ | ||
A("board-view") | ||
T("board-view") | ||
], l); | ||
@@ -494,0 +563,0 @@ export { |
{ | ||
"name": "kanbancast-components", | ||
"private": false, | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "types": "dist/board-view.d.ts", |
26477
5.24%900
8.3%