@limetech/lime-web-components 6.12.0 → 6.13.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,19 @@
1
+ ## [6.13.1](https://github.com/Lundalogik/lime-web-components/compare/v6.13.0...v6.13.1) (2026-02-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **ai-context:** make element required and rename componentContext ([fbe7e42](https://github.com/Lundalogik/lime-web-components/commit/fbe7e42130fb59b3b3aa436a685a7e4a4e712b28)), closes [Lundalogik/crm-insights-and-intelligence#205](https://github.com/Lundalogik/crm-insights-and-intelligence/issues/205)
8
+
9
+ ## [6.13.0](https://github.com/Lundalogik/lime-web-components/compare/v6.12.0...v6.13.0) (2026-02-25)
10
+
11
+
12
+ ### Features
13
+
14
+
15
+ * **problem:** add `getBulkActions` to `ProblemProvider` ([c5292a8](https://github.com/Lundalogik/lime-web-components/commit/c5292a85f4546c3a3538e3a5df3acb9aae42a741))
16
+
1
17
  ## [6.12.0](https://github.com/Lundalogik/lime-web-components/compare/v6.11.0...v6.12.0) (2026-02-23)
2
18
 
3
19
 
@@ -1,21 +1,6 @@
1
1
  import { LimeWebComponent } from '../core/lime-web-component';
2
2
  import { LimeWebComponentContext } from '../core/context';
3
- /**
4
- * A value that can be safely serialized to JSON via JSON.stringify().
5
- *
6
- * This type excludes non-serializable values like:
7
- * - `undefined` (use `null` instead)
8
- * - `Date` (convert to ISO string first)
9
- * - `Function`
10
- * - `Symbol`
11
- * - Circular references
12
- *
13
- * @alpha
14
- * @group AI Context
15
- */
16
- export type JsonValue = string | number | boolean | null | JsonValue[] | {
17
- [key: string]: JsonValue;
18
- };
3
+ import { JsonValue } from '../json/json-value';
19
4
  /**
20
5
  * Represents context information that a provider contributes to the AI chat.
21
6
  *
@@ -83,16 +68,19 @@ export interface AIContextContribution {
83
68
  */
84
69
  export interface GatheredAIContext extends AIContextContribution {
85
70
  /**
86
- * The component's LimeWebComponentContext at the time of gathering.
71
+ * The component's {@link LimeWebComponentContext} at the time of gathering.
87
72
  *
88
- * Provides rich information about where this context originates:
89
- * - `limetype`: What type of business object the component is working with
90
- * - `id`: Which specific record (if any)
91
- * - `parent`: Parent context for nested components
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:
92
76
  *
93
- * Only present when the provider registered with an element reference.
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.
94
82
  */
95
- componentContext?: LimeWebComponentContext;
83
+ ancestorContext: LimeWebComponentContext;
96
84
  }
97
85
  /**
98
86
  * A provider that contributes context information to the AI chat.
@@ -199,8 +187,8 @@ export interface AIContextRegistry {
199
187
  * gets a unique internal key.
200
188
  *
201
189
  * @param provider - The provider to register.
202
- * @param element - Optional host element of the component registering this
203
- * provider. When provided, enables the registry to:
190
+ * @param element - The host element of the component registering this
191
+ * provider. Enables the registry to:
204
192
  * - Read the component's `LimeWebComponentContext` to enrich contributions
205
193
  * - Skip providers whose elements are not currently connected to the DOM
206
194
  * @returns A function to unregister the provider. Call this when the
@@ -225,7 +213,7 @@ export interface AIContextRegistry {
225
213
  * unregister();
226
214
  * ```
227
215
  */
228
- register(provider: AIContextProvider, element?: HTMLElement & LimeWebComponent): () => void;
216
+ register(provider: AIContextProvider, element: HTMLElement & LimeWebComponent): () => void;
229
217
  /**
230
218
  * Get all registered providers.
231
219
  *
@@ -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,iBA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BAAgB,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"}
package/dist/index.d.ts CHANGED
@@ -49,5 +49,6 @@ export * from './notification-service';
49
49
  export * from './poller';
50
50
  export * from './logger';
51
51
  export * from './problem';
52
+ export * from './json';
52
53
  export * from './ai-context';
53
54
  //# 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,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,SAAS,CAAC"}
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,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,OAAO,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './json-value';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/json/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A value that can be safely serialized to JSON via JSON.stringify().
3
+ *
4
+ * This type excludes non-serializable values like:
5
+ * - `undefined` (use `null` instead)
6
+ * - `Date` (convert to ISO string first)
7
+ * - `Function`
8
+ * - `Symbol`
9
+ * - Circular references
10
+ *
11
+ * @alpha
12
+ */
13
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
14
+ [key: string]: JsonValue;
15
+ };
16
+ //# sourceMappingURL=json-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-value.d.ts","sourceRoot":"","sources":["../../src/json/json-value.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GACf,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC"}
@@ -138,6 +138,48 @@ export interface ProblemProvider {
138
138
  * @see {@link Action}
139
139
  */
140
140
  getActions(problem: Problem): Action[];
141
+ /**
142
+ * Returns available actions for a selection of problems.
143
+ *
144
+ * Bulk actions let users act on multiple problems at once (e.g., retry
145
+ * all failed imports in a single operation). The provider decides which
146
+ * actions make sense across a set of problems and constructs the command
147
+ * payload accordingly.
148
+ *
149
+ * When this method is not implemented, the platform does not offer bulk
150
+ * actions for this provider.
151
+ *
152
+ * @param problems - The selected problems to get bulk actions for.
153
+ * @returns An array of actions available for the selection. Return an
154
+ * empty array `[]` if no bulk actions apply.
155
+ *
156
+ * @example
157
+ * ```typescript
158
+ * getBulkActions(problems: Problem[]): Action[] {
159
+ * const messageIds = problems
160
+ * .map(p => p.id);
161
+ *
162
+ * if (messageIds.length === 0) {
163
+ * return [];
164
+ * }
165
+ *
166
+ * const command = new BulkRetryImportCommand();
167
+ * command.messageIds = messageIds;
168
+ *
169
+ * return [
170
+ * {
171
+ * label: 'Retry import',
172
+ * icon: 'refresh',
173
+ * command: command,
174
+ * },
175
+ * ];
176
+ * }
177
+ * ```
178
+ *
179
+ * @see {@link Action}
180
+ * @see {@link ProblemProvider.getActions}
181
+ */
182
+ getBulkActions?(problems: Problem[]): Action[];
141
183
  /**
142
184
  * Returns all problem types supported by this provider.
143
185
  *
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/problem/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,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,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,cAAc,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;IAE/C;;;;;;;;;;OAUG;IACH,QAAQ,IAAI,WAAW,EAAE,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IAE/C;;;;;;;;;;;OAWG;IACH,WAAW,IAAI,aAAa,EAAE,CAAC;IAE/B;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,oBAAoB,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAAC;IAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAAC;CAC9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "6.12.0",
3
+ "version": "6.13.1",
4
4
  "description": "Lime Web Components",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@commitlint/config-conventional": "^20.4.2",
39
39
  "@limetech/eslint-config": "^4.0.0",
40
- "@microsoft/api-extractor": "^7.57.2",
40
+ "@microsoft/api-extractor": "^7.57.6",
41
41
  "eslint": "^9.39.2",
42
42
  "expect-type": "^1.3.0",
43
43
  "globals": "^17.3.0",