@limetech/lime-crm-building-blocks 1.104.5 → 1.105.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 +14 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-document-item.cjs.entry.js +29 -8
- package/dist/cjs/limebb-document-picker.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +28 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
- package/dist/collection/components/chat-list/chat-list.js +2 -2
- package/dist/collection/components/component-command-picker/component-config/component-config.js +2 -2
- package/dist/collection/components/component-command-picker/component-picker/component-picker.js +2 -2
- package/dist/collection/components/date-picker/date-picker.js +2 -2
- package/dist/collection/components/date-range/date-range.js +2 -2
- package/dist/collection/components/document-picker/document-item/document-item.js +55 -10
- package/dist/collection/components/document-picker/document-picker.js +5 -5
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +2 -2
- package/dist/collection/components/feed/feed.js +2 -2
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +2 -2
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +2 -2
- package/dist/collection/components/kanban/kanban.js +2 -2
- package/dist/collection/components/lime-query-builder/lime-query-builder.css +1 -0
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +29 -3
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +2 -2
- package/dist/collection/components/limeobject/file-viewer/file-viewer.js +2 -2
- package/dist/collection/components/loader/loader.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +2 -2
- package/dist/collection/components/notification-list/notification-item/notification-item.js +2 -2
- package/dist/collection/components/notification-list/notification-list.js +2 -2
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/trend-indicator/trend-indicator.js +2 -2
- package/dist/components/document-item.js +31 -9
- package/dist/components/limebb-document-picker.js +3 -3
- package/dist/components/limebb-lime-query-builder.js +30 -4
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-document-item.entry.js +29 -8
- package/dist/esm/limebb-document-picker.entry.js +3 -3
- package/dist/esm/limebb-lime-query-builder.entry.js +28 -3
- 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-1421e1f8.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-2673c79e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-80b9d946.entry.js +1 -0
- package/dist/types/components/document-picker/document-item/document-item.d.ts +8 -1
- package/dist/types/components/document-picker/document-item/document-item.types.d.ts +3 -15
- package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +4 -0
- package/dist/types/components/lime-query-builder/lime-query.types.d.ts +16 -0
- package/dist/types/components.d.ts +96 -88
- package/package.json +4 -4
- package/dist/lime-crm-building-blocks/p-2abf615b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-876701c6.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-9d25ed5a.entry.js +0 -1
|
@@ -13,6 +13,11 @@ export class DocumentItemComponent {
|
|
|
13
13
|
* - 'checkbox': renders a checkbox for multiple selection.
|
|
14
14
|
*/
|
|
15
15
|
this.type = 'checkbox';
|
|
16
|
+
/**
|
|
17
|
+
* The preferred file URL types to use when displaying
|
|
18
|
+
* the document's image preview.
|
|
19
|
+
*/
|
|
20
|
+
this.fileTypes = ['view', 'contents', 'download'];
|
|
16
21
|
this.handleDocumentItemClick = (event) => {
|
|
17
22
|
if (this.isUnavailable()) {
|
|
18
23
|
return;
|
|
@@ -72,21 +77,22 @@ export class DocumentItemComponent {
|
|
|
72
77
|
}
|
|
73
78
|
render() {
|
|
74
79
|
const isUnavailable = this.isUnavailable();
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
const image = this.getImage();
|
|
81
|
+
return (h(Host, { key: '7fc37bbc0185cdb38c837f2487c88f4d275d1c2f', id: String(this.item.file.id), class: {
|
|
82
|
+
'has-image': !!image,
|
|
77
83
|
'has-error': !!this.item.hasError,
|
|
78
|
-
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: '
|
|
84
|
+
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: 'da1329af4f1eac4617da054b5b02715b512631ff', image: image, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'a30361cfb76512065fe3cf1b513f31257cf115ee', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
|
|
79
85
|
}
|
|
80
86
|
renderBooleanInput() {
|
|
81
87
|
const id = this.getControlId();
|
|
82
88
|
if (this.type === 'radio') {
|
|
83
|
-
return (h("limel-radio-button", { id: id, label: this.item.
|
|
89
|
+
return (h("limel-radio-button", { id: id, label: this.item.file.filename, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
|
|
84
90
|
}
|
|
85
|
-
return (h("limel-checkbox", { id: id, label: this.item.
|
|
91
|
+
return (h("limel-checkbox", { id: id, label: this.item.file.filename, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
|
|
86
92
|
}
|
|
87
93
|
renderFileSize() {
|
|
88
|
-
var _a;
|
|
89
|
-
const formattedFileSize = formatBytes((_a = this.item) === null || _a === void 0 ? void 0 : _a.
|
|
94
|
+
var _a, _b;
|
|
95
|
+
const formattedFileSize = formatBytes((_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.file) === null || _b === void 0 ? void 0 : _b.size);
|
|
90
96
|
if (!formattedFileSize) {
|
|
91
97
|
return;
|
|
92
98
|
}
|
|
@@ -112,7 +118,7 @@ export class DocumentItemComponent {
|
|
|
112
118
|
this.interact.emit(Object.assign(Object.assign({}, this.item), { selected }));
|
|
113
119
|
}
|
|
114
120
|
getControlId() {
|
|
115
|
-
return `boolean-input-${String(this.item.id)}`;
|
|
121
|
+
return `boolean-input-${String(this.item.file.id)}`;
|
|
116
122
|
}
|
|
117
123
|
isUnavailable() {
|
|
118
124
|
var _a, _b;
|
|
@@ -126,6 +132,21 @@ export class DocumentItemComponent {
|
|
|
126
132
|
input.checked = false;
|
|
127
133
|
}
|
|
128
134
|
}
|
|
135
|
+
getImage() {
|
|
136
|
+
const href = this.hrefForFile();
|
|
137
|
+
if (!href) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
src: href,
|
|
142
|
+
alt: this.item.file.filename,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
hrefForFile() {
|
|
146
|
+
return ['preview', ...this.fileTypes]
|
|
147
|
+
.map((type) => this.item.file.getUrl(type))
|
|
148
|
+
.find(Boolean);
|
|
149
|
+
}
|
|
129
150
|
static get is() { return "limebb-document-item"; }
|
|
130
151
|
static get encapsulation() { return "shadow"; }
|
|
131
152
|
static get delegatesFocus() { return true; }
|
|
@@ -162,7 +183,7 @@ export class DocumentItemComponent {
|
|
|
162
183
|
"name": "inheritdoc",
|
|
163
184
|
"text": undefined
|
|
164
185
|
}],
|
|
165
|
-
"text": "Reference to the platform"
|
|
186
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
166
187
|
},
|
|
167
188
|
"getter": false,
|
|
168
189
|
"setter": false
|
|
@@ -188,7 +209,7 @@ export class DocumentItemComponent {
|
|
|
188
209
|
"name": "inheritdoc",
|
|
189
210
|
"text": undefined
|
|
190
211
|
}],
|
|
191
|
-
"text": "The context this component
|
|
212
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
192
213
|
},
|
|
193
214
|
"getter": false,
|
|
194
215
|
"setter": false
|
|
@@ -235,6 +256,30 @@ export class DocumentItemComponent {
|
|
|
235
256
|
"attribute": "type",
|
|
236
257
|
"reflect": true,
|
|
237
258
|
"defaultValue": "'checkbox'"
|
|
259
|
+
},
|
|
260
|
+
"fileTypes": {
|
|
261
|
+
"type": "unknown",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "LimeFileUrlType[]",
|
|
265
|
+
"resolved": "LimeFileUrlType[]",
|
|
266
|
+
"references": {
|
|
267
|
+
"LimeFileUrlType": {
|
|
268
|
+
"location": "import",
|
|
269
|
+
"path": "@limetech/lime-web-components",
|
|
270
|
+
"id": "node_modules::LimeFileUrlType"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": "The preferred file URL types to use when displaying\nthe document's image preview."
|
|
279
|
+
},
|
|
280
|
+
"getter": false,
|
|
281
|
+
"setter": false,
|
|
282
|
+
"defaultValue": "['view', 'contents', 'download']"
|
|
238
283
|
}
|
|
239
284
|
};
|
|
240
285
|
}
|
|
@@ -47,7 +47,7 @@ export class DocumentPicker {
|
|
|
47
47
|
// or allow deselecting if clicking the already selected item
|
|
48
48
|
updatedItems = this.items
|
|
49
49
|
.map((item) => {
|
|
50
|
-
if (item.id === interactedItem.id) {
|
|
50
|
+
if (item.file.id === interactedItem.file.id) {
|
|
51
51
|
return Object.assign(Object.assign({}, item), { selected: interactedItem.selected });
|
|
52
52
|
}
|
|
53
53
|
return Object.assign(Object.assign({}, item), { selected: false });
|
|
@@ -57,7 +57,7 @@ export class DocumentPicker {
|
|
|
57
57
|
else {
|
|
58
58
|
updatedItems = this.items
|
|
59
59
|
.map((item) => {
|
|
60
|
-
if (item.id === interactedItem.id) {
|
|
60
|
+
if (item.file.id === interactedItem.file.id) {
|
|
61
61
|
return Object.assign(Object.assign({}, item), { selected: interactedItem.selected });
|
|
62
62
|
}
|
|
63
63
|
return item;
|
|
@@ -79,7 +79,7 @@ export class DocumentPicker {
|
|
|
79
79
|
return (h(Host, { key: '5e4a9004ed3b81b6c35be868c664e61cb88d490c' }, h("limel-notched-outline", { key: 'ada8928b3ed815896e1ef5fb61f539f0ab77c7af', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("div", { key: '343aeef460a4ea4e0a4a247daf6988f749dc2b49', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
|
|
80
80
|
}
|
|
81
81
|
renderItems() {
|
|
82
|
-
return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.id, type: this.type, onInteract: this.handleItemInteract })));
|
|
82
|
+
return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.file.id, type: this.type, onInteract: this.handleItemInteract })));
|
|
83
83
|
}
|
|
84
84
|
static get is() { return "limebb-document-picker"; }
|
|
85
85
|
static get encapsulation() { return "shadow"; }
|
|
@@ -116,7 +116,7 @@ export class DocumentPicker {
|
|
|
116
116
|
"name": "inheritdoc",
|
|
117
117
|
"text": undefined
|
|
118
118
|
}],
|
|
119
|
-
"text": "Reference to the platform"
|
|
119
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
120
120
|
},
|
|
121
121
|
"getter": false,
|
|
122
122
|
"setter": false
|
|
@@ -142,7 +142,7 @@ export class DocumentPicker {
|
|
|
142
142
|
"name": "inheritdoc",
|
|
143
143
|
"text": undefined
|
|
144
144
|
}],
|
|
145
|
-
"text": "The context this component
|
|
145
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
146
146
|
},
|
|
147
147
|
"getter": false,
|
|
148
148
|
"setter": false
|
|
@@ -419,7 +419,7 @@ export class FeedTimelineItem {
|
|
|
419
419
|
"name": "inheritdoc",
|
|
420
420
|
"text": undefined
|
|
421
421
|
}],
|
|
422
|
-
"text": "Reference to the platform"
|
|
422
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
423
423
|
},
|
|
424
424
|
"getter": false,
|
|
425
425
|
"setter": false
|
|
@@ -445,7 +445,7 @@ export class FeedTimelineItem {
|
|
|
445
445
|
"name": "inheritdoc",
|
|
446
446
|
"text": undefined
|
|
447
447
|
}],
|
|
448
|
-
"text": "The context this component
|
|
448
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
449
449
|
},
|
|
450
450
|
"getter": false,
|
|
451
451
|
"setter": false
|
|
@@ -227,7 +227,7 @@ export class Feed {
|
|
|
227
227
|
"name": "inheritdoc",
|
|
228
228
|
"text": undefined
|
|
229
229
|
}],
|
|
230
|
-
"text": "Reference to the platform"
|
|
230
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
231
231
|
},
|
|
232
232
|
"getter": false,
|
|
233
233
|
"setter": false
|
|
@@ -253,7 +253,7 @@ export class Feed {
|
|
|
253
253
|
"name": "inheritdoc",
|
|
254
254
|
"text": undefined
|
|
255
255
|
}],
|
|
256
|
-
"text": "The context this component
|
|
256
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
257
257
|
},
|
|
258
258
|
"getter": false,
|
|
259
259
|
"setter": false
|
|
@@ -189,7 +189,7 @@ export class InfoTile {
|
|
|
189
189
|
"optional": false,
|
|
190
190
|
"docs": {
|
|
191
191
|
"tags": [],
|
|
192
|
-
"text": "Reference to the platform"
|
|
192
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
193
193
|
},
|
|
194
194
|
"getter": false,
|
|
195
195
|
"setter": false
|
|
@@ -212,7 +212,7 @@ export class InfoTile {
|
|
|
212
212
|
"optional": false,
|
|
213
213
|
"docs": {
|
|
214
214
|
"tags": [],
|
|
215
|
-
"text": "The context this component
|
|
215
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
216
216
|
},
|
|
217
217
|
"getter": false,
|
|
218
218
|
"setter": false
|
|
@@ -127,7 +127,7 @@ export class KanbanGroup {
|
|
|
127
127
|
"name": "inheritdoc",
|
|
128
128
|
"text": undefined
|
|
129
129
|
}],
|
|
130
|
-
"text": "Reference to the platform"
|
|
130
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
131
131
|
},
|
|
132
132
|
"getter": false,
|
|
133
133
|
"setter": false
|
|
@@ -153,7 +153,7 @@ export class KanbanGroup {
|
|
|
153
153
|
"name": "inheritdoc",
|
|
154
154
|
"text": undefined
|
|
155
155
|
}],
|
|
156
|
-
"text": "The context this component
|
|
156
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
157
157
|
},
|
|
158
158
|
"getter": false,
|
|
159
159
|
"setter": false
|
|
@@ -164,7 +164,7 @@ export class KanbanItemComponent {
|
|
|
164
164
|
"name": "inheritdoc",
|
|
165
165
|
"text": undefined
|
|
166
166
|
}],
|
|
167
|
-
"text": "Reference to the platform"
|
|
167
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
168
168
|
},
|
|
169
169
|
"getter": false,
|
|
170
170
|
"setter": false
|
|
@@ -190,7 +190,7 @@ export class KanbanItemComponent {
|
|
|
190
190
|
"name": "inheritdoc",
|
|
191
191
|
"text": undefined
|
|
192
192
|
}],
|
|
193
|
-
"text": "The context this component
|
|
193
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
194
194
|
},
|
|
195
195
|
"getter": false,
|
|
196
196
|
"setter": false
|
|
@@ -72,7 +72,7 @@ export class Kanban {
|
|
|
72
72
|
"name": "inheritdoc",
|
|
73
73
|
"text": undefined
|
|
74
74
|
}],
|
|
75
|
-
"text": "Reference to the platform"
|
|
75
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
76
76
|
},
|
|
77
77
|
"getter": false,
|
|
78
78
|
"setter": false
|
|
@@ -98,7 +98,7 @@ export class Kanban {
|
|
|
98
98
|
"name": "inheritdoc",
|
|
99
99
|
"text": undefined
|
|
100
100
|
}],
|
|
101
|
-
"text": "The context this component
|
|
101
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
102
102
|
},
|
|
103
103
|
"getter": false,
|
|
104
104
|
"setter": false
|
|
@@ -78,6 +78,20 @@ export class LimeQueryBuilder {
|
|
|
78
78
|
this.orderBy = event.detail;
|
|
79
79
|
this.emitChange();
|
|
80
80
|
};
|
|
81
|
+
this.handleDescriptionChange = (event) => {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
this.description = event.detail || undefined;
|
|
84
|
+
this.emitChange();
|
|
85
|
+
};
|
|
86
|
+
this.handleDescriptionBlur = () => {
|
|
87
|
+
if (this.description) {
|
|
88
|
+
const trimmed = this.description.trim();
|
|
89
|
+
if (trimmed !== this.description) {
|
|
90
|
+
this.description = trimmed || undefined;
|
|
91
|
+
this.emitChange();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
81
95
|
this.handleChange = (event) => {
|
|
82
96
|
event.stopPropagation();
|
|
83
97
|
const mode = event.detail.id;
|
|
@@ -93,6 +107,7 @@ export class LimeQueryBuilder {
|
|
|
93
107
|
this.internalResponseFormat = parsed.responseFormat;
|
|
94
108
|
this.limit = parsed.limit;
|
|
95
109
|
this.orderBy = parsed.orderBy;
|
|
110
|
+
this.description = parsed['#description'];
|
|
96
111
|
this.mode = 'visual';
|
|
97
112
|
this.change.emit(parsed);
|
|
98
113
|
}
|
|
@@ -146,6 +161,7 @@ export class LimeQueryBuilder {
|
|
|
146
161
|
this.internalResponseFormat = this.value.responseFormat;
|
|
147
162
|
this.limit = this.value.limit;
|
|
148
163
|
this.orderBy = this.value.orderBy;
|
|
164
|
+
this.description = this.value['#description'];
|
|
149
165
|
}
|
|
150
166
|
// Initialize code value from prop
|
|
151
167
|
this.updateCodeValue();
|
|
@@ -156,7 +172,7 @@ export class LimeQueryBuilder {
|
|
|
156
172
|
}
|
|
157
173
|
}
|
|
158
174
|
render() {
|
|
159
|
-
return (h(Host, { key: '
|
|
175
|
+
return (h(Host, { key: '72ad0a52788c07a8369ee28535d9a05be92f5144' }, this.renderHeader(), this.renderContent()));
|
|
160
176
|
}
|
|
161
177
|
renderContent() {
|
|
162
178
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
@@ -194,6 +210,9 @@ export class LimeQueryBuilder {
|
|
|
194
210
|
responseFormat: responseFormat,
|
|
195
211
|
filter: this.filter,
|
|
196
212
|
};
|
|
213
|
+
if (this.description) {
|
|
214
|
+
limeQuery['#description'] = this.description;
|
|
215
|
+
}
|
|
197
216
|
if (this.limit !== undefined && this.limit > 0) {
|
|
198
217
|
limeQuery.limit = this.limit;
|
|
199
218
|
}
|
|
@@ -275,6 +294,12 @@ export class LimeQueryBuilder {
|
|
|
275
294
|
renderLimetypeSection() {
|
|
276
295
|
return (h("limebb-limetype-field", { platform: this.platform, context: this.context, label: "Limetype", value: this.limetype, required: true, fieldName: "limetype", onChange: this.handleLimetypeChange }));
|
|
277
296
|
}
|
|
297
|
+
renderDescriptionSection() {
|
|
298
|
+
if (!this.limetype) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
return (h("section", { class: "description" }, h("limel-input-field", { label: "Description", type: "textarea", value: this.description || '', placeholder: "Describe what data this query retrieves...", helperText: "Optional: Help AI agents and humans understand the query purpose", onChange: this.handleDescriptionChange, onBlur: this.handleDescriptionBlur })));
|
|
302
|
+
}
|
|
278
303
|
renderResponseFormatSection() {
|
|
279
304
|
if (!this.limetype) {
|
|
280
305
|
return;
|
|
@@ -295,7 +320,7 @@ export class LimeQueryBuilder {
|
|
|
295
320
|
return (h("section", { class: "query-options" }, h("limel-header", { class: "is-narrow", heading: "Query Options", icon: "ask_question" }), h("div", { class: "query-options-controls" }, h("limel-input-field", { label: "Limit", type: "number", value: ((_a = this.limit) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "No limit", helperText: "Maximum number of results", onChange: this.handleLimitChange }), h("limebb-lime-query-order-by-editor", { platform: this.platform, context: this.context, limetype: this.limetype, value: this.orderBy, onChange: this.handleOrderByChange }))));
|
|
296
321
|
}
|
|
297
322
|
renderVisualMode() {
|
|
298
|
-
return (h("div", { class: "visual-mode" }, this.renderLimetypeSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
|
|
323
|
+
return (h("div", { class: "visual-mode" }, this.renderLimetypeSection(), this.renderDescriptionSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
|
|
299
324
|
}
|
|
300
325
|
renderHeader() {
|
|
301
326
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
@@ -442,7 +467,8 @@ export class LimeQueryBuilder {
|
|
|
442
467
|
"filter": {},
|
|
443
468
|
"internalResponseFormat": {},
|
|
444
469
|
"limit": {},
|
|
445
|
-
"orderBy": {}
|
|
470
|
+
"orderBy": {},
|
|
471
|
+
"description": {}
|
|
446
472
|
};
|
|
447
473
|
}
|
|
448
474
|
static get events() {
|
|
@@ -133,7 +133,7 @@ export class LimetypeField {
|
|
|
133
133
|
"name": "inheritdoc",
|
|
134
134
|
"text": undefined
|
|
135
135
|
}],
|
|
136
|
-
"text": "Reference to the platform"
|
|
136
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
137
137
|
},
|
|
138
138
|
"getter": false,
|
|
139
139
|
"setter": false
|
|
@@ -159,7 +159,7 @@ export class LimetypeField {
|
|
|
159
159
|
"name": "inheritdoc",
|
|
160
160
|
"text": undefined
|
|
161
161
|
}],
|
|
162
|
-
"text": "The context this component
|
|
162
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
163
163
|
},
|
|
164
164
|
"getter": false,
|
|
165
165
|
"setter": false
|
|
@@ -161,7 +161,7 @@ export class FileViewer {
|
|
|
161
161
|
"optional": false,
|
|
162
162
|
"docs": {
|
|
163
163
|
"tags": [],
|
|
164
|
-
"text": "Reference to the platform"
|
|
164
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
165
165
|
},
|
|
166
166
|
"getter": false,
|
|
167
167
|
"setter": false
|
|
@@ -184,7 +184,7 @@ export class FileViewer {
|
|
|
184
184
|
"optional": false,
|
|
185
185
|
"docs": {
|
|
186
186
|
"tags": [],
|
|
187
|
-
"text": "The context this component
|
|
187
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
188
188
|
},
|
|
189
189
|
"getter": false,
|
|
190
190
|
"setter": false
|
|
@@ -39,7 +39,7 @@ export class CrmComponentsLoader {
|
|
|
39
39
|
"name": "inheritdoc",
|
|
40
40
|
"text": undefined
|
|
41
41
|
}],
|
|
42
|
-
"text": "Reference to the platform"
|
|
42
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
43
43
|
},
|
|
44
44
|
"getter": false,
|
|
45
45
|
"setter": false
|
|
@@ -65,7 +65,7 @@ export class CrmComponentsLoader {
|
|
|
65
65
|
"name": "inheritdoc",
|
|
66
66
|
"text": undefined
|
|
67
67
|
}],
|
|
68
|
-
"text": "The context this component
|
|
68
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
69
69
|
},
|
|
70
70
|
"getter": false,
|
|
71
71
|
"setter": false
|
|
@@ -80,7 +80,7 @@ export class LocalePicker {
|
|
|
80
80
|
"name": "inheritdoc",
|
|
81
81
|
"text": undefined
|
|
82
82
|
}],
|
|
83
|
-
"text": "Reference to the platform"
|
|
83
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
84
84
|
},
|
|
85
85
|
"getter": false,
|
|
86
86
|
"setter": false
|
|
@@ -106,7 +106,7 @@ export class LocalePicker {
|
|
|
106
106
|
"name": "inheritdoc",
|
|
107
107
|
"text": undefined
|
|
108
108
|
}],
|
|
109
|
-
"text": "The context this component
|
|
109
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
110
110
|
},
|
|
111
111
|
"getter": false,
|
|
112
112
|
"setter": false,
|
|
@@ -178,7 +178,7 @@ export class NotificationListItem {
|
|
|
178
178
|
"name": "inheritdoc",
|
|
179
179
|
"text": undefined
|
|
180
180
|
}],
|
|
181
|
-
"text": "Reference to the platform"
|
|
181
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
182
182
|
},
|
|
183
183
|
"getter": false,
|
|
184
184
|
"setter": false
|
|
@@ -204,7 +204,7 @@ export class NotificationListItem {
|
|
|
204
204
|
"name": "inheritdoc",
|
|
205
205
|
"text": undefined
|
|
206
206
|
}],
|
|
207
|
-
"text": "The context this component
|
|
207
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
208
208
|
},
|
|
209
209
|
"getter": false,
|
|
210
210
|
"setter": false
|
|
@@ -114,7 +114,7 @@ export class NotificationList {
|
|
|
114
114
|
"name": "inheritdoc",
|
|
115
115
|
"text": undefined
|
|
116
116
|
}],
|
|
117
|
-
"text": "Reference to the platform"
|
|
117
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
118
118
|
},
|
|
119
119
|
"getter": false,
|
|
120
120
|
"setter": false
|
|
@@ -140,7 +140,7 @@ export class NotificationList {
|
|
|
140
140
|
"name": "inheritdoc",
|
|
141
141
|
"text": undefined
|
|
142
142
|
}],
|
|
143
|
-
"text": "The context this component
|
|
143
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
144
144
|
},
|
|
145
145
|
"getter": false,
|
|
146
146
|
"setter": false
|
|
@@ -232,7 +232,7 @@ export class PercentageVisualizer {
|
|
|
232
232
|
"name": "inherit",
|
|
233
233
|
"text": undefined
|
|
234
234
|
}],
|
|
235
|
-
"text": "Reference to the platform"
|
|
235
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
236
236
|
},
|
|
237
237
|
"getter": false,
|
|
238
238
|
"setter": false
|
|
@@ -258,7 +258,7 @@ export class PercentageVisualizer {
|
|
|
258
258
|
"name": "inherit",
|
|
259
259
|
"text": undefined
|
|
260
260
|
}],
|
|
261
|
-
"text": "The context this component
|
|
261
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
262
262
|
},
|
|
263
263
|
"getter": false,
|
|
264
264
|
"setter": false
|
|
@@ -187,7 +187,7 @@ export class TrendIndicator {
|
|
|
187
187
|
"name": "inherit",
|
|
188
188
|
"text": undefined
|
|
189
189
|
}],
|
|
190
|
-
"text": "Reference to the platform"
|
|
190
|
+
"text": "Reference to the platform service container.\n\nUse this to access all platform services like repositories, HTTP client,\ncommand bus, navigator, and more. The platform instance is shared across\nall components in the same application context."
|
|
191
191
|
},
|
|
192
192
|
"getter": false,
|
|
193
193
|
"setter": false
|
|
@@ -213,7 +213,7 @@ export class TrendIndicator {
|
|
|
213
213
|
"name": "inherit",
|
|
214
214
|
"text": undefined
|
|
215
215
|
}],
|
|
216
|
-
"text": "The context this component
|
|
216
|
+
"text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
|
|
217
217
|
},
|
|
218
218
|
"getter": false,
|
|
219
219
|
"setter": false
|
|
@@ -52,6 +52,11 @@ const DocumentItemComponent = /*@__PURE__*/ proxyCustomElement(class DocumentIte
|
|
|
52
52
|
* - 'checkbox': renders a checkbox for multiple selection.
|
|
53
53
|
*/
|
|
54
54
|
this.type = 'checkbox';
|
|
55
|
+
/**
|
|
56
|
+
* The preferred file URL types to use when displaying
|
|
57
|
+
* the document's image preview.
|
|
58
|
+
*/
|
|
59
|
+
this.fileTypes = ['view', 'contents', 'download'];
|
|
55
60
|
this.handleDocumentItemClick = (event) => {
|
|
56
61
|
if (this.isUnavailable()) {
|
|
57
62
|
return;
|
|
@@ -111,21 +116,22 @@ const DocumentItemComponent = /*@__PURE__*/ proxyCustomElement(class DocumentIte
|
|
|
111
116
|
}
|
|
112
117
|
render() {
|
|
113
118
|
const isUnavailable = this.isUnavailable();
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
const image = this.getImage();
|
|
120
|
+
return (h(Host, { key: '7fc37bbc0185cdb38c837f2487c88f4d275d1c2f', id: String(this.item.file.id), class: {
|
|
121
|
+
'has-image': !!image,
|
|
116
122
|
'has-error': !!this.item.hasError,
|
|
117
|
-
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: '
|
|
123
|
+
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: 'da1329af4f1eac4617da054b5b02715b512631ff', image: image, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'a30361cfb76512065fe3cf1b513f31257cf115ee', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
|
|
118
124
|
}
|
|
119
125
|
renderBooleanInput() {
|
|
120
126
|
const id = this.getControlId();
|
|
121
127
|
if (this.type === 'radio') {
|
|
122
|
-
return (h("limel-radio-button", { id: id, label: this.item.
|
|
128
|
+
return (h("limel-radio-button", { id: id, label: this.item.file.filename, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
|
|
123
129
|
}
|
|
124
|
-
return (h("limel-checkbox", { id: id, label: this.item.
|
|
130
|
+
return (h("limel-checkbox", { id: id, label: this.item.file.filename, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
|
|
125
131
|
}
|
|
126
132
|
renderFileSize() {
|
|
127
|
-
var _a;
|
|
128
|
-
const formattedFileSize = formatBytes((_a = this.item) === null || _a === void 0 ? void 0 : _a.
|
|
133
|
+
var _a, _b;
|
|
134
|
+
const formattedFileSize = formatBytes((_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.file) === null || _b === void 0 ? void 0 : _b.size);
|
|
129
135
|
if (!formattedFileSize) {
|
|
130
136
|
return;
|
|
131
137
|
}
|
|
@@ -151,7 +157,7 @@ const DocumentItemComponent = /*@__PURE__*/ proxyCustomElement(class DocumentIte
|
|
|
151
157
|
this.interact.emit(Object.assign(Object.assign({}, this.item), { selected }));
|
|
152
158
|
}
|
|
153
159
|
getControlId() {
|
|
154
|
-
return `boolean-input-${String(this.item.id)}`;
|
|
160
|
+
return `boolean-input-${String(this.item.file.id)}`;
|
|
155
161
|
}
|
|
156
162
|
isUnavailable() {
|
|
157
163
|
var _a, _b;
|
|
@@ -165,13 +171,29 @@ const DocumentItemComponent = /*@__PURE__*/ proxyCustomElement(class DocumentIte
|
|
|
165
171
|
input.checked = false;
|
|
166
172
|
}
|
|
167
173
|
}
|
|
174
|
+
getImage() {
|
|
175
|
+
const href = this.hrefForFile();
|
|
176
|
+
if (!href) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
src: href,
|
|
181
|
+
alt: this.item.file.filename,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
hrefForFile() {
|
|
185
|
+
return ['preview', ...this.fileTypes]
|
|
186
|
+
.map((type) => this.item.file.getUrl(type))
|
|
187
|
+
.find(Boolean);
|
|
188
|
+
}
|
|
168
189
|
static get delegatesFocus() { return true; }
|
|
169
190
|
static get style() { return LimebbDocumentItemStyle0; }
|
|
170
191
|
}, [17, "limebb-document-item", {
|
|
171
192
|
"platform": [16],
|
|
172
193
|
"context": [16],
|
|
173
194
|
"item": [16],
|
|
174
|
-
"type": [513]
|
|
195
|
+
"type": [513],
|
|
196
|
+
"fileTypes": [16]
|
|
175
197
|
}]);
|
|
176
198
|
function defineCustomElement() {
|
|
177
199
|
if (typeof customElements === "undefined") {
|