@limetech/lime-web-components 6.5.0 → 6.6.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 CHANGED
@@ -1,3 +1,16 @@
1
+ ## [6.6.0](https://github.com/Lundalogik/lime-web-components/compare/v6.5.0...v6.6.0) (2025-12-16)
2
+
3
+
4
+ ### Features
5
+
6
+
7
+ * **logger:** add logging service interfaces ([157d6af](https://github.com/Lundalogik/lime-web-components/commit/157d6af0f91828e3c151f3f288219732a1a597fc))
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * **build:** use .cjs extension for CommonJS output ([c00aa57](https://github.com/Lundalogik/lime-web-components/commit/c00aa5701b166bd09c16bcaca5e22f51c6a9ea51))
13
+
1
14
  ## [6.5.0](https://github.com/Lundalogik/lime-web-components/compare/v6.4.1...v6.5.0) (2025-11-25)
2
15
 
3
16
 
package/dist/index.cjs ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("@stencil/core"),c={Route:"route"},re="idle-state";function ne(e){return e&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(e.type)}function oe(e){return e&&["belongsto","hasone"].includes(e.type)}function ie(e){return e&&["time","timeofday","date","year","quarter","month"].includes(e.type)}function se(e){return e&&["string","text","phone","link"].includes(e.type)}function ce(e){return e&&["decimal","percent"].includes(e.type)}const ae="state.limetypes";c.LimeTypeRepository=ae;var _=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},_(e,t)};function h(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function O(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function R(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function p(e){return typeof e=="function"}function B(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var C=B(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
2
+ `+r.map(function(n,o){return o+1+") "+n.toString()}).join(`
3
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function w(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var S=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=O(s),u=a.next();!u.done;u=a.next()){var E=u.value;E.remove(this)}}catch(f){t={error:f}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var D=this.initialTeardown;if(p(D))try{D()}catch(f){i=f instanceof C?f.errors:[f]}var I=this._finalizers;if(I){this._finalizers=null;try{for(var b=O(I),m=b.next();!m.done;m=b.next()){var te=m.value;try{L(te)}catch(f){i=i??[],f instanceof C?i=R(R([],A(i)),A(f.errors)):i.push(f)}}}catch(f){n={error:f}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(n)throw n.error}}}if(i)throw new C(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)L(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&w(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&w(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),k=S.EMPTY;function W(e){return e instanceof S||e&&"closed"in e&&p(e.remove)&&p(e.add)&&p(e.unsubscribe)}function L(e){p(e)?e():e.unsubscribe()}var ue={Promise:void 0},le={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,R([e,t],A(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function fe(e){le.setTimeout(function(){throw e})}function N(){}function v(e){e()}var G=(function(e){h(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,W(r)&&r.add(n)):n.destination=me,n}return t.create=function(r,n,o){return new j(r,n,o)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(S),pe=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){y(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){y(n)}else y(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){y(r)}},e})(),j=(function(e){h(t,e);function t(r,n,o){var i=e.call(this)||this,s;return p(r)||!r?s={next:r??void 0,error:n??void 0,complete:o??void 0}:s=r,i.destination=new pe(s),i}return t})(G);function y(e){fe(e)}function de(e){throw e}var me={closed:!0,next:N,error:de,complete:N},he=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function be(e){return e}function ye(e){return e.length===0?be:e.length===1?e[0]:function(r){return e.reduce(function(n,o){return o(n)},r)}}var M=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var o=this,i=ge(t)?t:new j(t,r,n);return v(function(){var s=o,a=s.operator,u=s.source;i.add(a?a.call(i,u):u?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=T(r),new r(function(o,i){var s=new j({next:function(a){try{t(a)}catch(u){i(u),s.unsubscribe()}},error:i,complete:o});n.subscribe(s)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[he]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ye(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=T(t),new t(function(n,o){var i;r.subscribe(function(s){return i=s},function(s){return o(s)},function(){return n(i)})})},e.create=function(t){return new e(t)},e})();function T(e){var t;return(t=e??ue.Promise)!==null&&t!==void 0?t:Promise}function ve(e){return e&&p(e.next)&&p(e.error)&&p(e.complete)}function ge(e){return e&&e instanceof G||ve(e)&&W(e)}var Se=B(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),H=(function(e){h(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new $(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Se},t.prototype.next=function(r){var n=this;v(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=O(n.currentObservers),a=s.next();!a.done;a=s.next()){var u=a.value;u.next(r)}}catch(E){o={error:E}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}}})},t.prototype.error=function(r){var n=this;v(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},t.prototype.complete=function(){var r=this;v(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,s=o.isStopped,a=o.observers;return i||s?k:(this.currentObservers=null,a.push(r),new S(function(){n.currentObservers=null,w(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new M;return r.source=this,r},t.create=function(r,n){return new $(r,n)},t})(M),$=(function(e){h(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:k},t})(H),Ee=(function(e){h(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,o=r.thrownError,i=r._value;if(n)throw o;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(H);function Ce(e){return e}function l(e,t){return(r,n)=>{const o=_e(r,n,e,t);o.length===1&&Oe(r,o)}}const x=new WeakMap,g=new WeakMap,Q=new WeakMap;function _e(e,t,r,n){let o=x.get(e);return o||(o=[],x.set(e,o)),o.push({options:r,name:t,optionFactory:n.optionFactory||Ce,service:{name:n.name,method:n.method||"subscribe"}}),o}function Oe(e,t){e.connectedCallback=Y(e.connectedCallback,t),e.componentWillLoad=Ae(e.componentWillLoad,t),e.componentDidUnload=V(e.componentDidUnload),e.disconnectedCallback=V(e.disconnectedCallback)}function Y(e,t){return async function(...r){Q.set(this,!0),g.set(this,[]),await q(this);const n=new Ee(this.context);we(this,"context",n);for(const o of t)o.options=o.optionFactory(o.options,this),Re(o.options)&&(o.options.context=n),je(this,o);if(e)return e.apply(this,r)}}function Ae(e,t){return async function(...r){return Q.get(this)===!0?(await q(this),e?e.apply(this,r):void 0):Y(e,t).apply(this,r)}}function V(e){return async function(...t){let r;return e&&(r=e.apply(this,t)),Pe(this),r}}function Re(e){return"context"in e}function q(e){const t=[];return e.platform||t.push(U(e,"platform")),e.context||t.push(U(e,"context")),t.length===0?Promise.resolve():Promise.all(t)}function U(e,t){const r=F.getElement(e);return new Promise(n=>{Object.defineProperty(r,t,{configurable:!0,set:o=>{delete r[t],r[t]=o,n()}})})}function we(e,t,r){const n=F.getElement(e),{get:o,set:i}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),t);Object.defineProperty(n,t,{configurable:!0,get:o,set:function(s){i.call(this,s),r.next(s)}})}function je(e,t){const r=Ie(e,t);if(typeof r!="function")return;g.get(e).push(r)}function Pe(e){const t=g.get(e);for(const r of t)r();g.set(e,[])}function De(e,t){return r=>{e[t]=r}}function Ie(e,t){const r={...t.options};Le(r,e);const n=t.service.name,o=e.platform;if(!o.has(n))throw new Error(`Service ${n} does not exist`);return o.get(n)[t.service.method](De(e,t.name),r)}function Le(e,t){e.filter&&(e.filter=e.filter.map(r=>r.bind(t))),e.map&&(e.map=e.map.map(r=>r.bind(t)))}function Ne(e={}){const t={name:c.LimeTypeRepository};return l(e,t)}function Me(e={}){const t={name:c.LimeTypeRepository};return e.map=[Te,...e.map||[]],e.context=null,l(e,t)}function Te(e){const{limetype:t}=this.context;return e[t]}const $e=e=>t=>Object.values(t).find(P(e));function xe(e,t){return Object.values(e.properties).filter(r=>r.type===t)}function Ve(e,t){return Object.values(e.properties).find(P(t))}function Ue(e,t){return e.properties[t]}const P=e=>t=>t?.label===e,Fe="state.limeobjects";c.LimeObjectRepository=Fe;function Be(e={}){const t={name:c.LimeObjectRepository,optionFactory:Ge};return l(e,t)}function ke(e={}){const t={name:c.LimeObjectRepository};return e.map=[We,...e.map||[]],e.context=null,l(e,t)}function We(e){const{limetype:t,id:r}=this.context;if(e[t])return e[t].find(n=>n.id===r)}function Ge(e,t){return e.getLimetype&&(e.limetype=e.getLimetype(t)),e}var K=(e=>(e.Received="command.received",e.Handled="command.handled",e.Failed="command.failed",e))(K||{});function d(e){return t=>{He(t,e.id),Qe(t,e.id)}}function He(e,t){e.commandId=t}function Qe(e,t){Object.defineProperty(e,Symbol.hasInstance,{value:r=>J(r).includes(t)})}function X(e){return typeof e=="string"?e:e&&e.constructor&&e.constructor.commandId?e.constructor.commandId:e&&e.commandId?e.commandId:null}function J(e){let t=[],r,n=e;for(;r=X(n);)t=[...t,r],n=Object.getPrototypeOf(n);return[...new Set(t)]}const Ye="commandBus";c.CommandBus=Ye;var qe=Object.getOwnPropertyDescriptor,Ke=(e,t,r,n)=>{for(var o=n>1?void 0:n?qe(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const Xe="limeobject.bulk-create-dialog";exports.BulkCreateDialogCommand=class{};exports.BulkCreateDialogCommand=Ke([d({id:Xe})],exports.BulkCreateDialogCommand);var Je=Object.getOwnPropertyDescriptor,Ze=(e,t,r,n)=>{for(var o=n>1?void 0:n?Je(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const ze="limeobject.create-dialog";exports.CreateLimeobjectDialogCommand=class{constructor(){this.route=!1}};exports.CreateLimeobjectDialogCommand=Ze([d({id:ze})],exports.CreateLimeobjectDialogCommand);var et=Object.getOwnPropertyDescriptor,tt=(e,t,r,n)=>{for(var o=n>1?void 0:n?et(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const rt="limeobject.delete-object";exports.DeleteObjectCommand=class{};exports.DeleteObjectCommand=tt([d({id:rt})],exports.DeleteObjectCommand);var nt=Object.getOwnPropertyDescriptor,ot=(e,t,r,n)=>{for(var o=n>1?void 0:n?nt(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const it="limeobject.object-access";exports.OpenObjectAccessDialogCommand=class{};exports.OpenObjectAccessDialogCommand=ot([d({id:it})],exports.OpenObjectAccessDialogCommand);var st=Object.getOwnPropertyDescriptor,ct=(e,t,r,n)=>{for(var o=n>1?void 0:n?st(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const at="limeobject.save-object";exports.SaveLimeObjectCommand=class{constructor(){this.route=!1}};exports.SaveLimeObjectCommand=ct([d({id:at})],exports.SaveLimeObjectCommand);var Z=(e=>(e.AND="AND",e.OR="OR",e.NOT="!",e.EQUALS="=",e.NOT_EQUALS="!=",e.GREATER=">",e.LESS="<",e.IN="IN",e.BEGINS="=?",e.LIKE="?",e.LESS_OR_EQUAL="<=",e.GREATER_OR_EQUAL=">=",e.ENDS="=$",e))(Z||{});const ut={Count:"COUNT",Sum:"SUM",Average:"AVG",Maximum:"MAX",Minimum:"MIN"},lt="query";c.Query=lt;const ft={Get:"GET",Post:"POST",Put:"PUT",Delete:"DELETE",Patch:"PATCH"},pt="http";c.Http=pt;const dt="eventDispatcher";c.EventDispatcher=dt;const mt="translate";c.Translate=mt;const ht="dialog";c.Dialog=ht;const bt="keybindingRegistry";c.KeybindingRegistry=bt;const yt="navigator";c.Navigator=yt;function vt(e){const t={name:c.Navigator};return l({context:null,...e},t)}var gt=Object.getOwnPropertyDescriptor,St=(e,t,r,n)=>{for(var o=n>1?void 0:n?gt(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const Et="navigator.navigate";exports.NavigateCommand=class{};exports.NavigateCommand=St([d({id:Et})],exports.NavigateCommand);const Ct="notifications";c.Notification=Ct;const _t="routeRegistry";c.RouteRegistry=_t;var z=(e=>(e.Pending="PENDING",e.Started="STARTED",e.Retry="RETRY",e.Success="SUCCESS",e.Failure="FAILURE",e))(z||{}),ee=(e=>(e.Created="task.created",e.Success="task.success",e.Failed="task.failed",e))(ee||{});const Ot="state.tasks";c.TaskRepository=Ot;const At="state.configs";c.ConfigRepository=At;function Rt(e){const t={name:c.ConfigRepository};return l(e,t)}const wt="state.device";c.Device=wt;function jt(e={}){const t={name:c.Device};return l(e,t)}const Pt="state.filters";c.FilterRepository=Pt;function Dt(e={}){const t={name:c.FilterRepository};return l(e,t)}const It="state.user-data";c.UserDataRepository=It;function Lt(e={}){const t={name:c.UserDataRepository};return l(e,t)}const Nt="state.application";c.Application=Nt;function Mt(e={}){const t={name:c.Application};return e.map=[Tt,...e.map||[]],l(e,t)}function Tt(e){return e.applicationName}function $t(e={}){const t={name:c.Application};return e.map=[xt,...e.map||[]],l(e,t)}function xt(e){return e.currentUser}function Vt(e={}){const t={name:c.Application};return e.map=[Ut,...e.map||[]],l(e,t)}function Ut(e){return e.session}const Ft="userPreferences";c.UserPreferencesRepository=Ft;const Bt="datetimeformatter";c.DateTimeFormatter=Bt;function kt(e){return e.type==="limeobject"}function Wt(e){return e.type==="action"}const Gt="conditionRegistry";c.ConditionRegistry=Gt;const Ht="viewFactoryRegistry";c.ViewFactoryRegistry=Ht;const Qt="webComponentRegistry";c.WebComponentRegistry=Qt;const Yt="state.notifications";c.NotificationRepository=Yt;const qt="pollerFactory";c.PollerFactory=qt;const Kt={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Xt="logger";c.Logger=Xt;exports.AggregateOperator=ut;exports.Command=d;exports.CommandEventName=K;exports.HttpMethod=ft;exports.IdleStateEventName=re;exports.LogLevel=Kt;exports.Operator=Z;exports.PlatformServiceName=c;exports.SelectApplicationName=Mt;exports.SelectConfig=Rt;exports.SelectCurrentLimeObject=ke;exports.SelectCurrentLimeType=Me;exports.SelectCurrentUser=$t;exports.SelectDevice=jt;exports.SelectFilters=Dt;exports.SelectLimeObjects=Be;exports.SelectLimeTypes=Ne;exports.SelectQueryParam=vt;exports.SelectSession=Vt;exports.SelectUserData=Lt;exports.TaskEventType=ee;exports.TaskState=z;exports.findLimetypeByLabel=$e;exports.getCommandId=X;exports.getCommandIds=J;exports.getPropertiesByType=xe;exports.getPropertyByLabel=Ve;exports.getPropertyByName=Ue;exports.hasLabel=P;exports.isActionCondition=Wt;exports.isDate=ie;exports.isFloat=ce;exports.isLimeObjectCondition=kt;exports.isRelation=ne;exports.isSingleRelation=oe;exports.isString=se;
4
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","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","../src/logger/logger.ts","../src/logger/types.ts"],"sourcesContent":["/**\n * Service container for the Lime CRM platform that provides access to all platform services.\n *\n * The platform acts as a service locator for accessing repositories, the command bus,\n * HTTP client, and other services throughout the application. It is used by web components\n * (injected via Stencil's `@Prop` decorator), command handlers, and other parts of the system.\n *\n * The platform type indicates which Lime CRM client is hosting the component:\n * - `LimeCRMWebClient`: Standard web client\n * - `LimeCRMDesktopClient`: Desktop application client\n * - `LimeCRMWebAdminClient`: Administrative web interface\n *\n * @example\n * ```typescript\n * // Get core services\n * const http = platform.get(PlatformServiceName.Http);\n * const commandBus = platform.get(PlatformServiceName.CommandBus);\n * const limetypes = platform.get(PlatformServiceName.LimeTypeRepository);\n *\n * // Check platform type for conditional logic\n * if (platform.type === 'LimeCRMDesktopClient') {\n * // Desktop-specific functionality\n * }\n *\n * // Check feature switches\n * if (platform.isFeatureEnabled('newFeature')) {\n * // Use new feature\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Register a custom service (third-party plugins)\n * platform.register('myPlugin.analytics', new AnalyticsService());\n *\n * // Later retrieve it\n * const analytics = platform.get('myPlugin.analytics');\n * ```\n *\n * @public\n * @group Core\n */\nexport interface LimeWebComponentPlatform {\n /**\n * The type of Lime CRM client currently running.\n * Use this to conditionally enable features based on the client environment.\n */\n type: 'LimeCRMWebClient' | 'LimeCRMDesktopClient' | 'LimeCRMWebAdminClient';\n\n /**\n * Get a service from the platform container.\n *\n * Services are accessed through the `PlatformServiceName` enum, which can be extended\n * by third-party modules using module augmentation.\n *\n * @param name - The name of the service to retrieve\n * @returns The requested service instance\n *\n * @example\n * ```typescript\n * const http = platform.get(PlatformServiceName.Http);\n * const repository = platform.get(PlatformServiceName.LimeObjectRepository);\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(name: string): any;\n\n /**\n * Check if a service is currently registered on the platform.\n *\n * Useful for optional dependencies or checking service availability.\n *\n * @param name - The name of the service to check\n * @returns `true` if the service is registered, `false` otherwise\n *\n * @example\n * ```typescript\n * if (platform.has(PlatformServiceName.Analytics)) {\n * const tracker = platform.get(PlatformServiceName.Analytics);\n * tracker.track('event');\n * }\n * ```\n */\n has(name: string): boolean;\n\n /**\n * Register a service on the platform for use throughout the application.\n *\n * Service names are typically defined in the `PlatformServiceName` enum through module\n * augmentation. This ensures type safety and prevents naming conflicts.\n *\n * @param name - The name to register the service under\n * @param service - The service instance to register\n *\n * @example\n * ```typescript\n * const SERVICE_NAME = 'myPlugin.cache';\n * PlatformServiceName.MyCache = SERVICE_NAME;\n *\n * declare module '@limetech/lime-web-components' {\n * interface PlatformServiceNameType {\n * MyCache: typeof SERVICE_NAME;\n * }\n *\n * interface LimeWebComponentPlatform {\n * get(name: PlatformServiceNameType['MyCache']): CacheService;\n * }\n * }\n *\n * // Register the service\n * platform.register(PlatformServiceName.MyCache, new CacheService());\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(name: string, service: any): void;\n\n /**\n * Check if a feature is enabled in the current environment.\n *\n * Feature switches allow gradual rollout of new functionality and\n * environment-specific behavior. Features can be enabled/disabled\n * at the application, user, or system level.\n *\n * @param name - Name of the feature switch to check\n * @returns `true` if the feature is enabled, `false` otherwise\n *\n * @example\n * ```typescript\n * // Use feature switches for gradual rollout\n * if (platform.isFeatureEnabled('advancedSearch')) {\n * return new AdvancedSearchComponent();\n * } else {\n * return new BasicSearchComponent();\n * }\n * ```\n */\n isFeatureEnabled(name: keyof FeatureSwitches): boolean;\n}\n\n/**\n * Core platform service names for accessing built-in services via the platform.\n *\n * Use these strongly-typed keys to retrieve platform services.\n *\n * @example\n * ```typescript\n * const http = platform.get(PlatformServiceName.Http);\n * const commandBus = platform.get(PlatformServiceName.CommandBus);\n * const limeObjects = platform.get(PlatformServiceName.LimeObjectRepository);\n * const limeTypes = platform.get(PlatformServiceName.LimeTypeRepository);\n * const navigator = platform.get(PlatformServiceName.Navigator);\n * ```\n *\n * @remarks\n * Available services include:\n * - `Http` - HTTP client for API requests\n * - `CommandBus` - Command pattern implementation for actions\n * - `LimeObjectRepository` - CRUD operations for business objects\n * - `LimeTypeRepository` - Schema and metadata access\n * - `Navigator` - Client-side routing\n * - `EventDispatcher` - Event pub/sub system\n * - `Translator` - Localization service\n * - And many more...\n *\n * @public\n * @group Core\n */\nexport const PlatformServiceName: PlatformServiceNameType = {\n Route: 'route',\n} as unknown as PlatformServiceNameType;\n\n/**\n * Interface for platform service names that gets augmented by each service module.\n *\n * Each platform service extends this interface through module augmentation to add\n * its service name. This pattern provides compile-time type safety for service names.\n *\n * @example\n * ```typescript\n * // How services augment this interface (done internally by each service):\n * const SERVICE_NAME = 'http';\n * PlatformServiceName.Http = SERVICE_NAME;\n *\n * declare module '@limetech/lime-web-components' {\n * interface PlatformServiceNameType {\n * Http: typeof SERVICE_NAME;\n * }\n *\n * interface LimeWebComponentPlatform {\n * get(name: PlatformServiceNameType['Http']): HttpService;\n * }\n * }\n * ```\n *\n * @public\n * @group Core\n */\nexport interface PlatformServiceNameType {}\n\n/**\n * Available feature switches for conditional functionality.\n *\n * Feature switches enable gradual rollout and A/B testing of new features.\n * This interface is augmented by feature modules to register their switches.\n *\n * @example\n * ```typescript\n * // How features augment this interface:\n * declare module '@limetech/lime-web-components' {\n * interface FeatureSwitches {\n * advancedSearch: boolean;\n * newUIDesign: boolean;\n * betaFeatures: boolean;\n * }\n * }\n *\n * // Usage in components:\n * if (platform.isFeatureEnabled('advancedSearch')) {\n * // Enable advanced search functionality\n * }\n * ```\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 * Check if the property is a relation type, i.e. it is a property that\n * relates to another LimeType, such as `hasone`, `hasmany`, `belongsto`,\n * or `hasandbelongstomany`.\n *\n * @param property - the property to check\n * @returns true if the property is a relation type, false otherwise\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 * Check if the property is a single relation type, i.e. it is a property\n * that relates to another LimeType, such as `hasone` or `belongsto`.\n *\n * @param property - the property to check\n * @returns true if the property is a single relation type, false otherwise\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 * Check if the property is a date or time type, i.e. it is a property\n * that represents a date or time, such as `time`, `timeofday`, `date`,\n * `year`, `quarter`, or `month`.\n *\n * @param property - the property to check\n * @returns true if the property is a date or time type, false otherwise\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 * Check if the property is a string type, i.e. it is a property\n * that represents a string, such as `string`, `text`, `phone`, or `link`.\n *\n * @param property - the property to check\n * @returns true if the property is a string type, false otherwise\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 * Check if the property is a float type, i.e. it is a property\n * that represents a decimal or percent value, such as `decimal` or `percent`.\n *\n * @param property - the property to check\n * @returns true if the property is a float type, false otherwise\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<object, Array<() => void>>();\nconst connectedComponents = new WeakMap<object, 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 */\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: () => void, 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 for (const property of properties) {\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(\n original: () => void | Promise<void>,\n properties: Property[]\n) {\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: () => void) {\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<unknown> {\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 === 0) {\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: unknown) => {\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 */\nfunction subscribe(component: LimeWebComponent, 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 */\nfunction unsubscribeAll(component: LimeWebComponent): void {\n const subscriptions = componentSubscriptions.get(component);\n\n for (const unsubscribe of subscriptions) 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: unknown, property: string) {\n return (state: unknown) => {\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(\n component: LimeWebComponent,\n property: Property\n): () => 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 = 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 */\nfunction bindFunctions(options: StateOptions, scope: unknown) {\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';\nimport { LimeType } from './limetype';\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: Record<string, LimeType>) {\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;\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 * Base marker interface for all commands in the command bus pattern.\n *\n * {@link AnyCommand} serves as the root interface for the command pattern implementation.\n * All commands must extend this interface (either directly or through {@link LimeObjectCommand}\n * or {@link LimeObjectBulkCommand}) to be handled by the {@link CommandBus}.\n *\n * Commands represent user actions or operations that can be executed, such as:\n * - Exporting data to Excel\n * - Sending emails\n * - Generating reports\n * - Creating or deleting records\n * - Custom business logic operations\n *\n * > **Important:** All properties of a command must be serializable and publicly assignable:\n * >\n * > **Serialization requirements:**\n * > - Use primitive types (string, number, boolean)\n * > - Use plain objects and arrays\n * > - Use serializable custom types (like {@link Expression})\n * > - Avoid functions, DOM elements, class instances with methods, circular references, etc.\n * >\n * > **Assignability requirements:**\n * > - All properties must be public (not private or protected)\n * > - Properties cannot be readonly after instantiation\n * > - Constructor parameters are optional for command creation\n * >\n * > The platform creates commands by instantiating the class without constructor arguments,\n * > then directly assigning values to properties. Commands may also be serialized for storage,\n * > transmission, or recreation via {@link CommandBus.createCommand}.\n *\n * @example\n * ```typescript\n * @Command({ id: 'generate-report' })\n * export class GenerateReportCommand implements AnyCommand {\n * public reportType: string;\n * public startDate: string; // ISO date string, not Date object\n * public endDate: string;\n * }\n * ```\n *\n * @see {@link LimeObjectCommand} for commands operating on a single object\n * @see {@link LimeObjectBulkCommand} for commands operating on multiple objects\n * @see {@link CommandBus} for executing commands\n *\n * @public\n * @group Command bus\n */\nexport interface AnyCommand {}\n\n/**\n * A command that operates on a single {@link LimeObject}.\n *\n * {@link LimeObjectCommand} is used for actions that target a specific record,\n * such as sending an email to a contact, generating a PDF for a deal, or\n * archiving a specific company. The context property identifies which object\n * the command should operate on.\n *\n * @example\n * ```typescript\n * @Command({ id: 'send-email' })\n * export class SendEmailCommand implements LimeObjectCommand {\n * public context: LimeWebComponentContext & { limetype: string; id: number };\n * public subject: string;\n * public body: string;\n *\n * constructor(\n * context?: LimeWebComponentContext & { limetype: string; id: number },\n * subject?: string,\n * body?: string\n * ) {\n * this.context = context;\n * this.subject = subject;\n * this.body = body;\n * }\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Execute a single-object command\n * const commandBus = platform.get(PlatformServiceName.CommandBus);\n *\n * const command = new SendEmailCommand(\n * context,\n * 'Meeting Invitation',\n * 'Please join us for a meeting...'\n * );\n *\n * await commandBus.handle(command);\n * ```\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 * Must include both `limetype` (the type of object) and `id` (the specific\n * object's identifier). This ensures the command knows exactly which record\n * to target.\n */\n context: LimeWebComponentContext & { limetype: string; id: number };\n}\n\n/**\n * A command that operates on multiple {@link LimeObject | LimeObjects} of a single {@link LimeType}.\n *\n * {@link LimeObjectBulkCommand} is used for batch operations on multiple records,\n * such as exporting selected deals to Excel, sending bulk emails, or mass-updating\n * status fields. The filter property determines which objects are included in the operation.\n *\n * > **Important:** Do not assume a specific filter structure in your command handler.\n * > The filter expression can vary depending on the user's selection:\n * > - **Specific selection**: `{ key: 'id', op: 'IN', exp: [1, 2, 3] }` (selected rows)\n * > - **Select all with criteria**: `{ key: 'status', op: '=', exp: 'won' }` (filtered view)\n * > - **Select all**: `null` (all objects in the limetype)\n * >\n * > Always pass the filter to your data queries rather than parsing its structure.\n *\n * @example\n * ```typescript\n * @Command({ id: 'export-to-excel' })\n * export class ExportToExcelCommand implements LimeObjectBulkCommand {\n * public context: LimeWebComponentContext & { limetype: string };\n * public filter: Expression | null;\n * public includeRelations: boolean;\n *\n * constructor(\n * context?: LimeWebComponentContext & { limetype: string },\n * filter?: Expression | null,\n * includeRelations: boolean = false\n * ) {\n * this.context = context;\n * this.filter = filter;\n * this.includeRelations = includeRelations;\n * }\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Execute a bulk command on selected items\n * const commandBus = platform.get(PlatformServiceName.CommandBus);\n *\n * const selectedFilter: Expression = {\n * key: 'id',\n * op: 'IN',\n * exp: [1, 2, 3, 4, 5]\n * };\n *\n * const command = new ExportToExcelCommand(\n * { limetype: 'deal' },\n * selectedFilter,\n * true\n * );\n *\n * await commandBus.handle(command);\n * ```\n *\n * @example\n * ```typescript\n * // Bulk command with parent context (related objects)\n * const command = new UpdateStatusCommand(\n * {\n * limetype: 'deal',\n * parent: { limetype: 'company', id: 123 }\n * },\n * {\n * key: 'status',\n * op: '=',\n * exp: 'pending'\n * },\n * 'active' // New status value\n * );\n * // This will update all pending deals for company #123\n * ```\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.\n *\n * Must include `limetype` to identify which type of objects to operate on.\n * If `parent` is set on the context, it indicates that the {@link LimeObject | LimeObjects}\n * are all related to a common parent {@link LimeObject} via a `belongsto` relation.\n *\n * @example\n * ```typescript\n * // All deals (no parent filter)\n * context = { limetype: 'deal' }\n *\n * // Only deals related to a specific company\n * context = { limetype: 'deal', parent: { limetype: 'company', id: 456 } }\n * ```\n */\n context: LimeWebComponentContext & { limetype: string };\n\n /**\n * An {@link Expression} describing which {@link LimeObject | LimeObjects} to operate on.\n *\n * Can be `null` to operate on all objects (subject to parent context filtering),\n * or a filter expression to limit the operation to specific records.\n *\n * @example\n * ```typescript\n * // Operate on selected IDs\n * filter = { key: 'id', op: 'IN', exp: [1, 2, 3] };\n *\n * // Operate on objects matching criteria\n * filter = {\n * op: 'AND',\n * exp: [\n * { key: 'status', op: '=', exp: 'active' },\n * { key: 'value', op: '>', exp: 10000 }\n * ]\n * };\n *\n * // Operate on all objects\n * filter = null;\n * ```\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: unknown[]\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 using the command pattern.\n *\n * The {@link CommandBus} is the central hub for the command pattern implementation.\n * It manages command registration, handler lookup, and command execution. Commands\n * are decoupled from their handlers, allowing for flexible middleware chains and\n * cross-cutting concerns like logging, validation, and authorization.\n *\n * Key responsibilities:\n * - Register commands with their handlers\n * - Execute commands through their registered handlers\n * - Support middleware for command pipeline\n * - Dispatch command lifecycle events\n * - Provide command metadata and discovery\n *\n * @example\n * ```typescript\n * // Register and execute a command\n * const commandBus = platform.get(PlatformServiceName.CommandBus);\n *\n * if (commandBus.isSupported(SendEmailCommand)) {\n * const command = new SendEmailCommand(context, 'Subject', 'Body');\n * await commandBus.handle(command);\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Register a custom command handler\n * const commandBus = platform.get(PlatformServiceName.CommandBus);\n *\n * const handler = {\n * handle: async (command: GenerateReportCommand) => {\n * console.log('Generating report...');\n * return { success: true, reportUrl: '/reports/123.pdf' };\n * }\n * };\n *\n * commandBus.register(\n * GenerateReportCommand,\n * handler,\n * {\n * title: 'Generate Report',\n * description: 'Creates a PDF report',\n * icon: 'file-pdf'\n * }\n * );\n * ```\n *\n * @see {@link AnyCommand} for base command interface\n * @see {@link CommandHandler} for handler interface\n * @see {@link CommandMiddleware} for middleware implementation\n *\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 * Associates a command class with a handler that will process instances\n * of that command when {@link CommandBus.handle} is called.\n *\n * @param commandClass - The command class to register\n * @param handler - The {@link CommandHandler} instance that will execute the command\n *\n * @example\n * ```typescript\n * commandBus.register(SendEmailCommand, {\n * handle: async (command: SendEmailCommand) => {\n * // Send email logic\n * return { success: true };\n * }\n * });\n * ```\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 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handle(command: AnyCommand): any;\n}\n\n/**\n * @public\n * @group Command bus\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n execute(command: AnyCommand, next: CallableCommandMiddleware): any;\n}\n\n/**\n * Events dispatched by the commandbus event middleware.\n *\n * The command bus dispatches events at key points in the command lifecycle,\n * allowing you to observe command execution, access results, handle errors,\n * or even prevent commands from executing.\n *\n * @example\n * ```typescript\n * // Listen for command results\n * document.addEventListener(CommandEventName.Handled, (event: CommandEvent) => {\n * console.log('Command executed:', event.detail.command);\n * console.log('Result:', event.detail.result);\n * });\n *\n * // Handle command errors\n * document.addEventListener(CommandEventName.Failed, (event: CommandEvent) => {\n * console.error('Command failed:', event.detail.error);\n * });\n *\n * // Prevent a command from executing\n * document.addEventListener(CommandEventName.Received, (event: CommandEvent) => {\n * if (shouldBlockCommand(event.detail.command)) {\n * event.preventDefault();\n * }\n * });\n * ```\n *\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 * The event detail includes the result returned by the command handler.\n *\n * @see {@link CommandEvent}\n */\n Handled = 'command.handled',\n\n /**\n * Dispatched if an error occurs while handling the command.\n * The event detail includes the error that was thrown.\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 *\n * Used with {@link CommandBus.createCommand} to create command instances from\n * configuration data. This is useful for storing command definitions or\n * transmitting them across boundaries.\n *\n * @public\n * @group Command bus\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\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 *\n * **All values must be serializable** (primitive types, plain objects, arrays).\n * This matches the requirement that all command properties must be serializable\n * as defined in {@link AnyCommand}.\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 * Decorator to register a class as a command with a unique identifier.\n *\n * The `@Command` decorator marks a class as a command and assigns it a unique ID\n * that can be used for command lookup, registration, and execution. This decorator\n * is essential for the command pattern implementation and enables type-safe command\n * creation through the {@link CommandRegistry}.\n *\n * @param options - A {@link CommandOptions} object containing the unique command ID\n * @returns Decorator function that registers the command class\n *\n * @example\n * ```typescript\n * // Basic command definition\n * @Command({ id: 'generate-pdf-report' })\n * export class GeneratePdfReportCommand implements AnyCommand {\n * public reportType: string;\n * public includeCharts: boolean;\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Single-object command with context\n * @Command({ id: 'archive-deal' })\n * export class ArchiveDealCommand implements LimeObjectCommand {\n * public context: LimeWebComponentContext & { limetype: string; id: number };\n * public reason: string;\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Bulk command with filter\n * @Command({ id: 'bulk-update-status' })\n * export class BulkUpdateStatusCommand implements LimeObjectBulkCommand {\n * public context: LimeWebComponentContext & { limetype: string };\n * public filter: Expression | null;\n * public newStatus: string;\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Register in CommandRegistry for type safety\n * declare module '@limetech/lime-web-components' {\n * interface CommandRegistry {\n * 'generate-pdf-report': GeneratePdfReportCommand;\n * 'archive-deal': ArchiveDealCommand;\n * 'bulk-update-status': BulkUpdateStatusCommand;\n * }\n * }\n *\n * // Now you can use createCommand with type safety\n * const command = commandBus.createCommand({\n * id: 'generate-pdf-report',\n * params: { reportType: 'monthly', includeCharts: true }\n * });\n * ```\n *\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 commandClass['commandId'] = id;\n}\n\nfunction setHasInstance(commandClass: CommandClass, id: string) {\n Object.defineProperty(commandClass, Symbol.hasInstance, {\n value: (instance: unknown) => {\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 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\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 [...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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n objects: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n post(url: string, data?: object, 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n patch(url: string, data?: object, 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n put(url: string, data?: object, 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 * Decorator that subscribes to configuration data from the {@link ConfigRepository}.\n *\n * This decorator automatically updates the decorated property whenever configuration\n * data changes in the platform. Returns an object with all configs where the config\n * key is used as the key. It's the recommended approach over manual subscriptions as\n * it handles subscription lifecycle automatically.\n *\n * @param options - Configuration including key filtering and state transformation via {@link SelectConfigOptions}\n * @returns A PropertyDecorator that sets up automatic subscription to config data\n *\n * @remarks\n * Subscribes to: {@link ConfigRepository}\n *\n * Updates: The decorated property with configuration data (object or specific value)\n *\n * Lifecycle: Automatically subscribes in `connectedCallback` and unsubscribes\n * in `disconnectedCallback`\n *\n * @example\n * Get all configuration data\n * ```typescript\n * @State()\n * @SelectConfig({})\n * private config: Record<string, unknown>;\n *\n * render() {\n * return (\n * <div>\n * <h2>Configuration</h2>\n * <pre>{JSON.stringify(this.config, null, 2)}</pre>\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * Get specific config value by name\n * ```typescript\n * @State()\n * @SelectConfig({\n * name: 'apiEndpoint',\n * map: [(config) => config?.url || 'https://api.example.com']\n * })\n * private apiUrl: string;\n *\n * async fetchData() {\n * const response = await fetch(`${this.apiUrl}/data`);\n * return response.json();\n * }\n * ```\n *\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 * Decorator that subscribes to the current device type from the device service.\n *\n * This decorator automatically updates the decorated property whenever the device type\n * changes (typically when the viewport is resized). The device type indicates roughly\n * how big the viewport is, not what actual device is being used. It's the recommended\n * approach over manual subscriptions as it handles subscription lifecycle automatically.\n *\n * @param options - Configuration for state transformation and filtering via {@link StateOptions}\n * @returns A PropertyDecorator that sets up automatic subscription to device type\n *\n * @remarks\n * Subscribes to: Device service\n *\n * Updates: The decorated property with {@link DeviceType} ('desktop', 'tablet', or 'phone')\n *\n * Viewport-aware: Automatically updates when viewport size changes\n *\n * Lifecycle: Automatically subscribes in `connectedCallback` and\n * unsubscribes in `disconnectedCallback`\n *\n * @example\n * Basic usage with Stencil component\n * ```typescript\n * @State()\n * @SelectDevice()\n * private deviceType: DeviceType;\n *\n * render() {\n * return (\n * <div class={`layout-${this.deviceType}`}>\n * <p>Viewing on: {this.deviceType}</p>\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * Conditional rendering based on device\n * ```typescript\n * @State()\n * @SelectDevice()\n * private device: DeviceType;\n *\n * render() {\n * if (this.device === 'phone') {\n * return <button class=\"hamburger-menu\">Menu</button>;\n * }\n *\n * return (\n * <nav class=\"full-menu\">\n * <a href=\"/home\">Home</a>\n * <a href=\"/about\">About</a>\n * <a href=\"/contact\">Contact</a>\n * </nav>\n * );\n * }\n * ```\n *\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 * Decorator that subscribes to the application name from the {@link ApplicationRepository}.\n *\n * This decorator automatically updates the decorated property whenever the application\n * name changes in the platform. It's the recommended approach over manual subscriptions\n * as it handles subscription lifecycle automatically.\n *\n * @param options - Configuration for state transformation and filtering via {@link StateOptions}\n * @returns A PropertyDecorator that sets up automatic subscription to application name\n *\n * @remarks\n * Subscribes to: {@link ApplicationRepository}\n *\n * Updates: The decorated property with the application name (`string`)\n *\n * Lifecycle: Automatically subscribes in `connectedCallback` and\n * unsubscribes in `disconnectedCallback` of the component.\n *\n * @example\n * ```typescript\n * @State()\n * @SelectApplicationName()\n * private appName: string;\n * ```\n *\n * @example\n * ```typescript\n * // Transform the application name\n * @State()\n * @SelectApplicationName({\n * map: [(name) => name?.toUpperCase()]\n * })\n * private appNameUppercase: string;\n * ```\n *\n * @example\n * ```typescript\n * // Only update when name is defined\n * @State()\n * @SelectApplicationName({\n * filter: [(name) => name !== null && name !== undefined]\n * })\n * private validAppName: string;\n * ```\n *\n * @example\n * ```typescript\n * // Combine map and filter for complex transformations\n * @State()\n * @SelectApplicationName({\n * map: [\n * (name) => name?.toLowerCase(),\n * (name) => `${name} CRM`\n * ],\n * filter: [(formattedName) => formattedName?.length > 4]\n * })\n * private brandedName: string;\n * ```\n *\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: { applicationName: string }) {\n return applicationData.applicationName;\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\nimport { User } from '../user';\n\n/**\n * Decorator that subscribes to the currently logged in user from the {@link ApplicationRepository}.\n *\n * This decorator automatically updates the decorated property whenever the current user\n * changes in the platform. It's the recommended approach over manual subscriptions as it\n * handles subscription lifecycle automatically.\n *\n * @param options - Configuration for state transformation and filtering via {@link StateOptions}\n * @returns A PropertyDecorator that sets up automatic subscription to the current user\n *\n * @remarks\n * Subscribes to: {@link ApplicationRepository}\n *\n * Updates: The decorated property with the {@link User} object\n *\n * Lifecycle: Automatically subscribes in `connectedCallback` and\n * unsubscribes in `disconnectedCallback` of the component.\n *\n * @example\n * ```typescript\n * @State()\n * @SelectCurrentUser()\n * private user: User;\n * ```\n *\n * @example\n * ```typescript\n * // Extract user's full name\n * @State()\n * @SelectCurrentUser({\n * map: [(user) => user?.fullname]\n * })\n * private userName: string;\n * ```\n *\n * @example\n * ```typescript\n * // Create initials with map transformations\n * @State()\n * @SelectCurrentUser({\n * map: [\n * (user) => user?.fullname,\n * (name) => name?.split(' ').map(n => n[0]).join('').toUpperCase()\n * ],\n * filter: [(initials) => initials !== undefined]\n * })\n * private userInitials: string;\n * ```\n *\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: { currentUser: User }) {\n return applicationData.currentUser;\n}\n","import {\n PlatformServiceName,\n StateOptions,\n StateDecoratorConfig,\n} from '../../core';\nimport { createStateDecorator } from '../../core/decorators/factory';\nimport { Session } from '../session';\n\n/**\n * Decorator that subscribes to the application session from the {@link ApplicationRepository}.\n *\n * This decorator automatically updates the decorated property whenever the session\n * changes in the platform. The session contains authentication and authorization\n * information. It's the recommended approach over manual subscriptions as it handles\n * subscription lifecycle automatically.\n *\n * @param options - Configuration for state transformation and filtering via {@link StateOptions}\n * @returns A PropertyDecorator that sets up automatic subscription to the session\n *\n * @remarks\n * Subscribes to: {@link ApplicationRepository}\n *\n * Updates: The decorated property with the {@link Session} object\n *\n * Lifecycle: Automatically subscribes in `connectedCallback` and\n * unsubscribes in `disconnectedCallback` of the component.\n *\n * @example\n * ```typescript\n * @State()\n * @SelectSession()\n * private session: Session;\n * ```\n *\n * @example\n * ```typescript\n * // Extract specific session property\n * @State()\n * @SelectSession({\n * map: [(session) => session?.admin]\n * })\n * private isAdmin: boolean;\n * ```\n *\n * @example\n * ```typescript\n * // Filter for valid sessions only\n * @State()\n * @SelectSession({\n * filter: [(session) => session !== null && session?.active === true]\n * })\n * private activeSession: Session;\n * ```\n *\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: { session: Session }) {\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 * Represents a conditional evaluation rule that can be registered and used\n * throughout the application.\n *\n * Conditions are predicate functions that determine whether certain UI elements should be\n * visible, enabled, or available based on runtime state. For example, they can be used to:\n * - Control action visibility (show/hide menu items based on object state)\n * - Enable/disable features based on user permissions or context\n * - Filter lists of items based on dynamic criteria\n * - Implement business rules for conditional UI rendering\n *\n * Each condition has a unique ID and a type that indicates what kind of subject it evaluates.\n * The most common types are 'limeobject' and 'action', but custom types can be defined.\n *\n * @example\n * Registering a simple LimeObject condition\n * ```typescript\n * const registry = platform.get(PlatformServiceName.ConditionRegistry);\n *\n * const isDealWon = {\n * id: 'deal.is-won',\n * type: 'limeobject',\n * evaluate: (deal) => deal.dealstatus === 'won'\n * };\n *\n * registry.addCondition(isDealWon);\n * ```\n *\n * @example\n * Condition with additional parameters\n * ```typescript\n * const hasMinimumValue = {\n * id: 'object.min-value',\n * type: 'limeobject',\n * evaluate: (object, params) => {\n * const { field, minValue } = params;\n * const value = object[field];\n * return typeof value === 'number' && value >= minValue;\n * }\n * };\n *\n * const isHighValue = hasMinimumValue.evaluate(dealObject, {\n * field: 'value',\n * minValue: 100000\n * });\n * ```\n *\n * @see {@link ConditionRegistry} for managing conditions\n * @see {@link LimeObjectCondition} for LimeObject-specific conditions\n * @see {@link ActionCondition} for action-specific conditions\n *\n * @beta\n * @group Conditions\n */\nexport type Condition<T = unknown> = {\n /**\n * The type of subject this condition evaluates.\n *\n * Common types include:\n * - `limeobject` - Evaluates {@link LimeObject} instances\n * - `action` - Evaluates {@link Action} instances\n *\n * Custom types can be defined for specialized evaluation contexts.\n */\n type: string;\n\n /**\n * The evaluation function that determines if the condition is met.\n *\n * This predicate function receives the subject to evaluate and optional parameters\n * for configuration. It should return `true` if the condition is satisfied,\n * `false` otherwise.\n *\n * The function should be pure and side-effect free when possible, as it may be\n * called frequently during UI rendering and updates.\n *\n * @param subject - The value to evaluate. Type depends on the condition type.\n * For 'limeobject' conditions, this is a {@link LimeObject}.\n * For 'action' conditions, this is an {@link Action}.\n * @param params - Optional configuration data for the evaluation.\n * Can be used to pass context-specific values like field names, thresholds,\n * or other criteria. The evaluation function should validate params if used.\n * @returns `true` if the condition is met, `false` otherwise.\n * @throws May throw an error if params has an unexpected type or required data is missing.\n *\n * @example\n * Simple boolean check\n * ```typescript\n * const evaluate = (deal: LimeObject) => deal.dealstatus === 'won';\n * ```\n *\n * @example\n * Using params for configuration\n * ```typescript\n * const evaluate = (obj: LimeObject, params?: { propertyName: string }) => {\n * return obj.getValue(params.propertyName) !== null;\n * };\n * ```\n */\n evaluate: (subject: T, params?: unknown) => boolean;\n\n /**\n * Unique identifier for this condition.\n *\n * The ID is used to reference the condition when registering, removing, or\n * looking it up from the {@link ConditionRegistry}. It must be unique across\n * all registered conditions.\n */\n id: string;\n};\n\n/**\n * A specialized condition type for evaluating {@link LimeObject} instances.\n *\n * LimeObject conditions are the most common type of condition, used to control\n * UI elements based on the state of business objects (deals, contacts, companies, etc.).\n * The evaluate function receives a LimeObject and can check any of its properties\n * to determine if the condition is met.\n *\n * @example\n * Condition based on object status\n * ```typescript\n * const registry = platform.get(PlatformServiceName.ConditionRegistry);\n *\n * const isDealActive = {\n * id: 'deal.is-active',\n * type: 'limeobject',\n * evaluate: (deal) => {\n * return deal.dealstatus === 'qualification' ||\n * deal.dealstatus === 'proposal';\n * }\n * };\n *\n * registry.addCondition(isDealActive);\n *\n * const condition = registry.getCondition('deal.is-active');\n * const isActive = condition.evaluate(deal);\n * ```\n *\n * @example\n * Condition for conditional action visibility\n * ```typescript\n * const canSendEmail = {\n * id: 'contact.can-send-email',\n * type: 'limeobject',\n * evaluate: (contact) => contact.email && contact.email.length > 0\n * };\n *\n * const sendEmailAction = {\n * label: 'Send Email',\n * icon: 'envelope',\n * command: { name: 'send-email' },\n * condition: canSendEmail\n * };\n * ```\n *\n * @see {@link Condition} for the base condition type\n * @see {@link LimeObject} for the object structure\n *\n * @beta\n * @group Conditions\n */\nexport type LimeObjectCondition = Condition<LimeObject> & {\n type: 'limeobject';\n};\n\n/**\n * A specialized condition type for evaluating {@link Action} instances.\n *\n * Action conditions are used to control the availability or visibility of actions\n * themselves, based on properties of the action. This is less common than {@link LimeObject}\n * conditions but useful for creating dynamic action menus that filter or organize\n * actions based on their metadata.\n *\n * @example\n * Condition to filter bulk actions\n * ```typescript\n * const registry = platform.get(PlatformServiceName.ConditionRegistry);\n *\n * const isBulkAction = {\n * id: 'action.is-bulk',\n * type: 'action',\n * evaluate: (action) => action.command.name.startsWith('bulk-')\n * };\n *\n * registry.addCondition(isBulkAction);\n * ```\n *\n * @see {@link Condition} for the base condition type\n * @see {@link Action} for the action structure\n *\n * @beta\n * @group Conditions\n */\nexport type ActionCondition = Condition<Action> & {\n type: 'action';\n};\n\n/**\n * Check if condition expects a {@link LimeObject} to be passed when it is evaluated\n *\n * @param condition - the condition to check\n * @returns true if the condition is a condition for a {@link LimeObject},\n * false otherwise\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 * @param condition - the condition to check\n * @returns true if the condition is a condition for an {@link Action},\n * false otherwise\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 * Central registry for managing conditional evaluation rules across the application.\n *\n * The ConditionRegistry acts as a global repository for {@link Condition} instances,\n * allowing different parts of the application to register, retrieve, and evaluate\n * conditions. This is particularly useful for:\n * - Controlling action visibility based on object state\n * - Implementing permission-based UI rendering\n * - Creating dynamic, context-aware interfaces\n * - Sharing reusable business logic across components\n *\n * Components typically access the registry via the platform service and register\n * their conditions when the application initializes. Conditions can be\n * added and removed dynamically, allowing for flexible runtime configuration.\n *\n * @example\n * Registering and using conditions in a component\n * ```typescript\n * const registry = platform.get(PlatformServiceName.ConditionRegistry);\n *\n * const canWinDeal = {\n * id: 'deal.can-win',\n * type: 'limeobject',\n * evaluate: (deal) => deal.dealstatus === 'proposal' && deal.value > 0\n * };\n *\n * const canLoseDeal = {\n * id: 'deal.can-lose',\n * type: 'limeobject',\n * evaluate: (deal) => deal.dealstatus !== 'lost' && deal.dealstatus !== 'won'\n * };\n *\n * registry.addCondition(canWinDeal);\n * registry.addCondition(canLoseDeal);\n *\n * const actions = [\n * {\n * label: 'Mark as Won',\n * icon: 'trophy',\n * command: { name: 'win-deal' },\n * condition: registry.getCondition('deal.can-win')\n * },\n * {\n * label: 'Mark as Lost',\n * icon: 'times',\n * command: { name: 'lose-deal' },\n * condition: registry.getCondition('deal.can-lose')\n * }\n * ];\n *\n * const availableActions = actions.filter(action => {\n * return !action.condition || action.condition.evaluate(deal);\n * });\n * ```\n *\n * @see {@link Condition} for the condition structure\n * @see {@link LimeObjectCondition} for object-specific conditions\n * @see {@link ActionCondition} for action-specific conditions\n *\n * @beta\n * @group Conditions\n */\nexport interface ConditionRegistry {\n /**\n * Registers a new condition in the registry.\n *\n * The condition's ID must be unique across all registered conditions.\n * If a condition with the same ID already exists, this method throws an error.\n * It's recommended to register conditions during application startup.\n *\n * @param condition - The condition to register. Must have a unique ID.\n * @throws Error if a condition with the same ID already exists in the registry.\n *\n * @example\n * ```typescript\n * const isActive: LimeObjectCondition = {\n * id: 'deal.is-active',\n * type: 'limeobject',\n * evaluate: (deal) => deal.dealstatus === 'active'\n * };\n *\n * registry.addCondition(isActive);\n * ```\n */\n addCondition(condition: Condition);\n\n /**\n * Removes a condition from the registry.\n *\n * The condition is identified by its ID. If no condition with the given ID\n * exists in the registry, this method throws an error.\n *\n * @param condition - The condition to remove. Must exist in the registry.\n * @throws Error if the condition's ID does not exist in the registry.\n *\n * @example\n * ```typescript\n * const condition = registry.getCondition('deal.is-active');\n * registry.removeCondition(condition);\n * ```\n *\n * @example\n * Safe removal with existence check\n * ```typescript\n * if (registry.hasCondition('deal.is-active')) {\n * registry.removeCondition(registry.getCondition('deal.is-active'));\n * }\n * ```\n */\n removeCondition(condition: Condition);\n\n /**\n * Checks whether a condition with the given ID exists in the registry.\n *\n * This method is useful for defensive programming, allowing you to verify\n * that a condition exists before attempting to retrieve or remove it.\n *\n * @param id - The unique identifier of the condition to check.\n * @returns `true` if a condition with the ID exists, `false` otherwise.\n *\n * @example\n * ```typescript\n * if (registry.hasCondition('deal.can-win')) {\n * const condition = registry.getCondition('deal.can-win');\n * const canWin = condition.evaluate(deal);\n * }\n * ```\n */\n hasCondition(id: string): boolean;\n\n /**\n * Retrieves all registered conditions.\n *\n * This method returns a list of all conditions currently in the registry,\n * regardless of their type. This can be useful for debugging, inspection,\n * or building dynamic UIs that need to enumerate available conditions.\n *\n * @returns An array of all registered conditions.\n *\n * @example\n * ```typescript\n * const allConditions = registry.getConditions();\n * console.log(`Found ${allConditions.length} conditions`);\n *\n * const limeObjectConditions = allConditions.filter(\n * c => c.type === 'limeobject'\n * );\n * ```\n */\n getConditions(): Condition[];\n\n /**\n * Retrieves a specific condition by its unique identifier.\n *\n * If no condition with the given ID exists, this method throws an error.\n * Use {@link ConditionRegistry.hasCondition} first if you need to check for existence.\n *\n * @param id - The unique identifier of the condition to retrieve.\n * @returns The condition with the specified ID.\n * @throws Error if no condition with the given ID exists in the registry.\n *\n * @example\n * ```typescript\n * const canWin = registry.getCondition('deal.can-win');\n * const isEligible = canWin.evaluate(dealObject);\n * ```\n *\n * @example\n * Safe retrieval with type checking\n * ```typescript\n * const condition = registry.getCondition('deal.is-active');\n * if (isLimeObjectCondition(condition)) {\n * const result = condition.evaluate(myDeal);\n * }\n * ```\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","/**\n * Logger service for writing log messages to configured handlers\n *\n * Loggers are created from a {@link LoggerFactory} with a specific scope/category.\n * All log messages written to a logger will be sent to all handlers configured\n * in the factory.\n *\n * @example\n * ```typescript\n * const logger = loggerFactory.createLogger('my-component');\n *\n * logger.info('Component initialized');\n * logger.debug('Processing data', { itemCount: 42 });\n * logger.warn('Deprecated API usage detected');\n * logger.error('Failed to fetch data', error, { url: '/api/data' });\n * ```\n *\n * @beta\n * @group Logger\n */\nexport interface Logger {\n /**\n * The scope/category for this logger instance\n */\n readonly scope: string;\n\n /**\n * Logs a debug message\n *\n * Use for detailed diagnostic information useful during development and troubleshooting.\n * Debug logs are typically disabled in production and should include technical details\n * like internal state, intermediate values, or execution flow.\n *\n * @param message - The log message\n * @param data - Optional additional data to include with the log entry\n *\n * @example\n * ```typescript\n * logger.debug('Cache miss, fetching from API', { key: 'user:123' });\n * logger.debug('Rendering component', { props: componentProps });\n * ```\n */\n debug(message: string, data?: LogData): void;\n\n /**\n * Logs an informational message\n *\n * Use for significant application events that represent normal behavior.\n * Info logs should capture key milestones, successful operations, or state transitions\n * that are useful for understanding application flow in production.\n *\n * @param message - The log message\n * @param data - Optional additional data to include with the log entry\n *\n * @example\n * ```typescript\n * logger.info('User authenticated', { userId: user.id });\n * logger.info('File uploaded successfully', { filename: 'report.pdf', size: 2048 });\n * ```\n */\n info(message: string, data?: LogData): void;\n\n /**\n * Logs a warning message\n *\n * Use for unexpected situations that don't prevent the application from functioning\n * but may indicate potential issues, deprecated usage, or suboptimal conditions.\n * Warnings should be actionable and suggest something that may need attention.\n *\n * @param message - The log message\n * @param data - Optional additional data to include with the log entry\n *\n * @example\n * ```typescript\n * logger.warn('API response time exceeded threshold', { duration: 3500, threshold: 3000 });\n * logger.warn('Using deprecated configuration option', { option: 'legacy_mode' });\n * ```\n */\n warn(message: string, data?: LogData): void;\n\n /**\n * Logs an error message\n *\n * Use for failures and exceptions that prevent normal operation or indicate\n * something has gone wrong. Error logs should always describe what failed\n * and include relevant context to aid in diagnosis.\n *\n * @param message - The log message\n * @param error - Optional error object\n * @param data - Optional additional data to include with the log entry\n *\n * @example\n * ```typescript\n * logger.error('Failed to fetch user data', error, { userId: 123 });\n * logger.error('Invalid configuration detected', undefined, { config: invalidConfig });\n * ```\n */\n error(message: string, error?: Error, data?: LogData): void;\n}\n\n/**\n * Handler for processing log messages\n *\n * Implementations can handle logs by writing to different outputs such as\n * console, memory, IndexedDB, or external services.\n *\n * @example\n * ```typescript\n * class ConsoleHandler implements LogHandler {\n * minLevel = LogLevel.Info;\n *\n * handle(entry: LogEntry): void {\n * const prefix = `[${entry.level.toUpperCase()}] [${entry.scope}]`;\n * console.log(`${prefix} ${entry.message}`, entry.data);\n * }\n * }\n *\n * // Change level at runtime\n * consoleHandler.minLevel = LogLevel.Debug;\n * ```\n *\n * @beta\n * @group Logger\n */\nexport interface LogHandler {\n /**\n * Handles a log entry\n *\n * Implementations should handle their own errors internally to ensure\n * reliability. However, any uncaught errors thrown by this method will\n * be caught by the factory to prevent one handler from breaking others.\n * Errors will be logged to the console but will not stop other handlers\n * from receiving the log entry.\n *\n * @param entry - The log entry to handle\n */\n handle(entry: LogEntry): void | Promise<void>;\n\n /**\n * Minimum log level this handler should receive\n *\n * If specified, the factory will only pass log entries with a level\n * equal to or higher than this value. If not specified, all log\n * entries are passed to the handler.\n *\n * Level priority (lowest to highest): Debug → Info → Warn → Error\n *\n * This can be changed at runtime to dynamically adjust filtering.\n */\n minLevel?: LogLevel;\n}\n\n/**\n * Extended handler interface for handlers that support log storage and retrieval\n *\n * Handlers like memory and IndexedDB implement this interface to allow\n * querying and exporting stored logs.\n *\n * @remarks\n * Implementations should respect the configured retention policies (`maxEntries`\n * and `maxAge`) to prevent unbounded growth. These limits can be changed at\n * runtime to dynamically adjust retention behavior.\n *\n * For high-volume logging, consider batching writes to reduce overhead.\n *\n * @example\n * ```typescript\n * class MemoryHandler implements LogStore {\n * maxEntries = 10000;\n * maxAge = 7 * 24 * 60 * 60 * 1000; // 7 days\n *\n * handle(entry: LogEntry): void { }\n * getLogs(): LogEntry[] { return []; }\n * clear(): void { }\n * }\n * ```\n *\n * @beta\n * @group Logger\n */\nexport interface LogStore extends LogHandler {\n /**\n * Retrieves all stored log entries\n *\n * @returns Array of all log entries\n */\n getLogs(): LogEntry[] | Promise<LogEntry[]>;\n\n /**\n * Clears all stored log entries\n */\n clear(): void | Promise<void>;\n\n /**\n * Maximum number of log entries to retain\n *\n * When the number of stored entries exceeds this limit, the oldest\n * entries should be removed. If not specified, no entry-count limit\n * is enforced.\n *\n * This can be changed at runtime to dynamically adjust retention.\n */\n maxEntries?: number;\n\n /**\n * Maximum age of log entries in milliseconds\n *\n * Entries older than this age should be removed during cleanup.\n * If not specified, no age-based cleanup is performed.\n *\n * This can be changed at runtime to dynamically adjust retention.\n *\n * @example\n * ```typescript\n * // Retain logs for 7 days\n * store.maxAge = 7 * 24 * 60 * 60 * 1000;\n *\n * // Retain logs for 1 hour\n * store.maxAge = 60 * 60 * 1000;\n * ```\n */\n maxAge?: number;\n}\n\n/**\n * Factory for creating {@link Logger} instances\n *\n * The factory is initialized with one or more log handlers. All loggers created\n * from the factory will write to all configured handlers.\n *\n * @example\n * ```typescript\n * // Get the logger factory from the platform\n * const loggerFactory = platform.get('logger');\n *\n * // Create loggers for different components\n * const httpLogger = loggerFactory.createLogger('http');\n * const authLogger = loggerFactory.createLogger('auth');\n *\n * // Register a custom handler dynamically\n * const customHandler = new MyCustomHandler();\n * loggerFactory.addHandler(customHandler);\n *\n * // Retrieve all logs\n * const allLogs = await loggerFactory.getLogs();\n *\n * // Clear all logs\n * await loggerFactory.clearLogs();\n * ```\n *\n * @beta\n * @group Logger\n */\nexport interface LoggerFactory {\n /**\n * Creates a logger instance for a specific scope/category\n *\n * @param scope - The scope or category for the logger (e.g., 'http', 'auth', 'component-name')\n * @returns A logger instance that writes to all configured handlers\n */\n createLogger(scope: string): Logger;\n\n /**\n * Registers a new handler with the factory\n *\n * The handler will receive all future log entries from all loggers\n * (both existing and newly created). Historical logs are not replayed.\n *\n * @param handler - The handler to register\n */\n addHandler(handler: LogHandler): void;\n\n /**\n * Removes a handler from the factory\n *\n * @param handler - The handler to remove\n * @returns `true` if the handler was removed, `false` if it was not found\n */\n removeHandler(handler: LogHandler): boolean;\n\n /**\n * Retrieves logs from all handlers that support storage\n *\n * This method aggregates logs from all handlers that implement {@link LogStore}.\n * Handlers that don't support log retrieval (like console) are ignored.\n *\n * @returns Array of all log entries from all storage handlers\n */\n getLogs(): Promise<LogEntry[]>;\n\n /**\n * Clears logs from all handlers that support storage\n *\n * This method clears logs from all handlers that implement {@link LogStore}.\n * Handlers that don't support clearing (like console) are ignored.\n */\n clearLogs(): Promise<void>;\n}\n\n/**\n * Base properties shared by all log entries\n *\n * @beta\n * @group Logger\n */\ninterface BaseLogEntry {\n /**\n * The scope/category this log entry belongs to\n */\n scope: string;\n\n /**\n * The log message\n */\n message: string;\n\n /**\n * Timestamp when the log entry was created (milliseconds since Unix epoch)\n *\n * Use `Date.now()` to create, `new Date(timestamp)` to convert back to Date object.\n */\n timestamp: number;\n\n /**\n * Optional additional structured data\n */\n data?: LogData;\n}\n\n/**\n * Log entry for Debug, Info, and Warn levels\n *\n * @beta\n * @group Logger\n */\ninterface StandardLogEntry extends BaseLogEntry {\n level: typeof LogLevel.Debug | typeof LogLevel.Info | typeof LogLevel.Warn;\n}\n\n/**\n * Log entry for Error level with optional error object\n *\n * @beta\n * @group Logger\n */\ninterface ErrorLogEntry extends BaseLogEntry {\n level: typeof LogLevel.Error;\n\n /**\n * Optional error object\n *\n * @remarks\n * Error objects do not serialize well to JSON - only `name` and `message`\n * are preserved, while `stack` is lost. Storage handlers that persist logs\n * should manually serialize errors before storage:\n *\n * ```typescript\n * const serialized = {\n * name: error.name,\n * message: error.message,\n * stack: error.stack\n * };\n * ```\n */\n error?: Error;\n}\n\n/**\n * A log entry with type-safe level discrimination\n *\n * When `level` is `LogLevel.Error`, the `error` property is available.\n *\n * @beta\n * @group Logger\n */\nexport type LogEntry = StandardLogEntry | ErrorLogEntry;\n\n/**\n * Log level values\n *\n * @beta\n * @group Logger\n */\nexport const LogLevel = {\n Debug: 'debug',\n Info: 'info',\n Warn: 'warn',\n Error: 'error',\n} as const;\n\n/**\n * Log level type indicating the severity of a log message\n *\n * @beta\n * @group Logger\n */\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\n\n/**\n * Additional structured data that can be attached to a log entry\n *\n * Values should be JSON-serializable (primitives, arrays, plain objects) to\n * ensure compatibility with storage handlers. Avoid functions, symbols,\n * undefined, and circular references.\n *\n * @beta\n * @group Logger\n */\nexport type LogData = Record<string, unknown>;\n","import { LoggerFactory } from './logger';\nimport { PlatformServiceName } from '../core/platform';\n\nconst SERVICE_NAME = 'logger';\n\nPlatformServiceName.Logger = SERVICE_NAME;\n\ndeclare module '../core/platform' {\n interface PlatformServiceNameType {\n /**\n * @see {@link LoggerFactory}\n */\n Logger: typeof SERVICE_NAME;\n }\n\n interface LimeWebComponentPlatform {\n get(name: PlatformServiceNameType['Logger']): LoggerFactory;\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","subscriptions","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","LogLevel"],"mappings":"iHAuKaA,EAA+C,CACxD,MAAO,OACX,EC/IaC,GAAqB,aCoE3B,SAASC,GAAWC,EAAwB,CAQ/C,OAAOA,GAP2B,CAC9B,YACA,SACA,UACA,qBAAA,EAGyB,SAASA,EAAS,IAAI,CACvD,CAYO,SAASC,GAAiBD,EAAwB,CAGrD,OAAOA,GAF2B,CAAC,YAAa,QAAQ,EAE3B,SAASA,EAAS,IAAI,CACvD,CAaO,SAASE,GAAOF,EAAwB,CAU3C,OAAOA,GAT2B,CAC9B,OACA,YACA,OACA,OACA,UACA,OAAA,EAGyB,SAASA,EAAS,IAAI,CACvD,CAYO,SAASG,GAASH,EAAwB,CAG7C,OAAOA,GAF2B,CAAC,SAAU,OAAQ,QAAS,MAAM,EAEvC,SAASA,EAAS,IAAI,CACvD,CAYO,SAASI,GAAQJ,EAAwB,CAG5C,OAAOA,GAF2B,CAAC,UAAW,SAAS,EAE1B,SAASA,EAAS,IAAI,CACvD,CC5KA,MAAMK,GAAe,kBAErBR,EAAoB,mBAAqBQ,GCWzC,IAAIC,EAAgB,SAASC,EAAGC,EAAG,CACjC,OAAAF,EAAgB,OAAO,gBAClB,CAAE,UAAW,CAAA,aAAgB,OAAS,SAAUC,EAAGC,EAAG,CAAED,EAAE,UAAYC,CAAG,GAC1E,SAAUD,EAAGC,EAAG,CAAE,QAASC,KAAKD,EAAO,OAAO,UAAU,eAAe,KAA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,GACZD,EAC8B,CAC9B,OAAOA,EAAU,OAAS,QAC9B,CCpOA,MAAMjN,GAAe,oBAErBR,EAAoB,kBAAoBQ,GCFxC,MAAMA,GAAe,sBAErBR,EAAoB,oBAAsBQ,GCF1C,MAAMA,GAAe,uBAErBR,EAAoB,qBAAuBQ,GCF3C,MAAMA,GAAe,sBAErBR,EAAoB,uBAAyBQ,GCF7C,MAAMA,GAAe,gBAErBR,EAAoB,cAAgBQ,GC0X7B,MAAMmN,GAAW,CACpB,MAAO,QACP,KAAM,OACN,KAAM,OACN,MAAO,OACX,ECjYMnN,GAAe,SAErBR,EAAoB,OAASQ","x_google_ignoreList":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
package/dist/index.d.ts CHANGED
@@ -47,4 +47,5 @@ export * from './view';
47
47
  export * from './webcomponent';
48
48
  export * from './notification-service';
49
49
  export * from './poller';
50
+ export * from './logger';
50
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBA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