@limetech/lime-crm-building-blocks 1.95.0 → 1.97.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 +14 -0
- package/dist/cjs/{_MapCache-2e84a981.js → _MapCache-8b125fbb.js} +0 -26
- package/dist/cjs/{_Uint8Array-1e99726d.js → _Uint8Array-95263550.js} +1 -12
- package/dist/cjs/_baseIsEqual-cb7951b0.js +496 -0
- package/dist/cjs/_defineProperty-40a6ad5d.js +15 -0
- package/dist/cjs/{get-1acf79ce.js → get-932b213e.js} +5 -4
- package/dist/cjs/isEqual-e77cce75.js +37 -0
- package/dist/cjs/isSymbol-5b36aeee.js +30 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/lime-query.types-bcb63a22.js +61 -0
- package/dist/cjs/limebb-component-config.cjs.entry.js +3 -2
- package/dist/cjs/limebb-document-item.cjs.entry.js +174 -0
- package/dist/cjs/limebb-document-picker.cjs.entry.js +82 -0
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +382 -150
- package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +278 -0
- package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +239 -0
- package/dist/cjs/limebb-limetype-field_2.cjs.entry.js +406 -0
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +13 -498
- 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-property-selector.cjs.entry.js +234 -0
- package/dist/cjs/limebb-response-format-item.cjs.entry.js +80 -0
- package/dist/cjs/limebb-text-editor.cjs.entry.js +22 -83
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/limetype-1fe0207f.js +90 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/property-resolution-fb42a46b.js +66 -0
- package/dist/cjs/random-string-aac0a74b.js +24 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/document-picker/document-item/document-item.css +64 -0
- package/dist/collection/components/document-picker/document-item/document-item.js +265 -0
- package/dist/collection/components/document-picker/document-item/document-item.types.js +1 -0
- package/dist/collection/components/document-picker/document-picker.css +139 -0
- package/dist/collection/components/document-picker/document-picker.js +304 -0
- package/dist/collection/components/document-picker/document.types.js +1 -0
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.css +121 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +257 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.css +39 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +246 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.css +104 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +220 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.css +107 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +212 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.css +123 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +237 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.css +48 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +457 -0
- package/dist/collection/components/lime-query-builder/filter-conversion.js +118 -21
- package/dist/collection/components/lime-query-builder/lime-query-builder.css +30 -17
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +233 -28
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +435 -0
- package/dist/collection/components/lime-query-builder/property-selection-format.js +158 -0
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.css +8 -0
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +422 -0
- package/dist/collection/components/lime-query-builder/response-format-editor.css +72 -0
- package/dist/collection/components/lime-query-builder/response-format-editor.js +249 -0
- package/dist/collection/components/lime-query-builder/response-format-item.css +61 -0
- package/dist/collection/components/lime-query-builder/response-format-item.js +208 -0
- 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/collection/util/format-bytes.js +36 -0
- package/dist/components/_MapCache.js +2 -27
- package/dist/components/_Uint8Array.js +2 -12
- package/dist/components/_baseIsEqual.js +494 -0
- package/dist/components/_defineProperty.js +13 -0
- package/dist/components/document-item.js +190 -0
- package/dist/components/feed-item-thumbnail-file-info.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/get.js +2 -1
- package/dist/components/isEqual.js +35 -0
- package/dist/components/isSymbol.js +28 -0
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/lime-query-filter-and.js +408 -0
- package/dist/components/lime-query-filter-comparison.js +152 -0
- package/dist/components/lime-query-value-input.js +266 -0
- package/dist/components/limebb-document-item.d.ts +11 -0
- package/dist/components/limebb-document-item.js +6 -0
- package/dist/components/limebb-document-picker.d.ts +11 -0
- package/dist/components/limebb-document-picker.js +111 -0
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -1
- package/dist/components/limebb-info-tile.js +1 -1
- package/dist/components/limebb-lime-query-builder.js +441 -149
- package/dist/components/limebb-lime-query-filter-and.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-and.js +6 -0
- package/dist/components/limebb-lime-query-filter-comparison.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-comparison.js +6 -0
- package/dist/components/limebb-lime-query-filter-expression.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-expression.js +6 -0
- package/dist/components/limebb-lime-query-filter-not.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-not.js +6 -0
- package/dist/components/limebb-lime-query-filter-or.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-or.js +6 -0
- package/dist/components/limebb-lime-query-value-input.d.ts +11 -0
- package/dist/components/limebb-lime-query-value-input.js +6 -0
- package/dist/components/limebb-limetype-field.d.ts +11 -0
- package/dist/components/limebb-limetype-field.js +6 -0
- package/dist/components/limebb-locale-picker.js +8 -493
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-percentage-visualizer.js +2 -2
- package/dist/components/limebb-property-selector.d.ts +11 -0
- package/dist/components/limebb-property-selector.js +6 -0
- package/dist/components/limebb-response-format-editor.d.ts +11 -0
- package/dist/components/limebb-response-format-editor.js +6 -0
- package/dist/components/limebb-response-format-item.d.ts +11 -0
- package/dist/components/limebb-response-format-item.js +6 -0
- package/dist/components/limebb-text-editor.js +8 -69
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +184 -0
- package/dist/components/limetype.js +85 -0
- package/dist/components/live-docs-info.js +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/property-selector.js +317 -0
- package/dist/components/random-string.js +22 -0
- package/dist/components/response-format-editor.js +278 -0
- package/dist/components/response-format-item.js +104 -0
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/{_MapCache-6484495d.js → _MapCache-af496e9d.js} +2 -27
- package/dist/esm/{_Uint8Array-e5cac922.js → _Uint8Array-d6ebd526.js} +3 -13
- package/dist/esm/_baseIsEqual-28053b81.js +494 -0
- package/dist/esm/_defineProperty-e6a185c3.js +13 -0
- package/dist/esm/{get-f9e0b2e1.js → get-3e42932b.js} +2 -1
- package/dist/esm/isEqual-57d0c223.js +35 -0
- package/dist/esm/isSymbol-1c5f65cc.js +28 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/lime-query.types-f72355e1.js +59 -0
- package/dist/esm/limebb-component-config.entry.js +3 -2
- package/dist/esm/limebb-document-item.entry.js +170 -0
- package/dist/esm/limebb-document-picker.entry.js +78 -0
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +379 -147
- package/dist/esm/limebb-lime-query-filter-and_5.entry.js +270 -0
- package/dist/esm/limebb-lime-query-value-input.entry.js +235 -0
- package/dist/esm/limebb-limetype-field_2.entry.js +401 -0
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +9 -494
- 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-property-selector.entry.js +230 -0
- package/dist/esm/limebb-response-format-item.entry.js +76 -0
- package/dist/esm/limebb-text-editor.entry.js +8 -69
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/limetype-6e7552a7.js +85 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/property-resolution-fde2375e.js +63 -0
- package/dist/esm/random-string-f6ef6fbf.js +22 -0
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-85e11ff7.entry.js → p-00da9b24.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-123190c3.js +1 -0
- package/dist/lime-crm-building-blocks/p-244ee55b.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-35897ec3.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d6a07ea4.entry.js → p-3932077b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-3b0a15ec.js +1 -0
- package/dist/lime-crm-building-blocks/p-4a82410e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-a694aae5.entry.js → p-50d3d61a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +1 -0
- package/dist/lime-crm-building-blocks/p-60971d64.js +1 -0
- package/dist/lime-crm-building-blocks/{p-a44f543c.entry.js → p-61282e1a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-6c1146ca.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-16199127.entry.js → p-79d4668a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-7e6fb4af.js +1 -0
- package/dist/lime-crm-building-blocks/{p-88cc5b66.entry.js → p-82d33d43.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7db8652e.entry.js → p-8c4eb49f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-9d25ed5a.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-8dce83ad.entry.js → p-9d9f25da.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-a659d55a.js +1 -0
- package/dist/lime-crm-building-blocks/p-b7c72179.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-baf4e428.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-516210d4.entry.js → p-beb0d164.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-d298b34e.js +1 -0
- package/dist/lime-crm-building-blocks/{p-047c89de.entry.js → p-d89c44ad.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-e0ab1554.js +1 -0
- package/dist/lime-crm-building-blocks/{p-46d2f604.entry.js → p-e35299e0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8ef39ab8.entry.js → p-e9d23ef7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ef8a5266.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-abf1c197.entry.js → p-f52125a0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-fbda77a7.js +1 -0
- package/dist/lime-crm-building-blocks/p-fe2b91d9.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d6af09a8.entry.js → p-ff0b244b.entry.js} +1 -1
- package/dist/types/components/document-picker/document-item/document-item.d.ts +46 -0
- package/dist/types/components/document-picker/document-item/document-item.types.d.ts +37 -0
- package/dist/types/components/document-picker/document-picker.d.ts +80 -0
- package/dist/types/components/document-picker/document.types.d.ts +2 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +56 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +64 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +53 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +54 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +55 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-value-input.d.ts +92 -0
- package/dist/types/components/lime-query-builder/filter-conversion.d.ts +18 -0
- package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +30 -8
- package/dist/types/components/lime-query-builder/limetype-field/limetype-field.d.ts +96 -0
- package/dist/types/components/lime-query-builder/property-selection-format.d.ts +23 -0
- package/dist/types/components/lime-query-builder/property-selector/property-selector.d.ts +71 -0
- package/dist/types/components/lime-query-builder/response-format-editor.d.ts +57 -0
- package/dist/types/components/lime-query-builder/response-format-item.d.ts +46 -0
- package/dist/types/components.d.ts +1795 -114
- package/dist/types/util/format-bytes.d.ts +20 -0
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-29346b1a.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4ccce5cc.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7ef3bace.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-8044ffbd.js +0 -1
- package/dist/lime-crm-building-blocks/p-92ec9205.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-bcc23575.js +0 -1
- package/dist/lime-crm-building-blocks/p-c40a3f4b.js +0 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-96dd111f.js';
|
|
2
|
+
import { T as Te } from './index.esm-d8fdeb18.js';
|
|
3
|
+
import { a as getPropertyFromPath, g as getNormalizedProperties } from './property-resolution-fde2375e.js';
|
|
4
|
+
|
|
5
|
+
const propertySelectorCss = ":host(limebb-property-selector){display:block}limel-menu{display:block;width:100%}";
|
|
6
|
+
const LimebbPropertySelectorStyle0 = propertySelectorCss;
|
|
7
|
+
|
|
8
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
11
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
+
else
|
|
13
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
14
|
+
if (d = decorators[i])
|
|
15
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
const PropertySelector = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
registerInstance(this, hostRef);
|
|
21
|
+
this.change = createEvent(this, "change", 7);
|
|
22
|
+
/**
|
|
23
|
+
* Label for the input
|
|
24
|
+
*/
|
|
25
|
+
this.label = 'Property';
|
|
26
|
+
/**
|
|
27
|
+
* Whether the field is required
|
|
28
|
+
*/
|
|
29
|
+
this.required = false;
|
|
30
|
+
this.isOpen = false;
|
|
31
|
+
this.navigationPath = '';
|
|
32
|
+
this.menuItems = [];
|
|
33
|
+
this.handleChipSetWrapperClick = (event) => {
|
|
34
|
+
// Stop all clicks on the chip-set from bubbling
|
|
35
|
+
// This prevents the menu from opening when clicking chip remove buttons
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
};
|
|
38
|
+
this.handleChipSetFocus = () => {
|
|
39
|
+
// Open menu when the chip-set input receives focus
|
|
40
|
+
// This happens when user clicks to type/edit
|
|
41
|
+
if (!this.isOpen) {
|
|
42
|
+
this.navigationPath = this.value || '';
|
|
43
|
+
this.loadMenuItems();
|
|
44
|
+
this.isOpen = true;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
this.handleSelect = (event) => {
|
|
48
|
+
event.stopPropagation();
|
|
49
|
+
const selectedPath = event.detail.value;
|
|
50
|
+
if (!selectedPath) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// Check if this is a complete path (leaf property, not a relation)
|
|
54
|
+
const property = getPropertyFromPath(this.limetypes, this.limetype, selectedPath);
|
|
55
|
+
if (property === null || property === void 0 ? void 0 : property.relation) {
|
|
56
|
+
// This is a relation - update navigation but don't emit
|
|
57
|
+
this.navigationPath = selectedPath;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
// This is a leaf property - emit and close
|
|
61
|
+
this.change.emit(selectedPath);
|
|
62
|
+
this.isOpen = false;
|
|
63
|
+
this.navigationPath = '';
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
this.handleNavigateMenu = (event) => {
|
|
67
|
+
var _a;
|
|
68
|
+
event.stopPropagation();
|
|
69
|
+
if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) {
|
|
70
|
+
// Update navigation path when drilling down
|
|
71
|
+
this.navigationPath = event.detail.value;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
this.handleCancel = () => {
|
|
75
|
+
this.isOpen = false;
|
|
76
|
+
this.navigationPath = '';
|
|
77
|
+
};
|
|
78
|
+
this.handleChipSetChange = (event) => {
|
|
79
|
+
event.stopPropagation();
|
|
80
|
+
const detail = event.detail;
|
|
81
|
+
// Handle both single chip and array of chips
|
|
82
|
+
if (!detail) {
|
|
83
|
+
// Clear all was clicked
|
|
84
|
+
this.change.emit('');
|
|
85
|
+
this.navigationPath = '';
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
// Convert to array if it's a single chip
|
|
89
|
+
const chips = Array.isArray(detail) ? detail : [detail];
|
|
90
|
+
if (chips.length === 0) {
|
|
91
|
+
// All chips removed
|
|
92
|
+
this.change.emit('');
|
|
93
|
+
this.navigationPath = '';
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
// A chip was removed - emit the last remaining chip's value
|
|
97
|
+
const lastChip = chips.at(-1);
|
|
98
|
+
if (lastChip) {
|
|
99
|
+
this.change.emit(lastChip.value);
|
|
100
|
+
}
|
|
101
|
+
this.navigationPath = '';
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
if (!this.limetype || !this.limetypes) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
const chips = this.getChipsForPath(this.navigationPath || this.value || '');
|
|
110
|
+
return (h("limel-menu", { items: this.menuItems, open: this.isOpen, emptyResultMessage: "No available properties", surfaceWidth: "inherit-from-trigger", openDirection: "bottom-end", onSelect: this.handleSelect, onNavigateMenu: this.handleNavigateMenu, onCancel: this.handleCancel }, h("div", { slot: "trigger" }, h("div", { onClick: this.handleChipSetWrapperClick }, h("limel-chip-set", { type: "input", label: this.label, value: chips, required: this.required, helperText: this.helperText, delimiter: "\u203A", maxItems: 1, onChange: this.handleChipSetChange, onFocus: this.handleChipSetFocus })))));
|
|
111
|
+
}
|
|
112
|
+
loadMenuItems() {
|
|
113
|
+
// Get the limetype we're currently navigating in
|
|
114
|
+
const currentLimetype = this.getCurrentLimetype();
|
|
115
|
+
if (!currentLimetype) {
|
|
116
|
+
this.menuItems = [];
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.menuItems = this.createMenuItems(currentLimetype, '');
|
|
120
|
+
}
|
|
121
|
+
getCurrentLimetype() {
|
|
122
|
+
if (!this.navigationPath) {
|
|
123
|
+
return this.limetypes[this.limetype];
|
|
124
|
+
}
|
|
125
|
+
// Get the limetype at the current navigation path
|
|
126
|
+
const property = getPropertyFromPath(this.limetypes, this.limetype, this.navigationPath);
|
|
127
|
+
if (property === null || property === void 0 ? void 0 : property.relation) {
|
|
128
|
+
return property.relation.getLimetype();
|
|
129
|
+
}
|
|
130
|
+
return this.limetypes[this.limetype];
|
|
131
|
+
}
|
|
132
|
+
createMenuItems(limetype, pathPrefix) {
|
|
133
|
+
const results = [];
|
|
134
|
+
if (!limetype) {
|
|
135
|
+
return results;
|
|
136
|
+
}
|
|
137
|
+
const normalizedProperties = getNormalizedProperties(limetype);
|
|
138
|
+
for (const [propName, property] of Object.entries(normalizedProperties)) {
|
|
139
|
+
// Skip hasMany and hasAndBelongsToMany relations
|
|
140
|
+
if (property.type === 'hasmany' ||
|
|
141
|
+
property.type === 'hasandbelongstomany') {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
const fullPath = pathPrefix
|
|
145
|
+
? `${pathPrefix}.${propName}`
|
|
146
|
+
: propName;
|
|
147
|
+
const isRelation = !!property.relation;
|
|
148
|
+
let items;
|
|
149
|
+
if (isRelation && property.relation) {
|
|
150
|
+
// Create submenu for relation (only belongsto at this point)
|
|
151
|
+
const relatedLimetype = property.relation.getLimetype();
|
|
152
|
+
if (relatedLimetype) {
|
|
153
|
+
items = async () => this.createMenuItems(relatedLimetype, fullPath);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
results.push({
|
|
157
|
+
text: property.localname || propName,
|
|
158
|
+
secondaryText: this.getSecondaryText(property),
|
|
159
|
+
icon: this.getIconForProperty(property),
|
|
160
|
+
value: fullPath,
|
|
161
|
+
items: items,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
if (results.length === 0) {
|
|
165
|
+
return [
|
|
166
|
+
{
|
|
167
|
+
text: 'No available properties',
|
|
168
|
+
value: '',
|
|
169
|
+
disabled: true,
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
return results;
|
|
174
|
+
}
|
|
175
|
+
getSecondaryText(property) {
|
|
176
|
+
var _a;
|
|
177
|
+
if (property.relation) {
|
|
178
|
+
const relatedLimetype = property.relation.getLimetype();
|
|
179
|
+
return ((_a = relatedLimetype === null || relatedLimetype === void 0 ? void 0 : relatedLimetype.localname) === null || _a === void 0 ? void 0 : _a.singular) || 'Object';
|
|
180
|
+
}
|
|
181
|
+
// Return the property type as the secondary text
|
|
182
|
+
return property.type.charAt(0).toUpperCase() + property.type.slice(1);
|
|
183
|
+
}
|
|
184
|
+
getIconForProperty(property) {
|
|
185
|
+
if (property.relation) {
|
|
186
|
+
return {
|
|
187
|
+
name: 'link',
|
|
188
|
+
color: 'rgb(var(--color-sky-default))',
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
// Use generic property icon
|
|
192
|
+
return {
|
|
193
|
+
name: 'decision',
|
|
194
|
+
color: 'rgb(var(--color-gray-default))',
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
getChipsForPath(path) {
|
|
198
|
+
if (!path) {
|
|
199
|
+
return [];
|
|
200
|
+
}
|
|
201
|
+
const parts = path.split('.');
|
|
202
|
+
const chips = [];
|
|
203
|
+
let currentLimetype = this.limetypes[this.limetype];
|
|
204
|
+
let currentPath = '';
|
|
205
|
+
for (const part of parts) {
|
|
206
|
+
currentPath = currentPath ? `${currentPath}.${part}` : part;
|
|
207
|
+
// Use getNormalizedProperties to include _id and _timestamp
|
|
208
|
+
const normalizedProperties = getNormalizedProperties(currentLimetype);
|
|
209
|
+
const property = normalizedProperties[part];
|
|
210
|
+
if (property) {
|
|
211
|
+
chips.push({
|
|
212
|
+
id: currentPath,
|
|
213
|
+
text: property.localname || part,
|
|
214
|
+
icon: this.getIconForProperty(property),
|
|
215
|
+
value: currentPath,
|
|
216
|
+
});
|
|
217
|
+
if (property.relation) {
|
|
218
|
+
currentLimetype = property.relation.getLimetype();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return chips;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
__decorate([
|
|
226
|
+
Te()
|
|
227
|
+
], PropertySelector.prototype, "limetypes", void 0);
|
|
228
|
+
PropertySelector.style = LimebbPropertySelectorStyle0;
|
|
229
|
+
|
|
230
|
+
export { PropertySelector as limebb_property_selector };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-96dd111f.js';
|
|
2
|
+
|
|
3
|
+
const responseFormatItemCss = ":host(limebb-response-format-item){display:flex;flex-direction:column;gap:0.5rem;width:100%}.property-controls{display:flex;flex-direction:row;align-items:flex-start;gap:0.5rem;width:100%}.property-path{flex-grow:1;min-width:min(20rem, 100%)}.control-buttons{flex-shrink:0;display:flex;flex-direction:row;gap:0.25rem;align-items:center;padding-top:0.5rem}.control-buttons limel-icon-button{opacity:0.6;transition:opacity 0.2s ease}.control-buttons limel-icon-button:hover{opacity:1}.control-buttons limel-icon-button.has-value{opacity:1;color:rgb(var(--color-blue-default))}.alias,.description{padding-left:1.5rem;width:calc(100% - 1.5rem);max-width:40rem}@media (max-width: 768px){.property-controls{flex-direction:column;gap:0.5rem}.control-buttons{padding-top:0}.alias,.description{padding-left:0;width:100%}}";
|
|
4
|
+
const LimebbResponseFormatItemStyle0 = responseFormatItemCss;
|
|
5
|
+
|
|
6
|
+
const ResponseFormatItem = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.itemChange = createEvent(this, "itemChange", 7);
|
|
10
|
+
this.showAliasInput = false;
|
|
11
|
+
this.showDescriptionInput = false;
|
|
12
|
+
this.handlePathChange = (event) => {
|
|
13
|
+
event.stopPropagation();
|
|
14
|
+
this.itemChange.emit(Object.assign(Object.assign({}, this.item), { path: event.detail }));
|
|
15
|
+
};
|
|
16
|
+
this.toggleAliasInput = () => {
|
|
17
|
+
this.showAliasInput = !this.showAliasInput;
|
|
18
|
+
};
|
|
19
|
+
this.toggleDescriptionInput = () => {
|
|
20
|
+
this.showDescriptionInput = !this.showDescriptionInput;
|
|
21
|
+
};
|
|
22
|
+
this.handleAliasChange = (event) => {
|
|
23
|
+
event.stopPropagation();
|
|
24
|
+
const alias = event.detail;
|
|
25
|
+
this.itemChange.emit(Object.assign(Object.assign({}, this.item), { alias: alias || undefined }));
|
|
26
|
+
};
|
|
27
|
+
this.handleDescriptionChange = (event) => {
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
const description = event.detail;
|
|
30
|
+
this.itemChange.emit(Object.assign(Object.assign({}, this.item), { description: description || undefined }));
|
|
31
|
+
};
|
|
32
|
+
this.handleAliasBlur = () => {
|
|
33
|
+
if (this.item.alias) {
|
|
34
|
+
const trimmed = this.item.alias.trim();
|
|
35
|
+
if (trimmed !== this.item.alias) {
|
|
36
|
+
this.itemChange.emit(Object.assign(Object.assign({}, this.item), { alias: trimmed || undefined }));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
this.handleDescriptionBlur = () => {
|
|
41
|
+
if (this.item.description) {
|
|
42
|
+
const trimmed = this.item.description.trim();
|
|
43
|
+
if (trimmed !== this.item.description) {
|
|
44
|
+
this.itemChange.emit(Object.assign(Object.assign({}, this.item), { description: trimmed || undefined }));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
this.handleRemove = () => {
|
|
49
|
+
this.itemChange.emit(null);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
componentWillLoad() {
|
|
53
|
+
// Initialize visibility based on whether fields have values
|
|
54
|
+
this.showAliasInput = !!this.item.alias;
|
|
55
|
+
this.showDescriptionInput = !!this.item.description;
|
|
56
|
+
}
|
|
57
|
+
componentWillUpdate() {
|
|
58
|
+
// Keep inputs visible if they have values
|
|
59
|
+
if (this.item.alias && !this.showAliasInput) {
|
|
60
|
+
this.showAliasInput = true;
|
|
61
|
+
}
|
|
62
|
+
if (this.item.description && !this.showDescriptionInput) {
|
|
63
|
+
this.showDescriptionInput = true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return [
|
|
68
|
+
h("div", { key: '842362f9a9cfd48420409e53f0a8dc84048e383f', class: "property-controls" }, h("div", { key: '9f1b758ca0a6123e9acdff4ee4e1480b1938bb8b', class: "property-path" }, h("limebb-property-selector", { key: '3f4ca007b7131c94c57af2883638e19657e0a876', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: this.item.path, required: true, onChange: this.handlePathChange })), h("div", { key: 'c0141d13b1af44df29ad6502817330da6fe62283', class: "control-buttons" }, h("limel-icon-button", { key: '24aa415a1a1d91a46a251fb947fe071cd8f6e36f', icon: "add_tag", label: "Add alias", class: this.item.alias ? 'has-value' : '', onClick: this.toggleAliasInput }), h("limel-icon-button", { key: '4fa60916e5e179361c9fa6ab49fa06ce4c88ca66', icon: "comments", label: "Add description", class: this.item.description ? 'has-value' : '', onClick: this.toggleDescriptionInput }), h("limel-icon-button", { key: '03db71a330ccc905e37ffb9d8375bb6b774812b9', icon: "trash", label: "Remove property", onClick: this.handleRemove }))),
|
|
69
|
+
this.showAliasInput && (h("div", { key: 'bebaa718fd408dfdcce2f4cfe479e1b56325df86', class: "alias" }, h("limel-input-field", { key: '2a7c1e65558ef4f4892f854da04d7e083847defd', label: "Alias", value: this.item.alias || '', placeholder: "Custom property name...", onChange: this.handleAliasChange, onBlur: this.handleAliasBlur }))),
|
|
70
|
+
this.showDescriptionInput && (h("div", { key: 'b32b9b5006a9a48e44f5725f070f9bd376c8b15f', class: "description" }, h("limel-input-field", { key: '98f63d70cc77c68cbf535d33210a8d5e0c15cf72', label: "Description", value: this.item.description || '', placeholder: "Describe this property for AI...", onChange: this.handleDescriptionChange, onBlur: this.handleDescriptionBlur }))),
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
ResponseFormatItem.style = LimebbResponseFormatItemStyle0;
|
|
75
|
+
|
|
76
|
+
export { ResponseFormatItem as limebb_response_format_item };
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-96dd111f.js';
|
|
2
|
-
import {
|
|
2
|
+
import { c, W as We, H as He, T as Te } from './index.esm-d8fdeb18.js';
|
|
3
3
|
import { A as ARROW_DOWN, a as ESCAPE, b as ARROW_UP, E as ENTER, T as TAB } from './keycodes-58a1fcc9.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { b as arrayLikeKeys, k as keys, c as getSymbols, s as stubArray, a as arrayPush, d as baseGetAllKeys, U as Uint8Array, S as Stack, g as getAllKeys } from './_Uint8Array-d6ebd526.js';
|
|
5
|
+
import { d as defineProperty } from './_defineProperty-e6a185c3.js';
|
|
6
|
+
import { e as eq } from './_MapCache-af496e9d.js';
|
|
6
7
|
import { d as isObject, r as root, S as Symbol, a as isObjectLike, i as isArray } from './_Map-aede53b6.js';
|
|
7
8
|
import { d as isPrototype, i as isArrayLike, o as overArg, g as getTag, h as baseUnary, n as nodeUtil, a as isBuffer } from './_getTag-d02a95fa.js';
|
|
9
|
+
import { c as createRandomString } from './random-string-f6ef6fbf.js';
|
|
10
|
+
import { h as hasLabel, a as hasHasManyRelation, g as getRelationProperty } from './limetype-6e7552a7.js';
|
|
8
11
|
import { i as isNonNull } from './non-null-5a66a269.js';
|
|
12
|
+
import { i as isSymbol } from './isSymbol-1c5f65cc.js';
|
|
9
13
|
|
|
10
14
|
/** Used to match a single whitespace character. */
|
|
11
15
|
var reWhitespace = /\s/;
|
|
@@ -1091,71 +1095,6 @@ function getUpdatedItems(items, highlightedItemIndex) {
|
|
|
1091
1095
|
});
|
|
1092
1096
|
}
|
|
1093
1097
|
|
|
1094
|
-
/* eslint-disable sonarjs/pseudo-random */
|
|
1095
|
-
const createRandomString = () => {
|
|
1096
|
-
var _a;
|
|
1097
|
-
if (!('crypto' in window) ||
|
|
1098
|
-
typeof ((_a = window.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) !== 'function') {
|
|
1099
|
-
return legacyCreateRandomString();
|
|
1100
|
-
}
|
|
1101
|
-
return 'a_' + crypto.randomUUID(); // ids must start with letters
|
|
1102
|
-
};
|
|
1103
|
-
function legacyCreateRandomString() {
|
|
1104
|
-
const USE_HEX = 36;
|
|
1105
|
-
const SKIP_LEADING_ZERODOT = 2;
|
|
1106
|
-
const ASCII_A = 97;
|
|
1107
|
-
const NUMBER_OF_LETTERS = 26;
|
|
1108
|
-
return (String.fromCodePoint(ASCII_A + Math.floor(Math.random() * NUMBER_OF_LETTERS)) +
|
|
1109
|
-
Math.random()
|
|
1110
|
-
.toString(USE_HEX)
|
|
1111
|
-
.slice(Math.max(0, SKIP_LEADING_ZERODOT)) +
|
|
1112
|
-
Math.random().toString(USE_HEX).slice(Math.max(0, SKIP_LEADING_ZERODOT)));
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Whether the given object has the given label or not.
|
|
1117
|
-
*
|
|
1118
|
-
* @param object the object to check label for
|
|
1119
|
-
* @param label the label to check for
|
|
1120
|
-
* @returns true if the object has the label
|
|
1121
|
-
*/
|
|
1122
|
-
function hasLabel(object, label) {
|
|
1123
|
-
return object.label === label;
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* Whether the given property is a hasmany relation or not.
|
|
1127
|
-
*
|
|
1128
|
-
* @param property the property to check
|
|
1129
|
-
* @returns true if the property is a hasmany relation
|
|
1130
|
-
*/
|
|
1131
|
-
function isManyRelation(property) {
|
|
1132
|
-
return De(property) && !Me(property);
|
|
1133
|
-
}
|
|
1134
|
-
/**
|
|
1135
|
-
* Finds a relation property on the given limetype that is related to a
|
|
1136
|
-
* limetype with the given label.
|
|
1137
|
-
*
|
|
1138
|
-
* @param limetype the limetype to search for the relation property
|
|
1139
|
-
* @param label the label of the target limetype to match
|
|
1140
|
-
* @returns the relation property or undefined
|
|
1141
|
-
*/
|
|
1142
|
-
function getRelationProperty(limetype, label) {
|
|
1143
|
-
return Object.values(limetype.properties).find((property) => property &&
|
|
1144
|
-
property.relation &&
|
|
1145
|
-
hasLabel(property.relation.getLimetype(), label));
|
|
1146
|
-
}
|
|
1147
|
-
/**
|
|
1148
|
-
* Whether the limetype has a hasmany relation of a limetype with the given label
|
|
1149
|
-
*
|
|
1150
|
-
* @param limetype the limetype
|
|
1151
|
-
* @param relatedLabel the label of the related limetype
|
|
1152
|
-
* @returns true if the limetype has the hasmany relation
|
|
1153
|
-
*/
|
|
1154
|
-
function hasHasManyRelation(limetype, relatedLabel) {
|
|
1155
|
-
const property = getRelationProperty(limetype, relatedLabel);
|
|
1156
|
-
return !!property && isManyRelation(property);
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
1098
|
/**
|
|
1160
1099
|
* Get the limetypes that should be available for mentions
|
|
1161
1100
|
*
|
|
@@ -1831,7 +1770,7 @@ const LimeBBTextEditor = class {
|
|
|
1831
1770
|
}
|
|
1832
1771
|
render() {
|
|
1833
1772
|
return [
|
|
1834
|
-
h("limel-text-editor", { key: '
|
|
1773
|
+
h("limel-text-editor", { key: 'de672970cfd1048cc232eeadd527153421f28f36', ref: (el) => (this.textEditor = el), tabindex: this.disabled ? -1 : 0, value: this.value, contentType: this.contentType, customElements: this.registeredCustomElements, "aria-disabled": this.disabled, language: this.language, triggers: this.registeredTriggers, onTriggerStart: this.handleTriggerStart, onTriggerStop: this.handleTriggerStop, onTriggerChange: this.handleTriggerChange, onImagePasted: this.handleImagePasted, onMetadataChange: this.handleMetadataChange, ui: this.ui, allowResize: this.allowResize, required: this.required, disabled: this.disabled, readonly: this.readonly, helperText: this.helperText, placeholder: this.placeholder, label: this.label, invalid: this.invalid }),
|
|
1835
1774
|
this.renderPicker(),
|
|
1836
1775
|
];
|
|
1837
1776
|
}
|
|
@@ -35,7 +35,7 @@ const TrendIndicator = class {
|
|
|
35
35
|
this.numValue = this.parseValue(this.value);
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: 'a0f458a114e5698f40899c44d532643f50bef249', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'fe9a66d44f3155d6594da5e7e16ce9a33907f800', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: 'daff3b1e6ec7098e7353bca3664179fd9c2594c1', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
|
|
39
39
|
}
|
|
40
40
|
renderVisualization() {
|
|
41
41
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { D as De, M as Me } from './index.esm-d8fdeb18.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get the color for a limetype from its UI configuration
|
|
5
|
+
*
|
|
6
|
+
* @param limetype the limetype
|
|
7
|
+
* @returns the color string (CSS variable or RGB)
|
|
8
|
+
*/
|
|
9
|
+
function getColor(limetype) {
|
|
10
|
+
var _a;
|
|
11
|
+
const limetypeWithUI = limetype;
|
|
12
|
+
const color = ((_a = limetypeWithUI === null || limetypeWithUI === void 0 ? void 0 : limetypeWithUI.ui) === null || _a === void 0 ? void 0 : _a.color) || 'rgb(var(--color-gray-default))';
|
|
13
|
+
return getLimeColor(color);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Convert lime color references to CSS variables
|
|
17
|
+
*
|
|
18
|
+
* @param color the color string
|
|
19
|
+
* @returns CSS-ready color string
|
|
20
|
+
*/
|
|
21
|
+
function getLimeColor(color) {
|
|
22
|
+
if (color.startsWith('lime-')) {
|
|
23
|
+
return `var(--${color})`;
|
|
24
|
+
}
|
|
25
|
+
return color;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the icon configuration for a limetype
|
|
29
|
+
*
|
|
30
|
+
* @param limetype the limetype
|
|
31
|
+
* @returns Icon object with name and color
|
|
32
|
+
*/
|
|
33
|
+
function getIcon(limetype) {
|
|
34
|
+
var _a;
|
|
35
|
+
const limetypeWithUI = limetype;
|
|
36
|
+
return {
|
|
37
|
+
name: ((_a = limetypeWithUI === null || limetypeWithUI === void 0 ? void 0 : limetypeWithUI.ui) === null || _a === void 0 ? void 0 : _a.icon) || 'decision',
|
|
38
|
+
color: getColor(limetype),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether the given object has the given label or not.
|
|
43
|
+
*
|
|
44
|
+
* @param object the object to check label for
|
|
45
|
+
* @param label the label to check for
|
|
46
|
+
* @returns true if the object has the label
|
|
47
|
+
*/
|
|
48
|
+
function hasLabel(object, label) {
|
|
49
|
+
return object.label === label;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Whether the given property is a hasmany relation or not.
|
|
53
|
+
*
|
|
54
|
+
* @param property the property to check
|
|
55
|
+
* @returns true if the property is a hasmany relation
|
|
56
|
+
*/
|
|
57
|
+
function isManyRelation(property) {
|
|
58
|
+
return De(property) && !Me(property);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Finds a relation property on the given limetype that is related to a
|
|
62
|
+
* limetype with the given label.
|
|
63
|
+
*
|
|
64
|
+
* @param limetype the limetype to search for the relation property
|
|
65
|
+
* @param label the label of the target limetype to match
|
|
66
|
+
* @returns the relation property or undefined
|
|
67
|
+
*/
|
|
68
|
+
function getRelationProperty(limetype, label) {
|
|
69
|
+
return Object.values(limetype.properties).find((property) => property &&
|
|
70
|
+
property.relation &&
|
|
71
|
+
hasLabel(property.relation.getLimetype(), label));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Whether the limetype has a hasmany relation of a limetype with the given label
|
|
75
|
+
*
|
|
76
|
+
* @param limetype the limetype
|
|
77
|
+
* @param relatedLabel the label of the related limetype
|
|
78
|
+
* @returns true if the limetype has the hasmany relation
|
|
79
|
+
*/
|
|
80
|
+
function hasHasManyRelation(limetype, relatedLabel) {
|
|
81
|
+
const property = getRelationProperty(limetype, relatedLabel);
|
|
82
|
+
return !!property && isManyRelation(property);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { hasHasManyRelation as a, getIcon as b, getRelationProperty as g, hasLabel as h };
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["limebb-feed",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-limeobject-file-viewer",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-text-editor",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":["watchFormInfo"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-dashboard-widget",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-lime-query-builder",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"limetypes":[32],"mode":[32],"codeValue":[32]}]]],["limebb-loader",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["limebb-locale-picker",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":["valueChanged"]}]]],["limebb-trend-indicator",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":["valueChanged"]}]]],["limebb-navigation-button_2",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-feed-item-thumbnail-file-info",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["limebb-feed-timeline-item",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-group",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-text-editor-picker",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["limebb-date-picker",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-live-docs-info",[[1,"limebb-live-docs-info"]]],["limebb-notification-item",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
8
|
+
return bootstrapLazy(JSON.parse("[[\"limebb-lime-query-builder\",[[1,\"limebb-lime-query-builder\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"label\":[1],\"limetypes\":[32],\"mode\":[32],\"codeValue\":[32],\"limetype\":[32],\"filter\":[32],\"internalResponseFormat\":[32],\"limit\":[32],\"activeLimetype\":[32]}]]],[\"limebb-feed\",[[1,\"limebb-feed\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"emptyStateMessage\":[1,\"empty-state-message\"],\"heading\":[1],\"loading\":[4],\"minutesOfProximity\":[2,\"minutes-of-proximity\"],\"totalCount\":[2,\"total-count\"],\"direction\":[513],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"],\"highlightedItemId\":[8,\"highlighted-item-id\"]},null,{\"highlightedItemId\":[\"highlightedItemIdChanged\"]}]]],[\"limebb-kanban\",[[1,\"limebb-kanban\",{\"platform\":[16],\"context\":[16],\"groups\":[16]}]]],[\"limebb-chat-list\",[[1,\"limebb-chat-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[516],\"isTypingIndicatorVisible\":[516,\"is-typing-indicator-visible\"],\"lastVisitedTimestamp\":[513,\"last-visited-timestamp\"],\"order\":[513]},null,{\"items\":[\"handleItemsChange\"]}]]],[\"limebb-limeobject-file-viewer\",[[1,\"limebb-limeobject-file-viewer\",{\"platform\":[16],\"context\":[16],\"property\":[1],\"fileTypes\":[16],\"limeobject\":[32],\"limetype\":[32]}]]],[\"limebb-text-editor\",[[1,\"limebb-text-editor\",{\"platform\":[16],\"context\":[16],\"allowMentioning\":[4,\"allow-mentioning\"],\"contentType\":[1,\"content-type\"],\"language\":[513],\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"required\":[516],\"selectedContext\":[16],\"ui\":[513],\"allowResize\":[4,\"allow-resize\"],\"value\":[1],\"draftIdentifier\":[1,\"draft-identifier\"],\"triggerMap\":[16],\"customElements\":[16],\"allowInlineImages\":[4,\"allow-inline-images\"],\"items\":[32],\"highlightedItemIndex\":[32],\"editorPickerQuery\":[32],\"searchableLimetypes\":[32],\"isPickerOpen\":[32],\"isSearching\":[32]},null,{\"isPickerOpen\":[\"watchOpen\"],\"editorPickerQuery\":[\"watchQuery\"]}]]],[\"limebb-date-range\",[[1,\"limebb-date-range\",{\"platform\":[16],\"context\":[16],\"startTime\":[16],\"endTime\":[16],\"startTimeLabel\":[1,\"start-time-label\"],\"endTimeLabel\":[1,\"end-time-label\"],\"language\":[1],\"timeFormat\":[1,\"time-format\"],\"type\":[1]}]]],[\"limebb-document-picker\",[[1,\"limebb-document-picker\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[516],\"required\":[516],\"type\":[513]}]]],[\"limebb-info-tile-currency-format\",[[1,\"limebb-info-tile-currency-format\",{\"platform\":[16],\"context\":[16],\"value\":[16]}]]],[\"limebb-notification-list\",[[1,\"limebb-notification-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[4],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"]},null,{\"items\":[\"handleItemsChange\"]}]]],[\"limebb-browser\",[[17,\"limebb-browser\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"layout\":[1],\"filter\":[32]}]]],[\"limebb-component-config\",[[1,\"limebb-component-config\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"],\"formInfo\":[16],\"type\":[1],\"nameField\":[1,\"name-field\"],\"configComponent\":[32],\"configViewType\":[32]},null,{\"formInfo\":[\"watchFormInfo\"],\"configComponent\":[\"watchconfigComponent\"]}]]],[\"limebb-component-picker\",[[1,\"limebb-component-picker\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"tags\":[16],\"value\":[1],\"copyLabel\":[1,\"copy-label\"],\"hideCopyButton\":[4,\"hide-copy-button\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-dashboard-widget\",[[1,\"limebb-dashboard-widget\",{\"heading\":[513],\"subheading\":[513],\"supportingText\":[513,\"supporting-text\"],\"icon\":[513]}]]],[\"limebb-icon-picker\",[[1,\"limebb-icon-picker\",{\"value\":[1],\"required\":[4],\"readonly\":[4],\"invalid\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-info-tile\",[[1,\"limebb-info-tile\",{\"platform\":[16],\"context\":[16],\"filterId\":[513,\"filter-id\"],\"disabled\":[4],\"icon\":[513],\"label\":[1],\"prefix\":[1],\"suffix\":[1],\"propertyName\":[1,\"property-name\"],\"aggregateOperator\":[1,\"aggregate-operator\"],\"format\":[16],\"config\":[32],\"filters\":[32],\"value\":[32],\"loading\":[32],\"error\":[32]},null,{\"filterId\":[\"watchFilterId\"],\"propertyName\":[\"watchPropertyName\"],\"aggregateOperator\":[\"watchAggregateOperator\"]}]]],[\"limebb-info-tile-date-format\",[[1,\"limebb-info-tile-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-decimal-format\",[[1,\"limebb-info-tile-decimal-format\",{\"value\":[16]}]]],[\"limebb-info-tile-format\",[[1,\"limebb-info-tile-format\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"value\":[16]}]]],[\"limebb-info-tile-relative-date-format\",[[1,\"limebb-info-tile-relative-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-unit-format\",[[1,\"limebb-info-tile-unit-format\",{\"value\":[16]}]]],[\"limebb-loader\",[[1,\"limebb-loader\",{\"platform\":[16],\"context\":[16]}]]],[\"limebb-locale-picker\",[[1,\"limebb-locale-picker\",{\"platform\":[16],\"context\":[16],\"value\":[1],\"required\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"],\"readonly\":[4],\"multipleChoice\":[4,\"multiple-choice\"],\"allLanguages\":[32]}]]],[\"limebb-mention\",[[1,\"limebb-mention\",{\"limetype\":[1],\"objectid\":[2],\"limeobject\":[32]}]]],[\"limebb-mention-group-counter\",[[1,\"limebb-mention-group-counter\",{\"count\":[2],\"limetype\":[16],\"helperLabel\":[1,\"helper-label\"]}]]],[\"limebb-percentage-visualizer\",[[1,\"limebb-percentage-visualizer\",{\"platform\":[16],\"context\":[16],\"value\":[520],\"rangeMax\":[514,\"range-max\"],\"rangeMin\":[514,\"range-min\"],\"multiplier\":[514],\"label\":[513],\"invalid\":[516],\"required\":[516],\"helperText\":[513,\"helper-text\"],\"reducePresence\":[516,\"reduce-presence\"],\"displayPercentageColors\":[516,\"display-percentage-colors\"]},null,{\"value\":[\"valueChanged\"]}]]],[\"limebb-trend-indicator\",[[1,\"limebb-trend-indicator\",{\"platform\":[16],\"context\":[16],\"value\":[520],\"formerValue\":[514,\"former-value\"],\"suffix\":[513],\"label\":[513],\"invalid\":[516],\"required\":[516],\"helperText\":[513,\"helper-text\"],\"reducePresence\":[516,\"reduce-presence\"]},null,{\"value\":[\"valueChanged\"]}]]],[\"limebb-feed-timeline-item\",[[1,\"limebb-feed-timeline-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"ui\":[513],\"helperText\":[1,\"helper-text\"],\"hasError\":[516,\"has-error\"],\"isBundled\":[516,\"is-bundled\"],\"headingCanExpand\":[32],\"isHeadingExpanded\":[32],\"showMore\":[32],\"isTall\":[32]}]]],[\"limebb-kanban-group\",[[1,\"limebb-kanban-group\",{\"platform\":[16],\"context\":[16],\"identifier\":[1],\"heading\":[513],\"help\":[1],\"items\":[16],\"summary\":[1],\"loading\":[516],\"totalCount\":[514,\"total-count\"]}]]],[\"limebb-text-editor-picker\",[[1,\"limebb-text-editor-picker\",{\"items\":[16],\"open\":[516],\"isSearching\":[4,\"is-searching\"],\"emptyMessage\":[1,\"empty-message\"]},null,{\"open\":[\"watchOpen\"]}]]],[\"limebb-currency-picker\",[[1,\"limebb-currency-picker\",{\"platform\":[16],\"context\":[16],\"label\":[513],\"currencies\":[16],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"value\":[1]}]]],[\"limebb-date-picker\",[[1,\"limebb-date-picker\",{\"platform\":[16],\"context\":[16],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"value\":[1],\"type\":[513]}]]],[\"limebb-document-item\",[[17,\"limebb-document-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"type\":[513]}]]],[\"limebb-live-docs-info\",[[1,\"limebb-live-docs-info\"]]],[\"limebb-notification-item\",[[1,\"limebb-notification-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-limetype-field_2\",[[1,\"limebb-response-format-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"items\":[32]}],[0,\"limebb-limetype-field\",{\"platform\":[16],\"context\":[16],\"label\":[513],\"required\":[516],\"readonly\":[516],\"disabled\":[516],\"value\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[4],\"limetypes\":[16],\"propertyFields\":[16],\"fieldName\":[1,\"field-name\"],\"formInfo\":[16]}]]],[\"limebb-kanban-item\",[[1,\"limebb-kanban-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-response-format-item\",[[1,\"limebb-response-format-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16],\"showAliasInput\":[32],\"showDescriptionInput\":[32]}]]],[\"limebb-chat-item_2\",[[1,\"limebb-chat-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"helperText\":[1,\"helper-text\"],\"hasError\":[516,\"has-error\"]}],[1,\"limebb-typing-indicator\"]]],[\"limebb-feed-item-thumbnail-file-info\",[[1,\"limebb-feed-item-thumbnail-file-info\",{\"description\":[1]}]]],[\"limebb-lime-query-value-input\",[[1,\"limebb-lime-query-value-input\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"propertyPath\":[1,\"property-path\"],\"operator\":[1],\"value\":[8],\"label\":[1],\"limetypes\":[32],\"inputMode\":[32]}]]],[\"limebb-empty-state\",[[1,\"limebb-empty-state\",{\"heading\":[513],\"value\":[513],\"icon\":[16]}]]],[\"limebb-property-selector\",[[1,\"limebb-property-selector\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[1],\"label\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"limetypes\":[32],\"isOpen\":[32],\"navigationPath\":[32]}]]],[\"limebb-navigation-button_2\",[[1,\"limebb-summary-popover\",{\"triggerDelay\":[514,\"trigger-delay\"],\"heading\":[513],\"subheading\":[513],\"image\":[16],\"icon\":[513],\"value\":[1],\"openDirection\":[513,\"open-direction\"],\"popoverMaxWidth\":[513,\"popover-max-width\"],\"popoverMaxHeight\":[513,\"popover-max-height\"],\"actions\":[16],\"isPopoverOpen\":[32]}],[17,\"limebb-navigation-button\",{\"href\":[513],\"tooltipLabel\":[513,\"tooltip-label\"],\"tooltipHelperLabel\":[513,\"tooltip-helper-label\"],\"type\":[513]}]]],[\"limebb-lime-query-filter-and_5\",[[1,\"limebb-lime-query-filter-and\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-expression\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-not\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-or\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-comparison\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]]]"), options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get normalized properties for a limetype
|
|
3
|
+
* Adds system properties (_id, _timestamp, etc.) that map to the actual limeobject attributes
|
|
4
|
+
* @param limetype The limetype to normalize
|
|
5
|
+
* @returns Normalized properties with system properties prefixed with underscore
|
|
6
|
+
*/
|
|
7
|
+
function getNormalizedProperties(limetype) {
|
|
8
|
+
if (!(limetype === null || limetype === void 0 ? void 0 : limetype.properties)) {
|
|
9
|
+
return {};
|
|
10
|
+
}
|
|
11
|
+
const properties = Object.assign({}, limetype.properties);
|
|
12
|
+
// System properties that are exposed by the backend
|
|
13
|
+
// Map from internal property name to API property name
|
|
14
|
+
const systemProperties = {
|
|
15
|
+
id: '_id',
|
|
16
|
+
timestamp: '_timestamp',
|
|
17
|
+
descriptive: '_descriptive',
|
|
18
|
+
createduser: '_createduser',
|
|
19
|
+
createdtime: '_createdtime',
|
|
20
|
+
updateduser: '_updateduser',
|
|
21
|
+
};
|
|
22
|
+
// Find and normalize system properties by name
|
|
23
|
+
for (const [propName, systemPropName] of Object.entries(systemProperties)) {
|
|
24
|
+
const property = properties[propName];
|
|
25
|
+
if (property) {
|
|
26
|
+
properties[systemPropName] = property;
|
|
27
|
+
delete properties[propName];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return properties;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get property from limetype by path (e.g., "company.name")
|
|
34
|
+
* Supports relation traversal with dot-notation
|
|
35
|
+
* @param limetypes
|
|
36
|
+
* @param limetype
|
|
37
|
+
* @param path
|
|
38
|
+
*/
|
|
39
|
+
function getPropertyFromPath(limetypes, limetype, path) {
|
|
40
|
+
if (!path || !limetype || !limetypes) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const parts = path.split('.');
|
|
44
|
+
let currentType = limetypes[limetype];
|
|
45
|
+
let property;
|
|
46
|
+
for (const part of parts) {
|
|
47
|
+
if (!currentType) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const normalizedProperties = getNormalizedProperties(currentType);
|
|
51
|
+
property = normalizedProperties[part];
|
|
52
|
+
if (!property) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
// If this is a relation, get the related limetype for next iteration
|
|
56
|
+
if (property.relation) {
|
|
57
|
+
currentType = property.relation.getLimetype();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return property;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { getPropertyFromPath as a, getNormalizedProperties as g };
|