@limetech/lime-web-components 6.13.1 → 6.13.2-dev.1

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,11 @@
1
+ ## [6.13.2-dev.1](https://github.com/Lundalogik/lime-web-components/compare/v6.13.1...v6.13.2-dev.1) (2026-03-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **limeobject/repository:** possible to exclude aggregates ([9d5c4fc](https://github.com/Lundalogik/lime-web-components/commit/9d5c4fcd85549c7eba15e2a99ec82fddf34e0615))
8
+
1
9
  ## [6.13.1](https://github.com/Lundalogik/lime-web-components/compare/v6.13.0...v6.13.1) (2026-02-27)
2
10
 
3
11
 
@@ -70,15 +70,28 @@ export interface GatheredAIContext extends AIContextContribution {
70
70
  /**
71
71
  * The component's {@link LimeWebComponentContext} at the time of gathering.
72
72
  *
73
- * Describes the chain of ancestor objects the component is nested under,
74
- * not the component's own data. This is the context injected by the
75
- * framework:
76
- *
77
- * - A component on the main view (e.g. showing Object A) gets an empty
78
- * context (`limetype: null, id: null`) because it has no parent.
79
- * - A component in the side-panel showing Object B, opened from Object A,
80
- * gets `{ limetype: '<Object A's limetype>', id: <Object A's id> }`.
81
- * - Nested widgets typically inherit their host's context verbatim.
73
+ * The {@link LimeWebComponentContext} injected into the component by
74
+ * the framework. Describes the component's own limetype/id and,
75
+ * via the `parent` chain, its ancestors in the UI hierarchy.
76
+ *
77
+ * @example
78
+ * A company record open in the main view:
79
+ * ```json
80
+ * { "limetype": "company", "id": 3184 }
81
+ * ```
82
+ *
83
+ * @example
84
+ * A deal opened in the side-panel from a company's deal list:
85
+ * ```json
86
+ * {
87
+ * "limetype": "deal",
88
+ * "id": 2045,
89
+ * "parent": { "limetype": "deal", "id": null }
90
+ * }
91
+ * ```
92
+ * Here `parent` represents the deal list the component is nested in.
93
+ * Note: the ancestor chain may be incomplete — in this example the
94
+ * company context is not included as a grandparent.
82
95
  */
83
96
  ancestorContext: LimeWebComponentContext;
84
97
  }
@@ -229,8 +242,7 @@ export interface AIContextRegistry {
229
242
  * Providers that return `null` (indicating no context available) and
230
243
  * providers that throw errors are skipped (errors log a warning).
231
244
  *
232
- * Each contribution is enriched with the component's `LimeWebComponentContext`
233
- * if the provider was registered with an element reference.
245
+ * Each contribution is enriched with the component's `LimeWebComponentContext`.
234
246
  *
235
247
  * @returns An array of enriched context contributions, one from each
236
248
  * provider that returned a non-null contribution.
@@ -1 +1 @@
1
- {"version":3,"file":"ai-context-registry.d.ts","sourceRoot":"","sources":["../../src/ai-context/ai-context-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC5D;;;;;;;;;;;;OAYG;IACH,eAAe,EAAE,uBAAuB,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;OASG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,UAAU,IAAI,qBAAqB,GAAG,IAAI,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,QAAQ,CACJ,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,WAAW,GAAG,gBAAgB,GACxC,MAAM,IAAI,CAAC;IAEd;;;;;;OAMG;IACH,YAAY,IAAI,iBAAiB,EAAE,CAAC;IAEpC;;;;;;;;;;;;OAYG;IACH,aAAa,IAAI,iBAAiB,EAAE,CAAC;CACxC"}
1
+ {"version":3,"file":"ai-context-registry.d.ts","sourceRoot":"","sources":["../../src/ai-context/ai-context-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,eAAe,EAAE,uBAAuB,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;OASG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,UAAU,IAAI,qBAAqB,GAAG,IAAI,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,QAAQ,CACJ,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,WAAW,GAAG,gBAAgB,GACxC,MAAM,IAAI,CAAC;IAEd;;;;;;OAMG;IACH,YAAY,IAAI,iBAAiB,EAAE,CAAC;IAEpC;;;;;;;;;;;OAWG;IACH,aAAa,IAAI,iBAAiB,EAAE,CAAC;CACxC"}
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("@stencil/core");var p=typeof document<"u"?document.currentScript:null;const s={Route:"route"},ae="idle-state";function ue(e){return e&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(e.type)}function le(e){return e&&["belongsto","hasone"].includes(e.type)}function fe(e){return e&&["time","timeofday","date","year","quarter","month"].includes(e.type)}function pe(e){return e&&["string","text","phone","link"].includes(e.type)}function de(e){return e&&["decimal","percent"].includes(e.type)}const me="state.limetypes";s.LimeTypeRepository=me;var w=function(e,t){return w=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])},w(e,t)};function b(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");w(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function A(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 I(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],c;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){c={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return i}function j(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 d(e){return typeof e=="function"}function W(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 R=W(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 L(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var _=(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 c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var a=A(c),u=a.next();!u.done;u=a.next()){var O=u.value;O.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 c.remove(this);var M=this.initialTeardown;if(d(M))try{M()}catch(f){i=f instanceof R?f.errors:[f]}var T=this._finalizers;if(T){this._finalizers=null;try{for(var v=A(T),y=v.next();!y.done;y=v.next()){var se=y.value;try{$(se)}catch(f){i=i??[],f instanceof R?i=j(j([],I(i)),I(f.errors)):i.push(f)}}}catch(f){n={error:f}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}}if(i)throw new R(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)$(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)&&L(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&L(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),G=_.EMPTY;function Q(e){return e instanceof _||e&&"closed"in e&&d(e.remove)&&d(e.add)&&d(e.unsubscribe)}function $(e){d(e)?e():e.unsubscribe()}var he={Promise:void 0},ye={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,j([e,t],I(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function be(e){ye.setTimeout(function(){throw e})}function U(){}function E(e){e()}var Y=(function(e){b(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Q(r)&&r.add(n)):n.destination=Se,n}return t.create=function(r,n,o){return new D(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})(_),ve=(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){g(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){g(n)}else g(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){g(r)}},e})(),D=(function(e){b(t,e);function t(r,n,o){var i=e.call(this)||this,c;return d(r)||!r?c={next:r??void 0,error:n??void 0,complete:o??void 0}:c=r,i.destination=new ve(c),i}return t})(Y);function g(e){be(e)}function ge(e){throw e}var Se={closed:!0,next:U,error:ge,complete:U},Ee=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Ce(e){return e}function _e(e){return e.length===0?Ce:e.length===1?e[0]:function(r){return e.reduce(function(n,o){return o(n)},r)}}var F=(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=Re(t)?t:new D(t,r,n);return E(function(){var c=o,a=c.operator,u=c.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=V(r),new r(function(o,i){var c=new D({next:function(a){try{t(a)}catch(u){i(u),c.unsubscribe()}},error:i,complete:o});n.subscribe(c)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Ee]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return _e(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=V(t),new t(function(n,o){var i;r.subscribe(function(c){return i=c},function(c){return o(c)},function(){return n(i)})})},e.create=function(t){return new e(t)},e})();function V(e){var t;return(t=e??he.Promise)!==null&&t!==void 0?t:Promise}function Oe(e){return e&&d(e.next)&&d(e.error)&&d(e.complete)}function Re(e){return e&&e instanceof Y||Oe(e)&&Q(e)}var Pe=W(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),K=(function(e){b(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 k(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Pe},t.prototype.next=function(r){var n=this;E(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var c=A(n.currentObservers),a=c.next();!a.done;a=c.next()){var u=a.value;u.next(r)}}catch(O){o={error:O}}finally{try{a&&!a.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}})},t.prototype.error=function(r){var n=this;E(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;E(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,c=o.isStopped,a=o.observers;return i||c?G:(this.currentObservers=null,a.push(r),new _(function(){n.currentObservers=null,L(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,c=n.isStopped;o?r.error(i):c&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,n){return new k(r,n)},t})(F),k=(function(e){b(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:G},t})(K),we=(function(e){b(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})(K);function Ae(e){return e}function l(e,t){return(r,n)=>{const o=Ie(r,n,e,t);o.length===1&&je(r,o)}}const B=new WeakMap,C=new WeakMap,X=new WeakMap;function Ie(e,t,r,n){let o=B.get(e);return o||(o=[],B.set(e,o)),o.push({options:r,name:t,optionFactory:n.optionFactory||Ae,service:{name:n.name,method:n.method||"subscribe"}}),o}function je(e,t){e.connectedCallback=J(e.connectedCallback,t),e.componentWillLoad=Le(e.componentWillLoad,t),e.componentDidUnload=H(e.componentDidUnload),e.disconnectedCallback=H(e.disconnectedCallback)}function J(e,t){return async function(...r){X.set(this,!0),C.set(this,[]),await Z(this);const n=new we(this.context);Ne(this,"context",n);for(const o of t)o.options=o.optionFactory(o.options,this),De(o.options)&&(o.options.context=n),xe(this,o);if(e)return e.apply(this,r)}}function Le(e,t){return async function(...r){return X.get(this)===!0?(await Z(this),e?e.apply(this,r):void 0):J(e,t).apply(this,r)}}function H(e){return async function(...t){let r;return e&&(r=e.apply(this,t)),Me(this),r}}function De(e){return"context"in e}function Z(e){const t=[];return e.platform||t.push(q(e,"platform")),e.context||t.push(q(e,"context")),t.length===0?Promise.resolve():Promise.all(t)}function q(e,t){const r=N.getElement(e);return new Promise(n=>{Object.defineProperty(r,t,{configurable:!0,set:o=>{delete r[t],r[t]=o,n()}})})}function Ne(e,t,r){const n=N.getElement(e),{get:o,set:i}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),t);Object.defineProperty(n,t,{configurable:!0,get:o,set:function(c){i.call(this,c),r.next(c)}})}function xe(e,t){const r=$e(e,t);if(typeof r!="function")return;C.get(e).push(r)}function Me(e){const t=C.get(e);for(const r of t)r();C.set(e,[])}function Te(e,t){return r=>{e[t]=r}}function $e(e,t){const r={...t.options};Ue(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](Te(e,t.name),r)}function Ue(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 Fe(e={}){const t={name:s.LimeTypeRepository};return l(e,t)}function Ve(e={}){const t={name:s.LimeTypeRepository};return e.map=[ke,...e.map||[]],e.context=null,l(e,t)}function ke(e){const{limetype:t}=this.context;return e[t]}const Be=e=>t=>Object.values(t).find(x(e));function He(e,t){return Object.values(e.properties).filter(r=>r.type===t)}function qe(e,t){return Object.values(e.properties).find(x(t))}function We(e,t){return e.properties[t]}const x=e=>t=>t?.label===e,Ge="state.limeobjects";s.LimeObjectRepository=Ge;function Qe(e={}){const t={name:s.LimeObjectRepository,optionFactory:Xe};return l(e,t)}function Ye(e={}){const t={name:s.LimeObjectRepository};return e.map=[Ke,...e.map||[]],e.context=null,l(e,t)}function Ke(e){const{limetype:t,id:r}=this.context;if(e[t])return e[t].find(n=>n.id===r)}function Xe(e,t){return e.getLimetype&&(e.limetype=e.getLimetype(t)),e}var z=(e=>(e.Received="command.received",e.Handled="command.handled",e.Failed="command.failed",e))(z||{});function m(e){return t=>{Je(t,e.id),Ze(t,e.id)}}function Je(e,t){e.commandId=t}function Ze(e,t){Object.defineProperty(e,Symbol.hasInstance,{value:r=>te(r).includes(t)})}function ee(e){return typeof e=="string"?e:e&&e.constructor&&e.constructor.commandId?e.constructor.commandId:e&&e.commandId?e.commandId:null}function te(e){let t=[],r,n=e;for(;r=ee(n);)t=[...t,r],n=Object.getPrototypeOf(n);return[...new Set(t)]}const ze="commandBus";s.CommandBus=ze;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,c;i>=0;i--)(c=e[i])&&(o=c(o)||o);return o};const rt="limeobject.bulk-create-dialog";exports.BulkCreateDialogCommand=class{context;filter;relation};exports.BulkCreateDialogCommand=tt([m({id:rt})],exports.BulkCreateDialogCommand);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,c;i>=0;i--)(c=e[i])&&(o=c(o)||o);return o};const it="limeobject.create-dialog";exports.CreateLimeobjectDialogCommand=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};exports.CreateLimeobjectDialogCommand=ot([m({id:it})],exports.CreateLimeobjectDialogCommand);var ct=Object.getOwnPropertyDescriptor,st=(e,t,r,n)=>{for(var o=n>1?void 0:n?ct(t,r):t,i=e.length-1,c;i>=0;i--)(c=e[i])&&(o=c(o)||o);return o};const at="limeobject.delete-object";exports.DeleteObjectCommand=class{context};exports.DeleteObjectCommand=st([m({id:at})],exports.DeleteObjectCommand);var ut=Object.getOwnPropertyDescriptor,lt=(e,t,r,n)=>{for(var o=n>1?void 0:n?ut(t,r):t,i=e.length-1,c;i>=0;i--)(c=e[i])&&(o=c(o)||o);return o};const ft="limeobject.object-access";exports.OpenObjectAccessDialogCommand=class{context};exports.OpenObjectAccessDialogCommand=lt([m({id:ft})],exports.OpenObjectAccessDialogCommand);var pt=Object.getOwnPropertyDescriptor,dt=(e,t,r,n)=>{for(var o=n>1?void 0:n?pt(t,r):t,i=e.length-1,c;i>=0;i--)(c=e[i])&&(o=c(o)||o);return o};const mt="limeobject.save-object";exports.SaveLimeObjectCommand=class{context;limeobject;route=!1;label};exports.SaveLimeObjectCommand=dt([m({id:mt})],exports.SaveLimeObjectCommand);var re=(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))(re||{});const ht={Count:"COUNT",Sum:"SUM",Average:"AVG",Maximum:"MAX",Minimum:"MIN"},yt="query";s.Query=yt;const bt={Get:"GET",Post:"POST",Put:"PUT",Delete:"DELETE",Patch:"PATCH"},vt="http";s.Http=vt;const gt="eventDispatcher";s.EventDispatcher=gt;const St="translate";s.Translate=St;const Et="dialog";s.Dialog=Et;const Ct="keybindingRegistry";s.KeybindingRegistry=Ct;const _t="navigator";s.Navigator=_t;function Ot(e){const t={name:s.Navigator};return l({context:null,...e},t)}var Rt=Object.getOwnPropertyDescriptor,Pt=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rt(t,r):t,i=e.length-1,c;i>=0;i--)(c=e[i])&&(o=c(o)||o);return o};const wt="navigator.navigate";exports.NavigateCommand=class{path;query;hash;state};exports.NavigateCommand=Pt([m({id:wt})],exports.NavigateCommand);const At="notifications";s.Notification=At;const It="routeRegistry";s.RouteRegistry=It;var ne=(e=>(e.Pending="PENDING",e.Started="STARTED",e.Retry="RETRY",e.Success="SUCCESS",e.Failure="FAILURE",e))(ne||{}),oe=(e=>(e.Created="task.created",e.Success="task.success",e.Failed="task.failed",e))(oe||{});const jt="state.tasks";s.TaskRepository=jt;const Lt="state.configs";s.ConfigRepository=Lt;function Dt(e){const t={name:s.ConfigRepository};return l(e,t)}const Nt="state.device";s.Device=Nt;function xt(e={}){const t={name:s.Device};return l(e,t)}const Mt="state.filters";s.FilterRepository=Mt;function Tt(e={}){const t={name:s.FilterRepository};return l(e,t)}const $t="state.user-data";s.UserDataRepository=$t;function Ut(e={}){const t={name:s.UserDataRepository};return l(e,t)}const Ft="state.application";s.Application=Ft;function Vt(e={}){const t={name:s.Application};return e.map=[kt,...e.map||[]],l(e,t)}function kt(e){return e.applicationName}function Bt(e={}){const t={name:s.Application};return e.map=[Ht,...e.map||[]],l(e,t)}function Ht(e){return e.currentUser}function qt(e={}){const t={name:s.Application};return e.map=[Wt,...e.map||[]],l(e,t)}function Wt(e){return e.session}const Gt="userPreferences";s.UserPreferencesRepository=Gt;const Qt="datetimeformatter";s.DateTimeFormatter=Qt;function Yt(e){return e.type==="limeobject"}function Kt(e){return e.type==="action"}const Xt="conditionRegistry";s.ConditionRegistry=Xt;const Jt="viewFactoryRegistry";s.ViewFactoryRegistry=Jt;const Zt="webComponentRegistry";s.WebComponentRegistry=Zt;const zt="state.notifications";s.NotificationRepository=zt;const er="pollerFactory";s.PollerFactory=er;const tr={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},rr="logger";s.Logger=rr;let h,S;function ie(e){const t=window.Lime?.logger?.createLogger;return typeof t!="function"?(console.warn(`Logger factory is not configured. Returning console logger for scope "${e}".`),console):(S===void 0&&(S=ce(nr())),S&&(e=`${S}:${e}`),t(e))}function nr(){return h!==void 0?h:{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:p&&p.tagName.toUpperCase()==="SCRIPT"&&p.src||new URL("index.cjs",document.baseURI).href}!==void 0&&typeof(typeof document>"u"?require("url").pathToFileURL(__filename).href:p&&p.tagName.toUpperCase()==="SCRIPT"&&p.src||new URL("index.cjs",document.baseURI).href)=="string"?(h=typeof document>"u"?require("url").pathToFileURL(__filename).href:p&&p.tagName.toUpperCase()==="SCRIPT"&&p.src||new URL("index.cjs",document.baseURI).href,h):(h=or(),h)}function or(){try{const e=new Error(".").stack;if(!e)return null;const t=e.split(`
4
- `);for(const r of t){const n=r.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}function ce(e){if(!e)return null;const t=ir(e)||cr(e)||sr(e)||ar(e);return t||null}function ir(e){const t=/\/([^/]+)-lwc-components\//,r=e.match(t);return r?r[1]:null}function cr(e){const t=/\/packages\/(?:@[^/]+\/)?([^/]+)/,r=e.match(t);return r?r[1]:null}function sr(e){const t=e.indexOf("+");if(t===-1)return null;const r=e.slice(0,t),n=r.lastIndexOf("/");return n===-1?null:r.slice(n+1)}function ar(e){const t=/\/static\/([^/]+)\//,r=e.match(t);return r?r[1]:null}const ur={Low:"low",Medium:"medium",High:"high",Critical:"critical"},lr="problemRepository";s.ProblemRepository=lr;const fr="aiContextRegistry";s.AIContextRegistry=fr;let P=null;function pr(e,t){P||(P=ie("uncaught-error"));const r={};t&&(r.element=t.tagName,t.id&&(r.elementId=t.id));const n=e instanceof Error?e.message:String(e),o=e instanceof Error?e:void 0;P.error(n,o,r)}try{N.setErrorHandler(pr)}catch{}exports.AggregateOperator=ht;exports.Command=m;exports.CommandEventName=z;exports.HttpMethod=bt;exports.IdleStateEventName=ae;exports.LogLevel=tr;exports.Operator=re;exports.PlatformServiceName=s;exports.ProblemSeverity=ur;exports.SelectApplicationName=Vt;exports.SelectConfig=Dt;exports.SelectCurrentLimeObject=Ye;exports.SelectCurrentLimeType=Ve;exports.SelectCurrentUser=Bt;exports.SelectDevice=xt;exports.SelectFilters=Tt;exports.SelectLimeObjects=Qe;exports.SelectLimeTypes=Fe;exports.SelectQueryParam=Ot;exports.SelectSession=qt;exports.SelectUserData=Ut;exports.TaskEventType=oe;exports.TaskState=ne;exports.createLogger=ie;exports.findLimetypeByLabel=Be;exports.getCommandId=ee;exports.getCommandIds=te;exports.getPackageNameFromUrl=ce;exports.getPropertiesByType=He;exports.getPropertyByLabel=qe;exports.getPropertyByName=We;exports.hasLabel=x;exports.isActionCondition=Kt;exports.isDate=fe;exports.isFloat=de;exports.isLimeObjectCondition=Yt;exports.isRelation=ue;exports.isSingleRelation=le;exports.isString=pe;
5
- //# sourceMappingURL=index.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@stencil/core`);var t={Route:`route`},n=`idle-state`;function r(e){return e&&[`belongsto`,`hasone`,`hasmany`,`hasandbelongstomany`].includes(e.type)}function i(e){return e&&[`belongsto`,`hasone`].includes(e.type)}function a(e){return e&&[`time`,`timeofday`,`date`,`year`,`quarter`,`month`].includes(e.type)}function o(e){return e&&[`string`,`text`,`phone`,`link`].includes(e.type)}function s(e){return e&&[`decimal`,`percent`].includes(e.type)}t.LimeTypeRepository=`state.limetypes`;var c=function(e,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},c(e,t)};function l(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);c(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function u(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function d(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function f(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function p(e){return typeof e==`function`}function m(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var h=m(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
2
+ `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
3
+ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function g(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var _=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=u(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(p(c))try{c()}catch(e){i=e instanceof h?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var m=u(l),g=m.next();!g.done;g=m.next()){var _=g.value;try{b(_)}catch(e){i??=[],e instanceof h?i=f(f([],d(i)),d(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}if(i)throw new h(i)}},e.prototype.add=function(t){if(t&&t!==this)if(this.closed)b(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&g(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&g(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),v=_.EMPTY;function y(e){return e instanceof _||e&&`closed`in e&&p(e.remove)&&p(e.add)&&p(e.unsubscribe)}function b(e){p(e)?e():e.unsubscribe()}var x={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},S={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=S.delegate;return i?.setTimeout?i.setTimeout.apply(i,f([e,t],d(n))):setTimeout.apply(void 0,f([e,t],d(n)))},clearTimeout:function(e){return(S.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ee(e){S.setTimeout(function(){var t=x.onUnhandledError;if(t)t(e);else throw e})}function te(){}var ne=(function(){return C(`C`,void 0,void 0)})();function re(e){return C(`E`,void 0,e)}function ie(e){return C(`N`,e,void 0)}function C(e,t,n){return{kind:e,value:t,error:n}}var w=null;function T(e){if(x.useDeprecatedSynchronousErrorHandling){var t=!w;if(t&&(w={errorThrown:!1,error:null}),e(),t){var n=w,r=n.errorThrown,i=n.error;if(w=null,r)throw i}}else e()}function ae(e){x.useDeprecatedSynchronousErrorHandling&&w&&(w.errorThrown=!0,w.error=e)}var oe=function(e){l(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,y(t)&&t.add(n)):n.destination=ue,n}return t.create=function(e,t,n){return new D(e,t,n)},t.prototype.next=function(e){this.isStopped?k(ie(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?k(re(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?k(ne,this):(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(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(_),se=Function.prototype.bind;function E(e,t){return se.call(e,t)}var ce=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){O(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){O(e)}else O(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){O(e)}},e}(),D=function(e){l(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(p(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&x.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&E(t.next,o),error:t.error&&E(t.error,o),complete:t.complete&&E(t.complete,o)}):a=t}return i.destination=new ce(a),i}return t}(oe);function O(e){x.useDeprecatedSynchronousErrorHandling?ae(e):ee(e)}function le(e){throw e}function k(e,t){var n=x.onStoppedNotification;n&&S.setTimeout(function(){return n(e,t)})}var ue={closed:!0,next:te,error:le,complete:te},de=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function fe(e){return e}function pe(e){return e.length===0?fe:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var A=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=he(e)?e:new D(e,t,n);return T(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=j(t),new t(function(t,r){var i=new D({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[de]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pe(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=j(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function j(e){return e??x.Promise??Promise}function me(e){return e&&p(e.next)&&p(e.error)&&p(e.complete)}function he(e){return e&&e instanceof oe||me(e)&&y(e)}var ge=m(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),M=function(e){l(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new N(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new ge},t.prototype.next=function(e){var t=this;T(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=u(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;T(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;T(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,`observed`,{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?v:(this.currentObservers=null,a.push(e),new _(function(){t.currentObservers=null,g(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new A;return e.source=this,e},t.create=function(e,t){return new N(e,t)},t}(A),N=function(e){l(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??v},t}(M),_e=function(e){l(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,`value`,{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(M);function ve(e){return e}function P(e,t){return(n,r)=>{let i=ye(n,r,e,t);i.length===1&&be(n,i)}}var F=new WeakMap,I=new WeakMap,L=new WeakMap;function ye(e,t,n,r){let i=F.get(e);return i||(i=[],F.set(e,i)),i.push({options:n,name:t,optionFactory:r.optionFactory||ve,service:{name:r.name,method:r.method||`subscribe`}}),i}function be(e,t){e.connectedCallback=R(e.connectedCallback,t),e.componentWillLoad=xe(e.componentWillLoad,t),e.componentDidUnload=z(e.componentDidUnload),e.disconnectedCallback=z(e.disconnectedCallback)}function R(e,t){return async function(...n){L.set(this,!0),I.set(this,[]),await B(this);let r=new _e(this.context);Ce(this,`context`,r);for(let e of t)e.options=e.optionFactory(e.options,this),Se(e.options)&&(e.options.context=r),we(this,e);if(e)return e.apply(this,n)}}function xe(e,t){return async function(...n){return L.get(this)===!0?(await B(this),e?e.apply(this,n):void 0):R(e,t).apply(this,n)}}function z(e){return async function(...t){let n;return e&&(n=e.apply(this,t)),Te(this),n}}function Se(e){return`context`in e}function B(e){let t=[];return e.platform||t.push(V(e,`platform`)),e.context||t.push(V(e,`context`)),t.length===0?Promise.resolve():Promise.all(t)}function V(t,n){let r=(0,e.getElement)(t);return new Promise(e=>{Object.defineProperty(r,n,{configurable:!0,set:t=>{delete r[n],r[n]=t,e()}})})}function Ce(t,n,r){let i=(0,e.getElement)(t),{get:a,set:o}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),n);Object.defineProperty(i,n,{configurable:!0,get:a,set:function(e){o.call(this,e),r.next(e)}})}function we(e,t){let n=De(e,t);typeof n==`function`&&I.get(e).push(n)}function Te(e){let t=I.get(e);for(let e of t)e();I.set(e,[])}function Ee(e,t){return n=>{e[t]=n}}function De(e,t){let n={...t.options};Oe(n,e);let r=t.service.name,i=e.platform;if(!i.has(r))throw Error(`Service ${r} does not exist`);return i.get(r)[t.service.method](Ee(e,t.name),n)}function Oe(e,t){e.filter&&=e.filter.map(e=>e.bind(t)),e.map&&=e.map.map(e=>e.bind(t))}function ke(e={}){return P(e,{name:t.LimeTypeRepository})}function Ae(e={}){let n={name:t.LimeTypeRepository};return e.map=[je,...e.map||[]],e.context=null,P(e,n)}function je(e){let{limetype:t}=this.context;return e[t]}var Me=e=>t=>Object.values(t).find(H(e));function Ne(e,t){return Object.values(e.properties).filter(e=>e.type===t)}function Pe(e,t){return Object.values(e.properties).find(H(t))}function Fe(e,t){return e.properties[t]}var H=e=>t=>t?.label===e;t.LimeObjectRepository=`state.limeobjects`;function Ie(e={}){return P(e,{name:t.LimeObjectRepository,optionFactory:ze})}function Le(e={}){let n={name:t.LimeObjectRepository};return e.map=[Re,...e.map||[]],e.context=null,P(e,n)}function Re(e){let{limetype:t,id:n}=this.context;if(e[t])return e[t].find(e=>e.id===n)}function ze(e,t){return e.getLimetype&&(e.limetype=e.getLimetype(t)),e}var Be=function(e){return e.Received=`command.received`,e.Handled=`command.handled`,e.Failed=`command.failed`,e}({});function U(e){return t=>{Ve(t,e.id),He(t,e.id)}}function Ve(e,t){e.commandId=t}function He(e,t){Object.defineProperty(e,Symbol.hasInstance,{value:e=>We(e).includes(t)})}function Ue(e){return typeof e==`string`?e:e&&e.constructor&&e.constructor.commandId?e.constructor.commandId:e&&e.commandId?e.commandId:null}function We(e){let t=[],n,r=e;for(;n=Ue(r);)t=[...t,n],r=Object.getPrototypeOf(r);return[...new Set(t)]}t.CommandBus=`commandBus`;function W(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Ge=`limeobject.bulk-create-dialog`,G=class{context;filter;relation};G=W([U({id:Ge})],G);var Ke=`limeobject.create-dialog`,K=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};K=W([U({id:Ke})],K);var qe=`limeobject.delete-object`,q=class{context};q=W([U({id:qe})],q);var Je=`limeobject.object-access`,J=class{context};J=W([U({id:Je})],J);var Ye=`limeobject.save-object`,Y=class{context;limeobject;route=!1;label};Y=W([U({id:Ye})],Y);var Xe=function(e){return 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}({}),Ze={Count:`COUNT`,Sum:`SUM`,Average:`AVG`,Maximum:`MAX`,Minimum:`MIN`};t.Query=`query`;var Qe={Get:`GET`,Post:`POST`,Put:`PUT`,Delete:`DELETE`,Patch:`PATCH`};t.Http=`http`,t.EventDispatcher=`eventDispatcher`,t.Translate=`translate`,t.Dialog=`dialog`,t.KeybindingRegistry=`keybindingRegistry`,t.Navigator=`navigator`;function $e(e){let n={name:t.Navigator};return P({context:null,...e},n)}var et=`navigator.navigate`,X=class{path;query;hash;state};X=W([U({id:et})],X),t.Notification=`notifications`,t.RouteRegistry=`routeRegistry`;var tt=function(e){return e.Pending=`PENDING`,e.Started=`STARTED`,e.Retry=`RETRY`,e.Success=`SUCCESS`,e.Failure=`FAILURE`,e}({}),nt=function(e){return e.Created=`task.created`,e.Success=`task.success`,e.Failed=`task.failed`,e}({});t.TaskRepository=`state.tasks`,t.ConfigRepository=`state.configs`;function rt(e){return P(e,{name:t.ConfigRepository})}t.Device=`state.device`;function it(e={}){return P(e,{name:t.Device})}t.FilterRepository=`state.filters`;function at(e={}){return P(e,{name:t.FilterRepository})}t.UserDataRepository=`state.user-data`;function ot(e={}){return P(e,{name:t.UserDataRepository})}t.Application=`state.application`;function st(e={}){let n={name:t.Application};return e.map=[ct,...e.map||[]],P(e,n)}function ct(e){return e.applicationName}function lt(e={}){let n={name:t.Application};return e.map=[ut,...e.map||[]],P(e,n)}function ut(e){return e.currentUser}function dt(e={}){let n={name:t.Application};return e.map=[ft,...e.map||[]],P(e,n)}function ft(e){return e.session}t.UserPreferencesRepository=`userPreferences`,t.DateTimeFormatter=`datetimeformatter`;function pt(e){return e.type===`limeobject`}function mt(e){return e.type===`action`}t.ConditionRegistry=`conditionRegistry`,t.ViewFactoryRegistry=`viewFactoryRegistry`,t.WebComponentRegistry=`webComponentRegistry`,t.NotificationRepository=`state.notifications`,t.PollerFactory=`pollerFactory`;var ht={Debug:`debug`,Info:`info`,Warn:`warn`,Error:`error`};t.Logger=`logger`;var Z,Q;function gt(e){let t=window.Lime?.logger?.createLogger;return typeof t==`function`?(Q===void 0&&(Q=yt(_t())),Q&&(e=`${Q}:${e}`),t(e)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${e}".`),console)}function _t(){return Z===void 0?typeof{}.url==`string`?(Z={}.url,Z):(Z=vt(),Z):Z}function vt(){try{let e=Error(`.`).stack;if(!e)return null;let t=e.split(`
4
+ `);for(let e of t){let t=e.match(/(https?:\/\/[^)\s:]+)/);if(t)return t[1]}return null}catch{return null}}function yt(e){return e&&(bt(e)||xt(e)||St(e)||Ct(e))||null}function bt(e){let t=e.match(/\/([^/]+)-lwc-components\//);return t?t[1]:null}function xt(e){let t=e.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return t?t[1]:null}function St(e){let t=e.indexOf(`+`);if(t===-1)return null;let n=e.slice(0,t),r=n.lastIndexOf(`/`);return r===-1?null:n.slice(r+1)}function Ct(e){let t=e.match(/\/static\/([^/]+)\//);return t?t[1]:null}var wt={Low:`low`,Medium:`medium`,High:`high`,Critical:`critical`};t.ProblemRepository=`problemRepository`,t.AIContextRegistry=`aiContextRegistry`;var $=null;function Tt(e,t){$||=gt(`uncaught-error`);let n={};t&&(n.element=t.tagName,t.id&&(n.elementId=t.id));let r=e instanceof Error?e.message:String(e),i=e instanceof Error?e:void 0;$.error(r,i,n)}try{(0,e.setErrorHandler)(Tt)}catch{}exports.AggregateOperator=Ze,Object.defineProperty(exports,`BulkCreateDialogCommand`,{enumerable:!0,get:function(){return G}}),exports.Command=U,exports.CommandEventName=Be,Object.defineProperty(exports,`CreateLimeobjectDialogCommand`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`DeleteObjectCommand`,{enumerable:!0,get:function(){return q}}),exports.HttpMethod=Qe,exports.IdleStateEventName=n,exports.LogLevel=ht,Object.defineProperty(exports,`NavigateCommand`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`OpenObjectAccessDialogCommand`,{enumerable:!0,get:function(){return J}}),exports.Operator=Xe,exports.PlatformServiceName=t,exports.ProblemSeverity=wt,Object.defineProperty(exports,`SaveLimeObjectCommand`,{enumerable:!0,get:function(){return Y}}),exports.SelectApplicationName=st,exports.SelectConfig=rt,exports.SelectCurrentLimeObject=Le,exports.SelectCurrentLimeType=Ae,exports.SelectCurrentUser=lt,exports.SelectDevice=it,exports.SelectFilters=at,exports.SelectLimeObjects=Ie,exports.SelectLimeTypes=ke,exports.SelectQueryParam=$e,exports.SelectSession=dt,exports.SelectUserData=ot,exports.TaskEventType=nt,exports.TaskState=tt,exports.createLogger=gt,exports.findLimetypeByLabel=Me,exports.getCommandId=Ue,exports.getCommandIds=We,exports.getPackageNameFromUrl=yt,exports.getPropertiesByType=Ne,exports.getPropertyByLabel=Pe,exports.getPropertyByName=Fe,exports.hasLabel=H,exports.isActionCondition=mt,exports.isDate=a,exports.isFloat=s,exports.isLimeObjectCondition=pt,exports.isRelation=r,exports.isSingleRelation=i,exports.isString=o;
5
+ //# sourceMappingURL=index.cjs.map