@mhmo91/schmancy 0.2.120 → 0.2.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-CglGRaSJ.js → checkbox-4y1DGu22.js} +7 -6
- package/dist/{checkbox-CglGRaSJ.js.map → checkbox-4y1DGu22.js.map} +1 -1
- package/dist/{checkbox-Bw98L4cT.cjs → checkbox-BfFsbs3h.cjs} +6 -6
- package/dist/{checkbox-Bw98L4cT.cjs.map → checkbox-BfFsbs3h.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-BepHO_mm.cjs → chips-C6a7NyzB.cjs} +16 -16
- package/dist/{chips-BepHO_mm.cjs.map → chips-C6a7NyzB.cjs.map} +1 -1
- package/dist/{chips-C_7K0qF3.js → chips-DqXt-vj6.js} +14 -13
- package/dist/{chips-C_7K0qF3.js.map → chips-DqXt-vj6.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/flow-B1wMqea2.js +342 -0
- package/dist/flow-B1wMqea2.js.map +1 -0
- package/dist/flow-CnJl1T1A.cjs +2 -0
- package/dist/flow-CnJl1T1A.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/{input-BDXWcxNw.cjs → input-C6lDXLTK.cjs} +3 -3
- package/dist/{input-BDXWcxNw.cjs.map → input-C6lDXLTK.cjs.map} +1 -1
- package/dist/{input-fP8EqcLF.js → input-DHTDgJjW.js} +64 -64
- package/dist/{input-fP8EqcLF.js.map → input-DHTDgJjW.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{redispatch-event-vOGO-T8W.js → redispatch-event-CF5ekzwZ.js} +33 -39
- package/dist/redispatch-event-CF5ekzwZ.js.map +1 -0
- package/dist/redispatch-event-roczetCU.cjs +4 -0
- package/dist/redispatch-event-roczetCU.cjs.map +1 -0
- package/dist/table-C8Lqlb9G.js +556 -0
- package/dist/table-C8Lqlb9G.js.map +1 -0
- package/dist/table-lUgP7-kl.cjs +80 -0
- package/dist/table-lUgP7-kl.cjs.map +1 -0
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-CCf1dH9g.js → teleport.component-BaG47RHC.js} +21 -21
- package/dist/{teleport.component-CCf1dH9g.js.map → teleport.component-BaG47RHC.js.map} +1 -1
- package/dist/{teleport.component-n3DU71bR.cjs → teleport.component-CUyHjYuS.cjs} +2 -2
- package/dist/{teleport.component-n3DU71bR.cjs.map → teleport.component-CUyHjYuS.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/tslib.es6-DgOcxv4s.cjs +2 -0
- package/dist/tslib.es6-DgOcxv4s.cjs.map +1 -0
- package/dist/tslib.es6-ujVQHAQ4.js +10 -0
- package/dist/tslib.es6-ujVQHAQ4.js.map +1 -0
- package/dist/{typewriter-DB08jO4e.js → typewriter-FTQ_LV70.js} +8 -8
- package/dist/{typewriter-DB08jO4e.js.map → typewriter-FTQ_LV70.js.map} +1 -1
- package/dist/typewriter.js +1 -1
- package/package.json +1 -1
- package/types/src/table/table.d.ts +1 -0
- package/dist/redispatch-event-vOGO-T8W.js.map +0 -1
- package/dist/redispatch-event-yBlefmeU.cjs +0 -4
- package/dist/redispatch-event-yBlefmeU.cjs.map +0 -1
- package/dist/table-CUgn9BYP.cjs +0 -80
- package/dist/table-CUgn9BYP.cjs.map +0 -1
- package/dist/table-k-u5jZrL.js +0 -129
- package/dist/table-k-u5jZrL.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redispatch-event-yBlefmeU.cjs","sources":["../../../../.yarn/berry/cache/tslib-npm-2.8.1-66590b21b8-10c0.zip/node_modules/tslib/tslib.es6.mjs","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/internal/controller/attachable-controller.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/focus/internal/focus-ring.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/focus/internal/focus-ring-styles.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/focus/md-focus-ring.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/internal/motion/animation.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/ripple/internal/ripple.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/ripple/internal/ripple-styles.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/ripple/ripple.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/internal/aria/aria.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/internal/aria/delegate.js","../../../../.yarn/berry/cache/@material-web-npm-2.2.0-6c67e37c0d-10c0.zip/node_modules/@material/web/internal/events/redispatch-event.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { isServer } from 'lit';\n/**\n * A key to retrieve an `Attachable` element's `AttachableController` from a\n * global `MutationObserver`.\n */\nconst ATTACHABLE_CONTROLLER = Symbol('attachableController');\nlet FOR_ATTRIBUTE_OBSERVER;\nif (!isServer) {\n /**\n * A global `MutationObserver` that reacts to `for` attribute changes on\n * `Attachable` elements. If the `for` attribute changes, the controller will\n * re-attach to the new referenced element.\n */\n FOR_ATTRIBUTE_OBSERVER = new MutationObserver((records) => {\n for (const record of records) {\n // When a control's `for` attribute changes, inform its\n // `AttachableController` to update to a new control.\n record.target[ATTACHABLE_CONTROLLER]?.hostConnected();\n }\n });\n}\n/**\n * A controller that provides an implementation for `Attachable` elements.\n *\n * @example\n * ```ts\n * class MyElement extends LitElement implements Attachable {\n * get control() { return this.attachableController.control; }\n *\n * private readonly attachableController = new AttachableController(\n * this,\n * (previousControl, newControl) => {\n * previousControl?.removeEventListener('click', this.handleClick);\n * newControl?.addEventListener('click', this.handleClick);\n * }\n * );\n *\n * // Implement remaining `Attachable` properties/methods that call the\n * // controller's properties/methods.\n * }\n * ```\n */\nexport class AttachableController {\n get htmlFor() {\n return this.host.getAttribute('for');\n }\n set htmlFor(htmlFor) {\n if (htmlFor === null) {\n this.host.removeAttribute('for');\n }\n else {\n this.host.setAttribute('for', htmlFor);\n }\n }\n get control() {\n if (this.host.hasAttribute('for')) {\n if (!this.htmlFor || !this.host.isConnected) {\n return null;\n }\n return this.host.getRootNode().querySelector(`#${this.htmlFor}`);\n }\n return this.currentControl || this.host.parentElement;\n }\n set control(control) {\n if (control) {\n this.attach(control);\n }\n else {\n this.detach();\n }\n }\n /**\n * Creates a new controller for an `Attachable` element.\n *\n * @param host The `Attachable` element.\n * @param onControlChange A callback with two parameters for the previous and\n * next control. An `Attachable` element may perform setup or teardown\n * logic whenever the control changes.\n */\n constructor(host, onControlChange) {\n this.host = host;\n this.onControlChange = onControlChange;\n this.currentControl = null;\n host.addController(this);\n host[ATTACHABLE_CONTROLLER] = this;\n FOR_ATTRIBUTE_OBSERVER?.observe(host, { attributeFilter: ['for'] });\n }\n attach(control) {\n if (control === this.currentControl) {\n return;\n }\n this.setCurrentControl(control);\n // When imperatively attaching, remove the `for` attribute so\n // that the attached control is used instead of a referenced one.\n this.host.removeAttribute('for');\n }\n detach() {\n this.setCurrentControl(null);\n // When imperatively detaching, add an empty `for=\"\"` attribute. This will\n // ensure the control is `null` rather than the `parentElement`.\n this.host.setAttribute('for', '');\n }\n /** @private */\n hostConnected() {\n this.setCurrentControl(this.control);\n }\n /** @private */\n hostDisconnected() {\n this.setCurrentControl(null);\n }\n setCurrentControl(control) {\n this.onControlChange(this.currentControl, control);\n this.currentControl = control;\n }\n}\n//# sourceMappingURL=attachable-controller.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { isServer, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { AttachableController, } from '../../internal/controller/attachable-controller.js';\n/**\n * Events that the focus ring listens to.\n */\nconst EVENTS = ['focusin', 'focusout', 'pointerdown'];\n/**\n * A focus ring component.\n *\n * @fires visibility-changed {Event} Fired whenever `visible` changes.\n */\nexport class FocusRing extends LitElement {\n constructor() {\n super(...arguments);\n /**\n * Makes the focus ring visible.\n */\n this.visible = false;\n /**\n * Makes the focus ring animate inwards instead of outwards.\n */\n this.inward = false;\n this.attachableController = new AttachableController(this, this.onControlChange.bind(this));\n }\n get htmlFor() {\n return this.attachableController.htmlFor;\n }\n set htmlFor(htmlFor) {\n this.attachableController.htmlFor = htmlFor;\n }\n get control() {\n return this.attachableController.control;\n }\n set control(control) {\n this.attachableController.control = control;\n }\n attach(control) {\n this.attachableController.attach(control);\n }\n detach() {\n this.attachableController.detach();\n }\n connectedCallback() {\n super.connectedCallback();\n // Needed for VoiceOver, which will create a \"group\" if the element is a\n // sibling to other content.\n this.setAttribute('aria-hidden', 'true');\n }\n /** @private */\n handleEvent(event) {\n if (event[HANDLED_BY_FOCUS_RING]) {\n // This ensures the focus ring does not activate when multiple focus rings\n // are used within a single component.\n return;\n }\n switch (event.type) {\n default:\n return;\n case 'focusin':\n this.visible = this.control?.matches(':focus-visible') ?? false;\n break;\n case 'focusout':\n case 'pointerdown':\n this.visible = false;\n break;\n }\n event[HANDLED_BY_FOCUS_RING] = true;\n }\n onControlChange(prev, next) {\n if (isServer)\n return;\n for (const event of EVENTS) {\n prev?.removeEventListener(event, this);\n next?.addEventListener(event, this);\n }\n }\n update(changed) {\n if (changed.has('visible')) {\n // This logic can be removed once the `:has` selector has been introduced\n // to Firefox. This is necessary to allow correct submenu styles.\n this.dispatchEvent(new Event('visibility-changed'));\n }\n super.update(changed);\n }\n}\n__decorate([\n property({ type: Boolean, reflect: true })\n], FocusRing.prototype, \"visible\", void 0);\n__decorate([\n property({ type: Boolean, reflect: true })\n], FocusRing.prototype, \"inward\", void 0);\nconst HANDLED_BY_FOCUS_RING = Symbol('handledByFocusRing');\n//# sourceMappingURL=focus-ring.js.map","/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./focus/internal/focus-ring-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}\n`;\n//# sourceMappingURL=focus-ring-styles.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { customElement } from 'lit/decorators.js';\nimport { FocusRing } from './internal/focus-ring.js';\nimport { styles } from './internal/focus-ring-styles.js';\n/**\n * TODO(b/267336424): add docs\n *\n * @final\n * @suppress {visibility}\n */\nexport let MdFocusRing = class MdFocusRing extends FocusRing {\n};\nMdFocusRing.styles = [styles];\nMdFocusRing = __decorate([\n customElement('md-focus-ring')\n], MdFocusRing);\n//# sourceMappingURL=md-focus-ring.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Easing functions to use for web animations.\n *\n * **NOTE:** `EASING.EMPHASIZED` is approximated with unknown accuracy.\n *\n * TODO(b/241113345): replace with tokens\n */\nexport const EASING = {\n STANDARD: 'cubic-bezier(0.2, 0, 0, 1)',\n STANDARD_ACCELERATE: 'cubic-bezier(.3,0,1,1)',\n STANDARD_DECELERATE: 'cubic-bezier(0,0,0,1)',\n EMPHASIZED: 'cubic-bezier(.3,0,0,1)',\n EMPHASIZED_ACCELERATE: 'cubic-bezier(.3,0,.8,.15)',\n EMPHASIZED_DECELERATE: 'cubic-bezier(.05,.7,.1,1)',\n};\n/**\n * Creates an `AnimationSignal` that can be used to cancel a previous task.\n *\n * @example\n * class MyClass {\n * private labelAnimationSignal = createAnimationSignal();\n *\n * private async animateLabel() {\n * // Start of the task. Previous tasks will be canceled.\n * const signal = this.labelAnimationSignal.start();\n *\n * // Do async work...\n * if (signal.aborted) {\n * // Use AbortSignal to check if a request was made to abort after some\n * // asynchronous work.\n * return;\n * }\n *\n * const animation = this.animate(...);\n * // Add event listeners to be notified when the task should be canceled.\n * signal.addEventListener('abort', () => {\n * animation.cancel();\n * });\n *\n * animation.addEventListener('finish', () => {\n * // Tell the signal that the current task is finished.\n * this.labelAnimationSignal.finish();\n * });\n * }\n * }\n *\n * @return An `AnimationSignal`.\n */\nexport function createAnimationSignal() {\n // The current animation's AbortController\n let animationAbortController = null;\n return {\n start() {\n // Tell the previous animation to cancel.\n animationAbortController?.abort();\n // Set up a new AbortController for the current animation.\n animationAbortController = new AbortController();\n // Provide the AbortSignal so that the caller can check aborted status\n // and add listeners.\n return animationAbortController.signal;\n },\n finish() {\n animationAbortController = null;\n },\n };\n}\n/**\n * Returns a function which can be used to throttle function calls\n * mapped to a key via a given function that should produce a promise that\n * determines the throttle amount (defaults to requestAnimationFrame).\n */\nexport function createThrottle() {\n const stack = new Set();\n return async (key = '', cb, timeout = async () => {\n await new Promise(requestAnimationFrame);\n }) => {\n if (!stack.has(key)) {\n stack.add(key);\n await timeout();\n if (stack.has(key)) {\n stack.delete(key);\n cb();\n }\n }\n };\n}\n/**\n * Parses an number in milliseconds from a css time value\n */\nexport function msFromTimeCSSValue(value) {\n const match = value.trim().match(/([\\d.]+)(\\s*s$)?/);\n const time = match?.[1];\n const seconds = match?.[2];\n return Number(time ?? 0) * (seconds ? 1000 : 1);\n}\n//# sourceMappingURL=animation.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { html, isServer, LitElement } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { AttachableController, } from '../../internal/controller/attachable-controller.js';\nimport { EASING } from '../../internal/motion/animation.js';\nconst PRESS_GROW_MS = 450;\nconst MINIMUM_PRESS_MS = 225;\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst PADDING = 10;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\nconst PRESS_PSEUDO = '::after';\nconst ANIMATION_FILL = 'forwards';\n/**\n * Interaction states for the ripple.\n *\n * On Touch:\n * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nvar State;\n(function (State) {\n /**\n * Initial state of the control, no touch in progress.\n *\n * Transitions:\n * - on touch down: transition to `TOUCH_DELAY`.\n * - on mouse down: transition to `WAITING_FOR_CLICK`.\n */\n State[State[\"INACTIVE\"] = 0] = \"INACTIVE\";\n /**\n * Touch down has been received, waiting to determine if it's a swipe or\n * scroll.\n *\n * Transitions:\n * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.\n * - on cancel: transition to `INACTIVE`.\n * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.\n */\n State[State[\"TOUCH_DELAY\"] = 1] = \"TOUCH_DELAY\";\n /**\n * A touch has been deemed to be a press\n *\n * Transitions:\n * - on up: transition to `WAITING_FOR_CLICK`.\n */\n State[State[\"HOLDING\"] = 2] = \"HOLDING\";\n /**\n * The user touch has finished, transition into rest state.\n *\n * Transitions:\n * - on click end press; transition to `INACTIVE`.\n */\n State[State[\"WAITING_FOR_CLICK\"] = 3] = \"WAITING_FOR_CLICK\";\n})(State || (State = {}));\n/**\n * Events that the ripple listens to.\n */\nconst EVENTS = [\n 'click',\n 'contextmenu',\n 'pointercancel',\n 'pointerdown',\n 'pointerenter',\n 'pointerleave',\n 'pointerup',\n];\n/**\n * Delay reacting to touch so that we do not show the ripple for a swipe or\n * scroll interaction.\n */\nconst TOUCH_DELAY_MS = 150;\n/**\n * Used to detect if HCM is active. Events do not process during HCM when the\n * ripple is not displayed.\n */\nconst FORCED_COLORS = isServer\n ? null\n : window.matchMedia('(forced-colors: active)');\n/**\n * A ripple component.\n */\nexport class Ripple extends LitElement {\n constructor() {\n super(...arguments);\n /**\n * Disables the ripple.\n */\n this.disabled = false;\n this.hovered = false;\n this.pressed = false;\n this.rippleSize = '';\n this.rippleScale = '';\n this.initialSize = 0;\n this.state = State.INACTIVE;\n this.checkBoundsAfterContextMenu = false;\n this.attachableController = new AttachableController(this, this.onControlChange.bind(this));\n }\n get htmlFor() {\n return this.attachableController.htmlFor;\n }\n set htmlFor(htmlFor) {\n this.attachableController.htmlFor = htmlFor;\n }\n get control() {\n return this.attachableController.control;\n }\n set control(control) {\n this.attachableController.control = control;\n }\n attach(control) {\n this.attachableController.attach(control);\n }\n detach() {\n this.attachableController.detach();\n }\n connectedCallback() {\n super.connectedCallback();\n // Needed for VoiceOver, which will create a \"group\" if the element is a\n // sibling to other content.\n this.setAttribute('aria-hidden', 'true');\n }\n render() {\n const classes = {\n 'hovered': this.hovered,\n 'pressed': this.pressed,\n };\n return html `<div class=\"surface ${classMap(classes)}\"></div>`;\n }\n update(changedProps) {\n if (changedProps.has('disabled') && this.disabled) {\n this.hovered = false;\n this.pressed = false;\n }\n super.update(changedProps);\n }\n /**\n * TODO(b/269799771): make private\n * @private only public for slider\n */\n handlePointerenter(event) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n this.hovered = true;\n }\n /**\n * TODO(b/269799771): make private\n * @private only public for slider\n */\n handlePointerleave(event) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n this.hovered = false;\n // release a held mouse or pen press that moves outside the element\n if (this.state !== State.INACTIVE) {\n this.endPressAnimation();\n }\n }\n handlePointerup(event) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n if (this.state === State.HOLDING) {\n this.state = State.WAITING_FOR_CLICK;\n return;\n }\n if (this.state === State.TOUCH_DELAY) {\n this.state = State.WAITING_FOR_CLICK;\n this.startPressAnimation(this.rippleStartEvent);\n return;\n }\n }\n async handlePointerdown(event) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n this.rippleStartEvent = event;\n if (!this.isTouch(event)) {\n this.state = State.WAITING_FOR_CLICK;\n this.startPressAnimation(event);\n return;\n }\n // after a longpress contextmenu event, an extra `pointerdown` can be\n // dispatched to the pressed element. Check that the down is within\n // bounds of the element in this case.\n if (this.checkBoundsAfterContextMenu && !this.inBounds(event)) {\n return;\n }\n this.checkBoundsAfterContextMenu = false;\n // Wait for a hold after touch delay\n this.state = State.TOUCH_DELAY;\n await new Promise((resolve) => {\n setTimeout(resolve, TOUCH_DELAY_MS);\n });\n if (this.state !== State.TOUCH_DELAY) {\n return;\n }\n this.state = State.HOLDING;\n this.startPressAnimation(event);\n }\n handleClick() {\n // Click is a MouseEvent in Firefox and Safari, so we cannot use\n // `shouldReactToEvent`\n if (this.disabled) {\n return;\n }\n if (this.state === State.WAITING_FOR_CLICK) {\n this.endPressAnimation();\n return;\n }\n if (this.state === State.INACTIVE) {\n // keyboard synthesized click event\n this.startPressAnimation();\n this.endPressAnimation();\n }\n }\n handlePointercancel(event) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n this.endPressAnimation();\n }\n handleContextmenu() {\n if (this.disabled) {\n return;\n }\n this.checkBoundsAfterContextMenu = true;\n this.endPressAnimation();\n }\n determineRippleSize() {\n const { height, width } = this.getBoundingClientRect();\n const maxDim = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n const maxRadius = hypotenuse + PADDING;\n this.initialSize = initialSize;\n this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n this.rippleSize = `${initialSize}px`;\n }\n getNormalizedPointerEventCoords(pointerEvent) {\n const { scrollX, scrollY } = window;\n const { left, top } = this.getBoundingClientRect();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const { pageX, pageY } = pointerEvent;\n return { x: pageX - documentX, y: pageY - documentY };\n }\n getTranslationCoordinates(positionEvent) {\n const { height, width } = this.getBoundingClientRect();\n // end in the center\n const endPoint = {\n x: (width - this.initialSize) / 2,\n y: (height - this.initialSize) / 2,\n };\n let startPoint;\n if (positionEvent instanceof PointerEvent) {\n startPoint = this.getNormalizedPointerEventCoords(positionEvent);\n }\n else {\n startPoint = {\n x: width / 2,\n y: height / 2,\n };\n }\n // center around start point\n startPoint = {\n x: startPoint.x - this.initialSize / 2,\n y: startPoint.y - this.initialSize / 2,\n };\n return { startPoint, endPoint };\n }\n startPressAnimation(positionEvent) {\n if (!this.mdRoot) {\n return;\n }\n this.pressed = true;\n this.growAnimation?.cancel();\n this.determineRippleSize();\n const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n this.growAnimation = this.mdRoot.animate({\n top: [0, 0],\n left: [0, 0],\n height: [this.rippleSize, this.rippleSize],\n width: [this.rippleSize, this.rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${this.rippleScale})`,\n ],\n }, {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: EASING.STANDARD,\n fill: ANIMATION_FILL,\n });\n }\n async endPressAnimation() {\n this.rippleStartEvent = undefined;\n this.state = State.INACTIVE;\n const animation = this.growAnimation;\n let pressAnimationPlayState = Infinity;\n if (typeof animation?.currentTime === 'number') {\n pressAnimationPlayState = animation.currentTime;\n }\n else if (animation?.currentTime) {\n pressAnimationPlayState = animation.currentTime.to('ms').value;\n }\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false;\n return;\n }\n await new Promise((resolve) => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);\n });\n if (this.growAnimation !== animation) {\n // A new press animation was started. The old animation was canceled and\n // should not finish the pressed state.\n return;\n }\n this.pressed = false;\n }\n /**\n * Returns `true` if\n * - the ripple element is enabled\n * - the pointer is primary for the input type\n * - the pointer is the pointer that started the interaction, or will start\n * the interaction\n * - the pointer is a touch, or the pointer state has the primary button\n * held, or the pointer is hovering\n */\n shouldReactToEvent(event) {\n if (this.disabled || !event.isPrimary) {\n return false;\n }\n if (this.rippleStartEvent &&\n this.rippleStartEvent.pointerId !== event.pointerId) {\n return false;\n }\n if (event.type === 'pointerenter' || event.type === 'pointerleave') {\n return !this.isTouch(event);\n }\n const isPrimaryButton = event.buttons === 1;\n return this.isTouch(event) || isPrimaryButton;\n }\n /**\n * Check if the event is within the bounds of the element.\n *\n * This is only needed for the \"stuck\" contextmenu longpress on Chrome.\n */\n inBounds({ x, y }) {\n const { top, left, bottom, right } = this.getBoundingClientRect();\n return x >= left && x <= right && y >= top && y <= bottom;\n }\n isTouch({ pointerType }) {\n return pointerType === 'touch';\n }\n /** @private */\n async handleEvent(event) {\n if (FORCED_COLORS?.matches) {\n // Skip event logic since the ripple is `display: none`.\n return;\n }\n switch (event.type) {\n case 'click':\n this.handleClick();\n break;\n case 'contextmenu':\n this.handleContextmenu();\n break;\n case 'pointercancel':\n this.handlePointercancel(event);\n break;\n case 'pointerdown':\n await this.handlePointerdown(event);\n break;\n case 'pointerenter':\n this.handlePointerenter(event);\n break;\n case 'pointerleave':\n this.handlePointerleave(event);\n break;\n case 'pointerup':\n this.handlePointerup(event);\n break;\n default:\n break;\n }\n }\n onControlChange(prev, next) {\n if (isServer)\n return;\n for (const event of EVENTS) {\n prev?.removeEventListener(event, this);\n next?.addEventListener(event, this);\n }\n }\n}\n__decorate([\n property({ type: Boolean, reflect: true })\n], Ripple.prototype, \"disabled\", void 0);\n__decorate([\n state()\n], Ripple.prototype, \"hovered\", void 0);\n__decorate([\n state()\n], Ripple.prototype, \"pressed\", void 0);\n__decorate([\n query('.surface')\n], Ripple.prototype, \"mdRoot\", void 0);\n//# sourceMappingURL=ripple.js.map","/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./ripple/internal/ripple-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:\"\";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}\n`;\n//# sourceMappingURL=ripple-styles.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { customElement } from 'lit/decorators.js';\nimport { Ripple } from './internal/ripple.js';\nimport { styles } from './internal/ripple-styles.js';\n/**\n * @summary Ripples, also known as state layers, are visual indicators used to\n * communicate the status of a component or interactive element.\n *\n * @description A state layer is a semi-transparent covering on an element that\n * indicates its state. State layers provide a systematic approach to\n * visualizing states by using opacity. A layer can be applied to an entire\n * element or in a circular shape and only one state layer can be applied at a\n * given time.\n *\n * @final\n * @suppress {visibility}\n */\nexport let MdRipple = class MdRipple extends Ripple {\n};\nMdRipple.styles = [styles];\nMdRipple = __decorate([\n customElement('md-ripple')\n], MdRipple);\n//# sourceMappingURL=ripple.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Accessibility Object Model reflective aria properties.\n */\nexport const ARIA_PROPERTIES = [\n 'role',\n 'ariaAtomic',\n 'ariaAutoComplete',\n 'ariaBusy',\n 'ariaChecked',\n 'ariaColCount',\n 'ariaColIndex',\n 'ariaColSpan',\n 'ariaCurrent',\n 'ariaDisabled',\n 'ariaExpanded',\n 'ariaHasPopup',\n 'ariaHidden',\n 'ariaInvalid',\n 'ariaKeyShortcuts',\n 'ariaLabel',\n 'ariaLevel',\n 'ariaLive',\n 'ariaModal',\n 'ariaMultiLine',\n 'ariaMultiSelectable',\n 'ariaOrientation',\n 'ariaPlaceholder',\n 'ariaPosInSet',\n 'ariaPressed',\n 'ariaReadOnly',\n 'ariaRequired',\n 'ariaRoleDescription',\n 'ariaRowCount',\n 'ariaRowIndex',\n 'ariaRowSpan',\n 'ariaSelected',\n 'ariaSetSize',\n 'ariaSort',\n 'ariaValueMax',\n 'ariaValueMin',\n 'ariaValueNow',\n 'ariaValueText',\n];\n/**\n * Accessibility Object Model aria attributes.\n */\nexport const ARIA_ATTRIBUTES = ARIA_PROPERTIES.map(ariaPropertyToAttribute);\n/**\n * Checks if an attribute is one of the AOM aria attributes.\n *\n * @example\n * isAriaAttribute('aria-label'); // true\n *\n * @param attribute The attribute to check.\n * @return True if the attribute is an aria attribute, or false if not.\n */\nexport function isAriaAttribute(attribute) {\n return ARIA_ATTRIBUTES.includes(attribute);\n}\n/**\n * Converts an AOM aria property into its corresponding attribute.\n *\n * @example\n * ariaPropertyToAttribute('ariaLabel'); // 'aria-label'\n *\n * @param property The aria property.\n * @return The aria attribute.\n */\nexport function ariaPropertyToAttribute(property) {\n return property\n .replace('aria', 'aria-')\n // IDREF attributes also include an \"Element\" or \"Elements\" suffix\n .replace(/Elements?/g, '')\n .toLowerCase();\n}\n//# sourceMappingURL=aria.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { isServer } from 'lit';\nimport { ARIA_PROPERTIES, ariaPropertyToAttribute, isAriaAttribute, } from './aria.js';\n// Private symbols\nconst privateIgnoreAttributeChangesFor = Symbol('privateIgnoreAttributeChangesFor');\n/**\n * Mixes in aria delegation for elements that delegate focus and aria to inner\n * shadow root elements.\n *\n * This mixin fixes invalid aria announcements with shadow roots, caused by\n * duplicate aria attributes on both the host and the inner shadow root element.\n *\n * Note: this mixin **does not yet support** ID reference attributes, such as\n * `aria-labelledby` or `aria-controls`.\n *\n * @example\n * ```ts\n * class MyButton extends mixinDelegatesAria(LitElement) {\n * static shadowRootOptions = {mode: 'open', delegatesFocus: true};\n *\n * render() {\n * return html`\n * <button aria-label=${this.ariaLabel || nothing}>\n * <slot></slot>\n * </button>\n * `;\n * }\n * }\n * ```\n * ```html\n * <my-button aria-label=\"Plus one\">+1</my-button>\n * ```\n *\n * Use `ARIAMixinStrict` for lit analyzer strict types, such as the \"role\"\n * attribute.\n *\n * @example\n * ```ts\n * return html`\n * <button role=${(this as ARIAMixinStrict).role || nothing}>\n * <slot></slot>\n * </button>\n * `;\n * ```\n *\n * In the future, updates to the Accessibility Object Model (AOM) will provide\n * built-in aria delegation features that will replace this mixin.\n *\n * @param base The class to mix functionality into.\n * @return The provided class with aria delegation mixed in.\n */\nexport function mixinDelegatesAria(base) {\n var _a;\n if (isServer) {\n // Don't shift attributes when running with lit-ssr. The SSR renderer\n // implements a subset of DOM APIs, including the methods this mixin\n // overrides, causing errors. We don't need to shift on the server anyway\n // since elements will shift attributes immediately once they hydrate.\n return base;\n }\n class WithDelegatesAriaElement extends base {\n constructor() {\n super(...arguments);\n this[_a] = new Set();\n }\n attributeChangedCallback(name, oldValue, newValue) {\n if (!isAriaAttribute(name)) {\n super.attributeChangedCallback(name, oldValue, newValue);\n return;\n }\n if (this[privateIgnoreAttributeChangesFor].has(name)) {\n return;\n }\n // Don't trigger another `attributeChangedCallback` once we remove the\n // aria attribute from the host. We check the explicit name of the\n // attribute to ignore since `attributeChangedCallback` can be called\n // multiple times out of an expected order when hydrating an element with\n // multiple attributes.\n this[privateIgnoreAttributeChangesFor].add(name);\n this.removeAttribute(name);\n this[privateIgnoreAttributeChangesFor].delete(name);\n const dataProperty = ariaAttributeToDataProperty(name);\n if (newValue === null) {\n delete this.dataset[dataProperty];\n }\n else {\n this.dataset[dataProperty] = newValue;\n }\n this.requestUpdate(ariaAttributeToDataProperty(name), oldValue);\n }\n getAttribute(name) {\n if (isAriaAttribute(name)) {\n return super.getAttribute(ariaAttributeToDataAttribute(name));\n }\n return super.getAttribute(name);\n }\n removeAttribute(name) {\n super.removeAttribute(name);\n if (isAriaAttribute(name)) {\n super.removeAttribute(ariaAttributeToDataAttribute(name));\n // Since `aria-*` attributes are already removed`, we need to request\n // an update because `attributeChangedCallback` will not be called.\n this.requestUpdate();\n }\n }\n }\n _a = privateIgnoreAttributeChangesFor;\n setupDelegatesAriaProperties(WithDelegatesAriaElement);\n return WithDelegatesAriaElement;\n}\n/**\n * Overrides the constructor's native `ARIAMixin` properties to ensure that\n * aria properties reflect the values that were shifted to a data attribute.\n *\n * @param ctor The `ReactiveElement` constructor to patch.\n */\nfunction setupDelegatesAriaProperties(ctor) {\n for (const ariaProperty of ARIA_PROPERTIES) {\n // The casing between ariaProperty and the dataProperty may be different.\n // ex: aria-haspopup -> ariaHasPopup\n const ariaAttribute = ariaPropertyToAttribute(ariaProperty);\n // ex: aria-haspopup -> data-aria-haspopup\n const dataAttribute = ariaAttributeToDataAttribute(ariaAttribute);\n // ex: aria-haspopup -> dataset.ariaHaspopup\n const dataProperty = ariaAttributeToDataProperty(ariaAttribute);\n // Call `ReactiveElement.createProperty()` so that the `aria-*` and `data-*`\n // attributes are added to the `static observedAttributes` array. This\n // triggers `attributeChangedCallback` for the delegates aria mixin to\n // handle.\n ctor.createProperty(ariaProperty, {\n attribute: ariaAttribute,\n noAccessor: true,\n });\n ctor.createProperty(Symbol(dataAttribute), {\n attribute: dataAttribute,\n noAccessor: true,\n });\n // Re-define the `ARIAMixin` properties to handle data attribute shifting.\n // It is safe to use `Object.defineProperty` here because the properties\n // are native and not renamed.\n // tslint:disable-next-line:ban-unsafe-reflection\n Object.defineProperty(ctor.prototype, ariaProperty, {\n configurable: true,\n enumerable: true,\n get() {\n return this.dataset[dataProperty] ?? null;\n },\n set(value) {\n const prevValue = this.dataset[dataProperty] ?? null;\n if (value === prevValue) {\n return;\n }\n if (value === null) {\n delete this.dataset[dataProperty];\n }\n else {\n this.dataset[dataProperty] = value;\n }\n this.requestUpdate(ariaProperty, prevValue);\n },\n });\n }\n}\nfunction ariaAttributeToDataAttribute(ariaAttribute) {\n // aria-haspopup -> data-aria-haspopup\n return `data-${ariaAttribute}`;\n}\nfunction ariaAttributeToDataProperty(ariaAttribute) {\n // aria-haspopup -> dataset.ariaHaspopup\n return ariaAttribute.replace(/-\\w/, (dashLetter) => dashLetter[1].toUpperCase());\n}\n//# sourceMappingURL=delegate.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Re-dispatches an event from the provided element.\n *\n * This function is useful for forwarding non-composed events, such as `change`\n * events.\n *\n * @example\n * class MyInput extends LitElement {\n * render() {\n * return html`<input @change=${this.redispatchEvent}>`;\n * }\n *\n * protected redispatchEvent(event: Event) {\n * redispatchEvent(this, event);\n * }\n * }\n *\n * @param element The element to dispatch the event from.\n * @param event The event to re-dispatch.\n * @return Whether or not the event was dispatched (if cancelable).\n */\nexport function redispatchEvent(element, event) {\n // For bubbling events in SSR light DOM (or composed), stop their propagation\n // and dispatch the copy.\n if (event.bubbles && (!element.shadowRoot || event.composed)) {\n event.stopPropagation();\n }\n const copy = Reflect.construct(event.constructor, [event.type, event]);\n const dispatched = element.dispatchEvent(copy);\n if (!dispatched) {\n event.preventDefault();\n }\n return dispatched;\n}\n//# sourceMappingURL=redispatch-event.js.map"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","ATTACHABLE_CONTROLLER","Symbol","FOR_ATTRIBUTE_OBSERVER","isServer","MutationObserver","records","record","hostConnected","AttachableController","htmlFor","this","host","getAttribute","removeAttribute","setAttribute","hasAttribute","isConnected","getRootNode","querySelector","currentControl","parentElement","control","attach","detach","onControlChange","addController","observe","attributeFilter","setCurrentControl","EVENTS","FocusRing","LitElement","constructor","super","visible","inward","attachableController","bind","connectedCallback","event","HANDLED_BY_FOCUS_RING","type","matches","prev","next","removeEventListener","addEventListener","changed","has","dispatchEvent","Event","update","property","Boolean","reflect","prototype","styles","css","MdFocusRing","customElement","EASING","State","FORCED_COLORS","window","matchMedia","Ripple","disabled","hovered","pressed","rippleSize","rippleScale","initialSize","state","INACTIVE","checkBoundsAfterContextMenu","classes","html","classMap","changedProps","shouldReactToEvent","endPressAnimation","HOLDING","TOUCH_DELAY","WAITING_FOR_CLICK","startPressAnimation","rippleStartEvent","handlePointerdown","isTouch","inBounds","Promise","resolve","setTimeout","height","width","getBoundingClientRect","maxDim","Math","max","softEdgeSize","floor","maxRadius","sqrt","pointerEvent","scrollX","scrollY","left","top","documentX","documentY","pageX","pageY","x","y","positionEvent","endPoint","startPoint","PointerEvent","getNormalizedPointerEventCoords","mdRoot","growAnimation","cancel","determineRippleSize","getTranslationCoordinates","translateStart","translateEnd","animate","transform","pseudoElement","duration","easing","fill","animation","pressAnimationPlayState","Infinity","currentTime","to","value","isPrimary","pointerId","isPrimaryButton","buttons","bottom","right","pointerType","handleClick","handleContextmenu","handlePointercancel","handlePointerenter","handlePointerleave","handlePointerup","query","MdRipple","ARIA_PROPERTIES","ARIA_ATTRIBUTES","map","ariaPropertyToAttribute","isAriaAttribute","attribute","includes","replace","toLowerCase","privateIgnoreAttributeChangesFor","ariaAttributeToDataAttribute","ariaAttribute","ariaAttributeToDataProperty","dashLetter","toUpperCase","base","_a","WithDelegatesAriaElement","Set","name","oldValue","newValue","attributeChangedCallback","add","delete","dataProperty","dataset","requestUpdate","ctor","ariaProperty","dataAttribute","createProperty","noAccessor","configurable","enumerable","prevValue","element","bubbles","shadowRoot","composed","stopPropagation","copy","construct","dispatched","preventDefault"],"mappings":"0GAsDO,EAAA,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,EAAAA,CAClD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAASE,IAAS,KAAOA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAWQ,OAAAA,SAAY,UAAmBA,OAAAA,QAAQC,UAAa,WAAYJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,OACpH,SAASU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,CAAAA,KAAIL,GAAKH,EAAI,EAAID,EAAEI,CAAAA,EAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,CAAKJ,EAAAA,EAAEH,EAAQC,CAAAA,IAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,CAAAA,EAAIA,CAC9D,CCjDA,MAAMO,EAAwBC,OAAO,sBACrC,EAAA,IAAIC,EACCC,aAMDD,EAAyB,IAAIE,iBAAkBC,GAAAA,OAC3C,UAAWC,KAAUD,GAGjBC,EAAAA,EAAOpB,OA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EAAA,CAAA,CAII,OAFAX,EAAKP,EAUT,SAAsCmB,EAAAA,CAClC,UAAWC,KAAgB7B,EAAiB,CAGxC,MAAMW,EAAgBR,EAAwB0B,CAExCC,EAAAA,EAAgBpB,EAA6BC,CAAAA,EAE7Cc,EAAeb,EAA4BD,CAAAA,EAKjDiB,EAAKG,eAAeF,EAAc,CAC9BxB,UAAWM,EACXqB,WAAAA,KAEJJ,EAAKG,eAAetL,OAAOqL,CAAgB,EAAA,CACvCzB,UAAWyB,EACXE,WAAAA,EAMJ9L,CAAAA,EAAAA,OAAOK,eAAeqL,EAAK7H,UAAW8H,EAAc,CAChDI,gBACAC,WAAAA,GACA,MACI,OAAOhL,KAAKwK,QAAQD,CAAAA,GAAiB,IACxC,EACD,IAAIzC,EAAAA,CACA,MAAMmD,EAAYjL,KAAKwK,QAAQD,CAAAA,GAAiB,KAC5CzC,IAAUmD,IAGVnD,IAAU,KAAVA,OACO9H,KAAKwK,QAAQD,CAAAA,EAGpBvK,KAAKwK,QAAQD,CAAAA,EAAgBzC,EAEjC9H,KAAKyK,cAAcE,EAAcM,CAAAA,EACpC,GAEb,CACA,EAvDiClB,CAAAA,EACtBA,CACX,0BCvFO,SAAyBmB,EAASrJ,EAGjCA,CAAAA,CAAAA,EAAMsJ,SAAaD,EAAQE,YAAAA,CAAcvJ,EAAMwJ,UAC/CxJ,EAAMyJ,gBAEV,EAAA,MAAMC,EAAOrM,QAAQsM,UAAU3J,EAAMP,YAAa,CAACO,EAAME,KAAMF,CACzD4J,CAAAA,EAAAA,EAAaP,EAAQ3I,cAAcgJ,CAAAA,EAIzC,OAHKE,GACD5J,EAAM6J,iBAEHD,CACX","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11]}
|
package/dist/table-CUgn9BYP.cjs
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";const y=require("./litElement.mixin-Ct-snNwC.cjs"),i=require("lit"),s=require("lit/decorators.js"),m=require("lit/directives/repeat.js");var p=Object.defineProperty,d=Object.getOwnPropertyDescriptor,h=(t,e,a,r)=>{for(var n,c=r>1?void 0:r?d(e,a):e,o=t.length-1;o>=0;o--)(n=t[o])&&(c=(r?n(e,a,c):n(c))||c);return r&&c&&p(e,a,c),c};exports.SchmancyTableRow=class extends y.$LitElement(i.css`
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
z-index: -1;
|
|
5
|
-
}
|
|
6
|
-
`){constructor(){super(...arguments),this.columns=[],this.cols="1fr"}render(){return i.html`
|
|
7
|
-
<schmancy-list-item
|
|
8
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("row-click",{detail:this.item,bubbles:!0,composed:!0}))}}
|
|
9
|
-
class="w-full"
|
|
10
|
-
>
|
|
11
|
-
<schmancy-grid .cols=${this.cols} align="center" gap="md">
|
|
12
|
-
${this.columns.map(t=>{var e;return i.html`
|
|
13
|
-
<div class="overflow-hidden text-ellipsis">
|
|
14
|
-
<schmancy-typography
|
|
15
|
-
align="${t.align||"left"}"
|
|
16
|
-
maxLines="2"
|
|
17
|
-
weight="${t.weight||"normal"}"
|
|
18
|
-
>
|
|
19
|
-
${t.render?t.render(this.item):t.key?(e=this.item)==null?void 0:e[t.key]:""}
|
|
20
|
-
</schmancy-typography>
|
|
21
|
-
</div>
|
|
22
|
-
`})}
|
|
23
|
-
<sch-flex
|
|
24
|
-
class="min-w-fit block"
|
|
25
|
-
flow="row-dense"
|
|
26
|
-
.hidden=${Array.isArray(this.actions)&&this.actions.length===0}
|
|
27
|
-
>
|
|
28
|
-
${m.repeat(this.actions??[],({name:t})=>t,({name:t,action:e})=>i.html`
|
|
29
|
-
<schmancy-icon-button
|
|
30
|
-
@click=${a=>{a.stopPropagation(),e(this.item)}}
|
|
31
|
-
>
|
|
32
|
-
${t}
|
|
33
|
-
</schmancy-icon-button>
|
|
34
|
-
`)}
|
|
35
|
-
</sch-flex>
|
|
36
|
-
<!-- <schmancy-menu .hidden=${Array.isArray(this.actions)&&this.actions.length===0}>
|
|
37
|
-
${m.repeat(this.actions??[],({name:t})=>t,({name:t,action:e})=>i.html`
|
|
38
|
-
<schmancy-menu-item
|
|
39
|
-
class="z-[10000]"
|
|
40
|
-
@click=${a=>{a.stopPropagation(),e(this.item)}}
|
|
41
|
-
>
|
|
42
|
-
${t}
|
|
43
|
-
</schmancy-menu-item>
|
|
44
|
-
`)}
|
|
45
|
-
</schmancy-menu> -->
|
|
46
|
-
</schmancy-grid>
|
|
47
|
-
</schmancy-list-item>
|
|
48
|
-
`}},h([s.property({type:Array,attribute:!1})],exports.SchmancyTableRow.prototype,"columns",2),h([s.property({type:Object,attribute:!1})],exports.SchmancyTableRow.prototype,"item",2),h([s.property({type:String})],exports.SchmancyTableRow.prototype,"cols",2),h([s.property({type:Array})],exports.SchmancyTableRow.prototype,"actions",2),exports.SchmancyTableRow=h([s.customElement("schmancy-table-row")],exports.SchmancyTableRow);var u=Object.defineProperty,b=Object.getOwnPropertyDescriptor,l=(t,e,a,r)=>{for(var n,c=r>1?void 0:r?b(e,a):e,o=t.length-1;o>=0;o--)(n=t[o])&&(c=(r?n(e,a,c):n(c))||c);return r&&c&&u(e,a,c),c};exports.SchmancyDataTable=class extends y.$LitElement(){constructor(){super(...arguments),this.columns=[],this.data=[],this.keyField="id",this.cols="1fr",this.actions=[]}handleRowEvent(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e.detail,bubbles:!0,composed:!0}))}render(){return i.html`
|
|
49
|
-
<schmancy-surface-v2 fill="all" type="container" rounded="all" elevation="2">
|
|
50
|
-
<schmancy-grid class="h-full w-full" cols="1fr" rows="auto 1fr">
|
|
51
|
-
<schmancy-surface-v2 rounded="top" elevation="1" type="containerHighest" class="sticky top-0 z-10">
|
|
52
|
-
<schmancy-grid align="center" class="px-4 py-3" .cols=${this.cols} gap="md" rows="1fr">
|
|
53
|
-
${this.columns.map(t=>i.html`
|
|
54
|
-
<schmancy-typography align=${t.align??"left"} weight=${t.weight??"bold"}>
|
|
55
|
-
${t.name}
|
|
56
|
-
</schmancy-typography>
|
|
57
|
-
`)}
|
|
58
|
-
</schmancy-grid>
|
|
59
|
-
</schmancy-surface-v2>
|
|
60
|
-
|
|
61
|
-
<lit-virtualizer
|
|
62
|
-
scroller
|
|
63
|
-
class="w-full h-full relative overflow-auto"
|
|
64
|
-
.items=${this.data}
|
|
65
|
-
.renderItem=${(t,e)=>i.html`
|
|
66
|
-
<schmancy-table-row
|
|
67
|
-
.actions=${this.actions}
|
|
68
|
-
class="w-full border-b-1 border-solid border-outlineVariant"
|
|
69
|
-
.columns=${this.columns}
|
|
70
|
-
.item=${t}
|
|
71
|
-
cols=${this.cols}
|
|
72
|
-
@edit=${a=>{a.detail.item=t,a.detail.index=e,this.handleRowEvent("edit",a)}}
|
|
73
|
-
@delete=${a=>{a.detail.item=t,a.detail.index=e,this.handleRowEvent("delete",a)}}
|
|
74
|
-
></schmancy-table-row>
|
|
75
|
-
`}
|
|
76
|
-
></lit-virtualizer>
|
|
77
|
-
</schmancy-grid>
|
|
78
|
-
</schmancy-surface-v2>
|
|
79
|
-
`}},l([s.property({type:Array,attribute:!1})],exports.SchmancyDataTable.prototype,"columns",2),l([s.property({type:Array,attribute:!1})],exports.SchmancyDataTable.prototype,"data",2),l([s.property({type:String})],exports.SchmancyDataTable.prototype,"keyField",2),l([s.property({type:String})],exports.SchmancyDataTable.prototype,"cols",2),l([s.property({type:Array})],exports.SchmancyDataTable.prototype,"actions",2),exports.SchmancyDataTable=l([s.customElement("schmancy-table-v2")],exports.SchmancyDataTable);
|
|
80
|
-
//# sourceMappingURL=table-CUgn9BYP.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-CUgn9BYP.cjs","sources":["../src/table/row.ts","../src/table/table.ts"],"sourcesContent":["import { $LitElement } from '@mixins/litElement.mixin'\nimport { css, html, TemplateResult } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { TableColumn } from './table' //Import TableColumn interface.\n\n@customElement('schmancy-table-row')\nexport class SchmancyTableRow extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tz-index: -1;\n\t}\n`) {\n\t@property({ type: Array, attribute: false })\n\tcolumns: TableColumn[] = []\n\n\t@property({ type: Object, attribute: false }) //Important to use object for complex properties\n\titem: any\n\n\t@property({ type: String })\n\tcols: string = '1fr'\n\n\t@property({\n\t\ttype: Array,\n\t})\n\tactions: Array<{ name: string; action: (item: any) => void }> | undefined\n\trender(): TemplateResult {\n\t\treturn html`\n\t\t\t<schmancy-list-item\n\t\t\t\t@click=${() => {\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('row-click', {\n\t\t\t\t\t\t\tdetail: this.item,\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tclass=\"w-full\"\n\t\t\t>\n\t\t\t\t<schmancy-grid .cols=${this.cols} align=\"center\" gap=\"md\">\n\t\t\t\t\t${this.columns.map(\n\t\t\t\t\t\tcolumn => html`\n\t\t\t\t\t\t\t<div class=\"overflow-hidden text-ellipsis\">\n\t\t\t\t\t\t\t\t<schmancy-typography\n\t\t\t\t\t\t\t\t\talign=\"${column.align || 'left'}\"\n\t\t\t\t\t\t\t\t\tmaxLines=\"2\"\n\t\t\t\t\t\t\t\t\tweight=\"${column.weight || 'normal'}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${column.render ? column.render(this.item) : column.key ? this.item?.[column.key] : ''}\n\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`,\n\t\t\t\t\t)}\n\t\t\t\t\t<sch-flex\n\t\t\t\t\t\tclass=\"min-w-fit block\"\n\t\t\t\t\t\tflow=\"row-dense\"\n\t\t\t\t\t\t.hidden=${Array.isArray(this.actions) && this.actions.length === 0}\n\t\t\t\t\t>\n\t\t\t\t\t\t${repeat(\n\t\t\t\t\t\t\tthis.actions ?? [],\n\t\t\t\t\t\t\t({ name }) => name,\n\t\t\t\t\t\t\t({ name, action }) => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\taction(this.item)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${name}\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</sch-flex>\n\t\t\t\t\t<!-- <schmancy-menu .hidden=${Array.isArray(this.actions) && this.actions.length === 0}>\n\t\t\t\t\t\t${repeat(\n\t\t\t\t\t\tthis.actions ?? [],\n\t\t\t\t\t\t({ name }) => name,\n\t\t\t\t\t\t({ name, action }) => html`\n\t\t\t\t\t\t\t<schmancy-menu-item\n\t\t\t\t\t\t\t\tclass=\"z-[10000]\"\n\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\taction(this.item)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t${name}\n\t\t\t\t\t\t\t</schmancy-menu-item>\n\t\t\t\t\t\t`,\n\t\t\t\t\t)}\n\t\t\t\t\t</schmancy-menu> -->\n\t\t\t\t</schmancy-grid>\n\t\t\t</schmancy-list-item>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-table-row': SchmancyTableRow\n\t}\n}\n","import { $LitElement } from '@mixins/litElement.mixin'\nimport { html, TemplateResult } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport './row' // Import the schmancy-table-row component\n\n// Define a generic TableColumn interface.\n// The `key` is now a key of T, and the render function accepts T.\nexport interface TableColumn<T extends Record<string, any> = any> {\n\tname: string\n\tkey?: keyof T // Key to access the property on the data object.\n\talign?: 'left' | 'right' | 'center'\n\tweight?: 'normal' | 'bold'\n\trender?: (item: T) => TemplateResult | string | number // Custom render function for complex content\n}\n\n// Define an event detail interface for row events.\nexport interface RowEventDetail<T> {\n\titem: T\n\tindex: number\n}\n\n@customElement('schmancy-table-v2')\nexport class SchmancyDataTable<T extends Record<string, any> = any> extends $LitElement() {\n\t@property({ type: Array, attribute: false })\n\tcolumns: TableColumn<T>[] = []\n\n\t@property({ type: Array, attribute: false })\n\tdata: T[] = []\n\n\t// The keyField is now of type keyof T. You may need to adjust the default if needed.\n\t@property({ type: String })\n\tkeyField: keyof T = 'id' as keyof T\n\n\t@property({ type: String })\n\tcols: string = '1fr'\n\n\t@property({ type: Array }) actions: Array<{ name: string; action: (item: T) => void }> = []\n\n\t// Helper to handle row events.\n\tprivate handleRowEvent(eventName: 'row-click' | 'edit' | 'delete', e: CustomEvent<RowEventDetail<T>>) {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<RowEventDetail<T>>(eventName, {\n\t\t\t\tdetail: e.detail,\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender(): TemplateResult {\n\t\treturn html`\n\t\t\t<schmancy-surface-v2 fill=\"all\" type=\"container\" rounded=\"all\" elevation=\"2\">\n\t\t\t\t<schmancy-grid class=\"h-full w-full\" cols=\"1fr\" rows=\"auto 1fr\">\n\t\t\t\t\t<schmancy-surface-v2 rounded=\"top\" elevation=\"1\" type=\"containerHighest\" class=\"sticky top-0 z-10\">\n\t\t\t\t\t\t<schmancy-grid align=\"center\" class=\"px-4 py-3\" .cols=${this.cols} gap=\"md\" rows=\"1fr\">\n\t\t\t\t\t\t\t${this.columns.map(\n\t\t\t\t\t\t\t\tcolumn => html`\n\t\t\t\t\t\t\t\t\t<schmancy-typography align=${column.align ?? 'left'} weight=${column.weight ?? 'bold'}>\n\t\t\t\t\t\t\t\t\t\t${column.name}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</schmancy-grid>\n\t\t\t\t\t</schmancy-surface-v2>\n\n\t\t\t\t\t<lit-virtualizer\n\t\t\t\t\t\tscroller\n\t\t\t\t\t\tclass=\"w-full h-full relative overflow-auto\"\n\t\t\t\t\t\t.items=${this.data}\n\t\t\t\t\t\t.renderItem=${(item: T, index: number) =>\n\t\t\t\t\t\t\thtml`\n\t\t\t\t\t\t\t\t<schmancy-table-row\n\t\t\t\t\t\t\t\t\t.actions=${this.actions}\n\t\t\t\t\t\t\t\t\tclass=\"w-full border-b-1 border-solid border-outlineVariant\"\n\t\t\t\t\t\t\t\t\t.columns=${this.columns}\n\t\t\t\t\t\t\t\t\t.item=${item}\n\t\t\t\t\t\t\t\t\tcols=${this.cols}\n\t\t\t\t\t\t\t\t\t@edit=${(e: CustomEvent<RowEventDetail<T>>) => {\n\t\t\t\t\t\t\t\t\t\te.detail.item = item\n\t\t\t\t\t\t\t\t\t\te.detail.index = index\n\t\t\t\t\t\t\t\t\t\tthis.handleRowEvent('edit', e)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t@delete=${(e: CustomEvent<RowEventDetail<T>>) => {\n\t\t\t\t\t\t\t\t\t\te.detail.item = item\n\t\t\t\t\t\t\t\t\t\te.detail.index = index\n\t\t\t\t\t\t\t\t\t\tthis.handleRowEvent('delete', e)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t></schmancy-table-row>\n\t\t\t\t\t\t\t` as TemplateResult}\n\t\t\t\t\t></lit-virtualizer>\n\t\t\t\t</schmancy-grid>\n\t\t\t</schmancy-surface-v2>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-table-v2': SchmancyDataTable\n\t}\n}\n"],"names":["SchmancyTableRow","$LitElement","css","super","arguments","this","columns","cols","html","dispatchEvent","CustomEvent","detail","item","bubbles","composed","map","column","align","weight","render","key","Array","isArray","actions","length","repeat","name","action","e","stopPropagation","__decorateClass","property","type","attribute","prototype","Object","String","customElement","SchmancyDataTable","constructor","data","keyField","eventName","index","handleRowEvent"],"mappings":"sVAOaA,QAAAA,iBAAN,cAA+BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA3C,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,SAONC,EAAAA,KAAAC,QAAyB,CAMVD,EAAAA,KAAAE,KAAA,KAAA,CAMf,QACQ,CAAA,OAAAC,EAAAA;AAAAA;AAAAA,aAEI,IAAA,CACHH,KAAAI,cACJ,IAAIC,YAAY,YAAa,CAC5BC,OAAQN,KAAKO,KACbC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA,2BAIsBT,KAAKE,IAAAA;AAAAA,OACzBF,KAAKC,QAAQS,IACJC,GAAAR,OAAAA,OAAAA,EAAAA;AAAAA;AAAAA;AAAAA,kBAGEQ,EAAOC,OAAS,MAAA;AAAA;AAAA,mBAEfD,EAAOE,QAAU,QAAA;AAAA;AAAA,WAEzBF,EAAOG,OAASH,EAAOG,OAAOd,KAAKO,IAAAA,EAAQI,EAAOI,KAAMf,EAAAA,KAAKO,OAALP,YAAAA,EAAYW,EAAOI,KAAO,EAAA;AAAA;AAAA;AAAA;;;;gBAQ7EC,MAAMC,QAAQjB,KAAKkB,OAAoC,GAAxBlB,KAAKkB,QAAQC,SAAW,CAAXA;AAAAA;AAAAA,QAEpDC,EAAAA,OACDpB,KAAKkB,SAAW,CAChB,EAAA,CAAA,CAAGG,KAAWA,CAAAA,IAAAA,EACd,CAAGA,CAAAA,KAAAA,EAAMC,OAAanB,CAAAA,IAAAA,EAAAA;AAAAA;AAAAA,kBAEVoB,GAAAA,CACTA,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AEC,KAAMX,KAdNiB,CAAAA,CAAAA,EAAAA,0BAceJ,UAAA,UAAA,CAdfI,EAAAA,QAANA,kBAAAR,EAAA,CADNO,EAAAA,cAAc,sBACFC"}
|
package/dist/table-k-u5jZrL.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { $ as d } from "./litElement.mixin-CtugwVVz.js";
|
|
2
|
-
import { css as g, html as l } from "lit";
|
|
3
|
-
import { property as c, customElement as u } from "lit/decorators.js";
|
|
4
|
-
import { repeat as p } from "lit/directives/repeat.js";
|
|
5
|
-
var f = Object.defineProperty, b = Object.getOwnPropertyDescriptor, y = (t, e, s, i) => {
|
|
6
|
-
for (var o, a = i > 1 ? void 0 : i ? b(e, s) : e, r = t.length - 1; r >= 0; r--) (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
|
|
7
|
-
return i && a && f(e, s, a), a;
|
|
8
|
-
};
|
|
9
|
-
let h = class extends d(g`
|
|
10
|
-
:host {
|
|
11
|
-
display: block;
|
|
12
|
-
z-index: -1;
|
|
13
|
-
}
|
|
14
|
-
`) {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments), this.columns = [], this.cols = "1fr";
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return l`
|
|
20
|
-
<schmancy-list-item
|
|
21
|
-
@click=${() => {
|
|
22
|
-
this.dispatchEvent(new CustomEvent("row-click", { detail: this.item, bubbles: !0, composed: !0 }));
|
|
23
|
-
}}
|
|
24
|
-
class="w-full"
|
|
25
|
-
>
|
|
26
|
-
<schmancy-grid .cols=${this.cols} align="center" gap="md">
|
|
27
|
-
${this.columns.map((t) => {
|
|
28
|
-
var e;
|
|
29
|
-
return l`
|
|
30
|
-
<div class="overflow-hidden text-ellipsis">
|
|
31
|
-
<schmancy-typography
|
|
32
|
-
align="${t.align || "left"}"
|
|
33
|
-
maxLines="2"
|
|
34
|
-
weight="${t.weight || "normal"}"
|
|
35
|
-
>
|
|
36
|
-
${t.render ? t.render(this.item) : t.key ? (e = this.item) == null ? void 0 : e[t.key] : ""}
|
|
37
|
-
</schmancy-typography>
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
})}
|
|
41
|
-
<sch-flex
|
|
42
|
-
class="min-w-fit block"
|
|
43
|
-
flow="row-dense"
|
|
44
|
-
.hidden=${Array.isArray(this.actions) && this.actions.length === 0}
|
|
45
|
-
>
|
|
46
|
-
${p(this.actions ?? [], ({ name: t }) => t, ({ name: t, action: e }) => l`
|
|
47
|
-
<schmancy-icon-button
|
|
48
|
-
@click=${(s) => {
|
|
49
|
-
s.stopPropagation(), e(this.item);
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
${t}
|
|
53
|
-
</schmancy-icon-button>
|
|
54
|
-
`)}
|
|
55
|
-
</sch-flex>
|
|
56
|
-
<!-- <schmancy-menu .hidden=${Array.isArray(this.actions) && this.actions.length === 0}>
|
|
57
|
-
${p(this.actions ?? [], ({ name: t }) => t, ({ name: t, action: e }) => l`
|
|
58
|
-
<schmancy-menu-item
|
|
59
|
-
class="z-[10000]"
|
|
60
|
-
@click=${(s) => {
|
|
61
|
-
s.stopPropagation(), e(this.item);
|
|
62
|
-
}}
|
|
63
|
-
>
|
|
64
|
-
${t}
|
|
65
|
-
</schmancy-menu-item>
|
|
66
|
-
`)}
|
|
67
|
-
</schmancy-menu> -->
|
|
68
|
-
</schmancy-grid>
|
|
69
|
-
</schmancy-list-item>
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
y([c({ type: Array, attribute: !1 })], h.prototype, "columns", 2), y([c({ type: Object, attribute: !1 })], h.prototype, "item", 2), y([c({ type: String })], h.prototype, "cols", 2), y([c({ type: Array })], h.prototype, "actions", 2), h = y([u("schmancy-table-row")], h);
|
|
74
|
-
var $ = Object.defineProperty, v = Object.getOwnPropertyDescriptor, m = (t, e, s, i) => {
|
|
75
|
-
for (var o, a = i > 1 ? void 0 : i ? v(e, s) : e, r = t.length - 1; r >= 0; r--) (o = t[r]) && (a = (i ? o(e, s, a) : o(a)) || a);
|
|
76
|
-
return i && a && $(e, s, a), a;
|
|
77
|
-
};
|
|
78
|
-
let n = class extends d() {
|
|
79
|
-
constructor() {
|
|
80
|
-
super(...arguments), this.columns = [], this.data = [], this.keyField = "id", this.cols = "1fr", this.actions = [];
|
|
81
|
-
}
|
|
82
|
-
handleRowEvent(t, e) {
|
|
83
|
-
this.dispatchEvent(new CustomEvent(t, { detail: e.detail, bubbles: !0, composed: !0 }));
|
|
84
|
-
}
|
|
85
|
-
render() {
|
|
86
|
-
return l`
|
|
87
|
-
<schmancy-surface-v2 fill="all" type="container" rounded="all" elevation="2">
|
|
88
|
-
<schmancy-grid class="h-full w-full" cols="1fr" rows="auto 1fr">
|
|
89
|
-
<schmancy-surface-v2 rounded="top" elevation="1" type="containerHighest" class="sticky top-0 z-10">
|
|
90
|
-
<schmancy-grid align="center" class="px-4 py-3" .cols=${this.cols} gap="md" rows="1fr">
|
|
91
|
-
${this.columns.map((t) => l`
|
|
92
|
-
<schmancy-typography align=${t.align ?? "left"} weight=${t.weight ?? "bold"}>
|
|
93
|
-
${t.name}
|
|
94
|
-
</schmancy-typography>
|
|
95
|
-
`)}
|
|
96
|
-
</schmancy-grid>
|
|
97
|
-
</schmancy-surface-v2>
|
|
98
|
-
|
|
99
|
-
<lit-virtualizer
|
|
100
|
-
scroller
|
|
101
|
-
class="w-full h-full relative overflow-auto"
|
|
102
|
-
.items=${this.data}
|
|
103
|
-
.renderItem=${(t, e) => l`
|
|
104
|
-
<schmancy-table-row
|
|
105
|
-
.actions=${this.actions}
|
|
106
|
-
class="w-full border-b-1 border-solid border-outlineVariant"
|
|
107
|
-
.columns=${this.columns}
|
|
108
|
-
.item=${t}
|
|
109
|
-
cols=${this.cols}
|
|
110
|
-
@edit=${(s) => {
|
|
111
|
-
s.detail.item = t, s.detail.index = e, this.handleRowEvent("edit", s);
|
|
112
|
-
}}
|
|
113
|
-
@delete=${(s) => {
|
|
114
|
-
s.detail.item = t, s.detail.index = e, this.handleRowEvent("delete", s);
|
|
115
|
-
}}
|
|
116
|
-
></schmancy-table-row>
|
|
117
|
-
`}
|
|
118
|
-
></lit-virtualizer>
|
|
119
|
-
</schmancy-grid>
|
|
120
|
-
</schmancy-surface-v2>
|
|
121
|
-
`;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
m([c({ type: Array, attribute: !1 })], n.prototype, "columns", 2), m([c({ type: Array, attribute: !1 })], n.prototype, "data", 2), m([c({ type: String })], n.prototype, "keyField", 2), m([c({ type: String })], n.prototype, "cols", 2), m([c({ type: Array })], n.prototype, "actions", 2), n = m([u("schmancy-table-v2")], n);
|
|
125
|
-
export {
|
|
126
|
-
h as S,
|
|
127
|
-
n as a
|
|
128
|
-
};
|
|
129
|
-
//# sourceMappingURL=table-k-u5jZrL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-k-u5jZrL.js","sources":["../src/table/row.ts","../src/table/table.ts"],"sourcesContent":["import { $LitElement } from '@mixins/litElement.mixin'\nimport { css, html, TemplateResult } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { TableColumn } from './table' //Import TableColumn interface.\n\n@customElement('schmancy-table-row')\nexport class SchmancyTableRow extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tz-index: -1;\n\t}\n`) {\n\t@property({ type: Array, attribute: false })\n\tcolumns: TableColumn[] = []\n\n\t@property({ type: Object, attribute: false }) //Important to use object for complex properties\n\titem: any\n\n\t@property({ type: String })\n\tcols: string = '1fr'\n\n\t@property({\n\t\ttype: Array,\n\t})\n\tactions: Array<{ name: string; action: (item: any) => void }> | undefined\n\trender(): TemplateResult {\n\t\treturn html`\n\t\t\t<schmancy-list-item\n\t\t\t\t@click=${() => {\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('row-click', {\n\t\t\t\t\t\t\tdetail: this.item,\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tclass=\"w-full\"\n\t\t\t>\n\t\t\t\t<schmancy-grid .cols=${this.cols} align=\"center\" gap=\"md\">\n\t\t\t\t\t${this.columns.map(\n\t\t\t\t\t\tcolumn => html`\n\t\t\t\t\t\t\t<div class=\"overflow-hidden text-ellipsis\">\n\t\t\t\t\t\t\t\t<schmancy-typography\n\t\t\t\t\t\t\t\t\talign=\"${column.align || 'left'}\"\n\t\t\t\t\t\t\t\t\tmaxLines=\"2\"\n\t\t\t\t\t\t\t\t\tweight=\"${column.weight || 'normal'}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${column.render ? column.render(this.item) : column.key ? this.item?.[column.key] : ''}\n\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`,\n\t\t\t\t\t)}\n\t\t\t\t\t<sch-flex\n\t\t\t\t\t\tclass=\"min-w-fit block\"\n\t\t\t\t\t\tflow=\"row-dense\"\n\t\t\t\t\t\t.hidden=${Array.isArray(this.actions) && this.actions.length === 0}\n\t\t\t\t\t>\n\t\t\t\t\t\t${repeat(\n\t\t\t\t\t\t\tthis.actions ?? [],\n\t\t\t\t\t\t\t({ name }) => name,\n\t\t\t\t\t\t\t({ name, action }) => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\taction(this.item)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${name}\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</sch-flex>\n\t\t\t\t\t<!-- <schmancy-menu .hidden=${Array.isArray(this.actions) && this.actions.length === 0}>\n\t\t\t\t\t\t${repeat(\n\t\t\t\t\t\tthis.actions ?? [],\n\t\t\t\t\t\t({ name }) => name,\n\t\t\t\t\t\t({ name, action }) => html`\n\t\t\t\t\t\t\t<schmancy-menu-item\n\t\t\t\t\t\t\t\tclass=\"z-[10000]\"\n\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\taction(this.item)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t${name}\n\t\t\t\t\t\t\t</schmancy-menu-item>\n\t\t\t\t\t\t`,\n\t\t\t\t\t)}\n\t\t\t\t\t</schmancy-menu> -->\n\t\t\t\t</schmancy-grid>\n\t\t\t</schmancy-list-item>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-table-row': SchmancyTableRow\n\t}\n}\n","import { $LitElement } from '@mixins/litElement.mixin'\nimport { html, TemplateResult } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport './row' // Import the schmancy-table-row component\n\n// Define a generic TableColumn interface.\n// The `key` is now a key of T, and the render function accepts T.\nexport interface TableColumn<T extends Record<string, any> = any> {\n\tname: string\n\tkey?: keyof T // Key to access the property on the data object.\n\talign?: 'left' | 'right' | 'center'\n\tweight?: 'normal' | 'bold'\n\trender?: (item: T) => TemplateResult | string | number // Custom render function for complex content\n}\n\n// Define an event detail interface for row events.\nexport interface RowEventDetail<T> {\n\titem: T\n\tindex: number\n}\n\n@customElement('schmancy-table-v2')\nexport class SchmancyDataTable<T extends Record<string, any> = any> extends $LitElement() {\n\t@property({ type: Array, attribute: false })\n\tcolumns: TableColumn<T>[] = []\n\n\t@property({ type: Array, attribute: false })\n\tdata: T[] = []\n\n\t// The keyField is now of type keyof T. You may need to adjust the default if needed.\n\t@property({ type: String })\n\tkeyField: keyof T = 'id' as keyof T\n\n\t@property({ type: String })\n\tcols: string = '1fr'\n\n\t@property({ type: Array }) actions: Array<{ name: string; action: (item: T) => void }> = []\n\n\t// Helper to handle row events.\n\tprivate handleRowEvent(eventName: 'row-click' | 'edit' | 'delete', e: CustomEvent<RowEventDetail<T>>) {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<RowEventDetail<T>>(eventName, {\n\t\t\t\tdetail: e.detail,\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender(): TemplateResult {\n\t\treturn html`\n\t\t\t<schmancy-surface-v2 fill=\"all\" type=\"container\" rounded=\"all\" elevation=\"2\">\n\t\t\t\t<schmancy-grid class=\"h-full w-full\" cols=\"1fr\" rows=\"auto 1fr\">\n\t\t\t\t\t<schmancy-surface-v2 rounded=\"top\" elevation=\"1\" type=\"containerHighest\" class=\"sticky top-0 z-10\">\n\t\t\t\t\t\t<schmancy-grid align=\"center\" class=\"px-4 py-3\" .cols=${this.cols} gap=\"md\" rows=\"1fr\">\n\t\t\t\t\t\t\t${this.columns.map(\n\t\t\t\t\t\t\t\tcolumn => html`\n\t\t\t\t\t\t\t\t\t<schmancy-typography align=${column.align ?? 'left'} weight=${column.weight ?? 'bold'}>\n\t\t\t\t\t\t\t\t\t\t${column.name}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</schmancy-grid>\n\t\t\t\t\t</schmancy-surface-v2>\n\n\t\t\t\t\t<lit-virtualizer\n\t\t\t\t\t\tscroller\n\t\t\t\t\t\tclass=\"w-full h-full relative overflow-auto\"\n\t\t\t\t\t\t.items=${this.data}\n\t\t\t\t\t\t.renderItem=${(item: T, index: number) =>\n\t\t\t\t\t\t\thtml`\n\t\t\t\t\t\t\t\t<schmancy-table-row\n\t\t\t\t\t\t\t\t\t.actions=${this.actions}\n\t\t\t\t\t\t\t\t\tclass=\"w-full border-b-1 border-solid border-outlineVariant\"\n\t\t\t\t\t\t\t\t\t.columns=${this.columns}\n\t\t\t\t\t\t\t\t\t.item=${item}\n\t\t\t\t\t\t\t\t\tcols=${this.cols}\n\t\t\t\t\t\t\t\t\t@edit=${(e: CustomEvent<RowEventDetail<T>>) => {\n\t\t\t\t\t\t\t\t\t\te.detail.item = item\n\t\t\t\t\t\t\t\t\t\te.detail.index = index\n\t\t\t\t\t\t\t\t\t\tthis.handleRowEvent('edit', e)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t@delete=${(e: CustomEvent<RowEventDetail<T>>) => {\n\t\t\t\t\t\t\t\t\t\te.detail.item = item\n\t\t\t\t\t\t\t\t\t\te.detail.index = index\n\t\t\t\t\t\t\t\t\t\tthis.handleRowEvent('delete', e)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t></schmancy-table-row>\n\t\t\t\t\t\t\t` as TemplateResult}\n\t\t\t\t\t></lit-virtualizer>\n\t\t\t\t</schmancy-grid>\n\t\t\t</schmancy-surface-v2>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-table-v2': SchmancyDataTable\n\t}\n}\n"],"names":["SchmancyTableRow","$LitElement","css","super","arguments","this","columns","cols","render","html","dispatchEvent","CustomEvent","detail","item","bubbles","composed","map","column","align","weight","key","Array","isArray","actions","length","repeat","name","action","e","stopPropagation","__decorateClass","property","type","attribute","prototype","Object","String","customElement","SchmancyDataTable","constructor","data","keyField","eventName","index","handleRowEvent"],"mappings":";;;;;;;;AAOa,IAAAA,IAAN,cAA+BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA3C,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAONC,GAAAA,KAAAC,UAAyB,CAAA,GAMVD,KAAAE,OAAA;AAAA,EAAA;AAAA,EAMf,SAAAC;AACQ,WAAAC;AA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