@limetech/lime-crm-building-blocks 1.126.0 → 1.126.2

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 (166) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{index.esm-QC7n_5ug.js → index.esm-C1i_NocP.js} +274 -217
  3. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  4. package/dist/cjs/{lime-query-validation-Djq87Kvd.js → lime-query-validation-DOruuzFE.js} +7 -7
  5. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-data-cells.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-info-tile.cjs.entry.js +8 -8
  17. package/dist/cjs/limebb-kanban-group.cjs.entry.js +2 -2
  18. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
  20. package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +6 -6
  21. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +17 -17
  22. package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +11 -11
  23. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
  24. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +3 -3
  25. package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  29. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
  31. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +1 -1
  32. package/dist/cjs/limebb-property-selector.cjs.entry.js +3 -3
  33. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +6 -4
  34. package/dist/cjs/limebb-rule-editor.cjs.entry.js +21 -18
  35. package/dist/cjs/limebb-rule-gate.cjs.entry.js +2 -2
  36. package/dist/cjs/limebb-text-editor.cjs.entry.js +5 -5
  37. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  38. package/dist/cjs/{limetype-C1krEdDi.js → limetype-BlG0Apxb.js} +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +6 -4
  41. package/dist/collection/components/rule-editor/rule-editor.js +14 -14
  42. package/dist/collection/components/rule-editor/view-helpers.js +14 -11
  43. package/dist/collection/components/rule-gate/rule-gate.js +6 -6
  44. package/dist/components/chat-item.js +1 -1
  45. package/dist/components/currency-picker.js +1 -1
  46. package/dist/components/date-picker.js +1 -1
  47. package/dist/components/feed-timeline-item.js +1 -1
  48. package/dist/components/index.esm.js +1 -1
  49. package/dist/components/kanban-group.js +1 -1
  50. package/dist/components/kanban-item.js +1 -1
  51. package/dist/components/lime-query-filter-builder.js +1 -1
  52. package/dist/components/lime-query-filter-comparison.js +1 -1
  53. package/dist/components/lime-query-filter-expression.js +1 -1
  54. package/dist/components/lime-query-validation.js +1 -1
  55. package/dist/components/lime-query-value-input.js +1 -1
  56. package/dist/components/limebb-browser.js +1 -1
  57. package/dist/components/limebb-chat-list.js +1 -1
  58. package/dist/components/limebb-component-config.js +1 -1
  59. package/dist/components/limebb-component-picker.js +1 -1
  60. package/dist/components/limebb-composer-toolbar.js +1 -1
  61. package/dist/components/limebb-data-cells.js +1 -1
  62. package/dist/components/limebb-feed.js +1 -1
  63. package/dist/components/limebb-info-tile.js +1 -1
  64. package/dist/components/limebb-lime-query-builder.js +1 -1
  65. package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
  66. package/dist/components/limebb-limeobject-file-viewer.js +1 -1
  67. package/dist/components/limebb-loader.js +1 -1
  68. package/dist/components/limebb-locale-picker.js +1 -1
  69. package/dist/components/limebb-mention.js +1 -1
  70. package/dist/components/limebb-notification-list.js +1 -1
  71. package/dist/components/limebb-object-chip.js +1 -1
  72. package/dist/components/limebb-rule-editor.js +1 -1
  73. package/dist/components/limebb-rule-gate.js +1 -1
  74. package/dist/components/limebb-text-editor.js +1 -1
  75. package/dist/components/limebb-trend-indicator.js +1 -1
  76. package/dist/components/limetype-field.js +1 -1
  77. package/dist/components/notification-item.js +1 -1
  78. package/dist/components/percentage-visualizer.js +1 -1
  79. package/dist/components/property-selector.js +1 -1
  80. package/dist/components/rule-chip-popover.js +1 -1
  81. package/dist/esm/{index.esm-EC5zE5lw.js → index.esm-CMeGYws2.js} +267 -210
  82. package/dist/esm/lime-crm-building-blocks.js +1 -1
  83. package/dist/esm/{lime-query-validation-Dav-tsNr.js → lime-query-validation-DvCLebd2.js} +7 -7
  84. package/dist/esm/limebb-browser.entry.js +1 -1
  85. package/dist/esm/limebb-chat-icon-list_3.entry.js +1 -1
  86. package/dist/esm/limebb-chat-list.entry.js +1 -1
  87. package/dist/esm/limebb-component-config.entry.js +1 -1
  88. package/dist/esm/limebb-component-picker.entry.js +1 -1
  89. package/dist/esm/limebb-composer-toolbar.entry.js +1 -1
  90. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  91. package/dist/esm/limebb-data-cells.entry.js +1 -1
  92. package/dist/esm/limebb-date-picker.entry.js +1 -1
  93. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  94. package/dist/esm/limebb-feed.entry.js +1 -1
  95. package/dist/esm/limebb-info-tile.entry.js +8 -8
  96. package/dist/esm/limebb-kanban-group.entry.js +2 -2
  97. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  98. package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
  99. package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +6 -6
  100. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +17 -17
  101. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +11 -11
  102. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
  103. package/dist/esm/limebb-limeobject-file-viewer.entry.js +3 -3
  104. package/dist/esm/limebb-loader.entry.js +1 -1
  105. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  106. package/dist/esm/limebb-mention.entry.js +1 -1
  107. package/dist/esm/limebb-notification-item.entry.js +1 -1
  108. package/dist/esm/limebb-notification-list.entry.js +1 -1
  109. package/dist/esm/limebb-object-chip.entry.js +3 -3
  110. package/dist/esm/limebb-percentage-visualizer.entry.js +1 -1
  111. package/dist/esm/limebb-property-selector.entry.js +3 -3
  112. package/dist/esm/limebb-rule-chip-popover.entry.js +6 -4
  113. package/dist/esm/limebb-rule-editor.entry.js +21 -18
  114. package/dist/esm/limebb-rule-gate.entry.js +2 -2
  115. package/dist/esm/limebb-text-editor.entry.js +5 -5
  116. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  117. package/dist/esm/{limetype-COL4hyNy.js → limetype-DvPoeXt-.js} +1 -1
  118. package/dist/esm/loader.js +1 -1
  119. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  120. package/dist/lime-crm-building-blocks/{p-7d51a34c.entry.js → p-006b6449.entry.js} +1 -1
  121. package/dist/lime-crm-building-blocks/{p-c469db7e.entry.js → p-10ddd002.entry.js} +1 -1
  122. package/dist/lime-crm-building-blocks/{p-277b6ad4.entry.js → p-1955495c.entry.js} +1 -1
  123. package/dist/lime-crm-building-blocks/{p-11494f30.entry.js → p-25234f4b.entry.js} +1 -1
  124. package/dist/lime-crm-building-blocks/{p-abcb1e49.entry.js → p-2a05b949.entry.js} +1 -1
  125. package/dist/lime-crm-building-blocks/p-30778dac.entry.js +1 -0
  126. package/dist/lime-crm-building-blocks/{p-1797622d.entry.js → p-47799e80.entry.js} +1 -1
  127. package/dist/lime-crm-building-blocks/{p-fd6dcfe3.entry.js → p-49b8a9ca.entry.js} +1 -1
  128. package/dist/lime-crm-building-blocks/p-6093254e.entry.js +1 -0
  129. package/dist/lime-crm-building-blocks/{p-b8d9ff68.entry.js → p-610dae2e.entry.js} +1 -1
  130. package/dist/lime-crm-building-blocks/p-62b247c1.entry.js +1 -0
  131. package/dist/lime-crm-building-blocks/p-65ea94b4.entry.js +1 -0
  132. package/dist/lime-crm-building-blocks/{p-dd38e0ba.entry.js → p-7975c91f.entry.js} +1 -1
  133. package/dist/lime-crm-building-blocks/{p-c4f41ec4.entry.js → p-7ace2e41.entry.js} +1 -1
  134. package/dist/lime-crm-building-blocks/{p-8084e825.entry.js → p-89170cc9.entry.js} +1 -1
  135. package/dist/lime-crm-building-blocks/{p-3781a766.entry.js → p-92738a30.entry.js} +1 -1
  136. package/dist/lime-crm-building-blocks/{p-71a6f624.entry.js → p-99054b73.entry.js} +1 -1
  137. package/dist/lime-crm-building-blocks/{p-f09c7244.entry.js → p-993991af.entry.js} +1 -1
  138. package/dist/lime-crm-building-blocks/{p-f0a567f3.entry.js → p-99790629.entry.js} +1 -1
  139. package/dist/lime-crm-building-blocks/{p-74455a30.entry.js → p-9ccd9d7f.entry.js} +1 -1
  140. package/dist/lime-crm-building-blocks/{p-f5244a1a.entry.js → p-9f03e766.entry.js} +1 -1
  141. package/dist/lime-crm-building-blocks/{p-CAMipqwt.js → p-CI7dwT4T.js} +1 -1
  142. package/dist/lime-crm-building-blocks/{p-C25FPZQh.js → p-CYiNR7pQ.js} +1 -1
  143. package/dist/lime-crm-building-blocks/p-D5qhls4G.js +1 -0
  144. package/dist/lime-crm-building-blocks/{p-8d6cc027.entry.js → p-a3439b73.entry.js} +1 -1
  145. package/dist/lime-crm-building-blocks/{p-6ada2b2b.entry.js → p-a634c792.entry.js} +1 -1
  146. package/dist/lime-crm-building-blocks/{p-b1a8d1a0.entry.js → p-b978301b.entry.js} +1 -1
  147. package/dist/lime-crm-building-blocks/{p-43a7facd.entry.js → p-beae8aa1.entry.js} +1 -1
  148. package/dist/lime-crm-building-blocks/{p-e6ed33ff.entry.js → p-c3a72b03.entry.js} +1 -1
  149. package/dist/lime-crm-building-blocks/{p-6d3a9ed3.entry.js → p-c43dc121.entry.js} +1 -1
  150. package/dist/lime-crm-building-blocks/{p-7a125570.entry.js → p-d026068f.entry.js} +1 -1
  151. package/dist/lime-crm-building-blocks/p-d1c61830.entry.js +1 -0
  152. package/dist/lime-crm-building-blocks/{p-057e1638.entry.js → p-d33efebb.entry.js} +1 -1
  153. package/dist/lime-crm-building-blocks/{p-24fc049c.entry.js → p-e1e1e2d1.entry.js} +1 -1
  154. package/dist/lime-crm-building-blocks/{p-c139ab98.entry.js → p-e468e359.entry.js} +1 -1
  155. package/dist/lime-crm-building-blocks/{p-35c72752.entry.js → p-ea461bb7.entry.js} +1 -1
  156. package/dist/types/components/rule-editor/rule-editor.d.ts +5 -5
  157. package/dist/types/components/rule-editor/view-helpers.d.ts +7 -3
  158. package/dist/types/components/rule-gate/rule-gate.d.ts +2 -2
  159. package/dist/types/components.d.ts +12 -12
  160. package/package.json +4 -5
  161. package/dist/lime-crm-building-blocks/p-1831e571.entry.js +0 -1
  162. package/dist/lime-crm-building-blocks/p-3313e357.entry.js +0 -1
  163. package/dist/lime-crm-building-blocks/p-7922726c.entry.js +0 -1
  164. package/dist/lime-crm-building-blocks/p-BeLcuSg8.js +0 -1
  165. package/dist/lime-crm-building-blocks/p-cefb24bb.entry.js +0 -1
  166. package/dist/lime-crm-building-blocks/p-e717bdff.entry.js +0 -1
@@ -14,7 +14,7 @@ import { createPrimitiveOptions } from "./view-helpers";
14
14
  * The component is value-in / value-out. Pass `value` and listen for
15
15
  * `change`; persistence is the caller's concern.
16
16
  *
17
- * Pass `availableSubjects` to forward the list of subject slots the
17
+ * Pass `availableContexts` to forward the list of context keys the
18
18
  * caller knows will be available where the rule runs. The component
19
19
  * forwards it to `RuleRegistry.validate` so `missing-slot` diagnostics
20
20
  * surface inline on the offending nodes.
@@ -61,7 +61,7 @@ export class RuleEditor {
61
61
  }
62
62
  this.runValidation();
63
63
  }
64
- onAvailableSubjectsChange() {
64
+ onAvailableContextsChange() {
65
65
  this.runValidation();
66
66
  }
67
67
  render() {
@@ -69,7 +69,7 @@ export class RuleEditor {
69
69
  'rule-editor': true,
70
70
  'rule-editor--disabled': this.disabled,
71
71
  };
72
- return (h("div", { key: 'd179f399433b3c80aa09e52baa19713eef7c1921', class: containerClasses }, this.renderLabel(), h(RuleNodeView, { key: '14cac42e37f52f0a32390a1f374f014b60e31dde', node: this.normalizedValue, path: [], ctx: this.createRenderContext() }), this.renderHelperText()));
72
+ return (h("div", { key: '8e0da39f6544c86de0143e91a6c48c9f2654315f', class: containerClasses }, this.renderLabel(), h(RuleNodeView, { key: 'cd093f5dc5a9b747036f581e6230f1205cf834e6', node: this.normalizedValue, path: [], ctx: this.createRenderContext() }), this.renderHelperText()));
73
73
  }
74
74
  renderLabel() {
75
75
  if (!this.label) {
@@ -106,14 +106,14 @@ export class RuleEditor {
106
106
  var _a, _b, _c;
107
107
  const metadata = (_c = (_b = (_a = this.ruleRegistry).listMetadata) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
108
108
  this.metadataById = new Map(metadata.map((item) => [item.id, item]));
109
- this.primitiveOptions = createPrimitiveOptions(this.metadataById);
109
+ this.primitiveOptions = createPrimitiveOptions(this.metadataById, this.platform.get(PlatformServiceName.Translate));
110
110
  }
111
111
  runValidation() {
112
112
  if (!this.value) {
113
113
  this.issues = [];
114
114
  return;
115
115
  }
116
- const result = this.ruleRegistry.validate(this.normalizedValue, this.availableSubjects);
116
+ const result = this.ruleRegistry.validate(this.normalizedValue, this.availableContexts);
117
117
  this.issues = result.ok ? [] : result.issues;
118
118
  }
119
119
  emitIfChanged(next) {
@@ -253,18 +253,18 @@ export class RuleEditor {
253
253
  "getter": false,
254
254
  "setter": false
255
255
  },
256
- "availableSubjects": {
256
+ "availableContexts": {
257
257
  "type": "unknown",
258
258
  "mutable": false,
259
259
  "complexType": {
260
- "original": "(keyof SubjectRegistry)[]",
261
- "resolved": "(keyof SubjectRegistry)[] | undefined",
260
+ "original": "(keyof ContextMap)[]",
261
+ "resolved": "(keyof ContextMap)[] | undefined",
262
262
  "references": {
263
- "SubjectRegistry": {
263
+ "ContextMap": {
264
264
  "location": "import",
265
265
  "path": "@limetech/lime-web-components",
266
- "id": "node_modules::SubjectRegistry",
267
- "referenceLocation": "SubjectRegistry"
266
+ "id": "node_modules::ContextMap",
267
+ "referenceLocation": "ContextMap"
268
268
  }
269
269
  }
270
270
  },
@@ -272,7 +272,7 @@ export class RuleEditor {
272
272
  "optional": true,
273
273
  "docs": {
274
274
  "tags": [],
275
- "text": "Subject slots the caller knows will be available where the rule\nruns. Forwarded to the rule registry's `validate` method so\n`missing-slot` issues surface inline. Leave unset when the\nevaluation context is not known (typical for editors that target\nthe saved-rule library)."
275
+ "text": "Context keys the caller knows will be available where the rule\nruns. Forwarded to the rule registry's `validate` method so\n`missing-slot` issues surface inline. Leave unset when the\nevaluation context is not known (typical for editors that target\nthe saved-rule library)."
276
276
  },
277
277
  "getter": false,
278
278
  "setter": false
@@ -425,8 +425,8 @@ export class RuleEditor {
425
425
  "propName": "value",
426
426
  "methodName": "onValueChange"
427
427
  }, {
428
- "propName": "availableSubjects",
429
- "methodName": "onAvailableSubjectsChange"
428
+ "propName": "availableContexts",
429
+ "methodName": "onAvailableContextsChange"
430
430
  }];
431
431
  }
432
432
  }
@@ -17,20 +17,23 @@ export function nodeClasses(type, issues) {
17
17
  }
18
18
  /**
19
19
  * Build the searchable list shown by the primitive pickers. Cached on
20
- * the render context so it isn't recomputed per node.
20
+ * the render context so it isn't recomputed per node. `meta.title` and
21
+ * `meta.description` are passed through the translator so callers can
22
+ * register translation keys as metadata — plain strings travel through
23
+ * unchanged.
21
24
  * @param metadataById
25
+ * @param translator
22
26
  */
23
- export function createPrimitiveOptions(metadataById) {
27
+ export function createPrimitiveOptions(metadataById, translator) {
24
28
  return [...metadataById.values()]
25
- .map((meta) => {
26
- var _a, _b;
27
- return ({
28
- value: meta.id,
29
- text: (_a = meta.title) !== null && _a !== void 0 ? _a : meta.id,
30
- secondaryText: (_b = meta.description) !== null && _b !== void 0 ? _b : '',
31
- icon: meta.icon,
32
- });
33
- })
29
+ .map((meta) => ({
30
+ value: meta.id,
31
+ text: meta.title ? translator.get(meta.title) : meta.id,
32
+ secondaryText: meta.description
33
+ ? translator.get(meta.description)
34
+ : '',
35
+ icon: meta.icon,
36
+ }))
34
37
  .sort((a, b) => a.text.localeCompare(b.text));
35
38
  }
36
39
  /**
@@ -26,7 +26,7 @@ export class RuleGate {
26
26
  this.compileAndEvaluate();
27
27
  }
28
28
  render() {
29
- return (h(Host, { key: 'b3663501f4878923c36018812e60bfad702c1173', hidden: !this.shouldRender }, h("slot", { key: '1d3193332f682bd6ccb0f0ecc065b8c757f504eb' })));
29
+ return (h(Host, { key: '365df6908301371b8b964671382ad936971b6624', hidden: !this.shouldRender }, h("slot", { key: 'ca7c2a9febf0189dfae882a2ae894d1d0262a213' })));
30
30
  }
31
31
  get ruleRegistry() {
32
32
  return this.platform.get(PlatformServiceName.RuleRegistry);
@@ -107,14 +107,14 @@ export class RuleGate {
107
107
  "type": "unknown",
108
108
  "mutable": false,
109
109
  "complexType": {
110
- "original": "RuleScope",
111
- "resolved": "RuleScope | undefined",
110
+ "original": "ContextScope",
111
+ "resolved": "ContextScope<keyof ContextMap> | undefined",
112
112
  "references": {
113
- "RuleScope": {
113
+ "ContextScope": {
114
114
  "location": "import",
115
115
  "path": "@limetech/lime-web-components",
116
- "id": "node_modules::RuleScope",
117
- "referenceLocation": "RuleScope"
116
+ "id": "node_modules::ContextScope",
117
+ "referenceLocation": "ContextScope"
118
118
  }
119
119
  }
120
120
  },
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as i,Host as r,transformTag as o}from"@stencil/core/internal/client";import{n as a}from"./index.esm.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.hasError=!1,this.createActionBarItem=t=>{var e,i;if("separator"in t)return t;let r={value:t,text:null!==(e=t.label)&&void 0!==e?e:"",secondaryText:t.description,disabled:t.disabled};return!t.label&&t.icon?r=Object.assign(Object.assign({},r),{icon:t.icon,text:null!==(i=t.description)&&void 0!==i?i:r.text,iconOnly:!0}):t.icon&&(r=Object.assign(Object.assign({},r),{icon:t.icon})),r},this.handleActionBarItemSelect=t=>{var e;t.stopPropagation();const i=null===(e=t.detail.value)||void 0===e?void 0:e.command;i&&this.commandbus.handle(i)},this.createMenuItem=t=>{var e,i;return"separator"in t?t:{value:t,text:null!==(e=t.label)&&void 0!==e?e:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(i=t.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=t=>{var e;t.stopPropagation();const i=null===(e=t.detail.value)||void 0===e?void 0:e.command;i&&this.commandbus.handle(i)}}render(){const t=`helper-text-${this.item.id}`;return i(r,{key:"971b486298a8f88790178592c174561bdc3b7b13",id:this.item.id,"aria-describedby":this.helperText?t:void 0,"aria-live":this.hasError?"assertive":"off",class:{[`${this.item.ui}`]:!0}},i("div",{key:"b5cde4080a9c6e4d30d89b8d9a323e41d913d00b",class:"bubble-content"},i("div",{key:"1d674bfb86bd0356bbbb1244848f7f9fe2f04916",class:"icon-picture"},this.renderIcon(),this.renderAuthorPicture()),this.renderErrorSign(),i("div",{key:"b4c34568322082230de44312c42b98d86b5a28fc",class:"item"},this.renderHeader(),this.renderValue(),i("footer",{key:"b9a5026726ac13dfe01e02263ace3817c3d71ad4"},this.renderHelperText(t),this.renderTimestamp()))),this.renderPromotedAction())}renderErrorSign(){if(this.hasError)return i("limel-icon",{class:"error-sign",name:"brake_warning"})}renderHeader(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.name)return i("header",null,this.renderAuthorName(),i("div",{class:"action-buttons"},this.renderUnpromotedActionsMenu()))}renderIcon(){var t,e,r,o;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(e=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==e?e:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderHelperText(t){if(this.helperText)return i("span",{class:"helper-text",id:t},this.helperText)}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body-text reset-img-height",value:this.item.value})}renderAuthorName(){var t,e;if("string"==typeof(null===(t=this.item.author)||void 0===t?void 0:t.name))return i("span",{class:"author"},this.item.author.name);if("object"==typeof(null===(e=this.item.author)||void 0===e?void 0:e.name)){const{href:t,title:e,text:r}=this.item.author.name;return i("a",{class:"author",href:t,title:e},r)}}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return"limel-ai-avatar"===this.item.author.picture?i("limel-ai-avatar",{class:"author-avatar"}):i("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderUnpromotedActionsMenu(){var t,e;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more-actions")}))}renderPromotedAction(){if(!this.item.promotedActions)return;const t=this.item.promotedActions.map(this.createActionBarItem);return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:t,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const t=this.item.timestamp;if(t)return i("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(a.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(a.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(a.CommandBus)}static get style(){return'@charset "UTF-8";*{box-sizing:border-box}:host(limebb-chat-item){display:flex;flex-direction:column;gap:0.25rem;min-width:0;min-height:0;max-width:calc(100% - 2rem)}.bubble-content{display:flex;gap:0.25rem;min-width:0;min-height:0}:host(limebb-chat-item:hover) .helper-text,:host(limebb-chat-item:hover) .timestamp,:host(limebb-chat-item:focus-within) .helper-text,:host(limebb-chat-item:focus-within) .timestamp{opacity:1}:host(limebb-chat-item.mine){margin-left:auto}:host(limebb-chat-item.mine) .item{border-bottom-right-radius:0.125rem;background-color:rgb(var(--color-sky-default), 0.2)}:host(limebb-chat-item.mine) .bubble-content{justify-content:end}:host(limebb-chat-item.mine) .icon-picture{order:2}:host(limebb-chat-item.theirs){margin-right:auto}:host(limebb-chat-item.theirs) .item{border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-300), 0.7)}.item{display:flex;flex-direction:column;min-width:0;border-radius:1.25rem;padding:0 0.25rem 0.25rem 0.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.icon-picture{display:flex;flex-direction:column;gap:0.5rem;align-items:center;justify-content:flex-end}.icon-picture:has(.author-avatar) limel-icon{width:1.25rem;padding:0.125rem}.icon{--icon-background-color:rgb(var(--contrast-500), 0.5);flex-shrink:0;padding:0.375rem;width:2.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-ai-avatar.author-avatar{background-color:rgb(var(--color-glaucous-darker))}header{display:flex;justify-content:space-between;align-items:center;min-height:2rem;padding-left:0.5rem}header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.body-text{padding:0.25rem 0.5rem}footer{display:flex;justify-content:space-between;align-items:end;gap:0.5rem;font-size:x-small}footer:not(:empty){padding:0 0.25rem 0.125rem 0.5rem}footer *{transition:opacity 0.2s ease;opacity:0.4}.timestamp{margin-left:auto}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-chat-item:hover) .action-bar,:host(limebb-chat-item:focus-within) .action-bar,:host(limebb-chat-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-chat-item:hover) limel-action-bar,:host(limebb-chat-item:focus-within) limel-action-bar,:host(limebb-chat-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-chat-item:hover),:host(limebb-chat-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}.action-bar{min-width:0;width:calc(100% - calc(2rem + 0.25rem))}:host(limebb-chat-item.theirs) .action-bar{margin-left:calc(2rem + 0.25rem)}:host(limebb-chat-item[has-error]:not([has-error=false])) .bubble-content{cursor:help}:host(limebb-chat-item[has-error]:not([has-error=false])) .item{border:1px solid rgb(var(--color-red-default))}:host(limebb-chat-item[has-error]:not([has-error=false])) .error-sign{color:rgb(var(--color-red-default));flex-shrink:0;width:1.25rem;align-self:center}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .action-bar{padding-left:1.25rem}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}'}},[1,"limebb-chat-item",{platform:[16],context:[16],item:[16],helperText:[1,"helper-text"],hasError:[516,"has-error"]}]);function n(){"undefined"!=typeof customElements&&["limebb-chat-item"].forEach((t=>{"limebb-chat-item"===t&&(customElements.get(o(t))||customElements.define(o(t),s))}))}export{s as C,n as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as i,Host as r,transformTag as o}from"@stencil/core/internal/client";import{b as a}from"./index.esm.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.hasError=!1,this.createActionBarItem=t=>{var e,i;if("separator"in t)return t;let r={value:t,text:null!==(e=t.label)&&void 0!==e?e:"",secondaryText:t.description,disabled:t.disabled};return!t.label&&t.icon?r=Object.assign(Object.assign({},r),{icon:t.icon,text:null!==(i=t.description)&&void 0!==i?i:r.text,iconOnly:!0}):t.icon&&(r=Object.assign(Object.assign({},r),{icon:t.icon})),r},this.handleActionBarItemSelect=t=>{var e;t.stopPropagation();const i=null===(e=t.detail.value)||void 0===e?void 0:e.command;i&&this.commandbus.handle(i)},this.createMenuItem=t=>{var e,i;return"separator"in t?t:{value:t,text:null!==(e=t.label)&&void 0!==e?e:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(i=t.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=t=>{var e;t.stopPropagation();const i=null===(e=t.detail.value)||void 0===e?void 0:e.command;i&&this.commandbus.handle(i)}}render(){const t=`helper-text-${this.item.id}`;return i(r,{key:"971b486298a8f88790178592c174561bdc3b7b13",id:this.item.id,"aria-describedby":this.helperText?t:void 0,"aria-live":this.hasError?"assertive":"off",class:{[`${this.item.ui}`]:!0}},i("div",{key:"b5cde4080a9c6e4d30d89b8d9a323e41d913d00b",class:"bubble-content"},i("div",{key:"1d674bfb86bd0356bbbb1244848f7f9fe2f04916",class:"icon-picture"},this.renderIcon(),this.renderAuthorPicture()),this.renderErrorSign(),i("div",{key:"b4c34568322082230de44312c42b98d86b5a28fc",class:"item"},this.renderHeader(),this.renderValue(),i("footer",{key:"b9a5026726ac13dfe01e02263ace3817c3d71ad4"},this.renderHelperText(t),this.renderTimestamp()))),this.renderPromotedAction())}renderErrorSign(){if(this.hasError)return i("limel-icon",{class:"error-sign",name:"brake_warning"})}renderHeader(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.name)return i("header",null,this.renderAuthorName(),i("div",{class:"action-buttons"},this.renderUnpromotedActionsMenu()))}renderIcon(){var t,e,r,o;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(e=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==e?e:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderHelperText(t){if(this.helperText)return i("span",{class:"helper-text",id:t},this.helperText)}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body-text reset-img-height",value:this.item.value})}renderAuthorName(){var t,e;if("string"==typeof(null===(t=this.item.author)||void 0===t?void 0:t.name))return i("span",{class:"author"},this.item.author.name);if("object"==typeof(null===(e=this.item.author)||void 0===e?void 0:e.name)){const{href:t,title:e,text:r}=this.item.author.name;return i("a",{class:"author",href:t,title:e},r)}}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return"limel-ai-avatar"===this.item.author.picture?i("limel-ai-avatar",{class:"author-avatar"}):i("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderUnpromotedActionsMenu(){var t,e;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more-actions")}))}renderPromotedAction(){if(!this.item.promotedActions)return;const t=this.item.promotedActions.map(this.createActionBarItem);return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:t,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const t=this.item.timestamp;if(t)return i("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(a.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(a.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(a.CommandBus)}static get style(){return'@charset "UTF-8";*{box-sizing:border-box}:host(limebb-chat-item){display:flex;flex-direction:column;gap:0.25rem;min-width:0;min-height:0;max-width:calc(100% - 2rem)}.bubble-content{display:flex;gap:0.25rem;min-width:0;min-height:0}:host(limebb-chat-item:hover) .helper-text,:host(limebb-chat-item:hover) .timestamp,:host(limebb-chat-item:focus-within) .helper-text,:host(limebb-chat-item:focus-within) .timestamp{opacity:1}:host(limebb-chat-item.mine){margin-left:auto}:host(limebb-chat-item.mine) .item{border-bottom-right-radius:0.125rem;background-color:rgb(var(--color-sky-default), 0.2)}:host(limebb-chat-item.mine) .bubble-content{justify-content:end}:host(limebb-chat-item.mine) .icon-picture{order:2}:host(limebb-chat-item.theirs){margin-right:auto}:host(limebb-chat-item.theirs) .item{border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-300), 0.7)}.item{display:flex;flex-direction:column;min-width:0;border-radius:1.25rem;padding:0 0.25rem 0.25rem 0.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.icon-picture{display:flex;flex-direction:column;gap:0.5rem;align-items:center;justify-content:flex-end}.icon-picture:has(.author-avatar) limel-icon{width:1.25rem;padding:0.125rem}.icon{--icon-background-color:rgb(var(--contrast-500), 0.5);flex-shrink:0;padding:0.375rem;width:2.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-ai-avatar.author-avatar{background-color:rgb(var(--color-glaucous-darker))}header{display:flex;justify-content:space-between;align-items:center;min-height:2rem;padding-left:0.5rem}header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.body-text{padding:0.25rem 0.5rem}footer{display:flex;justify-content:space-between;align-items:end;gap:0.5rem;font-size:x-small}footer:not(:empty){padding:0 0.25rem 0.125rem 0.5rem}footer *{transition:opacity 0.2s ease;opacity:0.4}.timestamp{margin-left:auto}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-chat-item:hover) .action-bar,:host(limebb-chat-item:focus-within) .action-bar,:host(limebb-chat-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-chat-item:hover) limel-action-bar,:host(limebb-chat-item:focus-within) limel-action-bar,:host(limebb-chat-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-chat-item:hover),:host(limebb-chat-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}.action-bar{min-width:0;width:calc(100% - calc(2rem + 0.25rem))}:host(limebb-chat-item.theirs) .action-bar{margin-left:calc(2rem + 0.25rem)}:host(limebb-chat-item[has-error]:not([has-error=false])) .bubble-content{cursor:help}:host(limebb-chat-item[has-error]:not([has-error=false])) .item{border:1px solid rgb(var(--color-red-default))}:host(limebb-chat-item[has-error]:not([has-error=false])) .error-sign{color:rgb(var(--color-red-default));flex-shrink:0;width:1.25rem;align-self:center}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .action-bar{padding-left:1.25rem}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}'}},[1,"limebb-chat-item",{platform:[16],context:[16],item:[16],helperText:[1,"helper-text"],hasError:[516,"has-error"]}]);function n(){"undefined"!=typeof customElements&&["limebb-chat-item"].forEach((t=>{"limebb-chat-item"===t&&(customElements.get(o(t))||customElements.define(o(t),s))}))}export{s as C,n as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as r,createEvent as n,h as i,transformTag as c}from"@stencil/core/internal/client";import{n as u}from"./index.esm.js";import{i as o}from"./non-null.js";var a,t,s,d,l,m,b,g,y={},h={exports:{}};function S(){if(s)return h.exports;s=1;var e=h.exports=function(r,n){if("function"==typeof r||n)return e.by(r,n);for(var i={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},c=[],u=0;u<r.length;u++){var o=r[u],a="__proto__"===o?i.objects:i[typeof o]||i.objects;Array.isArray(a)?a.indexOf(o)<0&&(a.push(o),c.push(o)):Object.hasOwnProperty.call(a,o)||(a[o]=!0,c.push(o))}return c};return e.by=function(e,r){if("function"==typeof e){var n=r;r=e,e=n}for(var i=[],c=0;c<e.length;c++){for(var u=e[c],o=!1,a=0;a<i.length;a++)if(r.call(i,u,i[a])){o=!0;break}o||i.push(u)}return i},h.exports}function D(){return l?d:(l=1,d=[{code:"AED",number:"784",digits:2,currency:"UAE Dirham",countries:["United Arab Emirates (The)"]},{code:"AFN",number:"971",digits:2,currency:"Afghani",countries:["Afghanistan"]},{code:"ALL",number:"008",digits:2,currency:"Lek",countries:["Albania"]},{code:"AMD",number:"051",digits:2,currency:"Armenian Dram",countries:["Armenia"]},{code:"ANG",number:"532",digits:2,currency:"Netherlands Antillean Guilder",countries:["Curaçao","Sint Maarten (Dutch Part)"]},{code:"AOA",number:"973",digits:2,currency:"Kwanza",countries:["Angola"]},{code:"ARS",number:"032",digits:2,currency:"Argentine Peso",countries:["Argentina"]},{code:"AUD",number:"036",digits:2,currency:"Australian Dollar",countries:["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},{code:"AWG",number:"533",digits:2,currency:"Aruban Florin",countries:["Aruba"]},{code:"AZN",number:"944",digits:2,currency:"Azerbaijan Manat",countries:["Azerbaijan"]},{code:"BAM",number:"977",digits:2,currency:"Convertible Mark",countries:["Bosnia and Herzegovina"]},{code:"BBD",number:"052",digits:2,currency:"Barbados Dollar",countries:["Barbados"]},{code:"BDT",number:"050",digits:2,currency:"Taka",countries:["Bangladesh"]},{code:"BGN",number:"975",digits:2,currency:"Bulgarian Lev",countries:["Bulgaria"]},{code:"BHD",number:"048",digits:3,currency:"Bahraini Dinar",countries:["Bahrain"]},{code:"BIF",number:"108",digits:0,currency:"Burundi Franc",countries:["Burundi"]},{code:"BMD",number:"060",digits:2,currency:"Bermudian Dollar",countries:["Bermuda"]},{code:"BND",number:"096",digits:2,currency:"Brunei Dollar",countries:["Brunei Darussalam"]},{code:"BOB",number:"068",digits:2,currency:"Boliviano",countries:["Bolivia (Plurinational State Of)"]},{code:"BOV",number:"984",digits:2,currency:"Mvdol",countries:["Bolivia (Plurinational State Of)"]},{code:"BRL",number:"986",digits:2,currency:"Brazilian Real",countries:["Brazil"]},{code:"BSD",number:"044",digits:2,currency:"Bahamian Dollar",countries:["Bahamas (The)"]},{code:"BTN",number:"064",digits:2,currency:"Ngultrum",countries:["Bhutan"]},{code:"BWP",number:"072",digits:2,currency:"Pula",countries:["Botswana"]},{code:"BYN",number:"933",digits:2,currency:"Belarusian Ruble",countries:["Belarus"]},{code:"BZD",number:"084",digits:2,currency:"Belize Dollar",countries:["Belize"]},{code:"CAD",number:"124",digits:2,currency:"Canadian Dollar",countries:["Canada"]},{code:"CDF",number:"976",digits:2,currency:"Congolese Franc",countries:["Congo (The Democratic Republic of The)"]},{code:"CHE",number:"947",digits:2,currency:"WIR Euro",countries:["Switzerland"]},{code:"CHF",number:"756",digits:2,currency:"Swiss Franc",countries:["Liechtenstein","Switzerland"]},{code:"CHW",number:"948",digits:2,currency:"WIR Franc",countries:["Switzerland"]},{code:"CLF",number:"990",digits:4,currency:"Unidad de Fomento",countries:["Chile"]},{code:"CLP",number:"152",digits:0,currency:"Chilean Peso",countries:["Chile"]},{code:"CNY",number:"156",digits:2,currency:"Yuan Renminbi",countries:["China"]},{code:"COP",number:"170",digits:2,currency:"Colombian Peso",countries:["Colombia"]},{code:"COU",number:"970",digits:2,currency:"Unidad de Valor Real",countries:["Colombia"]},{code:"CRC",number:"188",digits:2,currency:"Costa Rican Colon",countries:["Costa Rica"]},{code:"CUC",number:"931",digits:2,currency:"Peso Convertible",countries:["Cuba"]},{code:"CUP",number:"192",digits:2,currency:"Cuban Peso",countries:["Cuba"]},{code:"CVE",number:"132",digits:2,currency:"Cabo Verde Escudo",countries:["Cabo Verde"]},{code:"CZK",number:"203",digits:2,currency:"Czech Koruna",countries:["Czechia"]},{code:"DJF",number:"262",digits:0,currency:"Djibouti Franc",countries:["Djibouti"]},{code:"DKK",number:"208",digits:2,currency:"Danish Krone",countries:["Denmark","Faroe Islands (The)","Greenland"]},{code:"DOP",number:"214",digits:2,currency:"Dominican Peso",countries:["Dominican Republic (The)"]},{code:"DZD",number:"012",digits:2,currency:"Algerian Dinar",countries:["Algeria"]},{code:"EGP",number:"818",digits:2,currency:"Egyptian Pound",countries:["Egypt"]},{code:"ERN",number:"232",digits:2,currency:"Nakfa",countries:["Eritrea"]},{code:"ETB",number:"230",digits:2,currency:"Ethiopian Birr",countries:["Ethiopia"]},{code:"EUR",number:"978",digits:2,currency:"Euro",countries:["Åland Islands","Andorra","Austria","Belgium","Croatia","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","Réunion","Saint Barthélemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},{code:"FJD",number:"242",digits:2,currency:"Fiji Dollar",countries:["Fiji"]},{code:"FKP",number:"238",digits:2,currency:"Falkland Islands Pound",countries:["Falkland Islands (The) [Malvinas]"]},{code:"GBP",number:"826",digits:2,currency:"Pound Sterling",countries:["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},{code:"GEL",number:"981",digits:2,currency:"Lari",countries:["Georgia"]},{code:"GHS",number:"936",digits:2,currency:"Ghana Cedi",countries:["Ghana"]},{code:"GIP",number:"292",digits:2,currency:"Gibraltar Pound",countries:["Gibraltar"]},{code:"GMD",number:"270",digits:2,currency:"Dalasi",countries:["Gambia (The)"]},{code:"GNF",number:"324",digits:0,currency:"Guinean Franc",countries:["Guinea"]},{code:"GTQ",number:"320",digits:2,currency:"Quetzal",countries:["Guatemala"]},{code:"GYD",number:"328",digits:2,currency:"Guyana Dollar",countries:["Guyana"]},{code:"HKD",number:"344",digits:2,currency:"Hong Kong Dollar",countries:["Hong Kong"]},{code:"HNL",number:"340",digits:2,currency:"Lempira",countries:["Honduras"]},{code:"HTG",number:"332",digits:2,currency:"Gourde",countries:["Haiti"]},{code:"HUF",number:"348",digits:2,currency:"Forint",countries:["Hungary"]},{code:"IDR",number:"360",digits:2,currency:"Rupiah",countries:["Indonesia"]},{code:"ILS",number:"376",digits:2,currency:"New Israeli Sheqel",countries:["Israel"]},{code:"INR",number:"356",digits:2,currency:"Indian Rupee",countries:["Bhutan","India"]},{code:"IQD",number:"368",digits:3,currency:"Iraqi Dinar",countries:["Iraq"]},{code:"IRR",number:"364",digits:2,currency:"Iranian Rial",countries:["Iran (Islamic Republic Of)"]},{code:"ISK",number:"352",digits:0,currency:"Iceland Krona",countries:["Iceland"]},{code:"JMD",number:"388",digits:2,currency:"Jamaican Dollar",countries:["Jamaica"]},{code:"JOD",number:"400",digits:3,currency:"Jordanian Dinar",countries:["Jordan"]},{code:"JPY",number:"392",digits:0,currency:"Yen",countries:["Japan"]},{code:"KES",number:"404",digits:2,currency:"Kenyan Shilling",countries:["Kenya"]},{code:"KGS",number:"417",digits:2,currency:"Som",countries:["Kyrgyzstan"]},{code:"KHR",number:"116",digits:2,currency:"Riel",countries:["Cambodia"]},{code:"KMF",number:"174",digits:0,currency:"Comorian Franc ",countries:["Comoros (The)"]},{code:"KPW",number:"408",digits:2,currency:"North Korean Won",countries:["Korea (The Democratic People’s Republic Of)"]},{code:"KRW",number:"410",digits:0,currency:"Won",countries:["Korea (The Republic Of)"]},{code:"KWD",number:"414",digits:3,currency:"Kuwaiti Dinar",countries:["Kuwait"]},{code:"KYD",number:"136",digits:2,currency:"Cayman Islands Dollar",countries:["Cayman Islands (The)"]},{code:"KZT",number:"398",digits:2,currency:"Tenge",countries:["Kazakhstan"]},{code:"LAK",number:"418",digits:2,currency:"Lao Kip",countries:["Lao People’s Democratic Republic (The)"]},{code:"LBP",number:"422",digits:2,currency:"Lebanese Pound",countries:["Lebanon"]},{code:"LKR",number:"144",digits:2,currency:"Sri Lanka Rupee",countries:["Sri Lanka"]},{code:"LRD",number:"430",digits:2,currency:"Liberian Dollar",countries:["Liberia"]},{code:"LSL",number:"426",digits:2,currency:"Loti",countries:["Lesotho"]},{code:"LYD",number:"434",digits:3,currency:"Libyan Dinar",countries:["Libya"]},{code:"MAD",number:"504",digits:2,currency:"Moroccan Dirham",countries:["Morocco","Western Sahara"]},{code:"MDL",number:"498",digits:2,currency:"Moldovan Leu",countries:["Moldova (The Republic Of)"]},{code:"MGA",number:"969",digits:2,currency:"Malagasy Ariary",countries:["Madagascar"]},{code:"MKD",number:"807",digits:2,currency:"Denar",countries:["North Macedonia"]},{code:"MMK",number:"104",digits:2,currency:"Kyat",countries:["Myanmar"]},{code:"MNT",number:"496",digits:2,currency:"Tugrik",countries:["Mongolia"]},{code:"MOP",number:"446",digits:2,currency:"Pataca",countries:["Macao"]},{code:"MRU",number:"929",digits:2,currency:"Ouguiya",countries:["Mauritania"]},{code:"MUR",number:"480",digits:2,currency:"Mauritius Rupee",countries:["Mauritius"]},{code:"MVR",number:"462",digits:2,currency:"Rufiyaa",countries:["Maldives"]},{code:"MWK",number:"454",digits:2,currency:"Malawi Kwacha",countries:["Malawi"]},{code:"MXN",number:"484",digits:2,currency:"Mexican Peso",countries:["Mexico"]},{code:"MXV",number:"979",digits:2,currency:"Mexican Unidad de Inversion (UDI)",countries:["Mexico"]},{code:"MYR",number:"458",digits:2,currency:"Malaysian Ringgit",countries:["Malaysia"]},{code:"MZN",number:"943",digits:2,currency:"Mozambique Metical",countries:["Mozambique"]},{code:"NAD",number:"516",digits:2,currency:"Namibia Dollar",countries:["Namibia"]},{code:"NGN",number:"566",digits:2,currency:"Naira",countries:["Nigeria"]},{code:"NIO",number:"558",digits:2,currency:"Cordoba Oro",countries:["Nicaragua"]},{code:"NOK",number:"578",digits:2,currency:"Norwegian Krone",countries:["Bouvet Island","Norway","Svalbard and Jan Mayen"]},{code:"NPR",number:"524",digits:2,currency:"Nepalese Rupee",countries:["Nepal"]},{code:"NZD",number:"554",digits:2,currency:"New Zealand Dollar",countries:["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},{code:"OMR",number:"512",digits:3,currency:"Rial Omani",countries:["Oman"]},{code:"PAB",number:"590",digits:2,currency:"Balboa",countries:["Panama"]},{code:"PEN",number:"604",digits:2,currency:"Sol",countries:["Peru"]},{code:"PGK",number:"598",digits:2,currency:"Kina",countries:["Papua New Guinea"]},{code:"PHP",number:"608",digits:2,currency:"Philippine Peso",countries:["Philippines (The)"]},{code:"PKR",number:"586",digits:2,currency:"Pakistan Rupee",countries:["Pakistan"]},{code:"PLN",number:"985",digits:2,currency:"Zloty",countries:["Poland"]},{code:"PYG",number:"600",digits:0,currency:"Guarani",countries:["Paraguay"]},{code:"QAR",number:"634",digits:2,currency:"Qatari Rial",countries:["Qatar"]},{code:"RON",number:"946",digits:2,currency:"Romanian Leu",countries:["Romania"]},{code:"RSD",number:"941",digits:2,currency:"Serbian Dinar",countries:["Serbia"]},{code:"RUB",number:"643",digits:2,currency:"Russian Ruble",countries:["Russian Federation (The)"]},{code:"RWF",number:"646",digits:0,currency:"Rwanda Franc",countries:["Rwanda"]},{code:"SAR",number:"682",digits:2,currency:"Saudi Riyal",countries:["Saudi Arabia"]},{code:"SBD",number:"090",digits:2,currency:"Solomon Islands Dollar",countries:["Solomon Islands"]},{code:"SCR",number:"690",digits:2,currency:"Seychelles Rupee",countries:["Seychelles"]},{code:"SDG",number:"938",digits:2,currency:"Sudanese Pound",countries:["Sudan (The)"]},{code:"SEK",number:"752",digits:2,currency:"Swedish Krona",countries:["Sweden"]},{code:"SGD",number:"702",digits:2,currency:"Singapore Dollar",countries:["Singapore"]},{code:"SHP",number:"654",digits:2,currency:"Saint Helena Pound",countries:["Saint Helena, Ascension and Tristan Da Cunha"]},{code:"SLE",number:"925",digits:2,currency:"Leone",countries:["Sierra Leone"]},{code:"SOS",number:"706",digits:2,currency:"Somali Shilling",countries:["Somalia"]},{code:"SRD",number:"968",digits:2,currency:"Surinam Dollar",countries:["Suriname"]},{code:"SSP",number:"728",digits:2,currency:"South Sudanese Pound",countries:["South Sudan"]},{code:"STN",number:"930",digits:2,currency:"Dobra",countries:["Sao Tome and Principe"]},{code:"SVC",number:"222",digits:2,currency:"El Salvador Colon",countries:["El Salvador"]},{code:"SYP",number:"760",digits:2,currency:"Syrian Pound",countries:["Syrian Arab Republic"]},{code:"SZL",number:"748",digits:2,currency:"Lilangeni",countries:["Eswatini"]},{code:"THB",number:"764",digits:2,currency:"Baht",countries:["Thailand"]},{code:"TJS",number:"972",digits:2,currency:"Somoni",countries:["Tajikistan"]},{code:"TMT",number:"934",digits:2,currency:"Turkmenistan New Manat",countries:["Turkmenistan"]},{code:"TND",number:"788",digits:3,currency:"Tunisian Dinar",countries:["Tunisia"]},{code:"TOP",number:"776",digits:2,currency:"Pa’anga",countries:["Tonga"]},{code:"TRY",number:"949",digits:2,currency:"Turkish Lira",countries:["Türki̇ye"]},{code:"TTD",number:"780",digits:2,currency:"Trinidad and Tobago Dollar",countries:["Trinidad and Tobago"]},{code:"TWD",number:"901",digits:2,currency:"New Taiwan Dollar",countries:["Taiwan (Province of China)"]},{code:"TZS",number:"834",digits:2,currency:"Tanzanian Shilling",countries:["Tanzania, United Republic Of"]},{code:"UAH",number:"980",digits:2,currency:"Hryvnia",countries:["Ukraine"]},{code:"UGX",number:"800",digits:0,currency:"Uganda Shilling",countries:["Uganda"]},{code:"USD",number:"840",digits:2,currency:"US Dollar",countries:["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (u.s.)"]},{code:"USN",number:"997",digits:2,currency:"US Dollar (Next day)",countries:["United States of America (The)"]},{code:"UYI",number:"940",digits:0,currency:"Uruguay Peso en Unidades Indexadas (UI)",countries:["Uruguay"]},{code:"UYU",number:"858",digits:2,currency:"Peso Uruguayo",countries:["Uruguay"]},{code:"UYW",number:"927",digits:4,currency:"Unidad Previsional",countries:["Uruguay"]},{code:"UZS",number:"860",digits:2,currency:"Uzbekistan Sum",countries:["Uzbekistan"]},{code:"VED",number:"926",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VES",number:"928",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VND",number:"704",digits:0,currency:"Dong",countries:["Viet Nam"]},{code:"VUV",number:"548",digits:0,currency:"Vatu",countries:["Vanuatu"]},{code:"WST",number:"882",digits:2,currency:"Tala",countries:["Samoa"]},{code:"XAF",number:"950",digits:0,currency:"CFA Franc BEAC",countries:["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},{code:"XAG",number:"961",digits:0,currency:"Silver",countries:["Zz11_silver"]},{code:"XAU",number:"959",digits:0,currency:"Gold",countries:["Zz08_gold"]},{code:"XBA",number:"955",digits:0,currency:"Bond Markets Unit European Composite Unit (EURCO)",countries:["Zz01_bond Markets Unit European_eurco"]},{code:"XBB",number:"956",digits:0,currency:"Bond Markets Unit European Monetary Unit (E.M.U.-6)",countries:["Zz02_bond Markets Unit European_emu-6"]},{code:"XBC",number:"957",digits:0,currency:"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",countries:["Zz03_bond Markets Unit European_eua-9"]},{code:"XBD",number:"958",digits:0,currency:"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",countries:["Zz04_bond Markets Unit European_eua-17"]},{code:"XCD",number:"951",digits:2,currency:"East Caribbean Dollar",countries:["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},{code:"XDR",number:"960",digits:0,currency:"SDR (Special Drawing Right)",countries:["International Monetary Fund (Imf) "]},{code:"XOF",number:"952",digits:0,currency:"CFA Franc BCEAO",countries:["Benin","Burkina Faso","Côte D'ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},{code:"XPD",number:"964",digits:0,currency:"Palladium",countries:["Zz09_palladium"]},{code:"XPF",number:"953",digits:0,currency:"CFP Franc",countries:["French Polynesia","New Caledonia","Wallis and Futuna"]},{code:"XPT",number:"962",digits:0,currency:"Platinum",countries:["Zz10_platinum"]},{code:"XSU",number:"994",digits:0,currency:"Sucre",countries:['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']},{code:"XTS",number:"963",digits:0,currency:"Codes specifically reserved for testing purposes",countries:["Zz06_testing_code"]},{code:"XUA",number:"965",digits:0,currency:"ADB Unit of Account",countries:["Member Countries of the African Development Bank Group"]},{code:"XXX",number:"999",digits:0,currency:"The codes assigned for transactions where no currency is involved",countries:["Zz07_no_currency"]},{code:"YER",number:"886",digits:2,currency:"Yemeni Rial",countries:["Yemen"]},{code:"ZAR",number:"710",digits:2,currency:"Rand",countries:["Lesotho","Namibia","South Africa"]},{code:"ZMW",number:"967",digits:2,currency:"Zambian Kwacha",countries:["Zambia"]},{code:"ZWG",number:"924",digits:2,currency:"Zimbabwe Gold",countries:["Zimbabwe"]}])}var T=function(){if(g)return y;g=1;var e=function(){if(t)return a;function e(e){return e}return t=1,a=function(r,n,i){n=n||e,i=i||r;for(var c=0,u=r.length;c<u;c+=1)if(n.call(i,r[c],c))return r[c]}}(),r=S(),n=D(),i=b?m:(b=1,m="2024-06-25");return y.code=function(r){return r=r.toUpperCase(),e(n,(function(e){return e.code===r}))},y.country=function(e){return e=e.toLowerCase(),n.filter((function(r){return(r.countries.map((function(e){return e.toLowerCase()}))||[]).indexOf(e)>-1}))},y.number=function(r){return e(n,(function(e){return e.number===String(r)}))},y.codes=function(){return n.map((function(e){return e.code}))},y.numbers=function(){return n.map((function(e){return e.number})).filter((function(e){if(e)return e}))},y.countries=function(){var e=n.filter((function(e){return e.countries})).map((function(e){return e.countries}));return r(Array.prototype.concat.apply([],e))},y.publishDate=i,y.data=n,y}();const f=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=n(this,"change",7),this.currencies=T.codes(),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=async e=>""===e?this.currencies.map(this.createListItem).filter(o):this.currencies.map(this.createListItem).filter(o).filter((r=>{var n;return(null===(n=null==r?void 0:r.secondaryText)||void 0===n?void 0:n.toLowerCase().includes(e.toLowerCase()))||r.text.toLowerCase().includes(e.toLowerCase())})),this.createListItem=e=>{if(e)return{text:e,value:e,secondaryText:this.getCurrencyName(e),icon:this.getCurrencyIcon(e)}},this.handleChange=e=>{var r;e.stopPropagation(),this.change.emit(null===(r=e.detail)||void 0===r?void 0:r.value)}}render(){return i("limel-picker",{key:"2e9dcd3bf98fe7a3377aa24c0e45814f2c698633",label:this.label||this.defaultLabel,value:this.createListItem(this.value),helperText:this.helperText,onChange:this.handleChange,badgeIcons:!1,disabled:this.disabled,required:this.required,readonly:this.readonly,invalid:this.readonly,searcher:this.search})}getCurrencyName(e){var r;const n=Intl.NumberFormat(this.application.getLanguage(),{style:"currency",currency:e,currencyDisplay:"name"});try{return null===(r=n.formatToParts(1).find((e=>"currency"===e.type)))||void 0===r?void 0:r.value}catch(e){return}}getCurrencyIcon(e){return{EUR:"euro",USD:"us_dollar",SEK:"sek",NOK:"sek",DKK:"sek",ISK:"sek"}[e]}get translator(){return this.platform.get(u.Translate)}get application(){return this.platform.get(u.Application)}get defaultLabel(){return this.translator.get("webclient.currency-picker.label")}},[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]);function M(){"undefined"!=typeof customElements&&["limebb-currency-picker"].forEach((e=>{"limebb-currency-picker"===e&&(customElements.get(c(e))||customElements.define(c(e),f))}))}export{f as C,M as d}
1
+ import{proxyCustomElement as e,HTMLElement as r,createEvent as n,h as i,transformTag as c}from"@stencil/core/internal/client";import{b as u}from"./index.esm.js";import{i as o}from"./non-null.js";var a,t,s,d,l,m,b,g,y={},h={exports:{}};function S(){if(s)return h.exports;s=1;var e=h.exports=function(r,n){if("function"==typeof r||n)return e.by(r,n);for(var i={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},c=[],u=0;u<r.length;u++){var o=r[u],a="__proto__"===o?i.objects:i[typeof o]||i.objects;Array.isArray(a)?a.indexOf(o)<0&&(a.push(o),c.push(o)):Object.hasOwnProperty.call(a,o)||(a[o]=!0,c.push(o))}return c};return e.by=function(e,r){if("function"==typeof e){var n=r;r=e,e=n}for(var i=[],c=0;c<e.length;c++){for(var u=e[c],o=!1,a=0;a<i.length;a++)if(r.call(i,u,i[a])){o=!0;break}o||i.push(u)}return i},h.exports}function D(){return l?d:(l=1,d=[{code:"AED",number:"784",digits:2,currency:"UAE Dirham",countries:["United Arab Emirates (The)"]},{code:"AFN",number:"971",digits:2,currency:"Afghani",countries:["Afghanistan"]},{code:"ALL",number:"008",digits:2,currency:"Lek",countries:["Albania"]},{code:"AMD",number:"051",digits:2,currency:"Armenian Dram",countries:["Armenia"]},{code:"ANG",number:"532",digits:2,currency:"Netherlands Antillean Guilder",countries:["Curaçao","Sint Maarten (Dutch Part)"]},{code:"AOA",number:"973",digits:2,currency:"Kwanza",countries:["Angola"]},{code:"ARS",number:"032",digits:2,currency:"Argentine Peso",countries:["Argentina"]},{code:"AUD",number:"036",digits:2,currency:"Australian Dollar",countries:["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},{code:"AWG",number:"533",digits:2,currency:"Aruban Florin",countries:["Aruba"]},{code:"AZN",number:"944",digits:2,currency:"Azerbaijan Manat",countries:["Azerbaijan"]},{code:"BAM",number:"977",digits:2,currency:"Convertible Mark",countries:["Bosnia and Herzegovina"]},{code:"BBD",number:"052",digits:2,currency:"Barbados Dollar",countries:["Barbados"]},{code:"BDT",number:"050",digits:2,currency:"Taka",countries:["Bangladesh"]},{code:"BGN",number:"975",digits:2,currency:"Bulgarian Lev",countries:["Bulgaria"]},{code:"BHD",number:"048",digits:3,currency:"Bahraini Dinar",countries:["Bahrain"]},{code:"BIF",number:"108",digits:0,currency:"Burundi Franc",countries:["Burundi"]},{code:"BMD",number:"060",digits:2,currency:"Bermudian Dollar",countries:["Bermuda"]},{code:"BND",number:"096",digits:2,currency:"Brunei Dollar",countries:["Brunei Darussalam"]},{code:"BOB",number:"068",digits:2,currency:"Boliviano",countries:["Bolivia (Plurinational State Of)"]},{code:"BOV",number:"984",digits:2,currency:"Mvdol",countries:["Bolivia (Plurinational State Of)"]},{code:"BRL",number:"986",digits:2,currency:"Brazilian Real",countries:["Brazil"]},{code:"BSD",number:"044",digits:2,currency:"Bahamian Dollar",countries:["Bahamas (The)"]},{code:"BTN",number:"064",digits:2,currency:"Ngultrum",countries:["Bhutan"]},{code:"BWP",number:"072",digits:2,currency:"Pula",countries:["Botswana"]},{code:"BYN",number:"933",digits:2,currency:"Belarusian Ruble",countries:["Belarus"]},{code:"BZD",number:"084",digits:2,currency:"Belize Dollar",countries:["Belize"]},{code:"CAD",number:"124",digits:2,currency:"Canadian Dollar",countries:["Canada"]},{code:"CDF",number:"976",digits:2,currency:"Congolese Franc",countries:["Congo (The Democratic Republic of The)"]},{code:"CHE",number:"947",digits:2,currency:"WIR Euro",countries:["Switzerland"]},{code:"CHF",number:"756",digits:2,currency:"Swiss Franc",countries:["Liechtenstein","Switzerland"]},{code:"CHW",number:"948",digits:2,currency:"WIR Franc",countries:["Switzerland"]},{code:"CLF",number:"990",digits:4,currency:"Unidad de Fomento",countries:["Chile"]},{code:"CLP",number:"152",digits:0,currency:"Chilean Peso",countries:["Chile"]},{code:"CNY",number:"156",digits:2,currency:"Yuan Renminbi",countries:["China"]},{code:"COP",number:"170",digits:2,currency:"Colombian Peso",countries:["Colombia"]},{code:"COU",number:"970",digits:2,currency:"Unidad de Valor Real",countries:["Colombia"]},{code:"CRC",number:"188",digits:2,currency:"Costa Rican Colon",countries:["Costa Rica"]},{code:"CUC",number:"931",digits:2,currency:"Peso Convertible",countries:["Cuba"]},{code:"CUP",number:"192",digits:2,currency:"Cuban Peso",countries:["Cuba"]},{code:"CVE",number:"132",digits:2,currency:"Cabo Verde Escudo",countries:["Cabo Verde"]},{code:"CZK",number:"203",digits:2,currency:"Czech Koruna",countries:["Czechia"]},{code:"DJF",number:"262",digits:0,currency:"Djibouti Franc",countries:["Djibouti"]},{code:"DKK",number:"208",digits:2,currency:"Danish Krone",countries:["Denmark","Faroe Islands (The)","Greenland"]},{code:"DOP",number:"214",digits:2,currency:"Dominican Peso",countries:["Dominican Republic (The)"]},{code:"DZD",number:"012",digits:2,currency:"Algerian Dinar",countries:["Algeria"]},{code:"EGP",number:"818",digits:2,currency:"Egyptian Pound",countries:["Egypt"]},{code:"ERN",number:"232",digits:2,currency:"Nakfa",countries:["Eritrea"]},{code:"ETB",number:"230",digits:2,currency:"Ethiopian Birr",countries:["Ethiopia"]},{code:"EUR",number:"978",digits:2,currency:"Euro",countries:["Åland Islands","Andorra","Austria","Belgium","Croatia","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","Réunion","Saint Barthélemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},{code:"FJD",number:"242",digits:2,currency:"Fiji Dollar",countries:["Fiji"]},{code:"FKP",number:"238",digits:2,currency:"Falkland Islands Pound",countries:["Falkland Islands (The) [Malvinas]"]},{code:"GBP",number:"826",digits:2,currency:"Pound Sterling",countries:["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},{code:"GEL",number:"981",digits:2,currency:"Lari",countries:["Georgia"]},{code:"GHS",number:"936",digits:2,currency:"Ghana Cedi",countries:["Ghana"]},{code:"GIP",number:"292",digits:2,currency:"Gibraltar Pound",countries:["Gibraltar"]},{code:"GMD",number:"270",digits:2,currency:"Dalasi",countries:["Gambia (The)"]},{code:"GNF",number:"324",digits:0,currency:"Guinean Franc",countries:["Guinea"]},{code:"GTQ",number:"320",digits:2,currency:"Quetzal",countries:["Guatemala"]},{code:"GYD",number:"328",digits:2,currency:"Guyana Dollar",countries:["Guyana"]},{code:"HKD",number:"344",digits:2,currency:"Hong Kong Dollar",countries:["Hong Kong"]},{code:"HNL",number:"340",digits:2,currency:"Lempira",countries:["Honduras"]},{code:"HTG",number:"332",digits:2,currency:"Gourde",countries:["Haiti"]},{code:"HUF",number:"348",digits:2,currency:"Forint",countries:["Hungary"]},{code:"IDR",number:"360",digits:2,currency:"Rupiah",countries:["Indonesia"]},{code:"ILS",number:"376",digits:2,currency:"New Israeli Sheqel",countries:["Israel"]},{code:"INR",number:"356",digits:2,currency:"Indian Rupee",countries:["Bhutan","India"]},{code:"IQD",number:"368",digits:3,currency:"Iraqi Dinar",countries:["Iraq"]},{code:"IRR",number:"364",digits:2,currency:"Iranian Rial",countries:["Iran (Islamic Republic Of)"]},{code:"ISK",number:"352",digits:0,currency:"Iceland Krona",countries:["Iceland"]},{code:"JMD",number:"388",digits:2,currency:"Jamaican Dollar",countries:["Jamaica"]},{code:"JOD",number:"400",digits:3,currency:"Jordanian Dinar",countries:["Jordan"]},{code:"JPY",number:"392",digits:0,currency:"Yen",countries:["Japan"]},{code:"KES",number:"404",digits:2,currency:"Kenyan Shilling",countries:["Kenya"]},{code:"KGS",number:"417",digits:2,currency:"Som",countries:["Kyrgyzstan"]},{code:"KHR",number:"116",digits:2,currency:"Riel",countries:["Cambodia"]},{code:"KMF",number:"174",digits:0,currency:"Comorian Franc ",countries:["Comoros (The)"]},{code:"KPW",number:"408",digits:2,currency:"North Korean Won",countries:["Korea (The Democratic People’s Republic Of)"]},{code:"KRW",number:"410",digits:0,currency:"Won",countries:["Korea (The Republic Of)"]},{code:"KWD",number:"414",digits:3,currency:"Kuwaiti Dinar",countries:["Kuwait"]},{code:"KYD",number:"136",digits:2,currency:"Cayman Islands Dollar",countries:["Cayman Islands (The)"]},{code:"KZT",number:"398",digits:2,currency:"Tenge",countries:["Kazakhstan"]},{code:"LAK",number:"418",digits:2,currency:"Lao Kip",countries:["Lao People’s Democratic Republic (The)"]},{code:"LBP",number:"422",digits:2,currency:"Lebanese Pound",countries:["Lebanon"]},{code:"LKR",number:"144",digits:2,currency:"Sri Lanka Rupee",countries:["Sri Lanka"]},{code:"LRD",number:"430",digits:2,currency:"Liberian Dollar",countries:["Liberia"]},{code:"LSL",number:"426",digits:2,currency:"Loti",countries:["Lesotho"]},{code:"LYD",number:"434",digits:3,currency:"Libyan Dinar",countries:["Libya"]},{code:"MAD",number:"504",digits:2,currency:"Moroccan Dirham",countries:["Morocco","Western Sahara"]},{code:"MDL",number:"498",digits:2,currency:"Moldovan Leu",countries:["Moldova (The Republic Of)"]},{code:"MGA",number:"969",digits:2,currency:"Malagasy Ariary",countries:["Madagascar"]},{code:"MKD",number:"807",digits:2,currency:"Denar",countries:["North Macedonia"]},{code:"MMK",number:"104",digits:2,currency:"Kyat",countries:["Myanmar"]},{code:"MNT",number:"496",digits:2,currency:"Tugrik",countries:["Mongolia"]},{code:"MOP",number:"446",digits:2,currency:"Pataca",countries:["Macao"]},{code:"MRU",number:"929",digits:2,currency:"Ouguiya",countries:["Mauritania"]},{code:"MUR",number:"480",digits:2,currency:"Mauritius Rupee",countries:["Mauritius"]},{code:"MVR",number:"462",digits:2,currency:"Rufiyaa",countries:["Maldives"]},{code:"MWK",number:"454",digits:2,currency:"Malawi Kwacha",countries:["Malawi"]},{code:"MXN",number:"484",digits:2,currency:"Mexican Peso",countries:["Mexico"]},{code:"MXV",number:"979",digits:2,currency:"Mexican Unidad de Inversion (UDI)",countries:["Mexico"]},{code:"MYR",number:"458",digits:2,currency:"Malaysian Ringgit",countries:["Malaysia"]},{code:"MZN",number:"943",digits:2,currency:"Mozambique Metical",countries:["Mozambique"]},{code:"NAD",number:"516",digits:2,currency:"Namibia Dollar",countries:["Namibia"]},{code:"NGN",number:"566",digits:2,currency:"Naira",countries:["Nigeria"]},{code:"NIO",number:"558",digits:2,currency:"Cordoba Oro",countries:["Nicaragua"]},{code:"NOK",number:"578",digits:2,currency:"Norwegian Krone",countries:["Bouvet Island","Norway","Svalbard and Jan Mayen"]},{code:"NPR",number:"524",digits:2,currency:"Nepalese Rupee",countries:["Nepal"]},{code:"NZD",number:"554",digits:2,currency:"New Zealand Dollar",countries:["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},{code:"OMR",number:"512",digits:3,currency:"Rial Omani",countries:["Oman"]},{code:"PAB",number:"590",digits:2,currency:"Balboa",countries:["Panama"]},{code:"PEN",number:"604",digits:2,currency:"Sol",countries:["Peru"]},{code:"PGK",number:"598",digits:2,currency:"Kina",countries:["Papua New Guinea"]},{code:"PHP",number:"608",digits:2,currency:"Philippine Peso",countries:["Philippines (The)"]},{code:"PKR",number:"586",digits:2,currency:"Pakistan Rupee",countries:["Pakistan"]},{code:"PLN",number:"985",digits:2,currency:"Zloty",countries:["Poland"]},{code:"PYG",number:"600",digits:0,currency:"Guarani",countries:["Paraguay"]},{code:"QAR",number:"634",digits:2,currency:"Qatari Rial",countries:["Qatar"]},{code:"RON",number:"946",digits:2,currency:"Romanian Leu",countries:["Romania"]},{code:"RSD",number:"941",digits:2,currency:"Serbian Dinar",countries:["Serbia"]},{code:"RUB",number:"643",digits:2,currency:"Russian Ruble",countries:["Russian Federation (The)"]},{code:"RWF",number:"646",digits:0,currency:"Rwanda Franc",countries:["Rwanda"]},{code:"SAR",number:"682",digits:2,currency:"Saudi Riyal",countries:["Saudi Arabia"]},{code:"SBD",number:"090",digits:2,currency:"Solomon Islands Dollar",countries:["Solomon Islands"]},{code:"SCR",number:"690",digits:2,currency:"Seychelles Rupee",countries:["Seychelles"]},{code:"SDG",number:"938",digits:2,currency:"Sudanese Pound",countries:["Sudan (The)"]},{code:"SEK",number:"752",digits:2,currency:"Swedish Krona",countries:["Sweden"]},{code:"SGD",number:"702",digits:2,currency:"Singapore Dollar",countries:["Singapore"]},{code:"SHP",number:"654",digits:2,currency:"Saint Helena Pound",countries:["Saint Helena, Ascension and Tristan Da Cunha"]},{code:"SLE",number:"925",digits:2,currency:"Leone",countries:["Sierra Leone"]},{code:"SOS",number:"706",digits:2,currency:"Somali Shilling",countries:["Somalia"]},{code:"SRD",number:"968",digits:2,currency:"Surinam Dollar",countries:["Suriname"]},{code:"SSP",number:"728",digits:2,currency:"South Sudanese Pound",countries:["South Sudan"]},{code:"STN",number:"930",digits:2,currency:"Dobra",countries:["Sao Tome and Principe"]},{code:"SVC",number:"222",digits:2,currency:"El Salvador Colon",countries:["El Salvador"]},{code:"SYP",number:"760",digits:2,currency:"Syrian Pound",countries:["Syrian Arab Republic"]},{code:"SZL",number:"748",digits:2,currency:"Lilangeni",countries:["Eswatini"]},{code:"THB",number:"764",digits:2,currency:"Baht",countries:["Thailand"]},{code:"TJS",number:"972",digits:2,currency:"Somoni",countries:["Tajikistan"]},{code:"TMT",number:"934",digits:2,currency:"Turkmenistan New Manat",countries:["Turkmenistan"]},{code:"TND",number:"788",digits:3,currency:"Tunisian Dinar",countries:["Tunisia"]},{code:"TOP",number:"776",digits:2,currency:"Pa’anga",countries:["Tonga"]},{code:"TRY",number:"949",digits:2,currency:"Turkish Lira",countries:["Türki̇ye"]},{code:"TTD",number:"780",digits:2,currency:"Trinidad and Tobago Dollar",countries:["Trinidad and Tobago"]},{code:"TWD",number:"901",digits:2,currency:"New Taiwan Dollar",countries:["Taiwan (Province of China)"]},{code:"TZS",number:"834",digits:2,currency:"Tanzanian Shilling",countries:["Tanzania, United Republic Of"]},{code:"UAH",number:"980",digits:2,currency:"Hryvnia",countries:["Ukraine"]},{code:"UGX",number:"800",digits:0,currency:"Uganda Shilling",countries:["Uganda"]},{code:"USD",number:"840",digits:2,currency:"US Dollar",countries:["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (u.s.)"]},{code:"USN",number:"997",digits:2,currency:"US Dollar (Next day)",countries:["United States of America (The)"]},{code:"UYI",number:"940",digits:0,currency:"Uruguay Peso en Unidades Indexadas (UI)",countries:["Uruguay"]},{code:"UYU",number:"858",digits:2,currency:"Peso Uruguayo",countries:["Uruguay"]},{code:"UYW",number:"927",digits:4,currency:"Unidad Previsional",countries:["Uruguay"]},{code:"UZS",number:"860",digits:2,currency:"Uzbekistan Sum",countries:["Uzbekistan"]},{code:"VED",number:"926",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VES",number:"928",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VND",number:"704",digits:0,currency:"Dong",countries:["Viet Nam"]},{code:"VUV",number:"548",digits:0,currency:"Vatu",countries:["Vanuatu"]},{code:"WST",number:"882",digits:2,currency:"Tala",countries:["Samoa"]},{code:"XAF",number:"950",digits:0,currency:"CFA Franc BEAC",countries:["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},{code:"XAG",number:"961",digits:0,currency:"Silver",countries:["Zz11_silver"]},{code:"XAU",number:"959",digits:0,currency:"Gold",countries:["Zz08_gold"]},{code:"XBA",number:"955",digits:0,currency:"Bond Markets Unit European Composite Unit (EURCO)",countries:["Zz01_bond Markets Unit European_eurco"]},{code:"XBB",number:"956",digits:0,currency:"Bond Markets Unit European Monetary Unit (E.M.U.-6)",countries:["Zz02_bond Markets Unit European_emu-6"]},{code:"XBC",number:"957",digits:0,currency:"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",countries:["Zz03_bond Markets Unit European_eua-9"]},{code:"XBD",number:"958",digits:0,currency:"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",countries:["Zz04_bond Markets Unit European_eua-17"]},{code:"XCD",number:"951",digits:2,currency:"East Caribbean Dollar",countries:["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},{code:"XDR",number:"960",digits:0,currency:"SDR (Special Drawing Right)",countries:["International Monetary Fund (Imf) "]},{code:"XOF",number:"952",digits:0,currency:"CFA Franc BCEAO",countries:["Benin","Burkina Faso","Côte D'ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},{code:"XPD",number:"964",digits:0,currency:"Palladium",countries:["Zz09_palladium"]},{code:"XPF",number:"953",digits:0,currency:"CFP Franc",countries:["French Polynesia","New Caledonia","Wallis and Futuna"]},{code:"XPT",number:"962",digits:0,currency:"Platinum",countries:["Zz10_platinum"]},{code:"XSU",number:"994",digits:0,currency:"Sucre",countries:['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']},{code:"XTS",number:"963",digits:0,currency:"Codes specifically reserved for testing purposes",countries:["Zz06_testing_code"]},{code:"XUA",number:"965",digits:0,currency:"ADB Unit of Account",countries:["Member Countries of the African Development Bank Group"]},{code:"XXX",number:"999",digits:0,currency:"The codes assigned for transactions where no currency is involved",countries:["Zz07_no_currency"]},{code:"YER",number:"886",digits:2,currency:"Yemeni Rial",countries:["Yemen"]},{code:"ZAR",number:"710",digits:2,currency:"Rand",countries:["Lesotho","Namibia","South Africa"]},{code:"ZMW",number:"967",digits:2,currency:"Zambian Kwacha",countries:["Zambia"]},{code:"ZWG",number:"924",digits:2,currency:"Zimbabwe Gold",countries:["Zimbabwe"]}])}var T=function(){if(g)return y;g=1;var e=function(){if(t)return a;function e(e){return e}return t=1,a=function(r,n,i){n=n||e,i=i||r;for(var c=0,u=r.length;c<u;c+=1)if(n.call(i,r[c],c))return r[c]}}(),r=S(),n=D(),i=b?m:(b=1,m="2024-06-25");return y.code=function(r){return r=r.toUpperCase(),e(n,(function(e){return e.code===r}))},y.country=function(e){return e=e.toLowerCase(),n.filter((function(r){return(r.countries.map((function(e){return e.toLowerCase()}))||[]).indexOf(e)>-1}))},y.number=function(r){return e(n,(function(e){return e.number===String(r)}))},y.codes=function(){return n.map((function(e){return e.code}))},y.numbers=function(){return n.map((function(e){return e.number})).filter((function(e){if(e)return e}))},y.countries=function(){var e=n.filter((function(e){return e.countries})).map((function(e){return e.countries}));return r(Array.prototype.concat.apply([],e))},y.publishDate=i,y.data=n,y}();const f=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=n(this,"change",7),this.currencies=T.codes(),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=async e=>""===e?this.currencies.map(this.createListItem).filter(o):this.currencies.map(this.createListItem).filter(o).filter((r=>{var n;return(null===(n=null==r?void 0:r.secondaryText)||void 0===n?void 0:n.toLowerCase().includes(e.toLowerCase()))||r.text.toLowerCase().includes(e.toLowerCase())})),this.createListItem=e=>{if(e)return{text:e,value:e,secondaryText:this.getCurrencyName(e),icon:this.getCurrencyIcon(e)}},this.handleChange=e=>{var r;e.stopPropagation(),this.change.emit(null===(r=e.detail)||void 0===r?void 0:r.value)}}render(){return i("limel-picker",{key:"2e9dcd3bf98fe7a3377aa24c0e45814f2c698633",label:this.label||this.defaultLabel,value:this.createListItem(this.value),helperText:this.helperText,onChange:this.handleChange,badgeIcons:!1,disabled:this.disabled,required:this.required,readonly:this.readonly,invalid:this.readonly,searcher:this.search})}getCurrencyName(e){var r;const n=Intl.NumberFormat(this.application.getLanguage(),{style:"currency",currency:e,currencyDisplay:"name"});try{return null===(r=n.formatToParts(1).find((e=>"currency"===e.type)))||void 0===r?void 0:r.value}catch(e){return}}getCurrencyIcon(e){return{EUR:"euro",USD:"us_dollar",SEK:"sek",NOK:"sek",DKK:"sek",ISK:"sek"}[e]}get translator(){return this.platform.get(u.Translate)}get application(){return this.platform.get(u.Application)}get defaultLabel(){return this.translator.get("webclient.currency-picker.label")}},[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]);function M(){"undefined"!=typeof customElements&&["limebb-currency-picker"].forEach((e=>{"limebb-currency-picker"===e&&(customElements.get(c(e))||customElements.define(c(e),f))}))}export{f as C,M as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as h}from"@stencil/core/internal/client";import{n as r}from"./index.esm.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="datetime",this.shouldEmitValueAsString=!0,this.handleChange=t=>{if(!t.detail)return;t.stopPropagation();const e=(i=t.detail,"datetime"===(s=this.type)||"time"===s?i:new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())));var i,s;this.change.emit(this.shouldEmitValueAsString?e.toISOString():e)},this.formatter=t=>this.dateTimeFormatter.format(t,a[this.type]||this.type)}render(){return this.language||(this.language=this.getAppLanguage()),this.value&&(this.shouldEmitValueAsString="string"==typeof this.value),s("limel-date-picker",{key:"9a27ee751c1928a442651e8473b0c588778dbdc0",disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:this.helperText,required:this.required,value:this.parseDateValue(),type:this.type,language:this.language,formatter:this.formatter,onChange:this.handleChange})}parseDateValue(){const t=this.value;if(t)return this.dateTimeFormatter.parse(t,a[this.type]||this.type)}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}getAppLanguage(){const t=this.platform.get(r.Translate),e=this.platform.get(r.Application);let i;var s;return i="function"==typeof(null==(s=t)?void 0:s.getLanguage)?t.getLanguage():e.getLanguage(),d(i)?i:"en"}},[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]),a={datetime:"time",time:"timeofday"},l=new Set(["da","de","en","fi","fr","nb","no","nl","sv"]),d=t=>l.has(t);function o(){"undefined"!=typeof customElements&&["limebb-date-picker"].forEach((t=>{"limebb-date-picker"===t&&(customElements.get(h(t))||customElements.define(h(t),n))}))}export{n as D,o as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as h}from"@stencil/core/internal/client";import{b as r}from"./index.esm.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="datetime",this.shouldEmitValueAsString=!0,this.handleChange=t=>{if(!t.detail)return;t.stopPropagation();const e=(i=t.detail,"datetime"===(s=this.type)||"time"===s?i:new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())));var i,s;this.change.emit(this.shouldEmitValueAsString?e.toISOString():e)},this.formatter=t=>this.dateTimeFormatter.format(t,n[this.type]||this.type)}render(){return this.language||(this.language=this.getAppLanguage()),this.value&&(this.shouldEmitValueAsString="string"==typeof this.value),s("limel-date-picker",{key:"9a27ee751c1928a442651e8473b0c588778dbdc0",disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:this.helperText,required:this.required,value:this.parseDateValue(),type:this.type,language:this.language,formatter:this.formatter,onChange:this.handleChange})}parseDateValue(){const t=this.value;if(t)return this.dateTimeFormatter.parse(t,n[this.type]||this.type)}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}getAppLanguage(){const t=this.platform.get(r.Translate),e=this.platform.get(r.Application);let i;var s;return i="function"==typeof(null==(s=t)?void 0:s.getLanguage)?t.getLanguage():e.getLanguage(),d(i)?i:"en"}},[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]),n={datetime:"time",time:"timeofday"},l=new Set(["da","de","en","fi","fr","nb","no","nl","sv"]),d=t=>l.has(t);function o(){"undefined"!=typeof customElements&&["limebb-date-picker"].forEach((t=>{"limebb-date-picker"===t&&(customElements.get(h(t))||customElements.define(h(t),a))}))}export{a as D,o as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{n as a}from"./index.esm.js";import{d as n}from"./feed-item-thumbnail-file-info.js";import{d as s}from"./navigation-button.js";import{d as l}from"./summary-popover.js";const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!this.bodyTextElement||!(null==e?void 0:e.length))return;const t=e[0].contentRect.width;if(t===this.lastMeasuredWidth)return;this.lastMeasuredWidth=t,this.bodyTextElement.style.minHeight="0";const i=this.bodyTextElement.scrollHeight;this.bodyTextElement.style.removeProperty("min-height"),this.isTall=i>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=i)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return i("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,t,o;if(null===(t=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===t?void 0:t.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,t;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},i("limel-icon",{name:"angle_up"})),i("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:t,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[i("a",{class:"thumbnail-card-link",id:a,key:a,href:t||void 0},i("limel-card",{image:o,clickable:!!t},i("limebb-feed-item-thumbnail-file-info",{slot:"component",description:r})),this.showThumbnailTooltip(e,a))]},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,t;const r=`helper-text-${this.item.id}`;return i(o,{key:"ddc74b89e09e4bd56f2ce64ef2f9ddca011b7acb",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(t=this.item.author)||void 0===t?void 0:t.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return i("div",{class:"left"},i("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),i("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,t,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return i("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(t=this.item.icon)||void 0===t?void 0:t.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return i("div",{class:"right"},i("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderThumbnails(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return i("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return i("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return i("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:t,text:o}=this.item.author.name;return i("a",{class:"author",href:e,title:t},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:t}=this.item,o=this.getAuthorName(t),r=this.createLinkToAuthor(t);return i("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},i("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[i("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading,adaptColorContrast:!0})]}renderValue(){var e;if(this.item.value)return[i("div",{class:"markdown-container"},i("limel-markdown",{class:{"body-text":!0,opened:this.showMore,"no-table-styles":!(null===(e=this.item)||void 0===e?void 0:e.hasDefaultTableStyles),"reset-img-height":!0},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,adaptColorContrast:!0,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const t=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==t?void 0:t.length)return i("limel-masonry-layout",{role:"group"},t.map(this.renderThumbnailCard))}showThumbnailTooltip(e,t){var o;const{href:r,filename:a}=e;if(r)return i("limel-tooltip",{elementId:t,label:(null===(o=this.translator)||void 0===o?void 0:o.get("webclient.go-to-context-label",{context:a}))||a})}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[i("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},i("limel-icon",{name:"angle_down"})),i("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,t;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const t=this.item.promotedActions.map(this.createActionBarItem);return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:t,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(a.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return this}static get style(){return'@charset "UTF-8";limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]){padding:0.25rem 0}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:"";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(0.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.content{position:relative}.content:before,.content:after{content:"";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,button.expand-heading:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color)}button.expand-heading:hover{box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,button.collapse-heading:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);display:flex;flex-direction:column;align-items:center;gap:0.25rem;font-size:0.75rem;text-align:center;color:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.timestamp:after{width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--color-red-default))}:host(.is-new) .timestamp:after{content:""}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}.thumbnail-card-link{--card-border-radius:0.5rem;border-radius:var(--card-border-radius);text-decoration:none;display:inline-block}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-masonry-layout{--masonry-layout-min-column-width:10rem;--masonry-layout-gap:0.5rem;margin:0.25rem 0}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}'}},[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],helperText:[1,"helper-text"],hasError:[516,"has-error"],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]);function d(){"undefined"!=typeof customElements&&["limebb-feed-timeline-item","limebb-feed-item-thumbnail-file-info","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-feed-timeline-item":customElements.get(r(e))||customElements.define(r(e),m);break;case"limebb-feed-item-thumbnail-file-info":customElements.get(r(e))||n();break;case"limebb-navigation-button":customElements.get(r(e))||s();break;case"limebb-summary-popover":customElements.get(r(e))||l()}}))}export{m as F,d}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{b as a}from"./index.esm.js";import{d as n}from"./feed-item-thumbnail-file-info.js";import{d as s}from"./navigation-button.js";import{d as l}from"./summary-popover.js";const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!this.bodyTextElement||!(null==e?void 0:e.length))return;const t=e[0].contentRect.width;if(t===this.lastMeasuredWidth)return;this.lastMeasuredWidth=t,this.bodyTextElement.style.minHeight="0";const i=this.bodyTextElement.scrollHeight;this.bodyTextElement.style.removeProperty("min-height"),this.isTall=i>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=i)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return i("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,t,o;if(null===(t=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===t?void 0:t.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,t;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},i("limel-icon",{name:"angle_up"})),i("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:t,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[i("a",{class:"thumbnail-card-link",id:a,key:a,href:t||void 0},i("limel-card",{image:o,clickable:!!t},i("limebb-feed-item-thumbnail-file-info",{slot:"component",description:r})),this.showThumbnailTooltip(e,a))]},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,t;const r=`helper-text-${this.item.id}`;return i(o,{key:"ddc74b89e09e4bd56f2ce64ef2f9ddca011b7acb",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(t=this.item.author)||void 0===t?void 0:t.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return i("div",{class:"left"},i("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),i("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,t,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return i("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(t=this.item.icon)||void 0===t?void 0:t.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return i("div",{class:"right"},i("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderThumbnails(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return i("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return i("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return i("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:t,text:o}=this.item.author.name;return i("a",{class:"author",href:e,title:t},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:t}=this.item,o=this.getAuthorName(t),r=this.createLinkToAuthor(t);return i("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},i("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[i("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading,adaptColorContrast:!0})]}renderValue(){var e;if(this.item.value)return[i("div",{class:"markdown-container"},i("limel-markdown",{class:{"body-text":!0,opened:this.showMore,"no-table-styles":!(null===(e=this.item)||void 0===e?void 0:e.hasDefaultTableStyles),"reset-img-height":!0},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,adaptColorContrast:!0,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const t=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==t?void 0:t.length)return i("limel-masonry-layout",{role:"group"},t.map(this.renderThumbnailCard))}showThumbnailTooltip(e,t){var o;const{href:r,filename:a}=e;if(r)return i("limel-tooltip",{elementId:t,label:(null===(o=this.translator)||void 0===o?void 0:o.get("webclient.go-to-context-label",{context:a}))||a})}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[i("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},i("limel-icon",{name:"angle_down"})),i("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,t;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const t=this.item.promotedActions.map(this.createActionBarItem);return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:t,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(a.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return this}static get style(){return'@charset "UTF-8";limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]){padding:0.25rem 0}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:"";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(0.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.content{position:relative}.content:before,.content:after{content:"";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,button.expand-heading:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color)}button.expand-heading:hover{box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,button.collapse-heading:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);display:flex;flex-direction:column;align-items:center;gap:0.25rem;font-size:0.75rem;text-align:center;color:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.timestamp:after{width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--color-red-default))}:host(.is-new) .timestamp:after{content:""}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}.thumbnail-card-link{--card-border-radius:0.5rem;border-radius:var(--card-border-radius);text-decoration:none;display:inline-block}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-masonry-layout{--masonry-layout-min-column-width:10rem;--masonry-layout-gap:0.5rem;margin:0.25rem 0}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}'}},[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],helperText:[1,"helper-text"],hasError:[516,"has-error"],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]);function d(){"undefined"!=typeof customElements&&["limebb-feed-timeline-item","limebb-feed-item-thumbnail-file-info","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-feed-timeline-item":customElements.get(r(e))||customElements.define(r(e),m);break;case"limebb-feed-item-thumbnail-file-info":customElements.get(r(e))||n();break;case"limebb-navigation-button":customElements.get(r(e))||s();break;case"limebb-summary-popover":customElements.get(r(e))||l()}}))}export{m as F,d}
@@ -1 +1 @@
1
- import{setErrorHandler as t,getElement as n}from"@stencil/core/internal/client";var r={};function i(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function e(t){return t&&["belongsto","hasone"].includes(t.type)}r.LimeTypeRepository="state.limetypes";var o=function(t,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},o(t,n)};function u(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function c(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,e=n.call(t),o=[];try{for(;!(r=e.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return o}function s(t,n,r){if(2===arguments.length)for(var i,e=0,o=n.length;e<o;e++)(i||!(e in n))&&(i||=Array.prototype.slice.call(n,0,e),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))}function a(t){return"function"==typeof t}function l(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var h=l((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function v(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var y=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,i,e;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=c(o),l=u.next();!l.done;l=u.next())l.value.remove(this)}catch(n){t={error:n}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var v=this.initialTeardown;if(a(v))try{v()}catch(t){e=t instanceof h?t.errors:[t]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var b=c(y),m=b.next();!m.done;m=b.next()){var d=m.value;try{p(d)}catch(t){e??=[],t instanceof h?e=s(s([],f(e)),f(t.errors)):e.push(t)}}}catch(t){r={error:t}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(r)throw r.error}}}if(e)throw new h(e)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)p(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&v(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&v(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),b=y.EMPTY;function m(t){return t instanceof y||t&&"closed"in t&&a(t.remove)&&a(t.add)&&a(t.unsubscribe)}function p(t){a(t)?t():t.unsubscribe()}function d(){}function g(t){t()}var w=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,m(n)&&n.add(r)):r.destination=R,r}return u(n,t),n.create=function(t,n,r){return new O(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(y),j=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){x(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){x(t)}else x(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){x(t)}},t}(),O=function(t){function n(n,r,i){var e,o=t.call(this)||this;return e=a(n)||!n?{next:n??void 0,error:r??void 0,complete:i??void 0}:n,o.destination=new j(e),o}return u(n,t),n}(w);function x(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,s([t,n],f(r)))}((function(){throw t}))}(t)}var R={closed:!0,next:d,error:function(t){throw t},complete:d},S="function"==typeof Symbol&&Symbol.observable||"@@observable";function E(t){return t}var A=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var i=this,e=function(t){return t&&t instanceof w||function(t){return t&&a(t.next)&&a(t.error)&&a(t.complete)}(t)&&m(t)}(t)?t:new O(t,n,r);return g((function(){var t=i.operator,n=i.source;e.add(t?t.call(e,n):n?i._subscribe(e):i._trySubscribe(e))})),e},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=k(n))((function(n,i){var e=new O({next:function(n){try{t(n)}catch(t){i(t),e.unsubscribe()}},error:i,complete:n});r.subscribe(e)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[S]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?E:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=k(t))((function(t,r){var i;n.subscribe((function(t){return i=t}),(function(t){return r(t)}),(function(){return t(i)}))}))},t.create=function(n){return new t(n)},t}();function k(t){return t??undefined??Promise}var P=l((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),C=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return u(n,t),n.prototype.lift=function(t){var n=new T(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new P},n.prototype.next=function(t){var n=this;g((function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var e=c(n.currentObservers),o=e.next();!o.done;o=e.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;g((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;g((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,i=r.observers;return r.hasError||r.isStopped?b:(this.currentObservers=null,i.push(t),new y((function(){n.currentObservers=null,v(i,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new A;return t.source=this,t},n.create=function(t,n){return new T(t,n)},n}(A),T=function(t){function n(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return u(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??b},n}(C),$=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return u(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(C);function _(t){return t}function M(t,n){return(r,i)=>{let e=function(t,n,r,i){let e=F.get(t);return e||(e=[],F.set(t,e)),e.push({options:r,name:n,optionFactory:i.optionFactory||_,service:{name:i.name,method:i.method||"subscribe"}}),e}(r,i,t,n);1===e.length&&function(t,n){t.connectedCallback=W(t.connectedCallback,n),t.componentWillLoad=function(t,n){return async function(...r){return!0===U.get(this)?(await z(this),t?t.apply(this,r):void 0):W(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=q(t.componentDidUnload),t.disconnectedCallback=q(t.disconnectedCallback)}(r,e)}}var F=new WeakMap,N=new WeakMap,U=new WeakMap;function W(t,r){return async function(...i){U.set(this,!0),N.set(this,[]),await z(this);let e=new $(this.context);!function(t,r,i){let e=n(t),{get:o,set:u}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),r);Object.defineProperty(e,r,{configurable:!0,get:o,set:function(t){u.call(this,t),i.next(t)}})}(this,"context",e);for(let t of r)t.options=t.optionFactory(t.options,this),D(t.options)&&(t.options.context=e),I(this,t);if(t)return t.apply(this,i)}}function q(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=N.get(t);for(let t of n)t();N.set(t,[])}(this),r}}function D(t){return"context"in t}function z(t){let n=[];return t.platform||n.push(B(t,"platform")),t.context||n.push(B(t,"context")),0===n.length?Promise.resolve():Promise.all(n)}function B(t,r){let i=n(t);return new Promise((t=>{Object.defineProperty(i,r,{configurable:!0,set:n=>{delete i[r],i[r]=n,t()}})}))}function I(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let i=n.service.name,e=t.platform;if(!e.has(i))throw Error(`Service ${i} does not exist`);return e.get(i)[n.service.method](function(t,n){return r=>{t[n]=r}}(t,n.name),r)}(t,n);"function"==typeof r&&N.get(t).push(r)}function L(t={}){return M(t,{name:r.LimeTypeRepository})}function Q(t={}){let n={name:r.LimeTypeRepository};return t.map=[X,...t.map||[]],t.context=null,M(t,n)}function X(t){let{limetype:n}=this.context;return t[n]}function Z(t={}){let n={name:r.LimeObjectRepository};return t.map=[G,...t.map||[]],t.context=null,M(t,n)}function G(t){let{limetype:n,id:r}=this.context;if(t[n])return t[n].find((t=>t.id===r))}function H(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],i=t;for(;n=J(i);)r=[...r,n],i=Object.getPrototypeOf(i);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function J(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function K(t,n,r,i){var e,o=arguments.length,u=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,i);else for(var c=t.length-1;c>=0;c--)(e=t[c])&&(u=(o<3?e(u):o>3?e(n,r,u):e(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var V=class{context;filter;relation};V=K([H({id:"limeobject.bulk-create-dialog"})],V);var Y=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};Y=K([H({id:"limeobject.create-dialog"})],Y);var tt=class{context};tt=K([H({id:"limeobject.delete-object"})],tt);var nt=class{context};nt=K([H({id:"limeobject.object-access"})],nt);var rt=class{context;limeobject;route=!1;label};rt=K([H({id:"limeobject.save-object"})],rt);var it=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),et={Count:"COUNT"};r.Query="query";var ot={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var ut,ct,ft=class{path;query;hash;state};function st(t){return M(t,{name:r.ConfigRepository})}function at(t={}){return M(t,{name:r.FilterRepository})}function lt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===ct&&(ct=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),i=r.lastIndexOf("/");return-1===i?null:r.slice(i+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===ut?ut="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():ut)),ct&&(t=`${ct}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}ft=K([H({id:"navigator.navigate"})],ft),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var ht=null;try{t((function(t,n){ht||=lt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let i=t instanceof Error?t.message:String(t),e=t instanceof Error?t:void 0;ht.error(i,e,r)}))}catch{}export{H,Q as M,ot as Q,it as X,et as Z,lt as _,e as a,at as b,i,L as j,r as n,st as r,Z as z}
1
+ import{setErrorHandler as t,getElement as n}from"@stencil/core/internal/client";var r={};function i(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function e(t){return t&&["belongsto","hasone"].includes(t.type)}r.LimeTypeRepository="state.limetypes";var o="context-request";function u(t,n){let r,i={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:i})),r}var c="context";function f(t){return t.context?t.context:u(n(t),c)}var s=function(t,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},s(t,n)};function a(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function l(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,e=n.call(t),o=[];try{for(;!(r=e.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return o}function v(t,n,r){if(2===arguments.length)for(var i,e=0,o=n.length;e<o;e++)(i||!(e in n))&&(i||=Array.prototype.slice.call(n,0,e),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))}function y(t){return"function"==typeof t}function b(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var m=b((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function d(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var p=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,i,e;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=l(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(y(f))try{f()}catch(t){e=t instanceof m?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=l(s),b=a.next();!b.done;b=a.next()){var d=b.value;try{j(d)}catch(t){e??=[],t instanceof m?e=v(v([],h(e)),h(t.errors)):e.push(t)}}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}if(e)throw new m(e)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)j(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&d(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&d(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),g=p.EMPTY;function w(t){return t instanceof p||t&&"closed"in t&&y(t.remove)&&y(t.add)&&y(t.unsubscribe)}function j(t){y(t)?t():t.unsubscribe()}function x(){}function O(t){t()}var R=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,w(n)&&n.add(r)):r.destination=k,r}return a(n,t),n.create=function(t,n,r){return new S(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(p),E=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){A(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){A(t)}else A(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){A(t)}},t}(),S=function(t){function n(n,r,i){var e,o=t.call(this)||this;return e=y(n)||!n?{next:n??void 0,error:r??void 0,complete:i??void 0}:n,o.destination=new E(e),o}return a(n,t),n}(R);function A(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,v([t,n],h(r)))}((function(){throw t}))}(t)}var k={closed:!0,next:x,error:function(t){throw t},complete:x},C="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}var T=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var i=this,e=function(t){return t&&t instanceof R||function(t){return t&&y(t.next)&&y(t.error)&&y(t.complete)}(t)&&w(t)}(t)?t:new S(t,n,r);return O((function(){var t=i.operator,n=i.source;e.add(t?t.call(e,n):n?i._subscribe(e):i._trySubscribe(e))})),e},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,i){var e=new S({next:function(n){try{t(n)}catch(t){i(t),e.unsubscribe()}},error:i,complete:n});r.subscribe(e)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[C]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?P:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var i;n.subscribe((function(t){return i=t}),(function(t){return r(t)}),(function(){return t(i)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var _=b((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),q=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return a(n,t),n.prototype.lift=function(t){var n=new F(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new _},n.prototype.next=function(t){var n=this;O((function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var e=l(n.currentObservers),o=e.next();!o.done;o=e.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;O((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;O((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,i=r.observers;return r.hasError||r.isStopped?g:(this.currentObservers=null,i.push(t),new p((function(){n.currentObservers=null,d(i,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new T;return t.source=this,t},n.create=function(t,n){return new F(t,n)},n}(T),F=function(t){function n(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return a(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??g},n}(q),M=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return a(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(q);function N(t){return t}function U(t,n){return(r,i)=>{let e=function(t,n,r,i){let e=W.get(t);return e||(e=[],W.set(t,e)),e.push({options:r,name:n,optionFactory:i.optionFactory||N,service:{name:i.name,method:i.method||"subscribe"}}),e}(r,i,t,n);1===e.length&&function(t,n){t.connectedCallback=B(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===L.get(this)?t?t.apply(this,r):void 0:B(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=G(t.componentDidUnload),t.disconnectedCallback=G(t.disconnectedCallback)}(r,e)}}var W=new WeakMap,D=new WeakMap,L=new WeakMap;function B(t,r){return function(...i){L.set(this,!0);let e=[];D.set(this,e);let u=new M(f(this));e.push(function(t,r){let i=n(t);return c in i?function(t,n){let r=Object.getOwnPropertyDescriptor(t,c),i=function(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}(t,c);return n(i?.get?.call(t)),Object.defineProperty(t,c,{configurable:!0,enumerable:!0,get:()=>i?.get?.call(t),set:r=>{i?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,c,r):Reflect.deleteProperty(t,c)}}(i,r):function(t,n,r){let i,e={context:c,subscribe:!0,callback:(t,n)=>{r(t),n&&(i=n)}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:e})),()=>i?.()}(i,0,r)}(this,(t=>u.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),I(t.options)&&(t.options.context=u),z(this,t);if(t)return t.apply(this,i)}}function G(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=D.get(t);for(let t of n)t();D.set(t,[])}(this),r}}function I(t){return"context"in t}function z(t,r){let i=function(t,r){let i={...r.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(i,t);let e=r.service.name,o=function(t){if(t.platform)return t.platform;let r=u(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}(t);if(!o.has(e))throw Error(`Service ${e} does not exist`);return o.get(e)[r.service.method](function(t,n){return r=>{t[n]=r}}(t,r.name),i)}(t,r);"function"==typeof i&&D.get(t).push(i)}function H(t={}){return U(t,{name:r.LimeTypeRepository})}function J(t={}){let n={name:r.LimeTypeRepository};return t.map=[K,...t.map||[]],t.context=null,U(t,n)}function K(t){let n=f(this);if(n)return t[n.limetype]}function Q(t={}){let n={name:r.LimeObjectRepository};return t.map=[V,...t.map||[]],t.context=null,U(t,n)}function V(t){let n=f(this);if(!n)return;let{limetype:r,id:i}=n;return t[r]?t[r].find((t=>t.id===i)):void 0}function X(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],i=t;for(;n=Y(i);)r=[...r,n],i=Object.getPrototypeOf(i);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function Y(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function Z(t,n,r,i){var e,o=arguments.length,u=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,i);else for(var c=t.length-1;c>=0;c--)(e=t[c])&&(u=(o<3?e(u):o>3?e(n,r,u):e(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var tt=class{context;filter;relation};tt=Z([X({id:"limeobject.bulk-create-dialog"})],tt);var nt=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};nt=Z([X({id:"limeobject.create-dialog"})],nt);var rt=class{context};rt=Z([X({id:"limeobject.delete-object"})],rt);var it=class{context};it=Z([X({id:"limeobject.object-access"})],it);var et=class{context;limeobject;route=!1;label};et=Z([X({id:"limeobject.save-object"})],et);var ot=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ut={Count:"COUNT"};r.Query="query";var ct={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var ft,st,at=class{path;query;hash;state};function lt(t){return U(t,{name:r.ConfigRepository})}function ht(t={}){return U(t,{name:r.FilterRepository})}function vt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===st&&(st=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),i=r.lastIndexOf("/");return-1===i?null:r.slice(i+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===ft?ft="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():ft)),st&&(t=`${st}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}at=Z([X({id:"navigator.navigate"})],at),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var yt=null;try{t((function(t,n){yt||=vt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let i=t instanceof Error?t.message:String(t),e=t instanceof Error?t:void 0;yt.error(i,e,r)}))}catch{}export{Q as G,X as H,H as L,J as R,e as a,r as b,ct as c,ht as d,i,vt as j,lt as l,ot as n,ut as r}