@limetech/lime-web-components 6.2.0 → 6.3.0
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/CHANGELOG.md +8 -0
- package/dist/commandbus/commandbus.d.ts +3 -3
- package/dist/commandbus/commandbus.d.ts.map +1 -1
- package/dist/commandbus/commandbus.spec.d.ts +2 -2
- package/dist/commandbus/commandbus.spec.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +22 -22
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/core/platform.ts","../src/core/idle.ts","../src/limetype/property.ts","../src/limetype/types.ts","../node_modules/tslib/tslib.es6.mjs","../node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../node_modules/rxjs/dist/esm5/internal/Subscription.js","../node_modules/rxjs/dist/esm5/internal/config.js","../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../node_modules/rxjs/dist/esm5/internal/util/noop.js","../node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../node_modules/rxjs/dist/esm5/internal/Subscriber.js","../node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../node_modules/rxjs/dist/esm5/internal/util/identity.js","../node_modules/rxjs/dist/esm5/internal/util/pipe.js","../node_modules/rxjs/dist/esm5/internal/Observable.js","../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","../node_modules/rxjs/dist/esm5/internal/Subject.js","../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js","../src/core/decorators/factory.ts","../src/limetype/decorator.ts","../src/limetype/find-limetype-by-label.ts","../src/limetype/get-properties-by-type.ts","../src/limetype/get-property-by-label.ts","../src/limetype/get-property-by-name.ts","../src/limetype/has-label.ts","../src/limeobject/types.ts","../src/limeobject/decorator.ts","../src/commandbus/commandbus.ts","../src/commandbus/types.ts","../src/limeobject/commands/bulk-create-dialog.ts","../src/limeobject/commands/create-dialog.ts","../src/limeobject/commands/delete-object.ts","../src/limeobject/commands/object-access.ts","../src/limeobject/commands/save-object.ts","../src/query/query.ts","../src/query/types.ts","../src/http/http.ts","../src/http/types.ts","../src/eventdispatcher/types.ts","../src/translator/types.ts","../src/dialog/types.ts","../src/keybindings/types.ts","../src/navigator/types.ts","../src/navigator/decorator.ts","../src/navigator/command.ts","../src/notifications/types.ts","../src/routeregistry/types.ts","../src/task/repository.ts","../src/task/types.ts","../src/config/types.ts","../src/config/decorator.ts","../src/device/types.ts","../src/device/decorator.ts","../src/filter/types.ts","../src/filter/decorator.ts","../src/userdata/types.ts","../src/userdata/decorator.ts","../src/application/types.ts","../src/application/decorators/application.ts","../src/application/decorators/user.ts","../src/application/decorators/session.ts","../src/userpreferences/types.ts","../src/datetimeformatter/types.ts","../src/conditionregistry/conditionregistry.ts","../src/conditionregistry/types.ts","../src/view/types.ts","../src/webcomponent/types.ts","../src/notification-service/types.ts","../src/poller/types.ts"],"sourcesContent":["/**\n * Service container for the Lime CRM platform\n * @public\n * @group Core\n */\nexport interface LimeWebComponentPlatform {\n type: 'LimeCRMWebClient' | 'LimeCRMDesktopClient' | 'LimeCRMWebAdminClient';\n\n /**\n * Get a service\n *\n * @param name - the name of the service\n */\n get(name: string): any;\n\n /**\n * Check if a service is currently registered on the platform\n *\n * @param name - the name of the service\n */\n has(name: string): boolean;\n\n /**\n * Register a service on the platform\n *\n * Core platform service names are defined by the enum `PlatformServiceName`. Third parties that wants to register\n * a service should add a prefix to the service name, e.g. the plugin name.\n *\n * @param name - the name of the service\n * @param service - the service\n */\n register(name: string, service: any): void;\n\n /**\n * Check if a feature is enabled\n *\n * @param name - name of the feature switch\n */\n isFeatureEnabled(name: keyof FeatureSwitches): boolean;\n}\n\n/**\n * Core platform service names\n * @public\n * @group Core\n */\nexport const PlatformServiceName: PlatformServiceNameType = {\n Route: 'route',\n} as any;\n\n/**\n * @public\n * @group Core\n */\nexport interface PlatformServiceNameType {}\n\n/**\n * Available feature switches\n *\n * @public\n * @group Core\n */\nexport interface FeatureSwitches {}\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { EventDispatcher } from '../eventdispatcher';\n\n/**\n * The user's idle state. When set to `active` the user is actively using the\n * application. When set to `idle`, the user has either minimized the\n * application or not used it actively for a while.\n * @beta\n * @group Core\n */\nexport type IdleState = 'active' | 'idle';\n\n/**\n * The event emitted by {@link EventDispatcher} when the user's idle state\n * changes\n * @beta\n * @group Core\n */\nexport type IdleStateChangeEvent = CustomEvent<{ state: IdleState }>;\n\n/**\n * Name of the event emitted by {@link EventDispatcher} when the user's idle\n * state changes\n * @beta\n * @group Core\n */\nexport const IdleStateEventName = 'idle-state' as const;\n","import { Acl } from './acl';\nimport { LimeType } from './limetype';\n\n/**\n * @public\n * @group Lime types\n */\nexport interface LimeProperty {\n acl: Acl;\n defaultvalue: any;\n fieldorder: number;\n has_sql?: boolean;\n label: string;\n length?: number;\n localname: string;\n name: string;\n required: boolean;\n type: PropertyType;\n options?: Option[];\n relation?: {\n getLimetype: () => LimeType;\n getBackreference: () => LimeProperty;\n };\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport interface Option {\n key: string;\n inactive: boolean;\n text: string;\n order?: number;\n id?: number;\n}\n\n/**\n * The subset of `PropertyType`s that represent a date or time of some kind.\n *\n * **NOTE**<br>\n * For legacy reasons:\n * - the type `time` represents a value with date _and_ time\n * - the type `timeofday` represents a value with _only_ time\n * - there is no type for \"week\"; instead week properties use the type `time` and are configured as \"week\" in the applicable view config\n *\n * @public\n * @group Lime types\n */\nexport type DateTimePropertyType =\n | 'time'\n | 'timeofday'\n | 'date'\n | 'year'\n | 'quarter'\n | 'month';\n\n/**\n * @public\n * @group Lime types\n */\nexport type PropertyType =\n | 'string'\n | 'text'\n | 'phone'\n | 'integer'\n | 'decimal'\n | 'percent'\n | 'yesno'\n | 'link'\n | 'user'\n | 'xml'\n | 'option'\n | 'set'\n | 'file'\n | 'hasone'\n | 'hasmany'\n | 'belongsto'\n | 'hasandbelongstomany'\n | 'system'\n | DateTimePropertyType;\n\n/**\n * @public\n * @group Lime types\n */\nexport function isRelation(property: LimeProperty) {\n const propTypes: PropertyType[] = [\n 'belongsto',\n 'hasone',\n 'hasmany',\n 'hasandbelongstomany',\n ];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isSingleRelation(property: LimeProperty) {\n const propTypes: PropertyType[] = ['belongsto', 'hasone'];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isDate(property: LimeProperty) {\n const propTypes: PropertyType[] = [\n 'time',\n 'timeofday',\n 'date',\n 'year',\n 'quarter',\n 'month',\n ];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isString(property: LimeProperty) {\n const propTypes: PropertyType[] = ['string', 'text', 'phone', 'link'];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isFloat(property: LimeProperty) {\n const propTypes: PropertyType[] = ['decimal', 'percent'];\n\n return property && propTypes.includes(property.type);\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { LimeTypeRepository } from './repository';\n\nconst SERVICE_NAME = 'state.limetypes';\n\nPlatformServiceName.LimeTypeRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link LimeTypeRepository}\n */\n LimeTypeRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['LimeTypeRepository']\n ): LimeTypeRepository;\n }\n}\n","/******************************************************************************\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","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, (this._value = value));\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","import {\n LimeWebComponent,\n LimeWebComponentPlatform,\n ContextAwareStateOptions,\n StateOptions,\n} from '..';\nimport { getElement } from '@stencil/core';\nimport { BehaviorSubject, Observer } from 'rxjs';\n\ntype OptionFactory = (\n options: StateOptions,\n component: LimeWebComponent\n) => StateOptions;\n\n/**\n * @group Core\n * @internal\n */\nexport interface StateDecoratorConfig {\n /**\n * Name of the state service to use in the platform\n */\n name: string;\n\n /**\n * Name of the method on the service to use\n */\n method?: string;\n\n /**\n * Factory for creating options dynamically\n *\n * @param options - decorator options\n * @param component - the web component\n * @returns state options\n */\n optionFactory?: OptionFactory;\n}\n\ninterface Component {\n connectedCallback: () => void | Promise<void>;\n componentWillLoad: () => void | Promise<void>;\n componentWillUpdate: () => void | Promise<void>;\n componentDidUnload: () => void;\n disconnectedCallback: () => void | Promise<void>;\n}\n\ninterface Property {\n name: string;\n options: StateOptions;\n optionFactory?: OptionFactory;\n service: {\n name: string;\n method: string;\n };\n}\n\nfunction defaultOptionFactory(options: StateOptions) {\n return options;\n}\n\n/**\n * Create a new state decorator\n *\n * @param options - decorator options\n * @param config - decorator configuration\n * @returns state decorator\n * @public\n */\nexport function createStateDecorator(\n options: StateOptions,\n config: StateDecoratorConfig\n): PropertyDecorator {\n return (target: Component, property: string) => {\n const properties = getComponentProperties(\n target,\n property,\n options,\n config\n );\n\n if (properties.length === 1) {\n extendLifecycleMethods(target, properties);\n }\n };\n}\n\nconst componentProperties = new WeakMap<Component, Property[]>();\nconst componentSubscriptions = new WeakMap<any, Array<() => void>>();\nconst connectedComponents = new WeakMap<any, boolean>();\n\n/**\n * Get properties data for a component\n *\n * @param component - the component class containing the decorator\n * @param property - name of the property\n * @param options - decorator options\n * @param config - decorator configuration\n * @returns properties data for the component\n */\nfunction getComponentProperties(\n component: Component,\n property: string,\n options: StateOptions,\n config: StateDecoratorConfig\n): Property[] {\n let properties = componentProperties.get(component);\n if (!properties) {\n properties = [];\n componentProperties.set(component, properties);\n }\n\n properties.push({\n options: options,\n name: property,\n optionFactory: config.optionFactory || defaultOptionFactory,\n service: {\n name: config.name,\n method: config.method || 'subscribe',\n },\n });\n\n return properties;\n}\n\n/**\n * Extend the lifecycle methods on the component\n *\n * @param component - the component to extend\n * @param properties - the properties with which to extend the component\n * @returns\n */\nfunction extendLifecycleMethods(component: Component, properties: Property[]) {\n // `componentWillLoad` and `componentDidUnload` is included for backwards\n // compatibility reasons. The correct way to setup the subscriptions is in\n // `connectedCallback` and `disconnectedCallback`, but since not all\n // plugins might implement those methods yet we still have include them\n // until we make `connectedCallback` and `disconnectedCallback` required\n // on the interface.\n\n component.connectedCallback = createConnectedCallback(\n component.connectedCallback,\n properties\n );\n component.componentWillLoad = createComponentWillLoad(\n component.componentWillLoad,\n properties\n );\n component.componentDidUnload = createDisconnectedCallback(\n component.componentDidUnload\n );\n component.disconnectedCallback = createDisconnectedCallback(\n component.disconnectedCallback\n );\n}\n\nfunction createConnectedCallback(original: Function, properties: Property[]) {\n return async function (this: LimeWebComponent, ...args) {\n connectedComponents.set(this, true);\n componentSubscriptions.set(this, []);\n await ensureLimeProps(this);\n\n const observable = new BehaviorSubject(this.context);\n watchProp(this, 'context', observable);\n\n properties.forEach((property) => {\n property.options = property.optionFactory(property.options, this);\n if (isContextAware(property.options)) {\n property.options.context = observable;\n }\n\n subscribe(this, property);\n });\n\n if (original) {\n return original.apply(this, args);\n }\n };\n}\n\nfunction createComponentWillLoad(original: Function, properties: Property[]) {\n return async function (...args) {\n if (connectedComponents.get(this) === true) {\n await ensureLimeProps(this);\n if (original) {\n return original.apply(this, args);\n }\n\n return;\n }\n\n const connectedCallback = createConnectedCallback(original, properties);\n\n return connectedCallback.apply(this, args);\n };\n}\n\nfunction createDisconnectedCallback(original: Function) {\n return async function (...args) {\n let result;\n if (original) {\n result = original.apply(this, args);\n }\n\n unsubscribeAll(this);\n\n return result;\n };\n}\n\n/**\n * Check if the options are context aware\n *\n * @param options - state decorator options\n * @returns true if the options are context aware\n */\nfunction isContextAware(options: object): options is ContextAwareStateOptions {\n return 'context' in options;\n}\n\n/**\n * Make sure that all required lime properties are set on the web component\n *\n * @param target - the web component\n * @returns a promise that resolves when all properties are defined\n */\nfunction ensureLimeProps(target: LimeWebComponent): Promise<any> {\n const promises = [];\n if (!target.platform) {\n promises.push(waitForProp(target, 'platform'));\n }\n\n if (!target.context) {\n promises.push(waitForProp(target, 'context'));\n }\n\n if (!promises.length) {\n return Promise.resolve();\n }\n\n return Promise.all(promises);\n}\n\n/**\n * Wait for a property to be defined on an object\n *\n * @param target - the web component\n * @param property - the name of the property to watch\n * @returns a promise that will resolve when the property is set on the object\n */\nfunction waitForProp(\n target: LimeWebComponent,\n property: string\n): Promise<void> {\n const element = getElement(target);\n\n return new Promise((resolve) => {\n Object.defineProperty(element, property, {\n configurable: true,\n set: (value: any) => {\n delete element[property];\n element[property] = value;\n resolve();\n },\n });\n });\n}\n\nfunction watchProp<T>(\n target: LimeWebComponent,\n property: string,\n observer: Observer<T>\n) {\n const element = getElement(target);\n\n const { get, set } = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(element),\n property\n );\n\n Object.defineProperty(element, property, {\n configurable: true,\n get: get,\n set: function (value: T) {\n set.call(this, value);\n observer.next(value);\n },\n });\n}\n\n/**\n * Subscribe to changes from the state\n *\n * @param component - the component instance\n * @param property - property to update when subscription triggers\n * @returns\n */\nfunction subscribe(component: any, property: Property): void {\n const subscription = createSubscription(component, property);\n if (typeof subscription !== 'function') {\n return;\n }\n\n const subscriptions = componentSubscriptions.get(component);\n subscriptions.push(subscription);\n}\n\n/**\n * Unsubscribe to changes from the state\n *\n * @param component - the instance of the component\n * @returns\n */\nfunction unsubscribeAll(component: any): void {\n const subscriptions = componentSubscriptions.get(component);\n\n subscriptions.forEach((unsubscribe) => unsubscribe());\n componentSubscriptions.set(component, []);\n}\n\n/**\n * Get a function that accepts a state, and updates the given property\n * on the given component with that state\n *\n * @param instance - the component to augment\n * @param property - name of the property on the component\n * @returns updates the state\n */\nfunction mapState(instance: any, property: string) {\n return (state: any) => {\n instance[property] = state;\n };\n}\n\n/**\n * Create a state subscription\n *\n * @param component - the component instance\n * @param property - the property on the component\n * @returns unsubscribe function\n */\nfunction createSubscription(component: any, property: Property): () => void {\n const myOptions = { ...property.options };\n bindFunctions(myOptions, component);\n const name = property.service.name;\n\n const platform: LimeWebComponentPlatform = component.platform;\n if (!platform.has(name)) {\n throw new Error(`Service ${name} does not exist`);\n }\n\n const service: any = platform.get(name);\n\n return service[property.service.method](\n mapState(component, property.name),\n myOptions\n );\n}\n\n/**\n * Bind connect functions to the current scope\n *\n * @param options - options for the selector\n * @param scope - the current scope to bind to\n * @returns\n */\nfunction bindFunctions(options: StateOptions, scope: any) {\n if (options.filter) {\n options.filter = options.filter.map((func) => func.bind(scope));\n }\n\n if (options.map) {\n options.map = options.map.map((func) => func.bind(scope));\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n ContextAwareStateOptions,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectLimeTypes} state decorator\n * @public\n * @group Lime types\n */\nexport interface SelectLimeTypesOptions extends StateOptions {\n name?: string;\n}\n\n/**\n * Gets an object with all limetypes where name is used as key\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime types\n */\nexport function SelectLimeTypes(\n options: SelectLimeTypesOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeTypeRepository,\n };\n\n return createStateDecorator(options, config);\n}\n\n/**\n * Get the limetype for the current context\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime types\n */\nexport function SelectCurrentLimeType(\n options: ContextAwareStateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeTypeRepository,\n };\n options.map = [currentLimetype, ...(options.map || [])];\n options.context = null;\n\n return createStateDecorator(options, config);\n}\n\nfunction currentLimetype(limetypes: any) {\n const { limetype } = this.context;\n\n return limetypes[limetype];\n}\n","import { hasLabel, LimeType } from '.';\n\n/**\n * Creates a function to find a limetype by its label in a collection of limetypes.\n *\n * The returned function searches through a collection of limetypes and returns\n * the first one that matches the given label. This function is typically used\n * to generate a callback for decorators or other higher-order logic.\n *\n * @param label - The label of the limetype to find.\n * @returns A function that takes a collection of limetypes and returns the first\n * limetype that matches the label, or `undefined` if no match is found.\n *\n * @example\n * ```typescript\n * import { findLimetypeByLabel } from '@limetech/lime-web-components';\n *\n * const limetypes = {\n * company: { label: 'company', properties: {} },\n * person: { label: 'person', properties: {} },\n * };\n *\n * const findPersonLimetype = findLimetypeByLabel('person');\n * const personLimetype = findPersonLimetype(limetypes);\n * console.log(personLimetype); // { label: 'person', properties: {} }\n * ```\n *\n * @example\n * ```typescript\n * // Using `findLimetypeByLabel` as a callback for a decorator\n * import { findLimetypeByLabel, SelectLimeTypes } from '@limetech/lime-web-components';\n *\n * @SelectLimeTypes({\n * map: [findLimetypeByLabel('person')],\n * })\n * private personLimetype: LimeType;\n * ```\n *\n * @public\n * @group Lime types\n */\nexport const findLimetypeByLabel =\n (label: string) => (limetypes: Record<string, LimeType>) => {\n return Object.values(limetypes).find(hasLabel(label));\n };\n","import { LimeProperty, LimeType, PropertyType } from '.';\n\n/**\n * Retrieves all properties of a specific type from a limetype.\n *\n * This function filters the properties of a limetype and returns\n * those that match the specified property type.\n *\n * @param limetype - The limetype containing the properties.\n * @param type - The type of properties to retrieve.\n * @returns An array of properties that match the specified type.\n *\n * @public\n * @group Lime types\n */\nexport function getPropertiesByType(\n limetype: LimeType,\n type: PropertyType\n): LimeProperty[] {\n return Object.values(limetype.properties).filter(\n (property) => property.type === type\n );\n}\n","import { hasLabel, LimeProperty, LimeType } from '.';\n\n/**\n * Retrieves a property from a limetype by its label.\n *\n * This function searches through the properties of a given limetype\n * and returns the first property that matches the specified label.\n *\n * @param limetype - The limetype containing the properties.\n * @param label - The label of the property to retrieve.\n * @returns The property with the specified label, or `undefined` if no match is found.\n *\n * @public\n * @group Lime types\n */\nexport function getPropertyByLabel(\n limetype: LimeType,\n label: string\n): LimeProperty | undefined {\n return Object.values(limetype.properties).find(hasLabel(label));\n}\n","import { LimeProperty, LimeType } from '.';\n\n/**\n * Retrieves a property from a limetype by its name.\n *\n * This function extracts a specific property from a given limetype\n * based on the property's name.\n *\n * @param limetype - The limetype containing the properties.\n * @param propertyName - The name of the property to retrieve.\n * @returns The property with the specified name.\n * @throws Will throw an error if the property name does not exist in the limetype.\n *\n * @public\n * @group Lime types\n */\nexport function getPropertyByName(\n limetype: LimeType,\n propertyName: string\n): LimeProperty {\n return limetype.properties[propertyName];\n}\n","import { LimeProperty, LimeType } from '.';\n\n/**\n * Creates a function to check if a given object has a specific label.\n *\n * The returned function takes an object (a `LimeType` or `LimeProperty`) and\n * checks whether it contains the specified label. This function is typically\n * used as a callback for array methods like `.find` or `.filter`.\n *\n * @param label - The label to check for.\n * @returns A function that takes an optional object and returns `true` if the label matches, or `false` otherwise.\n *\n * @example\n * ```typescript\n * import { hasLabel } from '@limetech/lime-web-components';\n *\n * const properties = [\n * { label: 'name', type: 'string' },\n * { label: 'email', type: 'string' },\n * ];\n *\n * const emailProperty = properties.find(hasLabel('email'));\n * console.log(emailProperty); // { label: 'email', type: 'string' }\n * ```\n *\n * @public\n * @group Lime types\n */\nexport const hasLabel =\n (label: string) => (object?: LimeType | LimeProperty) => {\n return object?.label === label;\n };\n","import { LimeObjectRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.limeobjects';\n\nPlatformServiceName.LimeObjectRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | LimeObjectRepository}\n */\n LimeObjectRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['LimeObjectRepository']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n LimeWebComponent,\n ContextAwareStateOptions,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectLimeObjects} state decorator\n * @public\n * @group Lime objects\n */\nexport interface SelectLimeObjectsOptions extends StateOptions {\n /**\n * LimeType of the object\n */\n limetype?: string;\n\n /**\n * A function to get the limetype\n */\n getLimetype?: (component: LimeWebComponent) => string;\n\n /**\n * Id of the limeobject\n */\n id?: number;\n}\n\n/**\n * Get a list of limeobjects\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime objects\n */\nexport function SelectLimeObjects(\n options: SelectLimeObjectsOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeObjectRepository,\n optionFactory: createOptions,\n };\n\n return createStateDecorator(options, config);\n}\n\n/**\n * Get the limeobject for the current context\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime objects\n */\nexport function SelectCurrentLimeObject(\n options: ContextAwareStateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeObjectRepository,\n };\n options.map = [currentLimeobject, ...(options.map || [])];\n options.context = null;\n\n return createStateDecorator(options, config);\n}\n\nfunction currentLimeobject(limeobjects: Record<string, Array<{ id: string }>>) {\n const { limetype, id } = this.context;\n\n if (!limeobjects[limetype]) {\n return undefined;\n }\n\n return limeobjects[limetype].find((object) => object.id === id);\n}\n\nfunction createOptions(\n options: SelectLimeObjectsOptions,\n component: LimeWebComponent\n): StateOptions {\n if (options.getLimetype) {\n options.limetype = options.getLimetype(component);\n }\n\n return options;\n}\n","import { LimeWebComponentContext, ConfigMetadata } from '../core';\nimport { Expression } from '../query';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LimeObject } from '../limeobject';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LimeType } from '../limetype';\n\n/**\n * A generic command\n *\n * @public\n * @group Command bus\n */\nexport interface AnyCommand {}\n\n/**\n * A command operating on a single {@link LimeObject}\n *\n * @public\n * @group Command bus\n */\nexport interface LimeObjectCommand extends AnyCommand {\n /**\n * Context describing the {@link LimeObject} the command will operate on\n */\n context: LimeWebComponentContext & { limetype: string; id: number };\n}\n\n/**\n * A command operating on multiple {@link LimeObject}s of a single {@link LimeType}\n *\n * @public\n * @group Command bus\n */\nexport interface LimeObjectBulkCommand extends AnyCommand {\n /**\n * Context describing the {@link LimeType} the command will operate on. If\n * `parent` is set on the context, it indicates that the {@link LimeObject}s\n * are all related to a common parent {@link LimeObject} via a `belongsto`\n * relation\n */\n context: LimeWebComponentContext & { limetype: string };\n\n /**\n * An expression describing what {@link LimeObject}s to operate on\n */\n filter: Expression | null;\n}\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandClass<T extends AnyCommand = AnyCommand> = new (\n ...args: any[]\n) => T;\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandIdentifier<T extends AnyCommand = AnyCommand> =\n | CommandClass<T>\n | string;\n\n/**\n * Service for registering and executing commands\n * @public\n * @group Command bus\n */\nexport interface CommandBus extends CommandHandler {\n /**\n * Register a command to be executed by the given handler\n *\n * @param commandClass - type of command\n * @param handler - the handler instance used to execute the command\n */\n register(commandClass: CommandClass, handler: CommandHandler): void;\n\n /**\n * Register a command to be executed by the given handler\n *\n * @param commandClass - type of command\n * @param handler - the handler instance used to execute the command\n * @param metadata - metadata for the command\n * @beta\n */\n register(\n commandClass: CommandClass,\n handler: CommandHandler,\n // TODO combine signatures when CommandMetadata is also public\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n metadata?: Omit<CommandMetadata, 'id'>\n ): void;\n\n /**\n * Execute the given command with it's registered command handler\n *\n * @param command - command to execute\n *\n * @returns result from the command handler\n */\n handle(command: AnyCommand): any;\n\n /**\n * Check if a command is supported\n *\n * @param commandId - identifier of the command. Can be either the class or the string the class was registered with\n *\n * @returns true if the command is supported, false otherwise\n */\n isSupported(commandId: CommandIdentifier): boolean;\n\n /**\n * Get a handler associated with a command\n *\n * @param commandClass - The command class\n *\n * @returns the handler for the command class\n */\n getHandler(commandClass: CommandClass): CommandHandler;\n\n /**\n * Get a list of configs for all registered commands\n *\n * @beta\n */\n getAll?(): CommandMetadata[];\n\n /**\n * Create a command instance from a {@link CommandConfig}\n *\n * @param config - The command configuration\n * @throws Thrown if the command has not been registered yet\n */\n createCommand<Key extends keyof CommandRegistry>(\n config: CommandConfig<CommandRegistry[Key], Key>\n ): CommandRegistry[Key];\n createCommand<T = any, Key extends string = string>(\n config: CommandConfig<T, Exclude<Key, keyof CommandRegistry>>\n ): T;\n}\n\n/**\n * Service for executing commands\n * @public\n * @group Command bus\n */\nexport interface CommandHandler {\n /**\n * Handle the execution of the given command\n *\n * @param command - the command to handle\n *\n * @returns the result of the operation\n */\n handle(command: AnyCommand): any;\n}\n\n/**\n * @public\n * @group Command bus\n */\nexport type CallableCommandMiddleware = (command: AnyCommand) => any;\n\n/**\n * Middleware for the command bus\n * @public\n * @group Command bus\n */\nexport interface CommandMiddleware {\n /**\n * Execute the middleware before passing the command further down the chain\n *\n * @param command - the command that is being handled\n * @param next - the next middleware in the chain\n *\n * @returns the result of the operation\n */\n execute(command: AnyCommand, next: CallableCommandMiddleware): any;\n}\n\n/**\n * Events dispatched by the commandbus event middleware\n * @public\n * @group Command bus\n */\nexport enum CommandEventName {\n /**\n * Dispatched when the command has been received by the commandbus.\n * Calling `preventDefault()` on the event will stop the command from being handled\n *\n * @see {@link CommandEvent}\n */\n Received = 'command.received',\n\n /**\n * Dispatched when the command has been handled by the commandbus\n *\n * @see {@link CommandEvent}\n */\n Handled = 'command.handled',\n\n /**\n * Dispatched if an error occurs while handling the command\n *\n * @see {@link CommandEvent}\n */\n Failed = 'command.failed',\n}\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandEventDetail = {\n command: AnyCommand;\n result?: unknown;\n error?: unknown;\n};\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandEvent = CustomEvent<CommandEventDetail>;\n\n/**\n * @public\n * @group Command bus\n */\nexport interface CommandOptions {\n /**\n * Id of the command\n */\n id: string;\n}\n\n/**\n * Config for describing a command\n * @public\n */\nexport interface CommandConfig<TCommand = any, TKey extends string = string> {\n /**\n * Id of the command\n *\n * Specified by the {@link Command} decorator when declaring the command\n */\n id: TKey;\n\n /**\n * Optional parameters to set when creating the command from the config.\n * All values need to be serializable\n */\n params?: {\n [K in keyof TCommand]?: TCommand[K];\n };\n}\n\n/**\n * Registry for commands\n *\n * This interface is designed to be extended by consumers of Lime Web\n * Components using module augmentation. Each key in the interface corresponds\n * to the id of a registered command, and the value is the type of the command.\n * This allows for type-safe access to commands within the application.\n *\n * @example\n * ```ts\n * declare module '@limetech/lime-web-components' {\n * interface CommandRegistry {\n * myCommand: MyCommand;\n * }\n * }\n * ```\n *\n * @beta\n * @group Command bus\n */\nexport interface CommandRegistry {}\n\n/**\n * Metadata for a command\n *\n * @beta\n * @group Command bus\n */\nexport type CommandMetadata = ConfigMetadata & {\n /**\n * Command id\n */\n id: string;\n};\n\n/**\n * Register a class as a command\n *\n * @param options - a CommandOptions object containing the id of the command\n *\n * @returns callback which accepts a `CommandClass` and sets the command id\n * @public\n * @group Command bus\n */\nexport function Command(options: CommandOptions) {\n return (commandClass: CommandClass) => {\n setCommandId(commandClass, options.id);\n setHasInstance(commandClass, options.id);\n };\n}\n\nfunction setCommandId(commandClass: CommandClass, id: string) {\n // eslint-disable-next-line @typescript-eslint/dot-notation\n commandClass['commandId'] = id;\n}\n\nfunction setHasInstance(commandClass: CommandClass, id: string) {\n Object.defineProperty(commandClass, Symbol.hasInstance, {\n value: (instance: any) => {\n return getCommandIds(instance).includes(id);\n },\n });\n}\n\n/**\n * Get the registered id of the command\n *\n * @param value - either a command or a command identifier\n *\n * @returns id of the command\n * @public\n * @group Command bus\n */\nexport function getCommandId(value: AnyCommand | CommandIdentifier): string {\n if (typeof value === 'string') {\n return value;\n }\n\n /* eslint-disable @typescript-eslint/dot-notation */\n if (value && value.constructor && value.constructor['commandId']) {\n return value.constructor['commandId'];\n }\n\n if (value && value['commandId']) {\n return value['commandId'];\n }\n /* eslint-enable @typescript-eslint/dot-notation */\n\n return null;\n}\n\n/**\n * Get all registered ids of a command and its parent classes\n *\n * @param value - either a command or a command identifier\n *\n * @returns ids of the command\n * @public\n * @group Command bus\n */\nexport function getCommandIds(value: AnyCommand | CommandIdentifier): string[] {\n let ids: string[] = [];\n let id: string;\n let commandClass = value;\n\n while ((id = getCommandId(commandClass))) {\n ids = [...ids, id];\n commandClass = Object.getPrototypeOf(commandClass);\n }\n\n return Array.from(new Set(ids));\n}\n","import { CommandBus as Service } from './commandbus';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'commandBus';\n\nPlatformServiceName.CommandBus = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | CommandBus}\n */\n CommandBus: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['CommandBus']): Service;\n }\n}\n","import { Command, LimeObjectBulkCommand } from '../../commandbus';\nimport { Expression } from '../../query';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.bulk-create-dialog' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: BulkCreateDialogCommand;\n }\n}\n\n/**\n * Open a dialog for bulk creating limeobjects\n *\n *\n * ### Flow example\n * Let's have a look at the general flow by going through the concrete example of adding several persons to a marketing activity:\n * - Go to the table view of persons.\n * - Filter everyone who should be included in the marketing activity.\n * - Select 'Bulk create objects' form the action menu.\n * - Fill out the form and click 'create'.\n * - A toast message appears and gives you 5 seconds to undo the action before it creates the corresponding task.\n * - Another toast message will inform you after the task is completed.\n * - If the task ended successful you can go to the participant table view and check the result.\n *\n * ### Configuration\n * In order to activate the feature go to a table configuration in lime-admin to the limetype you want to bulk create from\n * and add the following configuration:\n *\n * ```json\n * \"actions\": [\n * {\n * \"id\": \"limeobject.bulk-create-dialog\",\n * \"params\": {\n * \"relation\": \"<name of relation>\"\n * }\n * }\n * ],\n * ```\n *\n * @id `limeobject.bulk-create-dialog`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class BulkCreateDialogCommand implements LimeObjectBulkCommand {\n public context: LimeWebComponentContext;\n\n /**\n * A query describing what limeobjects to create new limeobjects from. Each object from the result will result in a\n * new related limeobject to be created\n */\n public filter: Expression;\n\n /**\n * The name of the relation on the limetype to create objects of\n */\n public relation: string;\n}\n","import { LimeWebComponentContext } from '../../core';\nimport { LimeType } from '../../limetype';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LimeObject } from '..';\nimport { Command } from '../../commandbus';\n\nconst COMMAND_ID = 'limeobject.create-dialog' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: CreateLimeobjectDialogCommand;\n }\n}\n\n/**\n * Open a dialog for creating a new limeobject or editing a specific limeobject\n *\n * The create dialog is implemented as a command so a plugin can easily replace the original dialog with a custom one.\n * Check out the \"Hello, Event!\" tutorial for a detailed description on how to implement your own create dialog.\n *\n * This dialog also useful to edit a limeobject that already exists\n *\n * @id `limeobject.create-dialog`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class CreateLimeobjectDialogCommand {\n /**\n * The limetype of the object to create\n */\n public limetype: LimeType;\n\n /**\n * Default data to populate the form with\n */\n public limeobject?: any;\n\n /**\n * Specifies if routing to limeobject should be done after confirmation\n */\n public route?: boolean = false;\n\n /*\n * Title of the dialog\n */\n public title?: string;\n\n /*\n * Subtitle of the dialog\n */\n public subtitle?: string;\n\n /*\n * Current context\n */\n public context?: LimeWebComponentContext;\n\n /**\n * When `context` is used, this is the name of the relation on the\n * reference {@link LimeObject} to use when auto attaching the new object.\n *\n */\n public autoAttachRelation?: string;\n\n /**\n * Specifies any command that can be used to save the result of the dialog.\n * If not specified, it will default to the {@link SaveLimeObjectCommand}\n */\n public saveCommand?: any;\n}\n","import { Command, LimeObjectCommand } from '../../commandbus';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.delete-object' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: DeleteObjectCommand;\n }\n}\n\n/**\n * Deletes the object from the database\n *\n * @id `limeobject.delete-object`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class DeleteObjectCommand implements LimeObjectCommand {\n public context: LimeWebComponentContext;\n}\n","import { Command, LimeObjectCommand } from '../../commandbus';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.object-access' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: OpenObjectAccessDialogCommand;\n }\n}\n\n/**\n * Open a dialog to view and edit object access information\n *\n * @id `limeobject.object-access`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class OpenObjectAccessDialogCommand implements LimeObjectCommand {\n public context: LimeWebComponentContext;\n}\n","import { LimeObject } from '../../limeobject';\nimport { Command, LimeObjectCommand } from '../../commandbus';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.save-object' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: SaveLimeObjectCommand;\n }\n}\n\n/**\n * Saves the object to the database\n *\n * @id `limeobject.save-object`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class SaveLimeObjectCommand implements LimeObjectCommand {\n public context: LimeWebComponentContext;\n\n /**\n * The limeobject to save\n */\n public limeobject: LimeObject;\n\n /**\n * Specifies if routing to limeobject should be done after confirmation\n */\n public route?: boolean = false;\n\n /**\n * @beta\n * Specifies an optional save label to be displayed in the create-object dialog\n */\n public label?: string;\n}\n","/**\n * @public\n * @group Query\n */\nexport interface Query {\n limetype: string;\n limit?: number;\n offset?: number;\n orderBy?: object[];\n filter?: Expression;\n responseFormat: {\n object?: object;\n aggregates?: object;\n };\n}\n\n/**\n * @public\n * @group Query\n */\nexport interface QueryResponse {\n objects: any[];\n aggregates: any;\n}\n\n/**\n * @public\n * @group Query\n */\nexport type Expression =\n | AndOrExpression\n | NotExpression\n | InFilterExpression\n | InExpression\n | BasicExpression;\n\n/**\n * @public\n * @group Query\n */\nexport type AndOrExpression = {\n op: Operator.AND | Operator.OR;\n exp: Expression[];\n};\n\n/**\n * @public\n * @group Query\n */\nexport type NotExpression = {\n op: Operator.NOT;\n exp: Expression;\n};\n\n/**\n * @public\n * @group Query\n */\nexport type InFilterExpression = {\n type: 'filter';\n key: string;\n op: Operator.IN;\n exp: string;\n};\n\n/**\n * @public\n * @group Query\n */\nexport type InExpression = {\n key: string;\n op: Operator.IN;\n exp: ExpressionValue[];\n};\n\n/**\n * @public\n * @group Query\n */\nexport type BasicExpression = {\n key: string;\n op: BasicOperator;\n exp: ExpressionValue;\n};\n\n/**\n * @public\n * @group Query\n */\nexport type BasicOperator =\n | Operator.EQUALS\n | Operator.NOT_EQUALS\n | Operator.GREATER\n | Operator.LESS\n | Operator.BEGINS\n | Operator.LIKE\n | Operator.LESS_OR_EQUAL\n | Operator.GREATER_OR_EQUAL\n | Operator.ENDS;\n\n/**\n * @public\n * @group Query\n */\nexport type ExpressionValue = string | number | boolean | null;\n\n/**\n * @public\n * @group Query\n */\nexport enum Operator {\n AND = 'AND',\n OR = 'OR',\n NOT = '!',\n EQUALS = '=',\n NOT_EQUALS = '!=',\n GREATER = '>',\n LESS = '<',\n IN = 'IN',\n BEGINS = '=?',\n LIKE = '?',\n LESS_OR_EQUAL = '<=',\n GREATER_OR_EQUAL = '>=',\n ENDS = '=$',\n}\n\n/**\n * @public\n * @group Query\n */\nexport interface Filter {\n id: string;\n limetype: string;\n name: {\n [language: string]: string;\n };\n filter: Expression;\n description?: {\n [language: string]: string;\n };\n iduser?: number;\n}\n\n/**\n *\n * @public\n * @group Query\n */\nexport const AggregateOperator = {\n Count: 'COUNT',\n Sum: 'SUM',\n Average: 'AVG',\n Maximum: 'MAX',\n Minimum: 'MIN',\n} as const;\n\n/**\n *\n * @public\n * @group Query\n */\nexport type AggregateOperator =\n (typeof AggregateOperator)[keyof typeof AggregateOperator];\n","import { QueryService } from './service';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'query';\n\nPlatformServiceName.Query = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link QueryService}\n */\n Query: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Query']): QueryService;\n }\n}\n","/**\n * HTTP service for sending requests to a given URL\n *\n * By default, the service will work with the JSON data format. If anything but JSON is returned from the endpoint,\n * the `responseType` property in the `options` parameter needs to be set.\n *\n * @public\n * @group HTTP\n */\nexport interface HttpClient {\n /**\n * Sends a get request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n get(url: string, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a post request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param data - Payload to send to the server.\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n post(url: string, data?: {}, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a patch request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param data - Payload to send to the server.\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n patch(url: string, data?: {}, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a put request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param data - Payload to send to the server.\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n put(url: string, data?: {}, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a delete request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n delete(url: string, options?: HttpOptions): Promise<any>;\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport interface HttpOptions {\n /**\n * Query parameters to include in the request\n */\n params?: HttpParams;\n\n /**\n * Additional HTTP-headers to send in the request\n */\n headers?: HttpHeaders;\n\n /**\n * Type of the response that is returned. Defaults to `json`\n */\n responseType?: HttpResponseType;\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport interface HttpParams {\n [param: string]: string | string[];\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport interface HttpHeaders {\n [header: string]: string | string[];\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport type HttpResponseType = 'text' | 'json' | 'arraybuffer' | 'blob';\n\n/**\n * Defines the HTTP methods as constants.\n * Used in the UploadFile class in lime-crm-components\n *\n * @public\n */\nexport const HttpMethod = {\n Get: 'GET',\n Post: 'POST',\n Put: 'PUT',\n Delete: 'DELETE',\n Patch: 'PATCH',\n} as const;\n\n/**\n * Type definition for HTTP methods. It can be any of the values defined in the\n * HttpMethod constant.\n *\n * @public\n */\nexport type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];\n\n/**\n * Exception thrown by {@link HttpClient} when an error occurs while sending a\n * request\n *\n * @public\n */\nexport interface HttpResponseError extends Error {\n name: 'HttpResponseError';\n /**\n * Http status code\n */\n status: number;\n /**\n * The response from the request\n */\n response: Response;\n}\n","import { HttpClient } from './http';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'http';\n\nPlatformServiceName.Http = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link HttpClient}\n */\n Http: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Http']): HttpClient;\n }\n}\n","import { EventDispatcher as Service } from './eventdispatcher';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'eventDispatcher';\n\nPlatformServiceName.EventDispatcher = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | EventDispatcher}\n */\n EventDispatcher: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['EventDispatcher']): Service;\n }\n}\n","import { Translator } from './translator';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'translate';\n\nPlatformServiceName.Translate = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Translate}\n */\n Translate: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Translate']): Translator;\n }\n}\n","import { DialogRenderer } from './dialog';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'dialog';\n\nPlatformServiceName.Dialog = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link DialogRenderer}\n */\n Dialog: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Dialog']): DialogRenderer;\n }\n}\n","import { KeybindingRegistry as Service } from './registry';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'keybindingRegistry';\n\nPlatformServiceName.KeybindingRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | KeybindingRegistry}\n *\n * @note Work in progress, do not use!\n * @beta\n */\n KeybindingRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['KeybindingRegistry']): Service;\n }\n}\n","import { Navigator as Service } from './navigator';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'navigator';\n\nPlatformServiceName.Navigator = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | Navigator}\n */\n Navigator: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Navigator']): Service;\n }\n}\n","import { ContextAwareStateOptions, PlatformServiceName } from '../core';\nimport {\n createStateDecorator,\n StateDecoratorConfig,\n} from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectQueryParam} decorator\n * @public\n * @group Navigation\n */\nexport interface SelectQueryParamOptions extends ContextAwareStateOptions {\n /**\n * The query param to select\n */\n selector: string;\n}\n\n/**\n * Gets a named query param from the location\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Navigation\n */\nexport function SelectQueryParam(\n options: SelectQueryParamOptions\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Navigator,\n };\n\n return createStateDecorator({ context: null, ...options }, config);\n}\n","import { Command } from '../commandbus';\nimport { Location } from './navigator';\n\nconst COMMAND_ID = 'navigator.navigate' as const;\ndeclare module '../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: NavigateCommand;\n }\n}\n\n/**\n * Navigates to a new location\n *\n * @id `navigator.navigate`\n * @public\n * @group Navigation\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class NavigateCommand implements Partial<Location> {\n public path?: string;\n\n public query?: Record<string, unknown>;\n\n public hash?: string;\n\n public state?: unknown;\n}\n","import { Notifications } from './notifications';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'notifications';\n\nPlatformServiceName.Notification = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Notifications}\n */\n Notification: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Notification']): Notifications;\n }\n}\n","import { RouteRegistry as Service } from './registry';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'routeRegistry';\n\nPlatformServiceName.RouteRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | RouteRegistry}\n */\n RouteRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['RouteRegistry']): Service;\n }\n}\n","import { StateRepository } from '../core';\n\n/**\n * Service for creating background tasks\n * @public\n * @group Tasks\n */\nexport interface TaskRepository extends StateRepository {\n /**\n * Create a new background task\n *\n * @param url - url to the resource that will create the task\n * @param data - task specific data\n * @param cancelAction - true to allow task creation to be cancelled\n * @param message - notification message to display before the task is created instead of the default one\n * @returns a promise that resolves to the id of the task if it was created successfully\n */\n create(\n url: string,\n data: any,\n cancelAction?: boolean,\n message?: string\n ): Promise<string | void>;\n\n /**\n * Get status about specific tasks\n *\n * @param ids - the ids of the tasks to check\n * @returns a promise that resolves to the status about the tasks\n */\n getStatus(ids: string[]): Promise<TaskStatus[]>;\n}\n\n/**\n * @public\n * @group Tasks\n */\nexport enum TaskState {\n /**\n * Task state is unknown\n */\n Pending = 'PENDING',\n\n /**\n * Task was started by a worker\n */\n Started = 'STARTED',\n\n /**\n * Task is waiting for retry\n */\n Retry = 'RETRY',\n\n /**\n * Task succeeded\n */\n Success = 'SUCCESS',\n\n /**\n * Task failed\n */\n Failure = 'FAILURE',\n}\n\n/**\n * @public\n * @group Tasks\n */\nexport interface TaskStatus {\n /**\n * ID of the task\n */\n id: string;\n\n /**\n * The state of the task\n */\n status: TaskState;\n\n /**\n * The result of the task once it has finished its execution\n */\n result?: string;\n}\n\n/**\n * Events dispatched by the task service\n * @public\n * @group Tasks\n */\nexport enum TaskEventType {\n /**\n * Dispatched when a task has been created.\n *\n * @see {@link TaskEvent}\n */\n Created = 'task.created',\n\n /**\n * Dispatched when the task has successfully been completed\n *\n * @see {@link TaskEvent}\n */\n Success = 'task.success',\n\n /**\n * Dispatched if an error occured while running the task\n *\n * @see {@link TaskEvent}\n */\n Failed = 'task.failed',\n}\n\n/**\n * @public\n * @group Tasks\n */\nexport type TaskEventDetail = {\n task: TaskStatus;\n error?: unknown;\n};\n\n/**\n * @public\n * @group Tasks\n */\nexport type TaskEvent = CustomEvent<TaskEventDetail>;\n","import { TaskRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.tasks';\n\nPlatformServiceName.TaskRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | TaskRepository}\n */\n TaskRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['TaskRepository']): Service;\n }\n}\n","import { ConfigRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.configs';\n\nPlatformServiceName.ConfigRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | ConfigRepository}\n */\n ConfigRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['ConfigRepository']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectConfig} state decorator\n * @public\n * @group Config\n */\nexport interface SelectConfigOptions extends StateOptions {\n name?: string;\n}\n\n/**\n * Gets an object with all configs where key is used as key.\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Config\n */\nexport function SelectConfig(options: SelectConfigOptions): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.ConfigRepository,\n };\n\n return createStateDecorator(options, config);\n}\n","import { Device as Service } from './device';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.device';\n\nPlatformServiceName.Device = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | Device}\n */\n Device: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Device']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * DeviceType\n * @public\n * @group Device\n */\nexport type DeviceType = 'desktop' | 'tablet' | 'phone';\n\n/**\n * Get the current device type\n *\n * The device will only indicate roughly how big the viewport is, not what actual device is being used\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Device\n */\nexport function SelectDevice(options: StateOptions = {}): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Device,\n };\n\n return createStateDecorator(options, config);\n}\n","import { FilterRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.filters';\n\nPlatformServiceName.FilterRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | FilterRepository}\n */\n FilterRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['FilterRepository']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectFilters} state decorator\n * @public\n * @group Filters\n */\nexport interface SelectFiltersOptions extends StateOptions {\n id?: string;\n limetype?: string;\n}\n\n/**\n * Gets a list of filters\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Filters\n */\nexport function SelectFilters(\n options: SelectFiltersOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.FilterRepository,\n };\n\n return createStateDecorator(options, config);\n}\n","import { UserDataRepository } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.user-data';\n\nPlatformServiceName.UserDataRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link UserDataRepository}\n */\n UserDataRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['UserDataRepository']\n ): UserDataRepository;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectUserData} state decorator\n * @public\n * @group User data\n */\nexport interface SelectUserDataOptions extends StateOptions {\n /**\n * Key specifying the user data\n */\n key?: string;\n}\n\n/**\n * Gets an object with all user data, optionally filtered by key\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group User data\n */\nexport function SelectUserData(\n options: SelectUserDataOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.UserDataRepository,\n };\n\n return createStateDecorator(options, config);\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { ApplicationRepository } from './repository';\n\nconst SERVICE_NAME = 'state.application';\n\nPlatformServiceName.Application = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link ApplicationRepository}\n */\n Application: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['Application']\n ): ApplicationRepository;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\n\n/**\n * Get the name of the application\n *\n * @param options - options for the state selector\n * @returns state decorator\n * @public\n * @group Application\n */\nexport function SelectApplicationName(\n options: StateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Application,\n };\n options.map = [getApplicationName, ...(options.map || [])];\n\n return createStateDecorator(options, config);\n}\n\nfunction getApplicationName(applicationData: any) {\n return applicationData.applicationName;\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\n\n/**\n * Get the currently logged in user\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Application\n */\nexport function SelectCurrentUser(\n options: StateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Application,\n };\n options.map = [getCurrentUser, ...(options.map || [])];\n\n return createStateDecorator(options, config);\n}\n\nfunction getCurrentUser(applicationData: any) {\n return applicationData.currentUser;\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\n\n/**\n * Get the application session\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Application\n */\nexport function SelectSession(options: StateOptions = {}): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Application,\n };\n options.map = [getSession, ...(options.map || [])];\n\n return createStateDecorator(options, config);\n}\n\nfunction getSession(applicationData: any) {\n return applicationData.session;\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { UserPreferencesRepository } from './repository';\n\nconst SERVICE_NAME = 'userPreferences';\n\nPlatformServiceName.UserPreferencesRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link UserPreferencesRepository}\n */\n UserPreferencesRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['UserPreferencesRepository']\n ): UserPreferencesRepository;\n }\n}\n","import { DateTimeFormatter } from './datetimeformatter';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'datetimeformatter';\n\nPlatformServiceName.DateTimeFormatter = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link DateTimeFormatter}\n */\n DateTimeFormatter: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['DateTimeFormatter']\n ): DateTimeFormatter;\n }\n}\n","import { Action } from '../action';\nimport { LimeObject } from '../limeobject';\n\n/**\n * This interface defines callbacks intended to be registered to the {@link Condition} registry\n *\n * @beta\n * @group Conditions\n */\nexport type Condition<T = unknown> = {\n /**\n * The condition type, describing what to evaluate the condition for, for example \"limeobject\"\n */\n type: string;\n\n /**\n * The evaluation function relating to this condition, serves the role of a predicate\n *\n * @param subject - some value depending on the condition type to evaluate the condition for,\n * such as the current limeobject\n * @param params - any additional data that this condition may expect, such as configuration\n * data from an action visibility condition\n * @throws may throw an error if the second argument has an unexpected type\n */\n evaluate: (subject: T, params?: unknown) => boolean;\n\n /*\n * The condition's identifier, intended to be unique\n */\n id: string;\n};\n\n/**\n * A condition to evaluate for a {@link LimeObject}\n *\n * @beta\n * @group Conditions\n */\nexport type LimeObjectCondition = Condition<LimeObject> & {\n type: 'limeobject';\n};\n\n/**\n * A condition to evaluate for an {@link Action}\n *\n * @beta\n * @group Conditions\n */\nexport type ActionCondition = Condition<Action> & {\n type: 'action';\n};\n\n/**\n * Check if condition expects a lime object to be passed when it is evaluated\n *\n * @beta\n * @group Conditions\n */\nexport function isLimeObjectCondition(\n condition: Condition\n): condition is Condition<LimeObject> {\n return condition.type === 'limeobject';\n}\n\n/**\n * Check if condition expects an action to be passed when it is evaluated\n *\n * @beta\n * @group Conditions\n */\nexport function isActionCondition(\n condition: Condition\n): condition is Condition<Action> {\n return condition.type === 'action';\n}\n\n/**\n * Service for adding and retrieving, and checking {@link Condition}s to and from the condition registry\n *\n * @beta\n * @group Conditions\n */\nexport interface ConditionRegistry {\n /**\n * Add a {@link Condition} to the registry\n *\n * @param condition - the condition to pass to the registry\n * @throws error if the id already exists in the registry\n */\n addCondition(condition: Condition);\n\n /**\n * Remove a {@link Condition} from the registry\n *\n * @param condition - the condition to remove\n * @throws error if the id does not exist in the registry\n */\n removeCondition(condition: Condition);\n\n /**\n * Checks if a {@link Condition} exists on the registry\n *\n * @param id - id of the condition\n * @returns true if it exists, false otherwise\n */\n hasCondition(id: string): boolean;\n\n /**\n * Gets all {@link Condition}s\n *\n * @returns a list of all existing conditions\n */\n getConditions(): Condition[];\n\n /**\n * Gets a {@link Condition} by id\n *\n * @param id - id of the condition\n * @throws error if no condition was found with the specified id\n * @returns the condition with the specified id\n */\n getCondition(id: string): Condition;\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { ConditionRegistry as Service } from './conditionregistry';\n\nconst SERVICE_NAME = 'conditionRegistry';\n\nPlatformServiceName.ConditionRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | ConditionRegistry}\n */\n ConditionRegistry: typeof SERVICE_NAME;\n }\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['ConditionRegistry']): Service;\n }\n}\n","import { ViewFactoryRegistry } from './registry';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'viewFactoryRegistry';\n\nPlatformServiceName.ViewFactoryRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @beta\n * @see {@link ViewFactoryRegistry}\n */\n ViewFactoryRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n /**\n * @beta\n */\n get(\n name: PlatformServiceNameType['ViewFactoryRegistry']\n ): ViewFactoryRegistry;\n }\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { WebComponentRegistry } from './registry';\n\nconst SERVICE_NAME = 'webComponentRegistry';\n\nPlatformServiceName.WebComponentRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link WebComponentRegistry}\n */\n WebComponentRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['WebComponentRegistry']\n ): WebComponentRegistry;\n }\n}\n","import { NotificationRepository } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.notifications';\n\nPlatformServiceName.NotificationRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link NotificationRepository}\n */\n NotificationRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['NotificationRepository']\n ): NotificationRepository;\n }\n}\n","import { PollerFactory as PollerFactoryService } from './factory';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'pollerFactory';\n\nPlatformServiceName.PollerFactory = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link PollerFactoryService}\n */\n PollerFactory: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['PollerFactory']\n ): PollerFactoryService;\n }\n}\n"],"names":["PlatformServiceName","IdleStateEventName","isRelation","property","isSingleRelation","isDate","isString","isFloat","SERVICE_NAME","extendStatics","d","b","p","__extends","__","__values","o","s","m","i","__read","n","r","ar","e","error","__spreadArray","to","from","pack","l","isFunction","value","createErrorClass","createImpl","_super","instance","ctorFunc","UnsubscriptionError","errors","err","arrRemove","arr","item","index","Subscription","initialTeardown","e_1","_a","e_2","_b","_parentage","_parentage_1","_parentage_1_1","parent_1","e_1_1","initialFinalizer","_finalizers","_finalizers_1","_finalizers_1_1","finalizer","execFinalizer","e_2_1","teardown","parent","empty","EMPTY_SUBSCRIPTION","isSubscription","config","timeoutProvider","handler","timeout","args","_i","handle","reportUnhandledError","noop","errorContext","cb","Subscriber","destination","_this","EMPTY_OBSERVER","next","complete","SafeSubscriber","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","defaultErrorHandler","observable","identity","x","pipeFromArray","fns","input","prev","fn","Observable","subscribe","operator","subscriber","isSubscriber","source","sink","promiseCtor","getPromiseCtor","resolve","reject","Symbol_observable","operations","isObserver","ObjectUnsubscribedError","Subject","subject","AnonymousSubject","_c","observer","observers","hasError","isStopped","thrownError","BehaviorSubject","_value","subscription","defaultOptionFactory","options","createStateDecorator","target","properties","getComponentProperties","extendLifecycleMethods","componentProperties","componentSubscriptions","connectedComponents","component","createConnectedCallback","createComponentWillLoad","createDisconnectedCallback","original","ensureLimeProps","watchProp","isContextAware","result","unsubscribeAll","promises","waitForProp","element","getElement","get","set","createSubscription","unsubscribe","mapState","state","myOptions","bindFunctions","name","platform","scope","func","SelectLimeTypes","SelectCurrentLimeType","currentLimetype","limetypes","limetype","findLimetypeByLabel","label","hasLabel","getPropertiesByType","type","getPropertyByLabel","getPropertyByName","propertyName","object","SelectLimeObjects","createOptions","SelectCurrentLimeObject","currentLimeobject","limeobjects","id","CommandEventName","Command","commandClass","setCommandId","setHasInstance","getCommandIds","getCommandId","ids","COMMAND_ID","BulkCreateDialogCommand","__decorateClass","CreateLimeobjectDialogCommand","DeleteObjectCommand","OpenObjectAccessDialogCommand","SaveLimeObjectCommand","Operator","AggregateOperator","HttpMethod","SelectQueryParam","NavigateCommand","TaskState","TaskEventType","SelectConfig","SelectDevice","SelectFilters","SelectUserData","SelectApplicationName","getApplicationName","applicationData","SelectCurrentUser","getCurrentUser","SelectSession","getSession","isLimeObjectCondition","condition","isActionCondition"],"mappings":";AA8CO,MAAMA,IAA+C;AAAA,EACxD,OAAO;AACX,GCtBaC,KAAqB;AC4D3B,SAASC,GAAWC,GAAwB;AAQ/C,SAAOA,KAP2B;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,EAE6B,SAASA,EAAS,IAAI;AACvD;AAMO,SAASC,GAAiBD,GAAwB;AAGrD,SAAOA,KAF2B,CAAC,aAAa,QAAQ,EAE3B,SAASA,EAAS,IAAI;AACvD;AAMO,SAASE,GAAOF,GAAwB;AAU3C,SAAOA,KAT2B;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,EAE6B,SAASA,EAAS,IAAI;AACvD;AAMO,SAASG,GAASH,GAAwB;AAG7C,SAAOA,KAF2B,CAAC,UAAU,QAAQ,SAAS,MAAM,EAEvC,SAASA,EAAS,IAAI;AACvD;AAMO,SAASI,GAAQJ,GAAwB;AAG5C,SAAOA,KAF2B,CAAC,WAAW,SAAS,EAE1B,SAASA,EAAS,IAAI;AACvD;AC3IA,MAAMK,KAAe;AAErBR,EAAoB,qBAAqBQ;ACWzC,IAAIC,IAAgB,SAASC,GAAGC,GAAG;AACjC,SAAAF,IAAgB,OAAO,kBAClB,EAAE,WAAW,CAAA,eAAgB,SAAS,SAAUC,GAAGC,GAAG;AAAE,IAAAD,EAAE,YAAYC;AAAA,EAAE,KACzE,SAAUD,GAAGC,GAAG;AAAE,aAASC,KAAKD,EAAG,CAAI,OAAO,UAAU,eAAe,KAAKA,GAAGC,CAAC,MAAGF,EAAEE,CAAC,IAAID,EAAEC,CAAC;AAAA,EAAI,GAC9FH,EAAcC,GAAGC,CAAC;AAC3B;AAEO,SAASE,EAAUH,GAAGC,GAAG;AAC9B,MAAI,OAAOA,KAAM,cAAcA,MAAM;AACjC,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,EAAG,GAElDC,EAAqBD,GAAS3D,CAAM;AAC/C;AAEA,SAAS6I,GAAmBC,GAAsB;AAC9C,SAAOA,EAAgB;AAC3B;ACbgB,SAAAC,GACZpF,IAAwB,IACP;AACjB,QAAM3D,IAA+B;AAAA,IACjC,MAAMpE,EAAoB;AAAA,EAC9B;AACA,SAAA+H,EAAQ,MAAM,CAACqF,IAAgB,GAAIrF,EAAQ,OAAO,EAAG,GAE9CC,EAAqBD,GAAS3D,CAAM;AAC/C;AAEA,SAASgJ,GAAeF,GAAsB;AAC1C,SAAOA,EAAgB;AAC3B;ACbgB,SAAAG,GAActF,IAAwB,IAAuB;AACzE,QAAM3D,IAA+B;AAAA,IACjC,MAAMpE,EAAoB;AAAA,EAC9B;AACA,SAAA+H,EAAQ,MAAM,CAACuF,IAAY,GAAIvF,EAAQ,OAAO,EAAG,GAE1CC,EAAqBD,GAAS3D,CAAM;AAC/C;AAEA,SAASkJ,GAAWJ,GAAsB;AACtC,SAAOA,EAAgB;AAC3B;ACvBA,MAAM1M,KAAe;AAErBR,EAAoB,4BAA4BQ;ACFhD,MAAMA,KAAe;AAErBR,EAAoB,oBAAoBQ;ACqDjC,SAAS+M,GACZC,GACkC;AAClC,SAAOA,EAAU,SAAS;AAC9B;AAQO,SAASC,GACZD,GAC8B;AAC9B,SAAOA,EAAU,SAAS;AAC9B;ACvEA,MAAMhN,KAAe;AAErBR,EAAoB,oBAAoBQ;ACFxC,MAAMA,KAAe;AAErBR,EAAoB,sBAAsBQ;ACF1C,MAAMA,KAAe;AAErBR,EAAoB,uBAAuBQ;ACF3C,MAAMA,KAAe;AAErBR,EAAoB,yBAAyBQ;ACF7C,MAAMA,KAAe;AAErBR,EAAoB,gBAAgBQ;","x_google_ignoreList":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/core/platform.ts","../src/core/idle.ts","../src/limetype/property.ts","../src/limetype/types.ts","../node_modules/tslib/tslib.es6.mjs","../node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../node_modules/rxjs/dist/esm5/internal/Subscription.js","../node_modules/rxjs/dist/esm5/internal/config.js","../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../node_modules/rxjs/dist/esm5/internal/util/noop.js","../node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../node_modules/rxjs/dist/esm5/internal/Subscriber.js","../node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../node_modules/rxjs/dist/esm5/internal/util/identity.js","../node_modules/rxjs/dist/esm5/internal/util/pipe.js","../node_modules/rxjs/dist/esm5/internal/Observable.js","../node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","../node_modules/rxjs/dist/esm5/internal/Subject.js","../node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js","../src/core/decorators/factory.ts","../src/limetype/decorator.ts","../src/limetype/find-limetype-by-label.ts","../src/limetype/get-properties-by-type.ts","../src/limetype/get-property-by-label.ts","../src/limetype/get-property-by-name.ts","../src/limetype/has-label.ts","../src/limeobject/types.ts","../src/limeobject/decorator.ts","../src/commandbus/commandbus.ts","../src/commandbus/types.ts","../src/limeobject/commands/bulk-create-dialog.ts","../src/limeobject/commands/create-dialog.ts","../src/limeobject/commands/delete-object.ts","../src/limeobject/commands/object-access.ts","../src/limeobject/commands/save-object.ts","../src/query/query.ts","../src/query/types.ts","../src/http/http.ts","../src/http/types.ts","../src/eventdispatcher/types.ts","../src/translator/types.ts","../src/dialog/types.ts","../src/keybindings/types.ts","../src/navigator/types.ts","../src/navigator/decorator.ts","../src/navigator/command.ts","../src/notifications/types.ts","../src/routeregistry/types.ts","../src/task/repository.ts","../src/task/types.ts","../src/config/types.ts","../src/config/decorator.ts","../src/device/types.ts","../src/device/decorator.ts","../src/filter/types.ts","../src/filter/decorator.ts","../src/userdata/types.ts","../src/userdata/decorator.ts","../src/application/types.ts","../src/application/decorators/application.ts","../src/application/decorators/user.ts","../src/application/decorators/session.ts","../src/userpreferences/types.ts","../src/datetimeformatter/types.ts","../src/conditionregistry/conditionregistry.ts","../src/conditionregistry/types.ts","../src/view/types.ts","../src/webcomponent/types.ts","../src/notification-service/types.ts","../src/poller/types.ts"],"sourcesContent":["/**\n * Service container for the Lime CRM platform\n * @public\n * @group Core\n */\nexport interface LimeWebComponentPlatform {\n type: 'LimeCRMWebClient' | 'LimeCRMDesktopClient' | 'LimeCRMWebAdminClient';\n\n /**\n * Get a service\n *\n * @param name - the name of the service\n */\n get(name: string): any;\n\n /**\n * Check if a service is currently registered on the platform\n *\n * @param name - the name of the service\n */\n has(name: string): boolean;\n\n /**\n * Register a service on the platform\n *\n * Core platform service names are defined by the enum `PlatformServiceName`. Third parties that wants to register\n * a service should add a prefix to the service name, e.g. the plugin name.\n *\n * @param name - the name of the service\n * @param service - the service\n */\n register(name: string, service: any): void;\n\n /**\n * Check if a feature is enabled\n *\n * @param name - name of the feature switch\n */\n isFeatureEnabled(name: keyof FeatureSwitches): boolean;\n}\n\n/**\n * Core platform service names\n * @public\n * @group Core\n */\nexport const PlatformServiceName: PlatformServiceNameType = {\n Route: 'route',\n} as any;\n\n/**\n * @public\n * @group Core\n */\nexport interface PlatformServiceNameType {}\n\n/**\n * Available feature switches\n *\n * @public\n * @group Core\n */\nexport interface FeatureSwitches {}\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { EventDispatcher } from '../eventdispatcher';\n\n/**\n * The user's idle state. When set to `active` the user is actively using the\n * application. When set to `idle`, the user has either minimized the\n * application or not used it actively for a while.\n * @beta\n * @group Core\n */\nexport type IdleState = 'active' | 'idle';\n\n/**\n * The event emitted by {@link EventDispatcher} when the user's idle state\n * changes\n * @beta\n * @group Core\n */\nexport type IdleStateChangeEvent = CustomEvent<{ state: IdleState }>;\n\n/**\n * Name of the event emitted by {@link EventDispatcher} when the user's idle\n * state changes\n * @beta\n * @group Core\n */\nexport const IdleStateEventName = 'idle-state' as const;\n","import { Acl } from './acl';\nimport { LimeType } from './limetype';\n\n/**\n * @public\n * @group Lime types\n */\nexport interface LimeProperty {\n acl: Acl;\n defaultvalue: any;\n fieldorder: number;\n has_sql?: boolean;\n label: string;\n length?: number;\n localname: string;\n name: string;\n required: boolean;\n type: PropertyType;\n options?: Option[];\n relation?: {\n getLimetype: () => LimeType;\n getBackreference: () => LimeProperty;\n };\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport interface Option {\n key: string;\n inactive: boolean;\n text: string;\n order?: number;\n id?: number;\n}\n\n/**\n * The subset of `PropertyType`s that represent a date or time of some kind.\n *\n * **NOTE**<br>\n * For legacy reasons:\n * - the type `time` represents a value with date _and_ time\n * - the type `timeofday` represents a value with _only_ time\n * - there is no type for \"week\"; instead week properties use the type `time` and are configured as \"week\" in the applicable view config\n *\n * @public\n * @group Lime types\n */\nexport type DateTimePropertyType =\n | 'time'\n | 'timeofday'\n | 'date'\n | 'year'\n | 'quarter'\n | 'month';\n\n/**\n * @public\n * @group Lime types\n */\nexport type PropertyType =\n | 'string'\n | 'text'\n | 'phone'\n | 'integer'\n | 'decimal'\n | 'percent'\n | 'yesno'\n | 'link'\n | 'user'\n | 'xml'\n | 'option'\n | 'set'\n | 'file'\n | 'hasone'\n | 'hasmany'\n | 'belongsto'\n | 'hasandbelongstomany'\n | 'system'\n | DateTimePropertyType;\n\n/**\n * @public\n * @group Lime types\n */\nexport function isRelation(property: LimeProperty) {\n const propTypes: PropertyType[] = [\n 'belongsto',\n 'hasone',\n 'hasmany',\n 'hasandbelongstomany',\n ];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isSingleRelation(property: LimeProperty) {\n const propTypes: PropertyType[] = ['belongsto', 'hasone'];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isDate(property: LimeProperty) {\n const propTypes: PropertyType[] = [\n 'time',\n 'timeofday',\n 'date',\n 'year',\n 'quarter',\n 'month',\n ];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isString(property: LimeProperty) {\n const propTypes: PropertyType[] = ['string', 'text', 'phone', 'link'];\n\n return property && propTypes.includes(property.type);\n}\n\n/**\n * @public\n * @group Lime types\n */\nexport function isFloat(property: LimeProperty) {\n const propTypes: PropertyType[] = ['decimal', 'percent'];\n\n return property && propTypes.includes(property.type);\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { LimeTypeRepository } from './repository';\n\nconst SERVICE_NAME = 'state.limetypes';\n\nPlatformServiceName.LimeTypeRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link LimeTypeRepository}\n */\n LimeTypeRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['LimeTypeRepository']\n ): LimeTypeRepository;\n }\n}\n","/******************************************************************************\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","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, (this._value = value));\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","import {\n LimeWebComponent,\n LimeWebComponentPlatform,\n ContextAwareStateOptions,\n StateOptions,\n} from '..';\nimport { getElement } from '@stencil/core';\nimport { BehaviorSubject, Observer } from 'rxjs';\n\ntype OptionFactory = (\n options: StateOptions,\n component: LimeWebComponent\n) => StateOptions;\n\n/**\n * @group Core\n * @internal\n */\nexport interface StateDecoratorConfig {\n /**\n * Name of the state service to use in the platform\n */\n name: string;\n\n /**\n * Name of the method on the service to use\n */\n method?: string;\n\n /**\n * Factory for creating options dynamically\n *\n * @param options - decorator options\n * @param component - the web component\n * @returns state options\n */\n optionFactory?: OptionFactory;\n}\n\ninterface Component {\n connectedCallback: () => void | Promise<void>;\n componentWillLoad: () => void | Promise<void>;\n componentWillUpdate: () => void | Promise<void>;\n componentDidUnload: () => void;\n disconnectedCallback: () => void | Promise<void>;\n}\n\ninterface Property {\n name: string;\n options: StateOptions;\n optionFactory?: OptionFactory;\n service: {\n name: string;\n method: string;\n };\n}\n\nfunction defaultOptionFactory(options: StateOptions) {\n return options;\n}\n\n/**\n * Create a new state decorator\n *\n * @param options - decorator options\n * @param config - decorator configuration\n * @returns state decorator\n * @public\n */\nexport function createStateDecorator(\n options: StateOptions,\n config: StateDecoratorConfig\n): PropertyDecorator {\n return (target: Component, property: string) => {\n const properties = getComponentProperties(\n target,\n property,\n options,\n config\n );\n\n if (properties.length === 1) {\n extendLifecycleMethods(target, properties);\n }\n };\n}\n\nconst componentProperties = new WeakMap<Component, Property[]>();\nconst componentSubscriptions = new WeakMap<any, Array<() => void>>();\nconst connectedComponents = new WeakMap<any, boolean>();\n\n/**\n * Get properties data for a component\n *\n * @param component - the component class containing the decorator\n * @param property - name of the property\n * @param options - decorator options\n * @param config - decorator configuration\n * @returns properties data for the component\n */\nfunction getComponentProperties(\n component: Component,\n property: string,\n options: StateOptions,\n config: StateDecoratorConfig\n): Property[] {\n let properties = componentProperties.get(component);\n if (!properties) {\n properties = [];\n componentProperties.set(component, properties);\n }\n\n properties.push({\n options: options,\n name: property,\n optionFactory: config.optionFactory || defaultOptionFactory,\n service: {\n name: config.name,\n method: config.method || 'subscribe',\n },\n });\n\n return properties;\n}\n\n/**\n * Extend the lifecycle methods on the component\n *\n * @param component - the component to extend\n * @param properties - the properties with which to extend the component\n * @returns\n */\nfunction extendLifecycleMethods(component: Component, properties: Property[]) {\n // `componentWillLoad` and `componentDidUnload` is included for backwards\n // compatibility reasons. The correct way to setup the subscriptions is in\n // `connectedCallback` and `disconnectedCallback`, but since not all\n // plugins might implement those methods yet we still have include them\n // until we make `connectedCallback` and `disconnectedCallback` required\n // on the interface.\n\n component.connectedCallback = createConnectedCallback(\n component.connectedCallback,\n properties\n );\n component.componentWillLoad = createComponentWillLoad(\n component.componentWillLoad,\n properties\n );\n component.componentDidUnload = createDisconnectedCallback(\n component.componentDidUnload\n );\n component.disconnectedCallback = createDisconnectedCallback(\n component.disconnectedCallback\n );\n}\n\nfunction createConnectedCallback(original: Function, properties: Property[]) {\n return async function (this: LimeWebComponent, ...args) {\n connectedComponents.set(this, true);\n componentSubscriptions.set(this, []);\n await ensureLimeProps(this);\n\n const observable = new BehaviorSubject(this.context);\n watchProp(this, 'context', observable);\n\n properties.forEach((property) => {\n property.options = property.optionFactory(property.options, this);\n if (isContextAware(property.options)) {\n property.options.context = observable;\n }\n\n subscribe(this, property);\n });\n\n if (original) {\n return original.apply(this, args);\n }\n };\n}\n\nfunction createComponentWillLoad(original: Function, properties: Property[]) {\n return async function (...args) {\n if (connectedComponents.get(this) === true) {\n await ensureLimeProps(this);\n if (original) {\n return original.apply(this, args);\n }\n\n return;\n }\n\n const connectedCallback = createConnectedCallback(original, properties);\n\n return connectedCallback.apply(this, args);\n };\n}\n\nfunction createDisconnectedCallback(original: Function) {\n return async function (...args) {\n let result;\n if (original) {\n result = original.apply(this, args);\n }\n\n unsubscribeAll(this);\n\n return result;\n };\n}\n\n/**\n * Check if the options are context aware\n *\n * @param options - state decorator options\n * @returns true if the options are context aware\n */\nfunction isContextAware(options: object): options is ContextAwareStateOptions {\n return 'context' in options;\n}\n\n/**\n * Make sure that all required lime properties are set on the web component\n *\n * @param target - the web component\n * @returns a promise that resolves when all properties are defined\n */\nfunction ensureLimeProps(target: LimeWebComponent): Promise<any> {\n const promises = [];\n if (!target.platform) {\n promises.push(waitForProp(target, 'platform'));\n }\n\n if (!target.context) {\n promises.push(waitForProp(target, 'context'));\n }\n\n if (!promises.length) {\n return Promise.resolve();\n }\n\n return Promise.all(promises);\n}\n\n/**\n * Wait for a property to be defined on an object\n *\n * @param target - the web component\n * @param property - the name of the property to watch\n * @returns a promise that will resolve when the property is set on the object\n */\nfunction waitForProp(\n target: LimeWebComponent,\n property: string\n): Promise<void> {\n const element = getElement(target);\n\n return new Promise((resolve) => {\n Object.defineProperty(element, property, {\n configurable: true,\n set: (value: any) => {\n delete element[property];\n element[property] = value;\n resolve();\n },\n });\n });\n}\n\nfunction watchProp<T>(\n target: LimeWebComponent,\n property: string,\n observer: Observer<T>\n) {\n const element = getElement(target);\n\n const { get, set } = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(element),\n property\n );\n\n Object.defineProperty(element, property, {\n configurable: true,\n get: get,\n set: function (value: T) {\n set.call(this, value);\n observer.next(value);\n },\n });\n}\n\n/**\n * Subscribe to changes from the state\n *\n * @param component - the component instance\n * @param property - property to update when subscription triggers\n * @returns\n */\nfunction subscribe(component: any, property: Property): void {\n const subscription = createSubscription(component, property);\n if (typeof subscription !== 'function') {\n return;\n }\n\n const subscriptions = componentSubscriptions.get(component);\n subscriptions.push(subscription);\n}\n\n/**\n * Unsubscribe to changes from the state\n *\n * @param component - the instance of the component\n * @returns\n */\nfunction unsubscribeAll(component: any): void {\n const subscriptions = componentSubscriptions.get(component);\n\n subscriptions.forEach((unsubscribe) => unsubscribe());\n componentSubscriptions.set(component, []);\n}\n\n/**\n * Get a function that accepts a state, and updates the given property\n * on the given component with that state\n *\n * @param instance - the component to augment\n * @param property - name of the property on the component\n * @returns updates the state\n */\nfunction mapState(instance: any, property: string) {\n return (state: any) => {\n instance[property] = state;\n };\n}\n\n/**\n * Create a state subscription\n *\n * @param component - the component instance\n * @param property - the property on the component\n * @returns unsubscribe function\n */\nfunction createSubscription(component: any, property: Property): () => void {\n const myOptions = { ...property.options };\n bindFunctions(myOptions, component);\n const name = property.service.name;\n\n const platform: LimeWebComponentPlatform = component.platform;\n if (!platform.has(name)) {\n throw new Error(`Service ${name} does not exist`);\n }\n\n const service: any = platform.get(name);\n\n return service[property.service.method](\n mapState(component, property.name),\n myOptions\n );\n}\n\n/**\n * Bind connect functions to the current scope\n *\n * @param options - options for the selector\n * @param scope - the current scope to bind to\n * @returns\n */\nfunction bindFunctions(options: StateOptions, scope: any) {\n if (options.filter) {\n options.filter = options.filter.map((func) => func.bind(scope));\n }\n\n if (options.map) {\n options.map = options.map.map((func) => func.bind(scope));\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n ContextAwareStateOptions,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectLimeTypes} state decorator\n * @public\n * @group Lime types\n */\nexport interface SelectLimeTypesOptions extends StateOptions {\n name?: string;\n}\n\n/**\n * Gets an object with all limetypes where name is used as key\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime types\n */\nexport function SelectLimeTypes(\n options: SelectLimeTypesOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeTypeRepository,\n };\n\n return createStateDecorator(options, config);\n}\n\n/**\n * Get the limetype for the current context\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime types\n */\nexport function SelectCurrentLimeType(\n options: ContextAwareStateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeTypeRepository,\n };\n options.map = [currentLimetype, ...(options.map || [])];\n options.context = null;\n\n return createStateDecorator(options, config);\n}\n\nfunction currentLimetype(limetypes: any) {\n const { limetype } = this.context;\n\n return limetypes[limetype];\n}\n","import { hasLabel, LimeType } from '.';\n\n/**\n * Creates a function to find a limetype by its label in a collection of limetypes.\n *\n * The returned function searches through a collection of limetypes and returns\n * the first one that matches the given label. This function is typically used\n * to generate a callback for decorators or other higher-order logic.\n *\n * @param label - The label of the limetype to find.\n * @returns A function that takes a collection of limetypes and returns the first\n * limetype that matches the label, or `undefined` if no match is found.\n *\n * @example\n * ```typescript\n * import { findLimetypeByLabel } from '@limetech/lime-web-components';\n *\n * const limetypes = {\n * company: { label: 'company', properties: {} },\n * person: { label: 'person', properties: {} },\n * };\n *\n * const findPersonLimetype = findLimetypeByLabel('person');\n * const personLimetype = findPersonLimetype(limetypes);\n * console.log(personLimetype); // { label: 'person', properties: {} }\n * ```\n *\n * @example\n * ```typescript\n * // Using `findLimetypeByLabel` as a callback for a decorator\n * import { findLimetypeByLabel, SelectLimeTypes } from '@limetech/lime-web-components';\n *\n * @SelectLimeTypes({\n * map: [findLimetypeByLabel('person')],\n * })\n * private personLimetype: LimeType;\n * ```\n *\n * @public\n * @group Lime types\n */\nexport const findLimetypeByLabel =\n (label: string) => (limetypes: Record<string, LimeType>) => {\n return Object.values(limetypes).find(hasLabel(label));\n };\n","import { LimeProperty, LimeType, PropertyType } from '.';\n\n/**\n * Retrieves all properties of a specific type from a limetype.\n *\n * This function filters the properties of a limetype and returns\n * those that match the specified property type.\n *\n * @param limetype - The limetype containing the properties.\n * @param type - The type of properties to retrieve.\n * @returns An array of properties that match the specified type.\n *\n * @public\n * @group Lime types\n */\nexport function getPropertiesByType(\n limetype: LimeType,\n type: PropertyType\n): LimeProperty[] {\n return Object.values(limetype.properties).filter(\n (property) => property.type === type\n );\n}\n","import { hasLabel, LimeProperty, LimeType } from '.';\n\n/**\n * Retrieves a property from a limetype by its label.\n *\n * This function searches through the properties of a given limetype\n * and returns the first property that matches the specified label.\n *\n * @param limetype - The limetype containing the properties.\n * @param label - The label of the property to retrieve.\n * @returns The property with the specified label, or `undefined` if no match is found.\n *\n * @public\n * @group Lime types\n */\nexport function getPropertyByLabel(\n limetype: LimeType,\n label: string\n): LimeProperty | undefined {\n return Object.values(limetype.properties).find(hasLabel(label));\n}\n","import { LimeProperty, LimeType } from '.';\n\n/**\n * Retrieves a property from a limetype by its name.\n *\n * This function extracts a specific property from a given limetype\n * based on the property's name.\n *\n * @param limetype - The limetype containing the properties.\n * @param propertyName - The name of the property to retrieve.\n * @returns The property with the specified name.\n * @throws Will throw an error if the property name does not exist in the limetype.\n *\n * @public\n * @group Lime types\n */\nexport function getPropertyByName(\n limetype: LimeType,\n propertyName: string\n): LimeProperty {\n return limetype.properties[propertyName];\n}\n","import { LimeProperty, LimeType } from '.';\n\n/**\n * Creates a function to check if a given object has a specific label.\n *\n * The returned function takes an object (a `LimeType` or `LimeProperty`) and\n * checks whether it contains the specified label. This function is typically\n * used as a callback for array methods like `.find` or `.filter`.\n *\n * @param label - The label to check for.\n * @returns A function that takes an optional object and returns `true` if the label matches, or `false` otherwise.\n *\n * @example\n * ```typescript\n * import { hasLabel } from '@limetech/lime-web-components';\n *\n * const properties = [\n * { label: 'name', type: 'string' },\n * { label: 'email', type: 'string' },\n * ];\n *\n * const emailProperty = properties.find(hasLabel('email'));\n * console.log(emailProperty); // { label: 'email', type: 'string' }\n * ```\n *\n * @public\n * @group Lime types\n */\nexport const hasLabel =\n (label: string) => (object?: LimeType | LimeProperty) => {\n return object?.label === label;\n };\n","import { LimeObjectRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.limeobjects';\n\nPlatformServiceName.LimeObjectRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | LimeObjectRepository}\n */\n LimeObjectRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['LimeObjectRepository']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n LimeWebComponent,\n ContextAwareStateOptions,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectLimeObjects} state decorator\n * @public\n * @group Lime objects\n */\nexport interface SelectLimeObjectsOptions extends StateOptions {\n /**\n * LimeType of the object\n */\n limetype?: string;\n\n /**\n * A function to get the limetype\n */\n getLimetype?: (component: LimeWebComponent) => string;\n\n /**\n * Id of the limeobject\n */\n id?: number;\n}\n\n/**\n * Get a list of limeobjects\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime objects\n */\nexport function SelectLimeObjects(\n options: SelectLimeObjectsOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeObjectRepository,\n optionFactory: createOptions,\n };\n\n return createStateDecorator(options, config);\n}\n\n/**\n * Get the limeobject for the current context\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Lime objects\n */\nexport function SelectCurrentLimeObject(\n options: ContextAwareStateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.LimeObjectRepository,\n };\n options.map = [currentLimeobject, ...(options.map || [])];\n options.context = null;\n\n return createStateDecorator(options, config);\n}\n\nfunction currentLimeobject(limeobjects: Record<string, Array<{ id: string }>>) {\n const { limetype, id } = this.context;\n\n if (!limeobjects[limetype]) {\n return undefined;\n }\n\n return limeobjects[limetype].find((object) => object.id === id);\n}\n\nfunction createOptions(\n options: SelectLimeObjectsOptions,\n component: LimeWebComponent\n): StateOptions {\n if (options.getLimetype) {\n options.limetype = options.getLimetype(component);\n }\n\n return options;\n}\n","import { LimeWebComponentContext, ConfigMetadata } from '../core';\nimport { Expression } from '../query';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LimeObject } from '../limeobject';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LimeType } from '../limetype';\n\n/**\n * A generic command\n *\n * @public\n * @group Command bus\n */\nexport interface AnyCommand {}\n\n/**\n * A command operating on a single {@link LimeObject}\n *\n * @public\n * @group Command bus\n */\nexport interface LimeObjectCommand extends AnyCommand {\n /**\n * Context describing the {@link LimeObject} the command will operate on\n */\n context: LimeWebComponentContext & { limetype: string; id: number };\n}\n\n/**\n * A command operating on multiple {@link LimeObject}s of a single {@link LimeType}\n *\n * @public\n * @group Command bus\n */\nexport interface LimeObjectBulkCommand extends AnyCommand {\n /**\n * Context describing the {@link LimeType} the command will operate on. If\n * `parent` is set on the context, it indicates that the {@link LimeObject}s\n * are all related to a common parent {@link LimeObject} via a `belongsto`\n * relation\n */\n context: LimeWebComponentContext & { limetype: string };\n\n /**\n * An expression describing what {@link LimeObject}s to operate on\n */\n filter: Expression | null;\n}\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandClass<T extends AnyCommand = AnyCommand> = new (\n ...args: any[]\n) => T;\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandIdentifier<T extends AnyCommand = AnyCommand> =\n | CommandClass<T>\n | string;\n\n/**\n * Service for registering and executing commands\n * @public\n * @group Command bus\n */\nexport interface CommandBus extends CommandHandler {\n /**\n * Register a command to be executed by the given handler\n *\n * @param commandClass - type of command\n * @param handler - the handler instance used to execute the command\n */\n register(commandClass: CommandClass, handler: CommandHandler): void;\n\n /**\n * Register a command to be executed by the given handler\n *\n * @param commandClass - type of command\n * @param handler - the handler instance used to execute the command\n * @param metadata - metadata for the command\n * @beta\n */\n register(\n commandClass: CommandClass,\n handler: CommandHandler,\n // TODO combine signatures when CommandMetadata is also public\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n metadata?: Omit<CommandMetadata, 'id'>\n ): void;\n\n /**\n * Execute the given command with it's registered command handler\n *\n * @param command - command to execute\n *\n * @returns result from the command handler\n */\n handle(command: AnyCommand): any;\n\n /**\n * Check if a command is supported\n *\n * @param commandId - identifier of the command. Can be either the class or the string the class was registered with\n *\n * @returns true if the command is supported, false otherwise\n */\n isSupported(commandId: CommandIdentifier): boolean;\n\n /**\n * Get a handler associated with a command\n *\n * @param commandClass - The command class\n *\n * @returns the handler for the command class\n */\n getHandler(commandClass: CommandClass): CommandHandler;\n\n /**\n * Get a list of configs for all registered commands\n *\n * @beta\n */\n getAll?(): CommandMetadata[];\n\n /**\n * Create a command instance from a {@link CommandConfig}\n *\n * @param config - The command configuration\n * @throws Thrown if the command has not been registered yet\n */\n createCommand<Key extends keyof CommandRegistry>(\n config: CommandConfig<CommandRegistry[Key], Key>\n ): CommandRegistry[Key];\n createCommand<T = any, Key extends string = string>(\n config: CommandConfig<T, Exclude<Key, keyof CommandRegistry>>\n ): T;\n}\n\n/**\n * Service for executing commands\n * @public\n * @group Command bus\n */\nexport interface CommandHandler {\n /**\n * Handle the execution of the given command\n *\n * @param command - the command to handle\n *\n * @returns the result of the operation\n */\n handle(command: AnyCommand): any;\n}\n\n/**\n * @public\n * @group Command bus\n */\nexport type CallableCommandMiddleware = (command: AnyCommand) => any;\n\n/**\n * Middleware for the command bus\n * @public\n * @group Command bus\n */\nexport interface CommandMiddleware {\n /**\n * Execute the middleware before passing the command further down the chain\n *\n * @param command - the command that is being handled\n * @param next - the next middleware in the chain\n *\n * @returns the result of the operation\n */\n execute(command: AnyCommand, next: CallableCommandMiddleware): any;\n}\n\n/**\n * Events dispatched by the commandbus event middleware\n * @public\n * @group Command bus\n */\nexport enum CommandEventName {\n /**\n * Dispatched when the command has been received by the commandbus.\n * Calling `preventDefault()` on the event will stop the command from being handled\n *\n * @see {@link CommandEvent}\n */\n Received = 'command.received',\n\n /**\n * Dispatched when the command has been handled by the commandbus\n *\n * @see {@link CommandEvent}\n */\n Handled = 'command.handled',\n\n /**\n * Dispatched if an error occurs while handling the command\n *\n * @see {@link CommandEvent}\n */\n Failed = 'command.failed',\n}\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandEventDetail = {\n command: AnyCommand;\n result?: unknown;\n error?: unknown;\n};\n\n/**\n * @public\n * @group Command bus\n */\nexport type CommandEvent = CustomEvent<CommandEventDetail>;\n\n/**\n * @public\n * @group Command bus\n */\nexport interface CommandOptions {\n /**\n * Id of the command\n */\n id: string;\n}\n\n/**\n * Config for describing a command\n * @public\n */\nexport interface CommandConfig<TCommand = any, TKey extends string = string> {\n /**\n * Id of the command\n *\n * Specified by the {@link Command} decorator when declaring the command\n */\n id: TKey;\n\n /**\n * Optional parameters to set when creating the command from the config.\n * All values need to be serializable\n */\n params?: {\n [K in keyof TCommand]?: TCommand[K];\n };\n}\n\n/**\n * Registry for commands\n *\n * This interface is designed to be extended by consumers of Lime Web\n * Components using module augmentation. Each key in the interface corresponds\n * to the id of a registered command, and the value is the type of the command.\n * This allows for type-safe access to commands within the application.\n *\n * @example\n * ```ts\n * declare module '@limetech/lime-web-components' {\n * interface CommandRegistry {\n * myCommand: MyCommand;\n * }\n * }\n * ```\n *\n * @beta\n * @group Command bus\n */\nexport interface CommandRegistry {}\n\n/**\n * Metadata for a command\n *\n * @beta\n * @group Command bus\n */\nexport type CommandMetadata = ConfigMetadata & {\n /**\n * Command id\n */\n id: keyof CommandRegistry | (string & {});\n};\n\n/**\n * Register a class as a command\n *\n * @param options - a CommandOptions object containing the id of the command\n *\n * @returns callback which accepts a `CommandClass` and sets the command id\n * @public\n * @group Command bus\n */\nexport function Command(options: CommandOptions) {\n return (commandClass: CommandClass) => {\n setCommandId(commandClass, options.id);\n setHasInstance(commandClass, options.id);\n };\n}\n\nfunction setCommandId(commandClass: CommandClass, id: string) {\n // eslint-disable-next-line @typescript-eslint/dot-notation\n commandClass['commandId'] = id;\n}\n\nfunction setHasInstance(commandClass: CommandClass, id: string) {\n Object.defineProperty(commandClass, Symbol.hasInstance, {\n value: (instance: any) => {\n return getCommandIds(instance).includes(id);\n },\n });\n}\n\n/**\n * Get the registered id of the command\n *\n * @param value - either a command or a command identifier\n *\n * @returns id of the command\n * @public\n * @group Command bus\n */\nexport function getCommandId(\n value: AnyCommand | CommandIdentifier\n): keyof CommandRegistry | (string & {}) {\n if (typeof value === 'string') {\n return value;\n }\n\n /* eslint-disable @typescript-eslint/dot-notation */\n if (value && value.constructor && value.constructor['commandId']) {\n return value.constructor['commandId'];\n }\n\n if (value && value['commandId']) {\n return value['commandId'];\n }\n /* eslint-enable @typescript-eslint/dot-notation */\n\n return null;\n}\n\n/**\n * Get all registered ids of a command and its parent classes\n *\n * @param value - either a command or a command identifier\n *\n * @returns ids of the command\n * @public\n * @group Command bus\n */\nexport function getCommandIds(\n value: AnyCommand | CommandIdentifier\n): Array<keyof CommandRegistry | (string & {})> {\n let ids: string[] = [];\n let id: string;\n let commandClass = value;\n\n while ((id = getCommandId(commandClass))) {\n ids = [...ids, id];\n commandClass = Object.getPrototypeOf(commandClass);\n }\n\n return Array.from(new Set(ids));\n}\n","import { CommandBus as Service } from './commandbus';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'commandBus';\n\nPlatformServiceName.CommandBus = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | CommandBus}\n */\n CommandBus: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['CommandBus']): Service;\n }\n}\n","import { Command, LimeObjectBulkCommand } from '../../commandbus';\nimport { Expression } from '../../query';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.bulk-create-dialog' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: BulkCreateDialogCommand;\n }\n}\n\n/**\n * Open a dialog for bulk creating limeobjects\n *\n *\n * ### Flow example\n * Let's have a look at the general flow by going through the concrete example of adding several persons to a marketing activity:\n * - Go to the table view of persons.\n * - Filter everyone who should be included in the marketing activity.\n * - Select 'Bulk create objects' form the action menu.\n * - Fill out the form and click 'create'.\n * - A toast message appears and gives you 5 seconds to undo the action before it creates the corresponding task.\n * - Another toast message will inform you after the task is completed.\n * - If the task ended successful you can go to the participant table view and check the result.\n *\n * ### Configuration\n * In order to activate the feature go to a table configuration in lime-admin to the limetype you want to bulk create from\n * and add the following configuration:\n *\n * ```json\n * \"actions\": [\n * {\n * \"id\": \"limeobject.bulk-create-dialog\",\n * \"params\": {\n * \"relation\": \"<name of relation>\"\n * }\n * }\n * ],\n * ```\n *\n * @id `limeobject.bulk-create-dialog`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class BulkCreateDialogCommand implements LimeObjectBulkCommand {\n public context: LimeWebComponentContext;\n\n /**\n * A query describing what limeobjects to create new limeobjects from. Each object from the result will result in a\n * new related limeobject to be created\n */\n public filter: Expression;\n\n /**\n * The name of the relation on the limetype to create objects of\n */\n public relation: string;\n}\n","import { LimeWebComponentContext } from '../../core';\nimport { LimeType } from '../../limetype';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LimeObject } from '..';\nimport { Command } from '../../commandbus';\n\nconst COMMAND_ID = 'limeobject.create-dialog' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: CreateLimeobjectDialogCommand;\n }\n}\n\n/**\n * Open a dialog for creating a new limeobject or editing a specific limeobject\n *\n * The create dialog is implemented as a command so a plugin can easily replace the original dialog with a custom one.\n * Check out the \"Hello, Event!\" tutorial for a detailed description on how to implement your own create dialog.\n *\n * This dialog also useful to edit a limeobject that already exists\n *\n * @id `limeobject.create-dialog`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class CreateLimeobjectDialogCommand {\n /**\n * The limetype of the object to create\n */\n public limetype: LimeType;\n\n /**\n * Default data to populate the form with\n */\n public limeobject?: any;\n\n /**\n * Specifies if routing to limeobject should be done after confirmation\n */\n public route?: boolean = false;\n\n /*\n * Title of the dialog\n */\n public title?: string;\n\n /*\n * Subtitle of the dialog\n */\n public subtitle?: string;\n\n /*\n * Current context\n */\n public context?: LimeWebComponentContext;\n\n /**\n * When `context` is used, this is the name of the relation on the\n * reference {@link LimeObject} to use when auto attaching the new object.\n *\n */\n public autoAttachRelation?: string;\n\n /**\n * Specifies any command that can be used to save the result of the dialog.\n * If not specified, it will default to the {@link SaveLimeObjectCommand}\n */\n public saveCommand?: any;\n}\n","import { Command, LimeObjectCommand } from '../../commandbus';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.delete-object' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: DeleteObjectCommand;\n }\n}\n\n/**\n * Deletes the object from the database\n *\n * @id `limeobject.delete-object`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class DeleteObjectCommand implements LimeObjectCommand {\n public context: LimeWebComponentContext;\n}\n","import { Command, LimeObjectCommand } from '../../commandbus';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.object-access' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: OpenObjectAccessDialogCommand;\n }\n}\n\n/**\n * Open a dialog to view and edit object access information\n *\n * @id `limeobject.object-access`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class OpenObjectAccessDialogCommand implements LimeObjectCommand {\n public context: LimeWebComponentContext;\n}\n","import { LimeObject } from '../../limeobject';\nimport { Command, LimeObjectCommand } from '../../commandbus';\nimport { LimeWebComponentContext } from '../../core';\n\nconst COMMAND_ID = 'limeobject.save-object' as const;\ndeclare module '../../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: SaveLimeObjectCommand;\n }\n}\n\n/**\n * Saves the object to the database\n *\n * @id `limeobject.save-object`\n * @public\n * @group Lime objects\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class SaveLimeObjectCommand implements LimeObjectCommand {\n public context: LimeWebComponentContext;\n\n /**\n * The limeobject to save\n */\n public limeobject: LimeObject;\n\n /**\n * Specifies if routing to limeobject should be done after confirmation\n */\n public route?: boolean = false;\n\n /**\n * @beta\n * Specifies an optional save label to be displayed in the create-object dialog\n */\n public label?: string;\n}\n","/**\n * @public\n * @group Query\n */\nexport interface Query {\n limetype: string;\n limit?: number;\n offset?: number;\n orderBy?: object[];\n filter?: Expression;\n responseFormat: {\n object?: object;\n aggregates?: object;\n };\n}\n\n/**\n * @public\n * @group Query\n */\nexport interface QueryResponse {\n objects: any[];\n aggregates: any;\n}\n\n/**\n * @public\n * @group Query\n */\nexport type Expression =\n | AndOrExpression\n | NotExpression\n | InFilterExpression\n | InExpression\n | BasicExpression;\n\n/**\n * @public\n * @group Query\n */\nexport type AndOrExpression = {\n op: Operator.AND | Operator.OR;\n exp: Expression[];\n};\n\n/**\n * @public\n * @group Query\n */\nexport type NotExpression = {\n op: Operator.NOT;\n exp: Expression;\n};\n\n/**\n * @public\n * @group Query\n */\nexport type InFilterExpression = {\n type: 'filter';\n key: string;\n op: Operator.IN;\n exp: string;\n};\n\n/**\n * @public\n * @group Query\n */\nexport type InExpression = {\n key: string;\n op: Operator.IN;\n exp: ExpressionValue[];\n};\n\n/**\n * @public\n * @group Query\n */\nexport type BasicExpression = {\n key: string;\n op: BasicOperator;\n exp: ExpressionValue;\n};\n\n/**\n * @public\n * @group Query\n */\nexport type BasicOperator =\n | Operator.EQUALS\n | Operator.NOT_EQUALS\n | Operator.GREATER\n | Operator.LESS\n | Operator.BEGINS\n | Operator.LIKE\n | Operator.LESS_OR_EQUAL\n | Operator.GREATER_OR_EQUAL\n | Operator.ENDS;\n\n/**\n * @public\n * @group Query\n */\nexport type ExpressionValue = string | number | boolean | null;\n\n/**\n * @public\n * @group Query\n */\nexport enum Operator {\n AND = 'AND',\n OR = 'OR',\n NOT = '!',\n EQUALS = '=',\n NOT_EQUALS = '!=',\n GREATER = '>',\n LESS = '<',\n IN = 'IN',\n BEGINS = '=?',\n LIKE = '?',\n LESS_OR_EQUAL = '<=',\n GREATER_OR_EQUAL = '>=',\n ENDS = '=$',\n}\n\n/**\n * @public\n * @group Query\n */\nexport interface Filter {\n id: string;\n limetype: string;\n name: {\n [language: string]: string;\n };\n filter: Expression;\n description?: {\n [language: string]: string;\n };\n iduser?: number;\n}\n\n/**\n *\n * @public\n * @group Query\n */\nexport const AggregateOperator = {\n Count: 'COUNT',\n Sum: 'SUM',\n Average: 'AVG',\n Maximum: 'MAX',\n Minimum: 'MIN',\n} as const;\n\n/**\n *\n * @public\n * @group Query\n */\nexport type AggregateOperator =\n (typeof AggregateOperator)[keyof typeof AggregateOperator];\n","import { QueryService } from './service';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'query';\n\nPlatformServiceName.Query = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link QueryService}\n */\n Query: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Query']): QueryService;\n }\n}\n","/**\n * HTTP service for sending requests to a given URL\n *\n * By default, the service will work with the JSON data format. If anything but JSON is returned from the endpoint,\n * the `responseType` property in the `options` parameter needs to be set.\n *\n * @public\n * @group HTTP\n */\nexport interface HttpClient {\n /**\n * Sends a get request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n get(url: string, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a post request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param data - Payload to send to the server.\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n post(url: string, data?: {}, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a patch request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param data - Payload to send to the server.\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n patch(url: string, data?: {}, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a put request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param data - Payload to send to the server.\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n put(url: string, data?: {}, options?: HttpOptions): Promise<any>;\n\n /**\n * Sends a delete request.\n *\n * @param url - Url to resource (for instance my_addon/endpoint).\n * @param options - The HTTP options to send with the request.\n * @returns\n */\n delete(url: string, options?: HttpOptions): Promise<any>;\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport interface HttpOptions {\n /**\n * Query parameters to include in the request\n */\n params?: HttpParams;\n\n /**\n * Additional HTTP-headers to send in the request\n */\n headers?: HttpHeaders;\n\n /**\n * Type of the response that is returned. Defaults to `json`\n */\n responseType?: HttpResponseType;\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport interface HttpParams {\n [param: string]: string | string[];\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport interface HttpHeaders {\n [header: string]: string | string[];\n}\n\n/**\n * @public\n * @group HTTP\n */\nexport type HttpResponseType = 'text' | 'json' | 'arraybuffer' | 'blob';\n\n/**\n * Defines the HTTP methods as constants.\n * Used in the UploadFile class in lime-crm-components\n *\n * @public\n */\nexport const HttpMethod = {\n Get: 'GET',\n Post: 'POST',\n Put: 'PUT',\n Delete: 'DELETE',\n Patch: 'PATCH',\n} as const;\n\n/**\n * Type definition for HTTP methods. It can be any of the values defined in the\n * HttpMethod constant.\n *\n * @public\n */\nexport type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];\n\n/**\n * Exception thrown by {@link HttpClient} when an error occurs while sending a\n * request\n *\n * @public\n */\nexport interface HttpResponseError extends Error {\n name: 'HttpResponseError';\n /**\n * Http status code\n */\n status: number;\n /**\n * The response from the request\n */\n response: Response;\n}\n","import { HttpClient } from './http';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'http';\n\nPlatformServiceName.Http = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link HttpClient}\n */\n Http: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Http']): HttpClient;\n }\n}\n","import { EventDispatcher as Service } from './eventdispatcher';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'eventDispatcher';\n\nPlatformServiceName.EventDispatcher = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | EventDispatcher}\n */\n EventDispatcher: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['EventDispatcher']): Service;\n }\n}\n","import { Translator } from './translator';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'translate';\n\nPlatformServiceName.Translate = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Translate}\n */\n Translate: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Translate']): Translator;\n }\n}\n","import { DialogRenderer } from './dialog';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'dialog';\n\nPlatformServiceName.Dialog = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link DialogRenderer}\n */\n Dialog: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Dialog']): DialogRenderer;\n }\n}\n","import { KeybindingRegistry as Service } from './registry';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'keybindingRegistry';\n\nPlatformServiceName.KeybindingRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | KeybindingRegistry}\n *\n * @note Work in progress, do not use!\n * @beta\n */\n KeybindingRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['KeybindingRegistry']): Service;\n }\n}\n","import { Navigator as Service } from './navigator';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'navigator';\n\nPlatformServiceName.Navigator = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | Navigator}\n */\n Navigator: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Navigator']): Service;\n }\n}\n","import { ContextAwareStateOptions, PlatformServiceName } from '../core';\nimport {\n createStateDecorator,\n StateDecoratorConfig,\n} from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectQueryParam} decorator\n * @public\n * @group Navigation\n */\nexport interface SelectQueryParamOptions extends ContextAwareStateOptions {\n /**\n * The query param to select\n */\n selector: string;\n}\n\n/**\n * Gets a named query param from the location\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Navigation\n */\nexport function SelectQueryParam(\n options: SelectQueryParamOptions\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Navigator,\n };\n\n return createStateDecorator({ context: null, ...options }, config);\n}\n","import { Command } from '../commandbus';\nimport { Location } from './navigator';\n\nconst COMMAND_ID = 'navigator.navigate' as const;\ndeclare module '../commandbus' {\n interface CommandRegistry {\n [COMMAND_ID]: NavigateCommand;\n }\n}\n\n/**\n * Navigates to a new location\n *\n * @id `navigator.navigate`\n * @public\n * @group Navigation\n */\n@Command({\n id: COMMAND_ID,\n})\nexport class NavigateCommand implements Partial<Location> {\n public path?: string;\n\n public query?: Record<string, unknown>;\n\n public hash?: string;\n\n public state?: unknown;\n}\n","import { Notifications } from './notifications';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'notifications';\n\nPlatformServiceName.Notification = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Notifications}\n */\n Notification: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Notification']): Notifications;\n }\n}\n","import { RouteRegistry as Service } from './registry';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'routeRegistry';\n\nPlatformServiceName.RouteRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | RouteRegistry}\n */\n RouteRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['RouteRegistry']): Service;\n }\n}\n","import { StateRepository } from '../core';\n\n/**\n * Service for creating background tasks\n * @public\n * @group Tasks\n */\nexport interface TaskRepository extends StateRepository {\n /**\n * Create a new background task\n *\n * @param url - url to the resource that will create the task\n * @param data - task specific data\n * @param cancelAction - true to allow task creation to be cancelled\n * @param message - notification message to display before the task is created instead of the default one\n * @returns a promise that resolves to the id of the task if it was created successfully\n */\n create(\n url: string,\n data: any,\n cancelAction?: boolean,\n message?: string\n ): Promise<string | void>;\n\n /**\n * Get status about specific tasks\n *\n * @param ids - the ids of the tasks to check\n * @returns a promise that resolves to the status about the tasks\n */\n getStatus(ids: string[]): Promise<TaskStatus[]>;\n}\n\n/**\n * @public\n * @group Tasks\n */\nexport enum TaskState {\n /**\n * Task state is unknown\n */\n Pending = 'PENDING',\n\n /**\n * Task was started by a worker\n */\n Started = 'STARTED',\n\n /**\n * Task is waiting for retry\n */\n Retry = 'RETRY',\n\n /**\n * Task succeeded\n */\n Success = 'SUCCESS',\n\n /**\n * Task failed\n */\n Failure = 'FAILURE',\n}\n\n/**\n * @public\n * @group Tasks\n */\nexport interface TaskStatus {\n /**\n * ID of the task\n */\n id: string;\n\n /**\n * The state of the task\n */\n status: TaskState;\n\n /**\n * The result of the task once it has finished its execution\n */\n result?: string;\n}\n\n/**\n * Events dispatched by the task service\n * @public\n * @group Tasks\n */\nexport enum TaskEventType {\n /**\n * Dispatched when a task has been created.\n *\n * @see {@link TaskEvent}\n */\n Created = 'task.created',\n\n /**\n * Dispatched when the task has successfully been completed\n *\n * @see {@link TaskEvent}\n */\n Success = 'task.success',\n\n /**\n * Dispatched if an error occured while running the task\n *\n * @see {@link TaskEvent}\n */\n Failed = 'task.failed',\n}\n\n/**\n * @public\n * @group Tasks\n */\nexport type TaskEventDetail = {\n task: TaskStatus;\n error?: unknown;\n};\n\n/**\n * @public\n * @group Tasks\n */\nexport type TaskEvent = CustomEvent<TaskEventDetail>;\n","import { TaskRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.tasks';\n\nPlatformServiceName.TaskRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | TaskRepository}\n */\n TaskRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['TaskRepository']): Service;\n }\n}\n","import { ConfigRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.configs';\n\nPlatformServiceName.ConfigRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | ConfigRepository}\n */\n ConfigRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['ConfigRepository']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectConfig} state decorator\n * @public\n * @group Config\n */\nexport interface SelectConfigOptions extends StateOptions {\n name?: string;\n}\n\n/**\n * Gets an object with all configs where key is used as key.\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Config\n */\nexport function SelectConfig(options: SelectConfigOptions): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.ConfigRepository,\n };\n\n return createStateDecorator(options, config);\n}\n","import { Device as Service } from './device';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.device';\n\nPlatformServiceName.Device = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | Device}\n */\n Device: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Device']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * DeviceType\n * @public\n * @group Device\n */\nexport type DeviceType = 'desktop' | 'tablet' | 'phone';\n\n/**\n * Get the current device type\n *\n * The device will only indicate roughly how big the viewport is, not what actual device is being used\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Device\n */\nexport function SelectDevice(options: StateOptions = {}): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Device,\n };\n\n return createStateDecorator(options, config);\n}\n","import { FilterRepository as Service } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.filters';\n\nPlatformServiceName.FilterRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | FilterRepository}\n */\n FilterRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['FilterRepository']): Service;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectFilters} state decorator\n * @public\n * @group Filters\n */\nexport interface SelectFiltersOptions extends StateOptions {\n id?: string;\n limetype?: string;\n}\n\n/**\n * Gets a list of filters\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Filters\n */\nexport function SelectFilters(\n options: SelectFiltersOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.FilterRepository,\n };\n\n return createStateDecorator(options, config);\n}\n","import { UserDataRepository } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.user-data';\n\nPlatformServiceName.UserDataRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link UserDataRepository}\n */\n UserDataRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['UserDataRepository']\n ): UserDataRepository;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../core';\nimport { createStateDecorator } from '../core/decorators/factory';\n\n/**\n * Config for the {@link SelectUserData} state decorator\n * @public\n * @group User data\n */\nexport interface SelectUserDataOptions extends StateOptions {\n /**\n * Key specifying the user data\n */\n key?: string;\n}\n\n/**\n * Gets an object with all user data, optionally filtered by key\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group User data\n */\nexport function SelectUserData(\n options: SelectUserDataOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.UserDataRepository,\n };\n\n return createStateDecorator(options, config);\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { ApplicationRepository } from './repository';\n\nconst SERVICE_NAME = 'state.application';\n\nPlatformServiceName.Application = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link ApplicationRepository}\n */\n Application: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['Application']\n ): ApplicationRepository;\n }\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\n\n/**\n * Get the name of the application\n *\n * @param options - options for the state selector\n * @returns state decorator\n * @public\n * @group Application\n */\nexport function SelectApplicationName(\n options: StateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Application,\n };\n options.map = [getApplicationName, ...(options.map || [])];\n\n return createStateDecorator(options, config);\n}\n\nfunction getApplicationName(applicationData: any) {\n return applicationData.applicationName;\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\n\n/**\n * Get the currently logged in user\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Application\n */\nexport function SelectCurrentUser(\n options: StateOptions = {}\n): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Application,\n };\n options.map = [getCurrentUser, ...(options.map || [])];\n\n return createStateDecorator(options, config);\n}\n\nfunction getCurrentUser(applicationData: any) {\n return applicationData.currentUser;\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\n\n/**\n * Get the application session\n *\n * @param options - state decorator options\n * @returns state decorator\n * @public\n * @group Application\n */\nexport function SelectSession(options: StateOptions = {}): PropertyDecorator {\n const config: StateDecoratorConfig = {\n name: PlatformServiceName.Application,\n };\n options.map = [getSession, ...(options.map || [])];\n\n return createStateDecorator(options, config);\n}\n\nfunction getSession(applicationData: any) {\n return applicationData.session;\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { UserPreferencesRepository } from './repository';\n\nconst SERVICE_NAME = 'userPreferences';\n\nPlatformServiceName.UserPreferencesRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link UserPreferencesRepository}\n */\n UserPreferencesRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['UserPreferencesRepository']\n ): UserPreferencesRepository;\n }\n}\n","import { DateTimeFormatter } from './datetimeformatter';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'datetimeformatter';\n\nPlatformServiceName.DateTimeFormatter = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link DateTimeFormatter}\n */\n DateTimeFormatter: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['DateTimeFormatter']\n ): DateTimeFormatter;\n }\n}\n","import { Action } from '../action';\nimport { LimeObject } from '../limeobject';\n\n/**\n * This interface defines callbacks intended to be registered to the {@link Condition} registry\n *\n * @beta\n * @group Conditions\n */\nexport type Condition<T = unknown> = {\n /**\n * The condition type, describing what to evaluate the condition for, for example \"limeobject\"\n */\n type: string;\n\n /**\n * The evaluation function relating to this condition, serves the role of a predicate\n *\n * @param subject - some value depending on the condition type to evaluate the condition for,\n * such as the current limeobject\n * @param params - any additional data that this condition may expect, such as configuration\n * data from an action visibility condition\n * @throws may throw an error if the second argument has an unexpected type\n */\n evaluate: (subject: T, params?: unknown) => boolean;\n\n /*\n * The condition's identifier, intended to be unique\n */\n id: string;\n};\n\n/**\n * A condition to evaluate for a {@link LimeObject}\n *\n * @beta\n * @group Conditions\n */\nexport type LimeObjectCondition = Condition<LimeObject> & {\n type: 'limeobject';\n};\n\n/**\n * A condition to evaluate for an {@link Action}\n *\n * @beta\n * @group Conditions\n */\nexport type ActionCondition = Condition<Action> & {\n type: 'action';\n};\n\n/**\n * Check if condition expects a lime object to be passed when it is evaluated\n *\n * @beta\n * @group Conditions\n */\nexport function isLimeObjectCondition(\n condition: Condition\n): condition is Condition<LimeObject> {\n return condition.type === 'limeobject';\n}\n\n/**\n * Check if condition expects an action to be passed when it is evaluated\n *\n * @beta\n * @group Conditions\n */\nexport function isActionCondition(\n condition: Condition\n): condition is Condition<Action> {\n return condition.type === 'action';\n}\n\n/**\n * Service for adding and retrieving, and checking {@link Condition}s to and from the condition registry\n *\n * @beta\n * @group Conditions\n */\nexport interface ConditionRegistry {\n /**\n * Add a {@link Condition} to the registry\n *\n * @param condition - the condition to pass to the registry\n * @throws error if the id already exists in the registry\n */\n addCondition(condition: Condition);\n\n /**\n * Remove a {@link Condition} from the registry\n *\n * @param condition - the condition to remove\n * @throws error if the id does not exist in the registry\n */\n removeCondition(condition: Condition);\n\n /**\n * Checks if a {@link Condition} exists on the registry\n *\n * @param id - id of the condition\n * @returns true if it exists, false otherwise\n */\n hasCondition(id: string): boolean;\n\n /**\n * Gets all {@link Condition}s\n *\n * @returns a list of all existing conditions\n */\n getConditions(): Condition[];\n\n /**\n * Gets a {@link Condition} by id\n *\n * @param id - id of the condition\n * @throws error if no condition was found with the specified id\n * @returns the condition with the specified id\n */\n getCondition(id: string): Condition;\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { ConditionRegistry as Service } from './conditionregistry';\n\nconst SERVICE_NAME = 'conditionRegistry';\n\nPlatformServiceName.ConditionRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link Service | ConditionRegistry}\n */\n ConditionRegistry: typeof SERVICE_NAME;\n }\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['ConditionRegistry']): Service;\n }\n}\n","import { ViewFactoryRegistry } from './registry';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'viewFactoryRegistry';\n\nPlatformServiceName.ViewFactoryRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @beta\n * @see {@link ViewFactoryRegistry}\n */\n ViewFactoryRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n /**\n * @beta\n */\n get(\n name: PlatformServiceNameType['ViewFactoryRegistry']\n ): ViewFactoryRegistry;\n }\n}\n","import { PlatformServiceName } from '../core/platform';\nimport { WebComponentRegistry } from './registry';\n\nconst SERVICE_NAME = 'webComponentRegistry';\n\nPlatformServiceName.WebComponentRegistry = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link WebComponentRegistry}\n */\n WebComponentRegistry: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['WebComponentRegistry']\n ): WebComponentRegistry;\n }\n}\n","import { NotificationRepository } from './repository';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'state.notifications';\n\nPlatformServiceName.NotificationRepository = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link NotificationRepository}\n */\n NotificationRepository: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['NotificationRepository']\n ): NotificationRepository;\n }\n}\n","import { PollerFactory as PollerFactoryService } from './factory';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'pollerFactory';\n\nPlatformServiceName.PollerFactory = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link PollerFactoryService}\n */\n PollerFactory: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(\n name: PlatformServiceNameType['PollerFactory']\n ): PollerFactoryService;\n }\n}\n"],"names":["PlatformServiceName","IdleStateEventName","isRelation","property","isSingleRelation","isDate","isString","isFloat","SERVICE_NAME","extendStatics","d","b","p","__extends","__","__values","o","s","m","i","__read","n","r","ar","e","error","__spreadArray","to","from","pack","l","isFunction","value","createErrorClass","createImpl","_super","instance","ctorFunc","UnsubscriptionError","errors","err","arrRemove","arr","item","index","Subscription","initialTeardown","e_1","_a","e_2","_b","_parentage","_parentage_1","_parentage_1_1","parent_1","e_1_1","initialFinalizer","_finalizers","_finalizers_1","_finalizers_1_1","finalizer","execFinalizer","e_2_1","teardown","parent","empty","EMPTY_SUBSCRIPTION","isSubscription","config","timeoutProvider","handler","timeout","args","_i","handle","reportUnhandledError","noop","errorContext","cb","Subscriber","destination","_this","EMPTY_OBSERVER","next","complete","SafeSubscriber","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","defaultErrorHandler","observable","identity","x","pipeFromArray","fns","input","prev","fn","Observable","subscribe","operator","subscriber","isSubscriber","source","sink","promiseCtor","getPromiseCtor","resolve","reject","Symbol_observable","operations","isObserver","ObjectUnsubscribedError","Subject","subject","AnonymousSubject","_c","observer","observers","hasError","isStopped","thrownError","BehaviorSubject","_value","subscription","defaultOptionFactory","options","createStateDecorator","target","properties","getComponentProperties","extendLifecycleMethods","componentProperties","componentSubscriptions","connectedComponents","component","createConnectedCallback","createComponentWillLoad","createDisconnectedCallback","original","ensureLimeProps","watchProp","isContextAware","result","unsubscribeAll","promises","waitForProp","element","getElement","get","set","createSubscription","unsubscribe","mapState","state","myOptions","bindFunctions","name","platform","scope","func","SelectLimeTypes","SelectCurrentLimeType","currentLimetype","limetypes","limetype","findLimetypeByLabel","label","hasLabel","getPropertiesByType","type","getPropertyByLabel","getPropertyByName","propertyName","object","SelectLimeObjects","createOptions","SelectCurrentLimeObject","currentLimeobject","limeobjects","id","CommandEventName","Command","commandClass","setCommandId","setHasInstance","getCommandIds","getCommandId","ids","COMMAND_ID","BulkCreateDialogCommand","__decorateClass","CreateLimeobjectDialogCommand","DeleteObjectCommand","OpenObjectAccessDialogCommand","SaveLimeObjectCommand","Operator","AggregateOperator","HttpMethod","SelectQueryParam","NavigateCommand","TaskState","TaskEventType","SelectConfig","SelectDevice","SelectFilters","SelectUserData","SelectApplicationName","getApplicationName","applicationData","SelectCurrentUser","getCurrentUser","SelectSession","getSession","isLimeObjectCondition","condition","isActionCondition"],"mappings":";AA8CO,MAAMA,IAA+C;AAAA,EACxD,OAAO;AACX,GCtBaC,KAAqB;AC4D3B,SAASC,GAAWC,GAAwB;AAQ/C,SAAOA,KAP2B;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,EAE6B,SAASA,EAAS,IAAI;AACvD;AAMO,SAASC,GAAiBD,GAAwB;AAGrD,SAAOA,KAF2B,CAAC,aAAa,QAAQ,EAE3B,SAASA,EAAS,IAAI;AACvD;AAMO,SAASE,GAAOF,GAAwB;AAU3C,SAAOA,KAT2B;AAAA,IAC9B;AAAA,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