@limetech/lime-web-components 6.4.1 → 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.
Files changed (58) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/action/action.d.ts +305 -13
  3. package/dist/action/action.d.ts.map +1 -1
  4. package/dist/application/decorators/application.d.ts +57 -3
  5. package/dist/application/decorators/application.d.ts.map +1 -1
  6. package/dist/application/decorators/session.d.ts +44 -3
  7. package/dist/application/decorators/session.d.ts.map +1 -1
  8. package/dist/application/decorators/user.d.ts +47 -3
  9. package/dist/application/decorators/user.d.ts.map +1 -1
  10. package/dist/application/repository.d.ts +102 -5
  11. package/dist/application/repository.d.ts.map +1 -1
  12. package/dist/application/session.d.ts +105 -15
  13. package/dist/application/session.d.ts.map +1 -1
  14. package/dist/application/user.d.ts +122 -13
  15. package/dist/application/user.d.ts.map +1 -1
  16. package/dist/commandbus/commandbus.d.ts +364 -23
  17. package/dist/commandbus/commandbus.d.ts.map +1 -1
  18. package/dist/conditionregistry/conditionregistry.d.ts +310 -27
  19. package/dist/conditionregistry/conditionregistry.d.ts.map +1 -1
  20. package/dist/config/decorator.d.ts +50 -3
  21. package/dist/config/decorator.d.ts.map +1 -1
  22. package/dist/config/repository.d.ts +131 -10
  23. package/dist/config/repository.d.ts.map +1 -1
  24. package/dist/core/context.d.ts +94 -4
  25. package/dist/core/context.d.ts.map +1 -1
  26. package/dist/core/lime-web-component.d.ts +59 -3
  27. package/dist/core/lime-web-component.d.ts.map +1 -1
  28. package/dist/core/metadata.d.ts +113 -13
  29. package/dist/core/metadata.d.ts.map +1 -1
  30. package/dist/core/platform.d.ts +175 -14
  31. package/dist/core/platform.d.ts.map +1 -1
  32. package/dist/core/state.d.ts +138 -14
  33. package/dist/core/state.d.ts.map +1 -1
  34. package/dist/datetimeformatter/datetimeformatter.d.ts +97 -34
  35. package/dist/datetimeformatter/datetimeformatter.d.ts.map +1 -1
  36. package/dist/device/decorator.d.ts +56 -4
  37. package/dist/device/decorator.d.ts.map +1 -1
  38. package/dist/device/device.d.ts +51 -6
  39. package/dist/device/device.d.ts.map +1 -1
  40. package/dist/dialog/dialog.d.ts +155 -19
  41. package/dist/dialog/dialog.d.ts.map +1 -1
  42. package/dist/index.cjs +4 -0
  43. package/dist/index.cjs.map +1 -0
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.esm.js +109 -101
  47. package/dist/index.esm.js.map +1 -1
  48. package/dist/limeobject/file.d.ts +6 -0
  49. package/dist/limeobject/file.d.ts.map +1 -1
  50. package/dist/logger/index.d.ts +3 -0
  51. package/dist/logger/index.d.ts.map +1 -0
  52. package/dist/logger/logger.d.ts +385 -0
  53. package/dist/logger/logger.d.ts.map +1 -0
  54. package/dist/logger/types.d.ts +15 -0
  55. package/dist/logger/types.d.ts.map +1 -0
  56. package/package.json +13 -13
  57. package/dist/index.cjs.js +0 -4
  58. package/dist/index.cjs.js.map +0 -1
@@ -1,52 +1,188 @@
1
1
  /**
2
- * Service for creating and displaying dialogs containing a web component
2
+ * Service for creating and managing dialogs
3
3
  *
4
- * @emits dialog.destroyed - When the dialog is beeing externally destroyed,
5
- * e.g. by closing a popup window (depending on platform), a
6
- * {@link DialogDestroyedEvent} will be emitted using
4
+ * The {@link DialogRenderer} enables displaying web components in dialogs,
5
+ * which can be modal or non-modal. It is accessed through the
6
+ * {@link LimeWebComponentPlatform} instance provided to components.
7
+ *
8
+ * Dialogs are useful for:
9
+ * - User input forms
10
+ * - Confirmation prompts
11
+ * - Detail views
12
+ * - Multi-step wizards
13
+ *
14
+ * The rendering implementation depends on the platform. Most commonly, dialogs
15
+ * are rendered directly on the current page. On some platforms, dialogs may be
16
+ * opened as separate native windows.
17
+ *
18
+ * @emits dialog.destroyed - When a dialog is externally destroyed (e.g., popup
19
+ * window closed by user), a {@link DialogDestroyedEvent} is emitted via
7
20
  * {@link EventDispatcher}
21
+ *
22
+ * @example
23
+ * Basic usage
24
+ * ```typescript
25
+ * const dialogRenderer = platform.get(PlatformServiceNames.Dialog);
26
+ *
27
+ * // Create a dialog
28
+ * const dialogId = dialogRenderer.create('my-dialog-component', {
29
+ * title: 'Confirmation',
30
+ * message: 'Are you sure?'
31
+ * });
32
+ *
33
+ * // Update dialog properties
34
+ * dialogRenderer.update(dialogId, { message: 'Processing...' });
35
+ *
36
+ * // Close the dialog
37
+ * dialogRenderer.destroy(dialogId);
38
+ * ```
39
+ *
8
40
  * @public
9
41
  * @group Dialog
10
42
  */
11
43
  export interface DialogRenderer {
12
44
  /**
13
- * Create a new dialog and render its contents. Depending on what kind of
14
- * platform the service is used on, the dialog might be rendered in the
15
- * current `Document` or opened in a new popup window.
16
- *
17
- * @param name - the name of the web component representing the dialog
18
- * @param properties - any properties to send to the dialog
19
- * @param listeners - any event listeners to register on the dialog
20
- * @returns id representing the dialog
45
+ * Create and display a new dialog
46
+ *
47
+ * Creates a dialog containing the specified web component. The dialog can be
48
+ * modal or non-modal depending on the component implementation. The rendering
49
+ * approach depends on the platform - most commonly as an overlay on the current
50
+ * page, but on some platforms as a separate native window.
51
+ *
52
+ * @param name - Tag name of the web component to render in the dialog (e.g., 'my-dialog-component')
53
+ * @param properties - Props to pass to the dialog component. These will be set as properties on the component instance.
54
+ * @param listeners - Event listeners to register on the dialog component. Keys are event names, values are handler functions.
55
+ * @returns Unique identifier for the created dialog. Use this ID with {@link DialogRenderer.update} and {@link DialogRenderer.destroy}.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * const dialogRenderer = this.platform.get(PlatformServiceNames.Dialog);
60
+ * const dialogId = dialogRenderer.create(
61
+ * 'confirmation-dialog',
62
+ * { title: 'Delete Item', message: 'This cannot be undone' },
63
+ * {
64
+ * 'confirm': () => this.deleteItem(),
65
+ * 'cancel': () => dialogRenderer.destroy(dialogId)
66
+ * }
67
+ * );
68
+ * ```
21
69
  */
22
70
  create(name: string, properties?: DialogProperties, listeners?: DialogListeners): number;
23
71
  /**
24
- * Update an existing dialog with new properties
72
+ * Update an existing dialog's properties
73
+ *
74
+ * Updates the properties of a dialog that was previously created. This is
75
+ * useful for updating dialog content based on user interactions or data changes.
76
+ *
77
+ * Event listeners cannot be updated and will remain as originally registered.
78
+ *
79
+ * @param id - The dialog identifier returned from {@link DialogRenderer.create}
80
+ * @param properties - New property values to set on the dialog component
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * const dialogRenderer = this.platform.get(PlatformServiceNames.Dialog);
85
+ * const dialogId = dialogRenderer.create('progress-dialog', {
86
+ * progress: 0,
87
+ * status: 'Starting...'
88
+ * });
25
89
  *
26
- * @param id - the dialog identifier
27
- * @param properties - any properties to send to the dialog
90
+ * // Later, update progress
91
+ * dialogRenderer.update(dialogId, {
92
+ * progress: 50,
93
+ * status: 'Processing...'
94
+ * });
95
+ * ```
28
96
  */
29
97
  update(id: number, properties?: DialogProperties): void;
30
98
  /**
31
- * Destroy a dialog
99
+ * Close and destroy a dialog
32
100
  *
33
- * @param id - id representing the dialog
101
+ * Removes the dialog from the DOM and cleans up all associated resources
102
+ * and event listeners. If the dialog was rendered as a popup window, the
103
+ * window will be closed.
104
+ *
105
+ * @param id - The dialog identifier returned from {@link DialogRenderer.create}
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * const dialogRenderer = this.platform.get(PlatformServiceNames.Dialog);
110
+ * const dialogId = dialogRenderer.create('my-dialog');
111
+ *
112
+ * // Later, close the dialog
113
+ * dialogRenderer.destroy(dialogId);
114
+ * ```
34
115
  */
35
116
  destroy(id: number): void;
36
117
  }
37
118
  /**
119
+ * Properties to pass to a dialog component
120
+ *
121
+ * An object mapping property names to values. These will be set as properties
122
+ * on the dialog's web component instance when the dialog is created or updated.
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * const properties: DialogProperties = {
127
+ * userId: 123,
128
+ * mode: 'edit',
129
+ * allowDelete: true,
130
+ * fields: ['name', 'email', 'phone']
131
+ * };
132
+ * dialogRenderer.create('user-form-dialog', properties);
133
+ * ```
134
+ *
38
135
  * @public
39
136
  * @group Dialog
40
137
  */
41
138
  export type DialogProperties = Record<string, any>;
42
139
  /**
140
+ * Event listeners for a dialog component
141
+ *
142
+ * An object mapping event names to handler functions. These listeners will be
143
+ * registered on the dialog's web component instance when the dialog is created.
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * const listeners: DialogListeners = {
148
+ * 'save': (event?: CustomEvent<User>) => {
149
+ * console.log('User saved:', event?.detail);
150
+ * },
151
+ * 'cancel': () => {
152
+ * console.log('Cancelled');
153
+ * },
154
+ * 'delete': (event?: CustomEvent<number>) => {
155
+ * console.log('Delete user:', event?.detail);
156
+ * }
157
+ * };
158
+ * dialogRenderer.create('user-form-dialog', properties, listeners);
159
+ * ```
160
+ *
43
161
  * @public
44
162
  * @group Dialog
45
163
  */
46
164
  export type DialogListeners = Record<string, (event?: CustomEvent<any>) => void>;
47
165
  /**
48
- * @event dialog.destroyed - Emitted when a dialog is externally destroyed, e.g.
49
- * by closing a popup window
166
+ * Event emitted when a dialog is externally destroyed
167
+ *
168
+ * This event is dispatched via {@link EventDispatcher} when a dialog is closed
169
+ * by external means, such as the user closing a popup window. The event detail
170
+ * contains the dialog ID that was destroyed.
171
+ *
172
+ * This allows the component that created the dialog to clean up any references
173
+ * or state associated with the dialog.
174
+ *
175
+ * @event dialog.destroyed
176
+ *
177
+ * @example
178
+ * ```typescript
179
+ * const eventDispatcher = this.platform.get(PlatformServiceName.EventDispatcher);
180
+ * eventDispatcher.addListener('dialog.destroyed', (event: DialogDestroyedEvent) => {
181
+ * const destroyedDialogId = event.detail;
182
+ * console.log(`Dialog ${destroyedDialogId} was closed`);
183
+ * });
184
+ * ```
185
+ *
50
186
  * @public
51
187
  * @group Dialog
52
188
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/dialog.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;;;;;OASG;IACH,MAAM,CACF,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,gBAAgB,EAC7B,SAAS,CAAC,EAAE,eAAe,GAC5B,MAAM,CAAC;IAEV;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAExD;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAChC,MAAM,EAEN,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI,CACrC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/dialog.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACF,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,gBAAgB,EAC7B,SAAS,CAAC,EAAE,eAAe,GAC5B,MAAM,CAAC;IAEV;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAExD;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAChC,MAAM,EAEN,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI,CACrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC"}
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