@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.
Files changed (246) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{_MapCache-2e84a981.js → _MapCache-8b125fbb.js} +0 -26
  3. package/dist/cjs/{_Uint8Array-1e99726d.js → _Uint8Array-95263550.js} +1 -12
  4. package/dist/cjs/_baseIsEqual-cb7951b0.js +496 -0
  5. package/dist/cjs/_defineProperty-40a6ad5d.js +15 -0
  6. package/dist/cjs/{get-1acf79ce.js → get-932b213e.js} +5 -4
  7. package/dist/cjs/isEqual-e77cce75.js +37 -0
  8. package/dist/cjs/isSymbol-5b36aeee.js +30 -0
  9. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  10. package/dist/cjs/lime-query.types-bcb63a22.js +61 -0
  11. package/dist/cjs/limebb-component-config.cjs.entry.js +3 -2
  12. package/dist/cjs/limebb-document-item.cjs.entry.js +174 -0
  13. package/dist/cjs/limebb-document-picker.cjs.entry.js +82 -0
  14. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  17. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  20. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +382 -150
  23. package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +278 -0
  24. package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +239 -0
  25. package/dist/cjs/limebb-limetype-field_2.cjs.entry.js +406 -0
  26. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  27. package/dist/cjs/limebb-locale-picker.cjs.entry.js +13 -498
  28. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  29. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  30. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-property-selector.cjs.entry.js +234 -0
  33. package/dist/cjs/limebb-response-format-item.cjs.entry.js +80 -0
  34. package/dist/cjs/limebb-text-editor.cjs.entry.js +22 -83
  35. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  36. package/dist/cjs/limetype-1fe0207f.js +90 -0
  37. package/dist/cjs/loader.cjs.js +1 -1
  38. package/dist/cjs/property-resolution-fb42a46b.js +66 -0
  39. package/dist/cjs/random-string-aac0a74b.js +24 -0
  40. package/dist/collection/collection-manifest.json +12 -0
  41. package/dist/collection/components/document-picker/document-item/document-item.css +64 -0
  42. package/dist/collection/components/document-picker/document-item/document-item.js +265 -0
  43. package/dist/collection/components/document-picker/document-item/document-item.types.js +1 -0
  44. package/dist/collection/components/document-picker/document-picker.css +139 -0
  45. package/dist/collection/components/document-picker/document-picker.js +304 -0
  46. package/dist/collection/components/document-picker/document.types.js +1 -0
  47. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
  48. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
  49. package/dist/collection/components/feed/feed.js +1 -1
  50. package/dist/collection/components/icon-picker/icon-picker.js +1 -1
  51. package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
  52. package/dist/collection/components/info-tile/info-tile.js +1 -1
  53. package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
  54. package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
  55. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.css +121 -0
  56. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +257 -0
  57. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.css +39 -0
  58. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +246 -0
  59. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.css +104 -0
  60. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +220 -0
  61. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.css +107 -0
  62. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +212 -0
  63. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.css +123 -0
  64. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +237 -0
  65. package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.css +48 -0
  66. package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +457 -0
  67. package/dist/collection/components/lime-query-builder/filter-conversion.js +118 -21
  68. package/dist/collection/components/lime-query-builder/lime-query-builder.css +30 -17
  69. package/dist/collection/components/lime-query-builder/lime-query-builder.js +233 -28
  70. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +435 -0
  71. package/dist/collection/components/lime-query-builder/property-selection-format.js +158 -0
  72. package/dist/collection/components/lime-query-builder/property-selector/property-selector.css +8 -0
  73. package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +422 -0
  74. package/dist/collection/components/lime-query-builder/response-format-editor.css +72 -0
  75. package/dist/collection/components/lime-query-builder/response-format-editor.js +249 -0
  76. package/dist/collection/components/lime-query-builder/response-format-item.css +61 -0
  77. package/dist/collection/components/lime-query-builder/response-format-item.js +208 -0
  78. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  79. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  80. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  81. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  82. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  83. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  84. package/dist/collection/components/text-editor/text-editor.js +1 -1
  85. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  86. package/dist/collection/util/format-bytes.js +36 -0
  87. package/dist/components/_MapCache.js +2 -27
  88. package/dist/components/_Uint8Array.js +2 -12
  89. package/dist/components/_baseIsEqual.js +494 -0
  90. package/dist/components/_defineProperty.js +13 -0
  91. package/dist/components/document-item.js +190 -0
  92. package/dist/components/feed-item-thumbnail-file-info.js +1 -1
  93. package/dist/components/feed-timeline-item.js +1 -1
  94. package/dist/components/get.js +2 -1
  95. package/dist/components/isEqual.js +35 -0
  96. package/dist/components/isSymbol.js +28 -0
  97. package/dist/components/kanban-group.js +1 -1
  98. package/dist/components/kanban-item.js +1 -1
  99. package/dist/components/lime-query-filter-and.js +408 -0
  100. package/dist/components/lime-query-filter-comparison.js +152 -0
  101. package/dist/components/lime-query-value-input.js +266 -0
  102. package/dist/components/limebb-document-item.d.ts +11 -0
  103. package/dist/components/limebb-document-item.js +6 -0
  104. package/dist/components/limebb-document-picker.d.ts +11 -0
  105. package/dist/components/limebb-document-picker.js +111 -0
  106. package/dist/components/limebb-feed.js +1 -1
  107. package/dist/components/limebb-icon-picker.js +1 -1
  108. package/dist/components/limebb-info-tile-format.js +1 -1
  109. package/dist/components/limebb-info-tile.js +1 -1
  110. package/dist/components/limebb-lime-query-builder.js +441 -149
  111. package/dist/components/limebb-lime-query-filter-and.d.ts +11 -0
  112. package/dist/components/limebb-lime-query-filter-and.js +6 -0
  113. package/dist/components/limebb-lime-query-filter-comparison.d.ts +11 -0
  114. package/dist/components/limebb-lime-query-filter-comparison.js +6 -0
  115. package/dist/components/limebb-lime-query-filter-expression.d.ts +11 -0
  116. package/dist/components/limebb-lime-query-filter-expression.js +6 -0
  117. package/dist/components/limebb-lime-query-filter-not.d.ts +11 -0
  118. package/dist/components/limebb-lime-query-filter-not.js +6 -0
  119. package/dist/components/limebb-lime-query-filter-or.d.ts +11 -0
  120. package/dist/components/limebb-lime-query-filter-or.js +6 -0
  121. package/dist/components/limebb-lime-query-value-input.d.ts +11 -0
  122. package/dist/components/limebb-lime-query-value-input.js +6 -0
  123. package/dist/components/limebb-limetype-field.d.ts +11 -0
  124. package/dist/components/limebb-limetype-field.js +6 -0
  125. package/dist/components/limebb-locale-picker.js +8 -493
  126. package/dist/components/limebb-mention-group-counter.js +2 -2
  127. package/dist/components/limebb-percentage-visualizer.js +2 -2
  128. package/dist/components/limebb-property-selector.d.ts +11 -0
  129. package/dist/components/limebb-property-selector.js +6 -0
  130. package/dist/components/limebb-response-format-editor.d.ts +11 -0
  131. package/dist/components/limebb-response-format-editor.js +6 -0
  132. package/dist/components/limebb-response-format-item.d.ts +11 -0
  133. package/dist/components/limebb-response-format-item.js +6 -0
  134. package/dist/components/limebb-text-editor.js +8 -69
  135. package/dist/components/limebb-trend-indicator.js +1 -1
  136. package/dist/components/limetype-field.js +184 -0
  137. package/dist/components/limetype.js +85 -0
  138. package/dist/components/live-docs-info.js +2 -2
  139. package/dist/components/notification-item.js +1 -1
  140. package/dist/components/property-selector.js +317 -0
  141. package/dist/components/random-string.js +22 -0
  142. package/dist/components/response-format-editor.js +278 -0
  143. package/dist/components/response-format-item.js +104 -0
  144. package/dist/components/summary-popover.js +3 -3
  145. package/dist/esm/{_MapCache-6484495d.js → _MapCache-af496e9d.js} +2 -27
  146. package/dist/esm/{_Uint8Array-e5cac922.js → _Uint8Array-d6ebd526.js} +3 -13
  147. package/dist/esm/_baseIsEqual-28053b81.js +494 -0
  148. package/dist/esm/_defineProperty-e6a185c3.js +13 -0
  149. package/dist/esm/{get-f9e0b2e1.js → get-3e42932b.js} +2 -1
  150. package/dist/esm/isEqual-57d0c223.js +35 -0
  151. package/dist/esm/isSymbol-1c5f65cc.js +28 -0
  152. package/dist/esm/lime-crm-building-blocks.js +1 -1
  153. package/dist/esm/lime-query.types-f72355e1.js +59 -0
  154. package/dist/esm/limebb-component-config.entry.js +3 -2
  155. package/dist/esm/limebb-document-item.entry.js +170 -0
  156. package/dist/esm/limebb-document-picker.entry.js +78 -0
  157. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  158. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  159. package/dist/esm/limebb-feed.entry.js +1 -1
  160. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  161. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  162. package/dist/esm/limebb-info-tile.entry.js +1 -1
  163. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  164. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  165. package/dist/esm/limebb-lime-query-builder.entry.js +379 -147
  166. package/dist/esm/limebb-lime-query-filter-and_5.entry.js +270 -0
  167. package/dist/esm/limebb-lime-query-value-input.entry.js +235 -0
  168. package/dist/esm/limebb-limetype-field_2.entry.js +401 -0
  169. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  170. package/dist/esm/limebb-locale-picker.entry.js +9 -494
  171. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  172. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  173. package/dist/esm/limebb-notification-item.entry.js +1 -1
  174. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  175. package/dist/esm/limebb-property-selector.entry.js +230 -0
  176. package/dist/esm/limebb-response-format-item.entry.js +76 -0
  177. package/dist/esm/limebb-text-editor.entry.js +8 -69
  178. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  179. package/dist/esm/limetype-6e7552a7.js +85 -0
  180. package/dist/esm/loader.js +1 -1
  181. package/dist/esm/property-resolution-fde2375e.js +63 -0
  182. package/dist/esm/random-string-f6ef6fbf.js +22 -0
  183. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  184. package/dist/lime-crm-building-blocks/{p-85e11ff7.entry.js → p-00da9b24.entry.js} +1 -1
  185. package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +1 -0
  186. package/dist/lime-crm-building-blocks/p-123190c3.js +1 -0
  187. package/dist/lime-crm-building-blocks/p-244ee55b.entry.js +1 -0
  188. package/dist/lime-crm-building-blocks/p-35897ec3.js +1 -0
  189. package/dist/lime-crm-building-blocks/{p-d6a07ea4.entry.js → p-3932077b.entry.js} +1 -1
  190. package/dist/lime-crm-building-blocks/p-3b0a15ec.js +1 -0
  191. package/dist/lime-crm-building-blocks/p-4a82410e.entry.js +1 -0
  192. package/dist/lime-crm-building-blocks/{p-a694aae5.entry.js → p-50d3d61a.entry.js} +1 -1
  193. package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +1 -0
  194. package/dist/lime-crm-building-blocks/p-60971d64.js +1 -0
  195. package/dist/lime-crm-building-blocks/{p-a44f543c.entry.js → p-61282e1a.entry.js} +1 -1
  196. package/dist/lime-crm-building-blocks/p-6c1146ca.entry.js +1 -0
  197. package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +1 -0
  198. package/dist/lime-crm-building-blocks/{p-16199127.entry.js → p-79d4668a.entry.js} +1 -1
  199. package/dist/lime-crm-building-blocks/p-7e6fb4af.js +1 -0
  200. package/dist/lime-crm-building-blocks/{p-88cc5b66.entry.js → p-82d33d43.entry.js} +1 -1
  201. package/dist/lime-crm-building-blocks/{p-7db8652e.entry.js → p-8c4eb49f.entry.js} +1 -1
  202. package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +1 -0
  203. package/dist/lime-crm-building-blocks/p-9d25ed5a.entry.js +1 -0
  204. package/dist/lime-crm-building-blocks/{p-8dce83ad.entry.js → p-9d9f25da.entry.js} +1 -1
  205. package/dist/lime-crm-building-blocks/p-a659d55a.js +1 -0
  206. package/dist/lime-crm-building-blocks/p-b7c72179.entry.js +1 -0
  207. package/dist/lime-crm-building-blocks/p-baf4e428.entry.js +1 -0
  208. package/dist/lime-crm-building-blocks/{p-516210d4.entry.js → p-beb0d164.entry.js} +1 -1
  209. package/dist/lime-crm-building-blocks/p-d298b34e.js +1 -0
  210. package/dist/lime-crm-building-blocks/{p-047c89de.entry.js → p-d89c44ad.entry.js} +1 -1
  211. package/dist/lime-crm-building-blocks/p-e0ab1554.js +1 -0
  212. package/dist/lime-crm-building-blocks/{p-46d2f604.entry.js → p-e35299e0.entry.js} +1 -1
  213. package/dist/lime-crm-building-blocks/{p-8ef39ab8.entry.js → p-e9d23ef7.entry.js} +1 -1
  214. package/dist/lime-crm-building-blocks/p-ef8a5266.entry.js +1 -0
  215. package/dist/lime-crm-building-blocks/{p-abf1c197.entry.js → p-f52125a0.entry.js} +1 -1
  216. package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +1 -0
  217. package/dist/lime-crm-building-blocks/p-fbda77a7.js +1 -0
  218. package/dist/lime-crm-building-blocks/p-fe2b91d9.js +1 -0
  219. package/dist/lime-crm-building-blocks/{p-d6af09a8.entry.js → p-ff0b244b.entry.js} +1 -1
  220. package/dist/types/components/document-picker/document-item/document-item.d.ts +46 -0
  221. package/dist/types/components/document-picker/document-item/document-item.types.d.ts +37 -0
  222. package/dist/types/components/document-picker/document-picker.d.ts +80 -0
  223. package/dist/types/components/document-picker/document.types.d.ts +2 -0
  224. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +56 -0
  225. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +64 -0
  226. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +53 -0
  227. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +54 -0
  228. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +55 -0
  229. package/dist/types/components/lime-query-builder/expressions/lime-query-value-input.d.ts +92 -0
  230. package/dist/types/components/lime-query-builder/filter-conversion.d.ts +18 -0
  231. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +30 -8
  232. package/dist/types/components/lime-query-builder/limetype-field/limetype-field.d.ts +96 -0
  233. package/dist/types/components/lime-query-builder/property-selection-format.d.ts +23 -0
  234. package/dist/types/components/lime-query-builder/property-selector/property-selector.d.ts +71 -0
  235. package/dist/types/components/lime-query-builder/response-format-editor.d.ts +57 -0
  236. package/dist/types/components/lime-query-builder/response-format-item.d.ts +46 -0
  237. package/dist/types/components.d.ts +1795 -114
  238. package/dist/types/util/format-bytes.d.ts +20 -0
  239. package/package.json +2 -2
  240. package/dist/lime-crm-building-blocks/p-29346b1a.entry.js +0 -1
  241. package/dist/lime-crm-building-blocks/p-4ccce5cc.entry.js +0 -1
  242. package/dist/lime-crm-building-blocks/p-7ef3bace.entry.js +0 -1
  243. package/dist/lime-crm-building-blocks/p-8044ffbd.js +0 -1
  244. package/dist/lime-crm-building-blocks/p-92ec9205.entry.js +0 -1
  245. package/dist/lime-crm-building-blocks/p-bcc23575.js +0 -1
  246. package/dist/lime-crm-building-blocks/p-c40a3f4b.js +0 -1
@@ -0,0 +1,406 @@
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 limetype = require('./limetype-1fe0207f.js');
8
+ const nonNull = require('./non-null-3bf14aa1.js');
9
+ const isEqual = require('./isEqual-e77cce75.js');
10
+ const _Map = require('./_Map-60aae0ed.js');
11
+ require('./_baseIsEqual-cb7951b0.js');
12
+ require('./_Uint8Array-95263550.js');
13
+ require('./_MapCache-8b125fbb.js');
14
+ require('./_getTag-8809c5c6.js');
15
+
16
+ /** `Object#toString` result references. */
17
+ var stringTag = '[object String]';
18
+
19
+ /**
20
+ * Checks if `value` is classified as a `String` primitive or object.
21
+ *
22
+ * @static
23
+ * @since 0.1.0
24
+ * @memberOf _
25
+ * @category Lang
26
+ * @param {*} value The value to check.
27
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
28
+ * @example
29
+ *
30
+ * _.isString('abc');
31
+ * // => true
32
+ *
33
+ * _.isString(1);
34
+ * // => false
35
+ */
36
+ function isString(value) {
37
+ return typeof value == 'string' ||
38
+ (!_Map.isArray(value) && _Map.isObjectLike(value) && _Map.baseGetTag(value) == stringTag);
39
+ }
40
+
41
+ const RELATION_PROPERTY_TYPES = [
42
+ 'belongsto',
43
+ 'hasone',
44
+ 'hasmany',
45
+ 'hasandbelongstomany',
46
+ ];
47
+ const DEFAULT_ALLOWED_PROPERTY_TYPES = [
48
+ 'string',
49
+ 'text',
50
+ 'phone',
51
+ 'integer',
52
+ 'decimal',
53
+ 'percent',
54
+ 'time',
55
+ 'date',
56
+ 'year',
57
+ 'quarter',
58
+ 'month',
59
+ 'yesno',
60
+ 'link',
61
+ 'user',
62
+ 'xml',
63
+ 'option',
64
+ 'set',
65
+ 'file',
66
+ 'system',
67
+ ];
68
+
69
+ const allNonSystemPropertyTypes = DEFAULT_ALLOWED_PROPERTY_TYPES.filter((propertyType) => propertyType !== 'system');
70
+ allNonSystemPropertyTypes.push(...RELATION_PROPERTY_TYPES);
71
+ const LimetypeField = class {
72
+ constructor(hostRef) {
73
+ index.registerInstance(this, hostRef);
74
+ this.change = index.createEvent(this, "change", 7);
75
+ /**
76
+ * A list of property fields that should be updated when the selected limetype changes.
77
+ */
78
+ this.propertyFields = [];
79
+ /**
80
+ * The name of this field. May be used as reference when a property mapping
81
+ * depends on the selected limetype.
82
+ */
83
+ this.fieldName = 'limetype';
84
+ this.handleChange = (event) => {
85
+ event.stopPropagation();
86
+ let selectedLimetype = '';
87
+ if (event.detail && 'value' in event.detail) {
88
+ selectedLimetype = event.detail.value;
89
+ }
90
+ this.change.emit(selectedLimetype || undefined);
91
+ };
92
+ }
93
+ componentWillLoad() {
94
+ const language = this.platform
95
+ .get(index_esm.c.Application)
96
+ .getLanguage();
97
+ this.collator = new Intl.Collator(language, {
98
+ numeric: true,
99
+ sensitivity: 'base',
100
+ });
101
+ }
102
+ componentShouldUpdate(newValue, oldValue, property) {
103
+ var _a, _b;
104
+ return (property !== 'formInfo' ||
105
+ !isEqual.isEqual((_a = newValue === null || newValue === void 0 ? void 0 : newValue.schema) === null || _a === void 0 ? void 0 : _a.oneOf, (_b = oldValue === null || oldValue === void 0 ? void 0 : oldValue.schema) === null || _b === void 0 ? void 0 : _b.oneOf));
106
+ }
107
+ render() {
108
+ var _a;
109
+ const options = this.getLimeTypes().map(limeTypeToOption);
110
+ options.sort((a, b) => this.collator.compare(a.text, b.text));
111
+ let selectedOption = options.find((option) => option.value === this.value);
112
+ let invalid = this.invalid;
113
+ if (this.value && !selectedOption) {
114
+ invalid = true;
115
+ options.unshift({
116
+ text: ((_a = this.limeTypeRepository.getLimeType(this.value)) === null || _a === void 0 ? void 0 : _a.localname.singular) || this.value,
117
+ value: this.value,
118
+ });
119
+ selectedOption = options[0];
120
+ }
121
+ const emptyOption = {
122
+ text: '',
123
+ value: '',
124
+ };
125
+ options.unshift(emptyOption);
126
+ return (index.h("limel-select", { key: '82ce4b92e4ff1285e259f07a35634df722f5baab', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
127
+ }
128
+ componentWillRender() {
129
+ this.updatePropertyFields(this.value || '');
130
+ }
131
+ getLimeTypes() {
132
+ var _a, _b;
133
+ let limetypes = this.limetypes;
134
+ if ((_b = (_a = this.formInfo) === null || _a === void 0 ? void 0 : _a.schema) === null || _b === void 0 ? void 0 : _b.oneOf) {
135
+ limetypes = this.formInfo.schema.oneOf
136
+ .map((choice) => choice.const)
137
+ .filter(isString);
138
+ }
139
+ if (!limetypes) {
140
+ return this.limeTypeRepository.getLimeTypes();
141
+ }
142
+ return limetypes
143
+ .map((limetype) => this.limeTypeRepository.getLimeType(limetype))
144
+ .filter(nonNull.isNonNull);
145
+ }
146
+ updatePropertyFields(selectedLimetype) {
147
+ for (const field of this.propertyFields) {
148
+ field.limetype = selectedLimetype;
149
+ if (field.allowedPropertyTypes === DEFAULT_ALLOWED_PROPERTY_TYPES) {
150
+ field.allowedPropertyTypes = allNonSystemPropertyTypes;
151
+ }
152
+ }
153
+ }
154
+ get limeTypeRepository() {
155
+ return this.platform.get(index_esm.c.LimeTypeRepository);
156
+ }
157
+ };
158
+ const limeTypeToOption = (limetype$1) => ({
159
+ text: limetype$1.localname.singular,
160
+ value: limetype$1.name,
161
+ icon: limetype.getIcon(limetype$1),
162
+ });
163
+
164
+ /**
165
+ * Process a single property value and add to items array
166
+ * @param items Array to add items to
167
+ * @param fullPath Full property path
168
+ * @param value Property value to process
169
+ */
170
+ function processPropertyValue(items, fullPath, value) {
171
+ if (value === null) {
172
+ items.push({ path: fullPath });
173
+ return;
174
+ }
175
+ // Cast to record for checking
176
+ const valueObj = value;
177
+ const keys = Object.keys(valueObj);
178
+ const hasAlias = '_alias' in valueObj;
179
+ const hasDescription = '#description' in valueObj;
180
+ const otherKeys = keys.filter((k) => k !== '_alias' && k !== '#description');
181
+ // If it's {} or only has metadata (_alias, #description), treat as simple property
182
+ if (otherKeys.length === 0) {
183
+ const aliasValue = valueObj._alias;
184
+ const descriptionValue = valueObj['#description'];
185
+ if (aliasValue || descriptionValue) {
186
+ items.push({
187
+ path: fullPath,
188
+ alias: aliasValue,
189
+ description: descriptionValue,
190
+ });
191
+ }
192
+ else {
193
+ items.push({ path: fullPath });
194
+ }
195
+ return;
196
+ }
197
+ // If has metadata + other properties, we need to handle both
198
+ // Add the nested properties (metadata is preserved in conversion back)
199
+ if (hasAlias || hasDescription) {
200
+ // Build a PropertySelection without the metadata for recursion
201
+ const nestedSelection = {};
202
+ for (const key of otherKeys) {
203
+ nestedSelection[key] = valueObj[key];
204
+ }
205
+ items.push(...propertySelectionToItems(nestedSelection, fullPath));
206
+ return;
207
+ }
208
+ // Nested property selection without metadata
209
+ items.push(...propertySelectionToItems(value, fullPath));
210
+ }
211
+ /**
212
+ * Convert a nested PropertySelection to a flat list of property items
213
+ * @param selection The nested PropertySelection object
214
+ * @param prefix Current path prefix (used for recursion)
215
+ * @returns Flat array of PropertySelectionItem objects
216
+ */
217
+ function propertySelectionToItems(selection, prefix = '') {
218
+ if (!selection) {
219
+ return [];
220
+ }
221
+ const items = [];
222
+ for (const [key, value] of Object.entries(selection)) {
223
+ const fullPath = prefix ? `${prefix}.${key}` : key;
224
+ if (typeof value === 'object') {
225
+ // NOTE: We want to send null values to the processPropertyValue
226
+ // function but we don't need a special check for null, since
227
+ // `typeof null === 'object'`
228
+ processPropertyValue(items, fullPath, value);
229
+ }
230
+ }
231
+ return items;
232
+ }
233
+ /**
234
+ * Set the final property value (with or without alias/description)
235
+ * @param current Current PropertySelection object
236
+ * @param part Property name/key
237
+ * @param item Property selection item with path and optional alias/description
238
+ */
239
+ function setPropertyValue(current, part, item) {
240
+ // Check if there's already a nested PropertySelection with properties
241
+ const existing = current[part];
242
+ if (existing &&
243
+ typeof existing === 'object' &&
244
+ !('_alias' in existing) &&
245
+ !('#description' in existing)) {
246
+ // There's already a nested PropertySelection object with properties
247
+ // Don't overwrite it - preserve the nested selections
248
+ return;
249
+ }
250
+ // Build metadata object, stripping empty values
251
+ const metadata = {};
252
+ if (item.alias && item.alias.trim() !== '') {
253
+ metadata._alias = item.alias;
254
+ }
255
+ if (item.description && item.description.trim() !== '') {
256
+ metadata['#description'] = item.description;
257
+ }
258
+ // If we have metadata, use it; otherwise use null
259
+ if (Object.keys(metadata).length > 0) {
260
+ current[part] = metadata;
261
+ }
262
+ else {
263
+ current[part] = null;
264
+ }
265
+ }
266
+ /**
267
+ * Ensure a nested object exists and return it
268
+ * Preserves any existing _alias and #description when converting to nested object
269
+ * @param current Current PropertySelection object
270
+ * @param part Property name/key
271
+ * @returns The nested PropertySelection object
272
+ */
273
+ function ensureNestedObject(current, part) {
274
+ const existing = current[part];
275
+ // If doesn't exist or is null, create empty object
276
+ if (!existing) {
277
+ current[part] = {};
278
+ return current[part];
279
+ }
280
+ // If it's already a PropertySelection object, check for metadata
281
+ if (typeof existing === 'object') {
282
+ const existingObj = existing;
283
+ // If it has metadata but no other properties, preserve the metadata
284
+ const keys = Object.keys(existingObj);
285
+ const hasMetadata = '_alias' in existingObj || '#description' in existingObj;
286
+ const otherKeys = keys.filter((k) => k !== '_alias' && k !== '#description');
287
+ if (hasMetadata && otherKeys.length === 0) {
288
+ // Convert { _alias: "...", "#description": "..." } to { _alias: "...", "#description": "...", ...nested }
289
+ // Keep the existing object and return it (caller will add nested props)
290
+ return existingObj;
291
+ }
292
+ // Already has nested properties, return as is
293
+ return existingObj;
294
+ }
295
+ // Shouldn't reach here, but fallback to creating new object
296
+ current[part] = {};
297
+ return current[part];
298
+ }
299
+ /**
300
+ * Convert a flat list of property items to a nested PropertySelection structure
301
+ * @param items Array of PropertySelectionItem objects
302
+ * @returns Nested PropertySelection object
303
+ */
304
+ function itemsToPropertySelection(items) {
305
+ const result = {};
306
+ for (const item of items) {
307
+ const parts = item.path.split('.');
308
+ let current = result;
309
+ for (let i = 0; i < parts.length; i++) {
310
+ const part = parts[i];
311
+ const isLast = i === parts.length - 1;
312
+ if (isLast) {
313
+ setPropertyValue(current, part, item);
314
+ }
315
+ else {
316
+ current = ensureNestedObject(current, part);
317
+ }
318
+ }
319
+ }
320
+ return result;
321
+ }
322
+
323
+ const responseFormatEditorCss = ":host(limebb-response-format-editor){display:block;width:100%}.response-format-editor{display:flex;flex-direction:column;gap:1rem;padding:1rem}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.property-list{display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.property-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.property-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;justify-content:flex-start}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}.empty-state{padding:2rem;text-align:center;color:rgb(var(--contrast-700));font-style:italic}.empty-state p{margin:0}";
324
+ const LimebbResponseFormatEditorStyle0 = responseFormatEditorCss;
325
+
326
+ const ResponseFormatEditor = class {
327
+ constructor(hostRef) {
328
+ index.registerInstance(this, hostRef);
329
+ this.change = index.createEvent(this, "change", 7);
330
+ /**
331
+ * Optional label
332
+ */
333
+ this.label = 'Select Properties to Return';
334
+ this.items = [{ path: '_id' }];
335
+ this.handleItemChange = (index) => (event) => {
336
+ event.stopPropagation();
337
+ const newItems = [...this.items];
338
+ if (event.detail === null) {
339
+ // Remove item
340
+ newItems.splice(index, 1);
341
+ }
342
+ else {
343
+ // Update item
344
+ newItems[index] = event.detail;
345
+ }
346
+ // Ensure we always have at least _id
347
+ if (newItems.length === 0) {
348
+ newItems.push({ path: '_id' });
349
+ }
350
+ this.items = newItems;
351
+ this.emitChange();
352
+ };
353
+ this.handleAddProperty = () => {
354
+ this.items = [...this.items, { path: '' }];
355
+ this.emitChange();
356
+ };
357
+ }
358
+ componentWillLoad() {
359
+ var _a;
360
+ if ((_a = this.value) === null || _a === void 0 ? void 0 : _a.object) {
361
+ const converted = propertySelectionToItems(this.value.object);
362
+ if (converted.length > 0) {
363
+ this.items = converted;
364
+ }
365
+ }
366
+ }
367
+ componentWillUpdate() {
368
+ var _a;
369
+ if ((_a = this.value) === null || _a === void 0 ? void 0 : _a.object) {
370
+ const currentItems = propertySelectionToItems(this.value.object);
371
+ // Check if items have changed
372
+ const itemsChanged = currentItems.length !== this.items.length ||
373
+ !currentItems.every((item, index) => {
374
+ const current = this.items[index];
375
+ return (current &&
376
+ item.path === current.path &&
377
+ item.alias === current.alias &&
378
+ item.description === current.description);
379
+ });
380
+ if (itemsChanged) {
381
+ this.items =
382
+ currentItems.length > 0 ? currentItems : [{ path: '_id' }];
383
+ }
384
+ }
385
+ }
386
+ render() {
387
+ if (!this.limetype) {
388
+ return (index.h("div", { class: "empty-state" }, index.h("p", null, "Select a limetype to choose properties")));
389
+ }
390
+ return (index.h("div", { class: "response-format-editor" }, index.h("div", { class: "header" }, index.h("h4", null, this.label)), index.h("div", { class: "property-list" }, this.items.map((item, index) => this.renderItem(item, index))), index.h("div", { class: "actions" }, index.h("limel-button", { label: "Add Property", icon: "plus_math", onClick: this.handleAddProperty })), index.h("div", { class: "summary" }, index.h("span", { class: "count" }, this.items.length, ' ', this.items.length === 1 ? 'property' : 'properties', ' ', "selected"))));
391
+ }
392
+ renderItem(item, index$1) {
393
+ return (index.h("limebb-response-format-item", { key: `${item.path}-${index$1}`, class: "property-item", platform: this.platform, context: this.context, limetype: this.limetype, item: item, onItemChange: this.handleItemChange(index$1) }));
394
+ }
395
+ emitChange() {
396
+ const propertySelection = itemsToPropertySelection(this.items);
397
+ const responseFormat = {
398
+ object: propertySelection,
399
+ };
400
+ this.change.emit(responseFormat);
401
+ }
402
+ };
403
+ ResponseFormatEditor.style = LimebbResponseFormatEditorStyle0;
404
+
405
+ exports.limebb_limetype_field = LimetypeField;
406
+ exports.limebb_response_format_editor = ResponseFormatEditor;
@@ -13,8 +13,8 @@ const LiveDocsInfo = class {
13
13
  }
14
14
  render() {
15
15
  return [
16
- index.h("div", { key: 'afca6783253565c24917f26fa037d47555cc79ee', class: "header" }, index.h("limel-icon", { key: 'e3119195e169a5c1b5534985d92537f4bd71036c', name: "not_showing_video_frames" }), index.h("h2", { key: 'a00ac4d1cccf23e00975d0f95f423b3179170d1f' }, "Viewing this file type requires ", index.h("em", { key: 'cd66615d34d92b74943d0d87c796ac5d14f3f314' }, "Live Docs"))),
17
- index.h("p", { key: '39d0f82f29ec687cfd209b9c32c36b3be08b23aa' }, index.h("em", { key: 'aea7387f90684dc1571434530708971800a09d49' }, "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: 'a254ad58b3d56386bae9e3ef4113b8d6c70a236e', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
16
+ index.h("div", { key: '98c48e74c9cade3b2da713618d585dd8f80e3116', class: "header" }, index.h("limel-icon", { key: 'b8f56066533f64842a25a324c2794914700c2e8a', name: "not_showing_video_frames" }), index.h("h2", { key: 'c1e8c722d1fc7d22a85f348a66094ffd8c5a5dd3' }, "Viewing this file type requires ", index.h("em", { key: '8aca798b2cf1bfe81be5142496e693f57efea8b1' }, "Live Docs"))),
17
+ index.h("p", { key: '3934d0c93f6c4b6524643c2ecadd0f3f0f925b09' }, index.h("em", { key: '1d3b811bf94ba19644231e77434442f9f1ade8f6' }, "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: '023c16b0cfc5b57d750c9a344690fcce51350100', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
18
18
  ];
19
19
  }
20
20
  };