@limetech/lime-crm-building-blocks 1.101.0 → 1.102.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 +7 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/lime-query-validation-6be10fa7.js +558 -0
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +4 -514
- package/dist/cjs/{limebb-lime-query-filter-builder_4.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +1 -243
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +242 -0
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +322 -0
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.css +91 -0
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +355 -0
- package/dist/collection/components/lime-query-builder/lime-query-validation.js +40 -0
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
- package/dist/collection/components/lime-query-builder/{response-format-editor.css → response-format/response-format-editor.css} +1 -1
- package/dist/collection/components/lime-query-builder/{response-format-editor.js → response-format/response-format-editor.js} +5 -5
- package/dist/collection/components/lime-query-builder/response-format/response-format-helpers.js +92 -0
- package/dist/collection/components/lime-query-builder/{response-format-item.css → response-format/response-format-item.css} +1 -1
- package/dist/collection/components/lime-query-builder/{response-format-item.js → response-format/response-format-item.js} +6 -6
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/summary-popover/summary-popover.js +3 -3
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/components/lime-query-filter-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +2 -2
- package/dist/components/lime-query-validation.js +555 -0
- package/dist/components/limebb-lime-query-builder.js +14 -524
- package/dist/components/limebb-lime-query-response-format-builder.d.ts +11 -0
- package/dist/components/limebb-lime-query-response-format-builder.js +283 -0
- package/dist/components/limebb-lime-query-response-format-editor.d.ts +11 -0
- package/dist/components/{limebb-response-format-editor.js → limebb-lime-query-response-format-editor.js} +2 -2
- package/dist/components/limebb-lime-query-response-format-item.d.ts +11 -0
- package/dist/components/{limebb-response-format-item.js → limebb-lime-query-response-format-item.js} +2 -2
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-percentage-visualizer.js +2 -2
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +1 -1
- package/dist/components/live-docs-info.js +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-item.js +2 -2
- package/dist/components/response-format-editor.js +11 -11
- package/dist/components/response-format-item.js +9 -9
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/lime-query-validation-573223a5.js +555 -0
- package/dist/esm/limebb-lime-query-builder.entry.js +4 -514
- package/dist/esm/{limebb-lime-query-filter-builder_4.entry.js → limebb-lime-query-filter-builder_3.entry.js} +2 -243
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-group_3.entry.js +2 -2
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +238 -0
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +317 -0
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-5cf4898d.entry.js → p-0de79b7f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8c2fb1c9.entry.js → p-0f7135ff.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6aa216ec.entry.js → p-186e9f1a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-289ce8b9.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-3351395b.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-33e6d0ec.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-a1ee8990.entry.js → p-3d1be1c9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-92dfc5f8.entry.js → p-577d8909.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ccf34631.entry.js → p-6579412e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d84874dc.entry.js → p-6f6fed59.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0cd036ed.entry.js → p-7e5528f6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8601eab5.entry.js → p-a9ac501f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-be845252.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-2725671e.entry.js → p-cb338753.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-425eaba2.entry.js → p-d0721b22.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-fa2da6bc.js +1 -0
- package/dist/types/components/lime-query-builder/lime-query-response-format-builder.d.ts +102 -0
- package/dist/types/components/lime-query-builder/lime-query-validation.d.ts +13 -0
- package/dist/types/components/lime-query-builder/{response-format-editor.d.ts → response-format/response-format-editor.d.ts} +2 -2
- package/dist/types/components/lime-query-builder/response-format/response-format-helpers.d.ts +42 -0
- package/dist/types/components/lime-query-builder/{response-format-item.d.ts → response-format/response-format-item.d.ts} +2 -2
- package/dist/types/components.d.ts +394 -222
- package/package.json +1 -1
- package/dist/cjs/limebb-response-format-item.cjs.entry.js +0 -80
- package/dist/components/limebb-response-format-editor.d.ts +0 -11
- package/dist/components/limebb-response-format-item.d.ts +0 -11
- package/dist/esm/limebb-response-format-item.entry.js +0 -76
- package/dist/lime-crm-building-blocks/p-244ee55b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-67c174d0.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-f9efca1d.entry.js +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
|
+
import { ResponseFormat } from './lime-query.types';
|
|
4
|
+
/**
|
|
5
|
+
* Response Format Builder
|
|
6
|
+
*
|
|
7
|
+
* A focused component for editing Lime Query ResponseFormat in isolation.
|
|
8
|
+
* Supports both GUI and code modes for maximum flexibility.
|
|
9
|
+
*
|
|
10
|
+
* Use this component when you need to configure which properties to return
|
|
11
|
+
* from a query, but don't need filter, limit, or other query parameters.
|
|
12
|
+
*
|
|
13
|
+
* **Features**:
|
|
14
|
+
* - **GUI Mode**: Visual property selector with relation navigation
|
|
15
|
+
* - **Code Mode**: JSON editor for ResponseFormat structure
|
|
16
|
+
* - **Validation**: Ensures JSON is valid ResponseFormat (rejects other fields)
|
|
17
|
+
* - **Mode Toggle**: Switch between GUI and code modes seamlessly
|
|
18
|
+
* - **Feature Flag**: Respects `useLimeQueryBuilderGuiMode` setting
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <limebb-lime-query-response-format-builder
|
|
23
|
+
* platform={this.platform}
|
|
24
|
+
* context={this.context}
|
|
25
|
+
* limetype="deal"
|
|
26
|
+
* value={this.responseFormat}
|
|
27
|
+
* label="Select Properties to Return"
|
|
28
|
+
* onChange={this.handleChange}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @exampleComponent limebb-example-response-format-builder-basic
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
export declare class LimeQueryResponseFormatBuilder implements LimeWebComponent {
|
|
36
|
+
/**
|
|
37
|
+
* Platform service provider
|
|
38
|
+
*/
|
|
39
|
+
platform: LimeWebComponentPlatform;
|
|
40
|
+
/**
|
|
41
|
+
* Component context
|
|
42
|
+
*/
|
|
43
|
+
context: LimeWebComponentContext;
|
|
44
|
+
/**
|
|
45
|
+
* The limetype to configure response format for
|
|
46
|
+
* This is fixed and not editable by the user
|
|
47
|
+
*/
|
|
48
|
+
limetype: string;
|
|
49
|
+
/**
|
|
50
|
+
* Current response format value
|
|
51
|
+
*/
|
|
52
|
+
value?: ResponseFormat;
|
|
53
|
+
/**
|
|
54
|
+
* Optional label for the builder
|
|
55
|
+
*/
|
|
56
|
+
label: string;
|
|
57
|
+
/**
|
|
58
|
+
* Emitted when the response format changes
|
|
59
|
+
*/
|
|
60
|
+
change: EventEmitter<ResponseFormat>;
|
|
61
|
+
private limetypes;
|
|
62
|
+
private mode;
|
|
63
|
+
private codeValue;
|
|
64
|
+
private internalValue;
|
|
65
|
+
/**
|
|
66
|
+
* Check if GUI mode is enabled via feature flag
|
|
67
|
+
*/
|
|
68
|
+
private get guiModeEnabled();
|
|
69
|
+
componentWillLoad(): void;
|
|
70
|
+
componentWillUpdate(): void;
|
|
71
|
+
render(): any;
|
|
72
|
+
private renderModeSwitch;
|
|
73
|
+
private renderCodeEditor;
|
|
74
|
+
private renderGuiMode;
|
|
75
|
+
/**
|
|
76
|
+
* Check if current value can be rendered in GUI mode
|
|
77
|
+
*/
|
|
78
|
+
private checkGuiSupport;
|
|
79
|
+
/**
|
|
80
|
+
* Update code value from internal state
|
|
81
|
+
*/
|
|
82
|
+
private updateCodeValue;
|
|
83
|
+
/**
|
|
84
|
+
* Switch from code mode to GUI mode
|
|
85
|
+
*/
|
|
86
|
+
private switchToGui;
|
|
87
|
+
/**
|
|
88
|
+
* Switch from GUI mode to code mode
|
|
89
|
+
*/
|
|
90
|
+
private switchToCode;
|
|
91
|
+
/**
|
|
92
|
+
* Handle code editor changes
|
|
93
|
+
* @param event
|
|
94
|
+
*/
|
|
95
|
+
private handleCodeChange;
|
|
96
|
+
/**
|
|
97
|
+
* Handle GUI mode changes
|
|
98
|
+
* @param event
|
|
99
|
+
*/
|
|
100
|
+
private handleGuiChange;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=lime-query-response-format-builder.d.ts.map
|
|
@@ -55,4 +55,17 @@ export declare function validatePropertySelection(selection: PropertySelection,
|
|
|
55
55
|
* @returns LimeQueryValidationResult with validity status and any errors/limitations
|
|
56
56
|
*/
|
|
57
57
|
export declare function isLimeQuerySupported(limeQuery: LimeQuery, limetypes: Record<string, LimeType>, activeLimetype?: string, guiModeEnabled?: boolean): LimeQueryValidationResult;
|
|
58
|
+
/**
|
|
59
|
+
* Validate a ResponseFormat in isolation (for response-format-builder)
|
|
60
|
+
*
|
|
61
|
+
* This validator is designed for the response-format-builder component,
|
|
62
|
+
* which only handles ResponseFormat editing without the full LimeQuery context.
|
|
63
|
+
*
|
|
64
|
+
* @param responseFormat - The response format to validate
|
|
65
|
+
* @param limetypes - Record of all available limetypes
|
|
66
|
+
* @param limetype - The limetype context for validation
|
|
67
|
+
* @param guiModeEnabled - Whether GUI mode is enabled (affects validation)
|
|
68
|
+
* @returns Validation result with errors and GUI limitations
|
|
69
|
+
*/
|
|
70
|
+
export declare function validateResponseFormatOnly(responseFormat: ResponseFormat, limetypes: Record<string, LimeType>, limetype: string, guiModeEnabled?: boolean): LimeQueryValidationResult;
|
|
58
71
|
//# sourceMappingURL=lime-query-validation.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventEmitter } from '
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
|
-
import { ResponseFormat } from '
|
|
3
|
+
import { ResponseFormat } from '../lime-query.types';
|
|
4
4
|
/**
|
|
5
5
|
* Response Format Editor Component
|
|
6
6
|
*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper functions for working with ResponseFormat objects
|
|
3
|
+
*
|
|
4
|
+
* These utilities handle parsing, stringifying, and default values
|
|
5
|
+
* for ResponseFormat in isolation (without full LimeQuery wrapper)
|
|
6
|
+
*/
|
|
7
|
+
import { ResponseFormat } from '../lime-query.types';
|
|
8
|
+
/**
|
|
9
|
+
* Parse JSON string to ResponseFormat
|
|
10
|
+
*
|
|
11
|
+
* @param json - JSON string to parse
|
|
12
|
+
* @returns Parsed ResponseFormat object
|
|
13
|
+
* @throws Error if JSON is invalid or not a ResponseFormat
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseResponseFormat(json: string): ResponseFormat;
|
|
16
|
+
/**
|
|
17
|
+
* Stringify ResponseFormat to JSON
|
|
18
|
+
*
|
|
19
|
+
* @param format - ResponseFormat object to stringify
|
|
20
|
+
* @returns Pretty-printed JSON string
|
|
21
|
+
*/
|
|
22
|
+
export declare function stringifyResponseFormat(format: ResponseFormat): string;
|
|
23
|
+
/**
|
|
24
|
+
* Get default ResponseFormat (just _id)
|
|
25
|
+
*
|
|
26
|
+
* @returns Default ResponseFormat with only _id selected
|
|
27
|
+
*/
|
|
28
|
+
export declare function getDefaultResponseFormat(): ResponseFormat;
|
|
29
|
+
/**
|
|
30
|
+
* Check if a parsed JSON object is a valid ResponseFormat
|
|
31
|
+
*
|
|
32
|
+
* This is a more lenient check than parseResponseFormat - it doesn't throw,
|
|
33
|
+
* just returns a boolean with optional error message
|
|
34
|
+
*
|
|
35
|
+
* @param json - Parsed JSON object to check
|
|
36
|
+
* @returns Object with `valid` boolean and optional `error` message
|
|
37
|
+
*/
|
|
38
|
+
export declare function isValidResponseFormatStructure(json: any): {
|
|
39
|
+
valid: boolean;
|
|
40
|
+
error?: string;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=response-format-helpers.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventEmitter } from '
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
|
-
import { PropertySelectionItem } from '
|
|
3
|
+
import { PropertySelectionItem } from '../property-selection-format';
|
|
4
4
|
/**
|
|
5
5
|
* Response Format Property Item Component
|
|
6
6
|
*
|