@limetech/lime-crm-building-blocks 1.98.0 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/{index.esm-a894ac76.js → index.esm-d785eb6e.js} +2 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
- package/dist/cjs/limebb-chat-item_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
- package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
- package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +68 -179
- package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +80 -0
- package/dist/cjs/{limebb-limetype-field_2.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +108 -6
- package/dist/cjs/limebb-lime-query-filter-comparison_5.cjs.entry.js +705 -0
- package/dist/cjs/limebb-lime-query-filter-expression.cjs.entry.js +45 -0
- package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +68 -0
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/{limetype-1fe0207f.js → limetype-f2e4376e.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +41 -49
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.css +5 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.js +225 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +77 -41
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +35 -46
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +130 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +269 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +19 -25
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +34 -34
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +11 -26
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/summary-popover/summary-popover.js +3 -3
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/components/index.esm.js +2 -1
- package/dist/components/lime-query-filter-builder.js +129 -0
- package/dist/components/lime-query-filter-comparison.js +32 -45
- package/dist/components/lime-query-filter-expression.js +315 -0
- package/dist/components/limebb-lime-query-builder.js +73 -182
- package/dist/components/limebb-lime-query-filter-and.js +130 -1
- package/dist/components/limebb-lime-query-filter-builder.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-builder.js +6 -0
- package/dist/components/limebb-lime-query-filter-comparison.js +1 -1
- package/dist/components/limebb-lime-query-filter-expression.js +1 -1
- package/dist/components/limebb-lime-query-filter-group.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-group.js +6 -0
- package/dist/components/limebb-lime-query-filter-not.js +1 -1
- package/dist/components/limebb-lime-query-filter-or.js +118 -1
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-percentage-visualizer.js +2 -2
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +34 -2
- package/dist/components/live-docs-info.js +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/{index.esm-d8fdeb18.js → index.esm-bb569663.js} +2 -1
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-browser.entry.js +1 -1
- package/dist/esm/limebb-chat-item_2.entry.js +1 -1
- package/dist/esm/limebb-chat-list.entry.js +1 -1
- package/dist/esm/limebb-component-config.entry.js +1 -1
- package/dist/esm/limebb-component-picker.entry.js +1 -1
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +67 -178
- package/dist/esm/limebb-lime-query-filter-and.entry.js +76 -0
- package/dist/esm/{limebb-limetype-field_2.entry.js → limebb-lime-query-filter-builder_3.entry.js} +107 -6
- package/dist/esm/limebb-lime-query-filter-comparison_5.entry.js +697 -0
- package/dist/esm/limebb-lime-query-filter-expression.entry.js +41 -0
- package/dist/esm/limebb-lime-query-filter-or.entry.js +64 -0
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-loader.entry.js +1 -1
- package/dist/esm/limebb-locale-picker.entry.js +2 -2
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-mention.entry.js +1 -1
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-notification-item.entry.js +2 -2
- package/dist/esm/limebb-notification-list.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-text-editor.entry.js +3 -3
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/{limetype-6e7552a7.js → limetype-c0e041f7.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-a1818969.entry.js → p-03af0e66.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f402184f.entry.js → p-098ee6c1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-42e52b50.entry.js → p-1be0eec7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2aa18c2b.entry.js → p-206575e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-20bfca36.js +1 -0
- package/dist/lime-crm-building-blocks/p-24aeb928.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-82d33d43.entry.js → p-2faaacbc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d4016891.entry.js → p-2fdcb868.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f52125a0.entry.js → p-3122ea05.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-baf4e428.entry.js → p-3175883d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8c8b7115.entry.js → p-32534eb7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6c1146ca.entry.js → p-36ea13c0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-422f6d51.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-1fba0ade.js → p-4838284a.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5e4ba110.entry.js → p-5464f0de.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e9d23ef7.entry.js → p-569c86b5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-90e1716a.entry.js → p-5dc574a3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-00da9b24.entry.js → p-631ca5a5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-6d119dab.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-beb0d164.entry.js → p-7271f47a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-34357744.entry.js → p-9031f136.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-91732502.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-8c4eb49f.entry.js → p-93cadc1e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3932077b.entry.js → p-9cac4de2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-79d4668a.entry.js → p-a200954f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-b198194a.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d89c44ad.entry.js → p-b9b954d9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3a620226.entry.js → p-cfa1a4ad.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ef8a5266.entry.js → p-e8946134.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9d9f25da.entry.js → p-eb81bceb.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-50d3d61a.entry.js → p-ee1b00b9.entry.js} +1 -1
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +5 -4
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-builder.d.ts +50 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +6 -4
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +10 -14
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-group.d.ts +60 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +4 -4
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +5 -4
- package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +1 -0
- package/dist/types/components/lime-query-builder/lime-query.types.d.ts +2 -1
- package/dist/types/components.d.ts +293 -65
- package/package.json +1 -1
- package/dist/cjs/isEqual-e77cce75.js +0 -37
- package/dist/cjs/lime-query.types-bcb63a22.js +0 -61
- package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +0 -278
- package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +0 -239
- package/dist/cjs/limebb-property-selector.cjs.entry.js +0 -234
- package/dist/components/isEqual.js +0 -35
- package/dist/components/lime-query-filter-and.js +0 -408
- package/dist/esm/isEqual-57d0c223.js +0 -35
- package/dist/esm/lime-query.types-f72355e1.js +0 -59
- package/dist/esm/limebb-lime-query-filter-and_5.entry.js +0 -270
- package/dist/esm/limebb-lime-query-value-input.entry.js +0 -235
- package/dist/esm/limebb-property-selector.entry.js +0 -230
- package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-0957b2a6.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3b0a15ec.js +0 -1
- package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +0 -1
- package/dist/lime-crm-building-blocks/p-60971d64.js +0 -1
- package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-1556b545.js";import{Z as s,c as o}from"./p-4838284a.js";import{b as r}from"./p-20bfca36.js";import{i as n}from"./p-1484e300.js";import{b as l}from"./p-a659d55a.js";import{i as a,a as h,b as c}from"./p-b31772c8.js";import"./p-35897ec3.js";import"./p-fe2b91d9.js";import"./p-5322fd19.js";function p(t){return"string"==typeof t||!a(t)&&h(t)&&"[object String]"==c(t)}const d=class{constructor(i){t(this,i),this.expressionChange=e(this,"expressionChange",7),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:s.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:s.AND,exp:[this.expression,{key:"",op:s.EQUALS,exp:""}]})},this.handleExpressionChange=t=>{var e;t.stopPropagation(),this.expressionChange.emit(null!==(e=t.detail)&&void 0!==e?e:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}):this.renderEmptyState()}needsPromotion(){return!!this.expression&&("key"in this.expression||this.expression.op===s.NOT)}renderEmptyState(){return i("limel-button",{label:"Add a condition",icon:"plus_math",onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return i("div",{class:"expression-with-promotion"},i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),i("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}};d.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}";const m=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],u=m.filter((t=>"system"!==t));u.push("belongsto","hasone","hasmany","hasandbelongstomany");const f=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.propertyFields=[],this.fieldName="limetype",this.handleChange=t=>{t.stopPropagation();let e="";t.detail&&"value"in t.detail&&(e=t.detail.value),this.change.emit(e||void 0)}}componentWillLoad(){const t=this.platform.get(o.Application).getLanguage();this.collator=new Intl.Collator(t,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(t,e,i){var s,o,r,n;return"formInfo"!==i||(r=null===(s=null==t?void 0:t.schema)||void 0===s?void 0:s.oneOf,n=null===(o=null==e?void 0:e.schema)||void 0===o?void 0:o.oneOf,!l(r,n))}render(){var t;const e=this.getLimeTypes().map(b);e.sort(((t,e)=>this.collator.compare(t.text,e.text)));let s=e.find((t=>t.value===this.value)),o=this.invalid;return this.value&&!s&&(o=!0,e.unshift({text:(null===(t=this.limeTypeRepository.getLimeType(this.value))||void 0===t?void 0:t.localname.singular)||this.value,value:this.value}),s=e[0]),e.unshift({text:"",value:""}),i("limel-select",{key:"cf27b83c4751838e85436af443a275b3d7c9dfee",label:this.label,options:e,value:s,required:this.required,helperText:this.helperText,invalid:o,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var t,e;let i=this.limetypes;return(null===(e=null===(t=this.formInfo)||void 0===t?void 0:t.schema)||void 0===e?void 0:e.oneOf)&&(i=this.formInfo.schema.oneOf.map((t=>t.const)).filter(p)),i?i.map((t=>this.limeTypeRepository.getLimeType(t))).filter(n):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(t){for(const e of this.propertyFields)e.limetype=t,e.allowedPropertyTypes===m&&(e.allowedPropertyTypes=u)}get limeTypeRepository(){return this.platform.get(o.LimeTypeRepository)}},b=t=>({text:t.localname.singular,value:t.name,icon:r(t)});function y(t,e,i){if(null===i)return void t.push({path:e});const s=i,o="_alias"in s,r="#description"in s,n=Object.keys(s).filter((t=>"_alias"!==t&&"#description"!==t));if(0!==n.length)if(o||r){const i={};for(const t of n)i[t]=s[t];t.push(...v(i,e))}else t.push(...v(i,e));else{const i=s._alias,o=s["#description"];t.push(i||o?{path:e,alias:i,description:o}:{path:e})}}function v(t,e=""){if(!t)return[];const i=[];for(const[s,o]of Object.entries(t))"object"==typeof o&&y(i,e?`${e}.${s}`:s,o);return i}function g(t,e,i){const s=t[e];if(s&&"object"==typeof s&&!("_alias"in s)&&!("#description"in s))return;const o={};i.alias&&""!==i.alias.trim()&&(o._alias=i.alias),i.description&&""!==i.description.trim()&&(o["#description"]=i.description),t[e]=Object.keys(o).length>0?o:null}function x(t,e){const i=t[e];if(!i)return t[e]={},t[e];if("object"==typeof i){const t=i;return Object.keys(t).filter((t=>"_alias"!==t&&"#description"!==t)),t}return t[e]={},t[e]}const j=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.label="Select Properties to Return",this.items=[{path:"_id"}],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,0===i.length&&i.push({path:"_id"}),this.items=i,this.emitChange()},this.handleAddProperty=()=>{this.items=[...this.items,{path:""}],this.emitChange()}}componentWillLoad(){var t;if(null===(t=this.value)||void 0===t?void 0:t.object){const t=v(this.value.object);t.length>0&&(this.items=t)}}componentWillUpdate(){var t;if(null===(t=this.value)||void 0===t?void 0:t.object){const t=v(this.value.object);(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];return i&&t.path===i.path&&t.alias===i.alias&&t.description===i.description})))&&(this.items=t.length>0?t:[{path:"_id"}])}}render(){return this.limetype?i("div",{class:"response-format-editor"},i("div",{class:"header"},i("h4",null,this.label)),i("div",{class:"property-list"},this.items.map(((t,e)=>this.renderItem(t,e)))),i("div",{class:"actions"},i("limel-button",{label:"Add Property",icon:"plus_math",onClick:this.handleAddProperty})),i("div",{class:"summary"},i("span",{class:"count"},this.items.length," ",1===this.items.length?"property":"properties"," ","selected"))):i("div",{class:"empty-state"},i("p",null,"Select a limetype to choose properties"))}renderItem(t,e){return i("limebb-response-format-item",{key:`${t.path}-${e}`,class:"property-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){const t=function(t){const e={};for(const i of t){const t=i.path.split(".");let s=e;for(let e=0;e<t.length;e++){const o=t[e];e===t.length-1?g(s,o,i):s=x(s,o)}}return e}(this.items);this.change.emit({object:t})}};j.style=":host(limebb-response-format-editor){display:block;width:100%}.response-format-editor{display:flex;flex-direction:column;gap:1rem;padding:1rem}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.property-list{display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.property-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.property-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;justify-content:flex-start}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}.empty-state{padding:2rem;text-align:center;color:rgb(var(--contrast-700));font-style:italic}.empty-state p{margin:0}";export{d as limebb_lime_query_filter_builder,f as limebb_limetype_field,j as limebb_response_format_editor}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as i,g as o}from"./p-1556b545.js";import{c as r}from"./p-1fba0ade.js";const a=class{constructor(i){e(this,i),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(!(null==e?void 0:e.length))return;const t=e[0].contentRect.height;this.isTall=t>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=t)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return t("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return t("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,i;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},t("limel-icon",{name:"angle_up"})),t("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:i,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[t("a",{class:"thumbnail-card-link",id:a,key:a,href:i||void 0},t("limel-card",{image:o,clickable:!!i},t("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,o;const r=`helper-text-${this.item.id}`;return t(i,{key:"ae530cfe3aa5c54f8c1d3ceae6630b606f5ca57f",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(o=this.item.author)||void 0===o?void 0:o.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 t("div",{class:"left"},t("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),t("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,i,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return t("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(i=this.item.icon)||void 0===i?void 0:i.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 t("div",{class:"right"},t("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 t("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return t("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 t("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:i,text:o}=this.item.author.name;return t("a",{class:"author",href:e,title:i},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:i}=this.item,o=this.getAuthorName(i),r=this.createLinkToAuthor(i);return t("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},t("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[t("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading})]}renderValue(){var e;if(this.item.value)return[t("div",{class:"markdown-container"},t("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,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const i=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==i?void 0:i.length)return t("div",{class:"thumbnails-grid",role:"group"},i.map(this.renderThumbnailCard))}showThumbnailTooltip(e,i){var o;const{href:r,filename:a}=e;if(r)return t("limel-tooltip",{elementId:i,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[t("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},t("limel-icon",{name:"angle_down"})),t("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,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const i=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:i,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(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return o(this)}};a.style='@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}#show-more-button{all:unset;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}#show-more-button:hover,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover,#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)}#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#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{all:unset;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(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );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{all:unset;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(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );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)}.thumbnails-grid{display:block;width:100%;padding:0.25rem 0;columns:10rem;gap:clamp(0.25rem, 2vmin, 0.75rem)}.thumbnails-grid>.thumbnail-card-link{display:block;break-inside:avoid;margin-bottom:clamp(0.25rem, 2vmin, 0.75rem)}@supports (grid-template-rows: masonry){.thumbnails-grid{column-width:initial;column-gap:initial;display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));grid-template-rows:masonry;grid-auto-flow:dense;gap:0.5rem}.thumbnails-grid>.thumbnail-card-link{display:block;width:auto;margin:0;break-inside:auto}}: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))}';export{a as limebb_feed_timeline_item}
|
|
1
|
+
import{r as e,h as t,H as i,g as o}from"./p-1556b545.js";import{c as r}from"./p-4838284a.js";const a=class{constructor(i){e(this,i),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(!(null==e?void 0:e.length))return;const t=e[0].contentRect.height;this.isTall=t>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=t)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return t("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return t("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,i;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},t("limel-icon",{name:"angle_up"})),t("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:i,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[t("a",{class:"thumbnail-card-link",id:a,key:a,href:i||void 0},t("limel-card",{image:o,clickable:!!i},t("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,o;const r=`helper-text-${this.item.id}`;return t(i,{key:"ae530cfe3aa5c54f8c1d3ceae6630b606f5ca57f",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(o=this.item.author)||void 0===o?void 0:o.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 t("div",{class:"left"},t("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),t("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,i,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return t("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(i=this.item.icon)||void 0===i?void 0:i.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 t("div",{class:"right"},t("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 t("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return t("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 t("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:i,text:o}=this.item.author.name;return t("a",{class:"author",href:e,title:i},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:i}=this.item,o=this.getAuthorName(i),r=this.createLinkToAuthor(i);return t("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},t("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[t("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading})]}renderValue(){var e;if(this.item.value)return[t("div",{class:"markdown-container"},t("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,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const i=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==i?void 0:i.length)return t("div",{class:"thumbnails-grid",role:"group"},i.map(this.renderThumbnailCard))}showThumbnailTooltip(e,i){var o;const{href:r,filename:a}=e;if(r)return t("limel-tooltip",{elementId:i,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[t("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},t("limel-icon",{name:"angle_down"})),t("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,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const i=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:i,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(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return o(this)}};a.style='@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}#show-more-button{all:unset;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}#show-more-button:hover,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover,#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)}#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#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{all:unset;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(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );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{all:unset;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(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );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)}.thumbnails-grid{display:block;width:100%;padding:0.25rem 0;columns:10rem;gap:clamp(0.25rem, 2vmin, 0.75rem)}.thumbnails-grid>.thumbnail-card-link{display:block;break-inside:avoid;margin-bottom:clamp(0.25rem, 2vmin, 0.75rem)}@supports (grid-template-rows: masonry){.thumbnails-grid{column-width:initial;column-gap:initial;display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));grid-template-rows:masonry;grid-auto-flow:dense;gap:0.5rem}.thumbnails-grid>.thumbnail-card-link{display:block;width:auto;margin:0;break-inside:auto}}: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))}';export{a as limebb_feed_timeline_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as n}from"./p-1556b545.js";import{c as i}from"./p-1fba0ade.js";import{i as c}from"./p-1484e300.js";var u=function(e,r){if("function"==typeof e||r)return u.by(e,r);for(var n={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},i=[],c=0;c<e.length;c++){var a=e[c],o="__proto__"===a?n.objects:n[typeof a]||n.objects;Array.isArray(o)?o.indexOf(a)<0&&(o.push(a),i.push(a)):Object.hasOwnProperty.call(o,a)||(o[a]=!0,i.push(a))}return i};u.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],a=!1,o=0;o<i.length;o++)if(r.call(i,u,i[o])){a=!0;break}a||i.push(u)}return i};var a=[{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"]}];const o=class{constructor(n){e(this,n),this.change=r(this,"change",7),this.currencies=a.map((function(e){return e.code})),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=async e=>""===e?this.currencies.map(this.createListItem).filter(c):this.currencies.map(this.createListItem).filter(c).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 n("limel-picker",{key:"cea068dd015e8d59467d40e4f74d7950f6f9bed6",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(i.Translate)}get application(){return this.platform.get(i.Application)}get defaultLabel(){return this.translator.get("webclient.currency-picker.label")}};export{o as limebb_currency_picker}
|
|
1
|
+
import{r as e,c as r,h as n}from"./p-1556b545.js";import{c as i}from"./p-4838284a.js";import{i as c}from"./p-1484e300.js";var u=function(e,r){if("function"==typeof e||r)return u.by(e,r);for(var n={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},i=[],c=0;c<e.length;c++){var a=e[c],o="__proto__"===a?n.objects:n[typeof a]||n.objects;Array.isArray(o)?o.indexOf(a)<0&&(o.push(a),i.push(a)):Object.hasOwnProperty.call(o,a)||(o[a]=!0,i.push(a))}return i};u.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],a=!1,o=0;o<i.length;o++)if(r.call(i,u,i[o])){a=!0;break}a||i.push(u)}return i};var a=[{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"]}];const o=class{constructor(n){e(this,n),this.change=r(this,"change",7),this.currencies=a.map((function(e){return e.code})),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=async e=>""===e?this.currencies.map(this.createListItem).filter(c):this.currencies.map(this.createListItem).filter(c).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 n("limel-picker",{key:"cea068dd015e8d59467d40e4f74d7950f6f9bed6",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(i.Translate)}get application(){return this.platform.get(i.Application)}get defaultLabel(){return this.translator.get("webclient.currency-picker.label")}};export{o as limebb_currency_picker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as i,h as t}from"./p-1556b545.js";import{Z as s}from"./p-4838284a.js";const r=class{constructor(r){e(this,r),this.expressionChange=i(this,"expressionChange",7),this.renderChildExpression=(e,i)=>t("li",null,t("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,label:1===this.expression.exp.length?this.label:void 0,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:e,onExpressionChange:this.handleExpressionChange(i)})),this.handleExpressionChange=e=>i=>{var t;i.stopPropagation();const r=null!==(t=i.detail)&&void 0!==t?t:void 0,o=[...this.expression.exp];void 0===r?o.splice(e,1):o[e]=r,this.expressionChange.emit(0!==o.length?1!==o.length?{op:s.OR,exp:o}:o[0]:void 0)},this.handleAddChildExpression=()=>{const e=[...this.expression.exp,{key:"",op:s.EQUALS,exp:""}];this.expressionChange.emit({op:s.OR,exp:e})}}render(){return t("div",{key:"8efd3bba832388365d89313ebc007514fd3478e0",class:"expression"},this.expression.exp.length>1&&t("limel-header",{key:"eb65924d2e9b7e0e4e47f769b3af76773ae98266",heading:this.label,subheading:"Any of these conditions is true"}),t("ul",{key:"cc6a4c9d7532096f054e9e20d54e67d14d45a038"},this.expression.exp.map(this.renderChildExpression),t("li",{key:"ad876db1e6435657d2263351b75ae4acb3a6a234",class:"add-button"},this.renderAddChildExpression())))}renderAddChildExpression(){return t("limel-icon-button",{label:"Add alternative",icon:"plus_math",onClick:this.handleAddChildExpression})}};r.style='@charset "UTF-8";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:0;background-color:rgb(var(--contrast-200));border:1px solid rgb(var(--contrast-600));border-radius:0.75rem}.expression>ul{margin-top:0;margin-right:1rem;margin-bottom:1rem;margin-left:1rem;padding-left:1rem;list-style:circle}.expression>ul li{margin-top:1rem}.expression>ul li.add-button{list-style:none;margin-top:0;text-align:right}';export{r as limebb_lime_query_filter_or}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as r}from"./p-1556b545.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"
|
|
1
|
+
import{r as e,h as r}from"./p-1556b545.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"849694495956b6afbdfeac8aa7de680e1ab03450",class:"header"},r("limel-icon",{key:"84117fdfff949d6b41b9ec3f2b3ec73f21e5be7b",name:"not_showing_video_frames"}),r("h2",{key:"90f1738815699808c6353707b4f366d8a2c661ac"},"Viewing this file type requires ",r("em",{key:"ef09921e893851f06b756e1e2777847a7e4bd563"},"Live Docs"))),r("p",{key:"a835a0e1cabd84d7509167b3331878807b083130"},r("em",{key:"3f9ce9e473f33b89adfeb3b143e46cabb6feb1d4"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"f3e683b041ddd66e6f23514d9bb5f3faf80f4c3a",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as e}from"./p-1556b545.js";const o=class{constructor(e){r(this,e),this.tooltipId="a"+crypto.randomUUID()}render(){const r=this.getLabel();return[e("span",{key:"
|
|
1
|
+
import{r,h as e}from"./p-1556b545.js";const o=class{constructor(e){r(this,e),this.tooltipId="a"+crypto.randomUUID()}render(){const r=this.getLabel();return[e("span",{key:"dcd5792c82409e75e149e263fc7b4864e195a387",id:this.tooltipId},r),e("limel-tooltip",{key:"2c17e50ac616348df3a98da324b6538891cff75c",elementId:this.tooltipId,label:r,helperLabel:this.helperLabel})]}getLabel(){const r=this.limetype.localname;return`${this.count} ${1===this.count?r.singular:r.plural}`}};o.style=":host(limebb-mention-group-counter){order:2;margin-right:-0.5rem;box-sizing:border-box;transition:background-color 0.2s ease;min-width:fit-content;font-size:smaller;border-radius:9rem;cursor:help;padding:0.25rem 0.5rem;line-height:1;border:1px solid rgb(var(--contrast-500))}:host(limebb-mention-group-counter:hover){border-color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-600))}";export{o as limebb_mention_group_counter}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-1556b545.js";import{c as r,Y as i,K as s,W as o}from"./p-
|
|
1
|
+
import{r as t,h as e}from"./p-1556b545.js";import{c as r,Y as i,K as s,W as o}from"./p-4838284a.js";import{i as n,a,b as l,c as u,g as h,d as c,e as f}from"./p-5322fd19.js";import{i as d}from"./p-b31772c8.js";var v=Object.prototype.hasOwnProperty;class p{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let r;return r=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),r}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const r=this.objectRepository.getObject(e.limetype,e.id);return null==r?void 0:r.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class b{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class g{constructor(t){this.locale=t}format(t,e){const r=new Date(t);return{prefix:this.formatAffix("prefix",r,e),value:this.formatValue(r,e),suffix:this.formatAffix("suffix",r,e)}}formatValue(t,e){const r=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete r[t];if(e.suffix)for(const t of e.suffix)delete r[t];return new Intl.DateTimeFormat(this.locale,r).format(t)}formatAffix(t,e,r){const i=Object.assign({},r.options);for(const e of Object.keys(i))"hour12"!==e&&((r[t]||[]).includes(e)||delete i[e]);if(0!==Object.values(i).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,i).format(e)}}class m{constructor(t){this.locale=t}format(t,e){var r,i;const s=new Intl.NumberFormat(this.locale,e.options),o=s.formatToParts(t);let n="",a="",l="";for(const t of o)(null===(r=e.prefix)||void 0===r?void 0:r.includes(t.type))?n+=t.value:(null===(i=e.suffix)||void 0===i?void 0:i.includes(t.type))?l+=t.value:a+=t.value;return a||(a=s.format(t),n="",l=""),{prefix:n,value:a,suffix:l}}}class w{constructor(t){this.locale=t}format(t,e){const r=new Intl.RelativeTimeFormat(this.locale,e.options),{value:i,unit:s}=this.getRelativeTime(t),o=r.formatToParts(i,s);let n="",a="",l="";for(const t of o)"literal"!==t.type||a?"literal"===t.type&&a?l+=t.value:a+=t.value:n+=t.value;return a||(a=n||l,n="",l=""),{prefix:n,value:a,suffix:l}}getRelativeTime(t){const e=new Date(t),r=new Date,i=e.getTime()-r.getTime(),s=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of s){const e=i/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class y{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new m(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new g(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new w(this.locale):new b(this.locale)}}var j=function(t,e,r,i){var s,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};const O=class{constructor(e){t(this,e),this.aggregateOperator=o.Count,this.loading=!1,this.error=!1}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,r;const i=this.getFilter(),s=this.getFormattedValue(),o={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==s?void 0:s.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(r=null==s?void 0:s.suffix)||void 0===r?void 0:r.trim())||this.suffix},n=Object.assign(Object.assign({},o),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(i)}),a=Object.assign(Object.assign({},o),{label:this.getLabel(i),link:this.getLink(i),loading:this.loading,value:null==s?void 0:s.value.trim()});return e("limel-info-tile",Object.assign({key:"bb8b9eede8bdd3fdd17934753e463d134c46f7df",class:{error:!i||this.error}},!i||this.error?n:a))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new b(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(n(t)&&(d(t)||"string"==typeof t||"function"==typeof t.splice||a(t)||l(t)||u(t)))return!t.length;var e=h(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!f(t).length;for(var r in t)if(v.call(t,r))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){return t?{href:["explorer",t.limetype,t.id].join("/")}:{href:"#"}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new y(this.language).createFormatter(this.format,t)}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new p(this.platform,this.filters)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};j([i({})],O.prototype,"config",void 0),j([s()],O.prototype,"filters",void 0),O.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{O as limebb_info_tile}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-1556b545.js";import{T as r}from"./p-4838284a.js";import{g as o,a as n}from"./p-e0ab1554.js";const s=[{value:"=",label:"Equals",icon:"equals"},{value:"!=",label:"Not Equals",icon:"not-equal"},{value:">",label:"Greater Than",icon:"greater-than",applicableTypes:["integer","decimal","date","time"]},{value:">=",label:"Greater or Equal",icon:"greater-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"<",label:"Less Than",icon:"less-than",applicableTypes:["integer","decimal","date","time"]},{value:"<=",label:"Less or Equal",icon:"less-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"IN",label:"In List",icon:"list"},{value:"?",label:"Contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:"=?",label:"Begins With",icon:"-lime-filter-begin",applicableTypes:["string","text"]},{value:"=$",label:"Ends With",icon:"-lime-filter-end",applicableTypes:["string","text"]}];function l(e){return e?"key"in e?function(e){if(!("op"in e)||!("exp"in e))throw new Error("Invalid filter: comparison must have key, op, and exp properties");if(!s.map((e=>e.value)).includes(e.op))throw new Error(`Unsupported filter operator: ${e.op}`);const t=new Set(["key","op","exp","type"]),i=Object.keys(e).filter((e=>!t.has(e)));if(i.length>0)throw new Error(`Unexpected properties in filter comparison: ${i.join(", ")}`);return{filter_type:"comparison",property:e.key,operator:e.op,value:e.exp}}(e):function(e){if(!("op"in e))throw new Error("Invalid filter: filter group must have op property");if(!("exp"in e))throw new Error("Invalid filter: filter group must have exp property");const t=new Set(["op","exp"]),i=Object.keys(e).filter((e=>!t.has(e)));if(i.length>0)throw new Error(`Unexpected properties in filter group: ${i.join(", ")}`);if("!"===e.op){if(Array.isArray(e.exp))throw new TypeError("Invalid NOT filter: exp should be a single expression, not an array");return{filter_type:"NOT",expression:l(e.exp)}}if("AND"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid AND filter: exp must be an array");return{filter_type:"AND",expressions:e.exp.map(l)}}if("OR"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid OR filter: exp must be an array");return{filter_type:"OR",expressions:e.exp.map(l)}}throw new Error(`Unsupported filter operator: ${e.op}`)}(e):{filter_type:"AND",expressions:[]}}const a=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),d=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,c=/^\$me(\.\w+)*$/;function u(e,t,i=!0){const r=Object.keys(e),o=[];if(i){const e=r.filter((e=>e.startsWith("#")&&"#description"!==e));e.length>0&&o.push(`Property '${t}' contains # properties not supported in GUI: ${e.join(", ")}`)}return{keys:r.filter((e=>"_alias"!==e&&!e.startsWith("#"))),guiLimitations:o}}function p(e,t,i,r,o,n=!0){if(""===e){if(n&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=i[e];if(!s)throw new Error(`Property '${e}' does not exist on limetype '${o}'`);return s.relation?function(e,t,i,r,o=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${e}' must be null or an object`);const n=t,{keys:s,guiLimitations:l}=u(n,e,o);if(0===s.length)return l;const a=r.relation.getLimetype();if(!a)throw new Error(`Could not determine related limetype for property '${e}'`);const d={};for(const e of s)d[e]=n[e];const c=h(d,i,a.name,o);return[...l,...c]}(e,t,r,s,n):function(e,t,i=!0){if(null===t)return[];if("object"==typeof t){const{keys:r,guiLimitations:o}=u(t,e,i);if(0===r.length)return o;throw new Error(`Non-relation property '${e}' cannot have nested properties other than _alias or # properties (got: ${r.join(", ")})`)}throw new Error(`Non-relation property '${e}' must be null or an object (got ${typeof t})`)}(e,t,n)}function h(e,t,i,r=!0){const n=t[i];if(!n)throw new Error(`Unknown limetype: ${i}`);const s=o(n),l=[];for(const[o,n]of Object.entries(e)){if(o.startsWith("#"))continue;const e=p(o,n,s,t,i,r);l.push(...e)}return l}function m(e,t,i,r=!0){if(e)if("key"in e){const r=function(e,t,i){if(function(e){return"string"==typeof e&&(a.has(e)||d.test(e)||c.test(e))}(e))return{valid:!0};if("string"!=typeof e||!e.startsWith("%activeObject%"))return{valid:!0};if(!t)return{valid:!0};const r=e.replace(/^%activeObject%\.?/,"");if(!r)return{valid:!0};try{return n(i,t,r)?{valid:!0}:{valid:!1,error:`Property path '${r}' does not exist on limetype '${t}'`}}catch(e){return{valid:!1,error:`Invalid placeholder path: ${e.message}`}}}(e.exp,t,i);if(!r.valid)throw new Error(`Invalid placeholder in filter '${e.key}': ${r.error}`)}else if("exp"in e)if("!"===e.op)m(e.exp,t,i,r);else if("AND"===e.op||"OR"===e.op){const o=e.exp;for(const e of o)m(e,t,i,r)}}const f=class{constructor(i){e(this,i),this.change=t(this,"change",7),this.mode="gui",this.codeValue="",this.limetype="",this.handleLimetypeChange=e=>{e.stopPropagation(),this.limetype=e.detail,this.filter=void 0,this.internalResponseFormat={object:{_id:null}},this.emitChange()},this.handleFilterChange=e=>{var t;e.stopPropagation(),this.filter=null!==(t=e.detail)&&void 0!==t?t:void 0,this.emitChange()},this.handleResponseFormatChange=e=>{e.stopPropagation(),this.internalResponseFormat=e.detail,this.emitChange()},this.handleLimitChange=e=>{e.stopPropagation();const t=e.detail;this.limit=t?Number.parseInt(t,10):void 0,this.emitChange()},this.switchToGui=()=>{try{const e=JSON.parse(this.codeValue);if(!this.checkGuiSupport().guiSupported)return;this.limetype=e.limetype||"",this.filter=e.filter,this.internalResponseFormat=e.responseFormat,this.limit=e.limit,this.mode="gui",this.change.emit(e)}catch(e){}},this.switchToCode=()=>{this.updateCodeValue(),this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=JSON.parse(this.codeValue);this.change.emit(e)}catch(e){}}}get guiModeEnabled(){var e,t,i;return null!==(i=null===(t=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===t?void 0:t.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==i&&i}componentWillLoad(){if(!this.guiModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit),this.updateCodeValue(),this.checkGuiSupport().guiSupported||(this.mode="code")}render(){const e=this.checkGuiSupport(),t=!this.guiModeEnabled||"code"===this.mode;return i("div",{key:"0b4d2bb5b4d503a775d8d3215e1e4c74fdb1eceb",class:"lime-query-builder"},this.renderLabel(),this.renderModeControls(e),t?this.renderCodeMode(e):this.renderGuiMode())}emitChange(){if("code"===this.mode)return;if(!this.limetype)return;const e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};void 0!==this.limit&&this.limit>0&&(e.limit=this.limit),this.change.emit(e)}updateCodeValue(){if(!this.limetype)return void(this.codeValue=JSON.stringify(this.value||{},null,2));const e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};void 0!==this.limit&&this.limit>0&&(e.limit=this.limit),this.codeValue=JSON.stringify(e,null,2)}checkGuiSupport(){if(!this.limetypes)return{valid:!0,guiSupported:!0,validationErrors:[],guiLimitations:[]};let e;if("code"===this.mode&&this.codeValue)try{e=JSON.parse(this.codeValue)}catch(e){return{valid:!1,guiSupported:!1,validationErrors:["Invalid JSON"],guiLimitations:[]}}else{if(!this.limetype)return{valid:!0,guiSupported:!0,validationErrors:[],guiLimitations:[]};e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(e.limit=this.limit)}return function(e,t,i,r=!0){if(!e)return{valid:!0,guiSupported:!0,validationErrors:[],guiLimitations:[]};const o=[],n=[];if(e.limetype&&!t[e.limetype]&&o.push(`Unknown limetype: ${e.limetype}`),void 0===e.offset||e.orderBy||o.push("offset requires orderBy to be specified"),r&&(e.orderBy&&n.push("orderBy is not yet supported in GUI mode"),void 0!==e.offset&&n.push("offset is not yet supported in GUI mode")),e.filter){const n=function(e,t,i,r){const o=[];try{l(e),m(e,t,i,r)}catch(e){o.push(`Invalid filter: ${e.message}`)}return o}(e.filter,i,t,r);o.push(...n)}if(e.responseFormat){const{errors:i,limitations:s}=function(e,t,i,r){const o=[],n=[];try{const o=function(e,t,i,r=!0){const o=[];if(r&&e.aggregates&&o.push("responseFormat.aggregates is not yet supported in GUI mode"),e.object){const n=h(e.object,t,i,r);o.push(...n)}return o}(e,t,i,r);n.push(...o)}catch(e){o.push(`Invalid responseFormat: ${e.message}`)}return{errors:o,limitations:n}}(e.responseFormat,t,e.limetype,r);o.push(...i),n.push(...s)}return{valid:0===o.length,guiSupported:0===n.length,validationErrors:o,guiLimitations:n}}(e,this.limetypes,this.activeLimetype,this.guiModeEnabled)}renderModeSwitch(e){return i("div",{class:"mode-switch"},i("limel-button",{label:"GUI",primary:"gui"===this.mode,disabled:!e.guiSupported,onClick:this.switchToGui}),i("limel-button",{label:"Code",primary:"code"===this.mode,onClick:this.switchToCode}))}renderCodeEditor(e){return i("div",{class:"code-editor-container"},i("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&i("div",{class:"validation-errors"},i("strong",null,"Invalid Lime Query:"),i("ul",null,e.validationErrors.map((e=>i("li",null,e))))),this.guiModeEnabled&&e.valid&&!e.guiSupported&&e.guiLimitations.length>0&&i("div",{class:"gui-limitations"},i("strong",null,"Cannot switch to GUI mode:"),i("ul",null,e.guiLimitations.map((e=>i("li",null,e))))))}renderLimetypeSection(){return i("div",{class:"limetype-section"},i("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Object Type",value:this.limetype,required:!0,fieldName:"limetype",helperText:"Select the type of object you want to query",onChange:this.handleLimetypeChange}))}renderResponseFormatSection(){if(this.limetype)return i("div",{class:"response-format-section"},i("limebb-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return i("div",{class:"filter-section"},i("h4",{class:"section-label"},"Filter Conditions"),i("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var e;if(this.limetype)return i("div",{class:"query-options-section"},i("h4",{class:"section-label"},"Query Options"),i("div",{class:"query-options-controls"},i("limel-input-field",{label:"Limit",type:"number",value:(null===(e=this.limit)||void 0===e?void 0:e.toString())||"",placeholder:"No limit",helperText:"Maximum number of results",onChange:this.handleLimitChange})))}renderGuiMode(){return i("div",{class:"gui-mode"},this.renderLimetypeSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderLabel(){if(this.label)return i("h3",{class:"lime-query-builder-label"},this.label)}renderModeControls(e){if(this.guiModeEnabled)return i("div",{class:"mode-controls"},this.renderModeSwitch(e))}renderCodeMode(e){return i("div",{class:"code-mode"},this.renderCodeEditor(e))}};(function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);n>3&&s&&Object.defineProperty(t,i,s)})([r()],f.prototype,"limetypes",void 0),f.style=":host(limebb-lime-lime-query-builder){display:block;width:100%}.lime-query-builder{display:flex;flex-direction:column;gap:2rem}.mode-controls{display:flex;align-items:center;gap:0.5rem;padding:0.5rem}.mode-switch{display:flex;align-items:center;gap:0.5rem}.mode-switch limel-button{min-width:5rem}.mode-switch limel-helper-text{margin-left:1rem;color:rgb(var(--color-red-default))}.gui-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .gui-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .gui-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .gui-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .gui-limitations li{margin:0.25rem 0}.lime-query-builder-label{margin:0;font-size:1.5rem;font-weight:600;color:rgb(var(--contrast-1100))}.limetype-section{display:flex;flex-direction:column}.filter-section,.query-options-section{display:flex;flex-direction:column;gap:1rem}.section-label{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}.query-options-controls{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:1rem}@media (max-width: 768px){.lime-query-builder{gap:1.5rem}.query-options-controls{grid-template-columns:1fr}}";export{f as limebb_lime_query_builder}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as r}from"./p-1556b545.js";import{c as o}from"./p-
|
|
1
|
+
import{r as t,c as i,h as e,H as r}from"./p-1556b545.js";import{c as o}from"./p-4838284a.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"39801fd8e10f1dc228741df48561cad3c59d81d7",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"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}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;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{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as o,h as r}from"./p-1556b545.js";import{c as e}from"./p-
|
|
1
|
+
import{r as t,g as o,h as r}from"./p-1556b545.js";import{c as e}from"./p-4838284a.js";function i(t,o){if(o(t))return t;let r=t.parentElement||t.parentNode;var e;return(null==(e=r)?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&(r=r.host),r?i(r,o):void 0}const n=class{constructor(o){t(this,o)}connectedCallback(){const t=i(o(this),this.hasPlatform);t&&this.loadLimeObject(t.platform)}hasPlatform(t){return"platform"in t&&!!t.platform&&"object"==typeof t.platform}async loadLimeObject(t){const o=t.get(e.LimeObjectRepository);if(this.limeobject=o.getObject(this.limetype,this.objectid),!this.limeobject){try{await o.loadObject(this.limetype,this.objectid)}catch(t){console.error("Could not load mentioned object")}this.limeobject=o.getObject(this.limetype,this.objectid)}}render(){return this.limeobject?this.renderLimeObject(this.limeobject):this.renderSlot()}renderLimeObject(t){return r("a",{href:`object/${this.limetype}/${this.objectid}`},t.descriptive,this.renderSlot({hidden:!0}))}renderSlot(t={}){return r("span",Object.assign({},t),r("slot",null))}};n.style=':host(limebb-mention){display:inline}a{transition:background-color 0.2s ease;white-space:normal;overflow-wrap:break-word;word-break:break-word;padding:0 0.125rem;border-radius:0.25rem;text-decoration:none;color:rgb(var(--color-blue-default));background-color:rgb(var(--color-blue-default), 0.06)}a:hover{background-color:rgb(var(--color-blue-default), 0.16)}a:before,span:before{content:"@";opacity:0.7}';export{n as limebb_mention}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as n,h as t}from"./p-1556b545.js";import{c as u}from"./p-
|
|
1
|
+
import{r,c as n,h as t}from"./p-1556b545.js";import{c as u}from"./p-4838284a.js";import{t as e,c as i,a as f,i as o,g as a,b as c,d as s}from"./p-d298b34e.js";import{i as l,a as v,S as d,k as p}from"./p-35897ec3.js";import{d as h,i as m,S as b}from"./p-b31772c8.js";import{i as j,c as g,f as y,h as x}from"./p-5322fd19.js";import{b as w}from"./p-a659d55a.js";import{i as O}from"./p-7e6fb4af.js";import{d as k}from"./p-123190c3.js";import{e as A}from"./p-fe2b91d9.js";function S(r){return r}var _,E,R,U=Date.now,q=k?function(r,n){return k(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:S;const C=(_=q,E=0,R=0,function(){var r=U(),n=16-(r-R);if(R=r,n>0){if(++E>=800)return arguments[0]}else E=0;return _.apply(void 0,arguments)});var D=Math.max;function I(r,n,t){if(!h(t))return!1;var u=typeof n;return!!("number"==u?j(t)&&l(n,t.length):"string"==u&&n in t)&&A(t[n],r)}var L=b?b.isConcatSpreadable:void 0;function M(r){return m(r)||g(r)||!!(L&&r&&r[L])}function T(r,n,t,u,e){var i=-1,f=r.length;for(t||(t=M),e||(e=[]);++i<f;){var o=r[i];n>0&&t(o)?n>1?T(o,n-1,t,u,e):v(e,o):u||(e[e.length]=o)}return e}var W=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function z(r){return W.test(r)}var B="\\ud800-\\udfff",F="["+B+"]",G="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",H="\\ud83c[\\udffb-\\udfff]",J="[^"+B+"]",K="(?:\\ud83c[\\udde6-\\uddff]){2}",N="[\\ud800-\\udbff][\\udc00-\\udfff]",P="(?:"+G+"|"+H+")?",Q="[\\ufe0e\\ufe0f]?",V=Q+P+"(?:\\u200d(?:"+[J,K,N].join("|")+")"+Q+P+")*",X="(?:"+[J+G+"?",G,K,N,F].join("|")+")",Y=RegExp(H+"(?="+H+")|"+X+V,"g");const Z=function(r){var n,t,u,i,f=z(r=e(r))?function(r){return z(r)?function(r){return r.match(Y)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=f?f[0]:r.charAt(0),a=f?(n=f,t=1,i=n.length,u=void 0===u?i:u,!t&&u>=i?n:function(r,n,t){var u=-1,e=r.length;n<0&&(n=-n>e?0:e+n),(t=t>e?e:t)<0&&(t+=e),e=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(e);++u<e;)i[u]=r[u+n];return i}(n,t,u)).join(""):r.slice(1);return o.toUpperCase()+a};var $=1,rr=2;function nr(r){return r==r&&!h(r)}function tr(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function ur(r,n){return null!=r&&n in Object(r)}var er=1,ir=2;function fr(r){return"function"==typeof r?r:null==r?S:"object"==typeof r?m(r)?(e=r[1],o(u=r[0])&&nr(e)?tr(f(u),e):function(r){var n=a(r,u);return void 0===n&&n===e?function(r,n){return null!=r&&function(r,n,t){for(var u=-1,e=(n=i(n,r)).length,o=!1;++u<e;){var a=f(n[u]);if(!(o=null!=r&&t(r,a)))break;r=r[a]}return o||++u!=e?o:!!(e=null==r?0:r.length)&&y(e)&&l(a,e)&&(m(r)||g(r))}(r,n,ur)}(r,u):w(e,n,er|ir)}):(t=function(r){for(var n=p(r),t=n.length;t--;){var u=n[t],e=r[u];n[t]=[u,e,nr(e)]}return n}(n=r),1==t.length&&t[0][2]?tr(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t,u){var e=t.length,i=e;if(null==r)return!i;for(r=Object(r);e--;){var f=t[e];if(f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++e<i;){var o=(f=t[e])[0],a=r[o],c=f[1];if(f[2]){if(void 0===a&&!(o in r))return!1}else{var s,l=new d;if(!(void 0===s?w(c,a,$|rr,u,l):s))return!1}}return!0}(r,0,t)}):function(r){return o(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,u,e}const or=function(r,n,t){for(var u=-1,e=Object(r),i=t(r),f=i.length;f--;){var o=i[++u];if(!1===n(e[o],o,e))break}return r};const ar=function(r,n){if(null==r)return r;if(!j(r))return function(r,n){return r&&or(r,n,p)}(r,n);for(var t=r.length,u=-1,e=Object(r);++u<t&&!1!==n(e[u],u,e););return r};function cr(r,n){if(r!==n){var t=void 0!==r,u=null===r,e=r==r,i=O(r),f=void 0!==n,o=null===n,a=n==n,c=O(n);if(!o&&!c&&!i&&r>n||i&&f&&a&&!o&&!c||u&&f&&a||!t&&a||!e)return 1;if(!u&&!i&&!c&&r<n||c&&t&&e&&!u&&!i||o&&t&&e||!f&&e||!a)return-1}return 0}function sr(r,n,t){n=n.length?s(n,(function(r){return m(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[S];var u=-1;n=s(n,x(fr));var e=function(r,n){var t=-1,u=j(r)?Array(r.length):[];return ar(r,(function(r){u[++t]=n(r)})),u}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++u,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var u=-1,e=r.criteria,i=n.criteria,f=e.length,o=t.length;++u<f;){var a=cr(e[u],i[u]);if(a)return u>=o?a:a*("desc"==t[u]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(e)}var lr=function(r){return C(function(r,n,t){return n=D(void 0===n?r.length-1:n,0),function(){for(var u=arguments,e=-1,i=D(u.length-n,0),f=Array(i);++e<i;)f[e]=u[n+e];e=-1;for(var o=Array(n+1);++e<n;)o[e]=u[e];return o[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,o)}}(r,void 0,S),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&I(r,n[0],n[1])?n=[]:t>2&&I(n[0],n[1],n[2])&&(n=[n[0]]),sr(r,T(n,1),[])}));const vr=lr;function dr(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=Z(e(t[0]).toLowerCase()),t.join(" ")}const pr=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(u.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:dr(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"5b3491e9dd6725186c4a2795e7893de43457e147",value:n,options:vr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{pr as limebb_locale_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as i,H as o}from"./p-1556b545.js";import{c as a}from"./p-
|
|
1
|
+
import{r as e,c as r,h as i,H as o}from"./p-1556b545.js";import{c as a}from"./p-4838284a.js";const s=class{constructor(o){e(this,o),this.interact=r(this,"interact",7),this.renderRelations=()=>{var e,r,o;if(null===(r=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===r?void 0:r.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?i("img",{loading:"lazy",src:e.picture,alt:e.name.text}):i("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var r,i;return"separator"in e?e:{value:e,text:null!==(r=e.label)&&void 0!==r?r:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=e=>{var r;e.stopPropagation();const i=null===(r=e.detail.value)||void 0===r?void 0:r.command;i&&this.commandbus.handle(i)},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"4219ff4f6c63ffdf95d24ad12000c4e23b1b53c2",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(r=this.item)||void 0===r?void 0:r.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick},this.renderHeader(),this.renderContent(),this.renderFooter())}renderHeader(){return i("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,r,o,a;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){return i("div",{class:"content"},this.renderValue(),this.renderRelations())}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,r;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",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),i("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.more-actions"),openDirection:"top-end"}))}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"assignees"},this.item.assignees.map((e=>{var r;return i("limebb-summary-popover",Object.assign({icon:null===(r=e.icon)||void 0===r?void 0:r.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),i("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),i("span",null,e.name.text)))})))}createLinkToAssignee(e){const r=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${r}</a>`}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)}};s.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem;min-height:3rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary);text-decoration:none}.header a: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)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:1rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem)}limel-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{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)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover: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)}.header .actions:hover:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{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:transparent;display:flex;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';export{s as limebb_kanban_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as r,g as o}from"./p-1556b545.js";import{c as n}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i,H as r,g as o}from"./p-1556b545.js";import{c as n}from"./p-4838284a.js";import{H as a}from"./p-66352a1e.js";function s(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function l(e,t,i){const r=function(e,t){return+s(e)-+s(t)}(e,t)/6e4;return(o=i?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}const d=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.highlightedItemIdNotFound=t(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,o,n,a,s;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;if((null===(a=null===(n=this.items[t-1])||void 0===n?void 0:n.icon)||void 0===a?void 0:a.name)!==(null===(s=null==e?void 0:e.icon)||void 0===s?void 0:s.name))return!1;const d=new Date(e.timestamp),h=new Date(this.items[t-1].timestamp),m=new Date(h),c=new Date(d);return"DESC"===this.direction?l(m,c)<=this.minutesOfProximity:l(c,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return i(r,{key:"8b53e0a71a8921ed0cb7fcd50273c1070eef365e",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.groupedItems.map((e=>i("section",{class:"date-group",key:`date-group-${e.date}`},i("a",{class:"date-heading"},e.date),e.items.map((({item:e,index:t})=>i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t),class:this.isNewItem(e)?"is-new":void 0}))))))}isNewItem(e){if(!this.lastVisitedTimestamp)return!1;const t=new Date(this.lastVisitedTimestamp);return new Date(e.timestamp)>t}renderLoadMore(){if(!(0===this.items.length||this.totalCount<=this.items.length))return i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(n.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(n.Translate)}get groupedItems(){const e=[];for(let t=0;t<this.items.length;t++){const i=this.items[t],r=this.dateTimeFormatter.format(i.timestamp,"date"),o=e.at(-1);o&&o.date===r?o.items.push({item:i,index:t}):e.push({date:r,items:[{item:i,index:t}]})}return e}highlightedItemIdChanged(e){void 0!==e&&this.highlightItem(e)}highlightItem(e){var t;const i=null===(t=this.feedItemElement.shadowRoot)||void 0===t?void 0:t.querySelector(`limebb-feed-timeline-item[id="${e}"]`);return i?(i.setAttribute("aria-current","true"),i.scrollIntoView({behavior:"smooth",block:"center"}),i.focus(),setTimeout((()=>{i.removeAttribute("aria-current")}),3e3),!0):(this.highlightedItemIdNotFound.emit({id:e}),!1)}get highlighter(){return this.platform.get(a.SERVICE_NAME)}get feedItemElement(){return o(this)}static get watchers(){return{highlightedItemId:["highlightedItemIdChanged"]}}};d.style=':host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:column;gap:0.375rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto 0 -0.5rem;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-promoted-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}limebb-feed-timeline-item:focus{outline:none}limebb-feed-timeline-item[aria-current=true]:focus{animation:highlight-animation ease-in-out;animation-duration:var(--limebb-feed-highlight-duration)}@keyframes highlight-animation{0%,20%,100%{box-shadow:none}10%,50%,60%{box-shadow:var(--shadow-focused-state)}}';export{d as limebb_feed}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
|
-
import { LimeQueryFilterAnd, LimeQueryFilterMissing } from '../lime-query.types';
|
|
2
|
+
import { AndOrExpression, Expression, LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
4
3
|
/**
|
|
5
4
|
* Lime Query Filter AND Component
|
|
6
5
|
*
|
|
@@ -41,11 +40,13 @@ export declare class LimeQueryFilterAndComponent implements LimeWebComponent {
|
|
|
41
40
|
/**
|
|
42
41
|
* The AND expression containing child expressions
|
|
43
42
|
*/
|
|
44
|
-
expression:
|
|
43
|
+
expression: AndOrExpression;
|
|
45
44
|
/**
|
|
46
45
|
* Emitted when the AND expression changes (expressions added/removed/modified)
|
|
46
|
+
* Emits undefined when expression should be removed
|
|
47
|
+
* Can emit any Expression type when unwrapping (single child)
|
|
47
48
|
*/
|
|
48
|
-
expressionChange: EventEmitter<
|
|
49
|
+
expressionChange: EventEmitter<Expression | undefined>;
|
|
49
50
|
render(): any;
|
|
50
51
|
private renderChildExpression;
|
|
51
52
|
private renderAddChildExpression;
|