@limetech/lime-crm-building-blocks 1.110.3 → 1.111.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/dom-2ea30350.js +28 -0
- package/dist/cjs/{index.esm-b68bd570.js → index.esm-e01e9bd4.js} +2 -1
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/{lime-query-validation-5eb432fe.js → lime-query-validation-c118b96d.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-data-cells.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 +2 -2
- package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +2 -2
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention.cjs.entry.js +3 -27
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/limebb-object-chip.cjs.entry.js +216 -0
- package/dist/cjs/limebb-property-selector.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +4 -3
- package/dist/cjs/{limetype-b91060e7.js → limetype-3c1c53b6.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/object-chip/object-chip.css +3 -0
- package/dist/collection/components/object-chip/object-chip.js +157 -0
- package/dist/collection/components/text-editor/text-editor.js +3 -1
- package/dist/collection/util/object-resolver.js +151 -0
- package/dist/components/dom.js +26 -0
- package/dist/components/index.esm.js +1 -1
- package/dist/components/limebb-mention.js +1 -25
- package/dist/components/limebb-object-chip.d.ts +11 -0
- package/dist/components/limebb-object-chip.js +238 -0
- package/dist/components/limebb-text-editor.js +3 -2
- package/dist/esm/dom-9cc051d7.js +26 -0
- package/dist/esm/{index.esm-863d7783.js → index.esm-11a8b9e2.js} +1 -1
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/{lime-query-validation-84253575.js → lime-query-validation-01797a51.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-data-cells.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 +2 -2
- package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +2 -2
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-group_3.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +2 -2
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
- package/dist/esm/limebb-loader.entry.js +1 -1
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention.entry.js +2 -26
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-notification-list.entry.js +1 -1
- package/dist/esm/limebb-object-chip.entry.js +212 -0
- package/dist/esm/limebb-property-selector.entry.js +2 -2
- package/dist/esm/limebb-text-editor.entry.js +4 -3
- package/dist/esm/{limetype-09477163.js → limetype-12fbba0f.js} +2 -2
- 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-bd92871a.entry.js → p-01375d63.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6aeb7b9b.js → p-0a266c26.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3b1fcd5b.js → p-199799ff.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-da511a18.entry.js → p-199f0a47.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-27e84266.entry.js → p-1b2ed672.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-14685f34.entry.js → p-3d4c4df2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-4a85590d.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0da02112.entry.js → p-4b494de7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-37982f06.entry.js → p-517fd960.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-fc92dab6.entry.js → p-59b4af72.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-96775953.entry.js → p-5f5cd2b2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f1eee3bb.entry.js → p-6bd3f952.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c9460ae0.entry.js → p-77e7d7da.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-77ef7ad1.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-c3c0c738.entry.js → p-81583fc8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-85cae2a1.entry.js → p-85c04627.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3f0e4017.entry.js → p-87e5d049.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4fa58e0e.entry.js → p-95b6eaf5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-77b97c9f.entry.js → p-a954d06e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7c04361c.entry.js → p-ac833ff7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d4273468.entry.js → p-acf77715.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-cbbcec09.entry.js → p-af1e3cac.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-b7959ddb.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-f97ea913.entry.js → p-c38f0931.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0ed58846.entry.js → p-d2bd2fc3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9f2a9cf5.js → p-d47b6c3c.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4584e9c8.entry.js → p-e8069516.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-eb4aa158.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9624acfd.entry.js → p-ef08b09f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-dd6861b1.entry.js → p-f965d2a6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-aec5cbca.entry.js → p-f9daa703.entry.js} +1 -1
- package/dist/types/components/object-chip/object-chip.d.ts +47 -0
- package/dist/types/components/text-editor/text-editor.d.ts +1 -0
- package/dist/types/components.d.ts +93 -0
- package/dist/types/util/object-resolver.d.ts +66 -0
- package/package.json +1 -1
- package/dist/lime-crm-building-blocks/p-351de229.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d51d607b.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as i}from"./p-52cf8641.js";import{c as r}from"./p-3b1fcd5b.js";const a=class{constructor(t){e(this,t),this.hasError=!1,this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let r={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?r=Object.assign(Object.assign({},r),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:r.text,iconOnly:!0}):e.icon&&(r=Object.assign(Object.assign({},r),{icon:e.icon})),r},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)},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.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)}}render(){const e=`helper-text-${this.item.id}`;return t(i,{key:"194f72f603860f5426708190e5eaecaad7082bab",id:this.item.id,"aria-describedby":this.helperText?e:void 0,"aria-live":this.hasError?"assertive":"off",class:{[`${this.item.ui}`]:!0}},t("div",{key:"f8ebc3774ec707c9a755092b17c634f8dcc9b787",class:"bubble-content"},t("div",{key:"46ba28aec47cc1ecfd6752d9e03ee7471b47bb17",class:"icon-picture"},this.renderIcon(),this.renderAuthorPicture()),this.renderErrorSign(),t("div",{key:"eebe6ac230b4f4ba182229377984eb83a3e83570",class:"item"},this.renderHeader(),this.renderValue(),t("footer",{key:"f349fb88d701726af5793d35adce4d0880a1dbea"},this.renderHelperText(e),this.renderTimestamp()))),this.renderPromotedAction())}renderErrorSign(){if(this.hasError)return t("limel-icon",{class:"error-sign",name:"brake_warning"})}renderHeader(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.name)return t("header",null,this.renderAuthorName(),t("div",{class:"action-buttons"},this.renderUnpromotedActionsMenu()))}renderIcon(){var e,i,r,a;if(this.item.icon)return t("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderValue(){if(this.item.value)return t("limel-markdown",{class:"body-text reset-img-height",value:this.item.value})}renderAuthorName(){var e,i;if("string"==typeof(null===(e=this.item.author)||void 0===e?void 0:e.name))return t("span",{class:"author"},this.item.author.name);if("object"==typeof(null===(i=this.item.author)||void 0===i?void 0:i.name)){const{href:e,title:i,text:r}=this.item.author.name;return t("a",{class:"author",href:e,title:i},r)}}renderAuthorPicture(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.picture)return"limel-ai-avatar"===this.item.author.picture?t("limel-ai-avatar",{class:"author-avatar"}):t("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:r,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")}))}renderPromotedAction(){if(!this.item.promotedActions)return;const e=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:e,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return t("span",{class:"timestamp"},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)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-chat-item){display:flex;flex-direction:column;gap:0.25rem;min-width:0;min-height:0;max-width:calc(100% - 2rem)}.bubble-content{display:flex;gap:0.25rem;min-width:0;min-height:0}:host(limebb-chat-item:hover) .helper-text,:host(limebb-chat-item:hover) .timestamp,:host(limebb-chat-item:focus-within) .helper-text,:host(limebb-chat-item:focus-within) .timestamp{opacity:1}:host(limebb-chat-item.mine){margin-left:auto}:host(limebb-chat-item.mine) .item{border-bottom-right-radius:0.125rem;background-color:rgb(var(--color-sky-default), 0.2)}:host(limebb-chat-item.mine) .bubble-content{justify-content:end}:host(limebb-chat-item.mine) .icon-picture{order:2}:host(limebb-chat-item.theirs){margin-right:auto}:host(limebb-chat-item.theirs) .item{border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-300), 0.7)}.item{display:flex;flex-direction:column;border-radius:1.25rem;padding:0 0.25rem 0.25rem 0.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.icon-picture{display:flex;flex-direction:column;gap:0.5rem;align-items:center;justify-content:flex-end}.icon-picture:has(.author-avatar) limel-icon{width:1.25rem;padding:0.125rem}.icon{--icon-background-color:rgb(var(--contrast-500), 0.5);flex-shrink:0;padding:0.375rem;width:2.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-ai-avatar.author-avatar{background-color:rgb(var(--color-glaucous-darker))}header{display:flex;justify-content:space-between;align-items:center;min-height:2rem;padding-left:0.5rem}header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.body-text{padding:0.25rem 0.5rem}footer{display:flex;justify-content:space-between;align-items:end;gap:0.5rem;font-size:x-small}footer:not(:empty){padding:0 0.25rem 0.125rem 0.5rem}footer *{transition:opacity 0.2s ease;opacity:0.4}.timestamp{margin-left:auto}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-chat-item:hover) .action-bar,:host(limebb-chat-item:focus-within) .action-bar,:host(limebb-chat-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-chat-item:hover) limel-action-bar,:host(limebb-chat-item:focus-within) limel-action-bar,:host(limebb-chat-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-chat-item:hover),:host(limebb-chat-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}.action-bar{min-width:0;width:calc(100% - calc(2rem + 0.25rem))}:host(limebb-chat-item.theirs) .action-bar{margin-left:calc(2rem + 0.25rem)}:host(limebb-chat-item[has-error]:not([has-error=false])) .bubble-content{cursor:help}:host(limebb-chat-item[has-error]:not([has-error=false])) .item{border:1px solid rgb(var(--color-red-default))}:host(limebb-chat-item[has-error]:not([has-error=false])) .error-sign{color:rgb(var(--color-red-default));flex-shrink:0;width:1.25rem;align-self:center}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .action-bar{padding-left:1.25rem}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';const o=class{constructor(t){e(this,t)}render(){return t("div",{key:"4acffbefa03eb7605db612242ebfcbba15522d42",class:"typing-ellipsis"},t("div",{key:"9911cf59740e060dc74e88d569083c0ecfa0a891",class:"circle"}),t("div",{key:"ebbe4137c147c84322c47c39b847c8f8bc00a7b0",class:"circle"}),t("div",{key:"9118c496ffe0eb308716f8c7fbea518bd607731a",class:"circle"}))}};o.style="*{box-sizing:border-box}.typing-ellipsis{position:relative;display:inline-flex;align-items:center;gap:0.25rem;height:1.5rem;padding:0 0.5rem;border-radius:10rem;border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-600), 0.4);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.circle{position:relative;height:0.5rem;width:0.5rem;background:rgb(var(--contrast-800));border-radius:50%}.circle:first-of-type{animation:ellipsis-typing-indicator 1.2s infinite}.circle:nth-of-type(2){animation:ellipsis-typing-indicator 1.2s infinite 0.2s}.circle:nth-of-type(3){animation:ellipsis-typing-indicator 1.2s infinite 0.4s}@keyframes ellipsis-typing-indicator{0%{top:0}6.25%{top:-1px}12.5%{top:0;background:rgb(var(--contrast-1000))}18.75%{top:1px}25%{top:0}}";export{a as limebb_chat_item,o as limebb_typing_indicator}
|
|
1
|
+
import{r as e,h as t,H as i}from"./p-52cf8641.js";import{c as r}from"./p-199799ff.js";const a=class{constructor(t){e(this,t),this.hasError=!1,this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let r={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?r=Object.assign(Object.assign({},r),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:r.text,iconOnly:!0}):e.icon&&(r=Object.assign(Object.assign({},r),{icon:e.icon})),r},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)},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.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)}}render(){const e=`helper-text-${this.item.id}`;return t(i,{key:"194f72f603860f5426708190e5eaecaad7082bab",id:this.item.id,"aria-describedby":this.helperText?e:void 0,"aria-live":this.hasError?"assertive":"off",class:{[`${this.item.ui}`]:!0}},t("div",{key:"f8ebc3774ec707c9a755092b17c634f8dcc9b787",class:"bubble-content"},t("div",{key:"46ba28aec47cc1ecfd6752d9e03ee7471b47bb17",class:"icon-picture"},this.renderIcon(),this.renderAuthorPicture()),this.renderErrorSign(),t("div",{key:"eebe6ac230b4f4ba182229377984eb83a3e83570",class:"item"},this.renderHeader(),this.renderValue(),t("footer",{key:"f349fb88d701726af5793d35adce4d0880a1dbea"},this.renderHelperText(e),this.renderTimestamp()))),this.renderPromotedAction())}renderErrorSign(){if(this.hasError)return t("limel-icon",{class:"error-sign",name:"brake_warning"})}renderHeader(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.name)return t("header",null,this.renderAuthorName(),t("div",{class:"action-buttons"},this.renderUnpromotedActionsMenu()))}renderIcon(){var e,i,r,a;if(this.item.icon)return t("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderValue(){if(this.item.value)return t("limel-markdown",{class:"body-text reset-img-height",value:this.item.value})}renderAuthorName(){var e,i;if("string"==typeof(null===(e=this.item.author)||void 0===e?void 0:e.name))return t("span",{class:"author"},this.item.author.name);if("object"==typeof(null===(i=this.item.author)||void 0===i?void 0:i.name)){const{href:e,title:i,text:r}=this.item.author.name;return t("a",{class:"author",href:e,title:i},r)}}renderAuthorPicture(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.picture)return"limel-ai-avatar"===this.item.author.picture?t("limel-ai-avatar",{class:"author-avatar"}):t("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:r,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")}))}renderPromotedAction(){if(!this.item.promotedActions)return;const e=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:e,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return t("span",{class:"timestamp"},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)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-chat-item){display:flex;flex-direction:column;gap:0.25rem;min-width:0;min-height:0;max-width:calc(100% - 2rem)}.bubble-content{display:flex;gap:0.25rem;min-width:0;min-height:0}:host(limebb-chat-item:hover) .helper-text,:host(limebb-chat-item:hover) .timestamp,:host(limebb-chat-item:focus-within) .helper-text,:host(limebb-chat-item:focus-within) .timestamp{opacity:1}:host(limebb-chat-item.mine){margin-left:auto}:host(limebb-chat-item.mine) .item{border-bottom-right-radius:0.125rem;background-color:rgb(var(--color-sky-default), 0.2)}:host(limebb-chat-item.mine) .bubble-content{justify-content:end}:host(limebb-chat-item.mine) .icon-picture{order:2}:host(limebb-chat-item.theirs){margin-right:auto}:host(limebb-chat-item.theirs) .item{border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-300), 0.7)}.item{display:flex;flex-direction:column;border-radius:1.25rem;padding:0 0.25rem 0.25rem 0.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.icon-picture{display:flex;flex-direction:column;gap:0.5rem;align-items:center;justify-content:flex-end}.icon-picture:has(.author-avatar) limel-icon{width:1.25rem;padding:0.125rem}.icon{--icon-background-color:rgb(var(--contrast-500), 0.5);flex-shrink:0;padding:0.375rem;width:2.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-ai-avatar.author-avatar{background-color:rgb(var(--color-glaucous-darker))}header{display:flex;justify-content:space-between;align-items:center;min-height:2rem;padding-left:0.5rem}header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.body-text{padding:0.25rem 0.5rem}footer{display:flex;justify-content:space-between;align-items:end;gap:0.5rem;font-size:x-small}footer:not(:empty){padding:0 0.25rem 0.125rem 0.5rem}footer *{transition:opacity 0.2s ease;opacity:0.4}.timestamp{margin-left:auto}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-chat-item:hover) .action-bar,:host(limebb-chat-item:focus-within) .action-bar,:host(limebb-chat-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-chat-item:hover) limel-action-bar,:host(limebb-chat-item:focus-within) limel-action-bar,:host(limebb-chat-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-chat-item:hover),:host(limebb-chat-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}.action-bar{min-width:0;width:calc(100% - calc(2rem + 0.25rem))}:host(limebb-chat-item.theirs) .action-bar{margin-left:calc(2rem + 0.25rem)}:host(limebb-chat-item[has-error]:not([has-error=false])) .bubble-content{cursor:help}:host(limebb-chat-item[has-error]:not([has-error=false])) .item{border:1px solid rgb(var(--color-red-default))}:host(limebb-chat-item[has-error]:not([has-error=false])) .error-sign{color:rgb(var(--color-red-default));flex-shrink:0;width:1.25rem;align-self:center}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .action-bar{padding-left:1.25rem}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';const o=class{constructor(t){e(this,t)}render(){return t("div",{key:"4acffbefa03eb7605db612242ebfcbba15522d42",class:"typing-ellipsis"},t("div",{key:"9911cf59740e060dc74e88d569083c0ecfa0a891",class:"circle"}),t("div",{key:"ebbe4137c147c84322c47c39b847c8f8bc00a7b0",class:"circle"}),t("div",{key:"9118c496ffe0eb308716f8c7fbea518bd607731a",class:"circle"}))}};o.style="*{box-sizing:border-box}.typing-ellipsis{position:relative;display:inline-flex;align-items:center;gap:0.25rem;height:1.5rem;padding:0 0.5rem;border-radius:10rem;border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-600), 0.4);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.circle{position:relative;height:0.5rem;width:0.5rem;background:rgb(var(--contrast-800));border-radius:50%}.circle:first-of-type{animation:ellipsis-typing-indicator 1.2s infinite}.circle:nth-of-type(2){animation:ellipsis-typing-indicator 1.2s infinite 0.2s}.circle:nth-of-type(3){animation:ellipsis-typing-indicator 1.2s infinite 0.4s}@keyframes ellipsis-typing-indicator{0%{top:0}6.25%{top:-1px}12.5%{top:0;background:rgb(var(--contrast-1000))}18.75%{top:1px}25%{top:0}}";export{a as limebb_chat_item,o as limebb_typing_indicator}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as r}from"./p-52cf8641.js";import{i as t,z as i,c as o}from"./p-
|
|
1
|
+
import{r as e,h as r}from"./p-52cf8641.js";import{i as t,z as i,c as o}from"./p-199799ff.js";import{n as s}from"./p-7c9484b1.js";const n=["pdf","edit","view"],l={avi:"browser",bmp:"browser",csv:"browser",gif:"browser",heic:"browser",html:"browser",jpeg:"browser",jpg:"browser",json:"browser",mp3:"browser",mp4:"browser",mov:"browser",ogg:"browser",pdf:"browser",png:"browser",svg:"browser",svgz:"browser",txt:"browser",wav:"browser",wmv:"browser",xml:"browser",eml:"fileViewer",doc:"sharepoint",docx:"sharepoint",dot:"sharepoint",dotx:"sharepoint",odp:"sharepoint",ods:"sharepoint",pot:"sharepoint",ppt:"sharepoint",pptx:"sharepoint",pps:"sharepoint",ppsx:"sharepoint",xls:"sharepoint",xlsb:"sharepoint",xlsm:"sharepoint",xlsx:"sharepoint",odt:"sharepoint"};var a=function(e,r,t,i){var o,s=arguments.length,n=s<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,r,t,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(r,t,n):o(r,t))||n);return s>3&&n&&Object.defineProperty(r,t,n),n};const h=class{constructor(t){e(this,t),this.fileTypes=["view","contents","download"],this.renderLiveDocs=e=>{if(!this.isLiveDocsAvailable(e))return r("limebb-live-docs-info",null);if(!this.platform.isFeatureEnabled("useOfficeFilePreview"))return r("limebb-empty-state",{value:"Preview of this file type will be available soon",icon:{name:"attention",color:"rgb(var(--color-blue-light))"}});const t=this.getLiveDocsUrl(e);return r("iframe",{src:t,frameBorder:0,marginHeight:0,marginWidth:0})},this.renderFileViewer=e=>{const t=e.filename,i=this.getFileUrl(e);return i?r("limel-file-viewer",{filename:t,url:i,allowFullscreen:!0,allowOpenInNewTab:!0}):this.renderNotFound()},this.renderUnsupported=e=>r("limel-file-viewer",{filename:e.filename,url:void 0,allowFullscreen:!0,allowOpenInNewTab:!0}),this.renderNotFound=()=>[r("section",{class:"not-found"},r("limel-icon",{name:"error",size:"large"}),r("h2",null,this.translator.get("webclient.not-found")),r("p",null,this.translator.get("webclient.no-files-attached",{object:this.getDescriptive(this.limeobject)})))]}render(){const e=this.getFile();if(!e)return this.renderNotFound();const r=l[e.extension.toLowerCase()]||"unsupported";return(0,{fileViewer:this.renderFileViewer,browser:this.renderFileViewer,sharepoint:this.renderLiveDocs,unsupported:this.renderUnsupported}[r])(e)}getLiveDocsUrl(e){let r=[...this.fileTypes];return this.platform.isFeatureEnabled("useOfficeFilePreview")&&(r=["pdf",...r]),r.filter(this.isLiveDocsType).map((r=>e.getUrl(r))).find(Boolean)}getFileUrl(e){return this.fileTypes.filter(s(this.isLiveDocsType)).map((r=>e.getUrl(r))).find(Boolean)}getFile(){const e=this.fileProperty;if(e)return this.limeobject.getFile(e.name)}isLiveDocsAvailable(e){return n.some((r=>e.getUrl(r)))}isLiveDocsType(e){return n.includes(e)}getDescriptive(e){var r;return(null==e?void 0:e.descriptive)||(null===(r=this.limetype)||void 0===r?void 0:r.localname.singular)||this.translator.get("object")}get fileProperty(){if(this.limeobject){if(this.property){const e=this.limeobject.getLimetype().getProperty(this.property);if("file"===e.type)return e}return Object.values(this.limeobject.getLimetype().properties).find((e=>"file"===e.type))}}get translator(){return this.platform.get(o.Translate)}};a([t()],h.prototype,"limeobject",void 0),a([i()],h.prototype,"limetype",void 0),h.style=".not-found{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;line-height:1rem;color:rgb(var(--contrast-1100))}.not-found limel-icon{color:rgb(var(--color-red-default))}iframe{height:100%;width:100%}";export{h as limebb_limeobject_file_viewer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./p-
|
|
1
|
+
import{r}from"./p-199799ff.js";import{g as t,a as o,v as e}from"./p-b02c99d5.js";const n=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),i=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,s=/^\$me(\.\w+)*$/;function a(r,o,e){if(function(r){return"string"==typeof r&&(n.has(r)||i.test(r)||s.test(r))}(r))return{valid:!0};if("string"!=typeof r||!r.startsWith("%activeObject%"))return{valid:!0};if(!o)return{valid:!0};const a=r.replace(/^%activeObject%\.?/,"");if(!a)return{valid:!0};try{return t(e,o,a)?{valid:!0}:{valid:!1,error:`Property path '${a}' does not exist on limetype '${o}'`}}catch(r){return{valid:!1,error:`Invalid placeholder path: ${r.message}`}}}function u(r,t,o=!0){const e=Object.keys(r),n=[];if(o){const r=e.filter((r=>r.startsWith("#")&&"#description"!==r));r.length>0&&n.push(`Property '${t}' contains # properties not supported in visual mode: ${r.join(", ")}`)}return{keys:e.filter((r=>"_alias"!==r&&!r.startsWith("#"))),visualModeLimitations:n}}function c(r,t,o,e,n,i=!0){if(""===r){if(i&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=o[r];if(!s)throw new Error(`Property '${r}' does not exist on limetype '${n}'`);return s.relation?function(r,t,o,e,n=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${r}' must be null or an object`);const i=t,{keys:s,visualModeLimitations:a}=u(i,r,n);if(0===s.length)return a;const c=e.relation.getLimetype();if(!c)throw new Error(`Could not determine related limetype for property '${r}'`);const f={};for(const r of s)f[r]=i[r];const p=l(f,o,c.name,n);return[...a,...p]}(r,t,e,s,i):function(r,t,o=!0){if(null===t)return[];if("object"==typeof t){const{keys:e,visualModeLimitations:n}=u(t,r,o);if(0===e.length)return n;throw new Error(`Non-relation property '${r}' cannot have nested properties other than _alias or # properties (got: ${e.join(", ")})`)}throw new Error(`Non-relation property '${r}' must be null or an object (got ${typeof t})`)}(r,t,i)}function l(r,t,e,n=!0){const i=t[e];if(!i)throw new Error(`Unknown limetype: ${e}`);const s=o(i),a=[];for(const[o,i]of Object.entries(r)){if(o.startsWith("#"))continue;const r=c(o,i,s,t,e,n);a.push(...r)}return a}function f(t,o,n,i,s=!0){t&&("key"in t?function(t,o,n,i){if(!Object.values(r).includes(t.op))throw new Error(`Unsupported filter operator: ${t.op}`);const s=function(r,t,o,n){if(!r)return{valid:!1,error:"Filter key cannot be empty"};if(r.startsWith("%activeObject%")){const o=a(r,n,t);if(!o.valid)return o;const i=r.replace(/^%activeObject%\.?/,"");if(i&&n){const{error:r}=e(t,n,i);if(r)return{valid:!1,error:r}}return o}const{error:i}=e(t,o,r);return i?{valid:!1,error:i}:{valid:!0}}(t.key,n,i,o);if(!s.valid)throw new Error(`Invalid filter key '${t.key}': ${s.error}`);const u=a(t.exp,o,n);if(!u.valid)throw new Error(`Invalid placeholder in filter '${t.key}': ${u.error}`)}(t,o,n,i):"exp"in t&&function(t,o,e,n,i){if(t.op!==r.AND&&t.op!==r.OR&&t.op!==r.NOT)throw new Error(`Unsupported group operator: ${t.op}`);if(t.op===r.NOT)f(t.exp,o,e,n,i);else if(t.op===r.AND||t.op===r.OR){const r=t.exp;for(const t of r)f(t,o,e,n,i)}}(t,o,n,i,s))}function p(r,o,e,n){const i=[],s=function(r,t){return"object"!=typeof r||null===r?`orderBy[${t}] must be an object`:null}(r,o);if(s)return[s];const a=Object.keys(r),u=function(r,t){return 0===r.length?`orderBy[${t}] must have a property path`:r.length>1?`orderBy[${t}] must have exactly one property, got ${r.length}`:null}(a,o);if(u)return[u];const c=a[0],l=function(r,t){return"ASC"!==r&&"DESC"!==r?`orderBy[${t}]: direction must be 'ASC' or 'DESC', got '${r}'`:null}(r[c],o);l&&i.push(l);const f=function(r,o,e,n){if(!r||""===r)return null;return t(o,e,r)?null:`orderBy[${n}]: property path '${r}' does not exist on limetype '${e}'`}(c,e,n,o);return f&&i.push(f),i}function d(r,t,o,e){const n=[],i=[];try{const n=function(r,t,o,e=!0){const n=[];if(e&&r.aggregates&&n.push("responseFormat.aggregates is not yet supported in visual mode"),r.object){const i=l(r.object,t,o,e);n.push(...i)}return n}(r,t,o,e);i.push(...n)}catch(r){n.push(`Invalid responseFormat: ${r.message}`)}return{errors:n,limitations:i}}function y(r,t,o,e=!0){if(!r)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};const n=[],i=[];if(r.limetype&&!t[r.limetype]&&n.push(`Unknown limetype: ${r.limetype}`),void 0===r.offset||r.orderBy||n.push("offset requires orderBy to be specified"),r.orderBy){const o=function(r,t,o){const e=[];if(!Array.isArray(r))return e.push("orderBy must be an array"),e;if(!o||!t[o])return e;for(const[n,i]of r.entries()){const r=p(i,n,t,o);e.push(...r)}return e}(r.orderBy,t,r.limetype);n.push(...o)}if(e&&void 0!==r.offset&&i.push("offset is not yet supported in visual mode"),r.filter){const{errors:s,limitations:a}=function(r,t,o,e,n){const i=[],s=[];try{f(r,t,o,e,n)}catch(r){const t=r.message;t.includes("Invalid filter key")||t.includes("Cannot filter on many-relation")?(i.push(`Invalid filter: ${t}`),s.push(t)):i.push(`Invalid filter: ${t}`)}return{errors:i,limitations:s}}(r.filter,o,t,r.limetype,e);n.push(...s),i.push(...a)}if(r.responseFormat){const{errors:o,limitations:s}=d(r.responseFormat,t,r.limetype,e);n.push(...o),i.push(...s)}return{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}function v(r,t,o,e=!0){const n=[],i=[];if(!t[o])return n.push(`Unknown limetype: ${o}`),{valid:!1,visualModeSupported:!1,validationErrors:n,visualModeLimitations:i};const{errors:s,limitations:a}=d(r,t,o,e);return n.push(...s),i.push(...a),{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}export{y as i,v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as i,H as o}from"./p-52cf8641.js";import{c as a}from"./p-3b1fcd5b.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.handleKeyDown=e=>{"Enter"===e.key&&this.handleKanbanItemClick()},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"4ae9dbc241bda4df40a9b81e5c84bd9bc6d49699",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,onKeyDown:this.handleKeyDown},this.renderHeader(),this.renderContent(),this.renderSlot(),this.renderRelations(),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(){if(this.item.value)return i("div",{class:"content"},this.renderValue())}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"}))}renderSlot(){var e;if(null===(e=this.item)||void 0===e?void 0:e.bodyComponent)return i("slot",{name:"body"})}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}.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:0.5rem;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}slot[name=body]{display:block;padding:0.5rem}';export{s as limebb_kanban_item}
|
|
1
|
+
import{r as e,c as r,h as i,H as o}from"./p-52cf8641.js";import{c as a}from"./p-199799ff.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.handleKeyDown=e=>{"Enter"===e.key&&this.handleKanbanItemClick()},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"4ae9dbc241bda4df40a9b81e5c84bd9bc6d49699",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,onKeyDown:this.handleKeyDown},this.renderHeader(),this.renderContent(),this.renderSlot(),this.renderRelations(),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(){if(this.item.value)return i("div",{class:"content"},this.renderValue())}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"}))}renderSlot(){var e;if(null===(e=this.item)||void 0===e?void 0:e.bodyComponent)return i("slot",{name:"body"})}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}.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:0.5rem;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}slot[name=body]{display:block;padding:0.5rem}';export{s as limebb_kanban_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as o,h as r}from"./p-52cf8641.js";import{f as e}from"./p-4a85590d.js";import{c as s}from"./p-199799ff.js";const a=class{constructor(o){t(this,o)}connectedCallback(){const t=e(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(s.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))}};a.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{a as limebb_mention}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-52cf8641.js";import{Z as o}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-52cf8641.js";import{Z as o}from"./p-199799ff.js";import{v as r}from"./p-d47b6c3c.js";import"./p-b02c99d5.js";function s(e){let t;try{t=JSON.parse(e)}catch(e){throw new Error(`Invalid JSON: ${e.message}`)}if(null===t||"object"!=typeof t)throw new Error("Response format must be an object");const i=new Set(["object","aggregates"]),o=Object.keys(t),r=o.filter((e=>!i.has(e)));if(r.length>0)throw new Error(`Unexpected properties in response format: ${r.join(", ")}. Only 'object' and 'aggregates' are allowed.`);if(o.length>0&&!t.object&&!t.aggregates)throw new Error("Response format must contain at least one of: object, aggregates");return t}const l=class{constructor(i){e(this,i),this.change=t(this,"change",7),this.label="Response Format",this.helperText="",this.mode="visual",this.codeValue="",this.handleModeChange=e=>{e.stopPropagation();const t=e.detail.id;"visual"===t?this.switchToVisualMode():"code"===t&&this.switchToCode()},this.switchToVisualMode=()=>{try{const e=s(this.codeValue);if(!r(e,this.limetypes,this.limetype,this.visualModeEnabled).visualModeSupported)return;this.internalValue=e,this.mode="visual",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=s(this.codeValue);this.internalValue=e,this.change.emit(e)}catch(e){}},this.handleVisualModeChange=e=>{e.stopPropagation(),this.internalValue=e.detail,this.updateCodeValue(),this.change.emit(e.detail)}}get visualModeEnabled(){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(){this.internalValue=this.value||{object:{_id:null}},this.updateCodeValue(),this.visualModeEnabled&&this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}componentWillUpdate(){this.value&&"visual"===this.mode&&(this.internalValue=this.value)}render(){const e=this.checkVisualModeSupport();return i("div",{key:"7ae23c1366da49b591c0914f49f25c179e4d6712",class:"response-format-builder"},this.label&&i("h1",{key:"0cd528a69dd1b05769c678151f0827de15d167a8",class:"builder-label"},this.label),this.helperText&&i("p",{key:"b636ca0d32b244d051e74ed538cbd11438f29cd1",class:"builder-helper-text"},this.helperText),this.visualModeEnabled&&i("div",{key:"dc7248cb27d99aa654b0f1659938c3f2933d89e0",class:"mode-controls"},this.renderModeSwitch(e)),this.visualModeEnabled&&"code"!==this.mode?i("div",{class:"visual-mode"},this.renderVisualMode()):i("div",{class:"code-mode"},this.renderCodeEditor(e)))}renderModeSwitch(e){const t=!e.visualModeSupported,o=[{id:"visual",title:"Visual"},{id:"code",title:"Code"}].map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return i("limel-button-group",{value:o,disabled:t,onChange:this.handleModeChange})}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 Response Format:"),i("ul",null,e.validationErrors.map((e=>i("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&i("div",{class:"visual-mode-limitations"},i("strong",null,"Cannot switch to visual mode:"),i("ul",null,e.visualModeLimitations.map((e=>i("li",null,e))))))}renderVisualMode(){return i("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalValue,onChange:this.handleVisualModeChange})}checkVisualModeSupport(){if(!this.limetypes)return{valid:!1,visualModeSupported:!1,validationErrors:["Limetypes not loaded"],visualModeLimitations:[]};let e;if("code"===this.mode)try{e=s(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:[e.message],visualModeLimitations:[]}}else e=this.internalValue;return r(e,this.limetypes,this.limetype,this.visualModeEnabled)}updateCodeValue(){this.codeValue=JSON.stringify(this.internalValue,null,2)}};(function(e,t,i,o){var r,s=arguments.length,l=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(l=(s<3?r(l):s>3?r(t,i,l):r(t,i))||l);s>3&&l&&Object.defineProperty(t,i,l)})([o()],l.prototype,"limetypes",void 0),l.style=":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.visual-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 .visual-mode-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 .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .visual-mode-limitations li{margin:0.25rem 0}";export{l as limebb_lime_query_response_format_builder}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as e,h as t,H as r}from"./p-52cf8641.js";import{Z as s}from"./p-
|
|
1
|
+
import{r as i,c as e,h as t,H as r}from"./p-52cf8641.js";import{Z as s}from"./p-199799ff.js";import{i as o}from"./p-d47b6c3c.js";import"./p-b02c99d5.js";const l=class{constructor(t){i(this,t),this.change=e(this,"change",7),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=i=>{i.stopPropagation(),this.limetype=i.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=i=>{var e;i.stopPropagation(),this.filter=null!==(e=i.detail)&&void 0!==e?e:void 0,this.emitChange()},this.handleResponseFormatChange=i=>{i.stopPropagation(),this.internalResponseFormat=i.detail,this.emitChange()},this.handleLimitChange=i=>{i.stopPropagation();const e=i.detail;this.limit=e?Number.parseInt(e,10):void 0,this.emitChange()},this.handleOrderByChange=i=>{i.stopPropagation(),this.orderBy=i.detail,this.emitChange()},this.handleDescriptionChange=i=>{i.stopPropagation(),this.description=i.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const i=this.description.trim();i!==this.description&&(this.description=i||void 0,this.emitChange())}},this.handleChange=i=>{i.stopPropagation();const e=i.detail.id;if("visual"===e)try{const i=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=i.limetype||"",this.filter=i.filter,this.internalResponseFormat=i.responseFormat,this.limit=i.limit,this.orderBy=i.orderBy,this.description=i["#description"],this.mode="visual",this.change.emit(i)}catch(i){}else"code"===e&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=i=>{i.stopPropagation(),this.codeValue=i.detail;try{const i=JSON.parse(this.codeValue);this.change.emit(i)}catch(i){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var i,e,t;return null!==(t=null===(e=null===(i=this.platform)||void 0===i?void 0:i.isFeatureEnabled)||void 0===e?void 0:e.call(i,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)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.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return t(r,{key:"72ad0a52788c07a8369ee28535d9a05be92f5144"},this.renderHeader(),this.renderContent())}renderContent(){const i=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(i)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=this.limetype?JSON.stringify(this.buildLimeQuery(),null,2):JSON.stringify(this.value||{},null,2)}buildLimeQuery(){const i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(i["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(i.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(i.orderBy=this.orderBy),i}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let i;if("code"===this.mode&&this.codeValue)try{i=JSON.parse(this.codeValue)}catch(i){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(i.limit=this.limit)}return o(i,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(i){const e=!i.visualModeSupported,r=this.getButtons().map((i=>Object.assign(Object.assign({},i),{selected:i.id===this.mode})));return t("limel-button-group",{slot:"actions",onChange:this.handleChange,value:r,disabled:e})}renderCodeEditor(i){return[t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!i.valid&&i.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,i.validationErrors.map((i=>t("li",null,i))))),this.visualModeEnabled&&i.valid&&!i.visualModeSupported&&i.visualModeLimitations.length>0&&t("div",{class:"visual-mode-limitations"},t("strong",null,"Cannot switch to visual mode:"),t("ul",null,i.visualModeLimitations.map((i=>t("li",null,i)))))]}renderLimetypeSection(){return t("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return t("section",{class:"description"},t("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return t("section",{class:"response-format"},t("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return t("section",{class:"filter"},t("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),t("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 i;if(this.limetype)return t("section",{class:"query-options"},t("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),t("div",{class:"query-options-controls"},t("limel-input-field",{label:"Limit",type:"number",value:(null===(i=this.limit)||void 0===i?void 0:i.toString())||"",placeholder:"No limit",helperText:"Maximum number of results",onChange:this.handleLimitChange}),t("limebb-lime-query-order-by-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.orderBy,onChange:this.handleOrderByChange})))}renderVisualMode(){return t("div",{class:"visual-mode"},this.renderLimetypeSection(),this.renderDescriptionSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderHeader(){const i=this.checkVisualModeSupport();return t("limel-header",{heading:this.label},this.renderModeControls(i))}renderModeControls(i){if(this.visualModeEnabled)return this.renderModeSwitch(i)}renderCodeMode(i){return t("div",{class:"code-mode"},this.renderCodeEditor(i))}};(function(i,e,t,r){var s,o=arguments.length,l=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,e,t,r);else for(var d=i.length-1;d>=0;d--)(s=i[d])&&(l=(o<3?s(l):o>3?s(e,t,l):s(e,t))||l);o>3&&l&&Object.defineProperty(e,t,l)})([s()],l.prototype,"limetypes",void 0),l.style="*,*:before,*:after{box-sizing:border-box}:host(limebb-lime-query-builder){--header-background-color:rgb(var(--contrast-500));--limebb-lime-query-builder-background-color:rgb(var(--contrast-100));--limebb-lime-query-builder-border-radius:0.75rem;--limebb-lime-query-builder-visual-mode-padding:1rem;--limebb-lime-query-builder-group-color:rgb(var(--color-sky-lighter));box-sizing:border-box;width:calc(100% - 1.5rem);margin:0.75rem auto;display:flex;flex-direction:column;border-radius:var(--limebb-lime-query-builder-border-radius);background-color:var(--limebb-lime-query-builder-background-color);box-shadow:var(--shadow-inflated-16)}.visual-mode{display:flex;flex-direction:column;gap:1rem;padding:var(--limebb-lime-query-builder-visual-mode-padding);border:1px solid var(--header-background-color);border-radius:0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius)}.code-mode{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-mode .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-mode .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .validation-errors ul{margin:0;padding-left:1.5rem}.code-mode .validation-errors li{margin:0.25rem 0}.code-mode .visual-mode-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-mode .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-mode .visual-mode-limitations li{margin:0.25rem 0}section.description,section.filter,section.query-options{display:flex;flex-direction:column;gap:1rem}section h4{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.query-options-controls{display:flex;flex-direction:column;gap:1rem}";export{l as limebb_lime_query_builder}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as r}from"./p-52cf8641.js";import{r as s,c as o}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,H as r}from"./p-52cf8641.js";import{r as s,c as o}from"./p-199799ff.js";import{g as n}from"./p-0a266c26.js";import{i as l}from"./p-1484e300.js";import{b as a}from"./p-a659d55a.js";import{i as h,a as d,b as m}from"./p-b31772c8.js";import"./p-35897ec3.js";import"./p-fe2b91d9.js";import"./p-5322fd19.js";function c(t){return"string"==typeof t||!h(t)&&d(t)&&"[object String]"==m(t)}const p=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:"Condition",icon:{name:"plus_math",title:"Add"},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}))}};p.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}";const u=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.label="Sort Order",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(t){t&&(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];if(!i)return!1;const r=Object.keys(t)[0],s=Object.keys(i)[0];return r===s&&t[r]===i[s]})))&&(this.items=t.length>0?[...t]:[])}render(){return i(r,{key:"601436a1a47be391bf4768d25ef7f8da911fc80d"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((t,e)=>this.renderItem(t,e))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(t,e){const r=Object.keys(t)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${e}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:["handleValueChange"]}}};u.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.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))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.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))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const b=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],y=b.filter((t=>"system"!==t));y.push("belongsto","hasone","hasmany","hasandbelongstomany");const g=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 r,s,o,n;return"formInfo"!==i||(o=null===(r=null==t?void 0:t.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==e?void 0:e.schema)||void 0===s?void 0:s.oneOf,!a(o,n))}render(){var t;const e=this.getLimeTypes().map(f);e.sort(((t,e)=>this.collator.compare(t.text,e.text)));let r=e.find((t=>t.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,e.unshift({text:(null===(t=this.limeTypeRepository.getLimeType(this.value))||void 0===t?void 0:t.localname.singular)||this.value,value:this.value}),r=e[0]),e.unshift({text:"",value:""}),i("limel-select",{key:"a6df4090bd93b2fb9d3745b69fcd32a51ff3755b",label:this.label,options:e,value:r,required:this.required,helperText:this.helperText,invalid:s,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(c)),i?i.map((t=>this.limeTypeRepository.getLimeType(t))).filter(l):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(t){for(const e of this.propertyFields)e.limetype=t,e.allowedPropertyTypes===b&&(e.allowedPropertyTypes=y)}get limeTypeRepository(){return this.platform.get(o.LimeTypeRepository)}},f=t=>({text:t.localname.singular,value:t.name,icon:n(t)});export{p as limebb_lime_query_filter_builder,u as limebb_lime_query_order_by_editor,g as limebb_limetype_field}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
2
|
+
/**
|
|
3
|
+
* Object chip
|
|
4
|
+
*
|
|
5
|
+
* Renders a `limel-chip` representing a Lime CRM object.
|
|
6
|
+
* The consumer provides `limetype` and `objectid`, and the component
|
|
7
|
+
* takes care of resolving the descriptive text, limetype icon and color,
|
|
8
|
+
* and generating a navigation URL.
|
|
9
|
+
*
|
|
10
|
+
* :::note
|
|
11
|
+
* If `platform` is not supplied as a prop, it will be fetched from the DOM.
|
|
12
|
+
* :::
|
|
13
|
+
*
|
|
14
|
+
* @exampleComponent limebb-example-object-chip
|
|
15
|
+
* @exampleComponent limebb-example-object-chip-icon-and-color-fallbacks
|
|
16
|
+
* @beta
|
|
17
|
+
*/
|
|
18
|
+
export declare class ObjectChip {
|
|
19
|
+
/**
|
|
20
|
+
* Name of the limetype of the object.
|
|
21
|
+
*/
|
|
22
|
+
limetype: string;
|
|
23
|
+
/**
|
|
24
|
+
* Id of the object.
|
|
25
|
+
*/
|
|
26
|
+
objectid: number;
|
|
27
|
+
/**
|
|
28
|
+
* Platform instance. If not provided, the component will
|
|
29
|
+
* walk the DOM to find a parent with a platform.
|
|
30
|
+
*
|
|
31
|
+
* :::note
|
|
32
|
+
* The platform must be available when the component connects to
|
|
33
|
+
* the DOM, either as a prop or via a parent element. Changing
|
|
34
|
+
* the platform after the component has connected is not supported.
|
|
35
|
+
* :::
|
|
36
|
+
*/
|
|
37
|
+
platform?: LimeWebComponentPlatform;
|
|
38
|
+
private data;
|
|
39
|
+
private resolver;
|
|
40
|
+
connectedCallback(): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
protected handlePropChange(): void;
|
|
43
|
+
render(): any;
|
|
44
|
+
private getChipText;
|
|
45
|
+
private getErrorText;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=object-chip.d.ts.map
|
|
@@ -23,6 +23,7 @@ import { EnhancedEditorMetadata } from './uploader/building-blocks-upload-handle
|
|
|
23
23
|
* @exampleComponent limebb-example-text-editor-as-form-component
|
|
24
24
|
* @exampleComponent limebb-example-text-editor-composite
|
|
25
25
|
* @exampleComponent limebb-example-text-editor-allow-resize
|
|
26
|
+
* @exampleComponent limebb-example-text-editor-focus
|
|
26
27
|
* @beta
|
|
27
28
|
*/
|
|
28
29
|
export declare class LimeBBTextEditor implements FormComponent<string> {
|
|
@@ -1753,6 +1753,33 @@ export namespace Components {
|
|
|
1753
1753
|
*/
|
|
1754
1754
|
"platform": LimeWebComponentPlatform;
|
|
1755
1755
|
}
|
|
1756
|
+
/**
|
|
1757
|
+
* Object chip
|
|
1758
|
+
* Renders a `limel-chip` representing a Lime CRM object.
|
|
1759
|
+
* The consumer provides `limetype` and `objectid`, and the component
|
|
1760
|
+
* takes care of resolving the descriptive text, limetype icon and color,
|
|
1761
|
+
* and generating a navigation URL.
|
|
1762
|
+
* :::note
|
|
1763
|
+
* If `platform` is not supplied as a prop, it will be fetched from the DOM.
|
|
1764
|
+
* :::
|
|
1765
|
+
* @exampleComponent limebb-example-object-chip
|
|
1766
|
+
* @exampleComponent limebb-example-object-chip-icon-and-color-fallbacks
|
|
1767
|
+
* @beta
|
|
1768
|
+
*/
|
|
1769
|
+
interface LimebbObjectChip {
|
|
1770
|
+
/**
|
|
1771
|
+
* Name of the limetype of the object.
|
|
1772
|
+
*/
|
|
1773
|
+
"limetype": string;
|
|
1774
|
+
/**
|
|
1775
|
+
* Id of the object.
|
|
1776
|
+
*/
|
|
1777
|
+
"objectid": number;
|
|
1778
|
+
/**
|
|
1779
|
+
* Platform instance. If not provided, the component will walk the DOM to find a parent with a platform. :::note The platform must be available when the component connects to the DOM, either as a prop or via a parent element. Changing the platform after the component has connected is not supported. :::
|
|
1780
|
+
*/
|
|
1781
|
+
"platform"?: LimeWebComponentPlatform;
|
|
1782
|
+
}
|
|
1756
1783
|
/**
|
|
1757
1784
|
* This component generates a visualization that displays a percentage value
|
|
1758
1785
|
* alongside a horizontal bar showing the percentage visually.
|
|
@@ -1968,6 +1995,7 @@ export namespace Components {
|
|
|
1968
1995
|
* @exampleComponent limebb-example-text-editor-as-form-component
|
|
1969
1996
|
* @exampleComponent limebb-example-text-editor-composite
|
|
1970
1997
|
* @exampleComponent limebb-example-text-editor-allow-resize
|
|
1998
|
+
* @exampleComponent limebb-example-text-editor-focus
|
|
1971
1999
|
* @beta
|
|
1972
2000
|
*/
|
|
1973
2001
|
interface LimebbTextEditor {
|
|
@@ -3515,6 +3543,25 @@ declare global {
|
|
|
3515
3543
|
prototype: HTMLLimebbNotificationListElement;
|
|
3516
3544
|
new (): HTMLLimebbNotificationListElement;
|
|
3517
3545
|
};
|
|
3546
|
+
/**
|
|
3547
|
+
* Object chip
|
|
3548
|
+
* Renders a `limel-chip` representing a Lime CRM object.
|
|
3549
|
+
* The consumer provides `limetype` and `objectid`, and the component
|
|
3550
|
+
* takes care of resolving the descriptive text, limetype icon and color,
|
|
3551
|
+
* and generating a navigation URL.
|
|
3552
|
+
* :::note
|
|
3553
|
+
* If `platform` is not supplied as a prop, it will be fetched from the DOM.
|
|
3554
|
+
* :::
|
|
3555
|
+
* @exampleComponent limebb-example-object-chip
|
|
3556
|
+
* @exampleComponent limebb-example-object-chip-icon-and-color-fallbacks
|
|
3557
|
+
* @beta
|
|
3558
|
+
*/
|
|
3559
|
+
interface HTMLLimebbObjectChipElement extends Components.LimebbObjectChip, HTMLStencilElement {
|
|
3560
|
+
}
|
|
3561
|
+
var HTMLLimebbObjectChipElement: {
|
|
3562
|
+
prototype: HTMLLimebbObjectChipElement;
|
|
3563
|
+
new (): HTMLLimebbObjectChipElement;
|
|
3564
|
+
};
|
|
3518
3565
|
/**
|
|
3519
3566
|
* This component generates a visualization that displays a percentage value
|
|
3520
3567
|
* alongside a horizontal bar showing the percentage visually.
|
|
@@ -3650,6 +3697,7 @@ declare global {
|
|
|
3650
3697
|
* @exampleComponent limebb-example-text-editor-as-form-component
|
|
3651
3698
|
* @exampleComponent limebb-example-text-editor-composite
|
|
3652
3699
|
* @exampleComponent limebb-example-text-editor-allow-resize
|
|
3700
|
+
* @exampleComponent limebb-example-text-editor-focus
|
|
3653
3701
|
* @beta
|
|
3654
3702
|
*/
|
|
3655
3703
|
interface HTMLLimebbTextEditorElement extends Components.LimebbTextEditor, HTMLStencilElement {
|
|
@@ -3779,6 +3827,7 @@ declare global {
|
|
|
3779
3827
|
"limebb-navigation-button": HTMLLimebbNavigationButtonElement;
|
|
3780
3828
|
"limebb-notification-item": HTMLLimebbNotificationItemElement;
|
|
3781
3829
|
"limebb-notification-list": HTMLLimebbNotificationListElement;
|
|
3830
|
+
"limebb-object-chip": HTMLLimebbObjectChipElement;
|
|
3782
3831
|
"limebb-percentage-visualizer": HTMLLimebbPercentageVisualizerElement;
|
|
3783
3832
|
"limebb-property-selector": HTMLLimebbPropertySelectorElement;
|
|
3784
3833
|
"limebb-summary-popover": HTMLLimebbSummaryPopoverElement;
|
|
@@ -5658,6 +5707,33 @@ declare namespace LocalJSX {
|
|
|
5658
5707
|
*/
|
|
5659
5708
|
"platform": LimeWebComponentPlatform;
|
|
5660
5709
|
}
|
|
5710
|
+
/**
|
|
5711
|
+
* Object chip
|
|
5712
|
+
* Renders a `limel-chip` representing a Lime CRM object.
|
|
5713
|
+
* The consumer provides `limetype` and `objectid`, and the component
|
|
5714
|
+
* takes care of resolving the descriptive text, limetype icon and color,
|
|
5715
|
+
* and generating a navigation URL.
|
|
5716
|
+
* :::note
|
|
5717
|
+
* If `platform` is not supplied as a prop, it will be fetched from the DOM.
|
|
5718
|
+
* :::
|
|
5719
|
+
* @exampleComponent limebb-example-object-chip
|
|
5720
|
+
* @exampleComponent limebb-example-object-chip-icon-and-color-fallbacks
|
|
5721
|
+
* @beta
|
|
5722
|
+
*/
|
|
5723
|
+
interface LimebbObjectChip {
|
|
5724
|
+
/**
|
|
5725
|
+
* Name of the limetype of the object.
|
|
5726
|
+
*/
|
|
5727
|
+
"limetype"?: string;
|
|
5728
|
+
/**
|
|
5729
|
+
* Id of the object.
|
|
5730
|
+
*/
|
|
5731
|
+
"objectid"?: number;
|
|
5732
|
+
/**
|
|
5733
|
+
* Platform instance. If not provided, the component will walk the DOM to find a parent with a platform. :::note The platform must be available when the component connects to the DOM, either as a prop or via a parent element. Changing the platform after the component has connected is not supported. :::
|
|
5734
|
+
*/
|
|
5735
|
+
"platform"?: LimeWebComponentPlatform;
|
|
5736
|
+
}
|
|
5661
5737
|
/**
|
|
5662
5738
|
* This component generates a visualization that displays a percentage value
|
|
5663
5739
|
* alongside a horizontal bar showing the percentage visually.
|
|
@@ -5881,6 +5957,7 @@ declare namespace LocalJSX {
|
|
|
5881
5957
|
* @exampleComponent limebb-example-text-editor-as-form-component
|
|
5882
5958
|
* @exampleComponent limebb-example-text-editor-composite
|
|
5883
5959
|
* @exampleComponent limebb-example-text-editor-allow-resize
|
|
5960
|
+
* @exampleComponent limebb-example-text-editor-focus
|
|
5884
5961
|
* @beta
|
|
5885
5962
|
*/
|
|
5886
5963
|
interface LimebbTextEditor {
|
|
@@ -6117,6 +6194,7 @@ declare namespace LocalJSX {
|
|
|
6117
6194
|
"limebb-navigation-button": LimebbNavigationButton;
|
|
6118
6195
|
"limebb-notification-item": LimebbNotificationItem;
|
|
6119
6196
|
"limebb-notification-list": LimebbNotificationList;
|
|
6197
|
+
"limebb-object-chip": LimebbObjectChip;
|
|
6120
6198
|
"limebb-percentage-visualizer": LimebbPercentageVisualizer;
|
|
6121
6199
|
"limebb-property-selector": LimebbPropertySelector;
|
|
6122
6200
|
"limebb-summary-popover": LimebbSummaryPopover;
|
|
@@ -6697,6 +6775,20 @@ declare module "@stencil/core" {
|
|
|
6697
6775
|
* @private
|
|
6698
6776
|
*/
|
|
6699
6777
|
"limebb-notification-list": LocalJSX.LimebbNotificationList & JSXBase.HTMLAttributes<HTMLLimebbNotificationListElement>;
|
|
6778
|
+
/**
|
|
6779
|
+
* Object chip
|
|
6780
|
+
* Renders a `limel-chip` representing a Lime CRM object.
|
|
6781
|
+
* The consumer provides `limetype` and `objectid`, and the component
|
|
6782
|
+
* takes care of resolving the descriptive text, limetype icon and color,
|
|
6783
|
+
* and generating a navigation URL.
|
|
6784
|
+
* :::note
|
|
6785
|
+
* If `platform` is not supplied as a prop, it will be fetched from the DOM.
|
|
6786
|
+
* :::
|
|
6787
|
+
* @exampleComponent limebb-example-object-chip
|
|
6788
|
+
* @exampleComponent limebb-example-object-chip-icon-and-color-fallbacks
|
|
6789
|
+
* @beta
|
|
6790
|
+
*/
|
|
6791
|
+
"limebb-object-chip": LocalJSX.LimebbObjectChip & JSXBase.HTMLAttributes<HTMLLimebbObjectChipElement>;
|
|
6700
6792
|
/**
|
|
6701
6793
|
* This component generates a visualization that displays a percentage value
|
|
6702
6794
|
* alongside a horizontal bar showing the percentage visually.
|
|
@@ -6791,6 +6883,7 @@ declare module "@stencil/core" {
|
|
|
6791
6883
|
* @exampleComponent limebb-example-text-editor-as-form-component
|
|
6792
6884
|
* @exampleComponent limebb-example-text-editor-composite
|
|
6793
6885
|
* @exampleComponent limebb-example-text-editor-allow-resize
|
|
6886
|
+
* @exampleComponent limebb-example-text-editor-focus
|
|
6794
6887
|
* @beta
|
|
6795
6888
|
*/
|
|
6796
6889
|
"limebb-text-editor": LocalJSX.LimebbTextEditor & JSXBase.HTMLAttributes<HTMLLimebbTextEditorElement>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LimeObject, LimeType, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
2
|
+
/**
|
|
3
|
+
* State emitted by ObjectResolver whenever resolved data changes.
|
|
4
|
+
*/
|
|
5
|
+
export interface ObjectResolverState {
|
|
6
|
+
limeobject?: LimeObject;
|
|
7
|
+
limetypeData?: LimeType;
|
|
8
|
+
loadFailed: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Build the navigation URL for a Lime CRM object.
|
|
12
|
+
* @param limetype
|
|
13
|
+
* @param objectid
|
|
14
|
+
*/
|
|
15
|
+
export declare function getObjectUrl(limetype: string, objectid: number): string;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves platform, limetype metadata, and object data for a given
|
|
18
|
+
* limetype + objectid pair.
|
|
19
|
+
*
|
|
20
|
+
* Designed to be used by Stencil components: pass an `onStateChange`
|
|
21
|
+
* callback that updates a `@State()` property to trigger re-renders.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ObjectResolver {
|
|
24
|
+
private onStateChange;
|
|
25
|
+
private state;
|
|
26
|
+
private _platform?;
|
|
27
|
+
private limetype;
|
|
28
|
+
private objectid;
|
|
29
|
+
private hasPendingLoad;
|
|
30
|
+
private isDisconnected;
|
|
31
|
+
constructor(onStateChange: (state: ObjectResolverState) => void);
|
|
32
|
+
/**
|
|
33
|
+
* The resolved platform instance, if any.
|
|
34
|
+
*/
|
|
35
|
+
get resolvedPlatform(): LimeWebComponentPlatform | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Initialize the resolver. Call from `connectedCallback()`.
|
|
38
|
+
*
|
|
39
|
+
* @param limetype - name of the limetype
|
|
40
|
+
* @param objectid - id of the object
|
|
41
|
+
* @param hostElement - the component's host element (for DOM-walking fallback)
|
|
42
|
+
* @param platform - optional platform prop (skips DOM walk if provided)
|
|
43
|
+
*/
|
|
44
|
+
connect(limetype: string, objectid: number, hostElement: HTMLElement, platform?: LimeWebComponentPlatform): void;
|
|
45
|
+
/**
|
|
46
|
+
* Handle prop changes. Call from `@Watch` handlers.
|
|
47
|
+
*
|
|
48
|
+
* Debounces via `queueMicrotask` so that simultaneous changes to
|
|
49
|
+
* both `limetype` and `objectid` result in a single load.
|
|
50
|
+
* @param limetype
|
|
51
|
+
* @param objectid
|
|
52
|
+
*/
|
|
53
|
+
update(limetype: string, objectid: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Prevent stale updates after the component disconnects.
|
|
56
|
+
* Call from `disconnectedCallback()`.
|
|
57
|
+
*/
|
|
58
|
+
disconnect(): void;
|
|
59
|
+
private findPlatform;
|
|
60
|
+
private hasPlatformProp;
|
|
61
|
+
private resolveLimeType;
|
|
62
|
+
private loadLimeObject;
|
|
63
|
+
private isStale;
|
|
64
|
+
private updateState;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=object-resolver.d.ts.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e}from"./p-52cf8641.js";import{d as c,c as o}from"./p-3b1fcd5b.js";import{H as s}from"./p-66352a1e.js";let i=class{constructor(t){this.itemId=t}};i=function(t,e,c,o){var s,i=arguments.length,l=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,c):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,c,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(l=(i<3?s(l):i>3?s(e,c,l):s(e,c))||l);return i>3&&l&&Object.defineProperty(e,c,l),l}([c({id:"limebb-feed.highlight-item"})],i);const l=class{constructor(c){t(this,c),this.loaded=e(this,"loaded",7)}connectedCallback(){}async componentWillLoad(){const t=new s;this.platform.register(s.SERVICE_NAME,t),this.commandBus.register(i,t),this.loaded.emit()}componentWillUpdate(){}disconnectedCallback(){}get commandBus(){return this.platform.get(o.CommandBus)}};export{l as limebb_loader}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as o,h as r}from"./p-52cf8641.js";import{c as e}from"./p-3b1fcd5b.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}
|