@limetech/lime-crm-building-blocks 1.99.0 → 1.100.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.
Files changed (106) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +52 -216
  4. package/dist/cjs/{limebb-limetype-field_2.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +72 -1
  5. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
  6. package/dist/cjs/{limebb-lime-query-filter-group_4.cjs.entry.js → limebb-lime-query-filter-group_3.cjs.entry.js} +5 -231
  7. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  8. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  10. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  11. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  13. package/dist/cjs/limebb-property-selector.cjs.entry.js +234 -0
  14. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/collection-manifest.json +1 -2
  18. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.css +5 -0
  19. package/dist/collection/components/lime-query-builder/expressions/{lime-query-filter-and.js → lime-query-filter-builder.js} +59 -83
  20. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
  21. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +1 -1
  22. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
  23. package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +7 -7
  24. package/dist/collection/components/lime-query-builder/lime-query-builder.js +9 -39
  25. package/dist/collection/components/lime-query-builder/lime-query-validation.js +46 -19
  26. package/dist/collection/components/lime-query-builder/lime-query.types.js +1 -57
  27. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  28. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  29. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  30. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  31. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  32. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  33. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  34. package/dist/collection/components/text-editor/text-editor.js +1 -1
  35. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  36. package/dist/components/lime-query-filter-builder.js +129 -0
  37. package/dist/components/lime-query-filter-comparison.js +1 -1
  38. package/dist/components/lime-query-filter-expression.js +2 -2
  39. package/dist/components/lime-query-value-input.js +2 -2
  40. package/dist/components/limebb-lime-query-builder.js +60 -218
  41. package/dist/components/limebb-lime-query-filter-builder.d.ts +11 -0
  42. package/dist/components/limebb-lime-query-filter-builder.js +6 -0
  43. package/dist/components/limebb-locale-picker.js +1 -1
  44. package/dist/components/limebb-mention-group-counter.js +2 -2
  45. package/dist/components/limebb-percentage-visualizer.js +2 -2
  46. package/dist/components/limebb-text-editor.js +1 -1
  47. package/dist/components/limebb-trend-indicator.js +1 -1
  48. package/dist/components/limetype-field.js +1 -1
  49. package/dist/components/live-docs-info.js +2 -2
  50. package/dist/components/notification-item.js +1 -1
  51. package/dist/components/summary-popover.js +3 -3
  52. package/dist/esm/lime-crm-building-blocks.js +1 -1
  53. package/dist/esm/limebb-lime-query-builder.entry.js +53 -217
  54. package/dist/esm/{limebb-limetype-field_2.entry.js → limebb-lime-query-filter-builder_3.entry.js} +73 -3
  55. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
  56. package/dist/esm/{limebb-lime-query-filter-group_4.entry.js → limebb-lime-query-filter-group_3.entry.js} +7 -232
  57. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  58. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  59. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  60. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  61. package/dist/esm/limebb-notification-item.entry.js +1 -1
  62. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  63. package/dist/esm/limebb-property-selector.entry.js +230 -0
  64. package/dist/esm/limebb-text-editor.entry.js +1 -1
  65. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  68. package/dist/lime-crm-building-blocks/{p-b9b954d9.entry.js → p-1034b4a5.entry.js} +1 -1
  69. package/dist/lime-crm-building-blocks/{p-93cadc1e.entry.js → p-2048ac67.entry.js} +1 -1
  70. package/dist/lime-crm-building-blocks/p-323c49bc.entry.js +1 -0
  71. package/dist/lime-crm-building-blocks/{p-631ca5a5.entry.js → p-58782467.entry.js} +1 -1
  72. package/dist/lime-crm-building-blocks/{p-aa646df7.entry.js → p-6aa216ec.entry.js} +1 -1
  73. package/dist/lime-crm-building-blocks/{p-9cac4de2.entry.js → p-76d81eee.entry.js} +1 -1
  74. package/dist/lime-crm-building-blocks/{p-e8946134.entry.js → p-79b8b09b.entry.js} +1 -1
  75. package/dist/lime-crm-building-blocks/{p-569c86b5.entry.js → p-8581245a.entry.js} +1 -1
  76. package/dist/lime-crm-building-blocks/p-89a6c396.entry.js +1 -0
  77. package/dist/lime-crm-building-blocks/{p-36ea13c0.entry.js → p-8fb2e192.entry.js} +1 -1
  78. package/dist/lime-crm-building-blocks/{p-3122ea05.entry.js → p-b57dafef.entry.js} +1 -1
  79. package/dist/lime-crm-building-blocks/p-f22b66f6.entry.js +1 -0
  80. package/dist/lime-crm-building-blocks/p-f79e354b.entry.js +1 -0
  81. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-builder.d.ts +50 -0
  82. package/dist/types/components/lime-query-builder/expressions/lime-query-value-input.d.ts +2 -3
  83. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +1 -6
  84. package/dist/types/components/lime-query-builder/lime-query.types.d.ts +0 -72
  85. package/dist/types/components.d.ts +58 -198
  86. package/package.json +1 -1
  87. package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +0 -80
  88. package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +0 -68
  89. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.css +0 -121
  90. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.css +0 -123
  91. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +0 -237
  92. package/dist/collection/components/lime-query-builder/filter-conversion.js +0 -255
  93. package/dist/components/limebb-lime-query-filter-and.d.ts +0 -11
  94. package/dist/components/limebb-lime-query-filter-and.js +0 -135
  95. package/dist/components/limebb-lime-query-filter-or.d.ts +0 -11
  96. package/dist/components/limebb-lime-query-filter-or.js +0 -123
  97. package/dist/esm/limebb-lime-query-filter-and.entry.js +0 -76
  98. package/dist/esm/limebb-lime-query-filter-or.entry.js +0 -64
  99. package/dist/lime-crm-building-blocks/p-03accd53.entry.js +0 -1
  100. package/dist/lime-crm-building-blocks/p-4715210d.entry.js +0 -1
  101. package/dist/lime-crm-building-blocks/p-5f7644b5.entry.js +0 -1
  102. package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +0 -1
  103. package/dist/lime-crm-building-blocks/p-91732502.entry.js +0 -1
  104. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +0 -57
  105. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +0 -56
  106. package/dist/types/components/lime-query-builder/filter-conversion.d.ts +0 -31
@@ -80,7 +80,7 @@ const LimeQueryFilterGroupComponent = class {
80
80
  }
81
81
  render() {
82
82
  const subheading = this.getSubheading();
83
- return (index.h("div", { key: '43a1d99fd896e3ad49dd97594e54bccaf74c3aa0', class: "expression" }, subheading && (index.h("limel-header", { key: '534eb0a3db2f0194e8a28e2fb071beb545f38458', subheading: subheading, onClick: this.handleToggleOperator, class: "clickable-header" })), index.h("ul", { key: '9d29d98ab034bf2878e7dc19828bc045dbdd492f' }, this.expression.exp.map(this.renderChildExpression), index.h("li", { key: '44b266c8aeb390b8a68b3e08a51a0760a6421f93', class: "add-button" }, this.renderAddButton(), this.renderAddGroupButton()))));
83
+ return (index.h("div", { key: '0ed5a1403d9641926cd6d474910cedf9c7bba89e', class: "expression" }, subheading && (index.h("limel-header", { key: 'ea88a97df09f0fb5a21bf9afb4745256a611c7f8', subheading: subheading, onClick: this.handleToggleOperator, class: "clickable-header" })), index.h("ul", { key: 'cfbcdd539e84f79bf1d778e075cd3317d7409647' }, this.expression.exp.map(this.renderChildExpression), index.h("li", { key: 'ec443459245bf5852920bb4d3e341f2490a7b75b', class: "add-button" }, this.renderAddButton(), this.renderAddGroupButton()))));
84
84
  }
85
85
  getSubheading() {
86
86
  if (this.expression.exp.length <= 1) {
@@ -137,7 +137,7 @@ const LimeQueryFilterNotComponent = class {
137
137
  };
138
138
  }
139
139
  render() {
140
- return (index.h("div", { key: 'f1dfd7fd4ec7dc1873841d1c8b3d2bb6677634fd', class: "expression" }, this.label && index.h("limel-header", { key: '91e1b754f6e45c70f49bf2a770898a590defaf22', heading: this.label }), index.h("limebb-lime-query-filter-expression", { key: 'bf42f3c71521a413e5ecc49a8e0d6401b34384a2', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
140
+ return (index.h("div", { key: '9ab4a6b1e99668a0bcee3e3ba8cbbbe5185222e0', class: "expression" }, this.label && index.h("limel-header", { key: '85e997b0f96db306dd7a4433da959a74303aacfa', heading: this.label }), index.h("limebb-lime-query-filter-expression", { key: '14f634e125ee78f2aa70c7537b270a31699ba7c2', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
141
141
  }
142
142
  };
143
143
  LimeQueryFilterNotComponent.style = LimebbLimeQueryFilterNotStyle0;
@@ -145,7 +145,7 @@ LimeQueryFilterNotComponent.style = LimebbLimeQueryFilterNotStyle0;
145
145
  const limeQueryValueInputCss = ":host{display:block}.value-input-container{display:flex;flex-direction:row;align-items:flex-start;gap:0.5rem;width:100%}.mode-toggle{flex-shrink:0;margin-top:0.5rem;opacity:0.7;transition:opacity 0.2s ease}.mode-toggle:hover{opacity:1}.placeholder-input{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.placeholder-preview{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;background-color:rgba(var(--color-blue-light), 0.1);border-radius:var(--border-radius-small);font-size:0.875rem;color:rgb(var(--color-blue-default));border-left:3px solid rgb(var(--color-blue-default))}.placeholder-preview limel-icon{flex-shrink:0;color:rgb(var(--color-blue-default))}.placeholder-preview span{font-family:var(--font-monospace);word-break:break-all}";
146
146
  const LimebbLimeQueryValueInputStyle0 = limeQueryValueInputCss;
147
147
 
148
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
148
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
149
149
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
150
150
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
151
151
  r = Reflect.decorate(decorators, target, key, desc);
@@ -287,7 +287,7 @@ const LimeQueryValueInput = class {
287
287
  }
288
288
  renderValueInputByType() {
289
289
  // Special handling for IN operator - always use chip set for arrays
290
- if (this.operator === 'IN') {
290
+ if (this.operator === index_esm.Zt.IN) {
291
291
  return this.renderMultiValueInput();
292
292
  }
293
293
  const property = this.getProperty();
@@ -367,237 +367,11 @@ const LimeQueryValueInput = class {
367
367
  return propertyResolution.getPropertyFromPath(this.limetypes, this.limetype, this.propertyPath);
368
368
  }
369
369
  };
370
- __decorate$1([
370
+ __decorate([
371
371
  index_esm.Te()
372
372
  ], LimeQueryValueInput.prototype, "limetypes", void 0);
373
373
  LimeQueryValueInput.style = LimebbLimeQueryValueInputStyle0;
374
374
 
375
- const propertySelectorCss = ":host(limebb-property-selector){display:block}limel-menu{display:block;width:100%}";
376
- const LimebbPropertySelectorStyle0 = propertySelectorCss;
377
-
378
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
379
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
380
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
381
- r = Reflect.decorate(decorators, target, key, desc);
382
- else
383
- for (var i = decorators.length - 1; i >= 0; i--)
384
- if (d = decorators[i])
385
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
386
- return c > 3 && r && Object.defineProperty(target, key, r), r;
387
- };
388
- const PropertySelector = class {
389
- constructor(hostRef) {
390
- index.registerInstance(this, hostRef);
391
- this.change = index.createEvent(this, "change", 7);
392
- /**
393
- * Label for the input
394
- */
395
- this.label = 'Property';
396
- /**
397
- * Whether the field is required
398
- */
399
- this.required = false;
400
- this.isOpen = false;
401
- this.navigationPath = '';
402
- this.menuItems = [];
403
- this.handleChipSetWrapperClick = (event) => {
404
- // Stop all clicks on the chip-set from bubbling
405
- // This prevents the menu from opening when clicking chip remove buttons
406
- event.stopPropagation();
407
- };
408
- this.handleChipSetFocus = () => {
409
- // Open menu when the chip-set input receives focus
410
- // This happens when user clicks to type/edit
411
- if (!this.isOpen) {
412
- this.navigationPath = this.value || '';
413
- this.loadMenuItems();
414
- this.isOpen = true;
415
- }
416
- };
417
- this.handleSelect = (event) => {
418
- event.stopPropagation();
419
- const selectedPath = event.detail.value;
420
- if (!selectedPath) {
421
- return;
422
- }
423
- // Check if this is a complete path (leaf property, not a relation)
424
- const property = propertyResolution.getPropertyFromPath(this.limetypes, this.limetype, selectedPath);
425
- if (property === null || property === void 0 ? void 0 : property.relation) {
426
- // This is a relation - update navigation but don't emit
427
- this.navigationPath = selectedPath;
428
- }
429
- else {
430
- // This is a leaf property - emit and close
431
- this.change.emit(selectedPath);
432
- this.isOpen = false;
433
- this.navigationPath = '';
434
- }
435
- };
436
- this.handleNavigateMenu = (event) => {
437
- var _a;
438
- event.stopPropagation();
439
- if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) {
440
- // Update navigation path when drilling down
441
- this.navigationPath = event.detail.value;
442
- }
443
- };
444
- this.handleCancel = () => {
445
- this.isOpen = false;
446
- this.navigationPath = '';
447
- };
448
- this.handleChipSetChange = (event) => {
449
- event.stopPropagation();
450
- const detail = event.detail;
451
- // Handle both single chip and array of chips
452
- if (!detail) {
453
- // Clear all was clicked
454
- this.change.emit('');
455
- this.navigationPath = '';
456
- return;
457
- }
458
- // Convert to array if it's a single chip
459
- const chips = Array.isArray(detail) ? detail : [detail];
460
- if (chips.length === 0) {
461
- // All chips removed
462
- this.change.emit('');
463
- this.navigationPath = '';
464
- }
465
- else {
466
- // A chip was removed - emit the last remaining chip's value
467
- const lastChip = chips.at(-1);
468
- if (lastChip) {
469
- this.change.emit(lastChip.value);
470
- }
471
- this.navigationPath = '';
472
- }
473
- };
474
- }
475
- render() {
476
- if (!this.limetype || !this.limetypes) {
477
- return null;
478
- }
479
- const chips = this.getChipsForPath(this.navigationPath || this.value || '');
480
- return (index.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 }, index.h("div", { slot: "trigger" }, index.h("div", { onClick: this.handleChipSetWrapperClick }, index.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 })))));
481
- }
482
- loadMenuItems() {
483
- // Get the limetype we're currently navigating in
484
- const currentLimetype = this.getCurrentLimetype();
485
- if (!currentLimetype) {
486
- this.menuItems = [];
487
- return;
488
- }
489
- this.menuItems = this.createMenuItems(currentLimetype, '');
490
- }
491
- getCurrentLimetype() {
492
- if (!this.navigationPath) {
493
- return this.limetypes[this.limetype];
494
- }
495
- // Get the limetype at the current navigation path
496
- const property = propertyResolution.getPropertyFromPath(this.limetypes, this.limetype, this.navigationPath);
497
- if (property === null || property === void 0 ? void 0 : property.relation) {
498
- return property.relation.getLimetype();
499
- }
500
- return this.limetypes[this.limetype];
501
- }
502
- createMenuItems(limetype, pathPrefix) {
503
- const results = [];
504
- if (!limetype) {
505
- return results;
506
- }
507
- const normalizedProperties = propertyResolution.getNormalizedProperties(limetype);
508
- for (const [propName, property] of Object.entries(normalizedProperties)) {
509
- // Skip hasMany and hasAndBelongsToMany relations
510
- if (property.type === 'hasmany' ||
511
- property.type === 'hasandbelongstomany') {
512
- continue;
513
- }
514
- const fullPath = pathPrefix
515
- ? `${pathPrefix}.${propName}`
516
- : propName;
517
- const isRelation = !!property.relation;
518
- let items;
519
- if (isRelation && property.relation) {
520
- // Create submenu for relation (only belongsto at this point)
521
- const relatedLimetype = property.relation.getLimetype();
522
- if (relatedLimetype) {
523
- items = async () => this.createMenuItems(relatedLimetype, fullPath);
524
- }
525
- }
526
- results.push({
527
- text: property.localname || propName,
528
- secondaryText: this.getSecondaryText(property),
529
- icon: this.getIconForProperty(property),
530
- value: fullPath,
531
- items: items,
532
- });
533
- }
534
- if (results.length === 0) {
535
- return [
536
- {
537
- text: 'No available properties',
538
- value: '',
539
- disabled: true,
540
- },
541
- ];
542
- }
543
- return results;
544
- }
545
- getSecondaryText(property) {
546
- var _a;
547
- if (property.relation) {
548
- const relatedLimetype = property.relation.getLimetype();
549
- return ((_a = relatedLimetype === null || relatedLimetype === void 0 ? void 0 : relatedLimetype.localname) === null || _a === void 0 ? void 0 : _a.singular) || 'Object';
550
- }
551
- // Return the property type as the secondary text
552
- return property.type.charAt(0).toUpperCase() + property.type.slice(1);
553
- }
554
- getIconForProperty(property) {
555
- if (property.relation) {
556
- return {
557
- name: 'link',
558
- color: 'rgb(var(--color-sky-default))',
559
- };
560
- }
561
- // Use generic property icon
562
- return {
563
- name: 'decision',
564
- color: 'rgb(var(--color-gray-default))',
565
- };
566
- }
567
- getChipsForPath(path) {
568
- if (!path) {
569
- return [];
570
- }
571
- const parts = path.split('.');
572
- const chips = [];
573
- let currentLimetype = this.limetypes[this.limetype];
574
- let currentPath = '';
575
- for (const part of parts) {
576
- currentPath = currentPath ? `${currentPath}.${part}` : part;
577
- // Use getNormalizedProperties to include _id and _timestamp
578
- const normalizedProperties = propertyResolution.getNormalizedProperties(currentLimetype);
579
- const property = normalizedProperties[part];
580
- if (property) {
581
- chips.push({
582
- id: currentPath,
583
- text: property.localname || part,
584
- icon: this.getIconForProperty(property),
585
- value: currentPath,
586
- });
587
- if (property.relation) {
588
- currentLimetype = property.relation.getLimetype();
589
- }
590
- }
591
- }
592
- return chips;
593
- }
594
- };
595
- __decorate([
596
- index_esm.Te()
597
- ], PropertySelector.prototype, "limetypes", void 0);
598
- PropertySelector.style = LimebbPropertySelectorStyle0;
599
-
600
375
  exports.limebb_lime_query_filter_group = LimeQueryFilterGroupComponent;
601
376
  exports.limebb_lime_query_filter_not = LimeQueryFilterNotComponent;
602
377
  exports.limebb_lime_query_value_input = LimeQueryValueInput;
603
- exports.limebb_property_selector = PropertySelector;
@@ -13,8 +13,8 @@ const LiveDocsInfo = class {
13
13
  }
14
14
  render() {
15
15
  return [
16
- index.h("div", { key: '849694495956b6afbdfeac8aa7de680e1ab03450', class: "header" }, index.h("limel-icon", { key: '84117fdfff949d6b41b9ec3f2b3ec73f21e5be7b', name: "not_showing_video_frames" }), index.h("h2", { key: '90f1738815699808c6353707b4f366d8a2c661ac' }, "Viewing this file type requires ", index.h("em", { key: 'ef09921e893851f06b756e1e2777847a7e4bd563' }, "Live Docs"))),
17
- index.h("p", { key: 'a835a0e1cabd84d7509167b3331878807b083130' }, index.h("em", { key: '3f9ce9e473f33b89adfeb3b143e46cabb6feb1d4' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", index.h("a", { key: 'f3e683b041ddd66e6f23514d9bb5f3faf80f4c3a', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
16
+ index.h("div", { key: 'f215884110f6647cf6c0b501d6bec3d0475c7eb5', class: "header" }, index.h("limel-icon", { key: '483ac1d1166621d9ec91d430b58fe37d720ef740', name: "not_showing_video_frames" }), index.h("h2", { key: 'c9d8894b11a48ebecb3cac470df3b292e41f7c8e' }, "Viewing this file type requires ", index.h("em", { key: 'cc8b9bf7005a24ec608e7e14d86fe5047c543251' }, "Live Docs"))),
17
+ index.h("p", { key: '091075e3ffebbd89142b0466474977e05a6f8086' }, index.h("em", { key: 'b7393f26c3a1e5737b920389a8dab5ca5d5f591c' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", index.h("a", { key: '67f751f807d209c7bf5c752bda39f4e4911b332b', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
18
18
  ];
19
19
  }
20
20
  };
@@ -1133,7 +1133,7 @@ const LocalePicker = class {
1133
1133
  const value = this.value;
1134
1134
  selectedOptions = options.find((option) => option.value === value);
1135
1135
  }
1136
- return (index.h("limel-select", { key: '5b3491e9dd6725186c4a2795e7893de43457e147', value: selectedOptions, options: sortBy$1(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
1136
+ return (index.h("limel-select", { key: 'd8592dd9e39e3dba64e2ee11cd223a66138ef57d', value: selectedOptions, options: sortBy$1(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
1137
1137
  }
1138
1138
  };
1139
1139
 
@@ -15,8 +15,8 @@ const MentionGroupCounter = class {
15
15
  render() {
16
16
  const label = this.getLabel();
17
17
  return [
18
- index.h("span", { key: 'dcd5792c82409e75e149e263fc7b4864e195a387', id: this.tooltipId }, label),
19
- index.h("limel-tooltip", { key: '2c17e50ac616348df3a98da324b6538891cff75c', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
18
+ index.h("span", { key: '32727487e0750dad1e08b94915af9b33e562ba9d', id: this.tooltipId }, label),
19
+ index.h("limel-tooltip", { key: 'a9c062dca4f2f46fb187c902de8ecab4993e456d', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
20
20
  ];
21
21
  }
22
22
  getLabel() {
@@ -124,14 +124,14 @@ const SummaryPopover = class {
124
124
  top: '0.125rem',
125
125
  right: '0.125rem',
126
126
  };
127
- return (index.h("limel-popover", { key: '1681bf3578fb29886f68070e3e07397d1e312dc1', style: {
127
+ return (index.h("limel-popover", { key: '2fb3afb6c2a05cfbd4e1991b3204c5b495c20c03', style: {
128
128
  '--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
129
- }, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, index.h("div", { key: '1e2daa75c518f4949a7ca6fdd0ff29bc1a6d529e', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, index.h("slot", { key: '9d1a9b69db8ac1c4cfddd62fb9949c98700e61b7', name: "trigger" }), index.h("div", { key: '95fcc70f46106c426ae191b6a8d66c7d7a025ca9', class: "opening-countdown-indicator" })), index.h("limel-card", { key: '9294ae443aa9f279c3c01f0af48ca6a2d0d1409f', style: {
129
+ }, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, index.h("div", { key: 'fbd08fbebaed580db3aaaf3b1bbba4e52605bced', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, index.h("slot", { key: 'd16285c72329080ecde42bc6f7c3966f27a66968', name: "trigger" }), index.h("div", { key: '77c127616635768db8012adf936c56f75d2bccb3', class: "opening-countdown-indicator" })), index.h("limel-card", { key: '2d3c9a55b1292945422af4783b29d37ea9570fde', style: {
130
130
  'max-width': this.popoverMaxWidth,
131
131
  'max-height': this.popoverMaxHeight,
132
132
  'min-width': '7rem',
133
133
  'min-height': '3rem',
134
- }, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, index.h("limebb-navigation-button", { key: 'b26fecf7c748fcd82fea453ece55189bcd1302ef', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
134
+ }, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, index.h("limebb-navigation-button", { key: '234309cf2f82f6493a5d72944d320a902618c83b', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
135
135
  }
136
136
  };
137
137
  SummaryPopover.currentOpenPopover = null;
@@ -60,7 +60,7 @@ const NotificationListItem = class {
60
60
  }
61
61
  render() {
62
62
  var _a, _b;
63
- return (index.h(index.Host, { key: '39801fd8e10f1dc228741df48561cad3c59d81d7', id: this.item.id, class: {
63
+ return (index.h(index.Host, { key: 'bcbac9d93025efeaf1d6f6cde3ab7632b527b5a0', id: this.item.id, class: {
64
64
  'is-clickable': this.isItemClickable(),
65
65
  'is-read': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.read),
66
66
  'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
@@ -78,11 +78,11 @@ const PercentageVisualizer = class {
78
78
  render() {
79
79
  const normalizedValue = this.getNormalizedValue();
80
80
  const zeroPoint = this.getZeroPointPosition();
81
- return (index.h(index.Host, { key: '069ab0188df35e32bca3fe7c000d2c5c874012a5', class: this.getContainerClassList(), style: {
81
+ return (index.h(index.Host, { key: '85bcdba3b1ba660f32eebcdc0e46dd8652ae9b48', class: this.getContainerClassList(), style: {
82
82
  '--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
83
83
  '--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
84
84
  '--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
85
- } }, index.h("limel-notched-outline", { key: 'f6e544a1859f3166ee540435c687415bbfd5de1d', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, index.h("div", { key: '348f345b2212b3da15c0e081385a5fee76317ebe', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
85
+ } }, index.h("limel-notched-outline", { key: 'ef664323cf5a8a6a091394e8dffa291959c9e3f3', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, index.h("div", { key: '20b55181865c993677fec5fc86a66ea9cd817cd0', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
86
86
  }
87
87
  renderVisualization() {
88
88
  if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
@@ -0,0 +1,234 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-ff255a0d.js');
6
+ const index_esm = require('./index.esm-d785eb6e.js');
7
+ const propertyResolution = require('./property-resolution-fb42a46b.js');
8
+
9
+ const propertySelectorCss = ":host(limebb-property-selector){display:block}limel-menu{display:block;width:100%}";
10
+ const LimebbPropertySelectorStyle0 = propertySelectorCss;
11
+
12
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
13
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
15
+ r = Reflect.decorate(decorators, target, key, desc);
16
+ else
17
+ for (var i = decorators.length - 1; i >= 0; i--)
18
+ if (d = decorators[i])
19
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
20
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
21
+ };
22
+ const PropertySelector = class {
23
+ constructor(hostRef) {
24
+ index.registerInstance(this, hostRef);
25
+ this.change = index.createEvent(this, "change", 7);
26
+ /**
27
+ * Label for the input
28
+ */
29
+ this.label = 'Property';
30
+ /**
31
+ * Whether the field is required
32
+ */
33
+ this.required = false;
34
+ this.isOpen = false;
35
+ this.navigationPath = '';
36
+ this.menuItems = [];
37
+ this.handleChipSetWrapperClick = (event) => {
38
+ // Stop all clicks on the chip-set from bubbling
39
+ // This prevents the menu from opening when clicking chip remove buttons
40
+ event.stopPropagation();
41
+ };
42
+ this.handleChipSetFocus = () => {
43
+ // Open menu when the chip-set input receives focus
44
+ // This happens when user clicks to type/edit
45
+ if (!this.isOpen) {
46
+ this.navigationPath = this.value || '';
47
+ this.loadMenuItems();
48
+ this.isOpen = true;
49
+ }
50
+ };
51
+ this.handleSelect = (event) => {
52
+ event.stopPropagation();
53
+ const selectedPath = event.detail.value;
54
+ if (!selectedPath) {
55
+ return;
56
+ }
57
+ // Check if this is a complete path (leaf property, not a relation)
58
+ const property = propertyResolution.getPropertyFromPath(this.limetypes, this.limetype, selectedPath);
59
+ if (property === null || property === void 0 ? void 0 : property.relation) {
60
+ // This is a relation - update navigation but don't emit
61
+ this.navigationPath = selectedPath;
62
+ }
63
+ else {
64
+ // This is a leaf property - emit and close
65
+ this.change.emit(selectedPath);
66
+ this.isOpen = false;
67
+ this.navigationPath = '';
68
+ }
69
+ };
70
+ this.handleNavigateMenu = (event) => {
71
+ var _a;
72
+ event.stopPropagation();
73
+ if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) {
74
+ // Update navigation path when drilling down
75
+ this.navigationPath = event.detail.value;
76
+ }
77
+ };
78
+ this.handleCancel = () => {
79
+ this.isOpen = false;
80
+ this.navigationPath = '';
81
+ };
82
+ this.handleChipSetChange = (event) => {
83
+ event.stopPropagation();
84
+ const detail = event.detail;
85
+ // Handle both single chip and array of chips
86
+ if (!detail) {
87
+ // Clear all was clicked
88
+ this.change.emit('');
89
+ this.navigationPath = '';
90
+ return;
91
+ }
92
+ // Convert to array if it's a single chip
93
+ const chips = Array.isArray(detail) ? detail : [detail];
94
+ if (chips.length === 0) {
95
+ // All chips removed
96
+ this.change.emit('');
97
+ this.navigationPath = '';
98
+ }
99
+ else {
100
+ // A chip was removed - emit the last remaining chip's value
101
+ const lastChip = chips.at(-1);
102
+ if (lastChip) {
103
+ this.change.emit(lastChip.value);
104
+ }
105
+ this.navigationPath = '';
106
+ }
107
+ };
108
+ }
109
+ render() {
110
+ if (!this.limetype || !this.limetypes) {
111
+ return null;
112
+ }
113
+ const chips = this.getChipsForPath(this.navigationPath || this.value || '');
114
+ return (index.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 }, index.h("div", { slot: "trigger" }, index.h("div", { onClick: this.handleChipSetWrapperClick }, index.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 })))));
115
+ }
116
+ loadMenuItems() {
117
+ // Get the limetype we're currently navigating in
118
+ const currentLimetype = this.getCurrentLimetype();
119
+ if (!currentLimetype) {
120
+ this.menuItems = [];
121
+ return;
122
+ }
123
+ this.menuItems = this.createMenuItems(currentLimetype, '');
124
+ }
125
+ getCurrentLimetype() {
126
+ if (!this.navigationPath) {
127
+ return this.limetypes[this.limetype];
128
+ }
129
+ // Get the limetype at the current navigation path
130
+ const property = propertyResolution.getPropertyFromPath(this.limetypes, this.limetype, this.navigationPath);
131
+ if (property === null || property === void 0 ? void 0 : property.relation) {
132
+ return property.relation.getLimetype();
133
+ }
134
+ return this.limetypes[this.limetype];
135
+ }
136
+ createMenuItems(limetype, pathPrefix) {
137
+ const results = [];
138
+ if (!limetype) {
139
+ return results;
140
+ }
141
+ const normalizedProperties = propertyResolution.getNormalizedProperties(limetype);
142
+ for (const [propName, property] of Object.entries(normalizedProperties)) {
143
+ // Skip hasMany and hasAndBelongsToMany relations
144
+ if (property.type === 'hasmany' ||
145
+ property.type === 'hasandbelongstomany') {
146
+ continue;
147
+ }
148
+ const fullPath = pathPrefix
149
+ ? `${pathPrefix}.${propName}`
150
+ : propName;
151
+ const isRelation = !!property.relation;
152
+ let items;
153
+ if (isRelation && property.relation) {
154
+ // Create submenu for relation (only belongsto at this point)
155
+ const relatedLimetype = property.relation.getLimetype();
156
+ if (relatedLimetype) {
157
+ items = async () => this.createMenuItems(relatedLimetype, fullPath);
158
+ }
159
+ }
160
+ results.push({
161
+ text: property.localname || propName,
162
+ secondaryText: this.getSecondaryText(property),
163
+ icon: this.getIconForProperty(property),
164
+ value: fullPath,
165
+ items: items,
166
+ });
167
+ }
168
+ if (results.length === 0) {
169
+ return [
170
+ {
171
+ text: 'No available properties',
172
+ value: '',
173
+ disabled: true,
174
+ },
175
+ ];
176
+ }
177
+ return results;
178
+ }
179
+ getSecondaryText(property) {
180
+ var _a;
181
+ if (property.relation) {
182
+ const relatedLimetype = property.relation.getLimetype();
183
+ return ((_a = relatedLimetype === null || relatedLimetype === void 0 ? void 0 : relatedLimetype.localname) === null || _a === void 0 ? void 0 : _a.singular) || 'Object';
184
+ }
185
+ // Return the property type as the secondary text
186
+ return property.type.charAt(0).toUpperCase() + property.type.slice(1);
187
+ }
188
+ getIconForProperty(property) {
189
+ if (property.relation) {
190
+ return {
191
+ name: 'link',
192
+ color: 'rgb(var(--color-sky-default))',
193
+ };
194
+ }
195
+ // Use generic property icon
196
+ return {
197
+ name: 'decision',
198
+ color: 'rgb(var(--color-gray-default))',
199
+ };
200
+ }
201
+ getChipsForPath(path) {
202
+ if (!path) {
203
+ return [];
204
+ }
205
+ const parts = path.split('.');
206
+ const chips = [];
207
+ let currentLimetype = this.limetypes[this.limetype];
208
+ let currentPath = '';
209
+ for (const part of parts) {
210
+ currentPath = currentPath ? `${currentPath}.${part}` : part;
211
+ // Use getNormalizedProperties to include _id and _timestamp
212
+ const normalizedProperties = propertyResolution.getNormalizedProperties(currentLimetype);
213
+ const property = normalizedProperties[part];
214
+ if (property) {
215
+ chips.push({
216
+ id: currentPath,
217
+ text: property.localname || part,
218
+ icon: this.getIconForProperty(property),
219
+ value: currentPath,
220
+ });
221
+ if (property.relation) {
222
+ currentLimetype = property.relation.getLimetype();
223
+ }
224
+ }
225
+ }
226
+ return chips;
227
+ }
228
+ };
229
+ __decorate([
230
+ index_esm.Te()
231
+ ], PropertySelector.prototype, "limetypes", void 0);
232
+ PropertySelector.style = LimebbPropertySelectorStyle0;
233
+
234
+ exports.limebb_property_selector = PropertySelector;
@@ -1774,7 +1774,7 @@ const LimeBBTextEditor = class {
1774
1774
  }
1775
1775
  render() {
1776
1776
  return [
1777
- index.h("limel-text-editor", { key: '277ec61f05d5edff319ed8bb37df9bc385cb3941', 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 }),
1777
+ index.h("limel-text-editor", { key: '42b8630e5e15e4e7ca20277687695a245f2ea267', 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 }),
1778
1778
  this.renderPicker(),
1779
1779
  ];
1780
1780
  }
@@ -39,7 +39,7 @@ const TrendIndicator = class {
39
39
  this.numValue = this.parseValue(this.value);
40
40
  }
41
41
  render() {
42
- return (index.h(index.Host, { key: '8c503e1a099f65fe29e2ef1903f78ddf62f815d9', class: this.getContainerClassList() }, index.h("limel-notched-outline", { key: '76d8b456dec89cea949ae427091256dffc1e71ab', 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 }, index.h("div", { key: 'e295b50dcc7a3d4cb017f7d1ca5dd187bf52299c', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
42
+ return (index.h(index.Host, { key: '33119aa80ea39fbe4ad0fd7da3c89d844efd7bd6', class: this.getContainerClassList() }, index.h("limel-notched-outline", { key: '9357919d89ea26063f9c0bbf85a48e3e235364c7', 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 }, index.h("div", { key: 'b29c00421943e45fed684e63dfebf895686f6d45', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
43
43
  }
44
44
  renderVisualization() {
45
45
  if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {