@limetech/lime-crm-building-blocks 1.98.0 → 1.100.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.
Files changed (176) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{index.esm-a894ac76.js → index.esm-d785eb6e.js} +2 -0
  3. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  4. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  5. package/dist/cjs/limebb-chat-item_2.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +68 -179
  17. package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +80 -0
  18. package/dist/cjs/{limebb-limetype-field_2.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +108 -6
  19. package/dist/cjs/limebb-lime-query-filter-comparison_5.cjs.entry.js +705 -0
  20. package/dist/cjs/limebb-lime-query-filter-expression.cjs.entry.js +45 -0
  21. package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +68 -0
  22. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  24. package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
  26. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  27. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  29. package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
  30. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
  33. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  34. package/dist/cjs/{limetype-1fe0207f.js → limetype-f2e4376e.js} +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +2 -0
  37. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +41 -49
  38. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.css +5 -0
  39. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.js +225 -0
  40. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +77 -41
  41. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +35 -46
  42. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +130 -0
  43. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +269 -0
  44. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +19 -25
  45. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +34 -34
  46. package/dist/collection/components/lime-query-builder/lime-query-builder.js +11 -26
  47. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  48. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  49. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  50. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  51. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  52. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  53. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  54. package/dist/collection/components/text-editor/text-editor.js +1 -1
  55. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  56. package/dist/components/index.esm.js +2 -1
  57. package/dist/components/lime-query-filter-builder.js +129 -0
  58. package/dist/components/lime-query-filter-comparison.js +32 -45
  59. package/dist/components/lime-query-filter-expression.js +315 -0
  60. package/dist/components/limebb-lime-query-builder.js +73 -182
  61. package/dist/components/limebb-lime-query-filter-and.js +130 -1
  62. package/dist/components/limebb-lime-query-filter-builder.d.ts +11 -0
  63. package/dist/components/limebb-lime-query-filter-builder.js +6 -0
  64. package/dist/components/limebb-lime-query-filter-comparison.js +1 -1
  65. package/dist/components/limebb-lime-query-filter-expression.js +1 -1
  66. package/dist/components/limebb-lime-query-filter-group.d.ts +11 -0
  67. package/dist/components/limebb-lime-query-filter-group.js +6 -0
  68. package/dist/components/limebb-lime-query-filter-not.js +1 -1
  69. package/dist/components/limebb-lime-query-filter-or.js +118 -1
  70. package/dist/components/limebb-locale-picker.js +1 -1
  71. package/dist/components/limebb-mention-group-counter.js +2 -2
  72. package/dist/components/limebb-percentage-visualizer.js +2 -2
  73. package/dist/components/limebb-text-editor.js +1 -1
  74. package/dist/components/limebb-trend-indicator.js +1 -1
  75. package/dist/components/limetype-field.js +34 -2
  76. package/dist/components/live-docs-info.js +2 -2
  77. package/dist/components/notification-item.js +1 -1
  78. package/dist/components/summary-popover.js +3 -3
  79. package/dist/esm/{index.esm-d8fdeb18.js → index.esm-bb569663.js} +2 -1
  80. package/dist/esm/lime-crm-building-blocks.js +1 -1
  81. package/dist/esm/limebb-browser.entry.js +1 -1
  82. package/dist/esm/limebb-chat-item_2.entry.js +1 -1
  83. package/dist/esm/limebb-chat-list.entry.js +1 -1
  84. package/dist/esm/limebb-component-config.entry.js +1 -1
  85. package/dist/esm/limebb-component-picker.entry.js +1 -1
  86. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  87. package/dist/esm/limebb-date-picker.entry.js +1 -1
  88. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  89. package/dist/esm/limebb-feed.entry.js +1 -1
  90. package/dist/esm/limebb-info-tile.entry.js +1 -1
  91. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  92. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  93. package/dist/esm/limebb-lime-query-builder.entry.js +67 -178
  94. package/dist/esm/limebb-lime-query-filter-and.entry.js +76 -0
  95. package/dist/esm/{limebb-limetype-field_2.entry.js → limebb-lime-query-filter-builder_3.entry.js} +107 -6
  96. package/dist/esm/limebb-lime-query-filter-comparison_5.entry.js +697 -0
  97. package/dist/esm/limebb-lime-query-filter-expression.entry.js +41 -0
  98. package/dist/esm/limebb-lime-query-filter-or.entry.js +64 -0
  99. package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
  100. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  101. package/dist/esm/limebb-loader.entry.js +1 -1
  102. package/dist/esm/limebb-locale-picker.entry.js +2 -2
  103. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  104. package/dist/esm/limebb-mention.entry.js +1 -1
  105. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  106. package/dist/esm/limebb-notification-item.entry.js +2 -2
  107. package/dist/esm/limebb-notification-list.entry.js +1 -1
  108. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  109. package/dist/esm/limebb-text-editor.entry.js +3 -3
  110. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  111. package/dist/esm/{limetype-6e7552a7.js → limetype-c0e041f7.js} +1 -1
  112. package/dist/esm/loader.js +1 -1
  113. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  114. package/dist/lime-crm-building-blocks/{p-a1818969.entry.js → p-03af0e66.entry.js} +1 -1
  115. package/dist/lime-crm-building-blocks/{p-f402184f.entry.js → p-098ee6c1.entry.js} +1 -1
  116. package/dist/lime-crm-building-blocks/{p-42e52b50.entry.js → p-1be0eec7.entry.js} +1 -1
  117. package/dist/lime-crm-building-blocks/{p-2aa18c2b.entry.js → p-206575e4.entry.js} +1 -1
  118. package/dist/lime-crm-building-blocks/p-20bfca36.js +1 -0
  119. package/dist/lime-crm-building-blocks/p-24aeb928.entry.js +1 -0
  120. package/dist/lime-crm-building-blocks/{p-82d33d43.entry.js → p-2faaacbc.entry.js} +1 -1
  121. package/dist/lime-crm-building-blocks/{p-d4016891.entry.js → p-2fdcb868.entry.js} +1 -1
  122. package/dist/lime-crm-building-blocks/{p-f52125a0.entry.js → p-3122ea05.entry.js} +1 -1
  123. package/dist/lime-crm-building-blocks/{p-baf4e428.entry.js → p-3175883d.entry.js} +1 -1
  124. package/dist/lime-crm-building-blocks/{p-8c8b7115.entry.js → p-32534eb7.entry.js} +1 -1
  125. package/dist/lime-crm-building-blocks/{p-6c1146ca.entry.js → p-36ea13c0.entry.js} +1 -1
  126. package/dist/lime-crm-building-blocks/p-422f6d51.entry.js +1 -0
  127. package/dist/lime-crm-building-blocks/{p-1fba0ade.js → p-4838284a.js} +1 -1
  128. package/dist/lime-crm-building-blocks/{p-5e4ba110.entry.js → p-5464f0de.entry.js} +1 -1
  129. package/dist/lime-crm-building-blocks/{p-e9d23ef7.entry.js → p-569c86b5.entry.js} +1 -1
  130. package/dist/lime-crm-building-blocks/{p-90e1716a.entry.js → p-5dc574a3.entry.js} +1 -1
  131. package/dist/lime-crm-building-blocks/{p-00da9b24.entry.js → p-631ca5a5.entry.js} +1 -1
  132. package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +1 -0
  133. package/dist/lime-crm-building-blocks/p-6d119dab.entry.js +1 -0
  134. package/dist/lime-crm-building-blocks/{p-beb0d164.entry.js → p-7271f47a.entry.js} +1 -1
  135. package/dist/lime-crm-building-blocks/{p-34357744.entry.js → p-9031f136.entry.js} +1 -1
  136. package/dist/lime-crm-building-blocks/p-91732502.entry.js +1 -0
  137. package/dist/lime-crm-building-blocks/{p-8c4eb49f.entry.js → p-93cadc1e.entry.js} +1 -1
  138. package/dist/lime-crm-building-blocks/{p-3932077b.entry.js → p-9cac4de2.entry.js} +1 -1
  139. package/dist/lime-crm-building-blocks/{p-79d4668a.entry.js → p-a200954f.entry.js} +1 -1
  140. package/dist/lime-crm-building-blocks/p-b198194a.entry.js +1 -0
  141. package/dist/lime-crm-building-blocks/{p-d89c44ad.entry.js → p-b9b954d9.entry.js} +1 -1
  142. package/dist/lime-crm-building-blocks/{p-3a620226.entry.js → p-cfa1a4ad.entry.js} +1 -1
  143. package/dist/lime-crm-building-blocks/{p-ef8a5266.entry.js → p-e8946134.entry.js} +1 -1
  144. package/dist/lime-crm-building-blocks/{p-9d9f25da.entry.js → p-eb81bceb.entry.js} +1 -1
  145. package/dist/lime-crm-building-blocks/{p-50d3d61a.entry.js → p-ee1b00b9.entry.js} +1 -1
  146. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +5 -4
  147. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-builder.d.ts +50 -0
  148. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +6 -4
  149. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +10 -14
  150. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-group.d.ts +60 -0
  151. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +4 -4
  152. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +5 -4
  153. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +1 -0
  154. package/dist/types/components/lime-query-builder/lime-query.types.d.ts +2 -1
  155. package/dist/types/components.d.ts +293 -65
  156. package/package.json +1 -1
  157. package/dist/cjs/isEqual-e77cce75.js +0 -37
  158. package/dist/cjs/lime-query.types-bcb63a22.js +0 -61
  159. package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +0 -278
  160. package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +0 -239
  161. package/dist/cjs/limebb-property-selector.cjs.entry.js +0 -234
  162. package/dist/components/isEqual.js +0 -35
  163. package/dist/components/lime-query-filter-and.js +0 -408
  164. package/dist/esm/isEqual-57d0c223.js +0 -35
  165. package/dist/esm/lime-query.types-f72355e1.js +0 -59
  166. package/dist/esm/limebb-lime-query-filter-and_5.entry.js +0 -270
  167. package/dist/esm/limebb-lime-query-value-input.entry.js +0 -235
  168. package/dist/esm/limebb-property-selector.entry.js +0 -230
  169. package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +0 -1
  170. package/dist/lime-crm-building-blocks/p-0957b2a6.entry.js +0 -1
  171. package/dist/lime-crm-building-blocks/p-3b0a15ec.js +0 -1
  172. package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +0 -1
  173. package/dist/lime-crm-building-blocks/p-60971d64.js +0 -1
  174. package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +0 -1
  175. package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +0 -1
  176. package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +0 -1
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- const _baseIsEqual = require('./_baseIsEqual-cb7951b0.js');
4
-
5
- /**
6
- * Performs a deep comparison between two values to determine if they are
7
- * equivalent.
8
- *
9
- * **Note:** This method supports comparing arrays, array buffers, booleans,
10
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
11
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
12
- * by their own, not inherited, enumerable properties. Functions and DOM
13
- * nodes are compared by strict equality, i.e. `===`.
14
- *
15
- * @static
16
- * @memberOf _
17
- * @since 0.1.0
18
- * @category Lang
19
- * @param {*} value The value to compare.
20
- * @param {*} other The other value to compare.
21
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
22
- * @example
23
- *
24
- * var object = { 'a': 1 };
25
- * var other = { 'a': 1 };
26
- *
27
- * _.isEqual(object, other);
28
- * // => true
29
- *
30
- * object === other;
31
- * // => false
32
- */
33
- function isEqual(value, other) {
34
- return _baseIsEqual.baseIsEqual(value, other);
35
- }
36
-
37
- exports.isEqual = isEqual;
@@ -1,61 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * TypeScript type definitions for Lime Query DSL
5
- *
6
- * These types represent the structure of Lime Query as defined in:
7
- * - lime-core/lime_query/schema.py
8
- * - lime-core/lime_filter/schema.py
9
- */
10
- /**
11
- * Available operators with display metadata
12
- */
13
- const LIME_QUERY_OPERATORS = [
14
- { value: '=', label: 'Equals', icon: 'equals' },
15
- { value: '!=', label: 'Not Equals', icon: 'not-equal' },
16
- {
17
- value: '>',
18
- label: 'Greater Than',
19
- icon: 'greater-than',
20
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
21
- },
22
- {
23
- value: '>=',
24
- label: 'Greater or Equal',
25
- icon: 'greater-or-equal',
26
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
27
- },
28
- {
29
- value: '<',
30
- label: 'Less Than',
31
- icon: 'less-than',
32
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
33
- },
34
- {
35
- value: '<=',
36
- label: 'Less or Equal',
37
- icon: 'less-or-equal',
38
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
39
- },
40
- { value: 'IN', label: 'In List', icon: 'list' },
41
- {
42
- value: '?',
43
- label: 'Contains',
44
- icon: '-lime-filter-contain',
45
- applicableTypes: ['string', 'text'],
46
- },
47
- {
48
- value: '=?',
49
- label: 'Begins With',
50
- icon: '-lime-filter-begin',
51
- applicableTypes: ['string', 'text'],
52
- },
53
- {
54
- value: '=$',
55
- label: 'Ends With',
56
- icon: '-lime-filter-end',
57
- applicableTypes: ['string', 'text'],
58
- },
59
- ];
60
-
61
- exports.LIME_QUERY_OPERATORS = LIME_QUERY_OPERATORS;
@@ -1,278 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ff255a0d.js');
6
- const isEqual = require('./isEqual-e77cce75.js');
7
- const limeQuery_types = require('./lime-query.types-bcb63a22.js');
8
- require('./_baseIsEqual-cb7951b0.js');
9
- require('./_Uint8Array-95263550.js');
10
- require('./_MapCache-8b125fbb.js');
11
- require('./_Map-60aae0ed.js');
12
- require('./_getTag-8809c5c6.js');
13
-
14
- const limeQueryFilterAndCss = "@charset \"UTF-8\";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:0;background-color:rgb(var(--contrast-100));border:1px solid rgb(var(--contrast-500));border-radius:0.75rem}.expression>ul{margin-top:0;margin-right:1rem;margin-bottom:1rem;margin-left:1rem;padding-left:1rem;list-style:disc}.expression>ul li{margin-top:1rem}.expression>ul li.add-button{list-style:none}";
15
- const LimebbLimeQueryFilterAndStyle0 = limeQueryFilterAndCss;
16
-
17
- const LimeQueryFilterAndComponent = class {
18
- constructor(hostRef) {
19
- index.registerInstance(this, hostRef);
20
- this.expressionChange = index.createEvent(this, "expressionChange", 7);
21
- /**
22
- * The AND expression containing child expressions
23
- */
24
- this.expression = {
25
- filter_type: 'AND',
26
- expressions: [],
27
- };
28
- this.renderChildExpression = (expression, childIndex) => (index.h("li", null, index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
29
- this.handleAddChildExpression = () => {
30
- const updatedExpressionsList = [
31
- ...this.expression.expressions,
32
- {
33
- filter_type: 'OR',
34
- expressions: [
35
- {
36
- filter_type: '',
37
- },
38
- ],
39
- },
40
- ];
41
- this.expressionChange.emit({
42
- filter_type: 'AND',
43
- expressions: updatedExpressionsList,
44
- });
45
- };
46
- this.handleExpressionChange = (updatedChildIndex) => (event) => {
47
- event.stopPropagation();
48
- const updatedExpression = event.detail;
49
- const expressions = [...this.expression.expressions];
50
- const missingExpression = {
51
- filter_type: '',
52
- };
53
- if (isEqual.isEqual(updatedExpression, missingExpression)) {
54
- expressions.splice(updatedChildIndex, 1);
55
- }
56
- else {
57
- expressions[updatedChildIndex] = updatedExpression;
58
- }
59
- if (expressions.length === 0) {
60
- this.expressionChange.emit(missingExpression);
61
- return;
62
- }
63
- this.expressionChange.emit({
64
- filter_type: 'AND',
65
- expressions: expressions,
66
- });
67
- };
68
- }
69
- render() {
70
- let subheading = 'All of these conditions are true';
71
- if (this.expression.expressions.length <= 1) {
72
- subheading = '';
73
- }
74
- return (index.h("div", { key: 'b58b7c54e8f1ded42a965f430cc103e6a344dfbf', class: "expression" }, (this.label || subheading) && (index.h("limel-header", { key: 'd5c38eef732ccbfff6baec25f007a9accdabdec0', heading: this.label, subheading: subheading })), index.h("ul", { key: 'aee3cc6799ae69c1df334a826cd708a9b6cf2be6' }, this.expression.expressions.map(this.renderChildExpression), index.h("li", { key: 'f120182c92d6b9a0b35b21be2d3308f6e62e36ab', class: "add-button" }, this.renderAddChildExpression()))));
75
- }
76
- renderAddChildExpression() {
77
- return (index.h("limel-button", { label: this.getAddButtonLabel(), icon: "plus_math", onClick: this.handleAddChildExpression }));
78
- }
79
- getAddButtonLabel() {
80
- if (this.expression.expressions.length === 0) {
81
- return 'Add a condition';
82
- }
83
- return 'Add another condition';
84
- }
85
- };
86
- LimeQueryFilterAndComponent.style = LimebbLimeQueryFilterAndStyle0;
87
-
88
- const limeQueryFilterComparisonCss = ".expression-container{display:flex;flex-direction:row;align-items:flex-start;gap:1rem;flex-wrap:wrap}.expression-container>*{flex-grow:2;width:30%;max-width:calc(100% - 3.25rem)}.expression-container>.operator{flex-grow:1;width:calc(30% + 1rem);min-width:4rem}.expression-container>.remove{flex-grow:0;width:auto;margin-left:auto}@media (max-width: 768px){.expression-container{flex-direction:column}.expression-container>*{width:100%;max-width:100%}.expression-container>.operator{width:100%}.expression-container>.remove{margin-left:0;align-self:flex-end}}";
89
- const LimebbLimeQueryFilterComparisonStyle0 = limeQueryFilterComparisonCss;
90
-
91
- const LimeQueryFilterComparisonComponent = class {
92
- constructor(hostRef) {
93
- index.registerInstance(this, hostRef);
94
- this.expressionChange = index.createEvent(this, "expressionChange", 7);
95
- /**
96
- * The comparison expression to render
97
- */
98
- this.expression = {
99
- filter_type: 'comparison',
100
- property: '',
101
- operator: '=',
102
- value: '',
103
- };
104
- this.handlePropertyChange = (event) => {
105
- event.stopPropagation();
106
- this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), { property: event.detail }));
107
- };
108
- this.handleOperatorChange = (event) => {
109
- event.stopPropagation();
110
- this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), { operator: event.detail.value }));
111
- };
112
- this.handleValueChange = (event) => {
113
- event.stopPropagation();
114
- this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), { value: event.detail }));
115
- };
116
- this.removeExpression = () => {
117
- this.expressionChange.emit({ filter_type: '' });
118
- };
119
- }
120
- render() {
121
- return (index.h("div", { key: '618150e84e87cdc234b5eab7cd0ef6443bcb261c', class: "expression" }, this.label && index.h("limel-header", { key: '7b9a35794777df5556b591ea54d1e63b64833808', heading: this.label }), index.h("div", { key: '4367741a9383fc268fcfe6dbcc14bea49f20871b', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), index.h("limel-icon-button", { key: '3ad667258da994636f484c0f7a5649b1e13b063b', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
122
- }
123
- renderPropertySelector() {
124
- return (index.h("limebb-property-selector", { platform: this.platform, context: this.context, label: "Property", limetype: this.limetype, value: this.expression.property, required: true, onChange: this.handlePropertyChange }));
125
- }
126
- renderOperator() {
127
- const operatorHasBeenSet = !!this.expression.operator;
128
- const options = limeQuery_types.LIME_QUERY_OPERATORS.map((op) => ({
129
- text: op.label,
130
- value: op.value,
131
- icon: op.icon ? { name: op.icon } : undefined,
132
- }));
133
- const selectedOption = options.find((o) => o.value === this.expression.operator);
134
- return (index.h("limel-select", { class: "operator", label: "Operator", value: selectedOption, options: options, disabled: !operatorHasBeenSet && !this.expression.property, onChange: this.handleOperatorChange }));
135
- }
136
- renderValueInput() {
137
- if (!this.expression.operator) {
138
- return null;
139
- }
140
- return (index.h("limebb-lime-query-value-input", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, propertyPath: this.expression.property, operator: this.expression.operator, value: this.expression.value, onChange: this.handleValueChange }));
141
- }
142
- };
143
- LimeQueryFilterComparisonComponent.style = LimebbLimeQueryFilterComparisonStyle0;
144
-
145
- const limeQueryFilterExpressionCss = "@charset \"UTF-8\";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem}";
146
- const LimebbLimeQueryFilterExpressionStyle0 = limeQueryFilterExpressionCss;
147
-
148
- const LimeQueryFilterExpressionComponent = class {
149
- constructor(hostRef) {
150
- index.registerInstance(this, hostRef);
151
- this.expressionChange = index.createEvent(this, "expressionChange", 7);
152
- }
153
- render() {
154
- var _a;
155
- const props = {
156
- platform: this.platform,
157
- context: this.context,
158
- label: this.label,
159
- limetype: this.limetype,
160
- activeLimetype: this.activeLimetype,
161
- };
162
- switch ((_a = this.expression) === null || _a === void 0 ? void 0 : _a.filter_type) {
163
- case 'AND': {
164
- return (index.h("limebb-lime-query-filter-and", Object.assign({}, props, { expression: this.expression })));
165
- }
166
- case 'OR': {
167
- return (index.h("limebb-lime-query-filter-or", Object.assign({}, props, { expression: this.expression })));
168
- }
169
- case 'NOT': {
170
- return (index.h("limebb-lime-query-filter-not", Object.assign({}, props, { expression: this.expression })));
171
- }
172
- case 'comparison': {
173
- return (index.h("limebb-lime-query-filter-comparison", Object.assign({}, props, { expression: this.expression })));
174
- }
175
- default: {
176
- // Default to comparison for empty/missing expressions
177
- // Convert missing expression to empty comparison
178
- const comparisonExpression = {
179
- filter_type: 'comparison',
180
- property: '',
181
- operator: '=',
182
- value: '',
183
- };
184
- return (index.h("limebb-lime-query-filter-comparison", Object.assign({}, props, { expression: comparisonExpression })));
185
- }
186
- }
187
- }
188
- };
189
- LimeQueryFilterExpressionComponent.style = LimebbLimeQueryFilterExpressionStyle0;
190
-
191
- const limeQueryFilterNotCss = "@charset \"UTF-8\";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem;padding:1rem;border-left:0.25rem solid rgb(var(--contrast-400));background-color:rgb(var(--contrast-100))}";
192
- const LimebbLimeQueryFilterNotStyle0 = limeQueryFilterNotCss;
193
-
194
- const LimeQueryFilterNotComponent = class {
195
- constructor(hostRef) {
196
- index.registerInstance(this, hostRef);
197
- this.expressionChange = index.createEvent(this, "expressionChange", 7);
198
- this.handleExpressionChange = (event) => {
199
- event.stopPropagation();
200
- const missingExpression = {
201
- filter_type: '',
202
- };
203
- if (isEqual.isEqual(event.detail, missingExpression)) {
204
- this.expressionChange.emit(missingExpression);
205
- return;
206
- }
207
- this.expressionChange.emit({
208
- filter_type: 'NOT',
209
- expression: event.detail,
210
- });
211
- };
212
- }
213
- render() {
214
- return (index.h("div", { key: '005a133401b16d03bdb5d8683b6a51c2c9691dfb', class: "expression" }, this.label && index.h("limel-header", { key: '31b44cd46fa6cd6fbe19e77df4eef9075523733d', heading: this.label }), index.h("limebb-lime-query-filter-expression", { key: '487f857eccec79d6a1da6a71aa31be04204b8862', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.expression, onExpressionChange: this.handleExpressionChange })));
215
- }
216
- };
217
- LimeQueryFilterNotComponent.style = LimebbLimeQueryFilterNotStyle0;
218
-
219
- const limeQueryFilterOrCss = "@charset \"UTF-8\";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:0;background-color:rgb(var(--contrast-200));border:1px solid rgb(var(--contrast-600));border-radius:0.75rem}.expression>ul{margin-top:0;margin-right:1rem;margin-bottom:1rem;margin-left:1rem;padding-left:1rem;list-style:circle}.expression>ul li{margin-top:1rem}.expression>ul li.add-button{list-style:none;margin-top:0;text-align:right}";
220
- const LimebbLimeQueryFilterOrStyle0 = limeQueryFilterOrCss;
221
-
222
- const LimeQueryFilterOrComponent = class {
223
- constructor(hostRef) {
224
- index.registerInstance(this, hostRef);
225
- this.expressionChange = index.createEvent(this, "expressionChange", 7);
226
- this.renderChildExpression = (expression, childIndex) => {
227
- const label = this.expression.expressions.length === 1 ? this.label : undefined;
228
- return (index.h("li", null, index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, label: label, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
229
- };
230
- this.handleExpressionChange = (updatedChildIndex) => (event) => {
231
- event.stopPropagation();
232
- const updatedExpression = event.detail;
233
- const expressions = [...this.expression.expressions];
234
- const missingExpression = {
235
- filter_type: '',
236
- };
237
- if (isEqual.isEqual(updatedExpression, missingExpression)) {
238
- expressions.splice(updatedChildIndex, 1);
239
- }
240
- else {
241
- expressions[updatedChildIndex] = updatedExpression;
242
- }
243
- if (expressions.length === 0) {
244
- this.expressionChange.emit(missingExpression);
245
- return;
246
- }
247
- this.expressionChange.emit({
248
- filter_type: 'OR',
249
- expressions: expressions,
250
- });
251
- };
252
- this.handleAddChildExpression = () => {
253
- const updatedExpressionsList = [
254
- ...this.expression.expressions,
255
- {
256
- filter_type: '',
257
- },
258
- ];
259
- this.expressionChange.emit({
260
- filter_type: 'OR',
261
- expressions: updatedExpressionsList,
262
- });
263
- };
264
- }
265
- render() {
266
- return (index.h("div", { key: '9a0e6876f32ebcb614ab1ef0ccb122a5a5b8e978', class: "expression" }, this.expression.expressions.length > 1 && (index.h("limel-header", { key: 'cb1ff04ce7669582f0c4f6afefbce3402876d435', heading: this.label, subheading: "Any of these conditions is true" })), index.h("ul", { key: '21efcfec20f4ea04105ccbea880dbb9ed551efb9' }, this.expression.expressions.map(this.renderChildExpression), index.h("li", { key: '541811a52176182be501078c3cf662bbe6a71cda', class: "add-button" }, this.renderAddChildExpression()))));
267
- }
268
- renderAddChildExpression() {
269
- return (index.h("limel-icon-button", { label: "Add alternative", icon: "plus_math", onClick: this.handleAddChildExpression }));
270
- }
271
- };
272
- LimeQueryFilterOrComponent.style = LimebbLimeQueryFilterOrStyle0;
273
-
274
- exports.limebb_lime_query_filter_and = LimeQueryFilterAndComponent;
275
- exports.limebb_lime_query_filter_comparison = LimeQueryFilterComparisonComponent;
276
- exports.limebb_lime_query_filter_expression = LimeQueryFilterExpressionComponent;
277
- exports.limebb_lime_query_filter_not = LimeQueryFilterNotComponent;
278
- exports.limebb_lime_query_filter_or = LimeQueryFilterOrComponent;
@@ -1,239 +0,0 @@
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-a894ac76.js');
7
- const propertyResolution = require('./property-resolution-fb42a46b.js');
8
-
9
- 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}";
10
- const LimebbLimeQueryValueInputStyle0 = limeQueryValueInputCss;
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 LimeQueryValueInput = class {
23
- constructor(hostRef) {
24
- index.registerInstance(this, hostRef);
25
- this.change = index.createEvent(this, "change", 7);
26
- /**
27
- * Optional label for the input
28
- */
29
- this.label = 'Value';
30
- this.inputMode = 'value';
31
- this.handleTextChange = (event) => {
32
- event.stopPropagation();
33
- // Try to parse as number for number inputs
34
- const value = event.detail;
35
- const numValue = Number(value);
36
- if (!Number.isNaN(numValue) && value !== '') {
37
- this.change.emit(numValue);
38
- }
39
- else {
40
- this.change.emit(value);
41
- }
42
- };
43
- this.handleSelectChange = (event) => {
44
- event.stopPropagation();
45
- const detail = event.detail;
46
- if (Array.isArray(detail)) {
47
- this.change.emit(detail.map((o) => o.value));
48
- }
49
- else {
50
- this.change.emit(detail === null || detail === void 0 ? void 0 : detail.value);
51
- }
52
- };
53
- this.handleBooleanChange = (event) => {
54
- event.stopPropagation();
55
- const detail = event.detail;
56
- if (!Array.isArray(detail)) {
57
- // Convert string back to boolean
58
- this.change.emit((detail === null || detail === void 0 ? void 0 : detail.value) === 'true');
59
- }
60
- };
61
- this.handleDateChange = (event) => {
62
- event.stopPropagation();
63
- // Convert Date to ISO string for storage
64
- const date = event.detail;
65
- this.change.emit(date ? date.toISOString() : null);
66
- };
67
- this.handleMultiValueChange = (event) => {
68
- event.stopPropagation();
69
- // Split by comma and trim whitespace
70
- const values = event.detail
71
- .split(',')
72
- .map((v) => v.trim())
73
- .filter((v) => v.length > 0);
74
- this.change.emit(values);
75
- };
76
- this.handleModeToggle = () => {
77
- if (this.inputMode === 'value') {
78
- // Switching to placeholder mode
79
- this.inputMode = 'placeholder';
80
- // Emit placeholder value (empty initially)
81
- this.change.emit('%activeObject%');
82
- }
83
- else {
84
- // Switching to value mode
85
- this.inputMode = 'value';
86
- // Emit empty value
87
- this.change.emit('');
88
- }
89
- };
90
- this.handlePlaceholderPropertyChange = (event) => {
91
- event.stopPropagation();
92
- const propertyPath = event.detail;
93
- const placeholderValue = this.buildPlaceholderValue(propertyPath);
94
- this.change.emit(placeholderValue);
95
- };
96
- }
97
- componentWillLoad() {
98
- // Detect if the current value is a placeholder
99
- if (this.isPlaceholder(this.value)) {
100
- this.inputMode = 'placeholder';
101
- }
102
- }
103
- componentWillUpdate() {
104
- // Update mode if value changes externally
105
- if (this.isPlaceholder(this.value) &&
106
- this.inputMode !== 'placeholder') {
107
- this.inputMode = 'placeholder';
108
- }
109
- else if (!this.isPlaceholder(this.value) &&
110
- this.inputMode === 'placeholder') {
111
- this.inputMode = 'value';
112
- }
113
- }
114
- isPlaceholder(value) {
115
- return typeof value === 'string' && value.startsWith('%activeObject%');
116
- }
117
- parsePlaceholderPath(value) {
118
- if (!this.isPlaceholder(value)) {
119
- return '';
120
- }
121
- // Extract path after %activeObject%. (e.g., "%activeObject%.company.name" → "company.name")
122
- return value.replace(/^%activeObject%\.?/, '');
123
- }
124
- buildPlaceholderValue(propertyPath) {
125
- if (!propertyPath) {
126
- return '%activeObject%';
127
- }
128
- return `%activeObject%.${propertyPath}`;
129
- }
130
- render() {
131
- if (!this.operator) {
132
- return null;
133
- }
134
- return (index.h("div", { class: "value-input-container" }, this.renderModeToggle(), this.inputMode === 'placeholder'
135
- ? this.renderPlaceholderInput()
136
- : this.renderValueInputByType()));
137
- }
138
- renderModeToggle() {
139
- // Only show toggle if activeLimetype is set
140
- if (!this.activeLimetype) {
141
- return null;
142
- }
143
- const isPlaceholderMode = this.inputMode === 'placeholder';
144
- const buttonLabel = isPlaceholderMode ? 'Use Value' : 'Use Placeholder';
145
- const buttonIcon = isPlaceholderMode ? 'text' : 'link';
146
- return (index.h("limel-icon-button", { class: "mode-toggle", icon: buttonIcon, label: buttonLabel, onClick: this.handleModeToggle }));
147
- }
148
- renderPlaceholderInput() {
149
- const propertyPath = this.parsePlaceholderPath(this.value);
150
- return (index.h("div", { class: "placeholder-input" }, index.h("limebb-property-selector", { platform: this.platform, context: this.context, limetype: this.activeLimetype, label: "Active Object Property", value: propertyPath, required: false, helperText: "Select property from the active object", onChange: this.handlePlaceholderPropertyChange }), this.isPlaceholder(this.value) && (index.h("div", { class: "placeholder-preview" }, index.h("limel-icon", { name: "info", size: "small" }), index.h("span", null, "Placeholder: ", this.value)))));
151
- }
152
- renderValueInputByType() {
153
- // Special handling for IN operator - always use chip set for arrays
154
- if (this.operator === 'IN') {
155
- return this.renderMultiValueInput();
156
- }
157
- const property = this.getProperty();
158
- if (!property) {
159
- return this.renderTextInput();
160
- }
161
- switch (property.type) {
162
- case 'integer':
163
- case 'decimal': {
164
- return this.renderNumberInput(property.type);
165
- }
166
- case 'yesno': {
167
- return this.renderBooleanInput();
168
- }
169
- case 'option': {
170
- return this.renderOptionInput(property);
171
- }
172
- case 'date': {
173
- return this.renderDateInput();
174
- }
175
- case 'time': {
176
- return this.renderTimeInput();
177
- }
178
- default: {
179
- return this.renderTextInput();
180
- }
181
- }
182
- }
183
- renderTextInput() {
184
- var _a;
185
- return (index.h("limel-input-field", { label: this.label, value: ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "Enter value", onChange: this.handleTextChange }));
186
- }
187
- renderNumberInput(type) {
188
- var _a;
189
- const step = type === 'integer' ? 1 : 0.01;
190
- return (index.h("limel-input-field", { label: this.label, type: "number", value: ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) || '', step: step, onChange: this.handleTextChange }));
191
- }
192
- renderBooleanInput() {
193
- const options = [
194
- { text: 'True', value: 'true' },
195
- { text: 'False', value: 'false' },
196
- ];
197
- const valueAsString = this.value === true || this.value === 'true' ? 'true' : 'false';
198
- const selectedOption = options.find((o) => o.value === valueAsString);
199
- return (index.h("limel-select", { label: this.label, options: options, value: selectedOption, onChange: this.handleBooleanChange }));
200
- }
201
- renderOptionInput(property) {
202
- if (!property.options || property.options.length === 0) {
203
- return this.renderTextInput();
204
- }
205
- const options = property.options.map((opt) => ({
206
- text: opt.text || opt.key,
207
- value: opt.key,
208
- }));
209
- const selectedOption = options.find((o) => o.value === this.value);
210
- return (index.h("limel-select", { label: this.label, options: options, value: selectedOption, onChange: this.handleSelectChange }));
211
- }
212
- renderDateInput() {
213
- // Convert string to Date if needed
214
- const dateValue = typeof this.value === 'string' ? new Date(this.value) : this.value;
215
- return (index.h("limel-date-picker", { label: this.label, value: dateValue, onChange: this.handleDateChange }));
216
- }
217
- renderTimeInput() {
218
- return (index.h("limel-input-field", { label: this.label, type: "time", value: this.value || '', onChange: this.handleTextChange }));
219
- }
220
- renderMultiValueInput() {
221
- // For IN operator, allow comma-separated values
222
- const displayValue = Array.isArray(this.value)
223
- ? this.value.join(', ')
224
- : this.value || '';
225
- return (index.h("limel-input-field", { label: this.label + ' (comma-separated)', value: displayValue, placeholder: "e.g., won, lost, tender", onChange: this.handleMultiValueChange }));
226
- }
227
- getProperty() {
228
- if (!this.limetypes || !this.limetype || !this.propertyPath) {
229
- return;
230
- }
231
- return propertyResolution.getPropertyFromPath(this.limetypes, this.limetype, this.propertyPath);
232
- }
233
- };
234
- __decorate([
235
- index_esm.Te()
236
- ], LimeQueryValueInput.prototype, "limetypes", void 0);
237
- LimeQueryValueInput.style = LimebbLimeQueryValueInputStyle0;
238
-
239
- exports.limebb_lime_query_value_input = LimeQueryValueInput;